diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/404.html b/404.html new file mode 100644 index 00000000..aa96093e --- /dev/null +++ b/404.html @@ -0,0 +1,23 @@ + + + + + + 404 | Future Enterprise Coding Standards + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/assets/app.CXGmg8Jv.js b/assets/app.CXGmg8Jv.js new file mode 100644 index 00000000..7c5aec11 --- /dev/null +++ b/assets/app.CXGmg8Jv.js @@ -0,0 +1,189 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/dagre-4EVJKHTY.C19Cb-p5.js","assets/chunks/graph.B66Ap3eE.js","assets/chunks/baseUniq.DbzeOdwK.js","assets/chunks/layout.CYDrMIpX.js","assets/chunks/basePickBy.DBxcSOni.js","assets/chunks/clone.b2N_W2Ea.js","assets/chunks/framework.BDUoXecB.js","assets/chunks/theme.C7mmewBt.js","assets/chunks/c4Diagram-6F5ED5ID.B8JqF2R5.js","assets/chunks/chunk-ASOPGD6M.9xhfAZUp.js","assets/chunks/flowDiagram-7ASYPVHJ.DBrKMec-.js","assets/chunks/chunk-5HRBRIJM.CiC8nwb0.js","assets/chunks/channel.w7CYfGuh.js","assets/chunks/erDiagram-6RL3IURR.BSCe9PhQ.js","assets/chunks/gitGraphDiagram-NRZ2UAAF.DYBJyTXa.js","assets/chunks/chunk-TMUBEWPD.DdUvJo-R.js","assets/chunks/chunk-KFBOBJHC.DtEDTmGR.js","assets/chunks/gitGraph-YCYPL57B.CGDMLFt3.js","assets/chunks/ganttDiagram-NTVNEXSI.C7LBLS21.js","assets/chunks/linear.BcMShDgX.js","assets/chunks/init.Gi6I4Gst.js","assets/chunks/infoDiagram-A4XQUW5V.q7RyalY3.js","assets/chunks/pieDiagram-YF2LJOPJ.CGhsgUnJ.js","assets/chunks/arc.w3rEdi5q.js","assets/chunks/ordinal.BYWQX77i.js","assets/chunks/quadrantDiagram-OS5C2QUG.DzULb5bu.js","assets/chunks/xychartDiagram-6QU3TZC5.BLrMmmG-.js","assets/chunks/requirementDiagram-MIRIMTAZ.DZI_fJYT.js","assets/chunks/sequenceDiagram-G6AWOVSC.BR6TLOJa.js","assets/chunks/classDiagram-LNE6IOMH.DdJyZtDn.js","assets/chunks/chunk-T2TOU4HS.BecFh13f.js","assets/chunks/classDiagram-v2-MQ7JQ4JX.DdJyZtDn.js","assets/chunks/stateDiagram-MAYHULR4.ClYhRmpy.js","assets/chunks/chunk-7U56Z5CX.BNSSxKI9.js","assets/chunks/stateDiagram-v2-4JROLMXI.B4BlUuF9.js","assets/chunks/journeyDiagram-G5WM74LC.D8z_SedJ.js","assets/chunks/timeline-definition-U7ZMHBDA.CdHHaiF9.js","assets/chunks/mindmap-definition-GWI6TPTV.D8wY2Trv.js","assets/chunks/cytoscape.esm.FpOb6hff.js","assets/chunks/kanban-definition-QRCXZQQD.DPLJJDkx.js","assets/chunks/sankeyDiagram-Y46BX6SQ.Dd6zI_qa.js","assets/chunks/diagram-QW4FP2JN.DmeRA8RG.js","assets/chunks/blockDiagram-ZHA2E4KO.Bp233VSp.js","assets/chunks/architectureDiagram-UYN6MBPD.qBPd9-2Q.js"])))=>i.map(i=>d[i]); +var Bm=Object.defineProperty;var Ml=e=>{throw TypeError(e)};var Mm=(e,t,r)=>t in e?Bm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var dt=(e,t,r)=>Mm(e,typeof t!="symbol"?t+"":t,r),Em=(e,t,r)=>t.has(e)||Ml("Cannot "+r);var El=(e,t,r)=>t.has(e)?Ml("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var si=(e,t,r)=>(Em(e,t,"access private method"),r);import{V as ft,p as Fl,u as hh,aq as Fm,v as uh,x as $m,o as Dm,c as Rm,n as Om,R as ms,ar as Im,as as Pm,at as Nm,an as zm,au as qm,av as Wm,aw as Hm,ax as jm,ay as Um,ao as Ym,d as Gm,s as Vm,az as Xm,aA as Zm,aB as Km,a6 as Qm}from"./chunks/framework.BDUoXecB.js";import{R as Jm}from"./chunks/theme.C7mmewBt.js";var t0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function e0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fh={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(t0,function(){var r=1e3,i=6e4,n=36e5,a="millisecond",o="second",s="minute",l="hour",c="day",h="week",u="month",f="quarter",p="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(M){var L=["th","st","nd","rd"],S=M%100;return"["+M+(L[(S-20)%10]||L[S]||L[0])+"]"}},_=function(M,L,S){var F=String(M);return!F||F.length>=L?M:""+Array(L+1-F.length).join(S)+M},v={s:_,z:function(M){var L=-M.utcOffset(),S=Math.abs(L),F=Math.floor(S/60),T=S%60;return(L<=0?"+":"-")+_(F,2,"0")+":"+_(T,2,"0")},m:function M(L,S){if(L.date()1)return M(Y[0])}else{var J=L.name;E[J]=L,T=J}return!F&&T&&(k=T),T||!F&&k},R=function(M,L){if(O(M))return M.clone();var S=typeof L=="object"?L:{};return S.date=M,S.args=arguments,new q(S)},B=v;B.l=N,B.i=O,B.w=function(M,L){return R(M,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var q=function(){function M(S){this.$L=N(S.locale,null,!0),this.parse(S),this.$x=this.$x||S.x||{},this[A]=!0}var L=M.prototype;return L.parse=function(S){this.$d=function(F){var T=F.date,z=F.utc;if(T===null)return new Date(NaN);if(B.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var Y=T.match(y);if(Y){var J=Y[2]-1||0,pt=(Y[7]||"0").substring(0,3);return z?new Date(Date.UTC(Y[1],J,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,pt)):new Date(Y[1],J,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,pt)}}return new Date(T)}(S),this.init()},L.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},L.$utils=function(){return B},L.isValid=function(){return this.$d.toString()!==m},L.isSame=function(S,F){var T=R(S);return this.startOf(F)<=T&&T<=this.endOf(F)},L.isAfter=function(S,F){return R(S)e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return Cn.hue2rgb(a,n,e+1/3)*255;case"g":return Cn.hue2rgb(a,n,e)*255;case"b":return Cn.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),o=(n+a)/2;if(i==="l")return o*100;if(n===a)return 0;const s=n-a,l=o>.5?s/(2-n-a):s/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/s+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},a0={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},et={channel:Cn,lang:n0,unit:a0},Ne={};for(let e=0;e<=255;e++)Ne[e]=et.unit.dec2hex(e);const Et={ALL:0,RGB:1,HSL:2};class s0{constructor(){this.type=Et.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Et.ALL}is(t){return this.type===t}}class o0{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new s0}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Et.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=et.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=et.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=et.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=et.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=et.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=et.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Et.HSL)&&r!==void 0?r:(this._ensureHSL(),et.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Et.HSL)&&r!==void 0?r:(this._ensureHSL(),et.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Et.HSL)&&r!==void 0?r:(this._ensureHSL(),et.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Et.RGB)&&r!==void 0?r:(this._ensureRGB(),et.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Et.RGB)&&r!==void 0?r:(this._ensureRGB(),et.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Et.RGB)&&r!==void 0?r:(this._ensureRGB(),et.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Et.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Et.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Et.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Et.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Et.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Et.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ga=new o0({r:0,g:0,b:0,a:0},"transparent"),Tr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Tr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,o=n>4,s=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return ga.set({r:(i>>l*(c+3)&h)*s,g:(i>>l*(c+2)&h)*s,b:(i>>l*(c+1)&h)*s,a:a?(i&h)*s/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${Ne[Math.round(t)]}${Ne[Math.round(r)]}${Ne[Math.round(i)]}${Ne[Math.round(n*255)]}`:`#${Ne[Math.round(t)]}${Ne[Math.round(r)]}${Ne[Math.round(i)]}`}},tr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(tr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return et.channel.clamp.h(parseFloat(r)*.9);case"rad":return et.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return et.channel.clamp.h(parseFloat(r)*360)}}return et.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(tr.re);if(!r)return;const[,i,n,a,o,s]=r;return ga.set({h:tr._hue2deg(i),s:et.channel.clamp.s(parseFloat(n)),l:et.channel.clamp.l(parseFloat(a)),a:o?et.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${et.lang.round(t)}, ${et.lang.round(r)}%, ${et.lang.round(i)}%, ${n})`:`hsl(${et.lang.round(t)}, ${et.lang.round(r)}%, ${et.lang.round(i)}%)`}},Ti={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Ti.colors[e];if(t)return Tr.parse(t)},stringify:e=>{const t=Tr.stringify(e);for(const r in Ti.colors)if(Ti.colors[r]===t)return r}},bi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(bi.re);if(!r)return;const[,i,n,a,o,s,l,c,h]=r;return ga.set({r:et.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:et.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:et.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:c?et.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${et.lang.round(t)}, ${et.lang.round(r)}, ${et.lang.round(i)}, ${et.lang.round(n)})`:`rgb(${et.lang.round(t)}, ${et.lang.round(r)}, ${et.lang.round(i)})`}},be={format:{keyword:Ti,hex:Tr,rgb:bi,rgba:bi,hsl:tr,hsla:tr},parse:e=>{if(typeof e!="string")return e;const t=Tr.parse(e)||bi.parse(e)||tr.parse(e)||Ti.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Et.HSL)||e.data.r===void 0?tr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?bi.stringify(e):Tr.stringify(e)},ph=(e,t)=>{const r=be.parse(e);for(const i in t)r[i]=et.channel.clamp[i](t[i]);return be.stringify(r)},Ai=(e,t,r=0,i=1)=>{if(typeof e!="number")return ph(e,{a:t});const n=ga.set({r:et.channel.clamp.r(e),g:et.channel.clamp.g(t),b:et.channel.clamp.b(r),a:et.channel.clamp.a(i)});return be.stringify(n)},l0=e=>{const{r:t,g:r,b:i}=be.parse(e),n=.2126*et.channel.toLinear(t)+.7152*et.channel.toLinear(r)+.0722*et.channel.toLinear(i);return et.lang.round(n)},c0=e=>l0(e)>=.5,Yi=e=>!c0(e),dh=(e,t,r)=>{const i=be.parse(e),n=i[t],a=et.channel.clamp[t](n+r);return n!==a&&(i[t]=a),be.stringify(i)},V=(e,t)=>dh(e,"l",t),Q=(e,t)=>dh(e,"l",-t),w=(e,t)=>{const r=be.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return ph(e,i)},h0=(e,t,r=50)=>{const{r:i,g:n,b:a,a:o}=be.parse(e),{r:s,g:l,b:c,a:h}=be.parse(t),u=r/100,f=u*2-1,p=o-h,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,y=1-m,x=i*m+s*y,b=n*m+l*y,_=a*m+c*y,v=o*u+h*(1-u);return Ai(x,b,_,v)},P=(e,t=100)=>{const r=be.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,h0(r,e,t)};/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */const{entries:gh,setPrototypeOf:$l,isFrozen:u0,getPrototypeOf:f0,getOwnPropertyDescriptor:p0}=Object;let{freeze:zt,seal:ee,create:mh}=Object,{apply:ys,construct:xs}=typeof Reflect<"u"&&Reflect;zt||(zt=function(t){return t});ee||(ee=function(t){return t});ys||(ys=function(t,r,i){return t.apply(r,i)});xs||(xs=function(t,r){return new t(...r)});const hn=Xt(Array.prototype.forEach),Dl=Xt(Array.prototype.pop),oi=Xt(Array.prototype.push),wn=Xt(String.prototype.toLowerCase),Za=Xt(String.prototype.toString),Rl=Xt(String.prototype.match),li=Xt(String.prototype.replace),d0=Xt(String.prototype.indexOf),g0=Xt(String.prototype.trim),se=Xt(Object.prototype.hasOwnProperty),Ot=Xt(RegExp.prototype.test),ci=m0(TypeError);function Xt(e){return function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n2&&arguments[2]!==void 0?arguments[2]:wn;$l&&$l(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(u0(t)||(t[i]=a),n=a)}e[n]=!0}return e}function y0(e){for(let t=0;t/gm),w0=ee(/\$\{[\w\W]*}/gm),v0=ee(/^data-[\-\w.\u00B7-\uFFFF]+$/),k0=ee(/^aria-[\-\w]+$/),yh=ee(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),S0=ee(/^(?:\w+script|data):/i),T0=ee(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xh=ee(/^html$/i),A0=ee(/^[a-z][.\w]*(-[.\w]+)+$/i);var zl=Object.freeze({__proto__:null,ARIA_ATTR:k0,ATTR_WHITESPACE:T0,CUSTOM_ELEMENT:A0,DATA_ATTR:v0,DOCTYPE_NAME:xh,ERB_EXPR:C0,IS_ALLOWED_URI:yh,IS_SCRIPT_OR_DATA:S0,MUSTACHE_EXPR:_0,TMPLIT_EXPR:w0});const ui={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},L0=function(){return typeof window>"u"?null:window},B0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},ql=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function bh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:L0();const t=K=>bh(K);if(t.version="3.2.3",t.removed=[],!e||!e.document||e.document.nodeType!==ui.document)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:p}=e,g=l.prototype,m=hi(g,"cloneNode"),y=hi(g,"remove"),x=hi(g,"nextSibling"),b=hi(g,"childNodes"),_=hi(g,"parentNode");if(typeof o=="function"){const K=r.createElement("template");K.content&&K.content.ownerDocument&&(r=K.content.ownerDocument)}let v,k="";const{implementation:E,createNodeIterator:A,createDocumentFragment:O,getElementsByTagName:N}=r,{importNode:R}=i;let B=ql();t.isSupported=typeof gh=="function"&&typeof _=="function"&&E&&E.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:q,ERB_EXPR:I,TMPLIT_EXPR:M,DATA_ATTR:L,ARIA_ATTR:S,IS_SCRIPT_OR_DATA:F,ATTR_WHITESPACE:T,CUSTOM_ELEMENT:z}=zl;let{IS_ALLOWED_URI:Y}=zl,J=null;const pt=nt({},[...Ol,...Ka,...Qa,...Ja,...Il]);let at=null;const _t=nt({},[...Pl,...ts,...Nl,...un]);let st=Object.seal(mh(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Kt=null,ie=null,Oe=!0,ne=!0,kt=!1,ae=!0,Qt=!1,Ie=!0,Ve=!1,Wa=!1,Ha=!1,yr=!1,rn=!1,nn=!1,fl=!0,pl=!1;const Cm="user-content-";let ja=!0,ii=!1,xr={},br=null;const dl=nt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let gl=null;const ml=nt({},["audio","video","img","source","image","track"]);let Ua=null;const yl=nt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),an="http://www.w3.org/1998/Math/MathML",sn="http://www.w3.org/2000/svg",ve="http://www.w3.org/1999/xhtml";let _r=ve,Ya=!1,Ga=null;const wm=nt({},[an,sn,ve],Za);let on=nt({},["mi","mo","mn","ms","mtext"]),ln=nt({},["annotation-xml"]);const vm=nt({},["title","style","font","a","script"]);let ni=null;const km=["application/xhtml+xml","text/html"],Sm="text/html";let wt=null,Cr=null;const Tm=r.createElement("form"),xl=function(C){return C instanceof RegExp||C instanceof Function},Va=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Cr&&Cr===C)){if((!C||typeof C!="object")&&(C={}),C=Ze(C),ni=km.indexOf(C.PARSER_MEDIA_TYPE)===-1?Sm:C.PARSER_MEDIA_TYPE,wt=ni==="application/xhtml+xml"?Za:wn,J=se(C,"ALLOWED_TAGS")?nt({},C.ALLOWED_TAGS,wt):pt,at=se(C,"ALLOWED_ATTR")?nt({},C.ALLOWED_ATTR,wt):_t,Ga=se(C,"ALLOWED_NAMESPACES")?nt({},C.ALLOWED_NAMESPACES,Za):wm,Ua=se(C,"ADD_URI_SAFE_ATTR")?nt(Ze(yl),C.ADD_URI_SAFE_ATTR,wt):yl,gl=se(C,"ADD_DATA_URI_TAGS")?nt(Ze(ml),C.ADD_DATA_URI_TAGS,wt):ml,br=se(C,"FORBID_CONTENTS")?nt({},C.FORBID_CONTENTS,wt):dl,Kt=se(C,"FORBID_TAGS")?nt({},C.FORBID_TAGS,wt):{},ie=se(C,"FORBID_ATTR")?nt({},C.FORBID_ATTR,wt):{},xr=se(C,"USE_PROFILES")?C.USE_PROFILES:!1,Oe=C.ALLOW_ARIA_ATTR!==!1,ne=C.ALLOW_DATA_ATTR!==!1,kt=C.ALLOW_UNKNOWN_PROTOCOLS||!1,ae=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Qt=C.SAFE_FOR_TEMPLATES||!1,Ie=C.SAFE_FOR_XML!==!1,Ve=C.WHOLE_DOCUMENT||!1,yr=C.RETURN_DOM||!1,rn=C.RETURN_DOM_FRAGMENT||!1,nn=C.RETURN_TRUSTED_TYPE||!1,Ha=C.FORCE_BODY||!1,fl=C.SANITIZE_DOM!==!1,pl=C.SANITIZE_NAMED_PROPS||!1,ja=C.KEEP_CONTENT!==!1,ii=C.IN_PLACE||!1,Y=C.ALLOWED_URI_REGEXP||yh,_r=C.NAMESPACE||ve,on=C.MATHML_TEXT_INTEGRATION_POINTS||on,ln=C.HTML_INTEGRATION_POINTS||ln,st=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&xl(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(st.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&xl(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(st.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(st.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Qt&&(ne=!1),rn&&(yr=!0),xr&&(J=nt({},Il),at=[],xr.html===!0&&(nt(J,Ol),nt(at,Pl)),xr.svg===!0&&(nt(J,Ka),nt(at,ts),nt(at,un)),xr.svgFilters===!0&&(nt(J,Qa),nt(at,ts),nt(at,un)),xr.mathMl===!0&&(nt(J,Ja),nt(at,Nl),nt(at,un))),C.ADD_TAGS&&(J===pt&&(J=Ze(J)),nt(J,C.ADD_TAGS,wt)),C.ADD_ATTR&&(at===_t&&(at=Ze(at)),nt(at,C.ADD_ATTR,wt)),C.ADD_URI_SAFE_ATTR&&nt(Ua,C.ADD_URI_SAFE_ATTR,wt),C.FORBID_CONTENTS&&(br===dl&&(br=Ze(br)),nt(br,C.FORBID_CONTENTS,wt)),ja&&(J["#text"]=!0),Ve&&nt(J,["html","head","body"]),J.table&&(nt(J,["tbody"]),delete Kt.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw ci('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ci('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=C.TRUSTED_TYPES_POLICY,k=v.createHTML("")}else v===void 0&&(v=B0(p,n)),v!==null&&typeof k=="string"&&(k=v.createHTML(""));zt&&zt(C),Cr=C}},bl=nt({},[...Ka,...Qa,...x0]),_l=nt({},[...Ja,...b0]),Am=function(C){let D=_(C);(!D||!D.tagName)&&(D={namespaceURI:_r,tagName:"template"});const H=wn(C.tagName),mt=wn(D.tagName);return Ga[C.namespaceURI]?C.namespaceURI===sn?D.namespaceURI===ve?H==="svg":D.namespaceURI===an?H==="svg"&&(mt==="annotation-xml"||on[mt]):!!bl[H]:C.namespaceURI===an?D.namespaceURI===ve?H==="math":D.namespaceURI===sn?H==="math"&&ln[mt]:!!_l[H]:C.namespaceURI===ve?D.namespaceURI===sn&&!ln[mt]||D.namespaceURI===an&&!on[mt]?!1:!_l[H]&&(vm[H]||!bl[H]):!!(ni==="application/xhtml+xml"&&Ga[C.namespaceURI]):!1},fe=function(C){oi(t.removed,{element:C});try{_(C).removeChild(C)}catch{y(C)}},cn=function(C,D){try{oi(t.removed,{attribute:D.getAttributeNode(C),from:D})}catch{oi(t.removed,{attribute:null,from:D})}if(D.removeAttribute(C),C==="is")if(yr||rn)try{fe(D)}catch{}else try{D.setAttribute(C,"")}catch{}},Cl=function(C){let D=null,H=null;if(Ha)C=""+C;else{const St=Rl(C,/^[\r\n\t ]+/);H=St&&St[0]}ni==="application/xhtml+xml"&&_r===ve&&(C=''+C+"");const mt=v?v.createHTML(C):C;if(_r===ve)try{D=new f().parseFromString(mt,ni)}catch{}if(!D||!D.documentElement){D=E.createDocument(_r,"template",null);try{D.documentElement.innerHTML=Ya?k:mt}catch{}}const Mt=D.body||D.documentElement;return C&&H&&Mt.insertBefore(r.createTextNode(H),Mt.childNodes[0]||null),_r===ve?N.call(D,Ve?"html":"body")[0]:Ve?D.documentElement:Mt},wl=function(C){return A.call(C.ownerDocument||C,C,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Xa=function(C){return C instanceof u&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof h)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},vl=function(C){return typeof s=="function"&&C instanceof s};function ke(K,C,D){hn(K,H=>{H.call(t,C,D,Cr)})}const kl=function(C){let D=null;if(ke(B.beforeSanitizeElements,C,null),Xa(C))return fe(C),!0;const H=wt(C.nodeName);if(ke(B.uponSanitizeElement,C,{tagName:H,allowedTags:J}),C.hasChildNodes()&&!vl(C.firstElementChild)&&Ot(/<[/\w]/g,C.innerHTML)&&Ot(/<[/\w]/g,C.textContent)||C.nodeType===ui.progressingInstruction||Ie&&C.nodeType===ui.comment&&Ot(/<[/\w]/g,C.data))return fe(C),!0;if(!J[H]||Kt[H]){if(!Kt[H]&&Tl(H)&&(st.tagNameCheck instanceof RegExp&&Ot(st.tagNameCheck,H)||st.tagNameCheck instanceof Function&&st.tagNameCheck(H)))return!1;if(ja&&!br[H]){const mt=_(C)||C.parentNode,Mt=b(C)||C.childNodes;if(Mt&&mt){const St=Mt.length;for(let qt=St-1;qt>=0;--qt){const pe=m(Mt[qt],!0);pe.__removalCount=(C.__removalCount||0)+1,mt.insertBefore(pe,x(C))}}}return fe(C),!0}return C instanceof l&&!Am(C)||(H==="noscript"||H==="noembed"||H==="noframes")&&Ot(/<\/no(script|embed|frames)/i,C.innerHTML)?(fe(C),!0):(Qt&&C.nodeType===ui.text&&(D=C.textContent,hn([q,I,M],mt=>{D=li(D,mt," ")}),C.textContent!==D&&(oi(t.removed,{element:C.cloneNode()}),C.textContent=D)),ke(B.afterSanitizeElements,C,null),!1)},Sl=function(C,D,H){if(fl&&(D==="id"||D==="name")&&(H in r||H in Tm))return!1;if(!(ne&&!ie[D]&&Ot(L,D))){if(!(Oe&&Ot(S,D))){if(!at[D]||ie[D]){if(!(Tl(C)&&(st.tagNameCheck instanceof RegExp&&Ot(st.tagNameCheck,C)||st.tagNameCheck instanceof Function&&st.tagNameCheck(C))&&(st.attributeNameCheck instanceof RegExp&&Ot(st.attributeNameCheck,D)||st.attributeNameCheck instanceof Function&&st.attributeNameCheck(D))||D==="is"&&st.allowCustomizedBuiltInElements&&(st.tagNameCheck instanceof RegExp&&Ot(st.tagNameCheck,H)||st.tagNameCheck instanceof Function&&st.tagNameCheck(H))))return!1}else if(!Ua[D]){if(!Ot(Y,li(H,T,""))){if(!((D==="src"||D==="xlink:href"||D==="href")&&C!=="script"&&d0(H,"data:")===0&&gl[C])){if(!(kt&&!Ot(F,li(H,T,"")))){if(H)return!1}}}}}}return!0},Tl=function(C){return C!=="annotation-xml"&&Rl(C,z)},Al=function(C){ke(B.beforeSanitizeAttributes,C,null);const{attributes:D}=C;if(!D||Xa(C))return;const H={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:at,forceKeepAttr:void 0};let mt=D.length;for(;mt--;){const Mt=D[mt],{name:St,namespaceURI:qt,value:pe}=Mt,ai=wt(St);let Rt=St==="value"?pe:g0(pe);if(H.attrName=ai,H.attrValue=Rt,H.keepAttr=!0,H.forceKeepAttr=void 0,ke(B.uponSanitizeAttribute,C,H),Rt=H.attrValue,pl&&(ai==="id"||ai==="name")&&(cn(St,C),Rt=Cm+Rt),Ie&&Ot(/((--!?|])>)|<\/(style|title)/i,Rt)){cn(St,C);continue}if(H.forceKeepAttr||(cn(St,C),!H.keepAttr))continue;if(!ae&&Ot(/\/>/i,Rt)){cn(St,C);continue}Qt&&hn([q,I,M],Bl=>{Rt=li(Rt,Bl," ")});const Ll=wt(C.nodeName);if(Sl(Ll,ai,Rt)){if(v&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!qt)switch(p.getAttributeType(Ll,ai)){case"TrustedHTML":{Rt=v.createHTML(Rt);break}case"TrustedScriptURL":{Rt=v.createScriptURL(Rt);break}}try{qt?C.setAttributeNS(qt,St,Rt):C.setAttribute(St,Rt),Xa(C)?fe(C):Dl(t.removed)}catch{}}}ke(B.afterSanitizeAttributes,C,null)},Lm=function K(C){let D=null;const H=wl(C);for(ke(B.beforeSanitizeShadowDOM,C,null);D=H.nextNode();)ke(B.uponSanitizeShadowNode,D,null),kl(D),Al(D),D.content instanceof a&&K(D.content);ke(B.afterSanitizeShadowDOM,C,null)};return t.sanitize=function(K){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},D=null,H=null,mt=null,Mt=null;if(Ya=!K,Ya&&(K=""),typeof K!="string"&&!vl(K))if(typeof K.toString=="function"){if(K=K.toString(),typeof K!="string")throw ci("dirty is not a string, aborting")}else throw ci("toString is not a function");if(!t.isSupported)return K;if(Wa||Va(C),t.removed=[],typeof K=="string"&&(ii=!1),ii){if(K.nodeName){const pe=wt(K.nodeName);if(!J[pe]||Kt[pe])throw ci("root node is forbidden and cannot be sanitized in-place")}}else if(K instanceof s)D=Cl(""),H=D.ownerDocument.importNode(K,!0),H.nodeType===ui.element&&H.nodeName==="BODY"||H.nodeName==="HTML"?D=H:D.appendChild(H);else{if(!yr&&!Qt&&!Ve&&K.indexOf("<")===-1)return v&&nn?v.createHTML(K):K;if(D=Cl(K),!D)return yr?null:nn?k:""}D&&Ha&&fe(D.firstChild);const St=wl(ii?K:D);for(;mt=St.nextNode();)kl(mt),Al(mt),mt.content instanceof a&&Lm(mt.content);if(ii)return K;if(yr){if(rn)for(Mt=O.call(D.ownerDocument);D.firstChild;)Mt.appendChild(D.firstChild);else Mt=D;return(at.shadowroot||at.shadowrootmode)&&(Mt=R.call(i,Mt,!0)),Mt}let qt=Ve?D.outerHTML:D.innerHTML;return Ve&&J["!doctype"]&&D.ownerDocument&&D.ownerDocument.doctype&&D.ownerDocument.doctype.name&&Ot(xh,D.ownerDocument.doctype.name)&&(qt=" +`+qt),Qt&&hn([q,I,M],pe=>{qt=li(qt,pe," ")}),v&&nn?v.createHTML(qt):qt},t.setConfig=function(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Va(K),Wa=!0},t.clearConfig=function(){Cr=null,Wa=!1},t.isValidAttribute=function(K,C,D){Cr||Va({});const H=wt(K),mt=wt(C);return Sl(H,mt,D)},t.addHook=function(K,C){typeof C=="function"&&oi(B[K],C)},t.removeHook=function(K){return Dl(B[K])},t.removeHooks=function(K){B[K]=[]},t.removeAllHooks=function(){B=ql()},t}var Ir=bh(),_h=Object.defineProperty,d=(e,t)=>_h(e,"name",{value:t,configurable:!0}),M0=(e,t)=>{for(var r in t)_h(e,r,{get:t[r],enumerable:!0})},Se={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},$={trace:d((...e)=>{},"trace"),debug:d((...e)=>{},"debug"),info:d((...e)=>{},"info"),warn:d((...e)=>{},"warn"),error:d((...e)=>{},"error"),fatal:d((...e)=>{},"fatal")},fo=d(function(e="fatal"){let t=Se.fatal;typeof e=="string"?e.toLowerCase()in Se&&(t=Se[e]):typeof e=="number"&&(t=e),$.trace=()=>{},$.debug=()=>{},$.info=()=>{},$.warn=()=>{},$.error=()=>{},$.fatal=()=>{},t<=Se.fatal&&($.fatal=console.error?console.error.bind(console,Jt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Jt("FATAL"))),t<=Se.error&&($.error=console.error?console.error.bind(console,Jt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Jt("ERROR"))),t<=Se.warn&&($.warn=console.warn?console.warn.bind(console,Jt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Jt("WARN"))),t<=Se.info&&($.info=console.info?console.info.bind(console,Jt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Jt("INFO"))),t<=Se.debug&&($.debug=console.debug?console.debug.bind(console,Jt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Jt("DEBUG"))),t<=Se.trace&&($.trace=console.debug?console.debug.bind(console,Jt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Jt("TRACE")))},"setLogLevel"),Jt=d(e=>`%c${i0().format("ss.SSS")} : ${e} : `,"format"),Ch=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Li=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,E0=/\s*%%.*\n/gm,Br,wh=(Br=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},d(Br,"UnknownDiagramError"),Br),Pr={},po=d(function(e,t){e=e.replace(Ch,"").replace(Li,"").replace(E0,` +`);for(const[r,{detector:i}]of Object.entries(Pr))if(i(e,t))return r;throw new wh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),vh=d((...e)=>{for(const{id:t,detector:r,loader:i}of e)kh(t,r,i)},"registerLazyLoadedDiagrams"),kh=d((e,t,r)=>{Pr[e]&&$.warn(`Detector with key ${e} already exists. Overwriting.`),Pr[e]={detector:t,loader:r},$.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),F0=d(e=>Pr[e].loader,"getDiagramLoader"),bs=d((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>bs(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=bs(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Lt=bs,ma="#ffffff",ya="#f2f2f2",It=d((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),Mr,$0=(Mr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,i,n,a,o,s,l,c,h,u,f;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||P(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||P(this.tertiaryColor),this.lineColor=this.lineColor||P(this.background),this.arrowheadColor=this.arrowheadColor||P(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Q(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Q(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||P(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||V(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let p=0;p{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Mr,"Theme"),Mr),D0=d(e=>{const t=new $0;return t.calculate(e),t},"getThemeVariables"),Er,R0=(Er=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=V(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=P(this.background),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.lineColor=P(this.background),this.textColor=P(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=V(P("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ai(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Q("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Q(this.sectionBkgColor,10),this.taskBorderColor=Ai(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ai(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,r,i,n,a,o,s,l,c,h,u;this.secondBkg=V(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=V(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=V(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330});for(let f=0;f{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Er,"Theme"),Er),O0=d(e=>{const t=new R0;return t.calculate(e),t},"getThemeVariables"),Fr,I0=(Fr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=w(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.lineColor=P(this.background),this.textColor=P(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Ai(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,r,i,n,a,o,s,l,c,h,u;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Q(this.tertiaryColor,40);for(let f=0;f{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Fr,"Theme"),Fr),P0=d(e=>{const t=new I0;return t.calculate(e),t},"getThemeVariables"),$r,N0=($r=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=V("#cde498",10),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.primaryColor),this.lineColor=P(this.background),this.textColor=P(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,n,a,o,s,l,c,h,u;this.actorBorder=Q(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Q(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Q(this.tertiaryColor,40);for(let f=0;f{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d($r,"Theme"),$r),z0=d(e=>{const t=new N0;return t.calculate(e),t},"getThemeVariables"),Dr,q0=(Dr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=V(this.contrast,55),this.background="#ffffff",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=P(this.primaryColor),this.secondaryTextColor=P(this.secondaryColor),this.tertiaryTextColor=P(this.tertiaryColor),this.lineColor=P(this.background),this.textColor=P(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,r,i,n,a,o,s,l,c,h,u;this.secondBkg=V(this.contrast,55),this.border2=this.contrast,this.actorBorder=V(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let f=0;f{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},d(Dr,"Theme"),Dr),W0=d(e=>{const t=new q0;return t.calculate(e),t},"getThemeVariables"),Be={base:{getThemeVariables:D0},dark:{getThemeVariables:O0},default:{getThemeVariables:P0},forest:{getThemeVariables:z0},neutral:{getThemeVariables:W0}},Pe={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Sh={...Pe,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:Be.default.getThemeVariables(),sequence:{...Pe.sequence,messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:d(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:d(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Pe.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Pe.c4,useWidth:void 0,personFont:d(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:d(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:d(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:d(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:d(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:d(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:d(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:d(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:d(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:d(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:d(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:d(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:d(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:d(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:d(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:d(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:d(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:d(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:d(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:d(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:d(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:d(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Pe.pie,useWidth:984},xyChart:{...Pe.xyChart,useWidth:void 0},requirement:{...Pe.requirement,useWidth:void 0},packet:{...Pe.packet}},Th=d((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Th(e[i],"")]:[...r,t+i],[]),"keyify"),H0=new Set(Th(Sh,"")),Ah=Sh,Dn=d(e=>{if($.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Dn(t));return}for(const t of Object.keys(e)){if($.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!H0.has(t)||e[t]==null){$.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){$.debug("sanitizing object",t),Dn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&($.debug("sanitizing css option",t),e[t]=j0(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}$.debug("After sanitization",e)}},"sanitizeDirective"),j0=d(e=>{let t=0,r=0;for(const i of e){if(t{let r=Lt({},e),i={};for(const n of t)Eh(n),i=Lt(i,n);if(r=Lt(r,i),i.theme&&i.theme in Be){const n=Lt({},Lh),a=Lt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Be&&(r.themeVariables=Be[r.theme].getThemeVariables(a))}return Bi=r,Fh(Bi),Bi},"updateCurrentConfig"),U0=d(e=>(Ht=Lt({},Nr),Ht=Lt(Ht,e),e.theme&&Be[e.theme]&&(Ht.themeVariables=Be[e.theme].getThemeVariables(e.themeVariables)),xa(Ht,zr),Ht),"setSiteConfig"),Y0=d(e=>{Lh=Lt({},e)},"saveConfigFromInitialize"),G0=d(e=>(Ht=Lt(Ht,e),xa(Ht,zr),Ht),"updateSiteConfig"),Bh=d(()=>Lt({},Ht),"getSiteConfig"),Mh=d(e=>(Fh(e),Lt(Bi,e),he()),"setConfig"),he=d(()=>Lt({},Bi),"getConfig"),Eh=d(e=>{e&&(["secure",...Ht.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&($.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Eh(e[t])}))},"sanitize"),V0=d(e=>{var t;Dn(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),zr.push(e),xa(Ht,zr)},"addDirective"),Rn=d((e=Ht)=>{zr=[],xa(e,zr)},"reset"),X0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Wl={},Z0=d(e=>{Wl[e]||($.warn(X0[e]),Wl[e]=!0)},"issueWarning"),Fh=d(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Z0("LAZY_LOAD_DEPRECATED")},"checkConfig"),Gi=//gi,K0=d(e=>e?Rh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Q0=(()=>{let e=!1;return()=>{e||($h(),e=!0)}})();function $h(){const e="data-temp-href-target";Ir.addHook("beforeSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ir.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}d($h,"setupDompurifyHooks");var Dh=d(e=>(Q0(),Ir.sanitize(e)),"removeScript"),Hl=d((e,t)=>{var r;if(((r=t.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=t.securityLevel;i==="antiscript"||i==="strict"?e=Dh(e):i!=="loose"&&(e=Rh(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=ry(e))}return e},"sanitizeMore"),or=d((e,t)=>e&&(t.dompurifyConfig?e=Ir.sanitize(Hl(e,t),t.dompurifyConfig).toString():e=Ir.sanitize(Hl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),J0=d((e,t)=>typeof e=="string"?or(e,t):e.flat().map(r=>or(r,t)),"sanitizeTextOrArray"),ty=d(e=>Gi.test(e),"hasBreaks"),ey=d(e=>e.split(Gi),"splitBreaks"),ry=d(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),Rh=d(e=>e.replace(Gi,"#br#"),"breakToPlaceholder"),iy=d(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=t.replaceAll(/\(/g,"\\("),t=t.replaceAll(/\)/g,"\\)")),t},"getUrl"),Bt=d(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),ny=d(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),ay=d(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),XL=d(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,e.split(t).length-1),"countOccurrence"),sy=d((e,t)=>{const r=_s(e,"~"),i=_s(t,"~");return r===1&&i===1},"shouldCombineSets"),oy=d(e=>{const t=_s(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),jl=d(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Cs=/\$\$(.*)\$\$/g,qr=d(e=>{var t;return(((t=e.match(Cs))==null?void 0:t.length)??0)>0},"hasKatex"),ZL=d(async(e,t)=>{e=await go(e,t);const r=document.createElement("div");r.innerHTML=e,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),go=d(async(e,t)=>{if(!qr(e))return e;if(!(jl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Cs,"MathML is unsupported in this environment.");const{default:r}=await ft(async()=>{const{default:n}=await import("./chunks/katex.cqFQqex1.js");return{default:n}},[]),i=t.forceLegacyMathML||!jl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Gi).map(n=>qr(n)?`
${n}
`:`
${n}
`).join("").replace(Cs,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),Xr={getRows:K0,sanitizeText:or,sanitizeTextOrArray:J0,hasBreaks:ty,splitBreaks:ey,lineBreakRegex:Gi,removeScript:Dh,getUrl:iy,evaluate:Bt,getMax:ny,getMin:ay},ly=d(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),cy=d(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Oh=d(function(e,t,r,i){const n=cy(t,r,i);ly(e,n)},"configureSvgSize"),hy=d(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,o=n.height;$.info(`SVG bounds: ${a}x${o}`,n);let s=0,l=0;$.info(`Graph bounds: ${s}x${l}`,e),s=a+r*2,l=o+r*2,$.info(`Calculated bounds: ${s}x${l}`),Oh(t,l,s,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),vn={},uy=d((e,t,r)=>{let i="";return e in vn&&vn[e]?i=vn[e](r):$.warn(`No theme found for ${e}`),` & { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + fill: ${r.textColor} + } + + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${r.errorBkgColor}; + } + & .error-text { + fill: ${r.errorTextColor}; + stroke: ${r.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 1px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${r.lineColor}; + stroke: ${r.lineColor}; + } + & .marker.cross { + stroke: ${r.lineColor}; + } + + & svg { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + } + & p { + margin: 0 + } + + ${i} + + ${t} +`},"getStyles"),fy=d((e,t)=>{t!==void 0&&(vn[e]=t)},"addStylesForDiagram"),py=uy,Ih={};M0(Ih,{clear:()=>dy,getAccDescription:()=>xy,getAccTitle:()=>my,getDiagramTitle:()=>_y,setAccDescription:()=>yy,setAccTitle:()=>gy,setDiagramTitle:()=>by});var mo="",yo="",xo="",bo=d(e=>or(e,he()),"sanitizeText"),dy=d(()=>{mo="",xo="",yo=""},"clear"),gy=d(e=>{mo=bo(e).replace(/^\s+/g,"")},"setAccTitle"),my=d(()=>mo,"getAccTitle"),yy=d(e=>{xo=bo(e).replace(/\n\s+/g,` +`)},"setAccDescription"),xy=d(()=>xo,"getAccDescription"),by=d(e=>{yo=bo(e)},"setDiagramTitle"),_y=d(()=>yo,"getDiagramTitle"),Ul=$,Cy=fo,ct=he,KL=Mh,QL=Nr,Ph=d(e=>or(e,ct()),"sanitizeText"),wy=hy,vy=d(()=>Ih,"getCommonDb"),On={},In=d((e,t,r)=>{var i;On[e]&&Ul.warn(`Diagram with id ${e} already registered. Overwriting.`),On[e]=t,r&&kh(e,r),fy(e,t.styles),(i=t.injectUtils)==null||i.call(t,Ul,Cy,ct,Ph,wy,vy(),()=>{})},"registerDiagram"),ws=d(e=>{if(e in On)return On[e];throw new ky(e)},"getDiagram"),Rr,ky=(Rr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},d(Rr,"DiagramNotFoundError"),Rr);function _o(e){return typeof e>"u"||e===null}d(_o,"isNothing");function Nh(e){return typeof e=="object"&&e!==null}d(Nh,"isObject");function zh(e){return Array.isArray(e)?e:_o(e)?[]:[e]}d(zh,"toArray");function qh(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;rs&&(a=" ... ",t=i-s+a.length),r-i>s&&(o=" ...",r=i+s-o.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+o,pos:i-t+a.length}}d(kn,"getLine");function Sn(e,t){return Ct.repeat(" ",t-e.length)+e}d(Sn,"padStart");function jh(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,o=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);var s="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)c=kn(e.buffer,i[o-l],n[o-l],e.position-(i[o]-i[o-l]),u),s=Ct.repeat(" ",t.indent)+Sn((e.line-l+1).toString(),h)+" | "+c.str+` +`+s;for(c=kn(e.buffer,i[o],n[o],e.position,u),s+=Ct.repeat(" ",t.indent)+Sn((e.line+1).toString(),h)+" | "+c.str+` +`,s+=Ct.repeat("-",t.indent+h+3+c.pos)+`^ +`,l=1;l<=t.linesAfter&&!(o+l>=n.length);l++)c=kn(e.buffer,i[o+l],n[o+l],e.position-(i[o]-i[o+l]),u),s+=Ct.repeat(" ",t.indent)+Sn((e.line+l+1).toString(),h)+" | "+c.str+` +`;return s.replace(/\n$/,"")}d(jh,"makeSnippet");var Ey=jh,Fy=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],$y=["scalar","sequence","mapping"];function Uh(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}d(Uh,"compileStyleAliases");function Yh(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(Fy.indexOf(r)===-1)throw new jt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Uh(t.styleAliases||null),$y.indexOf(this.kind)===-1)throw new jt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}d(Yh,"Type$1");var $t=Yh;function vs(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,o){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=o)}),r[n]=i}),r}d(vs,"compileList");function Gh(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(d(i,"collectType"),t=0,r=arguments.length;t=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:d(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:d(function(e){return e.toString(10)},"decimal"),hexadecimal:d(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Wy=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function su(e){return!(e===null||!Wy.test(e)||e[e.length-1]==="_")}d(su,"resolveYamlFloat");function ou(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}d(ou,"constructYamlFloat");var Hy=/^[-+]?[0-9]+e/;function lu(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ct.isNegativeZero(e))return"-0.0";return r=e.toString(10),Hy.test(r)?r.replace("e",".e"):r}d(lu,"representYamlFloat");function cu(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ct.isNegativeZero(e))}d(cu,"isFloat");var jy=new $t("tag:yaml.org,2002:float",{kind:"scalar",resolve:su,construct:ou,predicate:cu,represent:lu,defaultStyle:"lowercase"}),hu=Py.extend({implicit:[Ny,zy,qy,jy]}),Uy=hu,uu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),fu=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function pu(e){return e===null?!1:uu.exec(e)!==null||fu.exec(e)!==null}d(pu,"resolveYamlTimestamp");function du(e){var t,r,i,n,a,o,s,l=0,c=null,h,u,f;if(t=uu.exec(e),t===null&&(t=fu.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,a,o,s,l)),c&&f.setTime(f.getTime()-c),f}d(du,"constructYamlTimestamp");function gu(e){return e.toISOString()}d(gu,"representYamlTimestamp");var Yy=new $t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:pu,construct:du,instanceOf:Date,represent:gu});function mu(e){return e==="<<"||e===null}d(mu,"resolveYamlMerge");var Gy=new $t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:mu}),wo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function yu(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=wo;for(r=0;r64)){if(t<0)return!1;i+=6}return i%8===0}d(yu,"resolveYamlBinary");function xu(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=wo,o=0,s=[];for(t=0;t>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):r===18?(s.push(o>>10&255),s.push(o>>2&255)):r===12&&s.push(o>>4&255),new Uint8Array(s)}d(xu,"constructYamlBinary");function bu(e){var t="",r=0,i,n,a=e.length,o=wo;for(i=0;i>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):n===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):n===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}d(bu,"representYamlBinary");function _u(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}d(_u,"isBinary");var Vy=new $t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:yu,construct:xu,predicate:_u,represent:bu}),Xy=Object.prototype.hasOwnProperty,Zy=Object.prototype.toString;function Cu(e){if(e===null)return!0;var t=[],r,i,n,a,o,s=e;for(r=0,i=s.length;r>10)+55296,(e-65536&1023)+56320)}d(Ru,"charFromCodepoint");var Ou=new Array(256),Iu=new Array(256);for(Xe=0;Xe<256;Xe++)Ou[Xe]=Ss(Xe)?1:0,Iu[Xe]=Ss(Xe);var Xe;function Pu(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Au,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}d(Pu,"State$1");function vo(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Ey(r),new jt(t,r)}d(vo,"generateError");function G(e,t){throw vo(e,t)}d(G,"throwError");function $i(e,t){e.onWarning&&e.onWarning.call(null,vo(e,t))}d($i,"throwWarning");var Gl={YAML:d(function(t,r,i){var n,a,o;t.version!==null&&G(t,"duplication of %YAML directive"),i.length!==1&&G(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&G(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),o=parseInt(n[2],10),a!==1&&G(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&$i(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:d(function(t,r,i){var n,a;i.length!==2&&G(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Mu.test(n)||G(t,"ill-formed tag handle (first argument) of the TAG directive"),He.call(t.tagMap,n)&&G(t,'there is a previously declared suffix for "'+n+'" tag handle'),Eu.test(a)||G(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{G(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function Me(e,t,r,i){var n,a,o,s;if(t1&&(e.result+=Ct.repeat(` +`,t-1))}d(_a,"writeFoldedLines");function Nu(e,t,r){var i,n,a,o,s,l,c,h,u=e.kind,f=e.result,p;if(p=e.input.charCodeAt(e.position),Pt(p)||er(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(n=e.input.charCodeAt(e.position+1),Pt(n)||r&&er(n)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,s=!1;p!==0;){if(p===58){if(n=e.input.charCodeAt(e.position+1),Pt(n)||r&&er(n))break}else if(p===35){if(i=e.input.charCodeAt(e.position-1),Pt(i))break}else{if(e.position===e.lineStart&&Vi(e)||r&&er(p))break;if(le(p))if(l=e.line,c=e.lineStart,h=e.lineIndent,xt(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=l,e.lineStart=c,e.lineIndent=h;break}}s&&(Me(e,a,o,!1),_a(e,e.line-l),a=o=e.position,s=!1),We(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Me(e,a,o,!1),e.result?!0:(e.kind=u,e.result=f,!1)}d(Nu,"readPlainScalar");function zu(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Me(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else le(r)?(Me(e,i,n,!0),_a(e,xt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Vi(e)?G(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);G(e,"unexpected end of the stream within a single quoted scalar")}d(zu,"readSingleQuotedScalar");function qu(e,t){var r,i,n,a,o,s;if(s=e.input.charCodeAt(e.position),s!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(s=e.input.charCodeAt(e.position))!==0;){if(s===34)return Me(e,r,e.position,!0),e.position++,!0;if(s===92){if(Me(e,r,e.position,!0),s=e.input.charCodeAt(++e.position),le(s))xt(e,!1,t);else if(s<256&&Ou[s])e.result+=Iu[s],e.position++;else if((o=$u(s))>0){for(n=o,a=0;n>0;n--)s=e.input.charCodeAt(++e.position),(o=Fu(s))>=0?a=(a<<4)+o:G(e,"expected hexadecimal character");e.result+=Ru(a),e.position++}else G(e,"unknown escape sequence");r=i=e.position}else le(s)?(Me(e,r,i,!0),_a(e,xt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Vi(e)?G(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}G(e,"unexpected end of the stream within a double quoted scalar")}d(qu,"readDoubleQuotedScalar");function Wu(e,t){var r=!0,i,n,a,o=e.tag,s,l=e.anchor,c,h,u,f,p,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,p=!1,s=[];else if(b===123)h=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),b=e.input.charCodeAt(++e.position);b!==0;){if(xt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=o,e.anchor=l,e.kind=p?"mapping":"sequence",e.result=s,!0;r?b===44&&G(e,"expected the node content, but found ','"):G(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),Pt(c)&&(u=f=!0,e.position++,xt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,lr(e,t,Nn,!1,!0),y=e.tag,m=e.result,xt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),xt(e,!0,t),lr(e,t,Nn,!1,!0),x=e.result),p?rr(e,s,g,y,m,x,i,n,a):u?s.push(rr(e,null,g,y,m,x,i,n,a)):s.push(m),xt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}G(e,"unexpected end of the stream within a flow collection")}d(Wu,"readFlowCollection");function Hu(e,t){var r,i,n=es,a=!1,o=!1,s=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)es===n?n=u===43?Yl:rx:G(e,"repeat of a chomping mode identifier");else if((h=Du(u))>=0)h===0?G(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?G(e,"repeat of an indentation width identifier"):(s=t+h-1,o=!0);else break;if(We(u)){do u=e.input.charCodeAt(++e.position);while(We(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!le(u)&&u!==0)}for(;u!==0;){for(ba(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!o||e.lineIndents&&(s=e.lineIndent),le(u)){l++;continue}if(e.lineIndentt)&&l!==0)G(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(y&&(o=e.line,s=e.lineStart,l=e.position),lr(e,t,zn,!0,n)&&(y?g=e.result:m=e.result),y||(rr(e,u,f,p,g,m,o,s,l),p=g=m=null),xt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)G(e,"bad indentation of a mapping entry");else if(e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u"),e.result!==null&&g.kind!==e.kind&&G(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):G(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}d(lr,"composeNode");function Vu(e){var t=e.position,r,i,n,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(xt(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Pt(o);)o=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&G(e,"directive name must not be less than one character in length");o!==0;){for(;We(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!le(o));break}if(le(o))break;for(r=e.position;o!==0&&!Pt(o);)o=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}o!==0&&ba(e),He.call(Gl,i)?Gl[i](e,i,n):$i(e,'unknown document directive "'+i+'"')}if(xt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,xt(e,!0,-1)):a&&G(e,"directives end mark is expected"),lr(e,e.lineIndent-1,zn,!1,!0),xt(e,!0,-1),e.checkLineBreaks&&nx.test(e.input.slice(t,e.position))&&$i(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Vi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,xt(e,!0,-1));return}if(e.position"u"&&(r=t,t=null);var i=ko(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n=55296&&r<=56319&&t+1=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}d(Sr,"codePointAt");function To(e){var t=/^\n* /;return t.test(e)}d(To,"needIndentIndicator");var uf=1,Fs=2,ff=3,pf=4,kr=5;function df(e,t,r,i,n,a,o,s){var l,c=0,h=null,u=!1,f=!1,p=i!==-1,g=-1,m=cf(Sr(e,0))&&hf(Sr(e,e.length-1));if(t||o)for(l=0;l=65536?l+=2:l++){if(c=Sr(e,l),!Hr(c))return kr;m=m&&Es(c,h,s),h=c}else{for(l=0;l=65536?l+=2:l++){if(c=Sr(e,l),c===Di)u=!0,p&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Hr(c))return kr;m=m&&Es(c,h,s),h=c}f=f||p&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!o&&!n(e)?uf:a===Ri?kr:Fs:r>9&&To(e)?kr:o?a===Ri?kr:Fs:f?pf:ff}d(df,"chooseScalarStyle");function gf(e,t,r,i,n){e.dump=function(){if(t.length===0)return e.quotingType===Ri?'""':"''";if(!e.noCompatMode&&(Sx.indexOf(t)!==-1||Tx.test(t)))return e.quotingType===Ri?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return lf(e,c)}switch(d(l,"testAmbiguity"),df(t,s,e.indent,o,l,e.quotingType,e.forceQuotes&&!i,n)){case uf:return t;case Fs:return"'"+t.replace(/'/g,"''")+"'";case ff:return"|"+$s(t,e.indent)+Ds(Bs(t,a));case pf:return">"+$s(t,e.indent)+Ds(Bs(mf(t,o),a));case kr:return'"'+yf(t)+'"';default:throw new jt("impossible error: invalid scalar style")}}()}d(gf,"writeScalar");function $s(e,t){var r=To(e)?String(t):"",i=e[e.length-1]===` +`,n=i&&(e[e.length-2]===` +`||e===` +`),a=n?"+":i?"":"-";return r+a+` +`}d($s,"blockHeader");function Ds(e){return e[e.length-1]===` +`?e.slice(0,-1):e}d(Ds,"dropEndingNewline");function mf(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=e.indexOf(` +`);return c=c!==-1?c:e.length,r.lastIndex=c,Rs(e.slice(0,c),t)}(),n=e[0]===` +`||e[0]===" ",a,o;o=r.exec(e);){var s=o[1],l=o[2];a=l[0]===" ",i+=s+(!n&&!a&&l!==""?` +`:"")+Rs(l,t),n=a}return i}d(mf,"foldString");function Rs(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,o=0,s=0,l="";i=r.exec(e);)s=i.index,s-n>t&&(a=o>n?o:s,l+=` +`+e.slice(n,a),n=a+1),o=s;return l+=` +`,e.length-n>t&&o>n?l+=e.slice(n,o)+` +`+e.slice(o+1):l+=e.slice(n),l.slice(1)}d(Rs,"foldLine");function yf(e){for(var t="",r=0,i,n=0;n=65536?n+=2:n++)r=Sr(e,n),i=Dt[r],!i&&Hr(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||sf(r);return t}d(yf,"escapeString");function xf(e,t,r){var i="",n=e.tag,a,o,s;for(a=0,o=r.length;a"u"&&_e(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}d(xf,"writeFlowSequence");function Os(e,t,r,i){var n="",a=e.tag,o,s,l;for(o=0,s=r.length;o"u"&&_e(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Wn(e,t)),e.dump&&Di===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}d(Os,"writeBlockSequence");function bf(e,t,r){var i="",n=e.tag,a=Object.keys(r),o,s,l,c,h;for(o=0,s=a.length;o1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),_e(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}d(bf,"writeFlowMapping");function _f(e,t,r,i){var n="",a=e.tag,o=Object.keys(r),s,l,c,h,u,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new jt("sortKeys must be a boolean or a function");for(s=0,l=o.length;s1024,u&&(e.dump&&Di===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=Wn(e,t)),_e(e,t+1,h,!0,u)&&(e.dump&&Di===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=a,e.dump=n||"{}"}d(_f,"writeBlockMapping");function Is(e,t,r){var i,n,a,o,s,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,o=n.length;a tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}d(Is,"detectType");function _e(e,t,r,i,n,a,o){e.tag=null,e.dump=r,Is(e,r,!1)||Is(e,r,!0);var s=Ku.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=s==="[object Object]"||s==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(_f(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(bf(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Os(e,t-1,e.dump,n):Os(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(xf(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&gf(e,e.dump,t,a,l);else{if(s==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new jt("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}d(_e,"writeNode");function Cf(e,t){var r=[],i=[],n,a;for(Hn(e,r,i),n=0,a=i.length;n{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const s=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:s};return rs(c)?c:null}const a=n[0],o=a.split("-");if(o.length>1){const s={provider:i,prefix:o.shift(),name:o.join("-")};return rs(s)?s:null}if(r&&i===""){const s={provider:i,prefix:"",name:a};return rs(s,r)?s:null}return null},rs=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Ix(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Vl(e,t){const r=Ix(e,t);for(const i in $x)i in jn?i in e&&!(i in r)&&(r[i]=jn[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Px(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(o){if(r[o])return n[o]=[];if(!(o in n)){n[o]=null;const s=i[o]&&i[o].parent,l=s&&a(s);l&&(n[o]=[s].concat(l))}return n[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Xl(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function o(s){a=Vl(i[s]||n[s],a)}return o(t),r.forEach(o),Vl(e,a)}function Nx(e,t){if(e.icons[t])return Xl(e,t,[]);const r=Px(e,[t])[t];return r?Xl(e,t,r):null}const zx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,qx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Zl(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(zx);if(i===null||!i.length)return e;const n=[];let a=i.shift(),o=qx.test(a);for(;;){if(o){const s=parseFloat(a);isNaN(s)?n.push(a):n.push(Math.ceil(s*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");o=!o}}function Wx(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("",a);if(o===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function Hx(e,t){return e?""+e+""+t:t}function jx(e,t,r){const i=Wx(e);return Hx(i.defs,t+i.content+r)}const Ux=e=>e==="unset"||e==="undefined"||e==="none";function Yx(e,t){const r={...wf,...e},i={...Rx,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let _=m.rotate;x?b?_+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let v;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:v=n.height/2+n.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:v=n.width/2+n.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}_%2===1&&(n.left!==n.top&&(v=n.left,n.left=n.top,n.top=v),n.width!==n.height&&(v=n.width,n.width=n.height,n.height=v)),y.length&&(a=jx(a,'',""))});const o=i.width,s=i.height,l=n.width,c=n.height;let h,u;o===null?(u=s===null?"1em":s==="auto"?c:s,h=Zl(u,l/c)):(h=o==="auto"?l:o,u=s===null?Zl(h,c/l):s==="auto"?c:s);const f={},p=(m,y)=>{Ux(y)||(f[m]=y.toString())};p("width",h),p("height",u);const g=[n.left,n.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:a}}const Gx=/\sid="(\S+)"/g,Vx="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Xx=0;function Zx(e,t=Vx){const r=[];let i;for(;i=Gx.exec(e);)r.push(i[1]);if(!r.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{const o=typeof t=="function"?t(a):t+(Xx++).toString(),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+o+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function Kx(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'"+e+""}var Qx={body:'?',height:80,width:80},Ps=new Map,vf=new Map,Jx=d(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if($.debug("Registering icon pack:",t.name),"loader"in t)vf.set(t.name,t.loader);else if("icons"in t)Ps.set(t.name,t.icons);else throw $.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),tb=d(async(e,t)=>{const r=Ox(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=Ps.get(i);if(!n){const o=vf.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await o(),prefix:i},Ps.set(i,n)}catch(s){throw $.error(s),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=Nx(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),Ca=d(async(e,t)=>{let r;try{r=await tb(e,t==null?void 0:t.fallbackPrefix)}catch(a){$.error(a),r=Qx}const i=Yx(r,t);return Kx(Zx(i.body),i.attributes)},"getIconSVG"),Ao=d(({flowchart:e})=>{var n,a;const t=((n=e==null?void 0:e.subGraphTitleMargin)==null?void 0:n.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Lo={},vt={};Object.defineProperty(vt,"__esModule",{value:!0});vt.BLANK_URL=vt.relativeFirstCharacters=vt.whitespaceEscapeCharsRegex=vt.urlSchemeRegex=vt.ctrlCharactersRegex=vt.htmlCtrlEntityRegex=vt.htmlEntitiesRegex=vt.invalidProtocolRegex=void 0;vt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;vt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;vt.htmlCtrlEntityRegex=/&(newline|tab);/gi;vt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;vt.urlSchemeRegex=/^.+(:|:)/gim;vt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;vt.relativeFirstCharacters=[".","/"];vt.BLANK_URL="about:blank";Object.defineProperty(Lo,"__esModule",{value:!0});var kf=Lo.sanitizeUrl=void 0,Ft=vt;function eb(e){return Ft.relativeFirstCharacters.indexOf(e[0])>-1}function rb(e){var t=e.replace(Ft.ctrlCharactersRegex,"");return t.replace(Ft.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function ib(e){return URL.canParse(e)}function Kl(e){try{return decodeURIComponent(e)}catch{return e}}function nb(e){if(!e)return Ft.BLANK_URL;var t,r=Kl(e.trim());do r=rb(r).replace(Ft.htmlCtrlEntityRegex,"").replace(Ft.ctrlCharactersRegex,"").replace(Ft.whitespaceEscapeCharsRegex,"").trim(),r=Kl(r),t=r.match(Ft.ctrlCharactersRegex)||r.match(Ft.htmlEntitiesRegex)||r.match(Ft.htmlCtrlEntityRegex)||r.match(Ft.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return Ft.BLANK_URL;if(eb(i))return i;var n=i.trimStart(),a=n.match(Ft.urlSchemeRegex);if(!a)return i;var o=a[0].toLowerCase().trim();if(Ft.invalidProtocolRegex.test(o))return Ft.BLANK_URL;var s=n.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return s;if(o==="http:"||o==="https:"){if(!ib(s))return Ft.BLANK_URL;var l=new URL(s);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return s}kf=Lo.sanitizeUrl=nb;var ab={value:()=>{}};function Sf(){for(var e=0,t=arguments.length,r={},i;e=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Tn.prototype=Sf.prototype={constructor:Tn,on:function(e,t){var r=this._,i=sb(e+"",r),n,a=-1,o=i.length;if(arguments.length<2){for(;++a0)for(var r=new Array(n),i=0,n,a;i=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Jl.hasOwnProperty(t)?{space:Jl[t],local:e}:e}function lb(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ns&&t.documentElement.namespaceURI===Ns?t.createElement(e):t.createElementNS(r,e)}}function cb(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Tf(e){var t=wa(e);return(t.local?cb:lb)(t)}function hb(){}function Bo(e){return e==null?hb:function(){return this.querySelector(e)}}function ub(e){typeof e!="function"&&(e=Bo(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n=_&&(_=b+1);!(k=y[_])&&++_=0;)(o=i[n])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Ob(e){e||(e=Ib);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),a=0;at?1:e>=t?0:NaN}function Pb(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Nb(){return Array.from(this)}function zb(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?Kb:typeof t=="function"?Jb:Qb)(e,t,r??"")):jr(this.node(),e)}function jr(e,t){return e.style.getPropertyValue(t)||Ef(e).getComputedStyle(e,null).getPropertyValue(t)}function e1(e){return function(){delete this[e]}}function r1(e,t){return function(){this[e]=t}}function i1(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function n1(e,t){return arguments.length>1?this.each((t==null?e1:typeof t=="function"?i1:r1)(e,t)):this.node()[e]}function Ff(e){return e.trim().split(/^|\s+/)}function Mo(e){return e.classList||new $f(e)}function $f(e){this._node=e,this._names=Ff(e.getAttribute("class")||"")}$f.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Df(e,t){for(var r=Mo(e),i=-1,n=t.length;++i=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function F1(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?fn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?fn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=q1.exec(e))?new Ut(t[1],t[2],t[3],1):(t=W1.exec(e))?new Ut(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=H1.exec(e))?fn(t[1],t[2],t[3],t[4]):(t=j1.exec(e))?fn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=U1.exec(e))?sc(t[1],t[2]/100,t[3]/100,1):(t=Y1.exec(e))?sc(t[1],t[2]/100,t[3]/100,t[4]):tc.hasOwnProperty(e)?ic(tc[e]):e==="transparent"?new Ut(NaN,NaN,NaN,0):null}function ic(e){return new Ut(e>>16&255,e>>8&255,e&255,1)}function fn(e,t,r,i){return i<=0&&(e=t=r=NaN),new Ut(e,t,r,i)}function X1(e){return e instanceof Zi||(e=Ni(e)),e?(e=e.rgb(),new Ut(e.r,e.g,e.b,e.opacity)):new Ut}function zs(e,t,r,i){return arguments.length===1?X1(e):new Ut(e,t,r,i??1)}function Ut(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Eo(Ut,zs,Pf(Zi,{brighter(e){return e=e==null?Yn:Math.pow(Yn,e),new Ut(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ii:Math.pow(Ii,e),new Ut(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ut(ar(this.r),ar(this.g),ar(this.b),Gn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nc,formatHex:nc,formatHex8:Z1,formatRgb:ac,toString:ac}));function nc(){return`#${ir(this.r)}${ir(this.g)}${ir(this.b)}`}function Z1(){return`#${ir(this.r)}${ir(this.g)}${ir(this.b)}${ir((isNaN(this.opacity)?1:this.opacity)*255)}`}function ac(){const e=Gn(this.opacity);return`${e===1?"rgb(":"rgba("}${ar(this.r)}, ${ar(this.g)}, ${ar(this.b)}${e===1?")":`, ${e})`}`}function Gn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ar(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ir(e){return e=ar(e),(e<16?"0":"")+e.toString(16)}function sc(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new oe(e,t,r,i)}function Nf(e){if(e instanceof oe)return new oe(e.h,e.s,e.l,e.opacity);if(e instanceof Zi||(e=Ni(e)),!e)return new oe;if(e instanceof oe)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(t===a?o=(r-i)/s+(r0&&l<1?0:o,new oe(o,s,l,e.opacity)}function K1(e,t,r,i){return arguments.length===1?Nf(e):new oe(e,t,r,i??1)}function oe(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Eo(oe,K1,Pf(Zi,{brighter(e){return e=e==null?Yn:Math.pow(Yn,e),new oe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ii:Math.pow(Ii,e),new oe(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Ut(is(e>=240?e-240:e+120,n,i),is(e,n,i),is(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new oe(oc(this.h),pn(this.s),pn(this.l),Gn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Gn(this.opacity);return`${e===1?"hsl(":"hsla("}${oc(this.h)}, ${pn(this.s)*100}%, ${pn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function oc(e){return e=(e||0)%360,e<0?e+360:e}function pn(e){return Math.max(0,Math.min(1,e||0))}function is(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Fo=e=>()=>e;function zf(e,t){return function(r){return e+r*t}}function Q1(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function JL(e,t){var r=t-e;return r?zf(e,r>180||r<-180?r-360*Math.round(r/360):r):Fo(isNaN(e)?t:e)}function J1(e){return(e=+e)==1?qf:function(t,r){return r-t?Q1(t,r,e):Fo(isNaN(t)?r:t)}}function qf(e,t){var r=t-e;return r?zf(e,r):Fo(isNaN(e)?t:e)}const lc=function e(t){var r=J1(t);function i(n,a){var o=r((n=zs(n)).r,(a=zs(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),c=qf(n.opacity,a.opacity);return function(h){return n.r=o(h),n.g=s(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i}(1);function ze(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var qs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ns=new RegExp(qs.source,"g");function t_(e){return function(){return e}}function e_(e){return function(t){return e(t)+""}}function r_(e,t){var r=qs.lastIndex=ns.lastIndex=0,i,n,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(i=qs.exec(e))&&(n=ns.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:ze(i,n)})),r=ns.lastIndex;return r180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:ze(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function s(c,h,u,f){c!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:ze(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,f,p,g){if(c!==u||h!==f){var m=p.push(n(p)+"scale(",null,",",null,")");g.push({i:m-4,x:ze(c,u)},{i:m-2,x:ze(h,f)})}else(u!==1||f!==1)&&p.push(n(p)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,f),o(c.rotate,h.rotate,u,f),s(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(p){for(var g=-1,m=f.length,y;++g=0&&e._call.call(void 0,t),e=e._next;--Ur}function hc(){cr=(Xn=zi.now())+va,Ur=_i=0;try{l_()}finally{Ur=0,h_(),cr=0}}function c_(){var e=zi.now(),t=e-Xn;t>jf&&(va-=t,Xn=e)}function h_(){for(var e,t=Vn,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Vn=r);Ci=e,Hs(i)}function Hs(e){if(!Ur){_i&&(_i=clearTimeout(_i));var t=e-cr;t>24?(e<1/0&&(_i=setTimeout(hc,e-zi.now()-va)),fi&&(fi=clearInterval(fi))):(fi||(Xn=zi.now(),fi=setInterval(c_,jf)),Ur=1,Uf(hc))}}function uc(e,t,r){var i=new Zn;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var u_=Sf("start","end","cancel","interrupt"),f_=[],Gf=0,fc=1,js=2,An=3,pc=4,Us=5,Ln=6;function ka(e,t,r,i,n,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;p_(e,r,{name:t,index:i,group:n,on:u_,tween:f_,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Gf})}function Do(e,t){var r=ue(e,t);if(r.state>Gf)throw new Error("too late; already scheduled");return r}function Ce(e,t){var r=ue(e,t);if(r.state>An)throw new Error("too late; already running");return r}function ue(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function p_(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Yf(a,0,r.time);function a(c){r.state=fc,r.timer.restart(o,r.delay,r.time),r.delay<=c&&o(c-r.delay)}function o(c){var h,u,f,p;if(r.state!==fc)return l();for(h in i)if(p=i[h],p.name===r.name){if(p.state===An)return uc(o);p.state===pc?(p.state=Ln,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete i[h]):+hjs&&i.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function j_(e,t,r){var i,n,a=H_(t)?Do:Ce;return function(){var o=a(this,e),s=o.on;s!==i&&(n=(i=s).copy()).on(t,r),o.on=n}}function U_(e,t){var r=this._id;return arguments.length<2?ue(this.node(),r).on.on(e):this.each(j_(r,e,t))}function Y_(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function G_(){return this.on("end.remove",Y_(this._id))}function V_(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Bo(e));for(var i=this._groups,n=i.length,a=new Array(n),o=0;o=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Kf;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;nKe)if(!(Math.abs(u*l-c*h)>Ke)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=i-o,g=n-s,m=l*l+c*c,y=p*p+g*g,x=Math.sqrt(m),b=Math.sqrt(f),_=a*Math.tan((Ys-Math.acos((m+f-y)/(2*x*b)))/2),v=_/b,k=_/x;Math.abs(v-1)>Ke&&this._append`L${t+v*h},${r+v*u}`,this._append`A${a},${a},0,0,${+(u*p>h*g)},${this._x1=t+k*l},${this._y1=r+k*c}`}}arc(t,r,i,n,a,o){if(t=+t,r=+r,i=+i,o=!!o,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),l=i*Math.sin(n),c=t+s,h=r+l,u=1^o,f=o?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>Ke||Math.abs(this._y1-h)>Ke)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Gs+Gs),f>b2?this._append`A${i},${i},0,1,${u},${t-s},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>Ke&&this._append`A${i},${i},0,${+(f>=Ys)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function wr(e){return function(){return e}}const tB=Math.abs,eB=Math.atan2,rB=Math.cos,iB=Math.max,nB=Math.min,aB=Math.sin,sB=Math.sqrt,dc=1e-12,Oo=Math.PI,gc=Oo/2,oB=2*Oo;function lB(e){return e>1?0:e<-1?Oo:Math.acos(e)}function cB(e){return e>=1?gc:e<=-1?-gc:Math.asin(e)}function w2(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new C2(t)}function v2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Qf(e){this._context=e}Qf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Jf(e){return new Qf(e)}function k2(e){return e[0]}function S2(e){return e[1]}function T2(e,t){var r=wr(!0),i=null,n=Jf,a=null,o=w2(s);e=typeof e=="function"?e:e===void 0?k2:wr(e),t=typeof t=="function"?t:t===void 0?S2:wr(t);function s(l){var c,h=(l=v2(l)).length,u,f=!1,p;for(i==null&&(a=n(p=o())),c=0;c<=h;++c)!(c0)for(var i=e[0],n=t[0],a=e[r]-i,o=t[r]-n,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+l*a),this._beta*t[s]+(1-this._beta)*(n+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const E2=function e(t){function r(i){return t===1?new Sa(i):new np(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function Qn(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Io(e,t){this._context=e,this._k=(1-t)/6}Io.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Qn(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Qn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const F2=function e(t){function r(i){return new Io(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Po(e,t){this._context=e,this._k=(1-t)/6}Po.prototype={areaStart:je,areaEnd:je,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Qn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const $2=function e(t){function r(i){return new Po(i,t)}return r.tension=function(i){return e(+i)},r}(0);function No(e,t){this._context=e,this._k=(1-t)/6}No.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Qn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const D2=function e(t){function r(i){return new No(i,t)}return r.tension=function(i){return e(+i)},r}(0);function zo(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>dc){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>dc){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function ap(e,t){this._context=e,this._alpha=t}ap.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:zo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const R2=function e(t){function r(i){return t?new ap(i,t):new Io(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function sp(e,t){this._context=e,this._alpha=t}sp.prototype={areaStart:je,areaEnd:je,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:zo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const O2=function e(t){function r(i){return t?new sp(i,t):new Po(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function op(e,t){this._context=e,this._alpha=t}op.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const I2=function e(t){function r(i){return t?new op(i,t):new No(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function lp(e){this._context=e}lp.prototype={areaStart:je,areaEnd:je,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function P2(e){return new lp(e)}function mc(e){return e<0?-1:1}function yc(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(mc(a)+mc(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function xc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function as(e,t,r){var i=e._x0,n=e._y0,a=e._x1,o=e._y1,s=(a-i)/3;e._context.bezierCurveTo(i+s,n+s*t,a-s,o-s*r,a,o)}function Jn(e){this._context=e}Jn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:as(this,this._t0,xc(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,as(this,xc(this,r=yc(this,e,t)),r);break;default:as(this,this._t0,r=yc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function cp(e){this._context=new hp(e)}(cp.prototype=Object.create(Jn.prototype)).point=function(e,t){Jn.prototype.point.call(this,t,e)};function hp(e){this._context=e}hp.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function N2(e){return new Jn(e)}function z2(e){return new cp(e)}function up(e){this._context=e}up.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=bc(e),n=bc(t),a=0,o=1;o=0;--t)n[t]=(o[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function W2(e){return new Ta(e,.5)}function H2(e){return new Ta(e,0)}function j2(e){return new Ta(e,1)}function wi(e,t,r){this.k=e,this.x=t,this.y=r}wi.prototype={constructor:wi,scale:function(e){return e===1?this:new wi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new wi(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};wi.prototype;var fp=typeof global=="object"&&global&&global.Object===Object&&global,U2=typeof self=="object"&&self&&self.Object===Object&&self,we=fp||U2||Function("return this")(),ta=we.Symbol,pp=Object.prototype,Y2=pp.hasOwnProperty,G2=pp.toString,pi=ta?ta.toStringTag:void 0;function V2(e){var t=Y2.call(e,pi),r=e[pi];try{e[pi]=void 0;var i=!0}catch{}var n=G2.call(e);return i&&(t?e[pi]=r:delete e[pi]),n}var X2=Object.prototype,Z2=X2.toString;function K2(e){return Z2.call(e)}var Q2="[object Null]",J2="[object Undefined]",_c=ta?ta.toStringTag:void 0;function Zr(e){return e==null?e===void 0?J2:Q2:_c&&_c in Object(e)?V2(e):K2(e)}function pr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var tC="[object AsyncFunction]",eC="[object Function]",rC="[object GeneratorFunction]",iC="[object Proxy]";function qo(e){if(!pr(e))return!1;var t=Zr(e);return t==eC||t==rC||t==tC||t==iC}var ss=we["__core-js_shared__"],Cc=function(){var e=/[^.]+$/.exec(ss&&ss.keys&&ss.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function nC(e){return!!Cc&&Cc in e}var aC=Function.prototype,sC=aC.toString;function dr(e){if(e!=null){try{return sC.call(e)}catch{}try{return e+""}catch{}}return""}var oC=/[\\^$.*+?()[\]{}|]/g,lC=/^\[object .+?Constructor\]$/,cC=Function.prototype,hC=Object.prototype,uC=cC.toString,fC=hC.hasOwnProperty,pC=RegExp("^"+uC.call(fC).replace(oC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function dC(e){if(!pr(e)||nC(e))return!1;var t=qo(e)?pC:lC;return t.test(dr(e))}function gC(e,t){return e==null?void 0:e[t]}function gr(e,t){var r=gC(e,t);return dC(r)?r:void 0}var qi=gr(Object,"create");function mC(){this.__data__=qi?qi(null):{},this.size=0}function yC(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xC="__lodash_hash_undefined__",bC=Object.prototype,_C=bC.hasOwnProperty;function CC(e){var t=this.__data__;if(qi){var r=t[e];return r===xC?void 0:r}return _C.call(t,e)?t[e]:void 0}var wC=Object.prototype,vC=wC.hasOwnProperty;function kC(e){var t=this.__data__;return qi?t[e]!==void 0:vC.call(t,e)}var SC="__lodash_hash_undefined__";function TC(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=qi&&t===void 0?SC:t,this}function hr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}function $C(e,t){var r=this.__data__,i=La(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function $e(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=sw}function Ea(e){return e!=null&&xp(e.length)&&!qo(e)}function ow(e){return Qi(e)&&Ea(e)}function lw(){return!1}var bp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Lc=bp&&typeof module=="object"&&module&&!module.nodeType&&module,cw=Lc&&Lc.exports===bp,Bc=cw?we.Buffer:void 0,hw=Bc?Bc.isBuffer:void 0,Ho=hw||lw,uw="[object Object]",fw=Function.prototype,pw=Object.prototype,_p=fw.toString,dw=pw.hasOwnProperty,gw=_p.call(Object);function mw(e){if(!Qi(e)||Zr(e)!=uw)return!1;var t=mp(e);if(t===null)return!0;var r=dw.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&_p.call(r)==gw}var yw="[object Arguments]",xw="[object Array]",bw="[object Boolean]",_w="[object Date]",Cw="[object Error]",ww="[object Function]",vw="[object Map]",kw="[object Number]",Sw="[object Object]",Tw="[object RegExp]",Aw="[object Set]",Lw="[object String]",Bw="[object WeakMap]",Mw="[object ArrayBuffer]",Ew="[object DataView]",Fw="[object Float32Array]",$w="[object Float64Array]",Dw="[object Int8Array]",Rw="[object Int16Array]",Ow="[object Int32Array]",Iw="[object Uint8Array]",Pw="[object Uint8ClampedArray]",Nw="[object Uint16Array]",zw="[object Uint32Array]",gt={};gt[Fw]=gt[$w]=gt[Dw]=gt[Rw]=gt[Ow]=gt[Iw]=gt[Pw]=gt[Nw]=gt[zw]=!0;gt[yw]=gt[xw]=gt[Mw]=gt[bw]=gt[Ew]=gt[_w]=gt[Cw]=gt[ww]=gt[vw]=gt[kw]=gt[Sw]=gt[Tw]=gt[Aw]=gt[Lw]=gt[Bw]=!1;function qw(e){return Qi(e)&&xp(e.length)&&!!gt[Zr(e)]}function Ww(e){return function(t){return e(t)}}var Cp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mi=Cp&&typeof module=="object"&&module&&!module.nodeType&&module,Hw=Mi&&Mi.exports===Cp,os=Hw&&fp.process,Mc=function(){try{var e=Mi&&Mi.require&&Mi.require("util").types;return e||os&&os.binding&&os.binding("util")}catch{}}(),Ec=Mc&&Mc.isTypedArray,jo=Ec?Ww(Ec):qw;function Xs(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var jw=Object.prototype,Uw=jw.hasOwnProperty;function Yw(e,t,r){var i=e[t];(!(Uw.call(e,t)&&Aa(i,r))||r===void 0&&!(t in e))&&Wo(e,t,r)}function Gw(e,t,r,i){var n=!r;r||(r={});for(var a=-1,o=t.length;++a-1&&e%1==0&&e0){if(++t>=hv)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var dv=pv(cv);function gv(e,t){return dv(ov(e,t,Sp),e+"")}function mv(e,t,r){if(!pr(r))return!1;var i=typeof t;return(i=="number"?Ea(r)&&wp(t,r.length):i=="string"&&t in r)?Aa(r[t],e):!1}function yv(e){return gv(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,o=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,o&&mv(r[0],r[1],o)&&(a=n<3?void 0:a,n=1),t=Object(t);++is.args);Dn(o),i=Lt(i,[...o])}else i=r.args;if(!i)return;let n=po(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),Tp=d(function(e,t=null){var r,i;try{const n=new RegExp(`[%]{2}(?![{]${Cv.source})(?=[}][%]{2}).* +`,"ig");e=e.trim().replace(n,"").replace(/'/gm,'"'),$.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=Li.exec(e))!==null;)if(a.index===Li.lastIndex&&Li.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const s=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:s,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(n){return $.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),vv=d(function(e){return e.replace(Li,"")},"removeDirectives"),kv=d(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Uo(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return _v[r]??t}d(Uo,"interpolateToCurve");function Ap(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?kf(r):r}d(Ap,"formatUrl");var Sv=d((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let o=0;o{r+=Yo(n,t),t=n});const i=r/2;return Go(e,i)}d(Lp,"traverseEdge");function Bp(e){return e.length===1?e[0]:Lp(e)}d(Bp,"calcLabelPosition");var $c=d((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Go=d((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Yo(n,r);if(a=1)return{x:n.x,y:n.y};if(o>0&&o<1)return{x:$c((1-o)*r.x+o*n.x,5),y:$c((1-o)*r.y+o*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Tv=d((e,t,r)=>{$.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Go(t,25),a=e?10:5,o=Math.atan2(t[0].y-n.y,t[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(t[0].x+n.x)/2,s.y=-Math.cos(o)*a+(t[0].y+n.y)/2,s},"calcCardinalityPosition");function Mp(e,t,r){const i=structuredClone(r);$.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=Go(i,n),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}d(Mp,"calcTerminalLabelPosition");function Ep(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}d(Ep,"getStylesFromArray");var Dc=0,Av=d(()=>(Dc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Dc),"generateId");function Fp(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;nFp(e.length),"random"),Bv=d(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Mv=d(function(e,t){const r=t.text.replace(Xr.lineBreakRegex," "),[,i]=Fa(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),Ev=Ki((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),Xr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((o,s)=>{const l=Yr(`${o} `,r),c=Yr(a,r);if(l>t){const{hyphenatedStrings:f,remainingWord:p}=Fv(o,t,"-",r);n.push(a,...f),a=p}else c+l>=t?(n.push(a),a=o):a=[a,o].filter(Boolean).join(" ");s+1===i.length&&n.push(a)}),n.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Fv=Ki((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let o="";return n.forEach((s,l)=>{const c=`${o}${s}`;if(Yr(c,i)>=t){const u=l+1,f=n.length===u,p=`${c}${r}`;a.push(f?c:p),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function $p(e,t){return Vo(e,t).height}d($p,"calculateTextHeight");function Yr(e,t){return Vo(e,t).width}d(Yr,"calculateTextWidth");var Vo=Ki((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=Fa(r),o=["sans-serif",i],s=e.split(Xr.lineBreakRegex),l=[],c=lt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of o){let p=0;const g={width:0,height:0,lineHeight:0};for(const m of s){const y=Bv();y.text=m||bv;const x=Mv(h,y).style("font-size",a).style("font-weight",n).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),p=Math.round(b.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Or,$v=(Or=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},d(Or,"InitIDGenerator"),Or),gn,Dv=d(function(e){return gn=gn||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),gn.innerHTML=e,unescape(gn.textContent)},"entityDecode");function Xo(e){return"str"in e}d(Xo,"isDetailedError");var Rv=d((e,t,r,i)=>{var a;if(!i)return;const n=(a=e.node())==null?void 0:a.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Fa=d(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Zo(e,t){return xv({},e,t)}d(Zo,"cleanAndMerge");var ge={assignWithDepth:Lt,wrapLabel:Ev,calculateTextHeight:$p,calculateTextWidth:Yr,calculateTextDimensions:Vo,cleanAndMerge:Zo,detectInit:wv,detectDirective:Tp,isSubstringInArray:kv,interpolateToCurve:Uo,calcLabelPosition:Bp,calcCardinalityPosition:Tv,calcTerminalLabelPosition:Mp,formatUrl:Ap,getStylesFromArray:Ep,generateId:Av,random:Lv,runFunc:Sv,entityDecode:Dv,insertTitle:Rv,parseFontSize:Fa,InitIDGenerator:$v},Ov=d(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Qr=d(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),hB=d((e,t,{counter:r=0,prefix:i,suffix:n})=>`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function Nt(e){return e??null}d(Nt,"handleUndefinedAttr");function Ko(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let mr=Ko();function Dp(e){mr=e}const Rp=/[&<>"']/,Iv=new RegExp(Rp.source,"g"),Op=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Pv=new RegExp(Op.source,"g"),Nv={"&":"&","<":"<",">":">",'"':""","'":"'"},Rc=e=>Nv[e];function Gt(e,t){if(t){if(Rp.test(e))return e.replace(Iv,Rc)}else if(Op.test(e))return e.replace(Pv,Rc);return e}const zv=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function qv(e){return e.replace(zv,(t,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}const Wv=/(^|[^\[])\^/g;function ut(e,t){let r=typeof e=="string"?e:e.source;t=t||"";const i={replace:(n,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Wv,"$1"),r=r.replace(n,o),i},getRegex:()=>new RegExp(r,t)};return i}function Oc(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const Ei={exec:()=>null};function Ic(e,t){const r=e.replace(/\|/g,(a,o,s)=>{let l=!1,c=o;for(;--c>=0&&s[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length{const a=n.match(/^\s+/);if(a===null)return n;const[o]=a;return o.length>=i.length?n.slice(i.length):n}).join(` +`)}class na{constructor(t){dt(this,"options");dt(this,"rules");dt(this,"lexer");this.options=t||mr}space(t){const r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){const r=this.rules.block.code.exec(t);if(r){const i=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:di(i,` +`)}}}fences(t){const r=this.rules.block.fences.exec(t);if(r){const i=r[0],n=jv(i,r[3]||"");return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){const r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(/#$/.test(i)){const n=di(i,"#");(this.options.pedantic||!n||/ $/.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){const r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:di(r[0],` +`)}}blockquote(t){const r=this.rules.block.blockquote.exec(t);if(r){let i=di(r[0],` +`).split(` +`),n="",a="";const o=[];for(;i.length>0;){let s=!1;const l=[];let c;for(c=0;c/.test(i[c]))l.push(i[c]),s=!0;else if(!s)l.push(i[c]);else break;i=i.slice(c);const h=l.join(` +`),u=h.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` + $1`).replace(/^ {0,3}>[ \t]?/gm,"");n=n?`${n} +${h}`:h,a=a?`${a} +${u}`:u;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,i.length===0)break;const p=o[o.length-1];if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){const g=p,m=g.raw+` +`+i.join(` +`),y=this.blockquote(m);o[o.length-1]=y,n=n.substring(0,n.length-g.raw.length)+y.raw,a=a.substring(0,a.length-g.text.length)+y.text;break}else if((p==null?void 0:p.type)==="list"){const g=p,m=g.raw+` +`+i.join(` +`),y=this.list(m);o[o.length-1]=y,n=n.substring(0,n.length-p.raw.length)+y.raw,a=a.substring(0,a.length-g.raw.length)+y.raw,i=m.substring(o[o.length-1].raw.length).split(` +`);continue}}return{type:"blockquote",raw:n,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim();const n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const o=new RegExp(`^( {0,3}${i})((?:[ ][^\\n]*)?(?:\\n|$))`);let s=!1;for(;t;){let l=!1,c="",h="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let u=r[2].split(` +`,1)[0].replace(/^\t+/,x=>" ".repeat(3*x.length)),f=t.split(` +`,1)[0],p=!u.trim(),g=0;if(this.options.pedantic?(g=2,h=u.trimStart()):p?g=r[1].length+1:(g=r[2].search(/[^ ]/),g=g>4?1:g,h=u.slice(g),g+=r[1].length),p&&/^ *$/.test(f)&&(c+=f+` +`,t=t.substring(f.length+1),l=!0),!l){const x=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),b=new RegExp(`^ {0,${Math.min(3,g-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),_=new RegExp(`^ {0,${Math.min(3,g-1)}}(?:\`\`\`|~~~)`),v=new RegExp(`^ {0,${Math.min(3,g-1)}}#`);for(;t;){const k=t.split(` +`,1)[0];if(f=k,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),_.test(f)||v.test(f)||x.test(f)||b.test(t))break;if(f.search(/[^ ]/)>=g||!f.trim())h+=` +`+f.slice(g);else{if(p||u.search(/[^ ]/)>=4||_.test(u)||v.test(u)||b.test(u))break;h+=` +`+f}!p&&!f.trim()&&(p=!0),c+=k+` +`,t=t.substring(k.length+1),u=f.slice(g)}}a.loose||(s?a.loose=!0:/\n *\n *$/.test(c)&&(s=!0));let m=null,y;this.options.gfm&&(m=/^\[[ xX]\] /.exec(h),m&&(y=m[0]!=="[ ] ",h=h.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:c,task:!!m,checked:y,loose:!1,text:h,tokens:[]}),a.raw+=c}a.items[a.items.length-1].raw=a.items[a.items.length-1].raw.trimEnd(),a.items[a.items.length-1].text=a.items[a.items.length-1].text.trimEnd(),a.raw=a.raw.trimEnd();for(let l=0;lu.type==="space"),h=c.length>0&&c.some(u=>/\n.*\n/.test(u.raw));a.loose=h}if(a.loose)for(let l=0;l$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:a}}}table(t){const r=this.rules.block.table.exec(t);if(!r||!/[:|]/.test(r[2]))return;const i=Ic(r[1]),n=r[2].replace(/^\||\| *$/g,"").split("|"),a=r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(` +`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const s of n)/^ *-+: *$/.test(s)?o.align.push("right"):/^ *:-+: *$/.test(s)?o.align.push("center"):/^ *:-+ *$/.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}lheading(t){const r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){const r=this.rules.block.paragraph.exec(t);if(r){const i=r[1].charAt(r[1].length-1)===` +`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){const r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){const r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:Gt(r[1])}}tag(t){const r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&/^/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){const r=this.rules.inline.link.exec(t);if(r){const i=r[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;const o=di(i.slice(0,-1),"\\");if((i.length-o.length)%2===0)return}else{const o=Hv(r[2],"()");if(o>-1){const l=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,l).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){const o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);o&&(n=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),/^$/.test(i)?n=n.slice(1):n=n.slice(1,-1)),Pc(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){const n=(i[2]||i[1]).replace(/\s+/g," "),a=r[n.toLowerCase()];if(!a){const o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return Pc(i,a,i[0],this.lexer)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!n||n[3]&&i.match(/[\p{L}\p{N}]/u))return;if(!(n[1]||n[2]||"")||!i||this.rules.inline.punctuation.exec(i)){const o=[...n[0]].length-1;let s,l,c=o,h=0;const u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,r=r.slice(-1*t.length+o);(n=u.exec(r))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(l=[...s].length,n[3]||n[4]){c+=l;continue}else if((n[5]||n[6])&&o%3&&!((o+l)%3)){h+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+h);const f=[...n[0]][0].length,p=t.slice(0,o+n.index+f+l);if(Math.min(o,l)%2){const m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}const g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){const r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(/\n/g," ");const n=/[^ ]/.test(i),a=/^ /.test(i)&&/ $/.test(i);return n&&a&&(i=i.substring(1,i.length-1)),i=Gt(i,!0),{type:"codespan",raw:r[0],text:i}}}br(t){const r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){const r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){const r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=Gt(r[1]),n="mailto:"+i):(i=Gt(r[1]),n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let n,a;if(r[2]==="@")n=Gt(r[0]),a="mailto:"+n;else{let o;do o=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(o!==r[0]);n=Gt(r[0]),r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){const r=this.rules.inline.text.exec(t);if(r){let i;return this.lexer.state.inRawBlock?i=r[0]:i=Gt(r[0]),{type:"text",raw:r[0],text:i}}}}const Uv=/^(?: *(?:\n|$))+/,Yv=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,Gv=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ji=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Vv=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ip=/(?:[*+-]|\d{1,9}[.)])/,Pp=ut(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,Ip).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),Qo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Xv=/^[^\n]+/,Jo=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Zv=ut(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",Jo).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Kv=ut(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ip).getRegex(),$a="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",tl=/|$))/,Qv=ut("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",tl).replace("tag",$a).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Np=ut(Qo).replace("hr",Ji).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$a).getRegex(),Jv=ut(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Np).getRegex(),el={blockquote:Jv,code:Yv,def:Zv,fences:Gv,heading:Vv,hr:Ji,html:Qv,lheading:Pp,list:Kv,newline:Uv,paragraph:Np,table:Ei,text:Xv},Nc=ut("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ji).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$a).getRegex(),tk={...el,table:Nc,paragraph:ut(Qo).replace("hr",Ji).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Nc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",$a).getRegex()},ek={...el,html:ut(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",tl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Ei,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ut(Qo).replace("hr",Ji).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Pp).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zp=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,qp=/^( {2,}|\\)\n(?!\s*$)/,ik=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,sk=ut(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,tn).getRegex(),ok=ut("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,tn).getRegex(),lk=ut("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,tn).getRegex(),ck=ut(/\\([punct])/,"gu").replace(/punct/g,tn).getRegex(),hk=ut(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),uk=ut(tl).replace("(?:-->|$)","-->").getRegex(),fk=ut("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",uk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),aa=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pk=ut(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",aa).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Wp=ut(/^!?\[(label)\]\[(ref)\]/).replace("label",aa).replace("ref",Jo).getRegex(),Hp=ut(/^!?\[(ref)\](?:\[\])?/).replace("ref",Jo).getRegex(),dk=ut("reflink|nolink(?!\\()","g").replace("reflink",Wp).replace("nolink",Hp).getRegex(),rl={_backpedal:Ei,anyPunctuation:ck,autolink:hk,blockSkip:ak,br:qp,code:rk,del:Ei,emStrongLDelim:sk,emStrongRDelimAst:ok,emStrongRDelimUnd:lk,escape:zp,link:pk,nolink:Hp,punctuation:nk,reflink:Wp,reflinkSearch:dk,tag:fk,text:ik,url:Ei},gk={...rl,link:ut(/^!?\[(label)\]\((.*?)\)/).replace("label",aa).getRegex(),reflink:ut(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",aa).getRegex()},Zs={...rl,escape:ut(zp).replace("])","~|])").getRegex(),url:ut(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\l+" ".repeat(c.length));let n,a,o;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(n=s.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&r.length>0?r[r.length-1].raw+=` +`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=` +`+n.raw,a.text+=` +`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),a=r[r.length-1],a&&(a.type==="paragraph"||a.type==="text")?(a.raw+=` +`+n.raw,a.text+=` +`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=a.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(o=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const l=t.slice(1);let c;this.options.extensions.startBlock.forEach(h=>{c=h.call({lexer:this},l),typeof c=="number"&&c>=0&&(s=Math.min(s,c))}),s<1/0&&s>=0&&(o=t.substring(0,s+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o))){a=r[r.length-1],i&&(a==null?void 0:a.type)==="paragraph"?(a.raw+=` +`+n.raw,a.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(n),i=o.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),a=r[r.length-1],a&&a.type==="text"?(a.raw+=` +`+n.raw,a.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=a.text):r.push(n);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i,n,a,o=t,s,l,c;if(this.tokens.links){const h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,s.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(l||(c=""),l=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(h=>(i=h.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))){if(i=this.tokenizer.escape(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.tag(t)){t=t.substring(i.raw.length),n=r[r.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):r.push(i);continue}if(i=this.tokenizer.link(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(i.raw.length),n=r[r.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):r.push(i);continue}if(i=this.tokenizer.emStrong(t,o,c)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.codespan(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.br(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.del(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.autolink(t)){t=t.substring(i.raw.length),r.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(t))){t=t.substring(i.raw.length),r.push(i);continue}if(a=t,this.options.extensions&&this.options.extensions.startInline){let h=1/0;const u=t.slice(1);let f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},u),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(a=t.substring(0,h+1))}if(i=this.tokenizer.inlineText(a)){t=t.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(c=i.raw.slice(-1)),l=!0,n=r[r.length-1],n&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):r.push(i);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}}class sa{constructor(t){dt(this,"options");dt(this,"parser");this.options=t||mr}space(t){return""}code({text:t,lang:r,escaped:i}){var o;const n=(o=(r||"").match(/^\S*/))==null?void 0:o[0],a=t.replace(/\n$/,"")+` +`;return n?'
'+(i?a:Gt(a,!0))+`
+`:"
"+(i?a:Gt(a,!0))+`
+`}blockquote({tokens:t}){return`
+${this.parser.parse(t)}
+`}html({text:t}){return t}heading({tokens:t,depth:r}){return`${this.parser.parseInline(t)} +`}hr(t){return`
+`}list(t){const r=t.ordered,i=t.start;let n="";for(let s=0;s +`+n+" +`}listitem(t){let r="";if(t.task){const i=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&t.tokens[0].type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" "}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`
  • ${r}
  • +`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    +`}table(t){let r="",i="";for(let a=0;a${n}`),` + +`+r+` +`+n+`
    +`}tablerow({text:t}){return` +${t} +`}tablecell(t){const r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+` +`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${t}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:r,tokens:i}){const n=this.parser.parseInline(i),a=Oc(t);if(a===null)return n;t=a;let o='
    ",o}image({href:t,title:r,text:i}){const n=Oc(t);if(n===null)return i;t=n;let a=`${i}{const c=s[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):s.tokens&&(i=i.concat(this.walkTokens(s.tokens,r)))}}return i}use(...t){const r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{const n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){const o=r.renderers[a.name];o?r.renderers[a.name]=function(...s){let l=a.renderer.apply(this,s);return l===!1&&(l=o.apply(this,s)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=r[a.level];o?o.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){const a=this.defaults.renderer||new sa(this.defaults);for(const o in i.renderer){if(!(o in a))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const s=o;let l=i.renderer[s];i.useNewRenderer||(l=si(this,Fe,jp).call(this,l,s,a));const c=a[s];a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){const a=this.defaults.tokenizer||new na(this.defaults);for(const o in i.tokenizer){if(!(o in a))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const s=o,l=i.tokenizer[s],c=a[s];a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){const a=this.defaults.hooks||new Fi;for(const o in i.hooks){if(!(o in a))throw new Error(`hook '${o}' does not exist`);if(o==="options")continue;const s=o,l=i.hooks[s],c=a[s];Fi.passThroughHooks.has(o)?a[s]=h=>{if(this.defaults.async)return Promise.resolve(l.call(a,h)).then(f=>c.call(a,f));const u=l.call(a,h);return c.call(a,u)}:a[s]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){const a=this.defaults.walkTokens,o=i.walkTokens;n.walkTokens=function(s){let l=[];return l.push(o.call(this,s)),a&&(l=l.concat(a.call(this,s))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return me.lex(t,r??this.defaults)}parser(t,r){return ye.parse(t,r??this.defaults)}}Fe=new WeakSet,jp=function(t,r,i){switch(r){case"heading":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,i.parser.parseInline(n.tokens),n.depth,qv(i.parser.parseInline(n.tokens,i.parser.textRenderer)))};case"code":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.text,n.lang,!!n.escaped)};case"table":return function(n){if(!n.type||n.type!==r)return t.apply(this,arguments);let a="",o="";for(let l=0;l0&&h.tokens[0].type==="paragraph"?(h.tokens[0].text=g+" "+h.tokens[0].text,h.tokens[0].tokens&&h.tokens[0].tokens.length>0&&h.tokens[0].tokens[0].type==="text"&&(h.tokens[0].tokens[0].text=g+" "+h.tokens[0].tokens[0].text)):h.tokens.unshift({type:"text",text:g+" "}):p+=g+" "}p+=this.parser.parse(h.tokens,s),l+=this.listitem({type:"list_item",raw:p,text:p,task:f,checked:!!u,loose:s,tokens:h.tokens})}return t.call(this,l,a,o)};case"html":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.text,n.block)};case"paragraph":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,this.parser.parseInline(n.tokens))};case"escape":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.text)};case"link":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.href,n.title,this.parser.parseInline(n.tokens))};case"image":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.href,n.title,n.text)};case"strong":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,this.parser.parseInline(n.tokens))};case"em":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,this.parser.parseInline(n.tokens))};case"codespan":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.text)};case"del":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,this.parser.parseInline(n.tokens))};case"text":return function(n){return!n.type||n.type!==r?t.apply(this,arguments):t.call(this,n.text)}}return t},Ks=function(t,r){return(i,n)=>{const a={...n},o={...this.defaults,...a};this.defaults.async===!0&&a.async===!1&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const s=si(this,Fe,Up).call(this,!!o.silent,!!o.async);if(typeof i>"u"||i===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(o.hooks&&(o.hooks.options=o),o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(i):i).then(l=>t(l,o)).then(l=>o.hooks?o.hooks.processAllTokens(l):l).then(l=>o.walkTokens?Promise.all(this.walkTokens(l,o.walkTokens)).then(()=>l):l).then(l=>r(l,o)).then(l=>o.hooks?o.hooks.postprocess(l):l).catch(s);try{o.hooks&&(i=o.hooks.preprocess(i));let l=t(i,o);o.hooks&&(l=o.hooks.processAllTokens(l)),o.walkTokens&&this.walkTokens(l,o.walkTokens);let c=r(l,o);return o.hooks&&(c=o.hooks.postprocess(c)),c}catch(l){return s(l)}}},Up=function(t,r){return i=>{if(i.message+=` +Please report this to https://github.com/markedjs/marked.`,t){const n="

    An error occurred:

    "+Gt(i.message+"",!0)+"
    ";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}};const ur=new yk;function ht(e,t){return ur.parse(e,t)}ht.options=ht.setOptions=function(e){return ur.setOptions(e),ht.defaults=ur.defaults,Dp(ht.defaults),ht};ht.getDefaults=Ko;ht.defaults=mr;ht.use=function(...e){return ur.use(...e),ht.defaults=ur.defaults,Dp(ht.defaults),ht};ht.walkTokens=function(e,t){return ur.walkTokens(e,t)};ht.parseInline=ur.parseInline;ht.Parser=ye;ht.parser=ye.parse;ht.Renderer=sa;ht.TextRenderer=il;ht.Lexer=me;ht.lexer=me.lex;ht.Tokenizer=na;ht.Hooks=Fi;ht.parse=ht;ht.options;ht.setOptions;ht.use;ht.walkTokens;ht.parseInline;ye.parse;me.lex;function Yp(e){for(var t=[],r=1;r/g,` +`).replace(/\n{2,}/g,` +`),n=Yp(i);return t===!1?n.replace(/ /g," "):n}d(Gp,"preprocessMarkdown");function Vp(e,t={}){const r=Gp(e,t),i=ht.lexer(r),n=[[]];let a=0;function o(s,l="normal"){s.type==="text"?s.text.split(` +`).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&n[a].push({content:f,type:l})})}):s.type==="strong"||s.type==="em"?s.tokens.forEach(c=>{o(c,s.type)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}return d(o,"processNode"),i.forEach(s=>{var l;s.type==="paragraph"?(l=s.tokens)==null||l.forEach(c=>{o(c)}):s.type==="html"&&n[a].push({content:s.text,type:"normal"})}),n}d(Vp,"markdownToLines");function Xp(e,{markdownAutoWrap:t}={}){const r=ht.lexer(e);function i(n){var a,o,s;return n.type==="text"?t===!1?n.text.replace(/\n */g,"
    ").replace(/ /g," "):n.text.replace(/\n */g,"
    "):n.type==="strong"?`${(a=n.tokens)==null?void 0:a.map(i).join("")}`:n.type==="em"?`${(o=n.tokens)==null?void 0:o.map(i).join("")}`:n.type==="paragraph"?`

    ${(s=n.tokens)==null?void 0:s.map(i).join("")}

    `:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:`Unsupported markdown: ${n.type}`}return d(i,"output"),r.map(i).join("")}d(Xp,"markdownToHTML");function Zp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}d(Zp,"splitTextToChars");function Kp(e,t){const r=Zp(t.content);return nl(e,[],r,t.type)}d(Kp,"splitWordToFitWidth");function nl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...t,n];return e([{content:o.join(""),type:i}])?nl(e,o,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}d(nl,"splitWordToFitWidthRecursion");function Qp(e,t){if(e.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return oa(e,t)}d(Qp,"splitLineToFitWidth");function oa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},o=[...i];if(n!==""&&o.push({content:n,type:"normal"}),o.push(a),t(o))return oa(e,t,r,o);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[s,l]=Kp(t,a);r.push([s]),l.content&&e.unshift(l)}return oa(e,t,r)}d(oa,"splitLineToFitWidthRecursion");function Qs(e,t){t&&e.attr("style",t)}d(Qs,"applyStyle");async function Jp(e,t,r,i,n=!1){const a=e.append("foreignObject");a.attr("width",`${10*r}px`),a.attr("height",`${10*r}px`);const o=a.append("xhtml:div");let s=t.label;t.label&&qr(t.label)&&(s=await go(t.label.replace(Xr.lineBreakRegex,` +`),ct()));const l=t.isNode?"nodeLabel":"edgeLabel",c=o.append("span");c.html(s),Qs(c,t.labelStyle),c.attr("class",`${l} ${i}`),Qs(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let h=o.node().getBoundingClientRect();return h.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),h=o.node().getBoundingClientRect()),a.node()}d(Jp,"addHtmlSpan");function Da(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}d(Da,"createTspan");function td(e,t,r){const i=e.append("text"),n=Da(i,1,t);Ra(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}d(td,"computeWidthOfText");function xk(e,t,r){var o;const i=e.append("text"),n=Da(i,1,t);Ra(n,[{content:r,type:"normal"}]);const a=(o=n.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}d(xk,"computeDimensionOfText");function ed(e,t,r,i=!1){const a=t.append("g"),o=a.insert("rect").attr("class","background").attr("style","stroke: none"),s=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=d(f=>td(a,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:Qp(c,h);for(const f of u){const p=Da(s,l,1.1);Ra(p,f),l++}}if(i){const c=s.node().getBBox(),h=2;return o.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return s.node()}d(ed,"createFormattedText");function Ra(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}d(Ra,"updateTextContentAndStyles");function rd(e){return e.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>``)}d(rd,"replaceIconSubstring");var Jr=d(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},c)=>{if($.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",l),a){const h=Xp(t,c),u=rd(Qr(h)),f=t.replace(/\\\\/g,"\\"),p={isNode:o,label:qr(t)?f:u,labelStyle:r.replace("fill:","color:")};return await Jp(e,p,s,n,l)}else{const h=t.replace(//g,"
    "),u=Vp(h.replace("
    ","
    "),c),f=ed(s,e,u,t?l:!1);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(f).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");lt(f).select("rect").attr("style",p.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(f).select("text").attr("style",g)}return f}},"createText");function ls(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,o=Math.cos(a),s=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-n)*s+i,l[1]=(c-i)*s+(h-n)*o+n}}}function bk(e,t){return e[0]===t[0]&&e[1]===t[1]}function _k(e,t,r,i=1){const n=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,s=[0,0];if(n)for(const c of o)ls(c,s,n);const l=function(c,h,u){const f=[];for(const b of c){const _=[...b];bk(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&f.push(_)}const p=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let _=0;_b.ymin<_.ymin?-1:b.ymin>_.ymin?1:b.x<_.x?-1:b.x>_.x?1:b.ymax===_.ymax?0:(b.ymax-_.ymax)/Math.abs(b.ymax-_.ymax)),!g.length)return p;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let _=0;_y);_++)b=_;g.splice(0,b+1).forEach(_=>{m.push({s:y,edge:_})})}if(m=m.filter(b=>!(b.edge.ymax<=y)),m.sort((b,_)=>b.edge.x===_.edge.x?0:(b.edge.x-_.edge.x)/Math.abs(b.edge.x-_.edge.x)),(u!==1||x%h==0)&&m.length>1)for(let b=0;b=m.length)break;const v=m[b].edge,k=m[_].edge;p.push([[Math.round(v.x),y],[Math.round(k.x),y]])}y+=u,m.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),x++}return p}(o,a,i);if(n){for(const c of o)ls(c,s,-n);(function(c,h,u){const f=[];c.forEach(p=>f.push(...p)),ls(f,h,u)})(l,s,-n)}return l}function en(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),_k(e,n,i,a||1)}class al{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=en(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function Oa(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class Ck extends al{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=en(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],s=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)Oa([c,h])&&o.push([[c[0]-s,c[1]+l],[...h]],[[c[0]+s,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class wk extends al{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class vk{constructor(t){this.helper=t}fillPolygons(t,r){const i=en(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=n/4;for(const s of t){const l=Oa(s),c=l/n,h=Math.ceil(c)-1,u=l-h*n,f=(s[0][0]+s[1][0])/2-n/4,p=Math.min(s[0][1],s[1][1]);for(let g=0;g{const s=Oa(o),l=Math.floor(s/(i+n)),c=(s+n-l*(i+n))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let p=0;p{const o=Oa(a),s=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;uh%2?c+r:c+t);a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...s]}),t=s[2],r=s[3];break;case"q":{const l=s.map((c,h)=>h%2?c+r:c+t);a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...s]}),t=s[5],r=s[6];break;case"a":t+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,r]});break;case"H":a.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),t=s[2],r=s[3];break;case"s":{const l=s.map((c,h)=>h%2?c+r:c+t);a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...s]}),t=s[0],r=s[1];break;case"t":t+=s[0],r+=s[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function nd(e){const t=[];let r="",i=0,n=0,a=0,o=0,s=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-s),f=n+(n-l)):(u=i,f=n),t.push({key:"C",data:[u,f,...h]}),s=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let p=0,g=0;r==="Q"||r==="T"?(p=i+(i-s),g=n+(n-l)):(p=i,g=n);const m=i+2*(p-i)/3,y=n+2*(g-n)/3,x=u+2*(p-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),s=p,l=g,i=u,n=f;break}case"Q":{const[u,f,p,g]=h,m=i+2*(u-i)/3,y=n+2*(f-n)/3,x=p+2*(u-p)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,p,g]}),s=u,l=f,i=p,n=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),p=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(ad(i,n,y,x,u,f,p,g,m).forEach(function(b){t.push({key:"C",data:b})}),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=o}r=c}return t}function mi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function ad(e,t,r,i,n,a,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let f=[],p=0,g=0,m=0,y=0;if(c)[p,g,m,y]=c;else{[e,t]=mi(e,t,-h),[r,i]=mi(r,i,-h);const I=(e-r)/2,M=(t-i)/2;let L=I*I/(n*n)+M*M/(a*a);L>1&&(L=Math.sqrt(L),n*=L,a*=L);const S=n*n,F=a*a,T=S*F-S*M*M-F*I*I,z=S*M*M+F*I*I,Y=(s===l?-1:1)*Math.sqrt(Math.abs(T/z));m=Y*n*M/a+(e+r)/2,y=Y*-a*I/n+(t+i)/2,p=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),eg&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let x=g-p;if(Math.abs(x)>120*Math.PI/180){const I=g,M=r,L=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=ad(r=m+n*Math.cos(g),i=y+a*Math.sin(g),M,L,n,a,o,0,l,[g,I,m,y])}x=g-p;const b=Math.cos(p),_=Math.sin(p),v=Math.cos(g),k=Math.sin(g),E=Math.tan(x/4),A=4/3*n*E,O=4/3*a*E,N=[e,t],R=[e+A*_,t-O*b],B=[r+A*k,i-O*v],q=[r,i];if(R[0]=2*N[0]-R[0],R[1]=2*N[1]-R[1],c)return[R,B,q].concat(f);{f=[R,B,q].concat(f);const I=[];for(let M=0;M2){const n=[];for(let a=0;a2*Math.PI&&(p=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-p)/2),x=Yc(y,c,h,u,f,p,g,1,l);if(!l.disableMultiStroke){const b=Yc(y,c,h,u,f,p,g,1.5,l);x.push(...b)}return o&&(s?x.push(...Ue(c,h,c+u*Math.cos(p),h+f*Math.sin(p),l),...Ue(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+f*Math.sin(p)]})),{type:"path",ops:x}}function Hc(e,t){const r=nd(id(sl(e))),i=[];let n=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],n=[s[0],s[1]];break;case"L":i.push(...Ue(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]];break;case"C":{const[l,c,h,u,f,p]=s;i.push(...Mk(l,c,h,u,f,p,a,t)),a=[f,p];break}case"Z":i.push(...Ue(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function us(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+tt(n,t),i[0][1]+tt(n,t)]});for(let o=1;o500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,f=.2+.2*ld(n);let p=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;p=tt(p,n,c),g=tt(g,n,c);const m=[],y=()=>tt(u,n,c),x=()=>tt(h,n,c),b=n.preserveVertices;return o?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:tt(h,n,c)),t+(b?0:tt(h,n,c))]}),o?m.push({op:"bcurveTo",data:[p+e+(r-e)*f+y(),g+t+(i-t)*f+y(),p+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[p+e+(r-e)*f+x(),g+t+(i-t)*f+x(),p+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function xn(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+tt(t,r),e[0][1]+tt(t,r)]),i.push([e[0][0]+tt(t,r),e[0][1]+tt(t,r)]);for(let n=1;n3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let s=1;s+21&&n.push(s)):n.push(s),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=Qe(l,c,.5),p=Qe(c,h,.5),g=Qe(h,u,.5),m=Qe(f,p,.5),y=Qe(p,g,.5),x=Qe(m,y,.5);eo([l,f,m,x],0,r,n),eo([x,y,g,u],0,r,n)}var a,o;return n}function Fk(e,t){return ha(e,0,e.length,t)}function ha(e,t,r,i,n){const a=n||[],o=e[t],s=e[r-1];let l=0,c=1;for(let h=t+1;hl&&(l=u,c=h)}return Math.sqrt(l)>i?(ha(e,t,c+1,i,a),ha(e,c,r,i,a)):(a.length||a.push(o),a.push(s)),a}function fs(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a0?ha(i,0,i.length,r):i}const Yt="none";class ua{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,a){const o=this._o(a);return this._d("line",[sd(t,r,i,n,o)],o)}rectangle(t,r,i,n,a){const o=this._o(a),s=[],l=Bk(t,r,i,n,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];o.fillStyle==="solid"?s.push(us([c],o)):s.push(vr([c],o))}return o.stroke!==Yt&&s.push(l),this._d("rectangle",s,o)}ellipse(t,r,i,n,a){const o=this._o(a),s=[],l=od(i,n,o),c=Js(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=Js(t,r,o,l).opset;h.type="fillPath",s.push(h)}else s.push(vr([c.estimatedPoints],o));return o.stroke!==Yt&&s.push(c.opset),this._d("ellipse",s,o)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Bn(t,!1,i)],i)}arc(t,r,i,n,a,o,s=!1,l){const c=this._o(l),h=[],u=Wc(t,r,i,n,a,o,s,!0,c);if(s&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const p=Wc(t,r,i,n,a,o,!0,!1,f);p.type="fillPath",h.push(p)}else h.push(function(f,p,g,m,y,x,b){const _=f,v=p;let k=Math.abs(g/2),E=Math.abs(m/2);k+=tt(.01*k,b),E+=tt(.01*E,b);let A=y,O=x;for(;A<0;)A+=2*Math.PI,O+=2*Math.PI;O-A>2*Math.PI&&(A=0,O=2*Math.PI);const N=(O-A)/b.curveStepCount,R=[];for(let B=A;B<=O;B+=N)R.push([_+k*Math.cos(B),v+E*Math.sin(B)]);return R.push([_+k*Math.cos(O),v+E*Math.sin(O)]),R.push([_,v]),vr([R],b)}(t,r,i,n,a,o,c));return c.stroke!==Yt&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=qc(t,i);if(i.fill&&i.fill!==Yt)if(i.fillStyle==="solid"){const o=qc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],s=t;if(s.length){const l=typeof s[0][0]=="number"?[s]:s;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...fs(Gc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...fs(Gc(c),10,(1+i.roughness)/2))}o.length&&n.push(vr([o],i))}return i.stroke!==Yt&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=Bn(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(us([t],i)):n.push(vr([t],i))),i.stroke!==Yt&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Yt,o=i.stroke!==Yt,s=!!(i.simplification&&i.simplification<1),l=function(h,u,f){const p=nd(id(sl(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...fs(x,u)),x=[]},_=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:k,data:E}of p)switch(k){case"M":_(),y=[E[0],E[1]],m.push(y);break;case"L":b(),m.push([E[0],E[1]]);break;case"C":if(!x.length){const A=m.length?m[m.length-1]:y;x.push([A[0],A[1]])}x.push([E[0],E[1]]),x.push([E[2],E[3]]),x.push([E[4],E[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(_(),!f)return g;const v=[];for(const k of g){const E=Fk(k,f);E.length&&v.push(E)}return v}(t,1,s?4-4*(i.simplification||1):(1+i.roughness)/2),c=Hc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Hc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(us(l,i));else n.push(vr(l,i));return o&&(s?l.forEach(h=>{n.push(Bn(h,!1,i))}):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map(o=>+o.toFixed(r)):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Yt};break;case"fillPath":o={d:this.opsToPath(a),stroke:Yt,strokeWidth:0,fill:i.fill||Yt};break;case"fillSketch":o=this.fillSketch(a,i)}o&&n.push(o)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Yt,strokeWidth:i,fill:Yt}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class $k{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ua(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,o,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const s=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,o,a,s),n.restore();break}case"fillSketch":this.fillSketch(n,o,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map(s=>+s.toFixed(i)):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o),o}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o),o}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o),o}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,o,s=!1,l){const c=this.gen.arc(t,r,i,n,a,o,s,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const bn="http://www.w3.org/2000/svg";class Dk{constructor(t,r){this.svg=t,this.gen=new ua(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(bn,"g"),o=t.options.fixedDecimalPlaceDigits;for(const s of r){let l=null;switch(s.type){case"path":l=n.createElementNS(bn,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(bn,"path"),l.setAttribute("d",this.opsToPath(s,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,s,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(bn,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const o=this.gen.line(t,r,i,n,a);return this.draw(o)}rectangle(t,r,i,n,a){const o=this.gen.rectangle(t,r,i,n,a);return this.draw(o)}ellipse(t,r,i,n,a){const o=this.gen.ellipse(t,r,i,n,a);return this.draw(o)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,o,s=!1,l){const c=this.gen.arc(t,r,i,n,a,o,s,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var j={canvas:(e,t)=>new $k(e,t),svg:(e,t)=>new Dk(e,t),generator:e=>new ua(e),newSeed:()=>ua.newSeed()},rt=d(async(e,t,r)=>{var u,f;let i;const n=t.useHtmlLabels||Bt((u=ct())==null?void 0:u.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",Nt(t.labelStyle));let s;t.label===void 0?s="":s=typeof t.label=="string"?t.label:t.label[0];const l=await Jr(o,or(Qr(s),ct()),{useHtmlLabels:n,width:t.width||((f=ct().flowchart)==null?void 0:f.wrappingWidth),cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=((t==null?void 0:t.padding)??0)/2;if(n){const p=l.children[0],g=lt(l),m=p.getElementsByTagName("img");if(m){const y=s.replace(/]*>/g,"").trim()==="";await Promise.all([...m].map(x=>new Promise(b=>{function _(){if(x.style.display="flex",x.style.flexDirection="column",y){const v=ct().fontSize?ct().fontSize:window.getComputedStyle(document.body).fontSize,k=5,[E=Ah.fontSize]=Fa(v),A=E*k+"px";x.style.minWidth=A,x.style.maxWidth=A}else x.style.width="100%";b(x)}d(_,"setupImage"),setTimeout(()=>{x.complete&&_()}),x.addEventListener("error",_),x.addEventListener("load",_)})))}c=p.getBoundingClientRect(),g.attr("width",c.width),g.attr("height",c.height)}return n?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:o}},"labelHelper"),ps=d(async(e,t,r)=>{var l,c,h,u,f,p;const i=r.useHtmlLabels||Bt((c=(l=ct())==null?void 0:l.flowchart)==null?void 0:c.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Jr(n,or(Qr(t),ct()),{useHtmlLabels:i,width:r.width||((u=(h=ct())==null?void 0:h.flowchart)==null?void 0:u.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let o=a.getBBox();const s=r.padding/2;if(Bt((p=(f=ct())==null?void 0:f.flowchart)==null?void 0:p.htmlLabels)){const g=a.children[0],m=lt(a);o=g.getBoundingClientRect(),m.attr("width",o.width),m.attr("height",o.height)}return i?n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):n.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:s,label:n}},"insertLabel"),X=d((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),it=d((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ot(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}d(ot,"createPathFromPoints");function Ye(e,t,r,i,n,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,f=t+c/2;for(let p=0;p<=50;p++){const g=p/50,m=e+g*l,y=f+n*Math.sin(u*(m-e));o.push({x:m,y})}return o}d(Ye,"generateFullSineWavePoints");function ol(e,t,r,i,n,a){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,o=e.width/2,s=e.height/2,l,c;return Math.abs(a)*o>Math.abs(n)*s?(a<0&&(s=-s),l=a===0?0:s*n/a,c=s):(n<0&&(o=-o),l=o,c=n===0?0:o*a/n),{x:r+l,y:i+c}},"intersectRect"),ti=Rk;function cd(e,t){t&&e.attr("style",t)}d(cd,"applyStyle");async function hd(e){const t=lt(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div");let i=e.label;e.label&&qr(e.label)&&(i=await go(e.label.replace(Xr.lineBreakRegex,` +`),ct()));const n=e.isNode?"nodeLabel":"edgeLabel";return r.html('"+i+""),cd(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}d(hd,"addHtmlLabel");var Ok=d(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),Bt(ct().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"
    "),$.info("vertexText"+n);const a={isNode:i,label:Qr(n).replace(/fa[blrs]?:fa-[\w-]+/g,s=>``),labelStyle:t&&t.replace("fill:","color:")};return await hd(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let o=[];typeof n=="string"?o=n.split(/\\n|\n|/gi):Array.isArray(n)?o=n:o=[];for(const s of o){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=s.trim(),a.appendChild(l)}return a}},"createLabel"),nr=Ok,De=d((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),Ik=d(e=>{const{handDrawnSeed:t}=ct();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ei=d(e=>{const t=Pk([...e.cssCompiledStyles||[],...e.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),Pk=d(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n==null?void 0:n.trim())}),t},"styles2Map"),Z=d(e=>{const{stylesArray:t}=ei(e),r=[],i=[],n=[],a=[];return t.forEach(o=>{const s=o[0];s==="color"||s==="font-size"||s==="font-family"||s==="font-weight"||s==="font-style"||s==="text-decoration"||s==="text-align"||s==="text-transform"||s==="line-height"||s==="letter-spacing"||s==="word-spacing"||s==="text-shadow"||s==="text-overflow"||s==="white-space"||s==="word-wrap"||s==="word-break"||s==="overflow-wrap"||s==="hyphens"?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),s.includes("stroke")&&n.push(o.join(":")+" !important"),s==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),U=d((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=ct(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:o}=ei(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||n,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides"),ud=d(async(e,t)=>{$.info("Creating subgraph rect for ",t.id,t);const r=ct(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Z(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Bt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await Jr(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(Bt(r.flowchart.htmlLabels)){const A=g.children[0],O=lt(g);m=A.getBoundingClientRect(),O.attr("width",m.width),O.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;$.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const A=j.svg(u),O=U(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:n}),N=A.path(De(b,_,y,x,0),O);v=u.insert(()=>($.debug("Rough node insert CXC",N),N),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:k}=Ao(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+k})`),s){const A=p.select("span");A&&A.attr("style",s)}const E=v.node().getBBox();return t.offsetX=0,t.width=E.width,t.height=E.height,t.offsetY=m.height-t.padding/2,t.intersect=function(A){return ti(t,A)},{cluster:u,labelBBox:m}},"rect"),Nk=d((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(s){return ti(t,s)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),zk=d(async(e,t)=>{const r=ct(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const p=u.node().appendChild(await nr(t.label,t.labelStyle,void 0,!0));let g=p.getBBox();if(Bt(r.flowchart.htmlLabels)){const N=p.children[0],R=lt(p);g=N.getBoundingClientRect(),R.attr("width",g.width),R.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,_=t.height+m-g.height-6,v=t.x-x/2,k=t.y-b/2;t.width=x;const E=t.y-t.height/2-y+g.height+2;let A;if(t.look==="handDrawn"){const N=t.cssClasses.includes("statediagram-cluster-alt"),R=j.svg(c),B=t.rx||t.ry?R.path(De(v,k,x,b,10),{roughness:.7,fill:s,fillStyle:"solid",stroke:l,seed:n}):R.rectangle(v,k,x,b,{seed:n});A=c.insert(()=>B,":first-child");const q=R.rectangle(v,E,x,_,{fill:N?a:o,fillStyle:N?"hachure":"solid",stroke:l,seed:n});A=c.insert(()=>B,":first-child"),f=c.insert(()=>q)}else A=h.insert("rect",":first-child"),A.attr("class","outer").attr("x",v).attr("y",k).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",v).attr("y",E).attr("width",x).attr("height",_);u.attr("transform",`translate(${t.x-g.width/2}, ${k+1-(Bt(r.flowchart.htmlLabels)?0:3)})`);const O=A.node().getBBox();return t.height=O.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(N){return ti(t,N)},{cluster:c,labelBBox:g}},"roundedWithTitle"),qk=d(async(e,t)=>{$.info("Creating subgraph rect for ",t.id,t);const r=ct(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:s,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Z(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Bt(r.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await Jr(p,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(Bt(r.flowchart.htmlLabels)){const A=g.children[0],O=lt(g);m=A.getBoundingClientRect(),O.attr("width",m.width),O.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;$.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const A=j.svg(u),O=U(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:n}),N=A.path(De(b,_,y,x,t.rx),O);v=u.insert(()=>($.debug("Rough node insert CXC",N),N),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:k}=Ao(r);if(p.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+k})`),s){const A=p.select("span");A&&A.attr("style",s)}const E=v.node().getBBox();return t.offsetX=0,t.width=E.width,t.height=E.height,t.offsetY=m.height-t.padding/2,t.intersect=function(A){return ti(t,A)},{cluster:u,labelBBox:m}},"kanbanSection"),Wk=d((e,t)=>{const r=ct(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),s=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let p;if(t.look==="handDrawn"){const y=j.svg(o).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});p=o.insert(()=>y,":first-child")}else p=s.insert("rect",":first-child"),p.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const g=p.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return ti(t,m)},{cluster:o,labelBBox:{}}},"divider"),Hk=ud,jk={rect:ud,squareRect:Hk,roundedWithTitle:zk,noteGroup:Nk,divider:Wk,kanbanSection:qk},fd=new Map,Uk=d(async(e,t)=>{const r=t.shape||"rect",i=await jk[r](e,t);return fd.set(t.id,i),i},"insertCluster"),uB=d(()=>{fd=new Map},"clear");function pd(e,t){return e.intersect(t)}d(pd,"intersectNode");var Yk=pd;function dd(e,t,r,i){var n=e.x,a=e.y,o=n-i.x,s=a-i.y,l=Math.sqrt(t*t*s*s+r*r*o*o),c=Math.abs(t*r*o/l);i.x0}d(ro,"sameSign");var Vk=yd;function xd(e,t,r){let i=e.x,n=e.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),s=Math.min(s,h.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let l=i-e.width/2-o,c=n-e.height/2-s;for(let h=0;h1&&a.sort(function(h,u){let f=h.x-r.x,p=h.y-r.y,g=Math.sqrt(f*f+p*p),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return gh,":first-child");return u.attr("class","anchor").attr("style",Nt(s)),X(t,u),t.intersect=function(f){return $.info("Circle intersect",t,o,f),W.circle(t,o,f)},a}d(bd,"anchor");function io(e,t,r,i,n,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,p=u/n,g=f/a,m=Math.sqrt(p**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(o?-1:1),b=c-y*n*Math.cos(h)*(o?-1:1),_=Math.atan2((t-b)/a,(e-x)/n);let k=Math.atan2((i-b)/a,(r-x)/n)-_;o&&k<0&&(k+=2*Math.PI),!o&&k>0&&(k-=2*Math.PI);const E=[];for(let A=0;A<20;A++){const O=A/19,N=_+O*k,R=x+n*Math.cos(N),B=b+a*Math.sin(N);E.push({x:R,y:B})}return E}d(io,"generateArcPoints");async function _d(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=a.width+t.padding+20,s=a.height+t.padding,l=s/2,c=l/(2.5+s/50),{cssStyles:h}=t,u=[{x:o/2,y:-s/2},{x:-o/2,y:-s/2},...io(-o/2,-s/2,-o/2,s/2,c,l,!1),{x:o/2,y:s/2},...io(o/2,s/2,o/2,-s/2,c,l,!0)],f=j.svg(n),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=ot(u),m=f.path(g,p),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),X(t,y),t.intersect=function(x){return W.polygon(t,u,x)},n}d(_d,"bowTieRect");function Re(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}d(Re,"insertPolygonShape");async function Cd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=a.height+t.padding,s=12,l=a.width+t.padding+s,c=0,h=l,u=-o,f=0,p=[{x:c+s,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+s},{x:c+s,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=j.svg(n),x=U(t,{}),b=ot(p),_=y.path(b,x);g=n.insert(()=>_,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),m&&g.attr("style",m)}else g=Re(n,l,o,p);return i&&g.attr("style",i),X(t,g),t.intersect=function(y){return W.polygon(t,p,y)},n}d(Cd,"card");function wd(e,t){const{nodeStyles:r}=Z(t);t.label="";const i=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=j.svg(i),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ot(o),h=s.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return W.polygon(t,o,f)},i}d(wd,"choice");async function vd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await rt(e,t,it(t)),s=a.width/2+o;let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const h=j.svg(n),u=U(t,{}),f=h.circle(0,0,s*2,u);l=n.insert(()=>f,":first-child"),l.attr("class","basic label-container").attr("style",Nt(c))}else l=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",s).attr("cx",0).attr("cy",0);return X(t,l),t.intersect=function(h){return $.info("Circle intersect",t,s,h),W.circle(t,s,h)},n}d(vd,"circle");function kd(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},s={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${s.x},${s.y} + M ${n.x},${n.y} L ${o.x},${o.y}`}d(kd,"createLine");function Sd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,s=j.svg(n),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=s.circle(0,0,a*2,l),h=kd(a),u=s.path(h,l),f=n.insert(()=>c,":first-child");return f.insert(()=>u),o&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),X(t,f),t.intersect=function(p){return $.info("crossedCircle intersect",t,{radius:a,point:p}),W.circle(t,a,p)},n}d(Sd,"crossedCircle");function Ae(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u_,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${c}, 0)`),o.attr("transform",`translate(${-s/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,v),t.intersect=function(k){return W.polygon(t,f,k)},n}d(Td,"curlyBraceLeft");function Le(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;u_,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-c}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,v),t.intersect=function(k){return W.polygon(t,f,k)},n}d(Ad,"curlyBraceRight");function Tt(e,t,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,h=(a*Math.PI/180-s)/(i-1);for(let u=0;uA,":first-child").attr("stroke-opacity",0),O.insert(()=>b,":first-child"),O.insert(()=>k,":first-child"),O.attr("class","text"),h&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(${c-c/4}, 0)`),o.attr("transform",`translate(${-s/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,O),t.intersect=function(N){return W.polygon(t,p,N)},n}d(Ld,"curlyBraces");async function Bd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=80,s=20,l=Math.max(o,(a.width+(t.padding??0)*2)*1.25,(t==null?void 0:t.width)??0),c=Math.max(s,a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/2,{cssStyles:u}=t,f=j.svg(n),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...ol(-y,-m/2,h,50,270,90)],_=ot(b),v=f.path(_,p),k=n.insert(()=>v,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(${-l/2}, ${-c/2})`),X(t,k),t.intersect=function(E){return W.polygon(t,b,E)},n}d(Bd,"curvedTrapezoid");var Zk=d((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Kk=d((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Qk=d((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Md(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=Math.max(a.width+t.padding,t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=j.svg(n),g=Kk(0,0,s,h,l,c),m=Qk(0,c,s,h,l,c),y=p.path(g,U(t,{})),x=p.path(m,U(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const p=Zk(0,0,s,h,l,c);u=n.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",Nt(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),X(t,u),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(p){const g=W.rect(t,p),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,p.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n}d(Md,"cylinder");async function Ed(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-s/2,u=-l/2-c/2,{cssStyles:f}=t,p=j.svg(n),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=p.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,x),t.intersect=function(b){return W.rect(t,b)},n}d(Ed,"dividedRectangle");async function Fd(e,t){var f,p;const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:o}=await rt(e,t,it(t)),l=a.width/2+o+5,c=a.width/2+o;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=j.svg(n),m=U(t,{roughness:.2,strokeWidth:2.5}),y=U(t,{roughness:.2,strokeWidth:1.5}),x=g.circle(0,0,l*2,m),b=g.circle(0,0,c*2,y);h=n.insert("g",":first-child"),h.attr("class",Nt(t.cssClasses)).attr("style",Nt(u)),(f=h.node())==null||f.appendChild(x),(p=h.node())==null||p.appendChild(b)}else{h=n.insert("g",":first-child");const g=h.insert("circle",":first-child"),m=h.insert("circle");h.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return X(t,h),t.intersect=function(g){return $.info("DoubleCircle intersect",t,l,g),W.circle(t,l,g)},n}d(Fd,"doublecircle");function $d(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=Z(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),o=7,{cssStyles:s}=t,l=j.svg(a),{nodeBorder:c}=r,h=U(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),X(t,f),t.intersect=function(p){return $.info("filledCircle intersect",t,{radius:o,point:p}),W.circle(t,o,p)},a}d($d,"filledCircle");async function Dd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=a.width+(t.padding??0),l=s+a.height,c=s+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=j.svg(n),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=ot(h),m=f.path(g,p),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=s,t.height=l,X(t,y),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return $.info("Triangle intersect",t,h,x),W.polygon(t,h,x)},n}d(Dd,"flippedTriangle");function Rd(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=Z(t);t.label="";const o=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:s}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,f=j.svg(o),p=U(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=f.rectangle(h,u,l,c,p),m=o.insert(()=>g,":first-child");s&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",s),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),X(t,m);const y=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return W.rect(t,x)},o}d(Rd,"forkJoin");async function Od(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:o,bbox:s}=await rt(e,t,it(t)),l=Math.max(n,s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a,s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/2,{cssStyles:u}=t,f=j.svg(o),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...ol(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=ot(g),y=f.path(m,p),x=o.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),X(t,x),t.intersect=function(b){return $.info("Pill intersect",t,{radius:h,point:b}),W.polygon(t,g,b)},o}d(Od,"halfRoundedRectangle");var Jk=d((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Id(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=4,s=a.height+t.padding,l=s/o,c=a.width+2*l+t.padding,h=[{x:l,y:0},{x:c-l,y:0},{x:c,y:-s/2},{x:c-l,y:-s},{x:l,y:-s},{x:0,y:-s/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const p=j.svg(n),g=U(t,{}),m=Jk(0,0,c,s,l),y=p.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${s/2})`),f&&u.attr("style",f)}else u=Re(n,c,s,h);return i&&u.attr("style",i),t.width=c,t.height=s,X(t,u),t.intersect=function(p){return W.polygon(t,h,p)},n}d(Id,"hexagon");async function Pd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await rt(e,t,it(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:s}=t,l=j.svg(n),c=U(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=ot(h),f=l.path(u,c),p=n.insert(()=>f,":first-child");return p.attr("class","basic label-container"),s&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",s),i&&t.look!=="handDrawn"&&p.selectChildren("path").attr("style",i),p.attr("transform",`translate(${-a/2}, ${-o/2})`),X(t,p),t.intersect=function(g){return $.info("Pill intersect",t,{points:h}),W.polygon(t,h,g)},n}d(Pd,"hourglass");async function Nd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Z(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await rt(e,t,"icon-shape default"),f=t.pos==="t",p=s,g=s,{nodeBorder:m}=r,{stylesMap:y}=ei(t),x=-g/2,b=-p/2,_=t.label?8:0,v=j.svg(c),k=U(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const E=v.rectangle(x,b,g,p,k),A=Math.max(g,h.width),O=p+h.height+_,N=v.rectangle(-A/2,-O/2,A,O,{...k,fill:"transparent",stroke:"none"}),R=c.insert(()=>E,":first-child"),B=c.insert(()=>N);if(t.icon){const q=c.append("g");q.html(`${await Ca(t.icon,{height:s,width:s,fallbackPrefix:""})}`);const I=q.node().getBBox(),M=I.width,L=I.height,S=I.x,F=I.y;q.attr("transform",`translate(${-M/2-S},${f?h.height/2+_/2-L/2-F:-h.height/2-_/2-L/2-F})`),q.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-O/2:O/2-h.height})`),R.attr("transform",`translate(0,${f?h.height/2+_/2:-h.height/2-_/2})`),X(t,B),t.intersect=function(q){if($.info("iconSquare intersect",t,q),!t.label)return W.rect(t,q);const I=t.x??0,M=t.y??0,L=t.height??0;let S=[];return f?S=[{x:I-h.width/2,y:M-L/2},{x:I+h.width/2,y:M-L/2},{x:I+h.width/2,y:M-L/2+h.height+_},{x:I+g/2,y:M-L/2+h.height+_},{x:I+g/2,y:M+L/2},{x:I-g/2,y:M+L/2},{x:I-g/2,y:M-L/2+h.height+_},{x:I-h.width/2,y:M-L/2+h.height+_}]:S=[{x:I-g/2,y:M-L/2},{x:I+g/2,y:M-L/2},{x:I+g/2,y:M-L/2+p},{x:I+h.width/2,y:M-L/2+p},{x:I+h.width/2/2,y:M+L/2},{x:I-h.width/2,y:M+L/2},{x:I-h.width/2,y:M-L/2+p},{x:I-g/2,y:M-L/2+p}],W.polygon(t,S,q)},c}d(Nd,"icon");async function zd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Z(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,label:u}=await rt(e,t,"icon-shape default"),f=20,p=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=ei(t),b=j.svg(c),_=U(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=x.get("fill");_.stroke=v??y;const k=c.append("g");t.icon&&k.html(`${await Ca(t.icon,{height:s,width:s,fallbackPrefix:""})}`);const E=k.node().getBBox(),A=E.width,O=E.height,N=E.x,R=E.y,B=Math.max(A,O)*Math.SQRT2+f*2,q=b.circle(0,0,B,_),I=Math.max(B,h.width),M=B+h.height+p,L=b.rectangle(-I/2,-M/2,I,M,{..._,fill:"transparent",stroke:"none"}),S=c.insert(()=>q,":first-child"),F=c.insert(()=>L);return k.attr("transform",`translate(${-A/2-N},${g?h.height/2+p/2-O/2-R:-h.height/2-p/2-O/2-R})`),k.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-M/2:M/2-h.height})`),S.attr("transform",`translate(0,${g?h.height/2+p/2:-h.height/2-p/2})`),X(t,F),t.intersect=function(T){return $.info("iconSquare intersect",t,T),W.rect(t,T)},c}d(zd,"iconCircle");async function qd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Z(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await rt(e,t,"icon-shape default"),p=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=ei(t),_=-m/2,v=-g/2,k=t.label?8:0,E=j.svg(c),A=U(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const O=b.get("fill");A.stroke=O??x;const N=E.path(De(_,v,m,g,5),A),R=Math.max(m,h.width),B=g+h.height+k,q=E.rectangle(-R/2,-B/2,R,B,{...A,fill:"transparent",stroke:"none"}),I=c.insert(()=>N,":first-child").attr("class","icon-shape2"),M=c.insert(()=>q);if(t.icon){const L=c.append("g");L.html(`${await Ca(t.icon,{height:s,width:s,fallbackPrefix:""})}`);const S=L.node().getBBox(),F=S.width,T=S.height,z=S.x,Y=S.y;L.attr("transform",`translate(${-F/2-z},${p?h.height/2+k/2-T/2-Y:-h.height/2-k/2-T/2-Y})`),L.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-B/2:B/2-h.height})`),I.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),X(t,M),t.intersect=function(L){if($.info("iconSquare intersect",t,L),!t.label)return W.rect(t,L);const S=t.x??0,F=t.y??0,T=t.height??0;let z=[];return p?z=[{x:S-h.width/2,y:F-T/2},{x:S+h.width/2,y:F-T/2},{x:S+h.width/2,y:F-T/2+h.height+k},{x:S+m/2,y:F-T/2+h.height+k},{x:S+m/2,y:F+T/2},{x:S-m/2,y:F+T/2},{x:S-m/2,y:F-T/2+h.height+k},{x:S-h.width/2,y:F-T/2+h.height+k}]:z=[{x:S-m/2,y:F-T/2},{x:S+m/2,y:F-T/2},{x:S+m/2,y:F-T/2+g},{x:S+h.width/2,y:F-T/2+g},{x:S+h.width/2/2,y:F+T/2},{x:S-h.width/2,y:F+T/2},{x:S-h.width/2,y:F-T/2+g},{x:S-m/2,y:F-T/2+g}],W.polygon(t,z,L)},c}d(qd,"iconRounded");async function Wd(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=Z(t);t.labelStyle=n;const a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(s,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await rt(e,t,"icon-shape default"),p=t.pos==="t",g=s+u*2,m=s+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=ei(t),_=-m/2,v=-g/2,k=t.label?8:0,E=j.svg(c),A=U(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const O=b.get("fill");A.stroke=O??x;const N=E.path(De(_,v,m,g,.1),A),R=Math.max(m,h.width),B=g+h.height+k,q=E.rectangle(-R/2,-B/2,R,B,{...A,fill:"transparent",stroke:"none"}),I=c.insert(()=>N,":first-child"),M=c.insert(()=>q);if(t.icon){const L=c.append("g");L.html(`${await Ca(t.icon,{height:s,width:s,fallbackPrefix:""})}`);const S=L.node().getBBox(),F=S.width,T=S.height,z=S.x,Y=S.y;L.attr("transform",`translate(${-F/2-z},${p?h.height/2+k/2-T/2-Y:-h.height/2-k/2-T/2-Y})`),L.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-B/2:B/2-h.height})`),I.attr("transform",`translate(0,${p?h.height/2+k/2:-h.height/2-k/2})`),X(t,M),t.intersect=function(L){if($.info("iconSquare intersect",t,L),!t.label)return W.rect(t,L);const S=t.x??0,F=t.y??0,T=t.height??0;let z=[];return p?z=[{x:S-h.width/2,y:F-T/2},{x:S+h.width/2,y:F-T/2},{x:S+h.width/2,y:F-T/2+h.height+k},{x:S+m/2,y:F-T/2+h.height+k},{x:S+m/2,y:F+T/2},{x:S-m/2,y:F+T/2},{x:S-m/2,y:F-T/2+h.height+k},{x:S-h.width/2,y:F-T/2+h.height+k}]:z=[{x:S-m/2,y:F-T/2},{x:S+m/2,y:F-T/2},{x:S+m/2,y:F-T/2+g},{x:S+h.width/2,y:F-T/2+g},{x:S+h.width/2/2,y:F+T/2},{x:S-h.width/2,y:F+T/2},{x:S-h.width/2,y:F-T/2+g},{x:S-m/2,y:F-T/2+g}],W.polygon(t,z,L)},c}d(Wd,"iconSquare");async function Hd(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:o}=Z(t);t.labelStyle=o;const s=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?s??0:0,(t==null?void 0:t.assetWidth)??n),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(c,s??0);const{shapeSvg:u,bbox:f,label:p}=await rt(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=j.svg(u),_=U(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const v=b.rectangle(m,y,c,h,_),k=Math.max(c,f.width),E=h+f.height+x,A=b.rectangle(-k/2,-E/2,k,E,{..._,fill:"none",stroke:"none"}),O=u.insert(()=>v,":first-child"),N=u.insert(()=>A);if(t.img){const R=u.append("image");R.attr("href",t.img),R.attr("width",c),R.attr("height",h),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-c/2},${g?E/2-h:-E/2})`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),O.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),X(t,N),t.intersect=function(R){if($.info("iconSquare intersect",t,R),!t.label)return W.rect(t,R);const B=t.x??0,q=t.y??0,I=t.height??0;let M=[];return g?M=[{x:B-f.width/2,y:q-I/2},{x:B+f.width/2,y:q-I/2},{x:B+f.width/2,y:q-I/2+f.height+x},{x:B+c/2,y:q-I/2+f.height+x},{x:B+c/2,y:q+I/2},{x:B-c/2,y:q+I/2},{x:B-c/2,y:q-I/2+f.height+x},{x:B-f.width/2,y:q-I/2+f.height+x}]:M=[{x:B-c/2,y:q-I/2},{x:B+c/2,y:q-I/2},{x:B+c/2,y:q-I/2+h},{x:B+f.width/2,y:q-I/2+h},{x:B+f.width/2/2,y:q+I/2},{x:B-f.width/2,y:q+I/2},{x:B-f.width/2,y:q-I/2+h},{x:B-c/2,y:q-I/2+h}],W.polygon(t,M,R)},u}d(Hd,"imageSquare");async function jd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=[{x:0,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:-3*s/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=U(t,{}),p=ot(l),g=u.path(p,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Re(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,X(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}d(jd,"inv_trapezoid");async function Ia(e,t,r){const{labelStyles:i,nodeStyles:n}=Z(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await rt(e,t,it(t)),s=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-s/2,h=-l/2;let u,{rx:f,ry:p}=t;const{cssStyles:g}=t;if(r!=null&&r.rx&&r.ry&&(f=r.rx,p=r.ry),t.look==="handDrawn"){const m=j.svg(a),y=U(t,{}),x=f||p?m.path(De(c,h,s,l,f||0),y):m.rectangle(c,h,s,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",Nt(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",Nt(f)).attr("ry",Nt(p)).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return X(t,u),t.intersect=function(m){return W.rect(t,m)},a}d(Ia,"drawRect");async function Ud(e,t){const{shapeSvg:r,bbox:i,label:n}=await rt(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),X(t,a),t.intersect=function(l){return W.rect(t,l)},r}d(Ud,"labelRect");async function Yd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)??0),l=[{x:0,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:-(3*s)/6,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=U(t,{}),p=ot(l),g=u.path(p,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Re(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,X(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}d(Yd,"lean_left");async function Gd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)??0),l=[{x:-3*s/6,y:0},{x:o,y:0},{x:o+3*s/6,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=U(t,{}),p=ot(l),g=u.path(p,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Re(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,X(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}d(Gd,"lean_right");function Vd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",it(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),s=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:s+l/2},{x:o-2*l,y:s+l/2},{x:0,y:2*s},{x:o,y:s-l/2},{x:2*l,y:s-l/2}],h=j.svg(n),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=ot(c),p=h.path(f,u),g=n.insert(()=>p,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${o/2},${-s})`),X(t,g),t.intersect=function(m){return $.info("lightningBolt intersect",t,m),W.polygon(t,c,m)},n}d(Vd,"lightningBolt");var tS=d((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),eS=d((e,t,r,i,n,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),rS=d((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Xd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=Math.max(a.width+(t.padding??0),t.width??0),l=s/2,c=l/(2.5+s/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=j.svg(n),m=eS(0,0,s,h,l,c,u),y=rS(0,c,s,h,l,c),x=U(t,{}),b=g.path(m,x),_=g.path(y,x);n.insert(()=>_,":first-child").attr("class","line"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),p&&f.attr("style",p)}else{const g=tS(0,0,s,h,l,c,u);f=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",Nt(p)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-s/2}, ${-(h/2+c)})`),X(t,f),o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=W.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}d(Xd,"linedCylinder");async function Zd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=l+c,{cssStyles:u}=t,f=j.svg(n),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:-s/2-s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:h/2},...Ye(-s/2-s/2*.1,h/2,s/2+s/2*.1,h/2,c,.8),{x:s/2+s/2*.1,y:-h/2},{x:-s/2-s/2*.1,y:-h/2},{x:-s/2,y:-h/2},{x:-s/2,y:h/2*1.1},{x:-s/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),p),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)+s/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),X(t,y),t.intersect=function(x){return W.polygon(t,g,x)},n}d(Zd,"linedWaveEdgedRect");async function Kd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=t,p=j.svg(n),g=U(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+s-c,y:u+l+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u+l-c},{x:h+s+c,y:u+l-c},{x:h+s+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+s-c,y:u+c},{x:h+s-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ot(m),b=p.path(x,g),_=ot(y),v=p.path(_,{...g,fill:"none"}),k=n.insert(()=>v,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),X(t,k),t.intersect=function(E){return W.polygon(t,m,E)},n}d(Kd,"multiRect");async function Qd(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=l+c,u=-s/2,f=-h/2,p=5,{cssStyles:g}=t,m=Ye(u-p,f+h+p,u+s-p,f+h+p,c,.8),y=m==null?void 0:m[m.length-1],x=[{x:u-p,y:f+p},{x:u-p,y:f+h+p},...m,{x:u+s-p,y:y.y-p},{x:u+s,y:y.y-p},{x:u+s,y:y.y-2*p},{x:u+s+p,y:y.y-2*p},{x:u+s+p,y:f-p},{x:u+p,y:f-p},{x:u+p,y:f},{x:u,y:f},{x:u,y:f+p}],b=[{x:u,y:f+p},{x:u+s-p,y:f+p},{x:u+s-p,y:y.y-p},{x:u+s,y:y.y-p},{x:u+s,y:f},{x:u,y:f}],_=j.svg(n),v=U(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const k=ot(x),E=_.path(k,v),A=ot(b),O=_.path(A,v),N=n.insert(()=>E,":first-child");return N.insert(()=>O),N.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-(a.width/2)-p-(a.x-(a.left??0))}, ${-(a.height/2)+p-c/2-(a.y-(a.top??0))})`),X(t,N),t.intersect=function(R){return W.polygon(t,x,R)},n}d(Qd,"multiWaveEdgedRectangle");async function Jd(e,t,{config:{themeVariables:r}}){var x;const{labelStyles:i,nodeStyles:n}=Z(t);t.labelStyle=i,t.useHtmlLabels||((x=he().flowchart)==null?void 0:x.htmlLabels)!==!1||(t.centerLabel=!0);const{shapeSvg:o,bbox:s}=await rt(e,t,it(t)),l=Math.max(s.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=-l/2,u=-c/2,{cssStyles:f}=t,p=j.svg(o),g=U(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=p.rectangle(h,u,l,c,g),y=o.insert(()=>m,":first-child");return y.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),X(t,y),t.intersect=function(b){return W.rect(t,b)},o}d(Jd,"note");var iS=d((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=a.width+t.padding,s=a.height+t.padding,l=o+s,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=j.svg(n),p=U(t,{}),g=iS(0,0,l),m=f.path(g,p);h=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=Re(n,l,l,c);return i&&h.attr("style",i),X(t,h),t.intersect=function(f){return $.debug(`APA12 Intersect called SPLIT +point:`,f,` +node: +`,t,` +res:`,W.polygon(t,c,f)),W.polygon(t,c,f)},n}d(tg,"question");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)??0),c=-s/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:p}=t,g=j.svg(n),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ot(f),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),o.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),X(t,b),t.intersect=function(_){return W.polygon(t,f,_)},n}d(eg,"rect_left_inv_arrow");async function rg(e,t){var O,N;const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=a.insert("g"),s=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=s.node().appendChild(await nr(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(Bt((N=(O=ct())==null?void 0:O.flowchart)==null?void 0:N.htmlLabels)){const R=h.children[0],B=lt(h);u=R.getBoundingClientRect(),B.attr("width",u.width),B.attr("height",u.height)}$.info("Text 2",l);const f=l||[],p=h.getBBox(),g=s.node().appendChild(await nr(f.join?f.join("
    "):f,t.labelStyle,!0,!0)),m=g.children[0],y=lt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;lt(g).attr("transform","translate( "+(u.width>p.width?0:(p.width-u.width)/2)+", "+(p.height+x+5)+")"),lt(h).attr("transform","translate( "+(u.width($.debug("Rough node insert CXC",q),I),":first-child"),E=a.insert(()=>($.debug("Rough node insert CXC",q),q),":first-child")}else E=o.insert("rect",":first-child"),A=o.insert("line"),E.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),A.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+p.height+x).attr("y2",-u.height/2-x+p.height+x);return X(t,E),t.intersect=function(R){return W.rect(t,R)},a}d(rg,"rectWithTitle");async function ig(e,t){const r={rx:5,ry:5,classes:"",labelPaddingX:((t==null?void 0:t.padding)||0)*1,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return Ia(e,t,r)}d(ig,"roundedRect");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=(t==null?void 0:t.padding)??0,l=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=-a.width/2-s,u=-a.height/2-s,{cssStyles:f}=t,p=j.svg(n),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=p.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",Nt(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),o.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),X(t,x),t.intersect=function(b){return W.rect(t,b)},n}d(ng,"shadedProcess");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=-s/2,h=-l/2,{cssStyles:u}=t,f=j.svg(n),p=U(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+s,y:h+l},{x:c+s,y:h-l/2}],m=ot(g),y=f.path(m,p),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),X(t,x),t.intersect=function(b){return W.polygon(t,g,b)},n}d(ag,"slopedRect");async function sg(e,t){const r={rx:0,ry:0,classes:"",labelPaddingX:((t==null?void 0:t.padding)||0)*2,labelPaddingY:((t==null?void 0:t.padding)||0)*1};return Ia(e,t,r)}d(sg,"squareRect");async function og(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=a.height+t.padding,s=a.width+o/4+t.padding;let l;const{cssStyles:c}=t;if(t.look==="handDrawn"){const h=j.svg(n),u=U(t,{}),f=De(-s/2,-o/2,s,o,o/2),p=h.path(f,u);l=n.insert(()=>p,":first-child"),l.attr("class","basic label-container").attr("style",Nt(c))}else l=n.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",i).attr("rx",o/2).attr("ry",o/2).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o);return X(t,l),t.intersect=function(h){return W.rect(t,h)},n}d(og,"stadium");async function lg(e,t){return Ia(e,t,{rx:5,ry:5,classes:"flowchart-node"})}d(lg,"state");function cg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=Z(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=j.svg(c),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:o,strokeWidth:2}),p=s??l,g=h.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),X(t,m),t.intersect=function(y){return W.circle(t,7,y)},c}d(cg,"stateEnd");function hg(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const s=j.svg(n).circle(0,0,14,Ik(i));a=n.insert(()=>s),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return X(t,a),t.intersect=function(o){return W.circle(t,7,o)},n}d(hg,"stateStart");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=((t==null?void 0:t.padding)||0)/2,s=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-o,h=-a.height/2-o,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const f=j.svg(n),p=U(t,{}),g=f.rectangle(c-8,h,s+16,l,p),m=f.line(c,h,c,h+l,p),y=f.line(c+s,h,c+s,h+l,p);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",Nt(b)),X(t,x)}else{const f=Re(n,s,l,u);i&&f.attr("style",i),X(t,f)}return t.intersect=function(f){return W.polygon(t,u,f)},n}d(ug,"subroutine");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),s=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),l=-o/2,c=-s/2,h=.2*s,u=.2*s,{cssStyles:f}=t,p=j.svg(n),g=U(t,{}),m=[{x:l-h/2,y:c},{x:l+o+h/2,y:c},{x:l+o+h/2,y:c+s},{x:l-h/2,y:c+s}],y=[{x:l+o-h/2,y:c+s},{x:l+o+h/2,y:c+s},{x:l+o+h/2,y:c+s-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ot(m),b=p.path(x,g),_=ot(y),v=p.path(_,{...g,fillStyle:"solid"}),k=n.insert(()=>v,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),X(t,k),t.intersect=function(E){return W.polygon(t,m,E)},n}d(fg,"taggedRect");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/4,h=.2*s,u=.2*l,f=l+c,{cssStyles:p}=t,g=j.svg(n),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:f/2},...Ye(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,c,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],x=-s/2+s/2*.1,b=-f/2-u*.4,_=[{x:x+s-h,y:(b+l)*1.4},{x:x+s,y:b+l-u},{x:x+s,y:(b+l)*.9},...Ye(x+s,(b+l)*1.3,x+s-h,(b+l)*1.5,-l*.03,.5)],v=ot(y),k=g.path(v,m),E=ot(_),A=g.path(E,{...m,fillStyle:"solid"}),O=n.insert(()=>A,":first-child");return O.insert(()=>k,":first-child"),O.attr("class","basic label-container"),p&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&O.selectAll("path").attr("style",i),O.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),X(t,O),t.intersect=function(N){return W.polygon(t,y,N)},n}d(pg,"taggedWaveEdgedRectangle");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=Math.max(a.width+t.padding,(t==null?void 0:t.width)||0),s=Math.max(a.height+t.padding,(t==null?void 0:t.height)||0),l=-o/2,c=-s/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",s),X(t,h),t.intersect=function(u){return W.rect(t,u)},n}d(dg,"text");var nS=d((e,t,r,i,n,a)=>`M${e},${t} + a${n},${a} 0,0,1 0,${-i} + l${r},0 + a${n},${a} 0,0,1 0,${i} + M${r},${-i} + a${n},${a} 0,0,0 0,${i} + l${-r},0`,"createCylinderPathD"),aS=d((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),sS=d((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o,halfPadding:s}=await rt(e,t,it(t)),l=t.look==="neo"?s*2:s,c=a.height+l,h=c/2,u=h/(2.5+c/50),f=a.width+u+l,{cssStyles:p}=t;let g;if(t.look==="handDrawn"){const m=j.svg(n),y=aS(0,0,f,c,u,h),x=sS(0,0,f,c,u,h),b=m.path(y,U(t,{})),_=m.path(x,U(t,{fill:"none"}));g=n.insert(()=>_,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),p&&g.attr("style",p)}else{const m=nS(0,0,f,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Nt(p)).attr("style",i),g.attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${c/2} )`),o.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),X(t,g),t.intersect=function(m){const y=W.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}d(gg,"tiltedCylinder");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=a.width+t.padding,s=a.height+t.padding,l=[{x:-3*s/6,y:0},{x:o+3*s/6,y:0},{x:o,y:-s},{x:0,y:-s}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=U(t,{}),p=ot(l),g=u.path(p,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=Re(n,o,s,l);return i&&c.attr("style",i),t.width=o,t.height=s,X(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}d(mg,"trapezoid");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=60,s=20,l=Math.max(o,a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(s,a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),{cssStyles:h}=t,u=j.svg(n),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=ot(p),m=u.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),X(t,y),t.intersect=function(x){return W.polygon(t,p,x)},n}d(yg,"trapezoidalPentagon");async function xg(e,t){var b;const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=Bt((b=ct().flowchart)==null?void 0:b.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,p=j.svg(n),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ot(u),y=p.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,X(t,x),o.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(s?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(_){return $.info("Triangle intersect",t,u,_),W.polygon(t,u,_)},n}d(xg,"triangle");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=l+c,{cssStyles:u}=t,p=70-s,g=p>0?p/2:0,m=j.svg(n),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-s/2-g,y:h/2},...Ye(-s/2-g,h/2,s/2+g,h/2,c,.8),{x:s/2+g,y:-h/2},{x:-s/2-g,y:-h/2}],b=ot(x),_=m.path(b,y),v=n.insert(()=>_,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),X(t,v),t.intersect=function(k){return W.polygon(t,x,k)},n}d(bg,"waveEdgedRectangle");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await rt(e,t,it(t)),o=100,s=50,l=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,o),f=Math.max(f,s);const p=Math.min(f*.2,f/4),g=f+p*2,{cssStyles:m}=t,y=j.svg(n),x=U(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Ye(-u/2,g/2,u/2,g/2,p,1),{x:u/2,y:-g/2},...Ye(u/2,-g/2,-u/2,-g/2,p,-1)],_=ot(b),v=y.path(_,x),k=n.insert(()=>v,":first-child");return k.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),X(t,k),t.intersect=function(E){return W.polygon(t,b,E)},n}d(_g,"waveRectangle");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=Z(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:o}=await rt(e,t,it(t)),s=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=5,h=-s/2,u=-l/2,{cssStyles:f}=t,p=j.svg(n),g=U(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+s,y:u+l},{x:h+s,y:u-c}],y=`M${h-c},${u-c} L${h+s},${u-c} L${h+s},${u+l} L${h-c},${u+l} L${h-c},${u-c} + M${h-c},${u} L${h+s},${u} + M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=p.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),X(t,b),t.intersect=function(_){return W.polygon(t,m,_)},n}d(Cg,"windowPane");async function wg(e,t,r,i,n=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",it(t)).attr("id",t.domId||t.id);let s=null,l=null,c=null,h=null,u=0,f=0,p=0;if(s=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await vi(s,{text:`«${b}»`},0),u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await vi(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=o.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const _=await vi(c,b,m,[b.parseClassifier()]);m+=_+a}p=c.node().getBBox().height,p<=0&&(p=n/2),h=o.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const _=await vi(h,b,y,[b.parseClassifier()]);y+=_+a}let x=o.node().getBBox();if(s!==null){const b=s.node().getBBox();s.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+f+n*2})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(p?p+n*4:n*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}d(wg,"textHelper");async function vi(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=he();let o="useHtmlLabels"in t?t.useHtmlLabels:Bt(a.htmlLabels)??!0,s="";"text"in t?s=t.text:s=t.label,!o&&s.startsWith("\\")&&(s=s.substring(1)),qr(s)&&(o=!0);const l=await Jr(n,Ph(Qr(s)),{width:Yr(s,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],f=lt(l);h=u.innerHTML.split("
    ").length,u.innerHTML.includes("")&&(h+=u.innerHTML.split("").length-1);const p=u.getElementsByTagName("img");if(p){const g=s.replace(/]*>/g,"").trim()==="";await Promise.all([...p].map(m=>new Promise(y=>{function x(){var b;if(m.style.display="flex",m.style.flexDirection="column",g){const _=((b=a.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,k=parseInt(_,10)*5+"px";m.style.minWidth=k,m.style.maxWidth=k}else m.style.width="100%";y(m)}d(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&<(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=s[0]+s.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),s[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}d(vi,"addText");async function vg(e,t){var N,R;const r=ct(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??Bt(r.htmlLabels)??!0,o=t;o.annotations=o.annotations??[],o.members=o.members??[],o.methods=o.methods??[];const{shapeSvg:s,bbox:l}=await wg(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=Z(t);t.labelStyle=c,t.cssStyles=o.styles||"";const u=((N=o.styles)==null?void 0:N.join(";"))||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=o.members.length===0&&o.methods.length===0&&!((R=r.class)!=null&&R.hideEmptyMembersBox),p=j.svg(s),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;o.members.length===0&&o.methods.length===0?y+=n:o.members.length>0&&o.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,_=p.rectangle(x-i,b-i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:o.members.length===0&&o.methods.length===0?-i:0),g),v=s.insert(()=>_,":first-child");v.attr("class","basic label-container");const k=v.node().getBBox();s.selectAll(".text").each((B,q,I)=>{var z;const M=lt(I[q]),L=M.attr("transform");let S=0;if(L){const J=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(L);J&&(S=parseFloat(J[2]))}let F=S+b+i-(f?i:o.members.length===0&&o.methods.length===0?-i/2:0);a||(F-=4);let T=x;(M.attr("class").includes("label-group")||M.attr("class").includes("annotation-group"))&&(T=-((z=M.node())==null?void 0:z.getBBox().width)/2||0,s.selectAll("text").each(function(Y,J,pt){window.getComputedStyle(pt[J]).textAnchor==="middle"&&(T=0)})),M.attr("transform",`translate(${T}, ${F})`)});const E=s.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,A=s.select(".label-group").node().getBBox().height-(f?i/2:0)||0,O=s.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(o.members.length>0||o.methods.length>0||f){const B=p.line(k.x,E+A+b+i,k.x+k.width,E+A+b+i,g);s.insert(()=>B).attr("class","divider").attr("style",u)}if(f||o.members.length>0||o.methods.length>0){const B=p.line(k.x,E+A+O+b+n*2+i,k.x+k.width,E+A+O+b+i+n*2,g);s.insert(()=>B).attr("class","divider").attr("style",u)}if(o.look!=="handDrawn"&&s.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),s.selectAll(".divider").select("path").attr("style",u),t.labelStyle?s.selectAll("span").attr("style",t.labelStyle):s.selectAll("span").attr("style",u),!a){const B=RegExp(/color\s*:\s*([^;]*)/),q=B.exec(u);if(q){const I=q[0].replace("color","fill");s.selectAll("tspan").attr("style",I)}else if(c){const I=B.exec(c);if(I){const M=I[0].replace("color","fill");s.selectAll("tspan").attr("style",M)}}}return X(t,v),t.intersect=function(B){return W.rect(t,B)},s}d(vg,"classBox");var oS=d(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function kg(e,t,{config:r}){var q,I;const{labelStyles:i,nodeStyles:n}=Z(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await rt(e,t,it(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&((q=r==null?void 0:r.kanban)!=null&&q.ticketBaseUrl)&&(u=(I=r==null?void 0:r.kanban)==null?void 0:I.ticketBaseUrl.replace("#TICKET#",t.ticket),f=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await ps(f,"ticket"in t&&t.ticket||"",p):{label:g,bbox:m}=await ps(s,"ticket"in t&&t.ticket||"",p);const{label:y,bbox:x}=await ps(s,"assigned"in t&&t.assigned||"",p);t.width=o;const b=10,_=(t==null?void 0:t.width)||0,v=Math.max(m.height,x.height)/2,k=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+v,E=-_/2,A=-k/2;c.attr("transform","translate("+(h-_/2)+", "+(-v-l.height/2)+")"),g.attr("transform","translate("+(h-_/2)+", "+(-v+l.height/2)+")"),y.attr("transform","translate("+(h+_/2-x.width-2*a)+", "+(-v+l.height/2)+")");let O;const{rx:N,ry:R}=t,{cssStyles:B}=t;if(t.look==="handDrawn"){const M=j.svg(s),L=U(t,{}),S=N||R?M.path(De(E,A,_,k,N||0),L):M.rectangle(E,A,_,k,L);O=s.insert(()=>S,":first-child"),O.attr("class","basic label-container").attr("style",B||null)}else{O=s.insert("rect",":first-child"),O.attr("class","basic label-container __APA__").attr("style",n).attr("rx",N??5).attr("ry",R??5).attr("x",E).attr("y",A).attr("width",_).attr("height",k);const M="priority"in t&&t.priority;if(M){const L=s.append("line"),S=E+2,F=A+Math.floor((N??0)/2),T=A+k-Math.floor((N??0)/2);L.attr("x1",S).attr("y1",F).attr("x2",S).attr("y2",T).attr("stroke-width","4").attr("stroke",oS(M))}}return X(t,O),t.height=k,t.intersect=function(M){return W.rect(t,M)},s}d(kg,"kanbanItem");var lS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:sg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ig},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:og},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ug},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Md},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:vd},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:tg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Id},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Gd},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Yd},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:mg},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:jd},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Fd},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:dg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Cd},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:ng},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:hg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:cg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Rd},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Pd},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Td},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Ad},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Ld},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Vd},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:bg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Od},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:gg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Xd},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Bd},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ed},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:xg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Cg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:$d},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:yg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Dd},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:ag},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Qd},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Kd},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:_d},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Sd},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:pg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:fg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:_g},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:eg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Zd}],cS=d(()=>{const t=[...Object.entries({state:lg,choice:wd,note:Jd,rectWithTitle:rg,labelRect:Ud,iconSquare:Wd,iconCircle:zd,icon:Nd,iconRounded:qd,imageSquare:Hd,anchor:bd,kanbanItem:kg,classBox:vg}),...lS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Sg=cS();function hS(e){return e in Sg}d(hS,"isValidShape");var Pa=new Map;async function Tg(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Sg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),Pa.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}d(Tg,"insertNode");var fB=d((e,t)=>{Pa.set(t.id,e)},"setNodeElem"),pB=d(()=>{Pa.clear()},"clear"),dB=d(e=>{const t=Pa.get(e.id);$.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),te={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function ki(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=yt(e),t=yt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],o=n-r,s=a-i;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}d(ki,"calculateDeltaAndAngle");var yt=d(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),uS=d(e=>({x:d(function(t,r,i){let n=0;const a=yt(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(te,e.arrowTypeEnd)){const{angle:p,deltaX:g}=ki(i[i.length-1],i[i.length-2]);n=te[e.arrowTypeEnd]*Math.cos(p)*(g>=0?1:-1)}const o=Math.abs(yt(t).x-yt(i[i.length-1]).x),s=Math.abs(yt(t).y-yt(i[i.length-1]).y),l=Math.abs(yt(t).x-yt(i[0]).x),c=Math.abs(yt(t).y-yt(i[0]).y),h=te[e.arrowTypeStart],u=te[e.arrowTypeEnd],f=1;if(o0&&s0&&c=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(te,e.arrowTypeEnd)){const{angle:p,deltaY:g}=ki(i[i.length-1],i[i.length-2]);n=te[e.arrowTypeEnd]*Math.abs(Math.sin(p))*(g>=0?1:-1)}const o=Math.abs(yt(t).y-yt(i[i.length-1]).y),s=Math.abs(yt(t).x-yt(i[i.length-1]).x),l=Math.abs(yt(t).y-yt(i[0]).y),c=Math.abs(yt(t).x-yt(i[0]).x),h=te[e.arrowTypeStart],u=te[e.arrowTypeEnd],f=1;if(o0&&s0&&c{t.arrowTypeStart&&Vc(e,"start",t.arrowTypeStart,r,i,n),t.arrowTypeEnd&&Vc(e,"end",t.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),pS={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Vc=d((e,t,r,i,n,a)=>{const o=pS[r];if(!o){$.warn(`Unknown arrow type: ${r}`);return}const s=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${n}_${a}-${o}${s})`)},"addEdgeMarker"),fa=new Map,At=new Map,gB=d(()=>{fa.clear(),At.clear()},"clear"),xi=d(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),dS=d(async(e,t)=>{let r=Bt(ct().flowchart.htmlLabels);const i=await Jr(e,t.label,{style:xi(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});$.info("abc82",t,t.labelType);const n=e.insert("g").attr("class","edgeLabel"),a=n.insert("g").attr("class","label");a.node().appendChild(i);let o=i.getBBox();if(r){const l=i.children[0],c=lt(i);o=l.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),fa.set(t.id,n),t.width=o.width,t.height=o.height;let s;if(t.startLabelLeft){const l=await nr(t.startLabelLeft,xi(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),At.get(t.id)||At.set(t.id,{}),At.get(t.id).startLeft=c,Si(s,t.startLabelLeft)}if(t.startLabelRight){const l=await nr(t.startLabelRight,xi(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=c.node().appendChild(l),h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),At.get(t.id)||At.set(t.id,{}),At.get(t.id).startRight=c,Si(s,t.startLabelRight)}if(t.endLabelLeft){const l=await nr(t.endLabelLeft,xi(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),At.get(t.id)||At.set(t.id,{}),At.get(t.id).endLeft=c,Si(s,t.endLabelLeft)}if(t.endLabelRight){const l=await nr(t.endLabelRight,xi(t.labelStyle)),c=e.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");s=h.node().appendChild(l);const u=l.getBBox();h.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.node().appendChild(l),At.get(t.id)||At.set(t.id,{}),At.get(t.id).endRight=c,Si(s,t.endLabelRight)}return i},"insertEdgeLabel");function Si(e,t){ct().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(Si,"setTerminalWidth");var gS=d((e,t)=>{$.debug("Moving label abc88 ",e.id,e.label,fa.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ct(),{subGraphTitleTotalMargin:n}=Ao(i);if(e.label){const a=fa.get(e.id);let o=e.x,s=e.y;if(r){const l=ge.calcLabelPosition(r);$.debug("Moving label "+e.label+" from (",o,",",s,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,s=l.y)}a.attr("transform",`translate(${o}, ${s+n/2})`)}if(e.startLabelLeft){const a=At.get(e.id).startLeft;let o=e.x,s=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.startLabelRight){const a=At.get(e.id).startRight;let o=e.x,s=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelLeft){const a=At.get(e.id).endLeft;let o=e.x,s=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}if(e.endLabelRight){const a=At.get(e.id).endRight;let o=e.x,s=e.y;if(r){const l=ge.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,s=l.y}a.attr("transform",`translate(${o}, ${s})`)}},"positionEdgeLabel"),mS=d((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,s=e.height/2;return n>=o||a>=s},"outsideNode"),yS=d((e,t,r)=>{$.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),o=e.width/2;let s=r.xMath.abs(i-t.x)*l){let u=r.y{$.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if($.info("abc88 checking point",a,t),!mS(t,a)&&!n){const o=yS(t,i,a);$.debug("abc88 inside",a,i,o),$.debug("abc88 intersection",o,t);let s=!1;r.forEach(l=>{s=s||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?$.warn("abc88 no intersect",o,r):r.push(o),n=!0}else $.warn("abc88 outside",a,i),i=a,n||r.push(a)}),$.debug("returning points",r),r},"cutPathAtIntersect");function Ag(e){const t=[],r=[];for(let i=1;i5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}d(Ag,"extractCornerPoints");var Zc=d(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),o=r/a;return{x:t.x-o*i,y:t.y-o*n}},"findAdjacentPoint"),xS=d(function(e){const{cornerPointPositions:t}=Ag(e),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10){$.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const p=5;o.x===s.x?f={x:c<0?s.x-p+u:s.x+p-u,y:h<0?s.y-u:s.y+u}:f={x:c<0?s.x-u:s.x+u,y:h<0?s.y-p+u:s.y+p-u}}else $.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),bS=d(function(e,t,r,i,n,a,o){const{handDrawnSeed:s}=ct();let l=t.points,c=!1;const h=n;var u=a;u.intersect&&h.intersect&&(l=l.slice(1,t.points.length-1),l.unshift(h.intersect(l[0])),$.debug("Last point APA12",t.start,"-->",t.end,l[l.length-1],u,u.intersect(l[l.length-1])),l.push(u.intersect(l[l.length-1]))),t.toCluster&&($.info("to cluster abc88",r.get(t.toCluster)),l=Xc(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&($.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(l,null,2)),l=Xc(l.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let f=l.filter(A=>!Number.isNaN(A.y));f=xS(f);let p=ep;t.curve&&(p=t.curve);const{x:g,y:m}=uS(t),y=T2().x(g).y(m).curve(p);let x;switch(t.thickness){case"normal":x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible";break;default:x="edge-thickness-normal"}switch(t.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed";break;default:x+=" edge-pattern-solid"}let b,_=y(f);const v=Array.isArray(t.style)?t.style:[t.style];if(t.look==="handDrawn"){const A=j.svg(e);Object.assign([],f);const O=A.path(_,{roughness:.3,seed:s});x+=" transition",b=lt(O).select("path").attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")).attr("style",v?v.reduce((R,B)=>R+";"+B,""):"");let N=b.attr("d");b.attr("d",N),e.node().appendChild(b.node())}else b=e.append("path").attr("d",_).attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")).attr("style",v?v.reduce((A,O)=>A+";"+O,""):"");let k="";(ct().flowchart.arrowMarkerAbsolute||ct().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),$.info("arrowTypeStart",t.arrowTypeStart),$.info("arrowTypeEnd",t.arrowTypeEnd),fS(b,t,k,o,i);let E={};return c&&(E.updatedPath=l),E.originalPath=t.points,E},"insertEdge"),_S=d((e,t,r,i)=>{t.forEach(n=>{MS[n](e,r,i)})},"insertMarkers"),CS=d((e,t,r)=>{$.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),wS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),vS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),kS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),SS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),TS=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),AS=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),LS=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),BS=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),MS={extension:CS,composition:wS,aggregation:vS,dependency:kS,lollipop:SS,point:TS,circle:AS,cross:LS,barb:BS},ES=_S,FS={common:Xr,getConfig:he,insertCluster:Uk,insertEdge:bS,insertEdgeLabel:dS,insertMarkers:ES,insertNode:Tg,interpolateToCurve:Uo,labelHelper:rt,log:$,positionEdgeLabel:gS},Hi={},Lg=d(e=>{for(const t of e)Hi[t.name]=t},"registerLayoutLoaders"),$S=d(()=>{Lg([{name:"dagre",loader:d(async()=>await ft(()=>import("./chunks/dagre-4EVJKHTY.C19Cb-p5.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")}])},"registerDefaultLayoutLoaders");$S();var mB=d(async(e,t)=>{if(!(e.layoutAlgorithm in Hi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Hi[e.layoutAlgorithm];return(await r.loader()).render(e,t,FS,{algorithm:r.algorithm})},"render"),yB=d((e="",{fallback:t="dagre"}={})=>{if(e in Hi)return e;if(t in Hi)return $.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Kc="11.4.1",DS=d(e=>{var n;const{securityLevel:t}=ct();let r=lt("body");if(t==="sandbox"){const o=((n=lt(`#i${e}`).node())==null?void 0:n.contentDocument)??document;r=lt(o.body)}return r.select(`#${e}`)},"selectSvgElement"),Bg="comm",Mg="rule",Eg="decl",RS="@import",OS="@keyframes",IS="@layer",Fg=Math.abs,ll=String.fromCharCode;function $g(e){return e.trim()}function En(e,t,r){return e.replace(t,r)}function PS(e,t,r){return e.indexOf(t,r)}function ji(e,t){return e.charCodeAt(t)|0}function Gr(e,t,r){return e.slice(t,r)}function de(e){return e.length}function NS(e){return e.length}function _n(e,t){return t.push(e),e}var Na=1,Vr=1,Dg=0,re=0,bt=0,ri="";function cl(e,t,r,i,n,a,o,s){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:Na,column:Vr,length:o,return:"",siblings:s}}function zS(){return bt}function qS(){return bt=re>0?ji(ri,--re):0,Vr--,bt===10&&(Vr=1,Na--),bt}function ce(){return bt=re2||Ui(bt)>3?"":" "}function US(e,t){for(;--t&&ce()&&!(bt<48||bt>102||bt>57&&bt<65||bt>70&&bt<97););return za(e,Fn()+(t<6&&qe()==32&&ce()==32))}function no(e){for(;ce();)switch(bt){case e:return re;case 34:case 39:e!==34&&e!==39&&no(bt);break;case 40:e===41&&no(e);break;case 92:ce();break}return re}function YS(e,t){for(;ce()&&e+bt!==57;)if(e+bt===84&&qe()===47)break;return"/*"+za(t,re-1)+"*"+ll(e===47?e:ce())}function GS(e){for(;!Ui(qe());)ce();return za(e,re)}function VS(e){return HS($n("",null,null,null,[""],e=WS(e),0,[0],e))}function $n(e,t,r,i,n,a,o,s,l){for(var c=0,h=0,u=o,f=0,p=0,g=0,m=1,y=1,x=1,b=0,_="",v=n,k=a,E=i,A=_;y;)switch(g=b,b=ce()){case 40:if(g!=108&&ji(A,u-1)==58){PS(A+=En(ds(b),"&","&\f"),"&\f",Fg(c?s[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:A+=ds(b);break;case 9:case 10:case 13:case 32:A+=jS(g);break;case 92:A+=US(Fn()-1,7);continue;case 47:switch(qe()){case 42:case 47:_n(XS(YS(ce(),Fn()),t,r,l),l),(Ui(g||1)==5||Ui(qe()||1)==5)&&de(A)&&Gr(A,-1,void 0)!==" "&&(A+=" ");break;default:A+="/"}break;case 123*m:s[c++]=de(A)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(A=En(A,/\f/g,"")),p>0&&(de(A)-u||m===0&&g===47)&&_n(p>32?Jc(A+";",i,r,u-1,l):Jc(En(A," ","")+";",i,r,u-2,l),l);break;case 59:A+=";";default:if(_n(E=Qc(A,t,r,c,h,n,s,_,v=[],k=[],u,a),a),b===123)if(h===0)$n(A,t,E,E,v,a,u,s,k);else switch(f===99&&ji(A,3)===110?100:f){case 100:case 108:case 109:case 115:$n(e,E,E,i&&_n(Qc(e,E,E,0,0,n,s,_,n,v=[],u,k),k),n,k,u,s,i?v:k);break;default:$n(A,E,E,E,[""],k,0,s,k)}}c=h=p=0,m=x=1,_=A="",u=o;break;case 58:u=1+de(A),p=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&qS()==125)continue}switch(A+=ll(b),b*m){case 38:x=h>0?1:(A+="\f",-1);break;case 44:s[c++]=(de(A)-1)*x,x=1;break;case 64:qe()===45&&(A+=ds(ce())),f=qe(),h=u=de(_=A+=GS(Fn())),b++;break;case 45:g===45&&de(A)==2&&(m=0)}}return a}function Qc(e,t,r,i,n,a,o,s,l,c,h,u){for(var f=n-1,p=n===0?a:[""],g=NS(p),m=0,y=0,x=0;m0?p[b]+" "+_:En(_,/&\f/g,p[b])))&&(l[x++]=v);return cl(e,t,r,n===0?Mg:s,l,c,h,u)}function XS(e,t,r,i){return cl(e,t,r,Bg,ll(zS()),Gr(e,2,-2),0,i)}function Jc(e,t,r,i,n){return cl(e,t,r,Eg,Gr(e,0,i),Gr(e,i+1,-1),i,n)}function ao(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),fT=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/c4Diagram-6F5ED5ID.B8JqF2R5.js");return{diagram:t}},__vite__mapDeps([8,9,6,7]));return{id:Rg,diagram:e}},"loader"),pT={id:Rg,detector:uT,loader:fT},dT=pT,Og="flowchart",gT=d((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),mT=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/flowDiagram-7ASYPVHJ.DBrKMec-.js");return{diagram:t}},__vite__mapDeps([10,11,12,6,7]));return{id:Og,diagram:e}},"loader"),yT={id:Og,detector:gT,loader:mT},xT=yT,Ig="flowchart-v2",bT=d((e,t)=>{var r,i,n;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((n=t==null?void 0:t.flowchart)==null?void 0:n.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),_T=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/flowDiagram-7ASYPVHJ.DBrKMec-.js");return{diagram:t}},__vite__mapDeps([10,11,12,6,7]));return{id:Ig,diagram:e}},"loader"),CT={id:Ig,detector:bT,loader:_T},wT=CT,Pg="er",vT=d(e=>/^\s*erDiagram/.test(e),"detector"),kT=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/erDiagram-6RL3IURR.BSCe9PhQ.js");return{diagram:t}},__vite__mapDeps([13,1,2,3,4,6,7]));return{id:Pg,diagram:e}},"loader"),ST={id:Pg,detector:vT,loader:kT},TT=ST,Ng="gitGraph",AT=d(e=>/^\s*gitGraph/.test(e),"detector"),LT=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/gitGraphDiagram-NRZ2UAAF.DYBJyTXa.js");return{diagram:t}},__vite__mapDeps([14,15,16,17,6,2,4,5,7]));return{id:Ng,diagram:e}},"loader"),BT={id:Ng,detector:AT,loader:LT},MT=BT,zg="gantt",ET=d(e=>/^\s*gantt/.test(e),"detector"),FT=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/ganttDiagram-NTVNEXSI.C7LBLS21.js");return{diagram:t}},__vite__mapDeps([18,19,20,6,7]));return{id:zg,diagram:e}},"loader"),$T={id:zg,detector:ET,loader:FT},DT=$T,qg="info",RT=d(e=>/^\s*info/.test(e),"detector"),OT=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/infoDiagram-A4XQUW5V.q7RyalY3.js");return{diagram:t}},__vite__mapDeps([21,17,6,2,4,5,7]));return{id:qg,diagram:e}},"loader"),IT={id:qg,detector:RT,loader:OT},Wg="pie",PT=d(e=>/^\s*pie/.test(e),"detector"),NT=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/pieDiagram-YF2LJOPJ.CGhsgUnJ.js");return{diagram:t}},__vite__mapDeps([22,15,17,6,2,4,5,23,24,20,7]));return{id:Wg,diagram:e}},"loader"),zT={id:Wg,detector:PT,loader:NT},Hg="quadrantChart",qT=d(e=>/^\s*quadrantChart/.test(e),"detector"),WT=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/quadrantDiagram-OS5C2QUG.DzULb5bu.js");return{diagram:t}},__vite__mapDeps([25,19,20,6,7]));return{id:Hg,diagram:e}},"loader"),HT={id:Hg,detector:qT,loader:WT},jT=HT,jg="xychart",UT=d(e=>/^\s*xychart-beta/.test(e),"detector"),YT=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/xychartDiagram-6QU3TZC5.BLrMmmG-.js");return{diagram:t}},__vite__mapDeps([26,20,24,19,6,7]));return{id:jg,diagram:e}},"loader"),GT={id:jg,detector:UT,loader:YT},VT=GT,Ug="requirement",XT=d(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),ZT=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/requirementDiagram-MIRIMTAZ.DZI_fJYT.js");return{diagram:t}},__vite__mapDeps([27,1,2,3,4,6,7]));return{id:Ug,diagram:e}},"loader"),KT={id:Ug,detector:XT,loader:ZT},QT=KT,Yg="sequence",JT=d(e=>/^\s*sequenceDiagram/.test(e),"detector"),tA=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/sequenceDiagram-G6AWOVSC.BR6TLOJa.js");return{diagram:t}},__vite__mapDeps([28,9,16,6,7]));return{id:Yg,diagram:e}},"loader"),eA={id:Yg,detector:JT,loader:tA},rA=eA,Gg="class",iA=d((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),nA=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/classDiagram-LNE6IOMH.DdJyZtDn.js");return{diagram:t}},__vite__mapDeps([29,30,11,6,7]));return{id:Gg,diagram:e}},"loader"),aA={id:Gg,detector:iA,loader:nA},sA=aA,Vg="classDiagram",oA=d((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),lA=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/classDiagram-v2-MQ7JQ4JX.DdJyZtDn.js");return{diagram:t}},__vite__mapDeps([31,30,11,6,7]));return{id:Vg,diagram:e}},"loader"),cA={id:Vg,detector:oA,loader:lA},hA=cA,Xg="state",uA=d((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),fA=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/stateDiagram-MAYHULR4.ClYhRmpy.js");return{diagram:t}},__vite__mapDeps([32,33,11,1,2,3,4,6,7]));return{id:Xg,diagram:e}},"loader"),pA={id:Xg,detector:uA,loader:fA},dA=pA,Zg="stateDiagram",gA=d((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),mA=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/stateDiagram-v2-4JROLMXI.B4BlUuF9.js");return{diagram:t}},__vite__mapDeps([34,33,11,6,7]));return{id:Zg,diagram:e}},"loader"),yA={id:Zg,detector:gA,loader:mA},xA=yA,Kg="journey",bA=d(e=>/^\s*journey/.test(e),"detector"),_A=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/journeyDiagram-G5WM74LC.D8z_SedJ.js");return{diagram:t}},__vite__mapDeps([35,9,23,6,7]));return{id:Kg,diagram:e}},"loader"),CA={id:Kg,detector:bA,loader:_A},wA=CA,vA=d((e,t,r)=>{$.debug(`rendering svg for syntax error +`);const i=DS(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Oh(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Qg={draw:vA},kA=Qg,SA={db:{},renderer:Qg,parser:{parse:d(()=>{},"parse")}},TA=SA,Jg="flowchart-elk",AA=d((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*flowchart|graph/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),LA=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/flowDiagram-7ASYPVHJ.DBrKMec-.js");return{diagram:t}},__vite__mapDeps([10,11,12,6,7]));return{id:Jg,diagram:e}},"loader"),BA={id:Jg,detector:AA,loader:LA},MA=BA,tm="timeline",EA=d(e=>/^\s*timeline/.test(e),"detector"),FA=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/timeline-definition-U7ZMHBDA.CdHHaiF9.js");return{diagram:t}},__vite__mapDeps([36,23,6,7]));return{id:tm,diagram:e}},"loader"),$A={id:tm,detector:EA,loader:FA},DA=$A,em="mindmap",RA=d(e=>/^\s*mindmap/.test(e),"detector"),OA=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/mindmap-definition-GWI6TPTV.D8wY2Trv.js");return{diagram:t}},__vite__mapDeps([37,38,6,7]));return{id:em,diagram:e}},"loader"),IA={id:em,detector:RA,loader:OA},PA=IA,rm="kanban",NA=d(e=>/^\s*kanban/.test(e),"detector"),zA=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/kanban-definition-QRCXZQQD.DPLJJDkx.js");return{diagram:t}},__vite__mapDeps([39,6,7]));return{id:rm,diagram:e}},"loader"),qA={id:rm,detector:NA,loader:zA},WA=qA,im="sankey",HA=d(e=>/^\s*sankey-beta/.test(e),"detector"),jA=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/sankeyDiagram-Y46BX6SQ.Dd6zI_qa.js");return{diagram:t}},__vite__mapDeps([40,24,20,6,7]));return{id:im,diagram:e}},"loader"),UA={id:im,detector:HA,loader:jA},YA=UA,nm="packet",GA=d(e=>/^\s*packet-beta/.test(e),"detector"),VA=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/diagram-QW4FP2JN.DmeRA8RG.js");return{diagram:t}},__vite__mapDeps([41,15,17,6,2,4,5,7]));return{id:nm,diagram:e}},"loader"),XA={id:nm,detector:GA,loader:VA},am="block",ZA=d(e=>/^\s*block-beta/.test(e),"detector"),KA=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/blockDiagram-ZHA2E4KO.Bp233VSp.js");return{diagram:t}},__vite__mapDeps([42,5,2,1,12,6,7]));return{id:am,diagram:e}},"loader"),QA={id:am,detector:ZA,loader:KA},JA=QA,sm="architecture",tL=d(e=>/^\s*architecture/.test(e),"detector"),eL=d(async()=>{const{diagram:e}=await ft(async()=>{const{diagram:t}=await import("./chunks/architectureDiagram-UYN6MBPD.qBPd9-2Q.js");return{diagram:t}},__vite__mapDeps([43,15,16,17,6,2,4,5,38,7]));return{id:sm,diagram:e}},"loader"),rL={id:sm,detector:tL,loader:eL},iL=rL,sh=!1,qa=d(()=>{sh||(sh=!0,In("error",TA,e=>e.toLowerCase().trim()==="error"),In("---",{db:{clear:d(()=>{},"clear")},styles:{},renderer:{draw:d(()=>{},"draw")},parser:{parse:d(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:d(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),vh(dT,WA,hA,sA,TT,DT,IT,zT,QT,rA,MA,wT,xT,PA,DA,MT,xA,dA,wA,jT,YA,XA,VT,JA,iL))},"addDiagrams"),nL=d(async()=>{$.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Pr).map(async([r,{detector:i,loader:n}])=>{if(n)try{ws(r)}catch{try{const{diagram:a,id:o}=await n();In(o,a,i)}catch(a){throw $.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Pr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){$.error(`Failed to load ${t.length} external diagrams`);for(const r of t)$.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),aL="graphics-document document";function om(e,t){e.attr("role",aL),t!==""&&e.attr("aria-roledescription",t)}d(om,"setA11yDiagramInfo");function lm(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}d(lm,"addSVGa11yTitleDescription");var sr,ho=(sr=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){var c,h;const i=he(),n=po(t,i);t=Ov(t)+` +`;try{ws(n)}catch{const u=F0(n);if(!u)throw new wh(`Diagram ${n} not found.`);const{id:f,diagram:p}=await u();In(f,p)}const{db:a,parser:o,renderer:s,init:l}=ws(n);return o.parser&&(o.parser.yy=a),(c=a.clear)==null||c.call(a),l==null||l(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(t),new sr(n,t,a,o,s)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},d(sr,"Diagram"),sr),oh=[],sL=d(()=>{oh.forEach(e=>{e()}),oh=[]},"attachFunctions"),oL=d(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function cm(e){const t=e.match(Ch);if(!t)return{text:e,metadata:{}};let r=Ex(t[1],{schema:Mx})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}d(cm,"extractFrontMatter");var lL=d(e=>e.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),cL=d(e=>{const{text:t,metadata:r}=cm(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),hL=d(e=>{const t=ge.detectInit(e)??{},r=ge.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:vv(e),directive:t}},"processDirectives");function hl(e){const t=lL(e),r=cL(t),i=hL(r.text),n=Zo(r.config,i.directive);return e=oL(i.text),{code:e,title:r.title,config:n}}d(hl,"preprocessDiagram");function hm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}d(hm,"toBase64");var uL=5e4,fL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",pL="sandbox",dL="loose",gL="http://www.w3.org/2000/svg",mL="http://www.w3.org/1999/xlink",yL="http://www.w3.org/1999/xhtml",xL="100%",bL="100%",_L="border:0;margin:0;",CL="margin:0",wL="allow-top-navigation-by-user-activation allow-popups",vL='The "iframe" tag is not supported by your browser.',kL=["foreignobject"],SL=["dominant-baseline"];function ul(e){const t=hl(e);return Rn(),V0(t.config??{}),t}d(ul,"processAndSetConfigs");async function um(e,t){qa();try{const{code:r,config:i}=ul(e);return{diagramType:(await pm(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}d(um,"parse");var lh=d((e,t,r=[])=>` +.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),TL=d((e,t=new Map)=>{var i;let r="";if(e.themeCSS!==void 0&&(r+=` +${e.themeCSS}`),e.fontFamily!==void 0&&(r+=` +:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=` +:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??((i=e.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{ah(l.styles)||s.forEach(c=>{r+=lh(l.id,c,l.styles)}),ah(l.textStyles)||(r+=lh(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))))})}return r},"createCssStyles"),AL=d((e,t,r,i)=>{const n=TL(e,r),a=py(t,n,e.themeVariables);return ao(VS(`${i}{${a}}`),ZS)},"createUserStyles"),LL=d((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Qr(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),BL=d((e="",t)=>{var n,a;const r=(a=(n=t==null?void 0:t.viewBox)==null?void 0:n.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":bL,i=hm(`${e}`);return``},"putIntoIFrame"),ch=d((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",gL);return n&&o.attr("xmlns:xlink",n),o.append("g"),e},"appendDivSvgG");function uo(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}d(uo,"sandboxedIframe");var ML=d((e,t,r,i)=>{var n,a,o;(n=e.getElementById(t))==null||n.remove(),(a=e.getElementById(r))==null||a.remove(),(o=e.getElementById(i))==null||o.remove()},"removeExistingElements"),EL=d(async function(e,t,r){var q,I,M,L,S,F;qa();const i=ul(t);t=i.code;const n=he();$.debug(n),t.length>((n==null?void 0:n.maxTextSize)??uL)&&(t=fL);const a="#"+e,o="i"+e,s="#"+o,l="d"+e,c="#"+l,h=d(()=>{const z=lt(f?s:c).node();z&&"remove"in z&&z.remove()},"removeTempElements");let u=lt("body");const f=n.securityLevel===pL,p=n.securityLevel===dL,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const T=uo(lt(r),o);u=lt(T.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt(r);ch(u,e,l,`font-family: ${g}`,mL)}else{if(ML(document,e,l,o),f){const T=uo(lt("body"),o);u=lt(T.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt("body");ch(u,e,l)}let m,y;try{m=await ho.fromText(t,{title:i.title})}catch(T){if(n.suppressErrorRendering)throw h(),T;m=await ho.fromText("error"),y=T}const x=u.select(c).node(),b=m.type,_=x.firstChild,v=_.firstChild,k=(I=(q=m.renderer).getClasses)==null?void 0:I.call(q,t,m),E=AL(n,b,k,a),A=document.createElement("style");A.innerHTML=E,_.insertBefore(A,v);try{await m.renderer.draw(t,e,Kc,m)}catch(T){throw n.suppressErrorRendering?h():kA.draw(t,e,Kc),T}const O=u.select(`${c} svg`),N=(L=(M=m.db).getAccTitle)==null?void 0:L.call(M),R=(F=(S=m.db).getAccDescription)==null?void 0:F.call(S);dm(b,O,N,R),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",yL);let B=u.select(c).node().innerHTML;if($.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),B=LL(B,f,Bt(n.arrowMarkerAbsolute)),f){const T=u.select(c+" svg").node();B=BL(B,T)}else p||(B=Ir.sanitize(B,{ADD_TAGS:kL,ADD_ATTR:SL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(sL(),y)throw y;return h(),{diagramType:b,svg:B,bindFunctions:m.db.bindFunctions}},"render");function fm(e={}){var i;const t=Lt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Y0(t),t!=null&&t.theme&&t.theme in Be?t.themeVariables=Be[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Be.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?U0(t):Bh();fo(r.logLevel),qa()}d(fm,"initialize");var pm=d((e,t={})=>{const{code:r}=hl(e);return ho.fromText(r,t)},"getDiagramFromText");function dm(e,t,r,i){om(t,e),lm(t,r,i,t.attr("id"))}d(dm,"addA11yInfo");var fr=Object.freeze({render:EL,parse:um,getDiagramFromText:pm,initialize:fm,getConfig:he,setConfig:Mh,getSiteConfig:Bh,updateSiteConfig:G0,reset:d(()=>{Rn()},"reset"),globalReset:d(()=>{Rn(Nr)},"globalReset"),defaultConfig:Nr});fo(he().logLevel);Rn(he());var FL=d((e,t,r)=>{$.warn(e),Xo(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),gm=d(async function(e={querySelector:".mermaid"}){try{await $L(e)}catch(t){if(Xo(t)&&$.error(t.str),Vt.parseError&&Vt.parseError(t),!e.suppressErrors)throw $.error("Use the suppressErrors option to suppress these errors"),t}},"run"),$L=d(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=fr.getConfig();$.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");$.debug(`Found ${n.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&($.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),fr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new ge.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const l of Array.from(n)){if($.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;o=l.innerHTML,o=Yp(ge.entityDecode(o)).trim().replace(//gi,"
    ");const h=ge.detectInit(o);h&&$.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await bm(c,o,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){FL(u,s,Vt.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),mm=d(function(e){fr.initialize(e)},"initialize"),DL=d(async function(e,t,r){$.warn("mermaid.init is deprecated. Please use run instead."),e&&mm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await gm(i)},"init"),RL=d(async(e,{lazyLoad:t=!0}={})=>{qa(),vh(...e),t===!1&&await nL()},"registerExternalDiagrams"),ym=d(function(){if(Vt.startOnLoad){const{startOnLoad:e}=fr.getConfig();e&&Vt.run().catch(t=>$.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",ym,!1);var OL=d(function(e){Vt.parseError=e},"setParseErrorHandler"),pa=[],gs=!1,xm=d(async()=>{if(!gs){for(gs=!0;pa.length>0;){const e=pa.shift();if(e)try{await e()}catch(t){$.error("Error executing queue",t)}}gs=!1}},"executeQueue"),IL=d(async(e,t)=>new Promise((r,i)=>{const n=d(()=>new Promise((a,o)=>{fr.parse(e,t).then(s=>{a(s),r(s)},s=>{var l;$.error("Error parsing",s),(l=Vt.parseError)==null||l.call(Vt,s),o(s),i(s)})}),"performCall");pa.push(n),xm().catch(i)}),"parse"),bm=d((e,t,r)=>new Promise((i,n)=>{const a=d(()=>new Promise((o,s)=>{fr.render(e,t,r).then(l=>{o(l),i(l)},l=>{var c;$.error("Error parsing",l),(c=Vt.parseError)==null||c.call(Vt,l),s(l),n(l)})}),"performCall");pa.push(a),xm().catch(n)}),"render"),Vt={startOnLoad:!0,mermaidAPI:fr,parse:IL,render:bm,init:DL,run:gm,registerExternalDiagrams:RL,registerLayoutLoaders:Lg,initialize:mm,parseError:void 0,contentLoaded:ym,setParseErrorHandler:OL,detectType:po,registerIconPacks:Jx},da=Vt;/*! Check if previously processed *//*! + * Wait for document loaded before starting the execution + */const PL=async e=>{try{da.registerExternalDiagrams&&await da.registerExternalDiagrams(e)}catch(t){console.error(t)}},NL=async(e,t,r)=>{da.initialize(r);const{svg:i}=await da.render(e,t);return i},zL=["innerHTML"],qL={__name:"Mermaid",props:{graph:{type:String,required:!0},id:{type:String,required:!0},class:{type:String,required:!1,default:"mermaid"}},setup(e){const t=Fl({securityLevel:"loose",startOnLoad:!1,externalDiagrams:[]}),{page:r}=hh(),{frontmatter:i}=Fm(r.value),n=i.mermaidTheme||"",a=e,o=Fl(null);let s=null;uh(async()=>{var u;await PL(t.value.externalDiagrams);let c=await ft(()=>import("./chunks/virtual_mermaid-config.DDnGl6nM.js"),[]);c!=null&&c.default&&(t.value=c.default),s=new MutationObserver(async()=>await l()),s.observe(document.documentElement,{attributes:!0}),await l(),((u=//.exec(decodeURIComponent(a.graph)))==null?void 0:u.length)>0&&setTimeout(()=>{let f=document.getElementsByTagName("img"),p=Array.from(f);p.length&&Promise.all(p.filter(g=>!g.complete).map(g=>new Promise(m=>{g.onload=g.onerror=m}))).then(async()=>{await l()})},100)}),$m(()=>s.disconnect());const l=async()=>{const c=document.documentElement.classList.contains("dark");let h={...t.value};n&&(h.theme=n),c&&(h.theme="dark");let u=await NL(a.id,decodeURIComponent(a.graph),h);const f=Math.random().toString(36).substring(7);o.value=`${u} ${f}`};return(c,h)=>(Dm(),Rm("div",{innerHTML:o.value,class:Om(a.class)},null,10,zL))}};function _m(e){if(e.extends){const t=_m(e.extends);return{...t,...e,async enhanceApp(r){t.enhanceApp&&await t.enhanceApp(r),e.enhanceApp&&await e.enhanceApp(r)}}}return e}const Lr=_m(Jm),WL=Gm({name:"VitePressApp",setup(){const{site:e,lang:t,dir:r}=hh();return uh(()=>{Vm(()=>{document.documentElement.lang=t.value,document.documentElement.dir=r.value})}),e.value.router.prefetchLinks&&Xm(),Zm(),Km(),Lr.setup&&Lr.setup(),()=>Qm(Lr.Layout)}});async function HL(){globalThis.__VITEPRESS__=!0;const e=UL(),t=jL();t.provide(Pm,e);const r=Nm(e.route);return t.provide(zm,r),t.component("Mermaid",qL),t.component("Content",qm),t.component("ClientOnly",Wm),Object.defineProperties(t.config.globalProperties,{$frontmatter:{get(){return r.frontmatter.value}},$params:{get(){return r.page.value.params}}}),Lr.enhanceApp&&await Lr.enhanceApp({app:t,router:e,siteData:Hm}),{app:t,router:e,data:r}}function jL(){return jm(WL)}function UL(){let e=ms,t;return Um(r=>{let i=Ym(r),n=null;return i&&(e&&(t=i),(e||t===i)&&(i=i.replace(/\.js$/,".lean.js")),n=import(i)),ms&&(e=!1),n},Lr.NotFound)}ms&&HL().then(({app:e,router:t,data:r})=>{t.go().then(()=>{Im(t.route,r.site),e.mount("#app")})});export{iB as $,mB as A,Ai as B,be as C,Ah as D,Zo as E,he as F,Lv as G,wy as H,DS as I,Mx as J,Kc as K,w2 as L,gc as M,dc as N,oB as O,rB as P,aB as Q,nB as R,tB as S,Oo as T,et as U,sB as V,eB as W,wr as X,cB as Y,lB as Z,d as _,Lt as a,i0 as a$,P0 as a0,T2 as a1,qr as a2,ZL as a3,go as a4,Fa as a5,bv as a6,XL as a7,ep as a8,Av as a9,fB as aA,bS as aB,gS as aC,dS as aD,xk as aE,v2 as aF,t0 as aG,e0 as aH,Qx as aI,Jx as aJ,Ca as aK,pr as aL,mv as aM,vp as aN,Aa as aO,Ea as aP,ia as aQ,Sp as aR,wp as aS,Yw as aT,Eo as aU,Pf as aV,Ut as aW,Zi as aX,X1 as aY,qf as aZ,JL as a_,M0 as aa,Ih as ab,hy as ac,Yi as ad,V as ae,Q as af,Uk as ag,Tg as ah,dB as ai,Ep as aj,Bt as ak,Jr as al,Ao as am,uS as an,rd as ao,Qr as ap,gv as aq,ow as ar,lv as as,qo as at,ah as au,ES as av,pB as aw,gB as ax,uB as ay,X as az,xy as b,Fo as b0,ze as b1,Ni as b2,lc as b3,r_ as b4,dv as b5,ov as b6,VC as b7,Wo as b8,Ww as b9,xv as ba,Qi as bb,Zr as bc,ta as bd,Jw as be,tT as bf,Ki as bg,ra as bh,Gw as bi,mp as bj,KC as bk,QC as bl,Je as bm,Mc as bn,JC as bo,Ho as bp,ZC as bq,rw as br,Kr as bs,Ge as bt,Sc as bu,jo as bv,xp as bw,lo as bx,yv as by,Ma as bz,yy as c,HL as createApp,ct as d,Xr as e,$p as f,my as g,Yr as h,or as i,lt as j,Oh as k,$ as l,kf as m,Gi as n,KL as o,QL as p,by as q,_y as r,gy as s,Ex as t,hS as u,ge as v,Ev as w,dy as x,hB as y,yB as z}; diff --git a/assets/branch_strategy_develop.drawio.BB9doEUP.png b/assets/branch_strategy_develop.drawio.BB9doEUP.png new file mode 100644 index 00000000..81b0dc88 Binary files /dev/null and b/assets/branch_strategy_develop.drawio.BB9doEUP.png differ diff --git a/assets/branch_strategy_feature.drawio.Dx3_5kFX.png b/assets/branch_strategy_feature.drawio.Dx3_5kFX.png new file mode 100644 index 00000000..bd503ec5 Binary files /dev/null and b/assets/branch_strategy_feature.drawio.Dx3_5kFX.png differ diff --git a/assets/branch_strategy_hotfix.drawio.RF4mmQSP.png b/assets/branch_strategy_hotfix.drawio.RF4mmQSP.png new file mode 100644 index 00000000..37b4cccb Binary files /dev/null and b/assets/branch_strategy_hotfix.drawio.RF4mmQSP.png differ diff --git a/assets/branch_strategy_multi_develop.drawio.BUj3y2B6.png b/assets/branch_strategy_multi_develop.drawio.BUj3y2B6.png new file mode 100644 index 00000000..70657692 Binary files /dev/null and b/assets/branch_strategy_multi_develop.drawio.BUj3y2B6.png differ diff --git a/assets/branch_strategy_multi_version.drawio.BALCIJus.png b/assets/branch_strategy_multi_version.drawio.BALCIJus.png new file mode 100644 index 00000000..47e46d3f Binary files /dev/null and b/assets/branch_strategy_multi_version.drawio.BALCIJus.png differ diff --git a/assets/branch_strategy_release.drawio.DosnswvU.png b/assets/branch_strategy_release.drawio.DosnswvU.png new file mode 100644 index 00000000..e77e8d71 Binary files /dev/null and b/assets/branch_strategy_release.drawio.DosnswvU.png differ diff --git a/assets/branch_strategy_release_multi_develop.drawio.D7tvE9S0.png b/assets/branch_strategy_release_multi_develop.drawio.D7tvE9S0.png new file mode 100644 index 00000000..fa87e2bf Binary files /dev/null and b/assets/branch_strategy_release_multi_develop.drawio.D7tvE9S0.png differ diff --git a/assets/branch_strategy_topic.drawio._OMQxJxK.png b/assets/branch_strategy_topic.drawio._OMQxJxK.png new file mode 100644 index 00000000..2b7daf1b Binary files /dev/null and b/assets/branch_strategy_topic.drawio._OMQxJxK.png differ diff --git a/assets/chunks/@localSearchIndexroot.D_-2RLp1.js b/assets/chunks/@localSearchIndexroot.D_-2RLp1.js new file mode 100644 index 00000000..d16ea0ce --- /dev/null +++ b/assets/chunks/@localSearchIndexroot.D_-2RLp1.js @@ -0,0 +1 @@ +const t='{"documentCount":684,"nextId":684,"documentIds":{"0":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#免責事項","1":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#前提条件","2":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#名前の構成要素","3":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#環境-env","4":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#環境識別子","5":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#同一目的の複数環境","6":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#役割-role","7":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#用途-usage","8":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#リージョン-region","9":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#アベイラビリティゾーン-az","10":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#アクセス修飾子-access","11":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#全体ポリシー","12":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#命名規約","13":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#利用可能な文字","14":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#aws-サービス名を含めない","15":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#プロジェクト名を含めない","16":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#マルチクラウドを考慮し、aws-識別子を追加するかどうか","17":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#サービス別の命名規約","18":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#vpc","19":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#api-gateway","20":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#ec2","21":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#lb","22":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#ecs","23":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#lambda","24":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#lambda-function","25":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#lambda-layer","26":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#rds-aurora","27":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#dynamodb","28":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#s3-bucket","29":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#kinesis-data-streams","30":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#sqs","31":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#event-bridge-rule","32":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#iam","33":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#iam-ユーザー","34":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#iam-グループ","35":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#iam-ロール","36":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#iam-ポリシー","37":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#タグの命名","38":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#タグキー","39":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#タグ値","40":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#タグポリシー","41":"/coding-standards/documents/forAWSResource/AWSインフラリソース命名規約.html#license","42":"/coding-standards/documents/forGitBranch/commit_message_rule.html#コミットメッセージ規約","43":"/coding-standards/documents/forGitBranch/commit_message_rule.html#type","44":"/coding-standards/documents/forGitBranch/commit_message_rule.html#subject","45":"/coding-standards/documents/forGitBranch/commit_message_rule.html#gitmoji","46":"/coding-standards/documents/forGitBranch/commit_message_rule.html#コミットメッセージ例","47":"/coding-standards/documents/forAWSResource/#resources","48":"/coding-standards/documents/forGitBranch/git_branch_standards.html#はじめに","49":"/coding-standards/documents/forGitBranch/git_branch_standards.html#免責事項","50":"/coding-standards/documents/forGitBranch/git_branch_standards.html#基本方針","51":"/coding-standards/documents/forGitBranch/git_branch_standards.html#ブランチの種類","52":"/coding-standards/documents/forGitBranch/git_branch_standards.html#mainブランチ","53":"/coding-standards/documents/forGitBranch/git_branch_standards.html#featureブランチ","54":"/coding-standards/documents/forGitBranch/git_branch_standards.html#developブランチ","55":"/coding-standards/documents/forGitBranch/git_branch_standards.html#releaseブランチ","56":"/coding-standards/documents/forGitBranch/git_branch_standards.html#hotfixブランチ","57":"/coding-standards/documents/forGitBranch/git_branch_standards.html#topicブランチ","58":"/coding-standards/documents/forGitBranch/git_branch_standards.html#ブランチ戦略の選定","59":"/coding-standards/documents/forGitBranch/git_branch_standards.html#ブランチ戦略とデプロイメント環境","60":"/coding-standards/documents/forGitBranch/git_branch_standards.html#ブランチ戦略の拡張","61":"/coding-standards/documents/forGitBranch/git_branch_standards.html#_1-developブランチを複数作成する場合","62":"/coding-standards/documents/forGitBranch/git_branch_standards.html#develop2のリリース手順","63":"/coding-standards/documents/forGitBranch/git_branch_standards.html#_2-過去バージョンをサポートする場合","64":"/coding-standards/documents/forGitBranch/git_branch_standards.html#マージ戦略の選定","65":"/coding-standards/documents/forGitBranch/git_branch_standards.html#_1-developブランチからfeatureブランチへ変更を取り込む","66":"/coding-standards/documents/forGitBranch/git_branch_standards.html#_2-featureブランチからdevelopブランチへ変更を取り込む","67":"/coding-standards/documents/forGitBranch/git_branch_standards.html#_3-永続ブランチ間で変更を取り込む","68":"/coding-standards/documents/forGitBranch/git_branch_standards.html#ブランチ運用アンチパターン","69":"/coding-standards/documents/forGitBranch/git_branch_standards.html#追い抜きリリース","70":"/coding-standards/documents/forGitBranch/git_branch_standards.html#コミットメッセージ規則","71":"/coding-standards/documents/forGitBranch/git_branch_standards.html#ブランチ命名規則","72":"/coding-standards/documents/forGitBranch/git_branch_standards.html#タグ規則","73":"/coding-standards/documents/forGitBranch/git_branch_standards.html#タグの運用ルール","74":"/coding-standards/documents/forGitBranch/git_branch_standards.html#タグの命名規則","75":"/coding-standards/documents/forGitBranch/git_branch_standards.html#タグメッセージの規則","76":"/coding-standards/documents/forGitBranch/git_branch_standards.html#バージョンアップ規則","77":"/coding-standards/documents/forGitBranch/git_branch_standards.html#ラベル規則","78":"/coding-standards/documents/forGitBranch/git_branch_standards.html#ローカルでのgit操作","79":"/coding-standards/documents/forGitBranch/git_branch_standards.html#gitコマンド","80":"/coding-standards/documents/forGitBranch/git_branch_standards.html#vs-code","81":"/coding-standards/documents/forGitBranch/git_branch_standards.html#推奨設定","82":"/coding-standards/documents/forGitBranch/git_branch_standards.html#git-config推奨設定","83":"/coding-standards/documents/forGitBranch/git_branch_standards.html#git-secrets","84":"/coding-standards/documents/forGitBranch/git_branch_standards.html#github推奨設定","85":"/coding-standards/documents/forGitBranch/git_branch_standards.html#general","86":"/coding-standards/documents/forGitBranch/git_branch_standards.html#access","87":"/coding-standards/documents/forGitBranch/git_branch_standards.html#code-and-automation","88":"/coding-standards/documents/forGitBranch/git_branch_standards.html#branches","89":"/coding-standards/documents/forGitBranch/git_branch_standards.html#tags","90":"/coding-standards/documents/forGitBranch/git_branch_standards.html#github-actions","91":"/coding-standards/documents/forGitBranch/git_branch_standards.html#code-security-and-analysis","92":"/coding-standards/documents/forGitBranch/git_branch_standards.html#gitlab推奨設定","93":"/coding-standards/documents/forGitBranch/git_branch_standards.html#設定ファイル","94":"/coding-standards/documents/forGitBranch/git_branch_standards.html#gitattribute","95":"/coding-standards/documents/forGitBranch/git_branch_standards.html#gitignore","96":"/coding-standards/documents/forGitBranch/git_branch_standards.html#個人用のファイルをgit管理対象外とする","97":"/coding-standards/documents/forGitBranch/git_branch_standards.html#pull-request-merge-request-テンプレート","98":"/coding-standards/documents/forGitBranch/#gitブランチフロー規約","99":"/coding-standards/documents/forGitBranch/merge_feature_to_develop.html#開発ブランチに機能ブランチの変更を取り込む方法","100":"/coding-standards/documents/forGitBranch/merge_feature_to_develop.html#githubの場合","101":"/coding-standards/documents/forGitBranch/merge_feature_to_develop.html#_1-マージコミット","102":"/coding-standards/documents/forGitBranch/merge_feature_to_develop.html#_2-リベース","103":"/coding-standards/documents/forGitBranch/merge_feature_to_develop.html#_3-スカッシュマージ","104":"/coding-standards/documents/forGitBranch/merge_feature_to_develop.html#gitlabを利用するの手順","105":"/coding-standards/documents/forGitBranch/merge_feature_to_develop.html#_1-merge-commit","106":"/coding-standards/documents/forGitBranch/merge_feature_to_develop.html#_2-merge-commit-with-semi-linear-history","107":"/coding-standards/documents/forGitBranch/merge_feature_to_develop.html#_3-fast-forward-merge","108":"/coding-standards/documents/forGitBranch/merge_develop_to_feature.html#機能ブランチに開発ブランチの変更を取り込む方法","109":"/coding-standards/documents/forGitBranch/merge_develop_to_feature.html#_1-マージコミット","110":"/coding-standards/documents/forGitBranch/merge_develop_to_feature.html#_2-リベース","111":"/coding-standards/documents/forJava/Javaコーディング規約.html#はじめに","112":"/coding-standards/documents/forJava/Javaコーディング規約.html#規約の重要性","113":"/coding-standards/documents/forJava/Javaコーディング規約.html#コーディングの心得","114":"/coding-standards/documents/forJava/Javaコーディング規約.html#見やすさを重視せよ","115":"/coding-standards/documents/forJava/Javaコーディング規約.html#ネーミングはわかりやすく","116":"/coding-standards/documents/forJava/Javaコーディング規約.html#サンプルを鵜呑みにしない","117":"/coding-standards/documents/forJava/Javaコーディング規約.html#同じコードは二度書かない","118":"/coding-standards/documents/forJava/Javaコーディング規約.html#役割は一つに","119":"/coding-standards/documents/forJava/Javaコーディング規約.html#ネーミング規約","120":"/coding-standards/documents/forJava/Javaコーディング規約.html#全般","121":"/coding-standards/documents/forJava/Javaコーディング規約.html#パッケージ","122":"/coding-standards/documents/forJava/Javaコーディング規約.html#クラス","123":"/coding-standards/documents/forJava/Javaコーディング規約.html#メソッド","124":"/coding-standards/documents/forJava/Javaコーディング規約.html#引数","125":"/coding-standards/documents/forJava/Javaコーディング規約.html#変数全般","126":"/coding-standards/documents/forJava/Javaコーディング規約.html#ローカル変数","127":"/coding-standards/documents/forJava/Javaコーディング規約.html#enum","128":"/coding-standards/documents/forJava/Javaコーディング規約.html#コーディング規約","129":"/coding-standards/documents/forJava/Javaコーディング規約.html#全般-1","130":"/coding-standards/documents/forJava/Javaコーディング規約.html#フォーマット","131":"/coding-standards/documents/forJava/Javaコーディング規約.html#コメント","132":"/coding-standards/documents/forJava/Javaコーディング規約.html#インポート","133":"/coding-standards/documents/forJava/Javaコーディング規約.html#コンストラクタ","134":"/coding-standards/documents/forJava/Javaコーディング規約.html#メソッド-1","135":"/coding-standards/documents/forJava/Javaコーディング規約.html#クラスメソッド","136":"/coding-standards/documents/forJava/Javaコーディング規約.html#変数全般-1","137":"/coding-standards/documents/forJava/Javaコーディング規約.html#定数","138":"/coding-standards/documents/forJava/Javaコーディング規約.html#インスタンス変数","139":"/coding-standards/documents/forJava/Javaコーディング規約.html#クラス変数","140":"/coding-standards/documents/forJava/Javaコーディング規約.html#ローカル変数-1","141":"/coding-standards/documents/forJava/Javaコーディング規約.html#引数-1","142":"/coding-standards/documents/forJava/Javaコーディング規約.html#継承","143":"/coding-standards/documents/forJava/Javaコーディング規約.html#インナークラス","144":"/coding-standards/documents/forJava/Javaコーディング規約.html#メンバー順序","145":"/coding-standards/documents/forJava/Javaコーディング規約.html#インスタンス","146":"/coding-standards/documents/forJava/Javaコーディング規約.html#制御構造","147":"/coding-standards/documents/forJava/Javaコーディング規約.html#文字列操作","148":"/coding-standards/documents/forJava/Javaコーディング規約.html#数値","149":"/coding-standards/documents/forJava/Javaコーディング規約.html#日付","150":"/coding-standards/documents/forJava/Javaコーディング規約.html#三項演算子","151":"/coding-standards/documents/forJava/Javaコーディング規約.html#switch-式","152":"/coding-standards/documents/forJava/Javaコーディング規約.html#switch-文","153":"/coding-standards/documents/forJava/Javaコーディング規約.html#コレクション","154":"/coding-standards/documents/forJava/Javaコーディング規約.html#ラムダ式・メソッド参照・コンストラクタ参照","155":"/coding-standards/documents/forJava/Javaコーディング規約.html#実質的-final-effectively-final","156":"/coding-standards/documents/forJava/Javaコーディング規約.html#stream-api","157":"/coding-standards/documents/forJava/Javaコーディング規約.html#optional","158":"/coding-standards/documents/forJava/Javaコーディング規約.html#var-local-variable-type-inference","159":"/coding-standards/documents/forJava/Javaコーディング規約.html#レコード","160":"/coding-standards/documents/forJava/Javaコーディング規約.html#テキストブロック","161":"/coding-standards/documents/forJava/Javaコーディング規約.html#ストリーム-inputstream-outputstream","162":"/coding-standards/documents/forJava/Javaコーディング規約.html#リソースの解放","163":"/coding-standards/documents/forJava/Javaコーディング規約.html#例外","164":"/coding-standards/documents/forJava/Javaコーディング規約.html#ガベージコレクション","165":"/coding-standards/documents/forJava/Javaコーディング規約.html#コメント規約","166":"/coding-standards/documents/forJava/Javaコーディング規約.html#よいコメントの鉄則","167":"/coding-standards/documents/forJava/Javaコーディング規約.html#java-コメント-3-種類-の使い分け","168":"/coding-standards/documents/forJava/Javaコーディング規約.html#パフォーマンス","169":"/coding-standards/documents/forJava/Javaコーディング規約.html#stream-api-1","170":"/coding-standards/documents/forJava/Javaコーディング規約.html#ラムダ式・メソッド参照・コンストラクタ参照-1","171":"/coding-standards/documents/forJava/Javaコーディング規約.html#文字列連結","172":"/coding-standards/documents/forJava/Javaコーディング規約.html#文字列連結-繰り返し","173":"/coding-standards/documents/forJava/Javaコーディング規約.html#文字列連結-定数","174":"/coding-standards/documents/forJava/Javaコーディング規約.html#list-の種類","175":"/coding-standards/documents/forJava/Javaコーディング規約.html#bigdecimal-の-zero-との比較","176":"/coding-standards/documents/forJava/Javaコーディング規約.html#license","177":"/coding-standards/documents/forGitBranch/vscode_git_ope.html#vscode上でのgit操作","178":"/coding-standards/documents/forGitBranch/vscode_git_ope.html#推奨する拡張機能","179":"/coding-standards/documents/forGitBranch/vscode_git_ope.html#リポジトリのクローン-git-clone","180":"/coding-standards/documents/forGitBranch/vscode_git_ope.html#コミットグラフの表示","181":"/coding-standards/documents/forGitBranch/vscode_git_ope.html#リモートのフェッチ-プル-git-fetch-git-pull","182":"/coding-standards/documents/forGitBranch/vscode_git_ope.html#ブランチの作成-チェックアウト-git-branch-git-checkout","183":"/coding-standards/documents/forGitBranch/vscode_git_ope.html#ステージ-コミット-プッシュ-git-add-git-commit-git-push","184":"/coding-standards/documents/forGitBranch/vscode_git_ope.html#リバート-git-revert","185":"/coding-standards/documents/forGitBranch/vscode_git_ope.html#マージ-git-merge","186":"/coding-standards/documents/forGitBranch/vscode_git_ope.html#リベース-git-rebase","187":"/coding-standards/documents/forGitBranch/vscode_git_ope.html#スタッシュ-git-stash","188":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#はじめに","189":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#規約の重要性","190":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#コーディングの心得","191":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#見やすさを重視せよ","192":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#ネーミングはわかりやすく","193":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#サンプルを鵜呑みにしない","194":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#同じコードは二度書かない","195":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#役割は一つに","196":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#ネーミング規約","197":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#全般","198":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#パッケージ","199":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#クラス","200":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#メソッド","201":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#引数","202":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#変数全般","203":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#ローカル変数","204":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#enum","205":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#コーディング規約","206":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#全般-1","207":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#フォーマット","208":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#コメント","209":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#インポート","210":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#コンストラクタ","211":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#メソッド-1","212":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#クラスメソッド","213":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#変数全般-1","214":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#定数","215":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#インスタンス変数","216":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#クラス変数","217":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#ローカル変数-1","218":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#引数-1","219":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#継承","220":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#インナークラス","221":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#メンバー順序","222":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#インスタンス","223":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#制御構造","224":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#文字列操作","225":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#数値","226":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#日付","227":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#三項演算子","228":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#コレクション","229":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#ラムダ式・メソッド参照・コンストラクタ参照","230":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#実質的-final-effectively-final","231":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#stream-api","232":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#optional","233":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#var-local-variable-type-inference","234":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#ストリーム-inputstream-outputstream","235":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#リソースの解放","236":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#例外","237":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#ガベージコレクション","238":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#コメント規約","239":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#よいコメントの鉄則","240":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#java-コメント-3-種類-の使い分け","241":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#パフォーマンス","242":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#stream-api-1","243":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#ラムダ式・メソッド参照・コンストラクタ参照-1","244":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#文字列連結","245":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#文字列連結-繰り返し","246":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#文字列連結-定数","247":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#list-の種類","248":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#string-から-integer・long-への変換","249":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#string-から-int・long-への変換","250":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#bigdecimal-の-zero-との比較","251":"/coding-standards/documents/forJava/Javaコーディング規約_for_11.html#license","252":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#はじめに","253":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#規約の重要性","254":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#コーディングの心得","255":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#見やすさを重視せよ","256":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#ネーミングはわかりやすく","257":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#サンプルを鵜呑みにしない","258":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#同じコードは二度書かない","259":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#役割は一つに","260":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#ネーミング規約","261":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#全般","262":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#パッケージ","263":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#クラス","264":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#メソッド","265":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#引数","266":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#変数全般","267":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#ローカル変数","268":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#enum","269":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#コーディング規約","270":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#全般-1","271":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#フォーマット","272":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#コメント","273":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#インポート","274":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#コンストラクタ","275":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#メソッド-1","276":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#クラスメソッド","277":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#変数全般-1","278":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#定数","279":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#インスタンス変数","280":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#クラス変数","281":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#ローカル変数-1","282":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#引数-1","283":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#継承","284":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#インナークラス","285":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#メンバー順序","286":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#インスタンス","287":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#制御構造","288":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#文字列操作","289":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#数値","290":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#日付","291":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#三項演算子","292":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#コレクション","293":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#ラムダ式・メソッド参照・コンストラクタ参照","294":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#実質的-final-effectively-final","295":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#stream-api","296":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#optional","297":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#ストリーム-inputstream-outputstream","298":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#リソースの解放","299":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#例外","300":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#ガベージコレクション","301":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#コメント規約","302":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#よいコメントの鉄則","303":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#java-コメント-3-種類-の使い分け","304":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#パフォーマンス","305":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#stream-api-1","306":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#ラムダ式・メソッド参照・コンストラクタ参照-1","307":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#文字列連結","308":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#文字列連結-繰り返し","309":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#文字列連結-定数","310":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#list-の種類","311":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#string-から-integer・long-への変換","312":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#string-から-int・long-への変換","313":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#bigdecimal-の-zero-との比較","314":"/coding-standards/documents/forJava/Javaコーディング規約_for_8.html#license","315":"/coding-standards/documents/forJava/#for-java17","316":"/coding-standards/documents/forJava/#for-old-versions","317":"/coding-standards/documents/forJava/#resources","318":"/coding-standards/documents/forMarkdown/IF定義書.html#if01-設備有効開始受信","319":"/coding-standards/documents/forMarkdown/IF定義書.html#対向システム","320":"/coding-standards/documents/forMarkdown/IF定義書.html#環境情報","321":"/coding-standards/documents/forMarkdown/IF定義書.html#input","322":"/coding-standards/documents/forMarkdown/IF定義書.html#output","323":"/coding-standards/documents/forMarkdown/IF定義書.html#連携元定義","324":"/coding-standards/documents/forMarkdown/IF定義書.html#項目定義","325":"/coding-standards/documents/forMarkdown/IF定義書.html#サンプル","326":"/coding-standards/documents/forMarkdown/IF定義書.html#連携先定義","327":"/coding-standards/documents/forMarkdown/IF定義書.html#処理概要","328":"/coding-standards/documents/forMarkdown/IF定義書.html#処理シーケンス","329":"/coding-standards/documents/forMarkdown/IF定義書.html#db-項目","330":"/coding-standards/documents/forMarkdown/IF定義書.html#参照","331":"/coding-standards/documents/forMarkdown/IF定義書.html#登録","332":"/coding-standards/documents/forMarkdown/IF定義書.html#更新","333":"/coding-standards/documents/forMarkdown/IF定義書.html#ビジネスロジック","334":"/coding-standards/documents/forMarkdown/IF定義書.html#エラー処理","335":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/#uim01-ログイン","336":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/#概要","337":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/#イベント概要","338":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/#イベント詳細","339":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/#_1-初期表示","340":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/#_2-ログインする","341":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/#_3-会員登録","342":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM02/#uim02-トレーナー検索","343":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM02/#概要","344":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM02/#イベント概要","345":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM02/#イベント詳細","346":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM02/#_1-初期表示","347":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM02/#_2-検索","348":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/#uim03-カレンダー予約","349":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/#概要","350":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/#イベント概要","351":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/#イベント詳細","352":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/#_1-初期表示","353":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/#_2-日時設定","354":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/#_3-日時指定","355":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/#uim04-決済","356":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/#概要","357":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/#イベント概要","358":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/#イベント詳細","359":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/#_1-初期表示","360":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/#_2-日時指定に戻る","361":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/#_3-決済","362":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/#uis01-トップページ","363":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/#概要","364":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/#イベント概要","365":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/#イベント詳細","366":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/#_1-初期表示","367":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/#_2-トレーナーを探す","368":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/#_3-会員登録-ログイン","369":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/#uis02-マイページ","370":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/#概要","371":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/#イベント概要","372":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/#イベント詳細","373":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/#_1-初期表示","374":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/#_2-トレーナーを探す","375":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/#_3-受講完了確認","376":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/#_4-受講完了","377":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/#uis03-トレーナー一覧","378":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/#概要","379":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/#イベント概要","380":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/#イベント詳細","381":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/#_1-初期表示","382":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/#_2-トレーナー詳細","383":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/#_3-トレーナー検索","384":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS04/#uis04-トレーナー詳細","385":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS04/#概要","386":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS04/#イベント概要","387":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS04/#イベント詳細","388":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS04/#_1-初期表示","389":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS04/#_2-トレーニングコース決定","390":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/#画面","391":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/#標準画面","392":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/01_画面/#モーダル画面","393":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/#web-api","394":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/03_データ/#テーブル一覧","395":"/coding-standards/documents/forMarkdown/future_muscle_partner/#future-muscle-partner","396":"/coding-standards/documents/forMarkdown/future_muscle_partner/#サービスコンセプト","397":"/coding-standards/documents/forMarkdown/future_muscle_partner/#フォルダ階層","398":"/coding-standards/documents/forMarkdown/future_muscle_partner/#設計書","399":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/README.html#docs","400":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/README.html#フォルダ階層","401":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/README.html#設計書","402":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/README.html#コード体系","403":"/coding-standards/documents/forMarkdown/future_muscle_partner/docs/README.html#画面設計書の記載方針","404":"/coding-standards/documents/forMarkdown/#前提","405":"/coding-standards/documents/forMarkdown/#本規約で紹介する設計ドキュメントの位置付け","406":"/coding-standards/documents/forMarkdown/#テキストベースにおける設計書の注意点","407":"/coding-standards/documents/forMarkdown/#フォルダ階層の推奨","408":"/coding-standards/documents/forMarkdown/#システム構成図","409":"/coding-standards/documents/forMarkdown/#フロントエンド","410":"/coding-standards/documents/forMarkdown/#バックエンド","411":"/coding-standards/documents/forMarkdown/#テーブル定義書","412":"/coding-standards/documents/forMarkdown/#区分値","413":"/coding-standards/documents/forMarkdown/#web-api-設計書","414":"/coding-standards/documents/forMarkdown/#プログラム設計書-バッチ、非同期タスクなど","415":"/coding-standards/documents/forMarkdown/#プログラム設計書-web-api","416":"/coding-standards/documents/forMarkdown/#web-api応答例","417":"/coding-standards/documents/forMarkdown/#i-f-定義書","418":"/coding-standards/documents/forMarkdown/#resources","419":"/coding-standards/documents/forMarkdown/プログラム設計書.html#bat01-xxx-計算","420":"/coding-standards/documents/forMarkdown/プログラム設計書.html#処理概要","421":"/coding-standards/documents/forMarkdown/プログラム設計書.html#処理シーケンス","422":"/coding-standards/documents/forMarkdown/プログラム設計書.html#ビジネスロジック","423":"/coding-standards/documents/forMarkdown/プログラム設計書.html#ビジネスロジック1","424":"/coding-standards/documents/forMarkdown/プログラム設計書.html#db-項目","425":"/coding-standards/documents/forMarkdown/プログラム設計書.html#取得","426":"/coding-standards/documents/forMarkdown/プログラム設計書.html#登録","427":"/coding-standards/documents/forMarkdown/プログラム設計書.html#更新","428":"/coding-standards/documents/forMarkdown/メッセージ設計書.html#msg01","429":"/coding-standards/documents/forMarkdown/メッセージ設計書.html#メッセージ概要","430":"/coding-standards/documents/forMarkdown/メッセージ設計書.html#メッセージ定義","431":"/coding-standards/documents/forMarkdown/区分値設計書.html#enum01-ユーザー権限","432":"/coding-standards/documents/forMarkdown/区分値設計書.html#区分値概要","433":"/coding-standards/documents/forMarkdown/区分値設計書.html#区分値定義","434":"/coding-standards/documents/forOpenAPISpecification/API_Design.html#web-api-設計標準","435":"/coding-standards/documents/forOpenAPISpecification/API_Design.html#http-メソッド","436":"/coding-standards/documents/forOpenAPISpecification/API_Design.html#http-ステータス","437":"/coding-standards/documents/forOpenAPISpecification/API_Design.html#共通","438":"/coding-standards/documents/forOpenAPISpecification/API_Design.html#get","439":"/coding-standards/documents/forOpenAPISpecification/API_Design.html#post","440":"/coding-standards/documents/forOpenAPISpecification/API_Design.html#put","441":"/coding-standards/documents/forOpenAPISpecification/API_Design.html#delete","442":"/coding-standards/documents/forOpenAPISpecification/API_Design.html#api-バージョン管理","443":"/coding-standards/documents/forOpenAPISpecification/API_Design.html#パラメータの命名","444":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#はじめに","445":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#免責事項","446":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#ファイルフォーマット","447":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#要素規約","448":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#swagger","449":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#info","450":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#title","451":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#desctiption","452":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#version","453":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#host","454":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#basepath","455":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#schemes","456":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#security-securitydefinitions","457":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#produces","458":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#consumes","459":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#tags","460":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#paths","461":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#paths-path","462":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#paths-path-operation","463":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#paths-path-parameter","464":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#paths-path-responses","465":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#definitions","466":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#バリデーションについて","467":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#必須","468":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#デフォルト値","469":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#型・フォーマット","470":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#桁","471":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#区分値","472":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#固定値","473":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#その他-正規表現","474":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#ファイルアップロード","475":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#ファイルダウンロード","476":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#cors","477":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#opentelemetry-traceparent-http-header","478":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#api-のバージョン管理","479":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#ファイル単位","480":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#推奨ツール","481":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html#license","482":"/coding-standards/documents/forOpenAPISpecification/file_standards.html#ファイルフォーマット規約","483":"/coding-standards/documents/forOpenAPISpecification/file_standards.html#フォーマット","484":"/coding-standards/documents/forOpenAPISpecification/file_standards.html#ファイル名","485":"/coding-standards/documents/forOpenAPISpecification/file_standards.html#yaml-バージョン","486":"/coding-standards/documents/forOpenAPISpecification/file_standards.html#ファイルレイアウト","487":"/coding-standards/documents/forOpenAPISpecification/file_standards.html#クォート","488":"/coding-standards/documents/forOpenAPISpecification/file_standards.html#yaml-配列スタイル","489":"/coding-standards/documents/forOpenAPISpecification/file_standards.html#改行の表現","490":"/coding-standards/documents/forOpenAPISpecification/#対応するバージョンについて","491":"/coding-standards/documents/forOpenAPISpecification/#openapi-specification-standards","492":"/coding-standards/documents/forOpenAPISpecification/#resources","493":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#はじめに","494":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#ファイルフォーマット","495":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#openapi-ドキュメントの構成要素","496":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#要素規約","497":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#openapi","498":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#info","499":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#info-title","500":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#info-description","501":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#info-version","502":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#servers","503":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#paths","504":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#paths-path-method-tags","505":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#paths-path-method-summary","506":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#paths-path-method-description","507":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#paths-path-method-operationid","508":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#paths-path-method-parameters","509":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#paths-path-method-requestbody","510":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#paths-path-method-responses","511":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#paths-path-method-security","512":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#components","513":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#components-schemas","514":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#components-responses","515":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#components-parameters","516":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#パスパラメータ","517":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#クエリパラメータ","518":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#ヘッダ","519":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#cookie","520":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#components-requestbodies","521":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#components-headers","522":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#components-securityschemes","523":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#components-links","524":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#components-callbacks","525":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#security","526":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#tags","527":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#externaldocs","528":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#設計上のポイント","529":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#ファイルアップロード","530":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#ファイルダウンロード","531":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#cors","532":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#opentelemetry-traceparent-http-header","533":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#値が存在しないという状態の表現","534":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#バリデーション","535":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#必須","536":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#デフォルト値","537":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#型・フォーマット","538":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#桁","539":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#区分値","540":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#固定値","541":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#その他-正規表現","542":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#ファイル分割","543":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#分割方法の選定","544":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#サンプル説明","545":"/coding-standards/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html#license","546":"/coding-standards/documents/forOpenAPISpecification/prerequisite.html#前提条件","547":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#はじめに","548":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#前提条件","549":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#sql-コーティング規約-可読性・管理性","550":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#書式全般","551":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#予約語","552":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#予約語以外","553":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#短縮名称","554":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#文字コード","555":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#不要な空白文字-スペース-は除去する","556":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#sql-文の整形","557":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#select-文","558":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#insert-文","559":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#update-文","560":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#delete-文","561":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#merge-文","562":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#and-副問い合わせ","563":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#case-式","564":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#in-句","565":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#比較演算子","566":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#改行位置","567":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#with-句","568":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#offset-句-fetch-句","569":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#hint-句","570":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#コメント","571":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#外部結合","572":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#型変換","573":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#比較演算子-1","574":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#order-by-句","575":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#group-by-句","576":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#exists-句","577":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#as-句","578":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#where-句","579":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#count-文","580":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#sql-コーディング規約-パフォーマンス性","581":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#検索","582":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#挿入","583":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#更新","584":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#削除","585":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#with-句-1","586":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#distinct-句","587":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#in-句-1","588":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#not-in-句","589":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#union-句","590":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#パラレルヒント句","591":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#select-for-update","592":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#分析関数","593":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#インデックス","594":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#外部結合-1","595":"/coding-standards/documents/forSQL/SQLコーディング規約(Oracle).html#license","596":"/coding-standards/documents/forSQL/#sql-coding-standards","597":"/coding-standards/documents/forSQL/#resources","598":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#はじめに","599":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#前提条件","600":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#sql-コーティング規約-可読性・管理性","601":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#書式全般","602":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#予約語","603":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#予約語以外","604":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#短縮名称","605":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#文字コード","606":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#不要な空白文字-スペース-は除去する","607":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#sql-文の整形","608":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#select-文","609":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#insert-文","610":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#update-文","611":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#delete-文","612":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#and-副問い合わせ","613":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#case-式","614":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#in-句","615":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#比較演算子","616":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#改行位置","617":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#with-句","618":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#limit-句-offset-句","619":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#hint-句","620":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#コメント","621":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#型変換","622":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#比較演算子-1","623":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#order-by-句","624":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#group-by-句","625":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#exists-句","626":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#as-句","627":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#where-句","628":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#count-文","629":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#文字列リテラル","630":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#エスケープシーケンス","631":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#sql-コーディング規約-パフォーマンス性","632":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#検索","633":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#挿入","634":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#更新","635":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#削除","636":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#distinct-句","637":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#in-句-1","638":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#not-in-句","639":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#union-句","640":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#select-for-update","641":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#分析関数","642":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#インデックス","643":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#外部結合","644":"/coding-standards/documents/forSQL/SQLコーディング規約(PostgreSQL).html#license","645":"/coding-standards/documents/forSlack/#slack利用ガイドライン","646":"/coding-standards/#license","647":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#はじめに","648":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#適用範囲","649":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#免責事項","650":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#管理者向け推奨設定","651":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#workspace-access","652":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#デフォルトチャンネル","653":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#表示名ガイドライン","654":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#ワークスペースの管理者","655":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#ユーザ向け推奨設定","656":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#アカウントアイコンを設定する","657":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#検索性の高い氏名-full-name-を設定する","658":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#ユーザーグループの推奨","659":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#チャンネル命名規則","660":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#外部組織メンバーが在籍するチャンネルの命名","661":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#投稿内容ポリシー","662":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#敬称は不要","663":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#絵文字や感嘆符を活用する","664":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#絵文字リアクションによる積極応答","665":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#dmはなるべく避ける","666":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#timesの推奨","667":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#メッセージ-スレッドのトップ-は具体的に書く","668":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#メッセージのurlを活用する","669":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#also-send-to-channelは乱発しない","670":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#広めの通知に注意する","671":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#channel","672":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#here","673":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#メンション範囲は適切に","674":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#過剰なメンションの抑制","675":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#メンションの宛先をできる限り絞り込む","676":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#予約投稿を活用する","677":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#不在の表明","678":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#可読性を上げるための書式設定","679":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#エラーメッセージの画像添付非推奨、テキストスニペットの推奨","680":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#機密情報の流出に注意する","681":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#ファイルの共有に注意する","682":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#プライベートチャンネルの投稿に対する引用","683":"/coding-standards/documents/forSlack/slack_usage_guidelines.html#さいごに"},"fieldIds":{"title":0,"titles":1,"text":2},"fieldLength":{"0":[1,1,8],"1":[1,1,23],"2":[1,1,72],"3":[3,2,30],"4":[1,5,59],"5":[1,5,9],"6":[3,2,54],"7":[3,2,19],"8":[3,2,39],"9":[3,2,16],"10":[3,2,11],"11":[1,1,1],"12":[1,2,28],"13":[1,2,17],"14":[2,2,40],"15":[1,2,9],"16":[3,2,28],"17":[1,1,5],"18":[1,2,39],"19":[2,2,37],"20":[1,2,24],"21":[1,2,54],"22":[1,2,36],"23":[1,2,1],"24":[2,3,41],"25":[2,3,30],"26":[2,2,64],"27":[1,2,63],"28":[2,2,49],"29":[3,2,53],"30":[1,2,40],"31":[3,2,35],"32":[1,2,9],"33":[2,3,59],"34":[2,3,47],"35":[2,3,26],"36":[2,3,69],"37":[1,1,62],"38":[1,2,48],"39":[1,2,9],"40":[1,2,20],"41":[1,1,1],"42":[1,1,21],"43":[1,1,13],"44":[1,1,7],"45":[1,1,55],"46":[1,1,18],"47":[1,1,6],"48":[1,1,15],"49":[1,1,8],"50":[1,1,7],"51":[1,1,42],"52":[1,1,5],"53":[1,1,28],"54":[1,1,2],"55":[1,1,10],"56":[1,1,10],"57":[1,1,7],"58":[1,1,40],"59":[1,1,25],"60":[1,1,5],"61":[2,1,27],"62":[1,3,18],"63":[2,1,24],"64":[1,1,16],"65":[2,1,96],"66":[2,1,70],"67":[2,1,13],"68":[1,1,2],"69":[1,1,48],"70":[1,1,17],"71":[1,1,4],"72":[1,1,6],"73":[1,1,39],"74":[1,1,33],"75":[1,1,40],"76":[1,1,19],"77":[1,1,14],"78":[1,1,1],"79":[1,1,29],"80":[2,1,5],"81":[1,1,5],"82":[2,1,64],"83":[2,1,10],"84":[1,1,7],"85":[1,2,69],"86":[1,2,33],"87":[3,2,1],"88":[1,5,80],"89":[1,5,13],"90":[2,5,24],"91":[4,5,12],"92":[1,1,18],"93":[1,1,1],"94":[2,2,39],"95":[2,2,17],"96":[1,2,21],"97":[4,2,66],"98":[1,1,8],"99":[1,1,1],"100":[1,1,21],"101":[2,2,11],"102":[2,2,11],"103":[2,2,9],"104":[1,1,14],"105":[3,2,39],"106":[7,2,9],"107":[4,2,12],"108":[1,1,5],"109":[2,1,29],"110":[2,1,29],"111":[1,1,96],"112":[1,1,12],"113":[1,1,29],"114":[1,2,24],"115":[1,2,38],"116":[1,2,25],"117":[1,2,16],"118":[1,2,33],"119":[1,1,1],"120":[1,1,13],"121":[1,1,4],"122":[1,1,14],"123":[1,1,34],"124":[1,1,18],"125":[1,1,30],"126":[1,1,21],"127":[1,1,21],"128":[1,1,1],"129":[1,1,60],"130":[1,1,90],"131":[1,1,62],"132":[1,1,25],"133":[1,1,15],"134":[1,1,38],"135":[1,1,16],"136":[1,1,67],"137":[1,1,61],"138":[1,1,14],"139":[1,1,17],"140":[1,1,31],"141":[1,1,11],"142":[1,1,35],"143":[1,1,16],"144":[1,1,12],"145":[1,1,51],"146":[1,1,106],"147":[1,1,92],"148":[1,1,39],"149":[1,1,18],"150":[1,1,3],"151":[2,1,103],"152":[2,1,79],"153":[1,1,90],"154":[3,1,46],"155":[4,1,5],"156":[2,1,84],"157":[1,1,38],"158":[6,1,89],"159":[1,1,102],"160":[1,1,131],"161":[4,1,24],"162":[1,1,22],"163":[1,1,34],"164":[1,1,9],"165":[1,1,1],"166":[1,1,101],"167":[5,1,74],"168":[1,1,16],"169":[2,1,75],"170":[3,1,59],"171":[1,1,1],"172":[3,2,60],"173":[3,2,79],"174":[2,1,77],"175":[4,1,39],"176":[1,1,1],"177":[1,1,11],"178":[1,1,19],"179":[4,1,12],"180":[1,1,19],"181":[6,1,27],"182":[6,1,28],"183":[8,1,34],"184":[4,1,2],"185":[4,1,2],"186":[4,1,2],"187":[4,1,2],"188":[1,1,96],"189":[1,1,12],"190":[1,1,29],"191":[1,2,24],"192":[1,2,38],"193":[1,2,25],"194":[1,2,16],"195":[1,2,33],"196":[1,1,1],"197":[1,1,13],"198":[1,1,4],"199":[1,1,12],"200":[1,1,34],"201":[1,1,18],"202":[1,1,30],"203":[1,1,21],"204":[1,1,21],"205":[1,1,1],"206":[1,1,60],"207":[1,1,90],"208":[1,1,62],"209":[1,1,25],"210":[1,1,15],"211":[1,1,38],"212":[1,1,16],"213":[1,1,67],"214":[1,1,61],"215":[1,1,14],"216":[1,1,17],"217":[1,1,31],"218":[1,1,11],"219":[1,1,35],"220":[1,1,16],"221":[1,1,12],"222":[1,1,32],"223":[1,1,107],"224":[1,1,92],"225":[1,1,39],"226":[1,1,18],"227":[1,1,3],"228":[1,1,90],"229":[3,1,46],"230":[4,1,5],"231":[2,1,86],"232":[1,1,38],"233":[6,1,89],"234":[4,1,24],"235":[1,1,22],"236":[1,1,34],"237":[1,1,9],"238":[1,1,1],"239":[1,1,101],"240":[5,1,74],"241":[1,1,16],"242":[2,1,77],"243":[3,1,59],"244":[1,1,1],"245":[3,2,60],"246":[3,2,79],"247":[2,1,77],"248":[5,1,44],"249":[5,1,44],"250":[4,1,39],"251":[1,1,1],"252":[1,1,96],"253":[1,1,12],"254":[1,1,29],"255":[1,2,24],"256":[1,2,38],"257":[1,2,25],"258":[1,2,16],"259":[1,2,33],"260":[1,1,1],"261":[1,1,13],"262":[1,1,4],"263":[1,1,12],"264":[1,1,34],"265":[1,1,18],"266":[1,1,30],"267":[1,1,21],"268":[1,1,21],"269":[1,1,1],"270":[1,1,60],"271":[1,1,90],"272":[1,1,62],"273":[1,1,25],"274":[1,1,15],"275":[1,1,39],"276":[1,1,16],"277":[1,1,67],"278":[1,1,64],"279":[1,1,14],"280":[1,1,17],"281":[1,1,31],"282":[1,1,11],"283":[1,1,35],"284":[1,1,16],"285":[1,1,12],"286":[1,1,32],"287":[1,1,107],"288":[1,1,84],"289":[1,1,39],"290":[1,1,18],"291":[1,1,3],"292":[1,1,76],"293":[3,1,46],"294":[4,1,5],"295":[2,1,86],"296":[1,1,38],"297":[4,1,24],"298":[1,1,22],"299":[1,1,34],"300":[1,1,9],"301":[1,1,1],"302":[1,1,101],"303":[5,1,74],"304":[1,1,16],"305":[2,1,77],"306":[3,1,59],"307":[1,1,1],"308":[3,2,60],"309":[3,2,79],"310":[2,1,77],"311":[5,1,44],"312":[5,1,44],"313":[4,1,39],"314":[1,1,1],"315":[2,1,3],"316":[3,1,4],"317":[1,1,10],"318":[2,1,2],"319":[1,2,6],"320":[1,2,1],"321":[1,3,26],"322":[1,3,26],"323":[1,2,48],"324":[1,3,31],"325":[1,4,14],"326":[1,2,48],"327":[1,2,15],"328":[1,2,34],"329":[2,2,1],"330":[1,4,2],"331":[1,4,8],"332":[1,4,2],"333":[1,2,2],"334":[1,2,10],"335":[3,1,1],"336":[1,3,6],"337":[1,3,12],"338":[1,3,1],"339":[2,4,3],"340":[2,4,21],"341":[2,4,1],"342":[3,1,1],"343":[1,3,9],"344":[1,3,10],"345":[1,3,1],"346":[2,4,3],"347":[2,4,30],"348":[3,1,1],"349":[1,3,7],"350":[1,3,17],"351":[1,3,1],"352":[2,4,28],"353":[2,4,2],"354":[2,4,3],"355":[3,1,1],"356":[1,3,10],"357":[1,3,12],"358":[1,3,1],"359":[2,4,15],"360":[2,4,2],"361":[2,4,1],"362":[3,1,1],"363":[1,3,6],"364":[1,3,19],"365":[1,3,1],"366":[2,4,39],"367":[2,4,3],"368":[3,4,3],"369":[3,1,1],"370":[1,3,8],"371":[1,3,19],"372":[1,3,1],"373":[2,4,35],"374":[2,4,3],"375":[2,4,6],"376":[2,4,38],"377":[3,1,1],"378":[1,3,8],"379":[1,3,16],"380":[1,3,1],"381":[2,4,26],"382":[2,4,2],"383":[2,4,2],"384":[3,1,1],"385":[1,3,6],"386":[1,3,13],"387":[1,3,1],"388":[2,4,40],"389":[2,4,3],"390":[1,1,3],"391":[1,1,12],"392":[1,1,12],"393":[2,1,3],"394":[1,1,9],"395":[3,1,5],"396":[1,3,16],"397":[1,3,12],"398":[1,3,3],"399":[1,1,2],"400":[1,1,22],"401":[1,1,7],"402":[1,1,62],"403":[1,1,15],"404":[1,1,14],"405":[1,1,29],"406":[1,1,10],"407":[1,1,70],"408":[1,1,56],"409":[1,1,13],"410":[1,1,1],"411":[1,1,13],"412":[1,1,3],"413":[3,1,12],"414":[4,1,2],"415":[4,1,21],"416":[2,5,38],"417":[3,1,13],"418":[1,1,6],"419":[3,1,1],"420":[1,3,6],"421":[1,3,30],"422":[1,3,1],"423":[1,4,16],"424":[2,3,1],"425":[1,5,14],"426":[1,5,9],"427":[1,5,5],"428":[1,1,1],"429":[1,1,6],"430":[1,1,23],"431":[2,1,1],"432":[1,2,15],"433":[1,2,30],"434":[3,1,11],"435":[2,3,15],"436":[2,3,9],"437":[1,5,17],"438":[1,5,15],"439":[1,5,15],"440":[1,5,12],"441":[1,5,14],"442":[2,3,8],"443":[1,3,14],"444":[1,1,30],"445":[1,1,8],"446":[1,1,2],"447":[1,1,111],"448":[1,1,4],"449":[1,1,25],"450":[1,2,10],"451":[1,2,6],"452":[1,2,27],"453":[1,1,42],"454":[1,1,20],"455":[1,1,39],"456":[2,1,49],"457":[1,1,74],"458":[1,1,28],"459":[1,1,47],"460":[1,1,23],"461":[3,2,27],"462":[4,2,74],"463":[4,2,107],"464":[4,2,80],"465":[1,1,209],"466":[1,1,22],"467":[1,2,5],"468":[1,2,29],"469":[2,2,59],"470":[1,2,44],"471":[1,2,21],"472":[1,2,17],"473":[3,2,28],"474":[1,1,106],"475":[1,1,24],"476":[1,1,45],"477":[4,1,18],"478":[2,1,16],"479":[1,1,4],"480":[1,1,52],"481":[1,1,21],"482":[1,1,1],"483":[1,1,12],"484":[1,1,18],"485":[2,1,4],"486":[1,1,9],"487":[1,1,33],"488":[2,1,25],"489":[1,1,13],"490":[1,1,71],"491":[3,1,9],"492":[1,1,6],"493":[1,1,36],"494":[1,1,2],"495":[2,1,33],"496":[1,1,4],"497":[1,1,13],"498":[1,1,24],"499":[3,2,13],"500":[3,2,6],"501":[3,2,32],"502":[1,1,38],"503":[1,1,68],"504":[5,2,19],"505":[5,2,14],"506":[5,2,17],"507":[5,2,32],"508":[5,2,29],"509":[5,2,51],"510":[5,2,57],"511":[5,2,18],"512":[1,1,49],"513":[3,2,29],"514":[3,2,69],"515":[3,2,8],"516":[1,4,10],"517":[1,4,30],"518":[1,4,25],"519":[1,4,34],"520":[3,2,5],"521":[3,2,25],"522":[3,2,18],"523":[3,2,34],"524":[3,2,27],"525":[1,1,14],"526":[1,1,32],"527":[1,1,50],"528":[1,1,3],"529":[1,1,106],"530":[1,1,24],"531":[1,1,45],"532":[4,1,18],"533":[1,1,8],"534":[1,1,20],"535":[1,2,5],"536":[1,2,29],"537":[2,2,70],"538":[1,2,44],"539":[1,2,40],"540":[1,2,17],"541":[3,2,28],"542":[1,1,11],"543":[1,2,28],"544":[1,2,234],"545":[1,1,21],"546":[1,1,108],"547":[1,1,1],"548":[1,1,10],"549":[5,1,3],"550":[1,5,17],"551":[1,5,9],"552":[1,5,7],"553":[1,5,31],"554":[1,5,11],"555":[3,5,4],"556":[2,5,63],"557":[2,5,18],"558":[2,5,17],"559":[2,5,14],"560":[2,5,10],"561":[2,5,31],"562":[3,5,13],"563":[2,5,24],"564":[2,5,2],"565":[1,5,4],"566":[1,5,35],"567":[2,5,19],"568":[3,5,18],"569":[2,5,15],"570":[1,5,67],"571":[1,5,18],"572":[1,5,7],"573":[1,5,9],"574":[3,5,5],"575":[3,5,7],"576":[2,5,27],"577":[2,5,10],"578":[2,5,50],"579":[2,5,10],"580":[4,1,2],"581":[1,4,60],"582":[1,4,5],"583":[1,4,16],"584":[1,4,7],"585":[2,4,6],"586":[2,4,25],"587":[2,4,24],"588":[3,4,11],"589":[2,4,4],"590":[1,4,8],"591":[3,4,17],"592":[1,4,6],"593":[1,4,6],"594":[1,4,5],"595":[1,1,1],"596":[3,1,7],"597":[1,1,9],"598":[1,1,1],"599":[1,1,10],"600":[5,1,3],"601":[1,5,17],"602":[1,5,9],"603":[1,5,7],"604":[1,5,31],"605":[1,5,11],"606":[3,5,4],"607":[2,5,62],"608":[2,5,18],"609":[2,5,17],"610":[2,5,14],"611":[2,5,10],"612":[3,5,13],"613":[2,5,24],"614":[2,5,2],"615":[1,5,4],"616":[1,5,35],"617":[2,5,19],"618":[3,5,19],"619":[2,5,15],"620":[1,5,67],"621":[1,5,7],"622":[1,5,8],"623":[3,5,5],"624":[3,5,7],"625":[2,5,27],"626":[2,5,11],"627":[2,5,51],"628":[2,5,11],"629":[1,5,1],"630":[1,5,29],"631":[4,1,2],"632":[1,4,60],"633":[1,4,5],"634":[1,4,16],"635":[1,4,7],"636":[2,4,27],"637":[2,4,25],"638":[3,4,12],"639":[2,4,4],"640":[3,4,7],"641":[1,4,6],"642":[1,4,6],"643":[1,4,5],"644":[1,1,1],"645":[1,1,7],"646":[1,1,1],"647":[1,1,33],"648":[1,1,10],"649":[1,1,16],"650":[1,1,1],"651":[2,1,10],"652":[1,1,8],"653":[1,1,6],"654":[1,1,6],"655":[1,1,1],"656":[1,1,13],"657":[4,1,23],"658":[1,1,17],"659":[1,1,1],"660":[1,1,15],"661":[1,1,1],"662":[1,1,12],"663":[1,1,26],"664":[1,1,24],"665":[1,1,24],"666":[1,1,54],"667":[3,1,37],"668":[1,1,26],"669":[4,1,16],"670":[1,1,1],"671":[2,2,15],"672":[2,2,26],"673":[1,1,1],"674":[1,2,29],"675":[1,2,15],"676":[1,1,29],"677":[1,1,28],"678":[1,1,10],"679":[2,1,24],"680":[1,1,17],"681":[1,1,34],"682":[1,1,5],"683":[1,1,18]},"averageFieldLength":[1.6388888888888893,1.9970760233918132,26.11111111111113],"storedFields":{"0":{"title":"免責事項","titles":[]},"1":{"title":"前提条件","titles":["免責事項"]},"2":{"title":"名前の構成要素","titles":["免責事項"]},"3":{"title":"環境 ({env})","titles":["免責事項","名前の構成要素"]},"4":{"title":"環境識別子","titles":["免責事項","名前の構成要素","環境 ({env})"]},"5":{"title":"同一目的の複数環境","titles":["免責事項","名前の構成要素","環境 ({env})"]},"6":{"title":"役割 ({role})","titles":["免責事項","名前の構成要素"]},"7":{"title":"用途 ({usage})","titles":["免責事項","名前の構成要素"]},"8":{"title":"リージョン ({region})","titles":["免責事項","名前の構成要素"]},"9":{"title":"アベイラビリティゾーン ({az})","titles":["免責事項","名前の構成要素"]},"10":{"title":"アクセス修飾子 ({access})","titles":["免責事項","名前の構成要素"]},"11":{"title":"全体ポリシー","titles":["免責事項"]},"12":{"title":"命名規約","titles":["免責事項","全体ポリシー"]},"13":{"title":"利用可能な文字","titles":["免責事項","全体ポリシー"]},"14":{"title":"AWS サービス名を含めない","titles":["免責事項","全体ポリシー"]},"15":{"title":"プロジェクト名を含めない","titles":["免責事項","全体ポリシー"]},"16":{"title":"マルチクラウドを考慮し、aws 識別子を追加するかどうか","titles":["免責事項","全体ポリシー"]},"17":{"title":"サービス別の命名規約","titles":["免責事項"]},"18":{"title":"VPC","titles":["免責事項","サービス別の命名規約"]},"19":{"title":"API Gateway","titles":["免責事項","サービス別の命名規約"]},"20":{"title":"EC2","titles":["免責事項","サービス別の命名規約"]},"21":{"title":"LB","titles":["免責事項","サービス別の命名規約"]},"22":{"title":"ECS","titles":["免責事項","サービス別の命名規約"]},"23":{"title":"Lambda","titles":["免責事項","サービス別の命名規約"]},"24":{"title":"Lambda Function","titles":["免責事項","サービス別の命名規約","Lambda"]},"25":{"title":"Lambda Layer","titles":["免責事項","サービス別の命名規約","Lambda"]},"26":{"title":"RDS/Aurora","titles":["免責事項","サービス別の命名規約"]},"27":{"title":"DynamoDB","titles":["免責事項","サービス別の命名規約"]},"28":{"title":"S3 Bucket","titles":["免責事項","サービス別の命名規約"]},"29":{"title":"Kinesis Data Streams","titles":["免責事項","サービス別の命名規約"]},"30":{"title":"SQS","titles":["免責事項","サービス別の命名規約"]},"31":{"title":"Event Bridge Rule","titles":["免責事項","サービス別の命名規約"]},"32":{"title":"IAM","titles":["免責事項","サービス別の命名規約"]},"33":{"title":"IAM ユーザー","titles":["免責事項","サービス別の命名規約","IAM"]},"34":{"title":"IAM グループ","titles":["免責事項","サービス別の命名規約","IAM"]},"35":{"title":"IAM ロール","titles":["免責事項","サービス別の命名規約","IAM"]},"36":{"title":"IAM ポリシー","titles":["免責事項","サービス別の命名規約","IAM"]},"37":{"title":"タグの命名","titles":["免責事項"]},"38":{"title":"タグキー","titles":["免責事項","タグの命名"]},"39":{"title":"タグ値","titles":["免責事項","タグの命名"]},"40":{"title":"タグポリシー","titles":["免責事項","タグの命名"]},"41":{"title":"License","titles":[]},"42":{"title":"コミットメッセージ規約","titles":[]},"43":{"title":"type","titles":["コミットメッセージ規約"]},"44":{"title":"subject","titles":["コミットメッセージ規約"]},"45":{"title":"gitmoji","titles":["コミットメッセージ規約"]},"46":{"title":"コミットメッセージ例","titles":["コミットメッセージ規約"]},"47":{"title":"Resources","titles":[]},"48":{"title":"はじめに","titles":[]},"49":{"title":"免責事項","titles":[]},"50":{"title":"基本方針","titles":[]},"51":{"title":"ブランチの種類","titles":[]},"52":{"title":"mainブランチ","titles":["ブランチの種類"]},"53":{"title":"featureブランチ","titles":["ブランチの種類"]},"54":{"title":"developブランチ","titles":["ブランチの種類"]},"55":{"title":"releaseブランチ","titles":["ブランチの種類"]},"56":{"title":"hotfixブランチ","titles":["ブランチの種類"]},"57":{"title":"topicブランチ","titles":["ブランチの種類"]},"58":{"title":"ブランチ戦略の選定","titles":[]},"59":{"title":"ブランチ戦略とデプロイメント環境","titles":[]},"60":{"title":"ブランチ戦略の拡張","titles":[]},"61":{"title":"1. developブランチを複数作成する場合","titles":["ブランチ戦略の拡張"]},"62":{"title":"develop2のリリース手順","titles":["ブランチ戦略の拡張","1. developブランチを複数作成する場合"]},"63":{"title":"2. 過去バージョンをサポートする場合","titles":["ブランチ戦略の拡張"]},"64":{"title":"マージ戦略の選定","titles":[]},"65":{"title":"1. developブランチからfeatureブランチへ変更を取り込む","titles":["マージ戦略の選定"]},"66":{"title":"2. featureブランチからdevelopブランチへ変更を取り込む","titles":["マージ戦略の選定"]},"67":{"title":"3. 永続ブランチ間で変更を取り込む","titles":["マージ戦略の選定"]},"68":{"title":"ブランチ運用アンチパターン","titles":[]},"69":{"title":"追い抜きリリース","titles":["ブランチ運用アンチパターン"]},"70":{"title":"コミットメッセージ規則","titles":[]},"71":{"title":"ブランチ命名規則","titles":[]},"72":{"title":"タグ規則","titles":[]},"73":{"title":"タグの運用ルール","titles":["タグ規則"]},"74":{"title":"タグの命名規則","titles":["タグ規則"]},"75":{"title":"タグメッセージの規則","titles":["タグ規則"]},"76":{"title":"バージョンアップ規則","titles":["タグ規則"]},"77":{"title":"ラベル規則","titles":[]},"78":{"title":"ローカルでのGit操作","titles":[]},"79":{"title":"gitコマンド","titles":["ローカルでのGit操作"]},"80":{"title":"VS Code","titles":["ローカルでのGit操作"]},"81":{"title":"推奨設定","titles":[]},"82":{"title":"git config推奨設定","titles":["推奨設定"]},"83":{"title":"git-secrets","titles":["推奨設定"]},"84":{"title":"GitHub推奨設定","titles":["推奨設定"]},"85":{"title":"General","titles":["推奨設定","GitHub推奨設定"]},"86":{"title":"Access","titles":["推奨設定","GitHub推奨設定"]},"87":{"title":"Code and automation","titles":["推奨設定","GitHub推奨設定"]},"88":{"title":"Branches","titles":["推奨設定","GitHub推奨設定","Code and automation"]},"89":{"title":"Tags","titles":["推奨設定","GitHub推奨設定","Code and automation"]},"90":{"title":"GitHub Actions","titles":["推奨設定","GitHub推奨設定","Code and automation"]},"91":{"title":"Code security and analysis","titles":["推奨設定","GitHub推奨設定","Code and automation"]},"92":{"title":"GitLab推奨設定","titles":["推奨設定"]},"93":{"title":"設定ファイル","titles":["推奨設定"]},"94":{"title":".gitattribute","titles":["推奨設定","設定ファイル"]},"95":{"title":".gitignore","titles":["推奨設定","設定ファイル"]},"96":{"title":"個人用のファイルをGit管理対象外とする","titles":["推奨設定","設定ファイル"]},"97":{"title":"Pull Request / Merge Request テンプレート","titles":["推奨設定","設定ファイル"]},"98":{"title":"Gitブランチフロー規約","titles":[]},"99":{"title":"開発ブランチに機能ブランチの変更を取り込む方法","titles":[]},"100":{"title":"GitHubの場合","titles":["開発ブランチに機能ブランチの変更を取り込む方法"]},"101":{"title":"1. マージコミット","titles":["開発ブランチに機能ブランチの変更を取り込む方法","GitHubの場合"]},"102":{"title":"2. リベース","titles":["開発ブランチに機能ブランチの変更を取り込む方法","GitHubの場合"]},"103":{"title":"3. スカッシュマージ","titles":["開発ブランチに機能ブランチの変更を取り込む方法","GitHubの場合"]},"104":{"title":"GitLabを利用するの手順","titles":["開発ブランチに機能ブランチの変更を取り込む方法"]},"105":{"title":"1. Merge commit","titles":["開発ブランチに機能ブランチの変更を取り込む方法","GitLabを利用するの手順"]},"106":{"title":"2. Merge commit with semi-linear history","titles":["開発ブランチに機能ブランチの変更を取り込む方法","GitLabを利用するの手順"]},"107":{"title":"3. Fast-forward merge","titles":["開発ブランチに機能ブランチの変更を取り込む方法","GitLabを利用するの手順"]},"108":{"title":"機能ブランチに開発ブランチの変更を取り込む方法","titles":[]},"109":{"title":"1. マージコミット","titles":["機能ブランチに開発ブランチの変更を取り込む方法"]},"110":{"title":"2. リベース","titles":["機能ブランチに開発ブランチの変更を取り込む方法"]},"111":{"title":"はじめに","titles":[]},"112":{"title":"規約の重要性","titles":[]},"113":{"title":"コーディングの心得","titles":["規約の重要性"]},"114":{"title":"見やすさを重視せよ","titles":["規約の重要性","コーディングの心得"]},"115":{"title":"ネーミングはわかりやすく","titles":["規約の重要性","コーディングの心得"]},"116":{"title":"サンプルを鵜呑みにしない","titles":["規約の重要性","コーディングの心得"]},"117":{"title":"同じコードは二度書かない","titles":["規約の重要性","コーディングの心得"]},"118":{"title":"役割は一つに","titles":["規約の重要性","コーディングの心得"]},"119":{"title":"ネーミング規約","titles":[]},"120":{"title":"全般","titles":["ネーミング規約"]},"121":{"title":"パッケージ","titles":["ネーミング規約"]},"122":{"title":"クラス","titles":["ネーミング規約"]},"123":{"title":"メソッド","titles":["ネーミング規約"]},"124":{"title":"引数","titles":["ネーミング規約"]},"125":{"title":"変数全般","titles":["ネーミング規約"]},"126":{"title":"ローカル変数","titles":["ネーミング規約"]},"127":{"title":"Enum","titles":["ネーミング規約"]},"128":{"title":"コーディング規約","titles":[]},"129":{"title":"全般","titles":["コーディング規約"]},"130":{"title":"フォーマット","titles":["コーディング規約"]},"131":{"title":"コメント","titles":["コーディング規約"]},"132":{"title":"インポート","titles":["コーディング規約"]},"133":{"title":"コンストラクタ","titles":["コーディング規約"]},"134":{"title":"メソッド","titles":["コーディング規約"]},"135":{"title":"クラスメソッド","titles":["コーディング規約"]},"136":{"title":"変数全般","titles":["コーディング規約"]},"137":{"title":"定数","titles":["コーディング規約"]},"138":{"title":"インスタンス変数","titles":["コーディング規約"]},"139":{"title":"クラス変数","titles":["コーディング規約"]},"140":{"title":"ローカル変数","titles":["コーディング規約"]},"141":{"title":"引数","titles":["コーディング規約"]},"142":{"title":"継承","titles":["コーディング規約"]},"143":{"title":"インナークラス","titles":["コーディング規約"]},"144":{"title":"メンバー順序","titles":["コーディング規約"]},"145":{"title":"インスタンス","titles":["コーディング規約"]},"146":{"title":"制御構造","titles":["コーディング規約"]},"147":{"title":"文字列操作","titles":["コーディング規約"]},"148":{"title":"数値","titles":["コーディング規約"]},"149":{"title":"日付","titles":["コーディング規約"]},"150":{"title":"三項演算子","titles":["コーディング規約"]},"151":{"title":"switch 式","titles":["コーディング規約"]},"152":{"title":"switch 文","titles":["コーディング規約"]},"153":{"title":"コレクション","titles":["コーディング規約"]},"154":{"title":"ラムダ式・メソッド参照・コンストラクタ参照","titles":["コーディング規約"]},"155":{"title":"実質的 final(effectively final)","titles":["コーディング規約"]},"156":{"title":"Stream API","titles":["コーディング規約"]},"157":{"title":"Optional","titles":["コーディング規約"]},"158":{"title":"var (Local-Variable Type Inference)","titles":["コーディング規約"]},"159":{"title":"レコード","titles":["コーディング規約"]},"160":{"title":"テキストブロック","titles":["コーディング規約"]},"161":{"title":"ストリーム(InputStream OutputStream)","titles":["コーディング規約"]},"162":{"title":"リソースの解放","titles":["コーディング規約"]},"163":{"title":"例外","titles":["コーディング規約"]},"164":{"title":"ガベージコレクション","titles":["コーディング規約"]},"165":{"title":"コメント規約","titles":[]},"166":{"title":"よいコメントの鉄則","titles":["コメント規約"]},"167":{"title":"Java コメント(3 種類)の使い分け","titles":["コメント規約"]},"168":{"title":"パフォーマンス","titles":[]},"169":{"title":"Stream API","titles":["パフォーマンス"]},"170":{"title":"ラムダ式・メソッド参照・コンストラクタ参照","titles":["パフォーマンス"]},"171":{"title":"文字列連結","titles":["パフォーマンス"]},"172":{"title":"文字列連結(繰り返し)","titles":["パフォーマンス","文字列連結"]},"173":{"title":"文字列連結(定数)","titles":["パフォーマンス","文字列連結"]},"174":{"title":"List の種類","titles":["パフォーマンス"]},"175":{"title":"BigDecimal の ZERO との比較","titles":["パフォーマンス"]},"176":{"title":"License","titles":[]},"177":{"title":"VSCode上でのGit操作","titles":[]},"178":{"title":"推奨する拡張機能","titles":["VSCode上でのGit操作"]},"179":{"title":"リポジトリのクローン (git clone)","titles":["VSCode上でのGit操作"]},"180":{"title":"コミットグラフの表示","titles":["VSCode上でのGit操作"]},"181":{"title":"リモートのフェッチ/プル (git fetch / git pull)","titles":["VSCode上でのGit操作"]},"182":{"title":"ブランチの作成/チェックアウト (git branch / git checkout)","titles":["VSCode上でのGit操作"]},"183":{"title":"ステージ/コミット/プッシュ (git add / git commit / git push)","titles":["VSCode上でのGit操作"]},"184":{"title":"リバート (git revert)","titles":["VSCode上でのGit操作"]},"185":{"title":"マージ (git merge)","titles":["VSCode上でのGit操作"]},"186":{"title":"リベース (git rebase)","titles":["VSCode上でのGit操作"]},"187":{"title":"スタッシュ (git stash)","titles":["VSCode上でのGit操作"]},"188":{"title":"はじめに","titles":[]},"189":{"title":"規約の重要性","titles":[]},"190":{"title":"コーディングの心得","titles":["規約の重要性"]},"191":{"title":"見やすさを重視せよ","titles":["規約の重要性","コーディングの心得"]},"192":{"title":"ネーミングはわかりやすく","titles":["規約の重要性","コーディングの心得"]},"193":{"title":"サンプルを鵜呑みにしない","titles":["規約の重要性","コーディングの心得"]},"194":{"title":"同じコードは二度書かない","titles":["規約の重要性","コーディングの心得"]},"195":{"title":"役割は一つに","titles":["規約の重要性","コーディングの心得"]},"196":{"title":"ネーミング規約","titles":[]},"197":{"title":"全般","titles":["ネーミング規約"]},"198":{"title":"パッケージ","titles":["ネーミング規約"]},"199":{"title":"クラス","titles":["ネーミング規約"]},"200":{"title":"メソッド","titles":["ネーミング規約"]},"201":{"title":"引数","titles":["ネーミング規約"]},"202":{"title":"変数全般","titles":["ネーミング規約"]},"203":{"title":"ローカル変数","titles":["ネーミング規約"]},"204":{"title":"Enum","titles":["ネーミング規約"]},"205":{"title":"コーディング規約","titles":[]},"206":{"title":"全般","titles":["コーディング規約"]},"207":{"title":"フォーマット","titles":["コーディング規約"]},"208":{"title":"コメント","titles":["コーディング規約"]},"209":{"title":"インポート","titles":["コーディング規約"]},"210":{"title":"コンストラクタ","titles":["コーディング規約"]},"211":{"title":"メソッド","titles":["コーディング規約"]},"212":{"title":"クラスメソッド","titles":["コーディング規約"]},"213":{"title":"変数全般","titles":["コーディング規約"]},"214":{"title":"定数","titles":["コーディング規約"]},"215":{"title":"インスタンス変数","titles":["コーディング規約"]},"216":{"title":"クラス変数","titles":["コーディング規約"]},"217":{"title":"ローカル変数","titles":["コーディング規約"]},"218":{"title":"引数","titles":["コーディング規約"]},"219":{"title":"継承","titles":["コーディング規約"]},"220":{"title":"インナークラス","titles":["コーディング規約"]},"221":{"title":"メンバー順序","titles":["コーディング規約"]},"222":{"title":"インスタンス","titles":["コーディング規約"]},"223":{"title":"制御構造","titles":["コーディング規約"]},"224":{"title":"文字列操作","titles":["コーディング規約"]},"225":{"title":"数値","titles":["コーディング規約"]},"226":{"title":"日付","titles":["コーディング規約"]},"227":{"title":"三項演算子","titles":["コーディング規約"]},"228":{"title":"コレクション","titles":["コーディング規約"]},"229":{"title":"ラムダ式・メソッド参照・コンストラクタ参照","titles":["コーディング規約"]},"230":{"title":"実質的 final(effectively final)","titles":["コーディング規約"]},"231":{"title":"Stream API","titles":["コーディング規約"]},"232":{"title":"Optional","titles":["コーディング規約"]},"233":{"title":"var (Local-Variable Type Inference)","titles":["コーディング規約"]},"234":{"title":"ストリーム(InputStream OutputStream)","titles":["コーディング規約"]},"235":{"title":"リソースの解放","titles":["コーディング規約"]},"236":{"title":"例外","titles":["コーディング規約"]},"237":{"title":"ガベージコレクション","titles":["コーディング規約"]},"238":{"title":"コメント規約","titles":[]},"239":{"title":"よいコメントの鉄則","titles":["コメント規約"]},"240":{"title":"Java コメント(3 種類)の使い分け","titles":["コメント規約"]},"241":{"title":"パフォーマンス","titles":[]},"242":{"title":"Stream API","titles":["パフォーマンス"]},"243":{"title":"ラムダ式・メソッド参照・コンストラクタ参照","titles":["パフォーマンス"]},"244":{"title":"文字列連結","titles":["パフォーマンス"]},"245":{"title":"文字列連結(繰り返し)","titles":["パフォーマンス","文字列連結"]},"246":{"title":"文字列連結(定数)","titles":["パフォーマンス","文字列連結"]},"247":{"title":"List の種類","titles":["パフォーマンス"]},"248":{"title":"String から Integer・Long への変換","titles":["パフォーマンス"]},"249":{"title":"String から int・long への変換","titles":["パフォーマンス"]},"250":{"title":"BigDecimal の ZERO との比較","titles":["パフォーマンス"]},"251":{"title":"License","titles":[]},"252":{"title":"はじめに","titles":[]},"253":{"title":"規約の重要性","titles":[]},"254":{"title":"コーディングの心得","titles":["規約の重要性"]},"255":{"title":"見やすさを重視せよ","titles":["規約の重要性","コーディングの心得"]},"256":{"title":"ネーミングはわかりやすく","titles":["規約の重要性","コーディングの心得"]},"257":{"title":"サンプルを鵜呑みにしない","titles":["規約の重要性","コーディングの心得"]},"258":{"title":"同じコードは二度書かない","titles":["規約の重要性","コーディングの心得"]},"259":{"title":"役割は一つに","titles":["規約の重要性","コーディングの心得"]},"260":{"title":"ネーミング規約","titles":[]},"261":{"title":"全般","titles":["ネーミング規約"]},"262":{"title":"パッケージ","titles":["ネーミング規約"]},"263":{"title":"クラス","titles":["ネーミング規約"]},"264":{"title":"メソッド","titles":["ネーミング規約"]},"265":{"title":"引数","titles":["ネーミング規約"]},"266":{"title":"変数全般","titles":["ネーミング規約"]},"267":{"title":"ローカル変数","titles":["ネーミング規約"]},"268":{"title":"Enum","titles":["ネーミング規約"]},"269":{"title":"コーディング規約","titles":[]},"270":{"title":"全般","titles":["コーディング規約"]},"271":{"title":"フォーマット","titles":["コーディング規約"]},"272":{"title":"コメント","titles":["コーディング規約"]},"273":{"title":"インポート","titles":["コーディング規約"]},"274":{"title":"コンストラクタ","titles":["コーディング規約"]},"275":{"title":"メソッド","titles":["コーディング規約"]},"276":{"title":"クラスメソッド","titles":["コーディング規約"]},"277":{"title":"変数全般","titles":["コーディング規約"]},"278":{"title":"定数","titles":["コーディング規約"]},"279":{"title":"インスタンス変数","titles":["コーディング規約"]},"280":{"title":"クラス変数","titles":["コーディング規約"]},"281":{"title":"ローカル変数","titles":["コーディング規約"]},"282":{"title":"引数","titles":["コーディング規約"]},"283":{"title":"継承","titles":["コーディング規約"]},"284":{"title":"インナークラス","titles":["コーディング規約"]},"285":{"title":"メンバー順序","titles":["コーディング規約"]},"286":{"title":"インスタンス","titles":["コーディング規約"]},"287":{"title":"制御構造","titles":["コーディング規約"]},"288":{"title":"文字列操作","titles":["コーディング規約"]},"289":{"title":"数値","titles":["コーディング規約"]},"290":{"title":"日付","titles":["コーディング規約"]},"291":{"title":"三項演算子","titles":["コーディング規約"]},"292":{"title":"コレクション","titles":["コーディング規約"]},"293":{"title":"ラムダ式・メソッド参照・コンストラクタ参照","titles":["コーディング規約"]},"294":{"title":"実質的 final(effectively final)","titles":["コーディング規約"]},"295":{"title":"Stream API","titles":["コーディング規約"]},"296":{"title":"Optional","titles":["コーディング規約"]},"297":{"title":"ストリーム(InputStream OutputStream)","titles":["コーディング規約"]},"298":{"title":"リソースの解放","titles":["コーディング規約"]},"299":{"title":"例外","titles":["コーディング規約"]},"300":{"title":"ガベージコレクション","titles":["コーディング規約"]},"301":{"title":"コメント規約","titles":[]},"302":{"title":"よいコメントの鉄則","titles":["コメント規約"]},"303":{"title":"Java コメント(3 種類)の使い分け","titles":["コメント規約"]},"304":{"title":"パフォーマンス","titles":[]},"305":{"title":"Stream API","titles":["パフォーマンス"]},"306":{"title":"ラムダ式・メソッド参照・コンストラクタ参照","titles":["パフォーマンス"]},"307":{"title":"文字列連結","titles":["パフォーマンス"]},"308":{"title":"文字列連結(繰り返し)","titles":["パフォーマンス","文字列連結"]},"309":{"title":"文字列連結(定数)","titles":["パフォーマンス","文字列連結"]},"310":{"title":"List の種類","titles":["パフォーマンス"]},"311":{"title":"String から Integer・Long への変換","titles":["パフォーマンス"]},"312":{"title":"String から int・long への変換","titles":["パフォーマンス"]},"313":{"title":"BigDecimal の ZERO との比較","titles":["パフォーマンス"]},"314":{"title":"License","titles":[]},"315":{"title":"For Java17","titles":[]},"316":{"title":"For Old Versions","titles":[]},"317":{"title":"Resources","titles":[]},"318":{"title":"IF01 設備有効開始受信","titles":[]},"319":{"title":"対向システム","titles":["IF01 設備有効開始受信"]},"320":{"title":"環境情報","titles":["IF01 設備有効開始受信"]},"321":{"title":"Input","titles":["IF01 設備有効開始受信","環境情報"]},"322":{"title":"Output","titles":["IF01 設備有効開始受信","環境情報"]},"323":{"title":"連携元定義","titles":["IF01 設備有効開始受信"]},"324":{"title":"項目定義","titles":["IF01 設備有効開始受信","連携元定義"]},"325":{"title":"サンプル","titles":["IF01 設備有効開始受信","連携元定義","項目定義"]},"326":{"title":"連携先定義","titles":["IF01 設備有効開始受信"]},"327":{"title":"処理概要","titles":["IF01 設備有効開始受信"]},"328":{"title":"処理シーケンス","titles":["IF01 設備有効開始受信"]},"329":{"title":"DB 項目","titles":["IF01 設備有効開始受信"]},"330":{"title":"参照","titles":["IF01 設備有効開始受信","DB 項目"]},"331":{"title":"登録","titles":["IF01 設備有効開始受信","DB 項目"]},"332":{"title":"更新","titles":["IF01 設備有効開始受信","DB 項目"]},"333":{"title":"ビジネスロジック","titles":["IF01 設備有効開始受信"]},"334":{"title":"エラー処理","titles":["IF01 設備有効開始受信"]},"335":{"title":"[UIM01] ログイン","titles":[]},"336":{"title":"概要","titles":["[UIM01] ログイン"]},"337":{"title":"イベント概要","titles":["[UIM01] ログイン"]},"338":{"title":"イベント詳細","titles":["[UIM01] ログイン"]},"339":{"title":"1. 初期表示","titles":["[UIM01] ログイン","イベント詳細"]},"340":{"title":"2. ログインする","titles":["[UIM01] ログイン","イベント詳細"]},"341":{"title":"3. 会員登録","titles":["[UIM01] ログイン","イベント詳細"]},"342":{"title":"[UIM02] トレーナー検索","titles":[]},"343":{"title":"概要","titles":["[UIM02] トレーナー検索"]},"344":{"title":"イベント概要","titles":["[UIM02] トレーナー検索"]},"345":{"title":"イベント詳細","titles":["[UIM02] トレーナー検索"]},"346":{"title":"1. 初期表示","titles":["[UIM02] トレーナー検索","イベント詳細"]},"347":{"title":"2. 検索","titles":["[UIM02] トレーナー検索","イベント詳細"]},"348":{"title":"[UIM03] カレンダー予約","titles":[]},"349":{"title":"概要","titles":["[UIM03] カレンダー予約"]},"350":{"title":"イベント概要","titles":["[UIM03] カレンダー予約"]},"351":{"title":"イベント詳細","titles":["[UIM03] カレンダー予約"]},"352":{"title":"1. 初期表示","titles":["[UIM03] カレンダー予約","イベント詳細"]},"353":{"title":"2. 日時設定","titles":["[UIM03] カレンダー予約","イベント詳細"]},"354":{"title":"3. 日時指定","titles":["[UIM03] カレンダー予約","イベント詳細"]},"355":{"title":"[UIM04] 決済","titles":[]},"356":{"title":"概要","titles":["[UIM04] 決済"]},"357":{"title":"イベント概要","titles":["[UIM04] 決済"]},"358":{"title":"イベント詳細","titles":["[UIM04] 決済"]},"359":{"title":"1. 初期表示","titles":["[UIM04] 決済","イベント詳細"]},"360":{"title":"2. 日時指定に戻る","titles":["[UIM04] 決済","イベント詳細"]},"361":{"title":"3. 決済","titles":["[UIM04] 決済","イベント詳細"]},"362":{"title":"[UIS01] トップページ","titles":[]},"363":{"title":"概要","titles":["[UIS01] トップページ"]},"364":{"title":"イベント概要","titles":["[UIS01] トップページ"]},"365":{"title":"イベント詳細","titles":["[UIS01] トップページ"]},"366":{"title":"1. 初期表示","titles":["[UIS01] トップページ","イベント詳細"]},"367":{"title":"2. トレーナーを探す","titles":["[UIS01] トップページ","イベント詳細"]},"368":{"title":"3. 会員登録/ログイン","titles":["[UIS01] トップページ","イベント詳細"]},"369":{"title":"[UIS02] マイページ","titles":[]},"370":{"title":"概要","titles":["[UIS02] マイページ"]},"371":{"title":"イベント概要","titles":["[UIS02] マイページ"]},"372":{"title":"イベント詳細","titles":["[UIS02] マイページ"]},"373":{"title":"1. 初期表示","titles":["[UIS02] マイページ","イベント詳細"]},"374":{"title":"2. トレーナーを探す","titles":["[UIS02] マイページ","イベント詳細"]},"375":{"title":"3. 受講完了確認","titles":["[UIS02] マイページ","イベント詳細"]},"376":{"title":"4. 受講完了","titles":["[UIS02] マイページ","イベント詳細"]},"377":{"title":"[UIS03] トレーナー一覧","titles":[]},"378":{"title":"概要","titles":["[UIS03] トレーナー一覧"]},"379":{"title":"イベント概要","titles":["[UIS03] トレーナー一覧"]},"380":{"title":"イベント詳細","titles":["[UIS03] トレーナー一覧"]},"381":{"title":"1. 初期表示","titles":["[UIS03] トレーナー一覧","イベント詳細"]},"382":{"title":"2. トレーナー詳細","titles":["[UIS03] トレーナー一覧","イベント詳細"]},"383":{"title":"3. トレーナー検索","titles":["[UIS03] トレーナー一覧","イベント詳細"]},"384":{"title":"[UIS04] トレーナー詳細","titles":[]},"385":{"title":"概要","titles":["[UIS04] トレーナー詳細"]},"386":{"title":"イベント概要","titles":["[UIS04] トレーナー詳細"]},"387":{"title":"イベント詳細","titles":["[UIS04] トレーナー詳細"]},"388":{"title":"1. 初期表示","titles":["[UIS04] トレーナー詳細","イベント詳細"]},"389":{"title":"2. トレーニングコース決定","titles":["[UIS04] トレーナー詳細","イベント詳細"]},"390":{"title":"画面","titles":[]},"391":{"title":"標準画面","titles":["画面"]},"392":{"title":"モーダル画面","titles":["画面"]},"393":{"title":"Web API","titles":[]},"394":{"title":"テーブル一覧","titles":[]},"395":{"title":"Future Muscle Partner","titles":[]},"396":{"title":"サービスコンセプト","titles":["Future Muscle Partner"]},"397":{"title":"フォルダ階層","titles":["Future Muscle Partner"]},"398":{"title":"設計書","titles":["Future Muscle Partner"]},"399":{"title":"docs","titles":[]},"400":{"title":"フォルダ階層","titles":["docs"]},"401":{"title":"設計書","titles":["docs"]},"402":{"title":"コード体系","titles":["docs"]},"403":{"title":"画面設計書の記載方針","titles":["docs"]},"404":{"title":"前提","titles":[]},"405":{"title":"本規約で紹介する設計ドキュメントの位置付け","titles":[]},"406":{"title":"テキストベースにおける設計書の注意点","titles":[]},"407":{"title":"フォルダ階層の推奨","titles":[]},"408":{"title":"システム構成図","titles":[]},"409":{"title":"フロントエンド","titles":[]},"410":{"title":"バックエンド","titles":[]},"411":{"title":"テーブル定義書","titles":["バックエンド"]},"412":{"title":"区分値","titles":["バックエンド"]},"413":{"title":"Web API 設計書","titles":["バックエンド"]},"414":{"title":"プログラム設計書(バッチ、非同期タスクなど)","titles":["バックエンド"]},"415":{"title":"プログラム設計書(Web API)","titles":["バックエンド"]},"416":{"title":"Web API応答例","titles":["バックエンド","プログラム設計書(Web API)"]},"417":{"title":"I/F 定義書","titles":["バックエンド"]},"418":{"title":"Resources","titles":[]},"419":{"title":"BAT01 xxx 計算","titles":[]},"420":{"title":"処理概要","titles":["BAT01 xxx 計算"]},"421":{"title":"処理シーケンス","titles":["BAT01 xxx 計算"]},"422":{"title":"ビジネスロジック","titles":["BAT01 xxx 計算"]},"423":{"title":"ビジネスロジック1","titles":["BAT01 xxx 計算","ビジネスロジック"]},"424":{"title":"DB 項目","titles":["BAT01 xxx 計算"]},"425":{"title":"取得","titles":["BAT01 xxx 計算","DB 項目"]},"426":{"title":"登録","titles":["BAT01 xxx 計算","DB 項目"]},"427":{"title":"更新","titles":["BAT01 xxx 計算","DB 項目"]},"428":{"title":"MSG01","titles":[]},"429":{"title":"メッセージ概要","titles":["MSG01"]},"430":{"title":"メッセージ定義","titles":["MSG01"]},"431":{"title":"ENUM01 ユーザー権限","titles":[]},"432":{"title":"区分値概要","titles":["ENUM01 ユーザー権限"]},"433":{"title":"区分値定義","titles":["ENUM01 ユーザー権限"]},"434":{"title":"Web API 設計標準","titles":[]},"435":{"title":"HTTP メソッド","titles":["Web API 設計標準"]},"436":{"title":"HTTP ステータス","titles":["Web API 設計標準"]},"437":{"title":"共通","titles":["Web API 設計標準","HTTP ステータス"]},"438":{"title":"GET","titles":["Web API 設計標準","HTTP ステータス"]},"439":{"title":"POST","titles":["Web API 設計標準","HTTP ステータス"]},"440":{"title":"PUT","titles":["Web API 設計標準","HTTP ステータス"]},"441":{"title":"DELETE","titles":["Web API 設計標準","HTTP ステータス"]},"442":{"title":"API バージョン管理","titles":["Web API 設計標準"]},"443":{"title":"パラメータの命名","titles":["Web API 設計標準"]},"444":{"title":"はじめに","titles":[]},"445":{"title":"免責事項","titles":[]},"446":{"title":"ファイルフォーマット","titles":["免責事項"]},"447":{"title":"要素規約","titles":["免責事項"]},"448":{"title":"swagger","titles":["免責事項"]},"449":{"title":"info","titles":["免責事項"]},"450":{"title":"title","titles":["免責事項","info"]},"451":{"title":"desctiption","titles":["免責事項","info"]},"452":{"title":"version","titles":["免責事項","info"]},"453":{"title":"host","titles":["免責事項"]},"454":{"title":"basePath","titles":["免責事項"]},"455":{"title":"schemes","titles":["免責事項"]},"456":{"title":"security, securityDefinitions","titles":["免責事項"]},"457":{"title":"produces","titles":["免責事項"]},"458":{"title":"consumes","titles":["免責事項"]},"459":{"title":"tags","titles":["免責事項"]},"460":{"title":"paths","titles":["免責事項"]},"461":{"title":"Paths > Path","titles":["免責事項","paths"]},"462":{"title":"Paths > Path > Operation","titles":["免責事項","paths"]},"463":{"title":"Paths > Path > Parameter","titles":["免責事項","paths"]},"464":{"title":"Paths > Path > Responses","titles":["免責事項","paths"]},"465":{"title":"definitions","titles":["免責事項"]},"466":{"title":"バリデーションについて","titles":["免責事項"]},"467":{"title":"必須","titles":["免責事項","バリデーションについて"]},"468":{"title":"デフォルト値","titles":["免責事項","バリデーションについて"]},"469":{"title":"型・フォーマット","titles":["免責事項","バリデーションについて"]},"470":{"title":"桁","titles":["免責事項","バリデーションについて"]},"471":{"title":"区分値","titles":["免責事項","バリデーションについて"]},"472":{"title":"固定値","titles":["免責事項","バリデーションについて"]},"473":{"title":"その他(正規表現)","titles":["免責事項","バリデーションについて"]},"474":{"title":"ファイルアップロード","titles":["免責事項"]},"475":{"title":"ファイルダウンロード","titles":["免責事項"]},"476":{"title":"CORS","titles":["免責事項"]},"477":{"title":"OpenTelemetry Traceparent HTTP Header","titles":["免責事項"]},"478":{"title":"API のバージョン管理","titles":["免責事項"]},"479":{"title":"ファイル単位","titles":["免責事項"]},"480":{"title":"推奨ツール","titles":[]},"481":{"title":"License","titles":[]},"482":{"title":"ファイルフォーマット規約","titles":[]},"483":{"title":"フォーマット","titles":["ファイルフォーマット規約"]},"484":{"title":"ファイル名","titles":["ファイルフォーマット規約"]},"485":{"title":"YAML バージョン","titles":["ファイルフォーマット規約"]},"486":{"title":"ファイルレイアウト","titles":["ファイルフォーマット規約"]},"487":{"title":"クォート","titles":["ファイルフォーマット規約"]},"488":{"title":"YAML 配列スタイル","titles":["ファイルフォーマット規約"]},"489":{"title":"改行の表現","titles":["ファイルフォーマット規約"]},"490":{"title":"対応するバージョンについて","titles":[]},"491":{"title":"OpenAPI Specification Standards","titles":[]},"492":{"title":"Resources","titles":[]},"493":{"title":"はじめに","titles":[]},"494":{"title":"ファイルフォーマット","titles":["はじめに"]},"495":{"title":"OpenAPI ドキュメントの構成要素","titles":["はじめに"]},"496":{"title":"要素規約","titles":[]},"497":{"title":"openapi","titles":["要素規約"]},"498":{"title":"info","titles":["要素規約"]},"499":{"title":"info > title","titles":["要素規約","info"]},"500":{"title":"info > description","titles":["要素規約","info"]},"501":{"title":"info > version","titles":["要素規約","info"]},"502":{"title":"servers","titles":["要素規約"]},"503":{"title":"paths","titles":["要素規約"]},"504":{"title":"paths > {path} > {method} > tags","titles":["要素規約","paths"]},"505":{"title":"paths > {path} > {method} > summary","titles":["要素規約","paths"]},"506":{"title":"paths > {path} > {method} > description","titles":["要素規約","paths"]},"507":{"title":"paths > {path} > {method} > operationId","titles":["要素規約","paths"]},"508":{"title":"paths > {path} > {method} > parameters","titles":["要素規約","paths"]},"509":{"title":"paths > {path} > {method} > requestBody","titles":["要素規約","paths"]},"510":{"title":"paths > {path} > {method} > responses","titles":["要素規約","paths"]},"511":{"title":"paths > {path} > {method} > security","titles":["要素規約","paths"]},"512":{"title":"components","titles":["要素規約"]},"513":{"title":"components > schemas","titles":["要素規約","components"]},"514":{"title":"components > responses","titles":["要素規約","components"]},"515":{"title":"components > parameters","titles":["要素規約","components"]},"516":{"title":"パスパラメータ","titles":["要素規約","components","components > parameters"]},"517":{"title":"クエリパラメータ","titles":["要素規約","components","components > parameters"]},"518":{"title":"ヘッダ","titles":["要素規約","components","components > parameters"]},"519":{"title":"Cookie","titles":["要素規約","components","components > parameters"]},"520":{"title":"components > requestBodies","titles":["要素規約","components"]},"521":{"title":"components > headers","titles":["要素規約","components"]},"522":{"title":"components > securitySchemes","titles":["要素規約","components"]},"523":{"title":"components > links","titles":["要素規約","components"]},"524":{"title":"components > callbacks","titles":["要素規約","components"]},"525":{"title":"security","titles":["要素規約"]},"526":{"title":"tags","titles":["要素規約"]},"527":{"title":"externalDocs","titles":["要素規約"]},"528":{"title":"設計上のポイント","titles":[]},"529":{"title":"ファイルアップロード","titles":["設計上のポイント"]},"530":{"title":"ファイルダウンロード","titles":["設計上のポイント"]},"531":{"title":"CORS","titles":["設計上のポイント"]},"532":{"title":"OpenTelemetry Traceparent HTTP Header","titles":["設計上のポイント"]},"533":{"title":"値が存在しないという状態の表現","titles":["設計上のポイント"]},"534":{"title":"バリデーション","titles":["設計上のポイント"]},"535":{"title":"必須","titles":["設計上のポイント","バリデーション"]},"536":{"title":"デフォルト値","titles":["設計上のポイント","バリデーション"]},"537":{"title":"型・フォーマット","titles":["設計上のポイント","バリデーション"]},"538":{"title":"桁","titles":["設計上のポイント","バリデーション"]},"539":{"title":"区分値","titles":["設計上のポイント","バリデーション"]},"540":{"title":"固定値","titles":["設計上のポイント","バリデーション"]},"541":{"title":"その他(正規表現)","titles":["設計上のポイント","バリデーション"]},"542":{"title":"ファイル分割","titles":["設計上のポイント"]},"543":{"title":"分割方法の選定","titles":["設計上のポイント","ファイル分割"]},"544":{"title":"サンプル説明","titles":["設計上のポイント","ファイル分割"]},"545":{"title":"License","titles":[]},"546":{"title":"前提条件","titles":[]},"547":{"title":"はじめに","titles":[]},"548":{"title":"前提条件","titles":["はじめに"]},"549":{"title":"SQL コーティング規約(可読性・管理性)","titles":[]},"550":{"title":"書式全般","titles":["SQL コーティング規約(可読性・管理性)"]},"551":{"title":"予約語","titles":["SQL コーティング規約(可読性・管理性)"]},"552":{"title":"予約語以外","titles":["SQL コーティング規約(可読性・管理性)"]},"553":{"title":"短縮名称","titles":["SQL コーティング規約(可読性・管理性)"]},"554":{"title":"文字コード","titles":["SQL コーティング規約(可読性・管理性)"]},"555":{"title":"不要な空白文字(スペース)は除去する","titles":["SQL コーティング規約(可読性・管理性)"]},"556":{"title":"SQL 文の整形","titles":["SQL コーティング規約(可読性・管理性)"]},"557":{"title":"SELECT 文","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"558":{"title":"INSERT 文","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"559":{"title":"UPDATE 文","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"560":{"title":"DELETE 文","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"561":{"title":"MERGE 文","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"562":{"title":"AND(副問い合わせ)","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"563":{"title":"CASE 式","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"564":{"title":"IN 句","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"565":{"title":"比較演算子","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"566":{"title":"改行位置","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"567":{"title":"WITH 句","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"568":{"title":"OFFSET 句 FETCH 句","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"569":{"title":"HINT 句","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"570":{"title":"コメント","titles":["SQL コーティング規約(可読性・管理性)"]},"571":{"title":"外部結合","titles":["SQL コーティング規約(可読性・管理性)"]},"572":{"title":"型変換","titles":["SQL コーティング規約(可読性・管理性)"]},"573":{"title":"比較演算子","titles":["SQL コーティング規約(可読性・管理性)"]},"574":{"title":"ORDER BY 句","titles":["SQL コーティング規約(可読性・管理性)"]},"575":{"title":"GROUP BY 句","titles":["SQL コーティング規約(可読性・管理性)"]},"576":{"title":"EXISTS 句","titles":["SQL コーティング規約(可読性・管理性)"]},"577":{"title":"AS 句","titles":["SQL コーティング規約(可読性・管理性)"]},"578":{"title":"WHERE 句","titles":["SQL コーティング規約(可読性・管理性)"]},"579":{"title":"COUNT 文","titles":["SQL コーティング規約(可読性・管理性)"]},"580":{"title":"SQL コーディング規約(パフォーマンス性)","titles":[]},"581":{"title":"検索","titles":["SQL コーディング規約(パフォーマンス性)"]},"582":{"title":"挿入","titles":["SQL コーディング規約(パフォーマンス性)"]},"583":{"title":"更新","titles":["SQL コーディング規約(パフォーマンス性)"]},"584":{"title":"削除","titles":["SQL コーディング規約(パフォーマンス性)"]},"585":{"title":"WITH 句","titles":["SQL コーディング規約(パフォーマンス性)"]},"586":{"title":"DISTINCT 句","titles":["SQL コーディング規約(パフォーマンス性)"]},"587":{"title":"IN 句","titles":["SQL コーディング規約(パフォーマンス性)"]},"588":{"title":"NOT IN 句","titles":["SQL コーディング規約(パフォーマンス性)"]},"589":{"title":"UNION 句","titles":["SQL コーディング規約(パフォーマンス性)"]},"590":{"title":"パラレルヒント句","titles":["SQL コーディング規約(パフォーマンス性)"]},"591":{"title":"SELECT FOR UPDATE","titles":["SQL コーディング規約(パフォーマンス性)"]},"592":{"title":"分析関数","titles":["SQL コーディング規約(パフォーマンス性)"]},"593":{"title":"インデックス","titles":["SQL コーディング規約(パフォーマンス性)"]},"594":{"title":"外部結合","titles":["SQL コーディング規約(パフォーマンス性)"]},"595":{"title":"License","titles":[]},"596":{"title":"SQL Coding Standards","titles":[]},"597":{"title":"Resources","titles":[]},"598":{"title":"はじめに","titles":[]},"599":{"title":"前提条件","titles":["はじめに"]},"600":{"title":"SQL コーティング規約(可読性・管理性)","titles":[]},"601":{"title":"書式全般","titles":["SQL コーティング規約(可読性・管理性)"]},"602":{"title":"予約語","titles":["SQL コーティング規約(可読性・管理性)"]},"603":{"title":"予約語以外","titles":["SQL コーティング規約(可読性・管理性)"]},"604":{"title":"短縮名称","titles":["SQL コーティング規約(可読性・管理性)"]},"605":{"title":"文字コード","titles":["SQL コーティング規約(可読性・管理性)"]},"606":{"title":"不要な空白文字(スペース)は除去する","titles":["SQL コーティング規約(可読性・管理性)"]},"607":{"title":"SQL 文の整形","titles":["SQL コーティング規約(可読性・管理性)"]},"608":{"title":"SELECT 文","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"609":{"title":"INSERT 文","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"610":{"title":"UPDATE 文","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"611":{"title":"DELETE 文","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"612":{"title":"AND(副問い合わせ)","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"613":{"title":"CASE 式","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"614":{"title":"IN 句","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"615":{"title":"比較演算子","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"616":{"title":"改行位置","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"617":{"title":"WITH 句","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"618":{"title":"LIMIT 句 OFFSET 句","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"619":{"title":"HINT 句","titles":["SQL コーティング規約(可読性・管理性)","SQL 文の整形"]},"620":{"title":"コメント","titles":["SQL コーティング規約(可読性・管理性)"]},"621":{"title":"型変換","titles":["SQL コーティング規約(可読性・管理性)"]},"622":{"title":"比較演算子","titles":["SQL コーティング規約(可読性・管理性)"]},"623":{"title":"ORDER BY 句","titles":["SQL コーティング規約(可読性・管理性)"]},"624":{"title":"GROUP BY 句","titles":["SQL コーティング規約(可読性・管理性)"]},"625":{"title":"EXISTS 句","titles":["SQL コーティング規約(可読性・管理性)"]},"626":{"title":"AS 句","titles":["SQL コーティング規約(可読性・管理性)"]},"627":{"title":"WHERE 句","titles":["SQL コーティング規約(可読性・管理性)"]},"628":{"title":"COUNT 文","titles":["SQL コーティング規約(可読性・管理性)"]},"629":{"title":"文字列リテラル","titles":["SQL コーティング規約(可読性・管理性)"]},"630":{"title":"エスケープシーケンス","titles":["SQL コーティング規約(可読性・管理性)","文字列リテラル"]},"631":{"title":"SQL コーディング規約(パフォーマンス性)","titles":[]},"632":{"title":"検索","titles":["SQL コーディング規約(パフォーマンス性)"]},"633":{"title":"挿入","titles":["SQL コーディング規約(パフォーマンス性)"]},"634":{"title":"更新","titles":["SQL コーディング規約(パフォーマンス性)"]},"635":{"title":"削除","titles":["SQL コーディング規約(パフォーマンス性)"]},"636":{"title":"DISTINCT 句","titles":["SQL コーディング規約(パフォーマンス性)"]},"637":{"title":"IN 句","titles":["SQL コーディング規約(パフォーマンス性)"]},"638":{"title":"NOT IN 句","titles":["SQL コーディング規約(パフォーマンス性)"]},"639":{"title":"UNION 句","titles":["SQL コーディング規約(パフォーマンス性)"]},"640":{"title":"SELECT FOR UPDATE","titles":["SQL コーディング規約(パフォーマンス性)"]},"641":{"title":"分析関数","titles":["SQL コーディング規約(パフォーマンス性)"]},"642":{"title":"インデックス","titles":["SQL コーディング規約(パフォーマンス性)"]},"643":{"title":"外部結合","titles":["SQL コーディング規約(パフォーマンス性)"]},"644":{"title":"License","titles":[]},"645":{"title":"Slack利用ガイドライン","titles":[]},"646":{"title":"License","titles":[]},"647":{"title":"はじめに","titles":[]},"648":{"title":"適用範囲","titles":[]},"649":{"title":"免責事項","titles":[]},"650":{"title":"管理者向け推奨設定","titles":[]},"651":{"title":"Workspace Access","titles":["管理者向け推奨設定"]},"652":{"title":"デフォルトチャンネル","titles":["管理者向け推奨設定"]},"653":{"title":"表示名ガイドライン","titles":["管理者向け推奨設定"]},"654":{"title":"ワークスペースの管理者","titles":["管理者向け推奨設定"]},"655":{"title":"ユーザ向け推奨設定","titles":[]},"656":{"title":"アカウントアイコンを設定する","titles":["ユーザ向け推奨設定"]},"657":{"title":"検索性の高い氏名(Full name)を設定する","titles":["ユーザ向け推奨設定"]},"658":{"title":"ユーザーグループの推奨","titles":["ユーザ向け推奨設定"]},"659":{"title":"チャンネル命名規則","titles":[]},"660":{"title":"外部組織メンバーが在籍するチャンネルの命名","titles":["チャンネル命名規則"]},"661":{"title":"投稿内容ポリシー","titles":[]},"662":{"title":"敬称は不要","titles":["投稿内容ポリシー"]},"663":{"title":"絵文字や感嘆符を活用する","titles":["投稿内容ポリシー"]},"664":{"title":"絵文字リアクションによる積極応答","titles":["投稿内容ポリシー"]},"665":{"title":"DMはなるべく避ける","titles":["投稿内容ポリシー"]},"666":{"title":"timesの推奨","titles":["投稿内容ポリシー"]},"667":{"title":"メッセージ(スレッドのトップ)は具体的に書く","titles":["投稿内容ポリシー"]},"668":{"title":"メッセージのURLを活用する","titles":["投稿内容ポリシー"]},"669":{"title":"Also send to channelは乱発しない","titles":["投稿内容ポリシー"]},"670":{"title":"広めの通知に注意する","titles":["投稿内容ポリシー"]},"671":{"title":"@channel","titles":["投稿内容ポリシー","広めの通知に注意する"]},"672":{"title":"@here","titles":["投稿内容ポリシー","広めの通知に注意する"]},"673":{"title":"メンション範囲は適切に","titles":["投稿内容ポリシー"]},"674":{"title":"過剰なメンションの抑制","titles":["投稿内容ポリシー","メンション範囲は適切に"]},"675":{"title":"メンションの宛先をできる限り絞り込む","titles":["投稿内容ポリシー","メンション範囲は適切に"]},"676":{"title":"予約投稿を活用する","titles":["投稿内容ポリシー"]},"677":{"title":"不在の表明","titles":["投稿内容ポリシー"]},"678":{"title":"可読性を上げるための書式設定","titles":["投稿内容ポリシー"]},"679":{"title":"エラーメッセージの画像添付非推奨、テキストスニペットの推奨","titles":["投稿内容ポリシー"]},"680":{"title":"機密情報の流出に注意する","titles":["投稿内容ポリシー"]},"681":{"title":"ファイルの共有に注意する","titles":["投稿内容ポリシー"]},"682":{"title":"プライベートチャンネルの投稿に対する引用","titles":["投稿内容ポリシー"]},"683":{"title":"さいごに","titles":[]}},"dirtCount":0,"index":[["統制を図るため",{"2":{"681":1}}],["統合開発環境の機能により自動生成するものに関しては可とする",{"2":{"124":1,"201":1,"265":1}}],["営業情報",{"2":{"680":1}}],["共有内容が長文の場合にはテキストスニペット使用が好ましい",{"2":{"679":1}}],["共通で使用するエラーを表すオブジェクト",{"2":{"513":1}}],["共通で使用するリソースを表すオブジェクト",{"2":{"513":1}}],["共通的なリクエストパラメータ",{"2":{"512":1,"515":1}}],["共通的なリソースやエラー等のドメインオブジェクトを記載する",{"2":{"513":1}}],["共通的なリソース",{"2":{"512":1}}],["共通的なレスポンスヘッダを記載する",{"2":{"521":1}}],["共通的なレスポンスヘッダを定義する",{"2":{"512":1}}],["共通的なレスポンスを記載する",{"2":{"514":1}}],["共通的なレスポンス",{"2":{"512":1}}],["共通的な認証方式を設定し",{"2":{"511":1}}],["共通するプレフィックスを持つ場合に指定する",{"2":{"454":1}}],["共通",{"0":{"437":1}}],["共通処理の作成待ちなどの理由により",{"2":{"166":1,"239":1,"302":1}}],["引用時にはセンシティブな内容が含まれていないか確認するよう注意する",{"2":{"682":1}}],["引用などの装飾は",{"2":{"678":1}}],["引数",{"0":{"124":1,"141":1,"201":1,"218":1,"265":1,"282":1}}],["太字",{"2":{"678":1}}],["太郎",{"2":{"657":2}}],["海外出張なので時差があることが分かれば",{"2":{"677":1}}],["休暇だけでなく出張中などの情報も提示できる",{"2":{"677":1}}],["休暇中🏝️",{"2":{"677":1}}],["休暇中のメンバー等にも影響がある",{"2":{"671":1}}],["期間が分かれば",{"2":{"677":1}}],["送る側は送信時間に気を遣わない運用も可とする",{"2":{"676":1}}],["送信側が即レスを期待しなくて済む",{"2":{"677":1}}],["送信bl設計",{"2":{"407":1}}],["送信",{"2":{"402":1}}],["緊急時の依頼と混同してしまうため",{"2":{"676":1}}],["緊急時を除き",{"2":{"671":1}}],["成果の向上を期待できるため",{"2":{"676":1}}],["仕事とプライベートにメリハリを持たせることで",{"2":{"676":1}}],["仕様変更管理番号",{"2":{"570":1,"620":1}}],["仕様ではなく実装レベルの機能横断的な処理",{"2":{"531":1}}],["仕様書には",{"2":{"524":1}}],["仕様のセマンティックバージョン番号を記載する",{"2":{"497":1}}],["仕様のバージョン番号",{"2":{"495":1}}],["仕様のドキュメントのバージョンを記載する",{"2":{"452":1,"501":1}}],["仕様に存在しない任意のフォーマットを独自のドキュメント生成などのために記載しても良い",{"2":{"469":1,"537":1}}],["仕様上",{"2":{"458":1,"463":1,"543":1}}],["深夜",{"2":{"676":1}}],["宛先メンバーから別の有識者メンバーにディスパッチしてもらう運用を考えると良い",{"2":{"675":1}}],["宛先メンバーは自分よりもっと詳しい人がいるかも知れないので",{"2":{"675":1}}],["神",{"2":{"674":1}}],["承知しました",{"2":{"674":1}}],["狼少年",{"2":{"672":1}}],["村田",{"2":{"672":2}}],["真に必要なときに読み飛ばされてしまう可能性が上がるため",{"2":{"672":1}}],["真に必要ではないときに通知が飛ぶことが常態化すると",{"2":{"672":1}}],["真野",{"2":{"672":2}}],["真偽値",{"2":{"469":1,"537":1}}],["重大かつ緊急度が高い場合は",{"2":{"671":1}}],["重複した質問を防ぐため",{"2":{"665":1}}],["重複するため記載を省略する",{"2":{"415":1}}],["重複を排除した",{"2":{"159":1}}],["広めの通知に注意する",{"0":{"670":1},"1":{"671":1,"672":1}}],["ピン留め機能を活用することで",{"2":{"668":1}}],["ピリオド",{"2":{"28":1,"31":1}}],["決定事項の経緯や議論内容を数年経過したのちに確認することもしばしば発生する",{"2":{"668":1}}],["決済する",{"2":{"357":1}}],["決済の確定",{"2":{"356":1}}],["決済によって確定する",{"2":{"356":1}}],["決済",{"0":{"355":1,"361":1},"1":{"356":1,"357":1,"358":1,"359":1,"360":1,"361":1},"2":{"392":1}}],["返信スレッド内に付けるかは任意とする",{"2":{"667":1}}],["返信スレッドの中を確認しないと内容が分からないようなメッセージ",{"2":{"667":1}}],["❌非推奨例",{"2":{"667":1}}],["❌️",{"2":{"51":3}}],["話題を端的に表現する",{"2":{"667":1}}],["途中で他メンバーに相談事などでメンションを飛ばすと",{"2":{"666":1}}],["組織に共有されることで",{"2":{"665":1}}],["組織が採用するタグ付け標準を自動的に適用する",{"2":{"37":1}}],["相談相手が",{"2":{"679":1}}],["相談相手も裏取りとしてスタックトレースの内容を検索することが多々あるため",{"2":{"679":1}}],["相談セクション",{"2":{"664":1}}],["相互に関連スレッドのurlを投稿しておくと良い",{"2":{"668":1}}],["相容れない部分があればその領域を書き換えて利用することを想定している",{"2":{"0":1,"49":1,"445":1,"493":1,"649":1}}],["〇〇について教えてほしい",{"2":{"664":1}}],["〇〇してほしい",{"2":{"664":1}}],["礼賛することが望ましい",{"2":{"664":1}}],["投稿内容を理解して次のアクションをとってくれるのか",{"2":{"664":1}}],["投稿内容を見てくれたのかどうか",{"2":{"664":2}}],["投稿内容ポリシー",{"0":{"661":1},"1":{"662":1,"663":1,"664":1,"665":1,"666":1,"667":1,"668":1,"669":1,"670":1,"671":1,"672":1,"673":1,"674":1,"675":1,"676":1,"677":1,"678":1,"679":1,"680":1,"681":1,"682":1}}],["絵文字だけのリアクションを取る場合があるが",{"2":{"674":1}}],["絵文字リアクションのみで済まさず",{"2":{"664":1}}],["絵文字リアクションによる積極応答",{"0":{"664":1}}],["絵文字や感嘆符を活用する",{"0":{"663":1}}],["当然ながら他人の名誉を毀損するなど",{"2":{"663":1}}],["価値を向上させるため",{"2":{"663":1}}],["心理的安全性が保たれる",{"2":{"663":1}}],["冷たく捉えられがちである",{"2":{"663":1}}],["積極的に活用する",{"2":{"664":1,"678":1}}],["積極的に活用することを推奨する",{"2":{"663":1}}],["積極的にカスタム絵文字を追加することを推奨する",{"2":{"663":1}}],["積極的な利用を推奨します",{"2":{"170":1,"243":1,"306":1}}],["敬称は省略して",{"2":{"662":1}}],["敬称は不要",{"0":{"662":1}}],["取引先メンバーが在籍するチャンネルに誤投稿してしまう事態を避けるため",{"2":{"660":1}}],["取得",{"0":{"425":1}}],["取得したintegerインスタンスをオートボクシングでintにcastしている",{"2":{"249":1,"312":1}}],["擬似的にグループメンションが可能",{"2":{"658":1}}],["章を参照",{"2":{"665":1}}],["章で述べた",{"2":{"648":1}}],["章に従うこと",{"2":{"71":1}}],["ハマったことや調べたことが",{"2":{"666":1}}],["ハレーションが起きるケースも多い",{"2":{"647":1}}],["ハイブリッドワーク前提の業務において",{"2":{"647":1}}],["ハイフンではなく",{"2":{"74":1}}],["ハイフンを",{"2":{"26":1}}],["ハイフンは",{"2":{"13":1}}],["ハイフン",{"2":{"13":1,"31":1}}],["ノイズなので個人のメモに閉じるべき",{"2":{"647":1}}],["ノート",{"2":{"151":1,"152":1}}],["質問があります",{"2":{"667":1}}],["質問事項がチーム",{"2":{"665":1}}],["質問はdmで行うべき",{"2":{"647":1}}],["質が高く安全で楽しいフィットネス体験を提供する",{"2":{"396":1}}],["現象",{"2":{"672":1}}],["現代のチャットサービスは豊富な機能が提供されている",{"2":{"647":1}}],["現在",{"2":{"388":1}}],["現在日以降である必要があるが",{"2":{"334":1}}],["現在チェックアウトしているブランチから新規ブランチが作成されますが",{"2":{"182":1}}],["現在は",{"2":{"113":1,"190":1,"254":1}}],["現在は削除されています",{"2":{"111":1,"188":1,"252":1}}],["現在のブランチは",{"2":{"109":1,"110":1}}],["従来のように",{"2":{"660":1}}],["従業員全員の満足度を向上させ",{"2":{"647":1}}],["従って",{"2":{"587":1,"637":1}}],["円マークをエスケープするときは",{"2":{"630":1}}],["円マークをエスケープせざるを得ないときのみ円マークによるエスケープ利用して良いが",{"2":{"630":1}}],["円マークを文字列リテラルで表現する必要のある設計自体を避けること",{"2":{"630":1}}],["円滑なコミュニケーションを促進することを狙いとする",{"2":{"453":1}}],["駆動表",{"2":{"594":1,"643":1}}],["1件のロックでない場合はorder",{"2":{"591":1,"640":1}}],["1ステートメントのみで行われる文字列の連結には+演算子を利用する",{"2":{"147":1,"224":1}}],["秒数指定を行う際の秒数は各開発者で決めるのではなくプロジェクトで決定した方針に従うこと",{"2":{"591":1}}],["秒以上",{"2":{"170":1,"172":2,"174":3,"243":1,"245":2,"247":3,"306":1,"308":2,"310":3}}],["付与したい場合は",{"2":{"590":1}}],["付与しない",{"2":{"86":1}}],["社外勉強会の登壇資料など",{"2":{"681":1}}],["社外メンバー招待",{"2":{"648":1}}],["社会人",{"2":{"663":1}}],["社員が一人以上属している部門を取得",{"2":{"586":2,"636":2}}],["社内外の",{"2":{"63":1}}],["挿入処理におけるコーディング規約を下記に示す",{"2":{"582":1,"633":1}}],["挿入",{"0":{"582":1,"633":1}}],["禁止ではないが原則行わない",{"2":{"581":1,"632":1}}],["ワイルドカード",{"2":{"576":2,"625":2}}],["ワークスペース内に複数のチームが混在する場合",{"2":{"654":1}}],["ワークスペースの管理者",{"0":{"654":1}}],["ワークスペースのオーナーだけなので注意する",{"2":{"653":1}}],["ワークスペースごとにガイドラインを設定することを推奨する",{"2":{"653":1}}],["ワーク",{"2":{"331":3}}],["ワークフローの仕様決定待ち",{"2":{"166":1,"239":1,"302":1}}],["省略はしないこと",{"2":{"577":1,"626":1}}],["省略可能であっても省略しない",{"2":{"575":1,"624":1}}],["省略すること",{"2":{"416":1}}],["集約関数を利用する場合は必ず記載すること",{"2":{"575":1,"624":1}}],["暗黙のソート処理が行われる可能性があるため性能劣化につながる",{"2":{"586":1,"636":1}}],["暗黙の型変換は使用しない",{"2":{"572":1,"621":1}}],["暗号化",{"2":{"323":1,"326":1}}],["結合方法は",{"2":{"571":1}}],["結合条件が一致した場合と不一致になった場合の",{"2":{"561":1}}],["←",{"2":{"570":2,"620":2}}],["ヒント句が挿入できるように改行すること",{"2":{"566":1,"616":1}}],["命令句の後は",{"2":{"566":1,"616":1}}],["命名はヘッダ名からハイフンを除去した形式を推奨する",{"2":{"521":1}}],["命名はヘッダ名に",{"2":{"518":1}}],["命名はクエリパラメータ名に",{"2":{"517":1}}],["命名は",{"2":{"459":1,"519":1}}],["命名に従うと",{"2":{"74":1}}],["命名には含めない",{"2":{"19":1}}],["命名規則",{"2":{"51":1}}],["命名規約も同じ方針にしている",{"2":{"36":1}}],["命名規約の基本形",{"2":{"12":1,"19":1,"20":1}}],["命名規約",{"0":{"12":1},"2":{"21":1,"24":2,"25":1,"29":2,"31":1,"33":2,"34":2,"35":1,"36":2}}],["命名で分ける",{"2":{"3":1}}],["比較演算子の前後にタブ",{"2":{"565":1,"615":1}}],["比較演算子",{"0":{"565":1,"573":1,"615":1,"622":1}}],["条件式の順序",{"2":{"578":1,"627":1}}],["条件が不一致",{"2":{"561":1}}],["条件が一致",{"2":{"561":1}}],["条件",{"2":{"561":1}}],["条件に一致するパーソナルトレーナーが見つかりませんでした",{"2":{"381":1}}],["条件に一致するコーチは存在しませんでした",{"2":{"347":1}}],["\\tor\\ttbl1",{"2":{"581":1,"632":1}}],["\\t>\\t",{"2":{"581":1,"632":1}}],["\\t1",{"2":{"581":1,"632":1}}],["\\tc",{"2":{"578":1,"627":1}}],["\\tcolumn3\\t",{"2":{"558":1,"609":1}}],["\\tcolumn2\\t",{"2":{"558":1,"609":1}}],["\\tcolumn1\\t",{"2":{"558":1,"609":1}}],["\\tb",{"2":{"578":1,"627":1}}],["\\texists",{"2":{"576":1,"625":1}}],["\\telse",{"2":{"563":1,"613":1}}],["\\tここにhintを記載",{"2":{"569":1,"619":1}}],["\\twhen",{"2":{"563":1,"613":1}}],["\\t\\ttbl1",{"2":{"581":1,"632":1}}],["\\t\\twhere",{"2":{"576":1,"625":1}}],["\\t\\t\\tf",{"2":{"576":1,"625":1}}],["\\t\\t\\tfoo\\tf",{"2":{"576":1,"625":1}}],["\\t\\t\\t1",{"2":{"576":1,"625":1}}],["\\t\\t\\ttable1\\ttbl1",{"2":{"562":1,"612":1}}],["\\t\\t\\ttbl1",{"2":{"562":1,"612":1}}],["\\t\\t0",{"2":{"563":1,"613":1}}],["\\t\\t1",{"2":{"563":1,"613":1}}],["\\t\\txxx",{"2":{"563":1,"613":1}}],["\\t\\tfrom",{"2":{"562":1,"576":1,"612":1,"625":1}}],["\\t\\t",{"2":{"562":1,"612":1}}],["\\t\\tselect",{"2":{"562":1,"576":1,"612":1,"625":1}}],["\\t\\tp",{"2":{"561":1}}],["\\t",{"2":{"561":4,"562":1,"576":1,"581":2,"612":1,"625":1,"632":2}}],["\\tname\\tn\\t\\t\\t\\t",{"2":{"561":1}}],["\\tprofile\\tp\\t\\t\\t\\t",{"2":{"561":1}}],["\\tvalue3",{"2":{"558":1,"609":1}}],["\\tvalue2",{"2":{"558":1,"609":1}}],["\\tvalue1",{"2":{"558":1,"609":1}}],["\\tand\\txxx",{"2":{"563":1,"613":1}}],["\\ta",{"2":{"556":1,"578":2,"607":1,"627":2}}],["\\ttbl",{"2":{"578":1,"627":1}}],["\\ttbl1",{"2":{"556":2,"557":5,"559":3,"560":1,"562":1,"568":2,"569":2,"607":2,"608":5,"610":3,"611":1,"612":1,"619":2}}],["\\ttable2\\tt2",{"2":{"566":1,"616":1}}],["\\ttable1\\ttbl1",{"2":{"568":1,"569":1,"619":1}}],["\\ttable1\\ttbl1\\t",{"2":{"556":1,"557":1,"559":1,"560":1,"607":1,"608":1,"610":1,"611":1}}],["\\ttable1\\tt1",{"2":{"566":1,"616":1}}],["\\ttable1\\t",{"2":{"558":1,"609":1}}],["\\tt2",{"2":{"566":2,"616":2}}],["\\tt1",{"2":{"566":3,"616":3}}],["\\tthen",{"2":{"563":1,"613":1}}],["\\t処理名",{"2":{"556":1,"607":1}}],["物理カラム名",{"2":{"556":1,"607":1}}],["物理名",{"2":{"432":1,"433":1,"463":1}}],["分報や作業スレッドとも呼ばれ",{"2":{"666":1}}],["分報",{"2":{"647":1}}],["分析関数の使用は可能だが",{"2":{"592":1,"641":1}}],["分析関数",{"0":{"592":1,"641":1}}],["分析作業に支障があるため禁止とする",{"2":{"556":1,"607":1}}],["分割ファイルを1つのファイルにまとめる必要がある場合には",{"2":{"544":1}}],["分割方法",{"2":{"544":1}}],["分割方法の選定",{"0":{"543":1}}],["分割してあれば",{"2":{"118":1,"195":1,"259":1}}],["副問い合わせ",{"0":{"562":1,"612":1}}],["副問い合わせで利用したエイリアス名をメインの",{"2":{"553":1,"604":1}}],["副作用のある処理の場合は",{"2":{"166":1,"239":1,"302":1}}],["母音を抜かして表記する",{"2":{"553":1,"604":1}}],["短縮形が存在しない場合には",{"2":{"553":1,"604":1}}],["短縮名称",{"0":{"553":1,"604":1}}],["短命",{"2":{"51":4}}],["書式全般についてのコーディング規約を下記に示す",{"2":{"550":1,"601":1}}],["書式全般",{"0":{"550":1,"601":1}}],["高騰やメモリ枯渇を招く",{"2":{"587":1,"637":1}}],["高速な",{"2":{"546":1}}],["高いパフォーマンスが求められる場合は意識してください",{"2":{"175":1,"250":1,"313":1}}],["高いパフォーマンスが求められる場合はlistの種類にも注目してみてください",{"2":{"174":1,"247":1,"310":1}}],["原語の短縮形を使用する",{"2":{"553":1,"604":1}}],["原語の綴りを使用する",{"2":{"550":1,"601":1}}],["原理的な",{"2":{"546":1}}],["原則利用を禁止する",{"2":{"671":1}}],["原則使用禁止とする",{"2":{"590":1}}],["原則not",{"2":{"588":1,"638":1}}],["原則定義しない",{"2":{"516":1}}],["原則何も定義せず",{"2":{"512":1,"520":1}}],["原則何も定義しない",{"2":{"512":3}}],["原則不要",{"2":{"476":1,"477":1,"531":1,"532":1}}],["原則",{"2":{"447":1,"462":1,"509":1,"510":1,"533":1,"674":1}}],["原則finalize",{"2":{"164":1,"237":1,"300":1}}],["原則varを利用する",{"2":{"158":2,"233":2}}],["原則ラムダ式は",{"2":{"154":1,"229":1,"293":1}}],["原則ラムダ式内の行数は",{"2":{"154":1,"229":1,"293":1}}],["原則として処理中には記載しない",{"2":{"156":1,"231":1,"295":1}}],["原則としてインナークラスは利用しない",{"2":{"143":1,"220":1,"284":1}}],["原則としてfinalで宣言する",{"2":{"141":1,"218":1,"282":1}}],["原則としてオンデマンドのインポート宣言",{"2":{"132":1,"209":1,"273":1}}],["原則としてオブジェクトの参照にはインターフェースを利用する",{"2":{"129":1,"206":1,"270":1}}],["原則として",{"2":{"132":1,"209":1,"273":1,"571":1,"578":1,"627":1}}],["限られたメンバーのみに",{"2":{"665":1}}],["限られたクライアントやシステムと連携すること",{"2":{"546":1}}],["限定の提供のため",{"2":{"178":1}}],["まとめたファイルは",{"2":{"544":1}}],["またそうでないかの関心は強いためである",{"2":{"674":1}}],["また無名クラスを利用するのも原則として",{"2":{"143":1,"220":1,"284":1}}],["また",{"2":{"13":2,"21":1,"33":1,"34":1,"88":1,"94":1,"115":1,"116":1,"118":1,"153":2,"159":2,"169":1,"172":1,"192":1,"193":1,"195":1,"228":2,"242":1,"245":1,"248":1,"256":1,"257":1,"259":1,"292":1,"305":1,"308":1,"311":1,"405":1,"457":1,"553":1,"567":1,"576":1,"577":1,"587":1,"591":1,"604":1,"617":1,"625":1,"626":1,"637":1,"647":2,"656":1,"664":1,"679":1}}],["またよく用いられるため",{"2":{"4":1}}],["またはスペース",{"2":{"565":1,"615":1}}],["または母音を抜かした子音字等を利用する",{"2":{"553":1,"604":1}}],["または将来的に許されなくなる可能性があり",{"2":{"524":1}}],["またはmermaid",{"2":{"408":1}}],["または操作を学習するための環境",{"2":{"4":1}}],["または",{"2":{"2":1,"570":2,"620":2}}],["│",{"2":{"544":16}}],["都合の良いファイルの分割方法を採用する",{"2":{"543":1}}],["半角スペース",{"2":{"556":2,"607":2}}],["半角スペース区切りで記載する理由は",{"2":{"526":1}}],["半角英数字",{"2":{"28":1}}],["半角英数字とハイフンに限定する",{"2":{"13":1}}],["利便性は高い仕様だが",{"2":{"524":1}}],["利用頻度は抑えるように意識する",{"2":{"669":1}}],["利用頻度が高いとされるvs",{"2":{"177":1}}],["利用頻度が高いとされるgitクライアントである",{"2":{"80":1}}],["利用を想定しているツールの制限などで必要な場面が少なからずあるということで公開しています",{"2":{"490":1}}],["利用者の感覚が千差万別であるため",{"2":{"647":1}}],["利用者側システムの",{"2":{"470":1,"538":1}}],["利用者にとっての認識負荷は少なく覚えるコストも低い",{"2":{"4":1}}],["利用規約の",{"2":{"449":1,"498":1}}],["利用api",{"2":{"340":1,"347":1,"352":1,"359":1,"366":1,"373":2,"376":2,"381":1,"388":3}}],["利用",{"2":{"175":4,"250":4,"313":4}}],["利用できる桁を指定する項目が異なる",{"2":{"470":1,"538":1}}],["利用できる場合は並列処理も含めての検証が必要です",{"2":{"169":1,"242":1,"305":1}}],["利用できる箇所は全てvarを利用します",{"2":{"158":1,"233":1}}],["利用するプロダクトの対応状況は利用者側で確認をお願いする",{"2":{"546":1}}],["利用する場合はダブルクォートを利用する",{"2":{"487":1}}],["利用するコード生成の動作によってはクライアントにとって互換性を失う破壊的変更であることがあるため",{"2":{"478":1}}],["利用するツールで複数のcontent",{"2":{"457":1}}],["利用する",{"2":{"158":1,"159":1,"233":1}}],["利用する文字は",{"2":{"13":1}}],["利用して良い場合",{"2":{"671":1,"672":1}}],["利用してよい",{"2":{"156":1,"231":1,"295":1}}],["利用しないを統一すること",{"2":{"158":1,"159":1,"233":1}}],["利用しないため",{"2":{"85":1}}],["利用ブランチ",{"2":{"58":1}}],["利用形態に応じて規則を変えて対応する",{"2":{"28":1}}],["利用可能文字",{"2":{"24":1,"25":1}}],["利用可能文字種",{"2":{"22":2}}],["利用可能な文字",{"0":{"13":1},"2":{"9":1,"27":1}}],["利用目的やリソースの動作",{"2":{"2":1,"7":1}}],["逆に",{"2":{"523":1}}],["逆にいうと",{"2":{"65":1}}],["興味深い機能であり",{"2":{"523":1}}],["興味が湧いたパーソナルトレーナーについて",{"2":{"378":1}}],["用のトークン",{"2":{"519":1}}],["用途や組織を表現するプレフィックスで並び順を制御する必然性が薄れた",{"2":{"660":1}}],["用途に応じて使い分けると良い",{"2":{"652":1}}],["用途を用いる",{"2":{"27":1}}],["用途",{"0":{"7":1},"2":{"2":1}}],["空更新を行う場合は空文字を利用する",{"2":{"513":1}}],["空文字",{"2":{"465":1}}],["固有のオブジェクトを",{"2":{"512":1}}],["固有のオブジェクトであっても",{"2":{"512":1}}],["固定値",{"0":{"472":1,"540":1},"2":{"472":1,"540":1}}],["固定で指定する",{"2":{"457":1,"458":1}}],["固定で設定する",{"2":{"455":1}}],["固定で開発を進め",{"2":{"452":1,"501":1}}],["固定とする",{"2":{"448":1}}],["固定",{"2":{"51":2,"323":1,"326":1}}],["ヘボン式ローマ字を使用する",{"2":{"550":1,"601":1}}],["ヘルスチェックのような認証を通す必要がない",{"2":{"511":1}}],["ヘッダ",{"0":{"518":1},"2":{"515":1}}],["ヘッダやクエリパラメータ等",{"2":{"512":1}}],["ヘッダはハイフンを区切り文字とするパスカルケースで表現する",{"2":{"508":1}}],["ヘッダ行",{"2":{"323":1,"326":1}}],["極力コンポーネント化せずデフォルトの名称を使用することを推奨する",{"2":{"509":1,"510":1}}],["ケバブケースが標準になっているため",{"2":{"507":1}}],["ケバブケースで表現する",{"2":{"503":1}}],["商品一覧取得",{"2":{"503":2}}],["商品コード",{"2":{"423":1}}],["ルートオブジェクトは以下の要素で構成される",{"2":{"495":1}}],["ループの処理は拡張",{"2":{"174":1,"247":1,"310":1}}],["旧バージョンであるopenapi",{"2":{"493":1}}],["既存で利用しているシステムの存在や",{"2":{"490":1}}],["既知のバグ",{"2":{"166":1,"239":1,"302":1}}],["箇条書き",{"2":{"678":1}}],["箇条書き3",{"2":{"489":1}}],["箇条書き2",{"2":{"489":1}}],["箇条書き1",{"2":{"489":1}}],["情報提供者としても",{"2":{"674":1}}],["情報提供の依頼者は",{"2":{"674":1}}],["情報提供依頼はslackと親和性が良いタスクである",{"2":{"674":1}}],["情報提供依頼系など善意やり取りはきちんとフィードバックする",{"2":{"674":1}}],["情報量が多く章立てて整理をしたい場合にはcanvas",{"2":{"668":1}}],["情報密度を上げるために配列リテラルを推奨する",{"2":{"488":1}}],["情報が重複する",{"2":{"70":1}}],["進数と認識させたくない場合",{"2":{"487":1}}],["ミドルウェアやフレームワーク側などでの一律の制御を推奨するため",{"2":{"477":1,"532":1}}],["横は",{"2":{"550":1,"601":1}}],["横断的に用いる区分値は",{"2":{"539":1}}],["横断的に設定されるべきものであり",{"2":{"477":1,"532":1}}],["横に長い文字列などの可読性向上の目的で左端に揃えるのは良い",{"2":{"160":1}}],["線引をどこに設置するかは本規約で定義しない",{"2":{"475":1,"530":1}}],["経由を経由してのダウンロードさせる手法を推奨する",{"2":{"475":1,"530":1}}],["経緯で作成され",{"2":{"405":1}}],["監査",{"2":{"648":1}}],["監査ログなどのガバナンス上",{"2":{"474":1,"529":1}}],["監視",{"2":{"407":1}}],["②",{"2":{"474":2,"529":2}}],["①",{"2":{"474":1,"529":1}}],["煩雑である",{"2":{"474":1,"529":1}}],["信頼性を享受できる",{"2":{"474":1,"529":1}}],["許容するファイルサイズによってはこの手法一択となる",{"2":{"474":1,"529":1}}],["月時点における最新の",{"2":{"490":1}}],["月時点でペイロード上限が",{"2":{"474":1,"529":1}}],["月に",{"2":{"474":1,"529":1}}],["月に開始された",{"2":{"167":1,"240":1,"303":1}}],["ペイロードが膨れるためモバイルなどのクライアントでは帯域利用での懸念がある",{"2":{"474":1,"529":1}}],["ページングは不要",{"2":{"381":1}}],["ペーストしてしまうと",{"2":{"117":1,"194":1,"258":1}}],["ペーストしていませんか",{"2":{"117":1,"194":1,"258":1}}],["巨大なファイルを扱う場合などサーバリソース負荷が懸念",{"2":{"474":1,"529":1}}],["女",{"2":{"471":1,"539":1}}],["男",{"2":{"471":1,"539":1}}],["属性を利用し",{"2":{"471":1,"539":1}}],["属人化しないようにする",{"2":{"86":1}}],["境界値を含まない場合のみexclusiveminimum",{"2":{"470":1,"538":1}}],["境界値を含む",{"2":{"470":2,"538":2}}],["可能な限り検索条件にパーティションキーの値を指定する",{"2":{"581":1,"632":1}}],["可能な限り設定する",{"2":{"469":1,"470":1,"537":1,"538":1}}],["可読性を上げるための書式設定",{"0":{"678":1}}],["可読性の低下を防ぐ",{"2":{"542":1}}],["可読性も高く",{"2":{"169":1,"242":1,"305":1}}],["可読性においてもforeachの優位性は少ないため",{"2":{"153":1,"228":1,"292":1}}],["可読性が悪くなるので三項演算子を入れ子で行うのは禁止",{"2":{"150":1,"227":1,"291":1}}],["可読性",{"0":{"549":1,"600":1},"1":{"550":1,"551":1,"552":1,"553":1,"554":1,"555":1,"556":1,"557":1,"558":1,"559":1,"560":1,"561":1,"562":1,"563":1,"564":1,"565":1,"566":1,"567":1,"568":1,"569":1,"570":1,"571":1,"572":1,"573":1,"574":1,"575":1,"576":1,"577":1,"578":1,"579":1,"601":1,"602":1,"603":1,"604":1,"605":1,"606":1,"607":1,"608":1,"609":1,"610":1,"611":1,"612":1,"613":1,"614":1,"615":1,"616":1,"617":1,"618":1,"619":1,"620":1,"621":1,"622":1,"623":1,"624":1,"625":1,"626":1,"627":1,"628":1,"629":1,"630":1},"2":{"112":1,"189":1,"253":1,"490":1}}],["公開予定",{"2":{"681":1}}],["公開済み",{"2":{"681":1}}],["公開後に",{"2":{"468":1,"470":1,"536":1,"538":1}}],["公式ドキュメントを参照",{"2":{"86":1}}],["桁数を大きくする",{"2":{"478":1}}],["桁数を小さくする",{"2":{"478":1}}],["桁や区分値で代替できる場合は",{"2":{"473":1,"541":1}}],["桁",{"0":{"470":1,"538":1},"2":{"466":1,"534":1}}],["状態の切り分けとアクションが一意に特定できるメッセージコード",{"2":{"465":1}}],["さいごに",{"0":{"683":1}}],["される",{"2":{"465":1}}],["さらに",{"2":{"166":1,"239":1,"302":1}}],["正規表現フォーマットでバリデーションを行い",{"2":{"546":1}}],["正規表現のチェックを厳しくする",{"2":{"478":1}}],["正規表現のチェックが行える",{"2":{"466":1,"534":1}}],["正規表現で表現できる文字列はpatternを利用して定義する",{"2":{"473":1,"541":1}}],["正規表現",{"0":{"473":1,"541":1}}],["正規表現レベルの厳格さで書き込みチェックをすることは無いと考えられる",{"2":{"465":1}}],["正常系の",{"2":{"464":1}}],["正常系",{"2":{"438":1,"439":2,"440":2,"441":1,"510":1}}],["古い",{"2":{"465":1}}],["互換性がなくなるため",{"2":{"465":1}}],["存在しない区分値を指定するとエラーになる",{"2":{"465":1}}],["存在する場合",{"2":{"82":1}}],["異常系",{"2":{"510":1,"512":1,"514":1}}],["異常系も忘れず記載する",{"2":{"464":1}}],["異なる文化圏のチームから移籍した時に",{"2":{"647":1}}],["異なるリージョンであれば同名が許容",{"2":{"29":1}}],["異なる",{"2":{"29":1}}],["├─test",{"2":{"544":1}}],["├─pets",{"2":{"544":3}}],["├─examples",{"2":{"544":1}}],["├─openapi",{"2":{"544":2}}],["├──",{"2":{"397":4,"400":4,"407":16}}],["├",{"2":{"460":1}}],["└─pets",{"2":{"544":3}}],["└─test",{"2":{"544":3}}],["└──",{"2":{"400":1,"407":1}}],["└",{"2":{"460":4}}],["店舗",{"2":{"459":1}}],["店舗名は必須項目です",{"2":{"347":1}}],["店舗名の検索",{"2":{"343":1}}],["製品",{"2":{"459":1,"526":2}}],["製品名",{"2":{"2":1}}],["登場順で生成されてしまう",{"2":{"459":1}}],["登録は",{"2":{"546":1}}],["登録日時",{"2":{"447":1,"465":2}}],["登録済み",{"2":{"447":1,"465":2}}],["登録時に設定されたユーザーid",{"2":{"447":1,"463":2}}],["登録ユーザー",{"2":{"433":1}}],["登録",{"0":{"331":1,"426":1},"2":{"421":1}}],["画像や音声が伝わらない分",{"2":{"663":1}}],["画像データなど",{"2":{"457":1}}],["画面投影やwebミーティングでの画面共有時",{"2":{"680":1}}],["画面のモードの切り替えに利用する",{"2":{"432":1}}],["画面表示項目を定義する",{"2":{"409":1}}],["画面表示制御1",{"2":{"366":2}}],["画面表示制御",{"2":{"340":1,"347":1,"352":1,"366":1,"373":2,"376":2,"381":1,"388":3}}],["画面遷移",{"2":{"409":1}}],["画面設計書",{"2":{"407":1}}],["画面設計書の記載方針",{"0":{"403":1}}],["画面項目定義を省略する",{"2":{"403":1}}],["画面項目のどこにマッピングすべきかという情報は",{"2":{"403":1}}],["画面アクション",{"2":{"400":1}}],["画面",{"0":{"390":1},"1":{"391":1,"392":1},"2":{"400":1,"401":1}}],["画面キャプチャなど",{"2":{"97":1}}],["画面経由",{"2":{"73":1}}],["無ければカタカナ",{"2":{"657":1}}],["無しでも良い",{"2":{"457":1}}],["無視で良い",{"2":{"366":1}}],["系のエラーを返すといったことを指す",{"2":{"546":1}}],["系の規約に関しては",{"2":{"490":1}}],["系を利用することを推奨しています",{"2":{"490":1}}],["系への移行も検討する",{"2":{"457":1}}],["系ではステータスコードごとに",{"2":{"457":1}}],["系と異なり",{"2":{"453":1}}],["併記を必須としない",{"2":{"457":1}}],["ごとに定義ファイルを格納する",{"2":{"544":1}}],["ごとに設計担当者を分けて",{"2":{"543":1}}],["ごとに担当者を分けて設計する場合などに",{"2":{"542":1}}],["ごとに機能",{"2":{"503":1,"505":1}}],["ごとに異なる場合は",{"2":{"456":1}}],["ご注意ください",{"2":{"444":1}}],["側で定義する",{"2":{"539":1}}],["側で",{"2":{"456":1}}],["側との共存ができないため",{"2":{"455":1}}],["側の",{"2":{"416":1,"466":1,"534":1}}],["追加処理",{"2":{"570":1,"620":1}}],["追加行の",{"2":{"570":1,"620":1}}],["追加の外部ドキュメント",{"2":{"495":1}}],["追加で",{"2":{"455":1}}],["追い抜きリリース",{"0":{"69":1}}],["提供",{"2":{"546":1}}],["提供していない",{"2":{"464":1}}],["提供は行わないと考えられるため",{"2":{"455":1}}],["提供できるメニューが存在しません",{"2":{"388":1}}],["避けるべきである",{"2":{"453":1}}],["ポーリング",{"2":{"666":1}}],["ポート番号を指定する",{"2":{"453":1}}],["ポイント",{"2":{"465":1}}],["ポリシー設計方針の代表例として",{"2":{"36":1}}],["ポリシー",{"0":{"36":1}}],["ポリシーをアタッチできるため",{"2":{"35":1}}],["ポリシーのアクセス制御など",{"2":{"38":1}}],["ポリシーの設計方針について記載する",{"2":{"36":1}}],["ポリシーの命名に入る前に",{"2":{"36":1}}],["ポリシーの",{"2":{"32":1}}],["○○の件ですが",{"2":{"672":2}}],["○○チーム",{"2":{"658":1}}],["○",{"2":{"449":3,"495":3,"498":3,"503":5}}],["内部の進行について相談する発言を",{"2":{"660":1}}],["内部表",{"2":{"594":1,"643":1}}],["内部的にソートマージの結合をすることでテーブルをフルスキャンする場合があるため",{"2":{"588":1,"638":1}}],["内部エラー",{"2":{"447":1,"464":1}}],["内で使用する単数行コメント",{"2":{"570":1,"620":1}}],["内であり",{"2":{"455":1}}],["内容にはインデントを付けること",{"2":{"569":1,"619":1}}],["内に挿入する単数行コメントは",{"2":{"556":1,"607":1}}],["内の記述が無い",{"2":{"146":1,"223":1,"287":1}}],["注意点",{"2":{"543":1}}],["注意",{"2":{"468":1,"470":1,"536":1,"538":1,"663":1}}],["注文履歴などを管理できます",{"2":{"447":1}}],["注釈付きタグを利用する",{"2":{"73":1}}],["注釈付き",{"2":{"73":1}}],["契約",{"2":{"447":1}}],["要素が空になるなど",{"2":{"462":1}}],["要素の並び順は",{"2":{"447":1}}],["要素規約",{"0":{"447":1,"496":1},"1":{"497":1,"498":1,"499":1,"500":1,"501":1,"502":1,"503":1,"504":1,"505":1,"506":1,"507":1,"508":1,"509":1,"510":1,"511":1,"512":1,"513":1,"514":1,"515":1,"516":1,"517":1,"518":1,"519":1,"520":1,"521":1,"522":1,"523":1,"524":1,"525":1,"526":1,"527":1}}],["要件上どうしても多用が避けられないことが判明している場合は",{"2":{"27":1}}],["向けの",{"2":{"444":1,"493":2,"502":1}}],["向けのコーディング規約はこちらです",{"2":{"315":1,"316":2,"596":2}}],["親リソースが存在しないエラー",{"2":{"439":1}}],["ユーザ向け推奨設定",{"0":{"655":1},"1":{"656":1,"657":1,"658":1}}],["ユーザグループに対してもデフォルトチャンネルを設定できるため",{"2":{"652":1}}],["ユーザや商品など",{"2":{"512":1}}],["ユーザ一覧取得",{"2":{"503":2,"505":1}}],["ユーザアカウント取得",{"2":{"462":1}}],["ユーザーグループを作成できない状態",{"2":{"658":1}}],["ユーザーグループの利用を推奨する",{"2":{"658":1}}],["ユーザーグループの推奨",{"0":{"658":1}}],["ユーザーアカウント",{"2":{"459":1,"526":2}}],["ユーザーアカウント取得",{"2":{"447":1,"462":1}}],["ユーザーid",{"2":{"447":1,"465":2}}],["ユーザーの様々な要望に応えるため",{"2":{"647":1}}],["ユーザーのアカウント情報を取得します",{"2":{"447":1,"462":1}}],["ユーザーの所属が異なっている",{"2":{"430":1}}],["ユーザー権限",{"0":{"431":1},"1":{"432":1,"433":1}}],["ユーザー名",{"2":{"447":1,"465":2}}],["ユーザー名またはパスワードが間違っています",{"2":{"430":1}}],["ユーザー名については全体ポリシーから外れ",{"2":{"33":1}}],["ユーザーストーリー",{"2":{"407":1}}],["ユーザーパスワードや",{"2":{"83":1}}],["ユーザーが作成したことを明確にするため",{"2":{"36":1}}],["ユーザーがシステムのレビュー",{"2":{"4":1}}],["ユーザーを追加することで複数ユーザーの権限を一括管理できる",{"2":{"34":1}}],["ユーザーは複数の",{"2":{"34":1}}],["ユーザーは",{"2":{"33":1}}],["ユーザーについては",{"2":{"33":1}}],["ユーザー",{"0":{"33":1},"2":{"32":1,"33":2,"447":1}}],["ユースケース別に利用すべき",{"2":{"436":1}}],["想定する利用者やユースケース",{"2":{"451":1,"500":1}}],["想定する",{"2":{"434":1}}],["想定外のマージ戦略が選択された時に警告色を表示するというサードパーティ製のchrome拡張",{"2":{"88":1}}],["ゲストユーザーは追加できないため",{"2":{"658":1}}],["ゲストレベルの調整",{"2":{"648":1}}],["ゲスト",{"2":{"433":1,"447":1,"465":2}}],["ゲッターメソッド名は",{"2":{"123":1,"200":1,"264":1}}],["目的",{"2":{"429":1,"432":1}}],["優先度",{"2":{"427":1}}],["抽出条件",{"2":{"425":1}}],["支払い",{"2":{"447":1}}],["支払い金額",{"2":{"425":1}}],["支払い係数",{"2":{"423":1}}],["支払い差し引き金額計算",{"2":{"421":1}}],["支払金額",{"2":{"423":3,"426":1}}],["計算対象抽出xxx",{"2":{"421":1}}],["計算",{"0":{"419":1},"1":{"420":1,"421":1,"422":1,"423":1,"424":1,"425":1,"426":1,"427":1}}],["計算ロジックを記載する",{"2":{"416":1}}],["計測した場合",{"2":{"173":1,"246":1,"309":1}}],["計測不能",{"2":{"170":4,"172":3,"173":2,"174":18,"243":4,"245":3,"246":2,"247":18,"306":4,"308":3,"309":2,"310":18}}],["計測結果",{"2":{"169":1,"170":2,"172":1,"173":1,"174":1,"175":1,"242":1,"243":2,"245":1,"246":1,"247":1,"249":1,"250":1,"305":1,"306":2,"308":1,"309":1,"310":1,"312":1,"313":1}}],["郵便番号",{"2":{"416":1}}],["職業区分",{"2":{"416":1}}],["電話番号",{"2":{"416":1}}],["電通国際情報サービス",{"2":{"111":1,"188":1,"252":1}}],["電通国際情報際サービス版",{"2":{"111":1,"188":1,"252":1}}],["性別",{"2":{"471":1,"539":1}}],["性別区分",{"2":{"416":1}}],["性能悪化を招く恐れがあるため",{"2":{"592":1,"641":1}}],["性能が悪化する可能性がある",{"2":{"588":1,"638":1}}],["性能に差が出るだけでなく",{"2":{"249":1,"312":1}}],["性能差が少ないため",{"2":{"248":1,"311":1}}],["性能差が少ないので",{"2":{"175":1,"250":1,"313":1}}],["性能面で注意が必要な場合があります",{"2":{"169":1,"242":1,"305":1}}],["性能を保証するものではありません",{"2":{"168":1,"241":1,"304":1}}],["性能計測結果についての記載がありますが",{"2":{"168":1,"241":1,"304":1}}],["性能検証を行うための環境",{"2":{"4":1}}],["氏名カナ",{"2":{"416":2}}],["氏名",{"2":{"416":2}}],["氏の寛大なキャンペーンで",{"2":{"167":1,"240":1,"303":1}}],["下表のような形式を定義すること",{"2":{"415":1}}],["下記に例を示す",{"2":{"570":1,"620":1}}],["下記の記載を行わない",{"2":{"581":1,"632":1}}],["下記の順序を守ること",{"2":{"578":1,"627":1}}],["下記の項目を必須項目とする",{"2":{"503":1}}],["下記のようにも記述できます",{"2":{"248":1,"311":1}}],["下記のようになります",{"2":{"173":1,"246":1,"309":1}}],["下記のようにコメントを記述する",{"2":{"166":1,"239":1,"302":1}}],["下記のとおり",{"2":{"101":1,"102":1}}],["下記規約類を参照",{"2":{"111":1,"188":1,"252":1}}],["非推奨",{"2":{"488":1}}],["非同期のコミュニケーションにおいて発信者が気になる点として",{"2":{"664":1}}],["非同期",{"2":{"439":1,"440":1}}],["非同期タスクなど",{"0":{"414":1},"2":{"415":1}}],["非公式和訳",{"2":{"111":1,"188":1,"252":1}}],["図は基本的に変更差分がgitと相性が良い",{"2":{"408":1}}],["番号には体系をもたせず",{"2":{"407":1}}],["配下の各パスは機能",{"2":{"503":1}}],["配下に更に",{"2":{"512":1}}],["配下に記載する",{"2":{"463":1}}],["配下に個々の",{"2":{"460":1}}],["配下で上書き指定する",{"2":{"457":1}}],["配下は以下のルールにしたがった構造を取る",{"2":{"407":1}}],["配信処理の設計書です",{"2":{"417":1}}],["配列リテラル構文",{"2":{"488":1}}],["配列スキーム",{"2":{"488":1}}],["配列スタイル",{"0":{"488":1}}],["配列",{"2":{"469":1,"470":1,"537":1,"538":1}}],["配列をlistに置き換える場合や",{"2":{"153":1,"228":1}}],["配列をコピーするときはarrays",{"2":{"146":1,"223":1,"287":1}}],["配列やリストなどの全要素に対するループ処理は拡張",{"2":{"146":1,"223":1,"287":1}}],["配列宣言は",{"2":{"136":1,"213":1,"277":1}}],["次回出勤時の対応で良いものと区別すること",{"2":{"676":1}}],["次はバックエンド",{"2":{"407":1}}],["次の理由により問題ないという立場を取る",{"2":{"681":1}}],["次の場合は",{"2":{"679":1}}],["次の観点で表示名での表明を推奨する",{"2":{"677":1}}],["次の",{"2":{"596":1}}],["次の流れを想定",{"2":{"474":1,"529":1}}],["次の認証タイプを記載できる",{"2":{"456":1}}],["次のapiを呼び出し",{"2":{"376":1}}],["次の処理を待機",{"2":{"328":1}}],["次の項目変換定義に従い加工し",{"2":{"327":1}}],["次の2つの拡張機能をインストールしておくと利便性が高い",{"2":{"178":1}}],["次の2点に注意すること",{"2":{"66":1}}],["次の記述スタイルを標準とする",{"2":{"159":1}}],["次のリンクも参考にしてください",{"2":{"158":1,"160":1,"233":1}}],["次のリンクから単一ファイル版を取得できます",{"2":{"98":1,"645":1}}],["次のリンクから単一ファイルで作成されたコーディング規約を取得できます",{"2":{"47":1,"317":1,"418":1,"492":1,"597":1}}],["次の1点に注意すること",{"2":{"65":1}}],["次のような特に管理者が関心を持つ事項については対象外とする",{"2":{"648":1}}],["次のようなコマンドで絞り込みで表示できる",{"2":{"74":1}}],["次のような要件があった場合には",{"2":{"60":1}}],["次のように各要素を使ってケバブケース",{"2":{"12":1}}],["次の命名規約を用いる",{"2":{"29":1}}],["列数が多い場合は保守性が非常に低くなり",{"2":{"406":1}}],["列数が多い表形式で設計ドキュメントを記載するケースがある",{"2":{"406":1}}],["列挙定数は定数と同じく",{"2":{"127":1,"204":1,"268":1}}],["削除処理におけるコーディング規約を下記に示す",{"2":{"584":1,"635":1}}],["削除は",{"2":{"546":1}}],["削除した項目の情報を応答する場合は",{"2":{"441":1}}],["削除して利用するという",{"2":{"405":1}}],["削除",{"0":{"584":1,"635":1},"2":{"435":1}}],["削除を防ぐ",{"2":{"89":1}}],["強く敬意を表する",{"2":{"405":1}}],["強制プッシュ時の挙動",{"2":{"65":1}}],["強制プッシュしたときにレビューコメントの紐づけが残るかどうか",{"2":{"65":1}}],["強制プッシュを行い",{"2":{"65":1}}],["強制プッシュすることにより",{"2":{"65":1}}],["強制プッシュでレビューコメントは消えるのか",{"2":{"65":1}}],["強制プッシュ",{"2":{"65":1}}],["制約などを記載する",{"2":{"451":1,"500":1}}],["制約",{"2":{"405":1}}],["制御文",{"2":{"146":1,"223":1,"287":1}}],["制御構造",{"0":{"146":1,"223":1,"287":1}}],["紐づけの認識の齟齬が生じやすいからである",{"2":{"403":1}}],["類似名称の項目がweb",{"2":{"403":1}}],["採番後の変更は許可しない",{"2":{"402":1}}],["採用しない",{"2":{"48":1}}],["帳票",{"2":{"402":1}}],["種別が配列の場合",{"2":{"465":1}}],["種別",{"2":{"402":2}}],["種類のコメントが使える",{"2":{"167":1,"240":1,"303":1}}],["種類",{"0":{"167":1,"240":1,"303":1}}],["いわゆる",{"2":{"546":1}}],["いつまで休暇なのかステータスでは不明である",{"2":{"677":1}}],["いつから",{"2":{"677":1}}],["いつ",{"2":{"396":1}}],["いきつけのジムでトレーニングを受けることができる",{"2":{"396":1}}],["いきつけのジムでパーソナルトレーニングを受けよう",{"2":{"395":1}}],["いずれも以下の命名規約に従う",{"2":{"21":1}}],["いずれの方法でも",{"2":{"3":1}}],["論理名は",{"2":{"570":1,"620":1}}],["論理名の記載",{"2":{"570":1,"578":1,"620":1,"627":1}}],["論理名",{"2":{"391":1,"392":1,"433":1}}],["論理演算子",{"2":{"130":1,"207":1,"271":1}}],["応答順に最大100件表示する",{"2":{"381":1}}],["応答結果が1件以上の場合",{"2":{"381":1}}],["応答結果が0件の場合",{"2":{"381":1}}],["応答が0件の場合",{"2":{"347":1}}],["ダウンロードのレスポンスなどが該当する",{"2":{"514":1}}],["ダイアログがokの場合",{"2":{"376":1}}],["ダイアログを表示する",{"2":{"375":1}}],["ダッシュのみを使用可能",{"2":{"28":1}}],["受け取り側で通知を受けた時点でリマインダーを仕込んだり",{"2":{"676":1}}],["受け取り側で通知時間を設定し",{"2":{"676":1}}],["受け取り側で制御する方針",{"2":{"676":1}}],["受取側で制御すべきという考えもあるが",{"2":{"671":1}}],["受講完了",{"0":{"376":1},"2":{"371":1}}],["受講完了確認",{"0":{"375":1},"2":{"371":1}}],["受講状況の表示",{"2":{"370":1}}],["受講済みのトレーニング一覧を表示する",{"2":{"370":1}}],["受講予定",{"2":{"370":1}}],["受信側が不在時に緊急性の低い通知を防げたり",{"2":{"677":1}}],["受信者側で調整する",{"2":{"662":1}}],["受信ワーク",{"2":{"423":1}}],["受信",{"2":{"402":1}}],["受信ではテスト観点で過去日も許容する",{"2":{"334":1}}],["受信完了後",{"2":{"327":1}}],["へ自動参加するが",{"2":{"652":1}}],["へ相談する",{"2":{"593":1,"642":1}}],["へ",{"2":{"366":1}}],["への対応は絵文字リアクションだけで済まさない",{"2":{"664":1}}],["への適応漏れを無くす",{"2":{"525":1}}],["への変換",{"0":{"248":1,"249":1,"311":1,"312":1}}],["への設定を行うことで",{"2":{"77":1}}],["への同期は",{"2":{"61":1}}],["未来",{"2":{"657":2}}],["未来太郎",{"2":{"447":1,"465":2}}],["未指定の場合は",{"2":{"459":1}}],["未指定の場合に",{"2":{"457":1,"458":1}}],["未認証ユーザー",{"2":{"433":1}}],["未ログインとして",{"2":{"366":1}}],["未着チェック",{"2":{"323":1,"326":1}}],["クォートでのラップは不要",{"2":{"487":1}}],["クォートは可読性を上げるために",{"2":{"487":1}}],["クォート",{"0":{"487":1}}],["クライアントのアプリケーションコードが明示的にアクセスしないため",{"2":{"476":1,"531":1}}],["クライアントの同期をとる必要があり困難なケースが多い",{"2":{"465":1}}],["クライアント側",{"2":{"476":1,"531":1}}],["クライアントが取得するための",{"2":{"475":1,"530":1}}],["クライアントから直接ファイルをアップロードしてもらう",{"2":{"474":1,"529":1}}],["クライアント",{"2":{"466":1,"534":1,"546":1}}],["クライアントサイドが",{"2":{"465":1}}],["クラスが存在します",{"2":{"174":1,"247":1,"310":1}}],["クラスのオブジェクトを生成してスローしない",{"2":{"163":1,"236":1,"299":1}}],["クラス内で処理する一時的なデータを表現するためだけにrecordを使用しても良い",{"2":{"159":1}}],["クラスfooのフィールドstrの値で昇順にソート",{"2":{"156":2,"231":2,"295":2}}],["クラスfooのフィールドstrの値で昇順にソートし",{"2":{"156":1,"231":1,"295":1}}],["クラスを使う",{"2":{"148":1,"225":1,"289":1}}],["クラスを利用する",{"2":{"147":2,"224":2,"288":2}}],["クラス変数にはクラス名を使用してアクセスすること",{"2":{"139":1,"216":1,"280":1}}],["クラス変数",{"0":{"139":1,"216":1,"280":1}}],["クラス名を使って呼び出す",{"2":{"135":1,"212":1,"276":1}}],["クラス名は単語の先頭を大文字にする",{"2":{"122":1,"199":1,"263":1}}],["クラスメソッドを利用するときは",{"2":{"135":1,"212":1,"276":1}}],["クラスメソッド",{"0":{"135":1,"212":1,"276":1}}],["クラスは",{"2":{"133":1,"210":1,"274":1}}],["クラスヘッダコメントのフォーマットは以下の通り",{"2":{"131":1,"208":1,"272":1}}],["クラス",{"0":{"122":1,"199":1,"263":1},"2":{"131":2,"148":1,"153":4,"208":2,"225":1,"228":4,"272":2,"289":1,"292":4}}],["クラスやメソッドの役割が明確で",{"2":{"113":1,"190":1,"254":1}}],["クラスターの命名規約",{"2":{"22":1,"26":1}}],["クラスター",{"2":{"22":1,"26":1}}],["クエリパラメータは",{"2":{"508":1}}],["クエリパラメータはスネークケースで表現する",{"2":{"508":1}}],["クエリパラメータ",{"0":{"517":1},"2":{"456":1,"515":1}}],["クリック可能とする",{"2":{"376":1}}],["クリック可否判定",{"2":{"376":1}}],["クレジット決済に必要な項目の入力",{"2":{"356":1}}],["料金を表示",{"2":{"356":1}}],["選択されたトレーニング予約id",{"2":{"376":1}}],["選択された日付がカレンダーに追加される",{"2":{"353":1}}],["選択例を以下に示す",{"2":{"45":1}}],["起動条件",{"2":{"373":1,"376":1}}],["起動パラメータを設定",{"2":{"388":3}}],["起動パラメータ",{"2":{"352":1,"359":1,"366":1,"373":1,"388":1}}],["起動時間",{"2":{"323":1,"326":1}}],["起動時刻",{"2":{"38":1}}],["ドメイン知識など抑えておくべき前提知識",{"2":{"407":1}}],["ドロップで範囲指定",{"2":{"350":1}}],["ドラッグ",{"2":{"350":1}}],["ドキュメントとしての価値を高めるため",{"2":{"546":1}}],["ドキュメントやツールにとって重要であるため",{"2":{"526":1}}],["ドキュメントやツールにとって非常に重要であるため",{"2":{"459":1}}],["ドキュメントに影響しない",{"2":{"523":1}}],["ドキュメントエディタとして広く使用される",{"2":{"507":1}}],["ドキュメントが使用する",{"2":{"495":1,"497":1}}],["ドキュメントを作成する上での設計上ポイントをいくつか記載する",{"2":{"528":1}}],["ドキュメントを構成する要素別に具体的なコーディング規約を記載する",{"2":{"496":1}}],["ドキュメントを構成する要素はオブジェクトと呼ばれ",{"2":{"495":1}}],["ドキュメントを記述する際のコーディング規約をまとめている",{"2":{"493":1}}],["ドキュメントの頻繁な共有が必要な場合は",{"2":{"501":1}}],["ドキュメントの構成要素",{"0":{"495":1}}],["ドキュメントのバージョン",{"2":{"449":1,"498":1}}],["ドキュメントは単一のファイルで構成することも複数の分割されたファイルで構成することもできるが",{"2":{"542":1}}],["ドキュメントは",{"2":{"483":1}}],["ドキュメントは確認できなかったら",{"2":{"19":1}}],["ドキュメントで参照する場合の可読性を上げるため",{"2":{"459":1,"526":1}}],["ドキュメント",{"2":{"459":1}}],["ドキュメント生成",{"2":{"55":1}}],["ドキュメンテーションの更新",{"2":{"43":1}}],["指定してはならない",{"2":{"465":1}}],["指定できる条件はなるべく細かく指定する",{"2":{"463":1}}],["指定する",{"2":{"455":1}}],["指定されたトレーナーと",{"2":{"350":1}}],["指数表記になることがあります",{"2":{"148":1,"225":1,"289":1}}],["検索性の高い氏名",{"0":{"657":1}}],["検索条件で=",{"2":{"581":1,"632":1}}],["検索条件に従いapiを実行し",{"2":{"379":1}}],["検索条件に一致する順にパーソナルトレーナーを表示する",{"2":{"378":1}}],["検索処理におけるコーディング規約を下記に示す",{"2":{"581":1,"632":1}}],["検索数上限",{"2":{"517":1}}],["検索数の",{"2":{"517":1}}],["検索結果の項目数上限",{"2":{"468":1,"536":1}}],["検索系",{"2":{"438":1}}],["検索apiで複数のテーブルを参照して結果を応答する場合に",{"2":{"415":1}}],["検索",{"0":{"347":1,"581":1,"632":1},"2":{"344":1,"583":1,"634":1}}],["検証期間が長引きそうな場合は",{"2":{"59":1}}],["予測ワーク",{"2":{"427":3}}],["予約投稿で休暇明けに投稿するなどのアクションがすぐ取れる",{"2":{"677":1}}],["予約投稿を推奨する",{"2":{"676":1}}],["予約投稿を活用する",{"0":{"676":1}}],["予約語と同様に小文字を使用する",{"2":{"603":1}}],["予約語と同様に大文字を使用する",{"2":{"552":1}}],["予約語以外に対しても",{"2":{"552":1,"603":1}}],["予約語以外",{"0":{"552":1,"603":1}}],["予約語に対しては",{"2":{"551":1,"602":1}}],["予約語",{"0":{"551":1,"602":1}}],["予約し",{"2":{"396":1}}],["予約のためカレンダーモーダルを起動",{"2":{"386":1}}],["予約済み+現在時間",{"2":{"376":1}}],["予約済みトレーニングを完了済みのトレーニングに更新",{"2":{"371":1}}],["予約済みトレーニングを受講完了に切り替えるためのモーダル起動",{"2":{"371":1}}],["予約あり",{"2":{"352":1}}],["予約を行えるようにする",{"2":{"349":1}}],["予算の絞り込み",{"2":{"343":1}}],["予め取りうるタグ値のパターンが決まっている場合に利用",{"2":{"40":1}}],["予め用意されているポリシーの名前は",{"2":{"36":1}}],["表紙がプレビューされるが",{"2":{"681":1}}],["表示名に不在情報を記載",{"2":{"677":1}}],["表示名をさん付けにするハックも存在するため",{"2":{"662":1}}],["表示名はチームごとに記載文化や書き方が異なるケースが多いので",{"2":{"657":1}}],["表示名",{"2":{"657":1}}],["表示名のガイドラインを設定する権限があるのは",{"2":{"653":1}}],["表示名ガイドライン",{"0":{"653":1}}],["表示を",{"2":{"366":1}}],["表示",{"2":{"340":1,"347":1,"373":2,"376":2,"381":1,"388":3}}],["表現が定数として直接現れており",{"2":{"136":1,"213":1,"277":1}}],["モデルの中身は別ファイルとして切り出すことが可能である",{"2":{"544":1}}],["モデル名は",{"2":{"463":1,"465":1}}],["モーダル画面",{"0":{"392":1},"2":{"402":1}}],["モーダルに指定された値をクエリパラメータに設定する",{"2":{"347":1}}],["モーダルを起動",{"2":{"339":1,"346":1}}],["モノリポの場合は",{"2":{"74":1}}],["ボタン押下",{"2":{"337":2,"344":1,"357":2,"364":2,"371":3,"379":2,"386":1}}],["ボタンをクリックすると",{"2":{"183":1}}],["ボタンをクリックし",{"2":{"179":1}}],["初期検索条件に従いapiを実行し",{"2":{"371":1,"386":1}}],["初期パラメータを設定",{"2":{"352":2,"359":1}}],["初期パラメータは無し",{"2":{"339":1,"346":1}}],["初期表示と同等の処理を実行する",{"2":{"383":1}}],["初期表示のまま",{"2":{"366":2}}],["初期表示イベント",{"2":{"366":1,"373":1}}],["初期表示",{"0":{"339":1,"346":1,"352":1,"359":1,"366":1,"373":1,"381":1,"388":1},"2":{"337":2,"344":2,"350":2,"357":2,"364":2,"371":2,"379":2,"386":2}}],["初回リリース",{"2":{"76":1}}],["会員登録",{"0":{"341":1,"368":1},"2":{"337":1,"364":2,"366":1}}],["会員登録への導線",{"2":{"336":1}}],["会社コード",{"2":{"324":1,"331":1,"426":1}}],["会社を超えて共通のグループを付与するといったユースケースも考えられる",{"2":{"34":1}}],["会社の特定に利用",{"2":{"2":1}}],["会社名",{"2":{"2":1}}],["更新する場合は",{"2":{"583":1,"634":1}}],["更新処理におけるコーディング規約を下記に示す",{"2":{"583":1,"634":1}}],["更新は実表に対して行う",{"2":{"583":1,"634":1}}],["更新は",{"2":{"546":1}}],["更新",{"0":{"332":1,"427":1,"583":1,"634":1},"2":{"421":1,"435":1}}],["更新されない文字列にはstring",{"2":{"147":1,"224":1,"288":1}}],["更新される文字列にはstringbuilder",{"2":{"147":1,"224":1,"288":1}}],["出力先テーブルに",{"2":{"327":1}}],["項目ごとに改行を入れ",{"2":{"556":1,"607":1}}],["項目長",{"2":{"546":1}}],["項目に渡す方式である",{"2":{"475":1,"530":1}}],["項目名は",{"2":{"469":2,"537":2}}],["項目の前にはインデントを挿入する",{"2":{"556":1,"607":1}}],["項目の論理名や補足説明を記載する",{"2":{"463":1}}],["項目の由来を示すため",{"2":{"415":1}}],["項目であるかを定義する必要がある",{"2":{"417":1}}],["項目数は多くなくfigmaを見れば自明であるため",{"2":{"403":1}}],["項目",{"0":{"329":1,"424":1},"1":{"330":1,"331":1,"332":1,"425":1,"426":1,"427":1}}],["項目定義として可能であればできる限り細かく指定する",{"2":{"465":1}}],["項目定義",{"0":{"324":1},"1":{"325":1}}],["項目順は入れ替え不可",{"2":{"323":1,"326":1}}],["項目順",{"2":{"323":1,"326":1}}],["機械学習チームの働き方",{"2":{"667":1}}],["機密事項を含む場合",{"2":{"665":1}}],["機密情報の流出に注意する",{"0":{"680":1},"2":{"665":1}}],["機密情報",{"2":{"323":1,"326":1}}],["機構",{"2":{"495":1}}],["機能物理名",{"2":{"462":1}}],["機能idの採番について注意点",{"2":{"402":1}}],["機能idのコード体系は以下に従う",{"2":{"402":1}}],["機能数が爆発しないという想定で2桁とする",{"2":{"402":1}}],["機能概要",{"2":{"336":1,"343":1,"349":1,"356":1,"363":1,"370":1,"378":1,"385":1}}],["機能目的",{"2":{"336":1,"343":1,"349":1,"356":1,"363":1,"370":1,"378":1,"385":1}}],["機能を実現するために",{"2":{"118":1,"195":1,"259":1}}],["機能",{"2":{"109":1,"110":2,"462":1}}],["機能ブランチに対して開発ブランチの変更を取り込む方法は",{"2":{"108":1}}],["機能ブランチに開発ブランチの変更を取り込む方法",{"0":{"108":1},"1":{"109":1,"110":1}}],["機能ブランチで行った変更yとzを1つにまとめたコミットがメインの開発ブランチに作成されます",{"2":{"103":1}}],["機能ブランチの変更を取り込む形になる",{"2":{"101":1,"102":1,"103":1,"106":1}}],["機能追加や変更を行うブランチで",{"2":{"53":1}}],["機能修正",{"2":{"45":1}}],["圧縮",{"2":{"323":1,"326":1}}],["差分更新apiの場合にあるとおり",{"2":{"513":1}}],["差分",{"2":{"323":2,"326":2}}],["回答すべきかどうか逡巡してしまう",{"2":{"675":1}}],["回答してもらった人に対して",{"2":{"674":1}}],["回答は急がないケースは想像以上に多い",{"2":{"664":1}}],["回",{"2":{"323":1,"326":1}}],["頻度",{"2":{"323":1,"326":1}}],["頻繁に",{"2":{"167":1,"240":1,"303":1}}],["随時",{"2":{"323":1,"326":1}}],["保持期限",{"2":{"321":1,"322":1,"411":1}}],["保守性の向上",{"2":{"140":1,"217":1,"281":1}}],["保守性の低下を防ぐために",{"2":{"136":1,"213":1,"277":1}}],["保守性に優れたコードを作成するためには",{"2":{"113":1,"190":1,"254":1}}],["保守性に優れたプログラムを記述することが評価される",{"2":{"113":1,"190":1,"254":1}}],["保守性",{"2":{"112":1,"118":1,"189":1,"195":1,"253":1,"259":1,"490":1}}],["保守運用の視点ではマイナスである",{"2":{"69":1}}],["対応可否をコメントでフィードバックする必要がある",{"2":{"664":1}}],["対応するバージョンについて",{"0":{"490":1}}],["対向システム",{"0":{"319":1}}],["対象リソースが存在しないエラー",{"2":{"440":1,"441":1}}],["対象マスタのtruncate",{"2":{"328":1}}],["対象ファイルを取得",{"2":{"328":1}}],["対象ファイルをステージできる",{"2":{"183":1}}],["対象ファイルの存在チェック",{"2":{"328":1}}],["対象ブランチの上で右クリックし",{"2":{"183":1}}],["対象ブランチの行",{"2":{"183":1}}],["対象",{"2":{"2":1}}],["静的解析で検出されるコードです",{"2":{"249":1,"312":1}}],["静的解析で検出される問題のため",{"2":{"248":1,"311":1}}],["生成ツール上問題ないのであれば",{"2":{"512":1}}],["生成ツールによってはうまく型が生成されないためである",{"2":{"512":1}}],["生成したintegerインスタンスをオートボクシングでintにcastしている",{"2":{"249":1,"312":1}}],["生年月日",{"2":{"416":1}}],["生産性の向上",{"2":{"112":1,"189":1,"253":1}}],["理解が必要です",{"2":{"248":1,"311":1}}],["理由として",{"2":{"483":1}}],["理由は",{"2":{"403":1}}],["理由は以下である",{"2":{"70":1,"476":1,"477":1}}],["理由は次の通り",{"2":{"65":1,"66":1}}],["理由",{"2":{"4":1,"15":1,"16":1,"26":1,"33":1,"523":1,"524":1,"531":1,"532":1,"542":1,"654":1,"656":1,"657":1,"660":1,"662":1,"663":1,"665":1,"666":1,"671":1,"676":1,"679":1,"681":1}}],["作成者",{"2":{"681":1}}],["作成する",{"2":{"454":1}}],["作成中",{"2":{"444":1}}],["作成したコミットをリモートリポジトリにプッシュできる",{"2":{"183":1}}],["作成したブランチにチェックアウトする",{"2":{"182":1}}],["作成したブランチに自動的にチェックアウトする",{"2":{"182":1}}],["作成元コミットの行上で右クリックし",{"2":{"182":1}}],["作成元のブランチを選択することができる",{"2":{"182":1}}],["作業チケットやwikiなどに記載し",{"2":{"668":1}}],["作業状況を本人に確認",{"2":{"666":1}}],["作業はチケット管理システムを駆動に開発するため",{"2":{"70":1}}],["作業完了後に削除するため",{"2":{"53":1}}],["雲アイコン",{"2":{"181":1,"183":1}}],["三点リーダーアイコン",{"2":{"181":1,"182":1,"183":1}}],["三項演算子",{"0":{"150":1,"227":1,"291":1}}],["冒頭の記述通り",{"2":{"180":1}}],["白丸のグラフアイコン",{"2":{"180":1}}],["黒丸のグラフアイコン",{"2":{"180":1}}],["負荷が高いため",{"2":{"590":1}}],["負荷は余計にかかる",{"2":{"474":1,"529":1}}],["負",{"2":{"175":1,"250":1,"313":1}}],["万が一あぶれた場合",{"2":{"402":1}}],["万回",{"2":{"173":1,"246":1,"249":1,"309":1,"312":1}}],["万件",{"2":{"169":2,"172":3,"174":6,"242":2,"245":3,"247":6,"305":2,"308":3,"310":6}}],["ため",{"2":{"526":1}}],["たとえば以下のように",{"2":{"173":1,"246":1,"309":1}}],["ただし処理を書いてはいけない部分もあるので",{"2":{"163":1,"236":1,"299":1}}],["ただし",{"2":{"14":1,"21":1,"27":1,"104":1,"105":1,"107":1,"124":1,"131":1,"146":1,"154":1,"159":1,"160":2,"201":1,"208":1,"223":1,"229":1,"265":1,"272":1,"287":1,"293":1,"415":1,"455":1,"462":1,"476":1,"527":1,"531":1,"667":1,"676":1}}],["件の場合も",{"2":{"438":1}}],["件時連携",{"2":{"323":1,"326":1}}],["件",{"2":{"172":1,"245":1,"308":1}}],["繰り返し",{"0":{"172":1,"245":1,"308":1}}],["繰り返し処理中の文字列連結は",{"2":{"172":1,"245":1,"308":1}}],["繰り返し処理中のオブジェクトの生成は最小限にする",{"2":{"146":1,"223":1,"287":1}}],["繰り返し処理内部で例外をキャッチし処理を行いたい場合は繰り返し処理の内部でtryブロックを利用してもよい",{"2":{"146":1,"223":1,"287":1}}],["繰り返し処理の内部で",{"2":{"146":1,"223":1,"287":1}}],["京回",{"2":{"170":1,"175":1,"243":1,"250":1,"306":1,"313":1}}],["億回",{"2":{"170":4,"173":1,"243":4,"246":1,"249":1,"306":4,"309":1,"312":1}}],["億件",{"2":{"169":2,"242":2,"305":2}}],["匿名クラスとほぼ同じ動作をします",{"2":{"170":1,"243":1,"306":1}}],["匿名クラス",{"2":{"170":4,"243":4,"306":4}}],["匿名クラスを利用するよりも効率的です",{"2":{"170":1,"243":1,"306":1}}],["小中規模の処理量であれば考慮するほどの性能差はありませんが",{"2":{"169":1,"242":1,"305":1}}],["小文字を使用する",{"2":{"602":1}}],["小文字を推奨",{"2":{"13":1}}],["小文字かつ半角スペース区切りで記載する",{"2":{"526":1}}],["小文字かつ半角スペース区切り",{"2":{"459":1}}],["小文字の違いで名前を区別しない",{"2":{"120":1,"197":1,"261":1}}],["小文字",{"2":{"31":1}}],["小文字または数字で始まっている必要がある",{"2":{"28":1}}],["簡潔に書けますが",{"2":{"169":1,"242":1,"305":1}}],["適用範囲",{"0":{"648":1}}],["適用不能",{"2":{"471":1,"539":1}}],["適用する",{"2":{"167":1,"240":1,"303":1}}],["適切な",{"2":{"166":1,"239":1,"302":1}}],["適切なバージョンアップを行うことで視認性が上がり",{"2":{"76":1}}],["割引を",{"2":{"167":1,"240":1,"303":1}}],["定義からコードを生成し",{"2":{"546":1}}],["定義ファイルの完成度はできるかぎり高め",{"2":{"546":1}}],["定義例などはそれに基づいて記載しているので注意する",{"2":{"546":1}}],["定義するオブジェクトの",{"2":{"512":1}}],["定義方針は下記の通りである",{"2":{"512":1}}],["定義で利用する共通のデータモデルを定義する",{"2":{"512":1}}],["定義で以下の変更を行う場合は",{"2":{"478":1}}],["定義としてはシンプルであるため",{"2":{"474":1,"475":1,"529":1,"530":1}}],["定義を管理するため区別したい場合は",{"2":{"484":1}}],["定義を書く必要はない",{"2":{"474":1,"529":1}}],["定義を記載するにあたり",{"2":{"466":1}}],["定義上は",{"2":{"455":1}}],["定義のインプットになる事が多いため",{"2":{"470":1,"538":1}}],["定義の",{"2":{"454":1}}],["定義についてのコーディング規約をまとめます",{"2":{"444":1}}],["定義書",{"0":{"417":1}}],["定義書は予期せぬタイミングで他チームに展開する必要がしばしばあり",{"2":{"453":1}}],["定義書は",{"2":{"413":1,"417":1}}],["定時",{"2":{"323":2,"326":2}}],["定められた通り",{"2":{"167":1,"240":1,"303":1}}],["定数を条件に用いる場合やインライン",{"2":{"550":1,"601":1}}],["定数一覧",{"2":{"462":1}}],["定数処理を大量に処理することは考えられないので性能問題になることはありませんが",{"2":{"173":1,"246":1,"309":1}}],["定数の場合は+演算子で定義するほうがパフォーマンスが高いです",{"2":{"173":1,"246":1,"309":1}}],["定数のみとし",{"2":{"137":1,"214":1,"278":1}}],["定数では利用せず",{"2":{"137":1,"214":1,"278":1}}],["定数は",{"2":{"137":1,"214":1,"278":1}}],["定数はfinalで宣言する",{"2":{"136":1,"213":1,"277":1}}],["定数は全てstatic",{"2":{"125":1,"202":1,"266":1}}],["定数",{"0":{"137":1,"173":1,"214":1,"246":1,"278":1,"309":1},"2":{"129":1,"137":1,"139":1,"206":1,"214":1,"216":1,"270":1,"278":1,"280":1}}],["ビューで取得したいデータなど開発者の意図はコメントにて記載する",{"2":{"550":1,"601":1}}],["ビジネスロジック1計算結果",{"2":{"426":1}}],["ビジネスロジック1",{"0":{"423":1},"2":{"421":1}}],["ビジネスロジック",{"0":{"333":1,"422":1},"1":{"423":1},"2":{"167":1,"240":1,"303":1}}],["ビット演算子",{"2":{"130":1,"207":1,"271":1}}],["年",{"2":{"167":1,"240":1,"303":1,"321":1,"322":1,"474":2,"490":1,"529":2}}],["年間不要であるならば削除せよ",{"2":{"167":1,"240":1,"303":1}}],["年代の典型的な",{"2":{"166":1,"239":1,"302":1}}],["年代から",{"2":{"166":1,"239":1,"302":1}}],["風コメントでコメントを書くとまとめてコメントアウトする場合に不便なため",{"2":{"167":1,"240":1,"303":1}}],["風コメント",{"2":{"167":1,"240":1,"303":1}}],["風コメントは",{"2":{"167":1,"240":1,"303":1}}],["顧客はわれわれがサービスまたは製品を売った人物",{"2":{"167":1,"240":1,"303":1}}],["顧客",{"2":{"167":1,"240":1,"303":1}}],["顧客からの要求があった場合を除く",{"2":{"131":1,"208":1,"272":1}}],["関連議論がいくつかのスレッドに分かれる場合",{"2":{"668":1}}],["関連チケット",{"2":{"166":1,"239":1,"302":1}}],["関係演算子",{"2":{"130":1,"207":1,"271":1}}],["該当チャンネルの権限を有していないユーザーにも参照権限を与えてしまう",{"2":{"682":1}}],["該当しないケース",{"2":{"681":1}}],["該当スレッドのフォローを外せば良いので",{"2":{"666":1}}],["該当のスレッドの全コメントをチェックしたほうが良いのか",{"2":{"666":1}}],["該当するテストケースのデータファイルパスを参照させる",{"2":{"544":1}}],["該当メソッドの使用例やサンプルコード",{"2":{"166":1,"239":1,"302":1}}],["該当行の変更あり",{"2":{"65":2}}],["該当行の変更なし",{"2":{"65":2}}],["並び順の例",{"2":{"461":1}}],["並行性",{"2":{"166":1,"239":1,"302":1}}],["並列ストリームは利用しないこと",{"2":{"156":1,"231":1,"295":1}}],["事前に",{"2":{"510":1}}],["事前告知した日時でリリースしたいなど",{"2":{"69":1}}],["事実上",{"2":{"465":1,"583":1,"634":1}}],["事後条件",{"2":{"166":1,"239":1,"302":1}}],["影響のある事前条件",{"2":{"166":1,"239":1,"302":1}}],["判明しているが修正しないことにした場合など",{"2":{"166":1,"239":1,"302":1}}],["→",{"2":{"166":4,"239":4,"302":4,"480":1,"553":3,"604":3}}],["箱をきれいに整列させることは難しい",{"2":{"166":1,"239":1,"302":1}}],["率直に言えばそれは製品に加わるちょっとした価値に比べれば大きな時間の無駄である",{"2":{"166":1,"239":1,"302":1}}],["彼らの芸術的な主張を表わしているのかもしれないが",{"2":{"166":1,"239":1,"302":1}}],["見出し状のコメント",{"2":{"166":1,"239":1,"302":1}}],["見やすさを重視することは",{"2":{"114":1,"191":1,"255":1}}],["見やすさを重視せよ",{"0":{"114":1,"191":1,"255":1},"2":{"113":1,"190":1,"254":1}}],["見やすさに気を配って記述する必要がある",{"2":{"114":1,"191":1,"255":1}}],["過剰なメンションの抑制",{"0":{"674":1}}],["過剰な装飾は使わない",{"2":{"166":1,"239":1,"302":1}}],["過去のスレッドでやり取りを再開した場合に",{"2":{"669":1}}],["過去の時代の出来事である",{"2":{"113":1,"190":1,"254":1}}],["過去バージョンをサポートする場合",{"0":{"63":1},"2":{"60":1}}],["ガベージコレクション",{"0":{"164":1,"237":1,"300":1}}],["範囲が広すぎる例外クラスの利用はng",{"2":{"163":1,"236":1,"299":1}}],["詳細はスレッドに記載",{"2":{"667":1}}],["詳細はフューチャー技術ブログ記事を参照されたい",{"2":{"533":1}}],["詳細は参照ください",{"2":{"474":1,"529":1}}],["詳細はopenapi",{"2":{"413":1}}],["詳細はfeatureブランチ",{"2":{"51":1}}],["詳細画面への導線",{"2":{"378":1}}],["詳細",{"2":{"178":1,"456":1}}],["詳細な例外クラスで受け取る",{"2":{"163":1,"236":1,"299":1}}],["修正終了点コメント",{"2":{"570":1,"620":1}}],["修正開始点コメント",{"2":{"570":1,"620":1}}],["修正コメントが必要な場合",{"2":{"570":1,"620":1}}],["修正コメント",{"2":{"570":1,"620":1}}],["修正するために多くの行の変更を強制することになるため",{"2":{"160":1}}],["修正が完了するとmainとdevelopの両方",{"2":{"56":1}}],["読み手にとっての負荷が軽減されるため",{"2":{"678":1}}],["読みやすく見えるかもしれませんが",{"2":{"160":1}}],["読みやすさ向上の目的で改行コードのエスケープシーケンス",{"2":{"160":1}}],["読んで欲しい否かで決める",{"2":{"666":1}}],["読んで内容が理解できるという意味で",{"2":{"115":1,"192":1,"256":1}}],["二重引用符",{"2":{"160":1}}],["座標",{"2":{"159":6}}],["矩形の高さ",{"2":{"159":3}}],["矩形の幅",{"2":{"159":3}}],["矩形の左上隅の",{"2":{"159":6}}],["矩形を表すクラス",{"2":{"159":1}}],["方針",{"2":{"512":1}}],["方針例",{"2":{"159":1}}],["方針無く",{"2":{"158":1,"159":1,"233":1}}],["レスポンスオブジェクトを個別に定義",{"2":{"510":1}}],["レスポンスで用いるモデルについても同様に設定でき",{"2":{"466":1,"534":1}}],["レスポンスを受信できない",{"2":{"465":1}}],["レスポンスボディ",{"2":{"465":1}}],["レスポンスの値を用いて",{"2":{"523":1}}],["レスポンスの構造体を出力するために",{"2":{"510":1}}],["レスポンスの",{"2":{"470":2,"538":2}}],["レスポンスの定義を記載する",{"2":{"464":1}}],["レスポンスの桁数変更",{"2":{"442":1}}],["レスポンス",{"2":{"460":1}}],["レスポンス項目",{"2":{"415":1,"478":1}}],["レベル",{"2":{"430":1}}],["レイアウトを参考にする",{"2":{"465":1}}],["レイアウト",{"2":{"323":1,"326":1}}],["レコード数を数える",{"2":{"579":1,"628":1}}],["レコードのアクセサを上書きしない",{"2":{"159":1}}],["レコードコンポーネントにコメントがあればすぐに説明を読むことができますが",{"2":{"159":1}}],["レコードコンポーネントの定義と",{"2":{"159":1}}],["レコードコンポーネントの",{"2":{"159":1}}],["レコードコンポーネントへ直接コメントをつけることを検討する",{"2":{"159":1}}],["レコードコンポーネントが多い場合",{"2":{"159":1}}],["レコードコンポーネントが多い場合も比較的読みやすい",{"2":{"159":1}}],["レコードコンポーネントが少なく",{"2":{"159":1}}],["レコードコンポーネント名からでも意味が理解でき",{"2":{"159":1}}],["レコードコンポーネント",{"2":{"159":2}}],["レコード",{"0":{"159":1}}],["レビュー依頼や確認依頼など",{"2":{"674":1}}],["レビュー依頼",{"2":{"667":1}}],["レビューや差分管理が行いやすいためである",{"2":{"483":1}}],["レビューがありません",{"2":{"388":1}}],["レビュー効率の向上や障害調査に役立てることができる",{"2":{"97":1}}],["レビュー運用上に支障となることも多く",{"2":{"88":1}}],["レビュー承認後のpushで再承認を必要とするかだが",{"2":{"88":1}}],["レビューを必須とする",{"2":{"88":1}}],["レビュー対応をしたとみなしレビューコメントのひも付きは解除されているべきである",{"2":{"65":1}}],["レビューコメントで付けられた行を修正し",{"2":{"65":1}}],["レビューコメントがすべて解決していることを条件とする",{"2":{"88":1}}],["レビューコメントが付けられた行とは別の変更を行い",{"2":{"65":1}}],["レビューコメントが消えてしまわないかという懸念を聞くことがある",{"2":{"65":1}}],["レビューアの負荷が高まる",{"2":{"65":1}}],["`e`の型と",{"2":{"158":1,"233":1}}],["`equals`メソッドは通例としてbooleanを返します",{"2":{"158":1,"233":1}}],["`compareto`メソッドは通例としてintを返します",{"2":{"158":1,"233":1}}],["`compare`",{"2":{"158":1,"233":1}}],["`hashcode`メソッドは通例としてintを返します",{"2":{"158":1,"233":1}}],["`hash`",{"2":{"158":1,"233":1}}],["`is`で始まるメソッドは通例としてbooleanを返します",{"2":{"158":1,"233":1}}],["`git",{"2":{"105":1}}],["右辺に関数を通してください",{"2":{"581":1,"632":1}}],["右辺をみて型がわかる場合は",{"2":{"158":1,"233":1}}],["右辺で演算してください",{"2":{"581":1,"632":1}}],["右辺で",{"2":{"158":2,"233":2}}],["明確に型がわかる場合はvarを利用する",{"2":{"158":2,"233":2}}],["明確な方針で",{"2":{"158":1,"159":1,"233":1}}],["明示的にタイプ変換を行う",{"2":{"572":1,"621":1}}],["明示的に",{"2":{"2":1}}],["むしろミスの元となるため極力変数代入はしないこと",{"2":{"156":1,"231":1,"295":1}}],["難解になってしまった場合のみ処理中の記載を認める",{"2":{"156":1,"231":1,"295":1}}],["程度までを推奨する",{"2":{"156":1,"231":1,"295":1}}],["末端処理を行うと使用済みとなり",{"2":{"156":1,"231":1,"295":1}}],["末端処理前のピリオドの前で改行する",{"2":{"156":1,"231":1,"295":1}}],["末尾のダッシュ",{"2":{"28":1}}],["末尾のアルファベットだけとする",{"2":{"9":1}}],["末尾にハイフン不可",{"2":{"21":1}}],["記載は避けるべきである",{"2":{"502":1}}],["記載することにより",{"2":{"477":1,"532":1}}],["記載が困難なケースがある",{"2":{"476":1,"531":1}}],["記載順は以下のルールである",{"2":{"461":1}}],["記載内容",{"2":{"449":1,"498":1,"503":1}}],["記載しない",{"2":{"409":1}}],["記述例は割愛する",{"2":{"474":1,"475":1,"529":1,"530":1}}],["記述から明らかにミスであることが解るため",{"2":{"249":1,"312":1}}],["記述することはありません",{"2":{"248":1,"311":1}}],["記述した通りの処理が行われます",{"2":{"173":1,"246":1,"309":1}}],["記述の際の改行位置は",{"2":{"156":1,"231":1,"295":1}}],["記号やリストで表現することができないものを指す",{"2":{"136":1,"213":1,"277":1}}],["完全に不変",{"2":{"153":1,"228":1}}],["他にもメンバー全員に参加して欲しいチャンネルがある場合にはデフォルトチャンネルを追加する",{"2":{"652":1}}],["他のメンバーは参照しても参照しなくてもどちらでも良い",{"2":{"666":1}}],["他の方法を検討してください",{"2":{"581":1,"632":1}}],["他の人が不快になるような発言や不適切な利用は避ける",{"2":{"666":1}}],["他の人がコードを理解するに十分な情報を提供するだけでよいのである",{"2":{"166":1,"239":1,"302":1}}],["他の人が読んでもわかりやすいと感じられるコード",{"2":{"114":1,"191":1,"255":1}}],["他の人の混乱を招き",{"2":{"142":1,"219":1,"283":1}}],["他の人の混乱を招くことを防ぐため重複する名前は付けないこと",{"2":{"142":1,"219":1,"283":1}}],["他の人のためだけでなく自分のためにもなる",{"2":{"114":1,"191":1,"255":1}}],["他チームへの",{"2":{"501":1}}],["他チームに提供するサンドボックス環境を用意する場合は",{"2":{"453":1}}],["他と比較して処理効率が良いため",{"2":{"153":1,"228":1,"292":1}}],["処理追加の際",{"2":{"570":1,"620":1}}],["処理予定日",{"2":{"427":1}}],["処理連番",{"2":{"425":1}}],["処理の概略",{"2":{"420":1}}],["処理説明",{"2":{"337":1,"344":1,"350":1,"357":1,"364":1,"371":1,"379":1,"386":1}}],["処理日付",{"2":{"331":1,"426":1}}],["処理日付取得",{"2":{"328":1}}],["処理済対象ファイルを格納",{"2":{"328":1}}],["処理終了して",{"2":{"328":1}}],["処理シーケンス",{"0":{"328":1,"421":1}}],["処理概要",{"0":{"327":1,"420":1}}],["処理完了期限",{"2":{"323":1,"326":1}}],["処理回数",{"2":{"173":1,"175":1,"246":1,"249":1,"250":1,"309":1,"312":1,"313":1}}],["処理したい場合",{"2":{"173":1,"246":1,"309":1}}],["処理件数",{"2":{"170":2,"243":2,"306":2}}],["処理する",{"2":{"169":1,"172":1,"174":1,"242":1,"245":1,"247":1,"305":1,"308":1,"310":1}}],["処理",{"2":{"153":2,"156":2,"157":1,"174":3,"228":2,"231":2,"232":1,"247":3,"292":2,"295":2,"296":1,"310":3}}],["処方箋だが",{"2":{"69":1}}],["具体的には下記のメソッドを利用しないこと",{"2":{"153":1,"228":1,"292":1}}],["具体的には次の3ケースそれぞれで",{"2":{"64":1}}],["以外は",{"2":{"466":1,"534":1}}],["以外の",{"2":{"464":1}}],["以上の注文については",{"2":{"166":1,"239":1,"302":1}}],["以降では",{"2":{"178":1}}],["以降同じインスタンスは利用できない",{"2":{"156":1,"231":1,"295":1}}],["以降のコレクションクラスを利用する",{"2":{"153":1,"228":1,"292":1}}],["以前で利用されていたcollections",{"2":{"153":1,"228":1,"292":1}}],["以下で2",{"2":{"158":1,"233":1}}],["以下では",{"2":{"113":1,"190":1,"254":1}}],["以下ではプロダクト名を",{"2":{"17":1}}],["以下に計測結果を記載します",{"2":{"249":1,"312":1}}],["以下に",{"2":{"170":1,"243":1,"306":1}}],["以下に処理例と計測結果を記載します",{"2":{"169":1,"172":1,"174":1,"175":1,"242":1,"245":1,"247":1,"250":1,"305":1,"308":1,"310":1,"313":1}}],["以下に注意する",{"2":{"73":1}}],["以下に影響を与えるため",{"2":{"64":1}}],["以下",{"2":{"66":1}}],["以下を推奨する",{"2":{"39":1}}],["以下の例を参照のこと",{"2":{"556":1,"607":1}}],["以下の様に指定する",{"2":{"537":1}}],["以下のサイトを参考ください",{"2":{"490":1}}],["以下の定義を推奨する",{"2":{"480":1}}],["以下のようになる",{"2":{"544":1}}],["以下のように重要な定義が続く",{"2":{"460":1}}],["以下のように定義する",{"2":{"454":1}}],["以下のような方法がある",{"2":{"543":1}}],["以下のような使い分けを想定する",{"2":{"435":1}}],["以下のような条件があるため",{"2":{"69":1}}],["以下のような状況とする",{"2":{"69":1}}],["以下のようなコミットをルールとすることで",{"2":{"46":1}}],["以下の情報の管理は",{"2":{"411":1}}],["以下の方針を取る",{"2":{"409":1}}],["以下のいずれかの操作を実行すると",{"2":{"181":1,"182":1,"183":1}}],["以下のいずれかを選択するものとする",{"2":{"43":1}}],["以下の表ではコメントの使い方とその例を示す",{"2":{"167":1,"240":1,"303":1}}],["以下の内容も可能な限り明記すること",{"2":{"166":1,"239":1,"302":1}}],["以下のコードを見て",{"2":{"166":1,"239":1,"302":1}}],["以下の順で記述する",{"2":{"144":1,"221":1,"285":1}}],["以下の設定が行われている前提で説明している箇所がある",{"2":{"81":1}}],["以下の設定を加える",{"2":{"66":1}}],["以下の設定を行う",{"2":{"65":1}}],["以下の命名に従う",{"2":{"53":1}}],["以下の想定で作成されているため留意すること",{"2":{"48":1}}],["以下の形式でコミットメッセージを記載することとする",{"2":{"42":1}}],["以下の観点でタグを使い分ける",{"2":{"38":1}}],["以下の",{"2":{"36":1}}],["以下が理由である",{"2":{"3":1}}],["場合",{"2":{"152":1}}],["場合によっては",{"2":{"35":1}}],["場合によっては具体的な製品名",{"2":{"2":1}}],["代替を検討すること",{"2":{"586":1,"636":1}}],["代わりに",{"2":{"152":1}}],["代入や",{"2":{"572":1,"621":1}}],["代入箇所が分散することによる可読性の低下を防げます",{"2":{"151":1}}],["代入演算子",{"2":{"130":1,"207":1,"271":1}}],["値が存在しないという状態の表現",{"0":{"533":1}}],["値や",{"2":{"465":1}}],["値",{"2":{"433":1}}],["値を用いる代わりに",{"2":{"513":1}}],["値を変更してはならない",{"2":{"468":1,"536":1}}],["値を返しうる項目に",{"2":{"465":1}}],["値を取り出すことなくoptionalでのみ扱う場合はoptionalを変数代入してもよい",{"2":{"157":1,"232":1,"296":1}}],["値をカバーする場合は",{"2":{"151":1}}],["値の",{"2":{"151":1}}],["値の変わらない変数",{"2":{"129":2,"206":2,"270":2}}],["値の取りうるパターンが決まっている場合には",{"2":{"39":1}}],["句に記述した順序に準ずること",{"2":{"578":1,"627":1}}],["句には必ずas句を記載し別名を付ける",{"2":{"577":1,"626":1}}],["句で条件式を列挙する際",{"2":{"578":1,"627":1}}],["句でカラムと式を比較する際は左辺がカラムになるように記載すること",{"2":{"578":1,"627":1}}],["句でreturnを記述する場合は",{"2":{"152":1}}],["句を利用する場合は",{"2":{"585":1}}],["句を付与する",{"2":{"577":1,"626":1}}],["句を記載する際",{"2":{"576":1,"625":1}}],["句の",{"2":{"616":1}}],["句の少しだけ異なる",{"2":{"587":1,"637":1}}],["句の使用",{"2":{"586":1,"636":1}}],["句の誤った使い方はパフォーマンスの劣化を招くため",{"2":{"585":1}}],["句の指定は定数",{"2":{"576":1,"625":1}}],["句の条件設定などでデータ",{"2":{"572":1,"621":1}}],["句の各条件文の",{"2":{"566":1,"616":1}}],["句の最初に出現するテーブルと結合テーブルの区切りのカンマ前に改行を入れること",{"2":{"566":1,"616":1}}],["句の=",{"2":{"556":1,"607":1}}],["句等は最初に出現するカラムとカラムの区切りのカンマ前に改行を入れること",{"2":{"566":1,"616":1}}],["句",{"0":{"564":1,"567":1,"568":2,"569":1,"574":1,"575":1,"576":1,"577":1,"578":1,"585":1,"586":1,"587":1,"588":1,"589":1,"614":1,"617":1,"618":2,"619":1,"623":1,"624":1,"625":1,"626":1,"627":1,"636":1,"637":1,"638":1,"639":1},"2":{"566":3,"616":2}}],["句は使用せず",{"2":{"587":1,"637":1}}],["句は最大",{"2":{"587":1,"637":1}}],["句は独立した行で記載すること",{"2":{"569":1,"619":1}}],["句はカンマを使用して列挙する",{"2":{"152":1}}],["句はなるべく",{"2":{"152":1}}],["句はなるべく一つの式での記述を推奨する",{"2":{"151":1}}],["句はデッドコードとなるため記述しない",{"2":{"151":1}}],["句が全ての",{"2":{"151":1}}],["中間一致",{"2":{"581":1,"632":1}}],["中間処理の記述が多くなると可読性も悪くなり",{"2":{"156":1,"231":1,"295":1}}],["中間処理の数は",{"2":{"156":1,"231":1,"295":1}}],["中のエイリアス名に利用しない",{"2":{"553":1,"604":1}}],["中のインデントは",{"2":{"550":1,"601":1}}],["中に記述するエイリアス名など単語の短縮について示す",{"2":{"553":1,"604":1}}],["中には定義された設定がうまく認識されない場合がある",{"2":{"546":1}}],["中途半端になりうる",{"2":{"523":1}}],["中カッコ",{"2":{"151":1,"154":1,"229":1,"293":1}}],["中規模以上の大きな機能アップデートがあったので",{"2":{"76":1}}],["常にアロー構文を使用する",{"2":{"151":1}}],["常に他の人の視点を意識しながら",{"2":{"114":1,"191":1,"255":1}}],["複雑なステートメントを記述しなければならない場合は",{"2":{"152":1}}],["複雑な式や複雑なステートメントを記述しなければならない場合は",{"2":{"151":1}}],["複数項目間のチェックや",{"2":{"546":1}}],["複数項目を指定する場合は",{"2":{"488":1}}],["複数人による編集によって意図しないコンフリクトが発生することを防ぐ",{"2":{"542":1}}],["複数人での機能開発用途",{"2":{"51":1}}],["複数リンクを指定可能であるなど自由度が高く使いやすいため",{"2":{"527":1}}],["複数行をコメントアウトする場合は",{"2":{"570":1,"620":1}}],["複数行コメントアウト",{"2":{"570":1,"620":1}}],["複数行コメント",{"2":{"570":1,"620":1}}],["複数行の",{"2":{"160":2}}],["複数行の文字列はテキストブロックを使用しましょう",{"2":{"160":2}}],["複数行の文字列を定義する際",{"2":{"160":1}}],["複数行で利用したい場合は",{"2":{"154":1,"229":1,"293":1}}],["複数必要な場合は",{"2":{"51":1}}],["複数のリアクションを返し感謝の意を強調すると良い",{"2":{"674":1}}],["複数のチャンネルで異なった運用方針である場合に混乱をきたすことがしばしばである",{"2":{"647":1}}],["複数のファイルに分割することを推奨する",{"2":{"542":1}}],["複数のエンドポイントで用いられる場合に定義する",{"2":{"514":1}}],["複数のタグが指定されている",{"2":{"504":1}}],["複数の",{"2":{"484":1,"495":1}}],["複数の値をマッチさせるときの",{"2":{"152":1}}],["複数の文または式でないコード",{"2":{"151":1,"152":1}}],["複数の目的で安易に使いまわさないこと",{"2":{"140":1,"217":1,"281":1}}],["複数の目的に対応したタグガイドラインを考慮する",{"2":{"37":1}}],["複数のブランチ間で生じた変更の取り込み方針を指す",{"2":{"64":1}}],["複数のプロデューサー",{"2":{"30":1}}],["複数の会社による構築や",{"2":{"2":1}}],["式を使用する",{"2":{"152":1}}],["式が使用できる箇所は",{"2":{"152":1}}],["式で",{"2":{"151":1}}],["式は下記のように記載すること",{"2":{"563":1,"613":1}}],["式は",{"2":{"151":1}}],["式の値を使用することで変数を不変",{"2":{"151":1}}],["式の使用を推奨する",{"2":{"151":1}}],["式",{"0":{"151":1,"563":1,"613":1}}],["入れ子の三項演算子の利用は禁止",{"2":{"150":1,"227":1,"291":1}}],["入力された条件で検索",{"2":{"379":1}}],["入力チェック",{"2":{"347":1}}],["入力フォームの値を取得",{"2":{"340":1}}],["入力例",{"2":{"75":1}}],["入力間違えなどのケースを除き",{"2":{"73":1}}],["低精度なプリミティブ型にキャストしない",{"2":{"148":1,"225":1,"289":1}}],["精度が違うためこの分岐には入らない",{"2":{"148":1,"225":1,"289":1}}],["金額などの正確な計算に適している",{"2":{"148":1,"225":1,"289":1}}],["浮動小数点演算は科学技術計算に利用するもので",{"2":{"148":1,"225":1,"289":1}}],["お見合いになってボールが浮いてしまう可能性がある",{"2":{"675":1}}],["お試しで触っても良い環境があることを示すことで情報量を増やし",{"2":{"453":1}}],["おそらくコーディングミス",{"2":{"146":1,"223":1,"287":1}}],["おまじない",{"2":{"116":2,"193":2,"257":2}}],["ブックマーク",{"2":{"668":1}}],["ブログでこの方式について解説した記事が出たので",{"2":{"474":1,"529":1}}],["ブロック内の各行は縦にアスタリスクを置き",{"2":{"570":1,"620":1}}],["ブロックスカラー",{"2":{"489":1}}],["ブロック",{"2":{"352":1}}],["ブロックでは基本",{"2":{"163":1,"236":1,"299":1}}],["ブロックを利用しない",{"2":{"146":2,"223":2,"287":2}}],["ブラウザ以外のクライアントにとって手間がかかる",{"2":{"474":1,"529":1}}],["ブラウザのパスワード管理などのために",{"2":{"33":1}}],["ブランチにリベース",{"2":{"110":1}}],["ブランチにマージ",{"2":{"109":1}}],["ブランチに反映されるタイミングで同期を行う",{"2":{"61":1}}],["ブランチ",{"2":{"109":1,"110":1}}],["ブランチ名の命名規則は",{"2":{"71":1}}],["ブランチ名称",{"2":{"51":1}}],["ブランチ命名規則",{"0":{"71":1}}],["ブランチで対応すべきであった",{"2":{"69":1}}],["ブランチ運用でよく課題に上がるパターンとその対応を紹介する",{"2":{"68":1}}],["ブランチ運用アンチパターン",{"0":{"68":1},"1":{"69":1}}],["ブランチ間の同期が取れないため",{"2":{"67":1}}],["ブランチや",{"2":{"67":1}}],["ブランチを作成できる",{"2":{"182":1}}],["ブランチを開発",{"2":{"110":1}}],["ブランチを",{"2":{"67":1}}],["ブランチの作成",{"0":{"182":1}}],["ブランチの変更を機能",{"2":{"109":1}}],["ブランチの変更をすべて取り込んだ上で",{"2":{"61":1}}],["ブランチのみ残るため",{"2":{"62":1}}],["ブランチの種類とその役割を説明する",{"2":{"51":1}}],["ブランチの種類",{"0":{"51":1},"1":{"52":1,"53":1,"54":1,"55":1,"56":1,"57":1},"2":{"71":1}}],["ブランチ戦略の拡張",{"0":{"60":1},"1":{"61":1,"62":1,"63":1}}],["ブランチ戦略の選定",{"0":{"58":1}}],["ブランチ戦略とデプロイメント環境",{"0":{"59":1}}],["ブランチ戦略は以下の方針で選定する",{"2":{"58":1}}],["左辺のオブジェクトが",{"2":{"145":1,"222":1,"286":1}}],["イベント起動の非同期処理のbl設計",{"2":{"407":1}}],["イベント詳細",{"0":{"338":1,"345":1,"351":1,"358":1,"365":1,"372":1,"380":1,"387":1},"1":{"339":1,"340":1,"341":1,"346":1,"347":1,"352":1,"353":1,"354":1,"359":1,"360":1,"361":1,"366":1,"367":1,"368":1,"373":1,"374":1,"375":1,"376":1,"381":1,"382":1,"383":1,"388":1,"389":1}}],["イベント分類",{"2":{"337":1,"344":1,"350":1,"357":1,"364":1,"371":1,"379":1,"386":1}}],["イベント名",{"2":{"337":1,"344":1,"350":1,"357":1,"364":1,"371":1,"379":1,"386":1}}],["イベント概要",{"0":{"337":1,"344":1,"350":1,"357":1,"364":1,"371":1,"379":1,"386":1}}],["イニシャライザー",{"2":{"144":2,"221":2,"285":2}}],["インフラ設計",{"2":{"407":1}}],["インフラのコードをモノリポで管理している例である",{"2":{"407":1}}],["インフラ系のコード",{"2":{"397":1,"407":1}}],["インフラは次のいずれか",{"2":{"3":1}}],["インターフェースの特性から呼び出し元を変更せずに実装クラスを変更することができる",{"2":{"153":1,"228":1,"292":1}}],["インターフェースを統一する目的で",{"2":{"153":1,"228":1,"292":1}}],["インターフェース名",{"2":{"122":1,"199":1,"263":1}}],["インナークラス",{"0":{"143":1,"220":1,"284":1}}],["インポートが推奨されるような場合は利用してもよい",{"2":{"132":1,"209":1,"273":1}}],["インポートしない",{"2":{"132":1,"209":1,"273":1}}],["インポート",{"0":{"132":1,"209":1,"273":1}}],["インデント挿入すること",{"2":{"563":1,"613":1}}],["インデントは下記のように記述すること",{"2":{"567":1,"617":1}}],["インデントは統合開発環境の提供するフォーマッタに合わせる",{"2":{"156":1,"231":1,"295":1}}],["インデントは空白文字",{"2":{"130":1,"207":1,"271":1}}],["インデックスの必要性については",{"2":{"593":1,"642":1}}],["インデックスの数は最小限に抑えることが鉄則であるため",{"2":{"27":1}}],["インデックス",{"0":{"593":1,"642":1}}],["インデックスカラムをorで条件指定",{"2":{"581":1,"632":1}}],["インデックスカラムを含む演算に対して条件指定",{"2":{"581":1,"632":1}}],["インデックスカラムに関数を通した値に対して条件指定",{"2":{"581":1,"632":1}}],["インデックスによる検索を指定したい場合",{"2":{"581":1,"632":1}}],["インデックスが有効に使われるためである",{"2":{"581":1,"632":1}}],["インデックス名は",{"2":{"27":1}}],["インスタンスが生成されますが",{"2":{"248":1,"311":1}}],["インスタンスが生成され",{"2":{"169":1,"242":1,"305":1}}],["インスタンスが",{"2":{"169":1,"242":1,"305":1}}],["インスタンスの型キャスト",{"2":{"145":1}}],["インスタンスの命名規約",{"2":{"26":1}}],["インスタンス",{"0":{"145":1,"222":1,"286":1}}],["インスタンス変数はprivateにする",{"2":{"138":1,"215":1,"279":1}}],["インスタンス変数は必要性を充分に考慮してから使用すること",{"2":{"136":1,"213":1,"277":1}}],["インスタンス変数",{"0":{"138":1,"215":1,"279":1}}],["インスタンスメンバを持たない",{"2":{"133":1,"210":1,"274":1}}],["インスタンスに加え",{"2":{"169":1,"242":1,"305":1}}],["インスタンスに適用する",{"2":{"26":1}}],["インスタンスにおいて一意である必要があります",{"2":{"26":1}}],["インスタンス名の制限=タグの制限のため",{"2":{"20":1}}],["継承",{"0":{"142":1,"219":1,"283":1}}],["継承されないクラス",{"2":{"129":2,"206":2,"270":2}}],["外来語に関しては",{"2":{"550":1,"553":1,"601":1,"604":1}}],["外部とのコミュニケーションにて予期しないミスが発生してしまうことを防ぐ目的がある",{"2":{"660":1}}],["外部組織メンバーが在籍するチャンネルの命名",{"0":{"660":1}}],["外部キーが無い場合でも",{"2":{"583":1,"634":1}}],["外部キーがあればエラーになる",{"2":{"583":1,"634":1}}],["外部結合する際",{"2":{"594":1,"643":1}}],["外部結合",{"0":{"571":1,"594":1,"643":1}}],["外部ドキュメント",{"2":{"167":1,"240":1,"303":1}}],["外部から参照される",{"2":{"137":1,"214":1,"278":1}}],["外に出してコールするような書き方にすべきである",{"2":{"117":1,"194":1,"258":1}}],["型変換",{"0":{"572":1,"621":1}}],["型である場合",{"2":{"443":1}}],["型",{"0":{"469":1,"537":1},"2":{"432":1,"466":1,"469":1,"534":1,"537":1}}],["型と説明を読むのに時間がかかってしまう可能性があります",{"2":{"159":1}}],["型宣言は省略記法で記述する",{"2":{"154":1,"229":1,"293":1}}],["型名変更",{"2":{"442":1}}],["型名",{"2":{"136":1,"213":1,"277":1}}],["型がbooleanの場合は",{"2":{"123":1,"200":1,"264":1}}],["通知はoffにしないが",{"2":{"680":1}}],["通知自体をoffにする",{"2":{"680":1}}],["通知が来てノイズになるため非推奨とする",{"2":{"674":1}}],["通信を本当に利用しない場合は",{"2":{"455":1}}],["通信での",{"2":{"455":1}}],["通称マジックナンバー",{"2":{"136":1,"213":1,"277":1}}],["通常ワークスペースにメンバーを追加した際には",{"2":{"652":1}}],["通常ファイル名は",{"2":{"484":1}}],["通常の",{"2":{"474":1,"529":1}}],["通常の命名規約",{"2":{"28":1}}],["通常は表紙ページが見られるのみ",{"2":{"681":1}}],["通常は記載した型",{"2":{"546":1}}],["通常はルートレベルの",{"2":{"511":1}}],["通常は一意であるべき",{"2":{"470":1,"538":1}}],["通常はコード生成側で配慮してくれる",{"2":{"462":1}}],["通常発生しない",{"2":{"464":1}}],["通常画面",{"2":{"402":1}}],["通常",{"2":{"70":1,"86":1,"173":1,"246":1,"309":1,"455":1}}],["科目略名",{"2":{"136":1,"213":1,"277":1}}],["科目名",{"2":{"136":1,"213":1,"277":1}}],["科目コード",{"2":{"136":1,"213":1,"277":1}}],["戻る配列のサイズが",{"2":{"134":1,"211":1,"275":1}}],["戻り値が配列のメソッドで",{"2":{"134":1,"211":1,"275":1}}],["宣言されているメソッドと同じ名前のメソッドをサブクラスで定義しない",{"2":{"142":1,"219":1,"283":1}}],["宣言した配列を利用しない",{"2":{"139":1,"216":1,"280":1}}],["宣言していないクラスにはpublic権限のコンストラクタを作らない",{"2":{"133":1,"210":1,"274":1}}],["宣言は適切な権限で行うこと",{"2":{"129":1,"206":1,"270":1}}],["冗長なコメント",{"2":{"131":1,"208":1,"272":1}}],["冗長な命名となる場合もあるが",{"2":{"3":1}}],["姓",{"2":{"131":1,"208":1,"272":1,"416":2}}],["今取り組んでいることや困っていることを投稿することを指す",{"2":{"666":1}}],["今回",{"2":{"548":1,"599":1}}],["今回のprでは未対応の残課題があればissueに起票した",{"2":{"97":1}}],["今後もバージョンアップのリリースが予定されているソースでは",{"2":{"131":1,"208":1,"272":1}}],["少なくともコードを書いた時にコメントすべきである",{"2":{"166":1,"239":1,"302":1}}],["少なくとも",{"2":{"131":1,"208":1,"272":1}}],["不在情報がgoogleカレンダーなど別のスケジュールアプリで管理されていたとしても",{"2":{"677":1}}],["不在の表明",{"0":{"677":1}}],["不機嫌でないことがわかり",{"2":{"663":1}}],["不明",{"2":{"471":1,"539":1}}],["不変mapの生成にはcollectionsクラスのunmodifiablemap",{"2":{"278":1}}],["不変mapの生成にはmap",{"2":{"137":1,"214":1}}],["不変setの生成にはcollectionsクラスのunmodifiableset",{"2":{"278":1}}],["不変setの生成にはset",{"2":{"137":1,"214":1}}],["不変listの生成にはcollectionsクラスのunmodifiablelist",{"2":{"278":1}}],["不変listの生成にはlist",{"2":{"137":1,"214":1}}],["不変な配列インスタンスは長さ",{"2":{"137":1,"214":1,"278":1}}],["不変",{"2":{"137":1,"214":1,"278":1}}],["不要な空白文字",{"0":{"555":1,"606":1},"2":{"555":1,"606":1}}],["不要なコメントは記載しない",{"2":{"131":1,"208":1,"272":1}}],["不要とする",{"2":{"131":1,"208":1,"272":1}}],["不等号の向きは左向き",{"2":{"130":1,"207":1,"271":1}}],["+",{"2":{"130":1,"207":1,"271":1}}],["算術演算子",{"2":{"130":1,"207":1,"271":1}}],["^=",{"2":{"573":1}}],["^",{"2":{"130":1,"207":1,"271":1,"447":1,"463":2,"465":1,"473":1,"541":1}}],["||",{"2":{"130":1,"134":4,"145":4,"151":4,"207":1,"211":4,"271":1,"275":4}}],["|",{"2":{"130":1,"207":1,"271":1,"402":1,"462":1,"471":1,"473":1,"489":2,"527":1,"539":1,"541":1,"683":1}}],["xcacheinfo",{"2":{"521":3}}],["xml",{"2":{"457":1,"458":1}}],["xxx区分",{"2":{"426":1}}],["xxx予測ワーク",{"2":{"421":1}}],["xxxトラン",{"2":{"421":1,"426":4}}],["xxxマスタ",{"2":{"421":1,"425":2}}],["xxx受信ワーク",{"2":{"421":1}}],["xxx受信管理トラン",{"2":{"421":1,"425":3}}],["xxx受信の後続処理で起動し",{"2":{"420":1}}],["xxx計算を行いxxxトランに登録する",{"2":{"420":1}}],["xxx",{"0":{"419":1},"1":{"420":1,"421":1,"422":1,"423":1,"424":1,"425":1,"426":1,"427":1},"2":{"331":3,"420":1,"423":3,"426":3,"427":3,"465":1}}],["x26",{"2":{"130":4,"145":8,"152":12,"207":4,"271":4}}],["x",{"2":{"130":7,"135":2,"159":9,"160":2,"167":1,"207":7,"212":2,"240":1,"271":7,"276":2,"303":1,"450":1,"462":1,"465":1,"499":1,"544":1,"576":1,"579":1,"625":1,"628":1}}],["x3c",{"2":{"42":3,"53":1,"79":3,"129":8,"130":5,"134":2,"137":6,"140":2,"146":1,"153":3,"156":12,"157":3,"158":5,"159":1,"169":5,"170":6,"172":3,"173":2,"174":1,"206":8,"207":5,"211":2,"214":6,"217":2,"223":1,"228":3,"231":12,"232":3,"233":5,"242":5,"243":6,"245":3,"246":2,"247":1,"270":8,"271":5,"275":2,"278":7,"281":2,"287":1,"292":3,"295":12,"296":3,"305":5,"306":6,"308":3,"309":2,"310":1}}],["悪い例",{"2":{"130":1,"131":1,"132":2,"136":1,"142":1,"146":2,"147":1,"156":1,"159":1,"207":1,"208":1,"209":2,"213":1,"219":1,"223":2,"224":1,"231":1,"271":1,"272":1,"273":2,"277":1,"283":1,"287":2,"288":1,"295":1,"581":3,"586":1,"632":3,"636":1}}],["行動してほしい時にメンションを付けるものとする",{"2":{"674":1}}],["行わないの判断は行わなくても良い",{"2":{"666":1}}],["行目の前と最終行の次の行にコメントを入れる",{"2":{"570":1,"620":1}}],["行きつけのジム名",{"2":{"347":1}}],["行きつけのジムの絞り込み",{"2":{"343":1}}],["行程度を目安にロジックを検討すること",{"2":{"156":1,"231":1,"295":1}}],["行",{"2":{"156":1,"231":1,"295":1}}],["行記述に限定するので",{"2":{"154":1,"229":1,"293":1}}],["行とする",{"2":{"154":1,"229":1,"293":1}}],["行のステートメントでの記述を推奨する",{"2":{"152":1}}],["行間の程度にもよるが",{"2":{"140":1,"217":1,"281":1}}],["行につき",{"2":{"550":1,"601":1}}],["行に",{"2":{"130":1,"207":1,"271":1}}],["行単位の紐づけ",{"2":{"65":4}}],["長いログをそのまま貼り付けるとスレッドを広く埋め尽くしてしまうが",{"2":{"679":1}}],["長いプログラムを記述すること",{"2":{"113":1,"190":1,"254":1}}],["長すぎる行は避ける",{"2":{"130":1,"207":1,"271":1}}],["等の記号を使うことでセクションを表現することも同時に推奨する",{"2":{"678":1}}],["等の挨拶にメンションを付けると",{"2":{"674":1}}],["等号",{"2":{"581":1,"632":1}}],["等しくない",{"2":{"573":1,"622":1}}],["等で定義された論理名と必ず一致させること",{"2":{"570":1,"620":1}}],["等は",{"2":{"153":1,"228":1,"292":1}}],["等をカウント値としてループ処理等で使用するような場合",{"2":{"136":1,"213":1,"277":1}}],["等",{"2":{"129":1,"206":1,"248":1,"249":1,"270":1,"311":1,"312":1,"551":1,"552":1,"553":1,"602":1,"603":1,"604":1}}],["等への権限付与に使うことを想定している",{"2":{"33":1}}],["使われないコードは書かない",{"2":{"129":1,"206":1,"270":1}}],["使用しない",{"2":{"570":1,"620":1}}],["使用面として",{"2":{"476":1,"531":1}}],["使用ではなく実装レベルの機能横断的な処理",{"2":{"476":1}}],["使用方法",{"2":{"167":1,"240":1,"303":1}}],["使用する",{"2":{"159":1}}],["使用する文字は英数字に限定する",{"2":{"38":1}}],["使用可能文字",{"2":{"37":1}}],[">=",{"2":{"130":1,"166":1,"207":1,"239":1,"271":1,"302":1}}],[">",{"2":{"129":4,"137":1,"146":4,"151":22,"152":2,"153":2,"154":9,"156":4,"158":1,"169":2,"170":2,"172":3,"173":2,"206":4,"214":1,"228":2,"229":9,"231":4,"233":1,"242":2,"243":2,"245":3,"246":2,"270":4,"278":2,"292":2,"293":9,"295":4,"305":2,"306":2,"308":3,"309":2,"328":11,"408":7,"421":5}}],["実現したい操作により",{"2":{"435":1}}],["実行終了状態の更新",{"2":{"328":1}}],["実行開始レコード追加",{"2":{"328":1}}],["実行するに値しない",{"2":{"166":1,"239":1,"302":1}}],["実装時に",{"2":{"166":1,"239":1,"302":1}}],["実装クラスに適切なインターフェースが存在している場合は",{"2":{"129":1,"206":1,"270":1}}],["実質的",{"0":{"155":1,"230":1,"294":1},"2":{"151":1,"155":1,"230":1,"294":1}}],["実用的な利用用途が思いつかない場合は",{"2":{"75":1}}],["販売管理システム",{"2":{"125":1,"202":1,"266":1}}],["区分値の場合は",{"2":{"471":1,"539":1}}],["区分値を追加した",{"2":{"465":1}}],["区分値定義",{"0":{"433":1}}],["区分値概要",{"0":{"432":1}}],["区分値設計書",{"2":{"412":1}}],["区分値",{"0":{"412":1,"471":1,"539":1},"2":{"400":1,"466":1,"534":1}}],["区分",{"2":{"331":1,"423":1}}],["区切りは",{"2":{"125":1,"127":1,"202":1,"204":1,"266":1,"268":1}}],["区別する運用を行うことが多い",{"2":{"3":1}}],["障害修正に要する時間が短くなる",{"2":{"118":1,"195":1,"259":1}}],["試験性",{"2":{"118":1,"195":1,"259":1}}],["全員にアクションを促す連絡事項を行う場合",{"2":{"672":1}}],["全社的に統一的なプレフィックスを定義することで",{"2":{"660":1}}],["全列ワイルドカード",{"2":{"581":1,"582":1,"632":1,"633":1}}],["全量は",{"2":{"544":1}}],["全",{"2":{"525":1}}],["全体の効率が上がるため",{"2":{"665":1}}],["全体で利用可能な共通の",{"2":{"519":1}}],["全体で利用可能な共通のリクエストヘッダを定義する",{"2":{"518":1}}],["全体で利用可能な共通のクエリパラメータ",{"2":{"517":1}}],["全体で利用可能なセキュリティ",{"2":{"495":1}}],["全体で利用されるパスパラメータが必要なケースが想定されないため",{"2":{"516":1}}],["全体で一貫したエラーを返すことを推奨とし",{"2":{"465":1}}],["全体ポリシーの命名規約",{"2":{"19":1,"33":1}}],["全体ポリシー",{"0":{"11":1},"1":{"12":1,"13":1,"14":1,"15":1,"16":1}}],["全端末でアプリアップデートが必要となリ",{"2":{"465":1}}],["全件",{"2":{"323":1,"326":1}}],["全ての言語",{"2":{"546":1}}],["全ての",{"2":{"456":1}}],["全ての個所に同じ修正をする羽目になる",{"2":{"117":1,"194":1,"258":1}}],["全て",{"2":{"167":1,"240":1,"303":1,"666":1}}],["全てvarを利用します",{"2":{"158":1,"233":1}}],["全般",{"0":{"120":1,"129":1,"197":1,"206":1,"261":1,"270":1}}],["後々キーワード検索で見つかり",{"2":{"666":1}}],["後から同様の困り事を持った人が",{"2":{"679":1}}],["後から検索させる意味がないやり取り",{"2":{"665":1}}],["後から類似の困りごとを持ったメンバーが",{"2":{"665":1}}],["後方一致検索はインデックスを利用できないため避ける",{"2":{"581":1,"632":1}}],["後者のプロダクト開発の効率性を重視し",{"2":{"405":1}}],["後に関わる開発者にとってコードをより理解しやすいものにするためである",{"2":{"166":1,"239":1,"302":1}}],["後で確認します",{"2":{"664":1}}],["後で使用するかもしれないので残しておくためにコメント化する時や",{"2":{"167":1,"240":1,"303":1}}],["後でコードを変更する際に修正箇所がわかりやすいため",{"2":{"118":1,"195":1,"259":1}}],["後で思わぬ障害を引き起こすという可能性がある",{"2":{"116":1,"193":1,"257":1}}],["後述の表示名設定や",{"2":{"653":1}}],["後述",{"2":{"86":1}}],["後述する",{"2":{"73":1}}],["文章を構造化することで",{"2":{"678":1}}],["文章のようなプログラミングを行う",{"2":{"115":1,"192":1,"256":1}}],["文面が冷たくならないように絵文字や感嘆符",{"2":{"647":1}}],["文発行は避ける",{"2":{"584":1,"635":1}}],["文等",{"2":{"174":1,"247":1,"310":1}}],["文が利用できるようになります",{"2":{"162":1,"235":1,"298":1}}],["文で処理する場合は",{"2":{"169":1,"242":1,"305":1}}],["文で受け取る例外は",{"2":{"163":1,"236":1,"299":1}}],["文で後処理をする",{"2":{"161":1,"162":1,"234":1,"235":1,"297":1,"298":1}}],["文ではカッコを使わない",{"2":{"130":1,"207":1,"271":1}}],["文は",{"2":{"152":1}}],["文は代わりに",{"2":{"151":1}}],["文",{"0":{"152":1,"557":1,"558":1,"559":1,"560":1,"561":1,"579":1,"608":1,"609":1,"610":1,"611":1,"628":1},"2":{"169":2,"174":6,"242":2,"247":6,"305":2,"310":6}}],["文と",{"2":{"146":1,"223":1,"287":1}}],["文を記述する",{"2":{"561":1}}],["文を利用する",{"2":{"153":1,"228":1,"292":1}}],["文を利用したほうが多くの場合でデバッグに有利であり",{"2":{"153":1,"228":1,"292":1}}],["文を利用した繰り返し処理中でループ変数の値を変更しない",{"2":{"146":1,"223":1,"287":1}}],["文を使用して良い",{"2":{"152":1}}],["文を使用する",{"2":{"146":1,"223":1,"287":1}}],["文の記述はcount",{"2":{"579":1,"628":1}}],["文の節に対する予約語は左揃えにする",{"2":{"556":1,"607":1}}],["文の整形",{"0":{"556":1,"607":1},"1":{"557":1,"558":1,"559":1,"560":1,"561":1,"562":1,"563":1,"564":1,"565":1,"566":1,"567":1,"568":1,"569":1,"608":1,"609":1,"610":1,"611":1,"612":1,"613":1,"614":1,"615":1,"616":1,"617":1,"618":1,"619":1}}],["文の中で重複しないように命名すること",{"2":{"553":1,"604":1}}],["文のみを記述する",{"2":{"550":1,"601":1}}],["文の利用を検討する",{"2":{"153":1,"228":1,"292":1}}],["文の利用はなるべく避け",{"2":{"146":1,"223":1,"287":1}}],["文の繰り返しや",{"2":{"146":1,"223":1,"287":1}}],["文のカウンタは特別な事情がない限り",{"2":{"146":1,"223":1,"287":1}}],["文のループカウンタは",{"2":{"126":1,"203":1,"267":1}}],["文内のセミコロンの後には空白文字を挿入する",{"2":{"130":1,"207":1,"271":1}}],["文字を目安に改行する",{"2":{"550":1,"601":1}}],["文字数オーバーです",{"2":{"430":1}}],["文字コードは",{"2":{"486":1}}],["文字コード",{"0":{"554":1,"605":1},"2":{"323":1,"326":1}}],["文字列として認識させる必要のある数字",{"2":{"487":1}}],["文字列",{"2":{"173":1,"246":1,"309":1,"469":1,"470":1,"537":1,"538":1}}],["文字列です",{"2":{"160":1}}],["文字列で数値の計算を行うので",{"2":{"148":1,"225":1,"289":1}}],["文字列連結を繰り返し処理中で行う際",{"2":{"172":1,"245":1,"308":1}}],["文字列連結",{"0":{"171":1,"172":1,"173":1,"244":1,"245":1,"246":1,"307":1,"308":1,"309":1},"1":{"172":1,"173":1,"245":1,"246":1,"308":1,"309":1}}],["文字列連結と違い",{"2":{"160":2}}],["文字列連結よりもテキストブロックを使用する",{"2":{"160":1}}],["文字列の最後に改行コードを入れずに",{"2":{"160":1}}],["文字列の最後にハイフンを使用したり",{"2":{"26":1}}],["文字列の中に",{"2":{"147":1,"224":1,"288":1}}],["文字列リテラル中のシングルクォーテーションのエスケープは",{"2":{"630":1}}],["文字列リテラル",{"0":{"629":1},"1":{"630":1}}],["文字列リテラルのequals",{"2":{"147":1,"224":1,"288":1}}],["文字列リテラルと定数を比較するときは",{"2":{"147":1,"224":1,"288":1}}],["文字列リテラルはnew",{"2":{"147":1,"224":1,"288":1}}],["文字列同士が同じ値かを比較するときは",{"2":{"147":1,"224":1,"288":1}}],["文字列操作",{"0":{"147":1,"224":1,"288":1}}],["文字列両方含む",{"2":{"136":1,"213":1,"277":1}}],["文字列に変換",{"2":{"131":1,"208":1,"272":1}}],["文字分の",{"2":{"130":1,"207":1,"271":1}}],["文字",{"2":{"24":1,"25":1,"27":1,"28":1,"29":1,"30":1,"31":1,"37":2}}],["文字まで指定可能",{"2":{"19":1}}],["文字以上連続させないこととする",{"2":{"13":1}}],["文字である",{"2":{"4":1}}],["文字にしている",{"2":{"4":1}}],["変換用のメソッドを利用する",{"2":{"147":1,"224":1,"288":1}}],["変換メソッド名は",{"2":{"123":1,"200":1,"264":1}}],["変化させたくない値",{"2":{"129":2,"206":2,"270":2}}],["変化させたくないものについてはfinal",{"2":{"129":1,"206":1,"270":1}}],["変化のないもの",{"2":{"129":1,"206":1,"270":1}}],["変数代入はほとんどの場合意味をなさず",{"2":{"156":1,"231":1,"295":1}}],["変数宣言にfinalを記載しなくてよい",{"2":{"155":1,"230":1,"294":1}}],["変数sを利用した処理",{"2":{"126":3,"203":3,"267":3}}],["変数全般",{"0":{"125":1,"136":1,"202":1,"213":1,"266":1,"277":1}}],["変数名の変更によって簡単に崩れてしまい",{"2":{"160":1}}],["変数名は小文字とし",{"2":{"125":1,"202":1,"266":1}}],["変数名",{"2":{"115":1,"192":1,"256":1}}],["変更者名",{"2":{"570":2,"620":2}}],["変更は調整の上で行うか",{"2":{"478":1}}],["変更ファイルの行",{"2":{"183":1}}],["変更作業",{"2":{"79":1}}],["変更元のfeatureブランチのコミットをまとめたコミットが新たに作成されるめ",{"2":{"66":1}}],["変更を許容する",{"2":{"58":1}}],["変更",{"2":{"51":1}}],["変更内容と選択される絵文字の対応については厳密とせず",{"2":{"45":1}}],["変更内容を確認した",{"2":{"97":1}}],["変更内容を視覚的に把握しやすくなる利点がある",{"2":{"46":1}}],["変更内容を視認しやすい絵文字の使用を可能とする",{"2":{"45":1}}],["変更内容を簡潔に記載するものとする",{"2":{"44":1}}],["様々なツールで開発ができる",{"2":{"480":1}}],["様々な利害関係者の要求に応え洗練され続けた上記の設計ドキュメントのテンプレートには",{"2":{"405":1}}],["様々な変数やメソッドなどにネーミング",{"2":{"115":1,"192":1,"256":1}}],["様々なサービスが利用するため",{"2":{"18":2}}],["再考",{"2":{"114":1,"191":1,"255":1}}],["再び同様のコンフリクトが発生した場合に自動適用する",{"2":{"82":1}}],["自社のセキュリティポリシーや外部サービス利用ポリシーがある場合は",{"2":{"649":1}}],["自プロジェクトでどちらに設定されているか確認してください",{"2":{"630":1}}],["自体が存在しない場合の",{"2":{"464":1}}],["自体の設計については範囲外としますが",{"2":{"444":1}}],["自分が通っているジムでパーソナル受けられる",{"2":{"396":1}}],["自分が記述すべきコードには必要のないコードが含まれてしまう場合もある",{"2":{"116":1,"193":1,"257":1}}],["自分自身",{"2":{"166":1,"239":1,"302":1}}],["自分で深く理解して記述すべきである",{"2":{"116":1,"193":1,"257":1}}],["自分で記述したコードであっても",{"2":{"114":1,"191":1,"255":1}}],["自分のコードは",{"2":{"116":1,"193":1,"257":1}}],["自動生成したサーバサイドの実装が返すことがある",{"2":{"464":1}}],["自動生成リリースノート",{"2":{"77":1}}],["自動で定期的にフェッチを行う",{"2":{"181":1}}],["自動化ツールなどで必要があれば設定",{"2":{"38":1}}],["自動化ツールを使用してリソースタグを管理する",{"2":{"37":1}}],["ネストして定義するのではなく",{"2":{"465":1}}],["ネストごとに",{"2":{"126":1,"203":1,"267":1}}],["ネーミング規約",{"0":{"119":1,"196":1,"260":1},"1":{"120":1,"121":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"197":1,"198":1,"199":1,"200":1,"201":1,"202":1,"203":1,"204":1,"261":1,"262":1,"263":1,"264":1,"265":1,"266":1,"267":1,"268":1}}],["ネーミングの良し悪しは",{"2":{"115":1,"192":1,"256":1}}],["ネーミングとは",{"2":{"115":1,"192":1,"256":1}}],["ネーミングはわかりやすく",{"0":{"115":1,"192":1,"256":1},"2":{"113":1,"115":1,"190":1,"192":1,"254":1,"256":1}}],["ネットワークでの",{"2":{"2":1}}],["か",{"2":{"179":1}}],["から構成される",{"2":{"447":1}}],["からの変換も",{"2":{"248":1,"311":1}}],["からの変換だけでなく",{"2":{"248":1,"311":1}}],["から",{"0":{"248":1,"249":1,"311":1,"312":1},"2":{"248":1,"311":1,"402":6}}],["から行うことができる",{"2":{"177":1}}],["から始める",{"2":{"146":1,"223":1,"287":1}}],["かわいいコードではなくきれいなコードを書くはずである",{"2":{"166":1,"239":1,"302":1}}],["かつ同一スレッドで複数のテーマを混ぜないことが望ましい",{"2":{"668":1}}],["かつて見たもっとも最良のコメントは",{"2":{"166":1,"239":1,"302":1}}],["かつ",{"2":{"118":1,"195":1,"259":1}}],["かつ変更しにくいため会社名などの変化しやすい項目は含めない",{"2":{"27":1}}],["か条",{"2":{"113":1,"190":1,"254":1}}],["良いコード",{"2":{"114":1,"191":1,"255":1}}],["良いコードを記述するための基本的な心構えをしっかり心に留めておく必要がある",{"2":{"113":1,"190":1,"254":1}}],["良い例",{"2":{"14":1,"120":1,"122":1,"123":3,"124":1,"125":4,"126":1,"127":1,"129":2,"130":8,"131":1,"133":1,"134":1,"135":1,"136":3,"137":4,"138":1,"139":1,"140":1,"141":1,"142":1,"145":3,"146":6,"147":6,"148":1,"149":1,"151":4,"152":2,"153":3,"154":4,"156":3,"157":2,"158":2,"159":1,"160":9,"161":1,"162":1,"163":1,"197":1,"199":1,"200":3,"201":1,"202":4,"203":1,"204":1,"206":2,"207":8,"208":1,"210":1,"211":1,"212":1,"213":3,"214":4,"215":1,"216":1,"217":1,"218":1,"219":1,"222":2,"223":6,"224":6,"225":1,"226":1,"228":3,"229":4,"231":3,"232":2,"233":2,"234":1,"235":1,"236":1,"261":1,"263":1,"264":3,"265":1,"266":4,"267":1,"268":1,"270":2,"271":8,"272":1,"274":1,"275":1,"276":1,"277":3,"278":4,"279":1,"280":1,"281":1,"282":1,"283":1,"286":2,"287":6,"288":5,"289":1,"290":1,"292":3,"293":4,"295":3,"296":2,"297":1,"298":1,"299":1,"497":1,"499":1,"501":2,"502":1,"503":3,"504":2,"505":1,"506":1,"507":1,"508":3,"509":2,"510":2,"511":1,"513":1,"514":2,"517":1,"518":1,"519":1,"521":1,"522":1,"525":1,"526":1,"527":1,"556":2,"557":1,"558":1,"559":1,"560":1,"561":1,"562":1,"563":1,"566":1,"567":1,"568":1,"569":1,"570":2,"571":1,"576":1,"578":2,"607":2,"608":1,"609":1,"610":1,"611":1,"612":1,"613":1,"616":1,"617":1,"618":1,"619":1,"620":2,"625":1,"627":2,"630":1}}],["守ることが重要になる",{"2":{"113":1,"190":1,"254":1}}],["=学習効果",{"2":{"112":1,"189":1,"253":1}}],["品質",{"2":{"112":1,"189":1,"253":1}}],["品質保証の観点でdevelopブランチの変更をfeatureブランチに取り込んだ上で",{"2":{"65":1}}],["品質保証済みの変更のみ取り入れることができる9",{"2":{"61":1}}],["問題なのは",{"2":{"116":1,"193":1,"257":1}}],["問題なくリリースが完了し次第",{"2":{"62":1}}],["問題を起こしやすい実装を未然に回避することによる",{"2":{"112":1,"189":1,"253":1}}],["拡張子は以下のいずれかで作成する",{"2":{"408":1}}],["拡張",{"2":{"153":3,"169":3,"174":1,"228":3,"242":3,"247":1,"292":3,"305":3,"310":1}}],["拡張性の向上",{"2":{"112":1,"189":1,"253":1}}],["拡張して用いられることを想定している",{"2":{"1":1}}],["遵守することの重要性を以下に示す",{"2":{"112":1,"189":1,"253":1}}],["標準で用いる",{"2":{"512":1,"522":1}}],["標準仕様の",{"2":{"509":1}}],["標準画面",{"0":{"391":1}}],["標準規約に準拠したコーディング例",{"2":{"167":1,"240":1,"303":1}}],["標準規約を通して得られる一般的な実装知識やノウハウ",{"2":{"112":1,"189":1,"253":1}}],["標準としての規約を定義し",{"2":{"112":1,"189":1,"253":1}}],["標準キューの命名規約",{"2":{"30":1}}],["ツールの対応状況は調査しきれていないため",{"2":{"546":1}}],["ツールの実装によっては",{"2":{"465":1}}],["ツールによるコード生成や静的解析の観点からまとめています",{"2":{"490":1}}],["ツール",{"2":{"480":1}}],["ツールで生成されたコードのオプションで通常書き換えが可能なため",{"2":{"455":1}}],["ツールで利用",{"2":{"38":1}}],["ツール側で対応している事が多く上書き可能なため記載しない",{"2":{"453":1}}],["ツールなどによる機械的な準拠チェックと連携する規約が普及してきている",{"2":{"111":1,"188":1,"252":1}}],["直接オブジェクトストレージへの書き込みを許容されないケースは",{"2":{"474":1,"529":1}}],["直接",{"2":{"157":1,"232":1,"296":1}}],["直接的に有用な知識や豊富な指針を含むような優れた規約や",{"2":{"111":1,"188":1,"252":1}}],["直プッシュ",{"2":{"51":1}}],["発展によって",{"2":{"111":1,"188":1,"252":1}}],["及びコンパイラの最適化の促進をはかる",{"2":{"140":1,"217":1,"281":1}}],["及び",{"2":{"111":1,"188":1,"252":1}}],["草創期から一応の標準という位置づけだったが",{"2":{"111":1,"188":1,"252":1}}],["7807",{"2":{"457":1,"465":2}}],["7231で定義されているレスポンスステータスコードを利用します",{"2":{"436":1}}],["73",{"2":{"174":1,"247":1,"310":1}}],["740",{"2":{"174":1,"247":1,"310":1}}],["74",{"2":{"168":1,"241":1,"304":1}}],["7",{"2":{"111":1,"153":1,"169":1,"174":1,"188":1,"228":1,"242":1,"247":1,"252":1,"292":1,"305":1,"310":1,"463":1}}],["7選",{"2":{"96":1}}],["著作者",{"2":{"111":1,"188":1,"252":1}}],["著作権等を侵害しなければ問題ない",{"2":{"116":1,"193":1,"257":1}}],["著作権",{"2":{"85":1}}],["規約を作成している",{"2":{"434":1}}],["規約を利用するに当たり",{"2":{"434":1}}],["規約の一つ一つの意図を理解し",{"2":{"113":1,"190":1,"254":1}}],["規約の重要性",{"0":{"112":1,"189":1,"253":1},"1":{"113":1,"114":1,"115":1,"116":1,"117":1,"118":1,"190":1,"191":1,"192":1,"193":1,"194":1,"195":1,"254":1,"255":1,"256":1,"257":1,"258":1,"259":1}}],["規約",{"2":{"111":1,"188":1,"252":1,"444":1,"491":2}}],["抜粋している",{"2":{"111":1,"188":1,"252":1}}],["参加者を絞ったプライベートチャンネル",{"2":{"680":1}}],["参加者が多いチャンネルでの発信は勇気がいることなので",{"2":{"664":1}}],["参加メンバーが多い場合は",{"2":{"666":1}}],["参照は",{"2":{"546":1}}],["参照情報としての",{"2":{"527":1}}],["参照",{"0":{"330":1},"2":{"435":1}}],["参照されている",{"2":{"111":1,"188":1,"252":1}}],["参考",{"2":{"21":1,"96":1,"667":1,"683":1}}],["動作としては機能ブランチを最新の開発ブランチにリベースした後に",{"2":{"102":1}}],["動作としては",{"2":{"101":1,"103":1,"105":1,"106":1,"107":1}}],["動作確認内容",{"2":{"97":1}}],["動作確認用のちょっとしたスクリプトなどで以下の要件が出てくることがある",{"2":{"96":1}}],["動作確認など理由がある場合はfeatureブランチから直接開発環境へのデプロイも許容する",{"2":{"59":1}}],["↩︎",{"2":{"97":3,"334":1,"481":1,"545":1}}],["別ファイルの記載例",{"2":{"544":1}}],["別のチャンネルにurl引用で投稿すると",{"2":{"682":1}}],["別のチャンネルに再アップロードされて収集がつかなくなるといったケースを防ぎ",{"2":{"681":1}}],["別の人にとっては良くない受け取り方をされることも多い",{"2":{"647":1}}],["別の",{"2":{"523":1}}],["別のクラウドや",{"2":{"33":1}}],["別途キューイングのメッセージサービスの利用などを検討する",{"2":{"524":1}}],["別途参照させるべき設計書があるのであれば",{"2":{"506":1}}],["別途記載する",{"2":{"104":1}}],["別紙",{"2":{"462":1}}],["別で定義する",{"2":{"411":1}}],["別システムで管理している内容",{"2":{"131":1,"208":1,"272":1}}],["別プルリクエストで対応予定の内容",{"2":{"97":1}}],["別チケットで対応予定の内容",{"2":{"97":1}}],["残課題",{"2":{"97":1}}],["残る",{"2":{"65":4}}],["querylimit",{"2":{"517":2}}],["query",{"2":{"463":2,"465":2,"508":4,"517":2,"539":1,"544":1}}],["queue",{"2":{"408":3}}],["quot",{"2":{"66":2,"92":2,"123":8,"125":2,"126":6,"127":2,"160":11,"163":2,"173":4,"177":2,"181":2,"182":2,"200":8,"202":2,"203":6,"204":2,"236":2,"246":4,"264":8,"266":2,"267":6,"268":2,"299":2,"309":4,"465":2,"487":20}}],["qiita",{"2":{"96":1}}],["あえてoffにしていないメンバーも存在することを考えると",{"2":{"671":1}}],["あっても設計書が実装と乖離しているなどの問題が世間で課題提起されることも多い",{"2":{"405":1}}],["ありがとうございます",{"2":{"674":2}}],["あり",{"2":{"323":2,"326":2}}],["あくまでも参考値です",{"2":{"168":1,"241":1,"304":1}}],["あくまで個人用途であるため",{"2":{"96":1}}],["ある人によって問題ないとされる行動が",{"2":{"647":1}}],["ある条件で区分の値が変わったり",{"2":{"462":1}}],["ある文字が含まれているか調べるには",{"2":{"147":1,"224":1,"288":1}}],["ある程度まとめて宣言するのは",{"2":{"140":1,"217":1,"281":1}}],["あるいはthrow文を指定するには",{"2":{"151":1,"152":1}}],["あるいは複数の言語を使っている場合などはgithubが提供するテンプレートを元に作成すると良い",{"2":{"95":1}}],["あるいはパッチバージョン",{"2":{"63":1}}],["あるいは進行中のreleaseブランチ",{"2":{"56":1}}],["あるいは行う予定がある場合を考慮し",{"2":{"16":1}}],["ある",{"2":{"33":1,"523":1}}],["≒自分のローカルリポジトリのみ必要である",{"2":{"96":1}}],["ウェブフロントエンドであれば新規プロジェクトを作成すると大抵作成されるのでそれを登録すれば良いが",{"2":{"95":1}}],["何かしらの処理をトリガーにコールバック",{"2":{"524":1}}],["何かしらの説明",{"2":{"487":3}}],["何かしらの理由で",{"2":{"73":1,"75":1}}],["何らかの修正をする際に",{"2":{"117":1,"194":1,"258":1}}],["何を表すクラスなのかすぐにはわからないだろう",{"2":{"115":1,"192":1,"256":1}}],["何もしない",{"2":{"94":3,"366":1}}],["改行位置",{"0":{"566":1,"616":1}}],["改行の表現",{"0":{"489":1}}],["改行を含む場合は",{"2":{"489":1}}],["改行を推奨する理由は以下です",{"2":{"159":1}}],["改行を必要としません",{"2":{"159":1}}],["改行がなくても可読性が低下しない場合は",{"2":{"159":1}}],["改行コード",{"2":{"323":1,"326":1}}],["改行コードやインデントの設定はeditorconfigで行うことが多く",{"2":{"94":1}}],["改行コードをlfに変換",{"2":{"94":2}}],["改行コードをcrlfに変換",{"2":{"94":1}}],["改善",{"2":{"45":1}}],["依存パッケージのアップデートを検知するため",{"2":{"91":1}}],["も同様の結果が得られるが円マーク",{"2":{"630":1}}],["も同様です",{"2":{"248":1,"311":1}}],["も動作するが統一の観点から利用しない",{"2":{"573":1,"622":1}}],["も必ず付与すること",{"2":{"553":1,"604":1}}],["も必須で記載する",{"2":{"459":1}}],["も",{"2":{"465":1}}],["もしチャンネルに該当するメンバーが在籍する場合は",{"2":{"658":1}}],["もしくは氏名",{"2":{"657":1}}],["もしくは招待性",{"2":{"651":1}}],["もしくは組織のいずれかである",{"2":{"167":1,"240":1,"303":1}}],["もしくは組み合わせで設計される",{"2":{"3":1}}],["もし同等の指定をしたい場合は",{"2":{"537":1}}],["もし行う場合は",{"2":{"470":1,"538":1}}],["もし変更する場合は",{"2":{"468":1,"536":1}}],["もし他チームへのドキュメントの頻繁な共有が必要だれば",{"2":{"452":1}}],["もし",{"2":{"415":1,"441":1,"456":1,"465":1,"474":1,"475":1,"484":1,"490":1,"529":1,"530":1,"662":1,"674":1}}],["もしfinalize",{"2":{"164":1,"237":1,"300":1}}],["もしない場合",{"2":{"95":1}}],["も作成しておくことを推奨する",{"2":{"94":1}}],["も存在する",{"2":{"88":1}}],["意図しないメッセージ通知が見えてしまう事がある",{"2":{"680":1}}],["意図しない方法でのマージを避けるためにブランチごとにマージ戦略を設定しておき",{"2":{"88":1}}],["意図せず下記のように記述ミスをする場合があります",{"2":{"249":1,"312":1}}],["意図せずリモートブランチの変更を上書きしないようにする",{"2":{"65":1}}],["意図的にインデントした文字列を定義するとき終了引用符",{"2":{"160":1}}],["センシティブなやり取りを行う場合は",{"2":{"680":1}}],["セミコロン",{"2":{"556":1,"607":1}}],["セッターメソッド名は",{"2":{"123":1,"200":1,"264":1}}],["セルフチェックリスト",{"2":{"97":1}}],["セキュアな設定にする",{"2":{"88":1}}],["セマンティックバージョニングに則ったタグのみ",{"2":{"89":1}}],["セマンティックバージョニングに厳密に従う",{"2":{"76":1}}],["セマンティックバージョニング",{"2":{"74":1}}],["署名付きコミットを必須化し",{"2":{"88":1}}],["任意項目の場合は記載しない",{"2":{"463":1}}],["任意",{"2":{"88":1}}],["任意の権限",{"2":{"86":1}}],["任意のタグキーに対して",{"2":{"40":1}}],["業務効率を向上させるだけではなく",{"2":{"647":1}}],["業務システム向けの",{"2":{"546":1}}],["業務システムの",{"2":{"525":1}}],["業務システムでは欠損が許されない",{"2":{"524":1}}],["業務システムでは",{"2":{"523":1}}],["業務フローを抑えておけば",{"2":{"523":1}}],["業務エラー",{"2":{"437":1}}],["業務日付",{"2":{"425":2}}],["業務日付取得",{"2":{"421":1}}],["業務上はほぼ必須と見て良い",{"2":{"178":1}}],["業務アプリ開発では不要",{"2":{"85":1}}],["業務利用でのチーム開発を想定しており",{"2":{"84":1}}],["認可エラー",{"2":{"437":1}}],["認識齟齬が無いように",{"2":{"417":1}}],["認識齟齬を減らす目的で設定を推奨する",{"2":{"82":1}}],["認証を定義する場合は",{"2":{"519":1}}],["認証の定義を行う",{"2":{"522":1}}],["認証のスキームを定義する",{"2":{"512":1}}],["認証の要否が",{"2":{"456":1}}],["認証しない場合のみ個別で定義",{"2":{"511":1}}],["認証がある場合は",{"2":{"464":1}}],["認証が不要な場合は",{"2":{"456":1}}],["認証が必須であれば記載する",{"2":{"456":1}}],["認証エラー",{"2":{"437":1}}],["認証",{"2":{"7":1,"495":1}}],["ベーシック認証",{"2":{"456":1}}],["ベーシックなものはチームで統一して",{"2":{"82":1}}],["ベースブランチが更新された場合",{"2":{"85":1}}],["ベースとなるブランチ戦略を拡張する必要がある",{"2":{"60":1}}],["エムスリーテックブログ",{"2":{"667":1}}],["エスケープシーケンス",{"0":{"630":1}}],["エンコーディング",{"2":{"554":1,"605":1}}],["エンドポイント呼び出しが必要なため",{"2":{"474":1,"529":1}}],["エンドポイントのサーバサイド側の実装が応答しないコードは",{"2":{"464":1}}],["エンドポイントを記載する",{"2":{"460":1}}],["エンドポイントやセキュリティグループのように",{"2":{"14":1}}],["エンドユーザ操作に影響があるため",{"2":{"69":1}}],["エンドユーザーが使う環境",{"2":{"4":1}}],["エラーメッセージの画像添付非推奨",{"0":{"679":1}}],["エラーメッセージ詳細",{"2":{"465":1}}],["エラーが発生するケースがある",{"2":{"587":1,"637":1}}],["エラーハンドリングが難しい",{"2":{"524":1}}],["エラー",{"2":{"465":1}}],["エラーについて",{"2":{"465":1}}],["エラー処理",{"0":{"334":1}}],["エディタ設定などもある",{"2":{"95":1}}],["エイリアス",{"2":{"82":1}}],["~",{"2":{"82":1,"672":1}}],["証明書を設定する",{"2":{"82":1}}],["基礎",{"2":{"82":1}}],["基本的に処理中の文字列連結では+演算子は使わないで処理するほうがパフォーマンスが高くなりますが",{"2":{"173":1,"246":1,"309":1}}],["基本的にロジック中では単一行コメントを利用すること",{"2":{"167":1,"240":1,"303":1}}],["基本的に",{"2":{"166":1,"239":1,"302":1}}],["基本的に1人の開発者のみが利用する",{"2":{"53":1}}],["基本的には",{"2":{"21":1,"38":1,"665":1}}],["基本方針",{"0":{"50":1}}],["基本となるグループ",{"2":{"34":1}}],["基本グループで対応できない例外的な権限の付与を個別のグループで対応することを想定した命名としている",{"2":{"34":1}}],["特性を知らない方は",{"2":{"592":1,"641":1}}],["特別な場合を除き非推奨",{"2":{"527":1}}],["特記事項なし",{"2":{"333":1}}],["特にリーダーからメンバーに対して",{"2":{"676":1}}],["特にリーダーなど上位のポジションにいる場合は",{"2":{"663":1}}],["特に確認依頼については見ていればokで",{"2":{"664":1}}],["特に扱いで留意すべき点として",{"2":{"406":1}}],["特にこれらを利用する理由がなければ",{"2":{"153":1,"228":1,"292":1}}],["特に理由がない場合は繰り返し処理の外にtryブロックを記載する",{"2":{"146":1,"223":1,"287":1}}],["特に見てほしいレビューポイント",{"2":{"97":1}}],["特にwindowsでの開発者の作業ミスを防ぐため",{"2":{"94":1}}],["特にgitワークフローの設定が重要である",{"2":{"82":1}}],["特定リソースの操作",{"2":{"516":1}}],["特定商品区分",{"2":{"425":1}}],["特定の記法を非推奨とすることがあり",{"2":{"546":1}}],["特定のコードを無効化したいが",{"2":{"167":1,"240":1,"303":1}}],["特定の型のオブジェクトだけを受け入れるコレクションクラスを利用する",{"2":{"153":1,"228":1,"292":1}}],["特定の呼称はないためlite",{"2":{"58":1}}],["特定のリソースに付与するポリシーを書き出すパターン",{"2":{"36":1}}],["特定機能の追加",{"2":{"51":1}}],["yamlを見る",{"2":{"544":2}}],["yamltype",{"2":{"537":1}}],["yamltags",{"2":{"526":2}}],["yamlcomponents",{"2":{"513":1,"514":2,"522":1}}],["yamlsecurity",{"2":{"525":1}}],["yamlservers",{"2":{"502":2}}],["yamlswagger",{"2":{"447":1}}],["yamlinfo",{"2":{"499":1,"501":2,"527":1}}],["yamlopenapi",{"2":{"497":2}}],["yamldescription",{"2":{"489":1}}],["yamldefinitions",{"2":{"465":1}}],["yamlremind",{"2":{"473":1,"541":1}}],["yamlname",{"2":{"471":1,"472":1,"539":1,"540":1}}],["yamlpaths",{"2":{"457":1,"503":6,"504":4,"505":1,"506":1,"507":2,"508":6,"509":4,"510":4,"511":1,"517":1,"518":1,"519":1,"521":1,"539":1}}],["yaml",{"0":{"485":1,"488":1},"2":{"393":1,"400":1,"413":1,"415":1,"416":1,"453":1,"454":1,"455":1,"456":1,"457":1,"458":1,"459":1,"461":1,"462":1,"463":2,"464":1,"468":1,"474":1,"480":2,"483":3,"484":4,"485":1,"487":1,"488":2,"527":1,"529":1,"536":1,"544":25}}],["yyyマスタ",{"2":{"421":1,"425":1}}],["yyy",{"2":{"331":1}}],["yyyymmdd",{"2":{"51":1,"581":2,"632":2}}],["yyyy",{"2":{"26":1,"131":1,"149":1,"208":1,"226":1,"272":1,"290":1,"321":2,"322":2,"324":1,"327":1,"423":1,"501":1}}],["year=$",{"2":{"321":1,"322":1}}],["yes",{"2":{"181":1,"487":1}}],["yieldを省略できる場合は必ず省略する",{"2":{"151":1}}],["yield",{"2":{"151":11}}],["y",{"2":{"130":2,"135":2,"159":7,"160":2,"207":2,"212":2,"271":2,"276":2,"487":1}}],["your",{"2":{"82":2,"97":2,"544":2}}],["yml",{"2":{"77":1,"465":1}}],["ランダムアクセスをサポートしているlistがシーケンシャルアクセス",{"2":{"174":1,"247":1,"310":1}}],["ランダムアクセスをサポートしているクラスと",{"2":{"174":1,"247":1,"310":1}}],["ラムダ式は外部の変数を利用する場合",{"2":{"170":1,"243":1,"306":1}}],["ラムダ式記述の際",{"2":{"154":1,"229":1,"293":1}}],["ラムダ式が利用できる箇所はラムダ式を利用してよい",{"2":{"154":1,"229":1,"293":1}}],["ラムダ式",{"0":{"154":1,"170":1,"229":1,"243":1,"293":1,"306":1},"2":{"170":4,"243":4,"306":4}}],["ラベルで",{"2":{"151":1,"152":1}}],["ラベルの使用時は",{"2":{"151":1,"152":1}}],["ラベルの使用をお薦めします",{"2":{"151":1,"152":1}}],["ラベル規則",{"0":{"77":1}}],["ライブラリを利用していて定数が記述できる場合は定数で記述すること",{"2":{"591":1}}],["ライブラリでインターフェースの大型改善や仕様変更を受けて",{"2":{"63":1}}],["ライブラリではなく",{"2":{"48":1}}],["ライセンス情報",{"2":{"449":1,"498":1}}],["ライセンス承諾の場合に用いるが",{"2":{"85":1}}],["ライフサイクル",{"2":{"51":1}}],["ライフサイクルは一致しない",{"2":{"15":1}}],["稼働後1年以上経過し",{"2":{"76":1}}],["稼働するマイクロサービス名もこれに当たる",{"2":{"2":1}}],["カスタム絵文字であっても気軽に追加して良い",{"2":{"663":1}}],["カンマの後にスペースを1文字入れる",{"2":{"564":1,"614":1}}],["カンマの後には空白文字を",{"2":{"130":1,"207":1,"271":1}}],["カンマ",{"2":{"556":1,"607":1}}],["カンマは項目の前へ記入する",{"2":{"556":1,"607":1}}],["カラムコメントなど",{"2":{"570":1,"620":1}}],["カラムエイリアスなし",{"2":{"567":1,"617":1}}],["カラムエイリアスあり",{"2":{"567":1,"617":1}}],["カラム2",{"2":{"567":2,"617":2}}],["カラム1",{"2":{"567":2,"617":2}}],["カラム3",{"2":{"558":1,"559":1,"609":1,"610":1}}],["カラム2",{"2":{"556":1,"557":1,"558":1,"559":1,"607":1,"608":1,"609":1,"610":1}}],["カラム1",{"2":{"556":1,"557":1,"558":1,"607":1,"608":1,"609":1}}],["カラムには必ずテーブルエイリアスを付与する",{"2":{"553":1,"604":1}}],["カラム名を明記する",{"2":{"581":1,"582":1,"632":1,"633":1}}],["カラム名を記載する",{"2":{"574":1,"575":1,"623":1,"624":1}}],["カラム名",{"2":{"552":1,"603":1}}],["カバーできない部分のバリデーションをアプリケーション固有ロジックとして実装する方針とする",{"2":{"546":1}}],["カレンダーに",{"2":{"352":1}}],["カレンダーには",{"2":{"352":1}}],["カレンダーを選択",{"2":{"350":1}}],["カレンダー予約",{"0":{"348":1},"1":{"349":1,"350":1,"351":1,"352":1,"353":1,"354":1},"2":{"392":1}}],["カレンダー機能の追加",{"2":{"46":1}}],["カットオーバーで",{"2":{"76":1}}],["✨android版アプリリリース対応",{"2":{"75":1}}],["✨部分的な機能追加",{"2":{"45":1}}],["版のタグを利用する",{"2":{"73":1}}],["版ではなく",{"2":{"73":1}}],["軽量タグは利用しない",{"2":{"73":1}}],["軽量",{"2":{"73":1}}],["切り戻しや原因追求が容易になる利点がある",{"2":{"72":1}}],["管理性を高めることを目的としたコーディング規約について記載する",{"2":{"549":1,"600":1}}],["管理性",{"0":{"549":1,"600":1},"1":{"550":1,"551":1,"552":1,"553":1,"554":1,"555":1,"556":1,"557":1,"558":1,"559":1,"560":1,"561":1,"562":1,"563":1,"564":1,"565":1,"566":1,"567":1,"568":1,"569":1,"570":1,"571":1,"572":1,"573":1,"574":1,"575":1,"576":1,"577":1,"578":1,"579":1,"601":1,"602":1,"603":1,"604":1,"605":1,"606":1,"607":1,"608":1,"609":1,"610":1,"611":1,"612":1,"613":1,"614":1,"615":1,"616":1,"617":1,"618":1,"619":1,"620":1,"621":1,"622":1,"623":1,"624":1,"625":1,"626":1,"627":1,"628":1,"629":1,"630":1}}],["管理者権限を持った人しか実行できないオペレーションがあった際",{"2":{"654":1}}],["管理者向け推奨設定",{"0":{"650":1},"1":{"651":1,"652":1,"653":1,"654":1}}],["管理者",{"2":{"433":1,"447":1,"465":2}}],["管理ともに煩雑でミスが出やすいという課題がある",{"2":{"69":1}}],["管理上の目的でfeatureとhotfixを分けることはあり得る",{"2":{"56":1}}],["管理上",{"2":{"19":1}}],["手法に分類できる",{"2":{"529":1}}],["手法に分類できます",{"2":{"474":1}}],["手戻りであることは間違いないし",{"2":{"69":1}}],["手動スナップショットの命名規約",{"2":{"26":1}}],["よって",{"2":{"556":1,"607":1}}],["よいコメントの鉄則",{"0":{"166":1,"239":1,"302":1}}],["よく陥りがちな対策としては次の2点が考えられる",{"2":{"69":1}}],["よりオープンな",{"2":{"665":1}}],["より参加人数が多い",{"2":{"665":1}}],["より良いコミュニケーション手段を模索すること自体が",{"2":{"663":1}}],["より良い職場づくりに繋げることができる",{"2":{"647":1}}],["より新しいバージョンとして",{"2":{"444":1}}],["より読みやすいソースコードで書くことができます",{"2":{"160":2}}],["より一般的な名称である",{"2":{"62":1}}],["より詳しいタグ付けのベストプラクティスも存在するが",{"2":{"37":1}}],["先述した",{"2":{"496":1}}],["先にissue",{"2":{"69":1}}],["先頭には",{"2":{"454":1}}],["先頭をのぞき",{"2":{"125":1,"202":1,"266":1}}],["先頭の文字は",{"2":{"22":1}}],["先頭",{"2":{"21":1}}],["先頭文字には半角英字を用い",{"2":{"13":1}}],["トークン認証",{"2":{"522":1}}],["トークンによる認証",{"2":{"522":1}}],["トップレベルに",{"2":{"462":1}}],["トップレベルの",{"2":{"461":1,"577":1,"626":1}}],["トップページにリダイレクト",{"2":{"373":1}}],["トップページ",{"0":{"362":1},"1":{"363":1,"364":1,"365":1,"366":1,"367":1,"368":1},"2":{"363":1,"391":1}}],["トレース可能にするような運用にするチームも良く聞く",{"2":{"668":1}}],["トレードオフを理解せずに",{"2":{"647":1}}],["トレーナーの得意分野ごとにトレーナーを使い分けられる",{"2":{"396":1}}],["トレーナー詳細",{"0":{"382":1,"384":1},"1":{"385":1,"386":1,"387":1,"388":1,"389":1},"2":{"379":1,"391":1}}],["トレーナー一覧",{"0":{"377":1},"1":{"378":1,"379":1,"380":1,"381":1,"382":1,"383":1},"2":{"391":1}}],["トレーナーを探す",{"0":{"367":1,"374":1},"2":{"364":1,"371":1}}],["トレーナー検索",{"0":{"342":1,"383":1},"1":{"343":1,"344":1,"345":1,"346":1,"347":1},"2":{"379":1,"392":1}}],["トレーニー",{"2":{"396":1}}],["トレーニーのマイページを表示し",{"2":{"370":1}}],["トレーニーやパーソナルトレーナの空き時間を表示し",{"2":{"349":1}}],["トレーニングコース決定",{"0":{"389":1},"2":{"386":1}}],["トレーニングコースの絞り込み",{"2":{"343":1}}],["トレーニング一覧を表示する",{"2":{"385":1}}],["トレーニングメニュー",{"2":{"375":1,"376":1}}],["トレーニングメニュー取得",{"2":{"359":1}}],["トレーニングのコース",{"2":{"356":1}}],["トレーニング予約内容を表示し",{"2":{"356":1}}],["トレーニング時間",{"2":{"343":1}}],["トレーラーが追加され",{"2":{"66":1}}],["トランクベース開発",{"2":{"48":1}}],["厳密にコントリビューションを管理する必要がある場合は注意する",{"2":{"66":1}}],["部分的なコミットの取り消しができない",{"2":{"66":1}}],["部に詳細情報を追加しても良い",{"2":{"35":1}}],["部に含める",{"2":{"21":1}}],["単なる周知目的ではなく行動を促したい相手に絞ること",{"2":{"675":1}}],["単数行コメント",{"2":{"570":1,"620":1}}],["単数形",{"2":{"459":1,"526":1}}],["単語を半角スペース区切りとする",{"2":{"459":1}}],["単語の区切れの頭文字",{"2":{"553":1,"604":1}}],["単語の区切り以外に大文字を使用してもよい",{"2":{"125":1,"202":1,"266":1}}],["単語の区切りのみ大文字にする",{"2":{"125":1,"202":1,"266":1}}],["単語の先頭を大文字にする",{"2":{"127":1,"204":1,"268":1}}],["単位となるため",{"2":{"459":1}}],["単位",{"2":{"175":1,"250":1,"313":1}}],["単位での設定を推奨する",{"2":{"26":1}}],["単一テーブルへの",{"2":{"553":1,"604":1}}],["単一行の場合は",{"2":{"570":1,"620":1}}],["単一行の文字列です",{"2":{"160":2}}],["単一行の文字列を定義する際",{"2":{"160":1}}],["単一行コメント",{"2":{"167":1,"240":1,"303":1}}],["単一行コメントは",{"2":{"167":1,"240":1,"303":1}}],["単一のコミットメッセージで表現できる程度の方がレビューコストも小さいため",{"2":{"66":1}}],["単純な固定のlistを生成する際にはlist",{"2":{"153":1,"228":1}}],["汚れることは許容したいため",{"2":{"66":1}}],["消える",{"2":{"65":2}}],["履歴表示する",{"2":{"371":1,"386":1}}],["履歴が一直線になる",{"2":{"102":1}}],["履歴上は1つのコミットになるため",{"2":{"66":1}}],["履歴保持",{"2":{"65":2}}],["履歴からのトラッキングの容易になる利点がある",{"2":{"42":1}}],["必須定義",{"2":{"546":1}}],["必須フィールドを後から追加する",{"2":{"478":1}}],["必須パラメータのみ",{"2":{"467":1,"535":1}}],["必須パラメータの追加",{"2":{"442":1}}],["必須項目は",{"2":{"465":1}}],["必須の場合のみ記載する",{"2":{"463":1}}],["必須で記載する",{"2":{"464":1}}],["必須で",{"2":{"463":1}}],["必須で指定する",{"2":{"462":1}}],["必須",{"0":{"467":1,"535":1},"2":{"449":1,"459":1,"466":1,"495":1,"498":1,"503":1,"526":1,"534":1}}],["必ず",{"2":{"248":1,"311":1}}],["必ずしも",{"2":{"175":1,"250":1,"313":1}}],["必ずしも開発しているプロダクトと",{"2":{"15":1}}],["必ずインターフェースを用いて宣言すること",{"2":{"129":1,"206":1,"270":1}}],["必要最低限の簡潔なメッセージを送る方が効率的だ",{"2":{"647":1}}],["必要最低限必要だと思われるレベルの記載のサンプルを提供する",{"2":{"405":1}}],["必要とする場合は",{"2":{"593":1,"642":1}}],["必要ない場合",{"2":{"553":1,"604":1}}],["必要な変更をステージ後",{"2":{"183":1}}],["必要な変更を強制的にプッシュすることができる",{"2":{"65":1}}],["必要に応じて",{"2":{"666":1}}],["必要に応じて参考にされたい",{"2":{"493":1}}],["必要に応じて導入を検討する",{"2":{"88":1}}],["必要になったタイミングでインクリメントさせる",{"2":{"407":1}}],["必要のないインスタンス変数を定義すると",{"2":{"136":1,"213":1,"277":1}}],["必要のない記述",{"2":{"132":1,"209":1,"273":1}}],["しなくても把握することができる",{"2":{"666":1}}],["しない",{"2":{"147":1,"224":1,"288":1}}],["し",{"2":{"544":1}}],["した",{"2":{"174":1,"247":1,"310":1}}],["したがって",{"2":{"113":1,"190":1,"254":1}}],["したがって容易に認識齟齬が生じるため本規約では非推奨とする",{"2":{"4":1}}],["しか記述しない場合は",{"2":{"159":1}}],["しかしこれをwikiなどのストック情報向けツールに転記する労力は高く",{"2":{"668":1}}],["しかし",{"2":{"94":2,"113":1,"115":1,"117":1,"190":1,"192":1,"194":1,"254":1,"256":1,"258":1,"647":1,"677":1}}],["しばらくたってから読み返してみると理解に時間がかかった経験は誰にもあるはず",{"2":{"114":1,"191":1,"255":1}}],["しておくことを推奨する",{"2":{"677":1}}],["してmainブランチにマージする",{"2":{"69":1}}],["していない場合",{"2":{"65":1}}],["元のfeatureブランチを再利用しprを作成するとコンフリクトが発生する",{"2":{"66":1}}],["元のコミットidとは別のコミットidで",{"2":{"65":1}}],["元となる命名規約がない場合",{"2":{"39":1}}],["時間外に通知を受け翌営業日に対応しようと考えたが翌営業日には忘れているような場合",{"2":{"676":1}}],["時間やある特定のイベントをもとにバックグラウンドの処理",{"2":{"6":1}}],["時の挙動がリベースになるよう",{"2":{"65":1}}],["最近元気",{"2":{"665":1}}],["最後に",{"2":{"570":1,"620":1}}],["最小権限の原則",{"2":{"680":1}}],["最小要素数",{"2":{"470":1,"538":1}}],["最小値",{"2":{"470":1,"538":1}}],["最小桁数",{"2":{"470":1,"538":1}}],["最終的に利用するスキーマのみを記載する",{"2":{"455":1}}],["最終的なソフトウェア品質",{"2":{"64":1}}],["最初の",{"2":{"169":1,"242":1,"305":1}}],["最初の二重引用符にエスケープシーケンスを使用する",{"2":{"160":1}}],["最新の開発ブランチの先頭から新たにコミットを作りなおす動きになるので",{"2":{"110":1}}],["最低1名以上の承認を必須とする",{"2":{"88":1}}],["最大~最小",{"2":{"546":1}}],["最大要素数",{"2":{"470":1,"538":1}}],["最大値",{"2":{"470":1,"538":1}}],["最大桁数",{"2":{"470":1,"538":1}}],["最大5件まで表示する",{"2":{"388":1}}],["最大",{"2":{"30":1,"31":1,"37":1}}],["最大で",{"2":{"27":1}}],["最大文字数",{"2":{"21":1,"22":2}}],["新規参画者の助けになることも多い",{"2":{"666":1}}],["新規参画者フレンドリーである",{"2":{"62":1}}],["新規に",{"2":{"490":1}}],["新規登録に成功",{"2":{"464":1}}],["新規構築の",{"2":{"457":1,"458":1}}],["新規作成",{"2":{"435":1}}],["新古品フラグ",{"2":{"425":1}}],["新機能の追加",{"2":{"43":1}}],["前述で触れたとおり",{"2":{"570":1,"620":1}}],["前述の通り",{"2":{"666":1}}],["前述の",{"2":{"106":1,"167":1,"240":1,"303":1}}],["前に改行を入れること",{"2":{"566":1,"616":1}}],["前回発注金額",{"2":{"423":1,"425":1}}],["前提",{"0":{"404":1}}],["前提条件によって別の対応策が考えられる",{"2":{"69":1}}],["前提条件",{"0":{"1":1,"546":1,"548":1,"599":1}}],["前者のinteger",{"2":{"248":1,"311":1}}],["前準備の意味合いで実施する",{"2":{"62":1}}],["誤解されることを回避したいため",{"2":{"477":1,"532":1}}],["誤差が発生する",{"2":{"148":1,"225":1,"289":1}}],["誤差の無い計算をするときは",{"2":{"148":1,"225":1,"289":1}}],["誤ってissue",{"2":{"69":1}}],["誤った環境のリソースを操作してしまうミスを低減する",{"2":{"3":1}}],["誤操作を避ける目的でcherry",{"2":{"61":1}}],["週次などの頻度でプロダクション環境へリリースされる",{"2":{"61":1}}],["日本語訳",{"2":{"436":1}}],["日時は",{"2":{"465":1}}],["日時",{"2":{"356":1}}],["日時指定に戻る",{"0":{"360":1},"2":{"357":1}}],["日時指定",{"0":{"354":1},"2":{"350":1}}],["日時設定",{"0":{"353":1},"2":{"350":1}}],["日",{"2":{"323":1,"326":1}}],["日付は",{"2":{"465":1}}],["日付マスタ",{"2":{"421":1}}],["日付管理",{"2":{"328":1}}],["日付の文字列のフォーマットには",{"2":{"149":1,"226":1,"290":1}}],["日付",{"0":{"149":1,"226":1,"290":1},"2":{"466":1,"469":1,"534":1,"537":1}}],["日前に書いたコードは他人のコードと同じ",{"2":{"114":1,"191":1,"255":1}}],["日次",{"2":{"61":1}}],["日々のエンハンス開発と並行して",{"2":{"61":1}}],["概要",{"0":{"336":1,"343":1,"349":1,"356":1,"363":1,"370":1,"378":1,"385":1},"2":{"61":1,"63":1}}],["断面を指定して複数テスト環境にデプロイしたい場合に利用する",{"2":{"58":1}}],["備考",{"2":{"58":1,"59":1,"391":1,"392":1,"402":1}}],["有識者にスタックトレースなどのエラー内容を画像添付して問い合わせることは原則として非推奨とし",{"2":{"679":1}}],["有効開始日",{"2":{"324":1}}],["有料版",{"2":{"178":1}}],["有用な格言",{"2":{"166":1,"239":1,"302":1}}],["有名なブランチ戦略として以下がある",{"2":{"58":1}}],["有志が観点を持ち寄って新たに整理したものである",{"2":{"0":1,"49":1,"445":1,"493":1,"649":1}}],["有志で作成したドキュメントである",{"2":{"0":1,"49":1,"445":1,"493":1,"649":1}}],["運用が形骸化しがちである",{"2":{"668":1}}],["運用負荷を下げることができる",{"2":{"76":1}}],["運用手順は統一する",{"2":{"73":1}}],["運用の徹底化を図る負荷が高い",{"2":{"70":1}}],["運用コストを下げる",{"2":{"58":1}}],["運用に複数社関わる場合などに必要となる",{"2":{"2":1}}],["課題管理システムの課題番号をブランチ名に利用",{"2":{"53":1}}],["課題管理システムと紐付けられるようなブランチ名にする",{"2":{"53":1}}],["ひとつの変更に対してひとつのfeatureブランチを作成し",{"2":{"53":1}}],["主キーの値を利用して",{"2":{"583":1,"634":1}}],["主キーの値の",{"2":{"583":1,"634":1}}],["主に異常系",{"2":{"514":1}}],["主なアクターとメリット",{"2":{"396":1}}],["主な特徴は以下である",{"2":{"53":1,"55":1,"56":1}}],["主要なタグ項目",{"2":{"38":1}}],["主要なロール名と識別子は以下である",{"2":{"6":1}}],["主要な環境名と識別子",{"2":{"4":1}}],["マスターテーブル",{"2":{"432":1}}],["マイページ表示",{"2":{"373":1}}],["マイページ",{"0":{"369":1},"1":{"370":1,"371":1,"372":1,"373":1,"374":1,"375":1,"376":1},"2":{"364":1,"391":1}}],["マイクロ秒",{"2":{"175":3,"250":3,"313":3}}],["マイナーバージョン",{"2":{"63":1}}],["マネージャークラスに対して合計2~3名を付与し",{"2":{"86":1}}],["マージによる方法と異なり",{"2":{"110":1}}],["マージによる変更の取り込みが既存のブランチを変更しないのに対し",{"2":{"65":1}}],["マージを行った場合は下記の通り",{"2":{"109":1}}],["マージとは",{"2":{"109":1}}],["マージ方法で",{"2":{"105":1}}],["マージリクエスト上で",{"2":{"105":2,"107":1}}],["マージリクエスト上のオプションによってコミット履歴が変わるため",{"2":{"104":1}}],["マージリクエスト",{"2":{"100":1}}],["マージリクエストから",{"2":{"92":1}}],["マージ後にfeature",{"2":{"85":1}}],["マージ後にfeatureブランチを自動削除する設定",{"2":{"66":1}}],["マージ後に一部の変更だけの取り消しが不可能",{"2":{"66":1}}],["マージ後に自動でブランチの削除が行われる",{"2":{"66":1}}],["マージ",{"0":{"185":1},"2":{"65":1,"100":1,"108":1}}],["マージコミットが作成されると履歴が複雑になり",{"2":{"65":1}}],["マージコミット",{"0":{"101":1,"109":1},"2":{"64":1,"67":1,"109":1,"110":1}}],["マージコミットをお用いる",{"2":{"61":1}}],["マージ戦略とは",{"2":{"64":1}}],["マージ戦略の選定",{"0":{"64":1},"1":{"65":1,"66":1,"67":1}}],["マージ毎にプロダクション環境へデプロイし同期を取る",{"2":{"52":1}}],["マルチスレッドでアクセスされた場合の動作について",{"2":{"166":1,"239":1,"302":1}}],["マルチスレッドを意識した際に不整合がおきる可能性があるので",{"2":{"136":1,"213":1,"277":1}}],["マルチクラウドを考慮し",{"0":{"16":1}}],["マルチリージョン構成を取り",{"2":{"8":1}}],["マルチ",{"2":{"2":1}}],["派生させたfeatureブランチへの直プッシュはngとなる",{"2":{"51":1}}],["派生元ブランチ",{"2":{"51":1}}],["チャットコミュニケーションにおいて",{"2":{"656":1}}],["チャットなどの非同期コミュニケーションを円滑に進めることは",{"2":{"647":1}}],["チャットなどのトラブルシュート時に混乱をきすため",{"2":{"82":1}}],["チャンネルに投稿しているため",{"2":{"681":1}}],["チャンネルに在籍するメンバーに通知する目的で用いる",{"2":{"669":1}}],["チャンネル投稿に閉じずスレッド投稿へも予約投稿が可能となった",{"2":{"676":1}}],["チャンネルの未読通知で後で見ることができるため",{"2":{"672":1}}],["チャンネルのメッセージ",{"2":{"667":1}}],["チャンネルが必要以上に増えるので推奨しない",{"2":{"666":1}}],["チャンネルは",{"2":{"666":1}}],["チャンネルはセクションという単位でグルーピング可能となり",{"2":{"660":1}}],["チャンネルでのやり取りを推奨する",{"2":{"665":1}}],["チャンネルであっても",{"2":{"665":1}}],["チャンネルで行うべき",{"2":{"647":1}}],["チャンネル名の先頭に",{"2":{"660":1}}],["チャンネル命名規則",{"0":{"659":1},"1":{"660":1}}],["チャンネルを活用すべき",{"2":{"647":1}}],["チケット",{"2":{"667":1}}],["チケットurl",{"2":{"97":1}}],["チケット番号",{"2":{"51":3}}],["チェックアウトを追記する",{"2":{"182":1}}],["チェックアウト",{"0":{"182":1}}],["チェックアウト時の挙動",{"2":{"94":1}}],["チェックのロジックを回避するため",{"2":{"134":1,"211":1,"275":1}}],["チェックをして実行する",{"2":{"118":1,"195":1,"259":1}}],["チェックを外す",{"2":{"85":1,"88":1}}],["チェックなし",{"2":{"85":1}}],["チーム全体イベントへの出欠可否を確認する連絡など",{"2":{"672":1}}],["チーム内でしか通用しない",{"2":{"663":1}}],["チーム内で解決できる状態を作っておくことが望ましいため",{"2":{"654":1}}],["チーム",{"2":{"404":1,"651":1}}],["チーム開発する上で必要となるgitブランチフローの規約です",{"2":{"98":1,"645":1}}],["チーム開発において開発環境がwindows",{"2":{"94":1}}],["チームでプルリクエストで書いてほしいことを明示的にすることで",{"2":{"97":1}}],["チームでgit対象外とするファイルを一律で設定できる",{"2":{"96":1}}],["チームメンバーにどれくらいでレスポンスが来そうか予想ができるようになる",{"2":{"677":1}}],["チームメンバーが閲覧可能であることを忘れない",{"2":{"666":1}}],["チームメンバー全員にgit",{"2":{"83":1}}],["チームメンバーなどの問い合わせやトラブルシュートの際に",{"2":{"3":1}}],["チームの関心事を記入することを推奨とする",{"2":{"75":1}}],["チーム規模や特性によっては",{"2":{"70":1}}],["$ref",{"2":{"447":5,"463":4,"464":10,"465":2,"509":1,"510":3,"514":4,"517":1,"518":1,"519":1,"521":1,"539":1,"543":2,"544":17}}],["$1000",{"2":{"166":1,"239":1,"302":1}}],["$source",{"2":{"105":1}}],["$",{"2":{"51":5,"73":2,"75":4,"109":3,"110":3,"321":7,"322":7,"375":1,"376":1,"447":1,"462":2,"463":2,"465":1,"473":1,"484":2,"541":1}}],["永続ブランチ同士の変更を取り込むケースとして",{"2":{"67":1}}],["永続ブランチ間で変更を取り込む",{"0":{"67":1},"2":{"64":1}}],["永続ブランチは各環境にデプロイ可能となるよう整合性を保つ",{"2":{"50":1}}],["永続的",{"2":{"51":2}}],["メルカン",{"2":{"683":1}}],["メルカリな日々",{"2":{"683":1}}],["メルカリ社内slack利用ガイドラインを一挙公開しました",{"2":{"683":1}}],["メールのcc的な参考情報であれば",{"2":{"672":1}}],["メールのcc的な形で",{"2":{"672":1}}],["メールのccに似た意図で",{"2":{"672":1}}],["メールのコミュニケーションモデルを引きずった方針を取ってしまうこともある",{"2":{"647":1}}],["メリット",{"2":{"474":3,"529":3}}],["メリットがある場合は",{"2":{"70":1}}],["メッセージ通知にも気をつける",{"2":{"680":1}}],["メッセージのurlを活用する",{"0":{"668":1}}],["メッセージ内容は非表示にする",{"2":{"680":1}}],["メッセージ内容",{"2":{"662":1}}],["メッセージ",{"0":{"667":1},"2":{"430":1,"667":1}}],["メッセージ定義",{"0":{"430":1}}],["メッセージ概要",{"0":{"429":1}}],["メッセージid",{"2":{"340":1,"347":1,"373":2,"376":2,"381":1,"388":3}}],["メニューを一覧表示",{"2":{"388":1}}],["メニュー名称",{"2":{"131":1,"208":1,"272":1}}],["メンションを付けて投稿する時に常時表示されるわけではないので",{"2":{"677":1}}],["メンションを付けず",{"2":{"674":1}}],["メンション",{"2":{"676":1}}],["メンションに対する即対応を求めない取り決めを行うのであれば",{"2":{"676":1}}],["メンションの宛先をできる限り絞り込む",{"0":{"675":1}}],["メンション範囲は適切に",{"0":{"673":1},"1":{"674":1,"675":1}}],["メンションはメッセージ",{"2":{"667":1}}],["メンション先の対象者全員が個別に自分のslack設定",{"2":{"658":1}}],["メンテナンス性が低下します",{"2":{"160":1}}],["メンバのみの",{"2":{"133":1,"210":1,"274":1}}],["メンバーごとの",{"2":{"666":1}}],["メンバーごとのtimesチャンネルではなく",{"2":{"666":1}}],["メンバーに周知する目的で用いる",{"2":{"669":1}}],["メンバーに威圧的に捉えられないように配慮するのが好ましい",{"2":{"663":1}}],["メンバーによっては粒度の小さいコミットを好む場合も多く",{"2":{"70":1}}],["メンバーがワークスペース間にまたがっている場合等",{"2":{"658":1}}],["メンバー順序",{"0":{"144":1,"221":1,"285":1}}],["メンバーそれぞれで別のエイリアスを登録されると",{"2":{"82":1}}],["メンバーの役割によっては",{"2":{"3":1}}],["メンバー間の認識齟齬を無くし生産性を高める",{"2":{"3":1}}],["メソッド対応は",{"2":{"476":1,"531":1}}],["メソッドで",{"2":{"462":1}}],["メソッドで比較する際",{"2":{"145":1,"222":1,"286":1}}],["メソッドで比較する",{"2":{"145":1,"222":1,"286":1}}],["メソッド内にて",{"2":{"167":1,"240":1,"303":1}}],["メソッドが",{"2":{"463":3,"508":1,"509":2}}],["メソッドが正しく動作するための前提について",{"2":{"166":1,"239":1,"302":1}}],["メソッドが存在したとする",{"2":{"118":1,"195":1,"259":1}}],["メソッドコメントには",{"2":{"166":1,"239":1,"302":1}}],["メソッド定義がわからなければ型が判断できません",{"2":{"158":1,"233":1}}],["メソッド参照",{"0":{"154":1,"170":1,"229":1,"243":1,"293":1,"306":1},"2":{"154":1,"170":3,"229":1,"243":3,"293":1,"306":3}}],["メソッド参照で処理できる場合はforeachを利用する",{"2":{"153":1,"228":1,"292":1}}],["メソッドを用いるのはクライアントがブラウザであり",{"2":{"476":1,"531":1}}],["メソッドを呼び出した場合に",{"2":{"464":1}}],["メソッドを利用する",{"2":{"146":1,"147":3,"223":1,"224":3,"278":3,"287":1,"288":3}}],["メソッドを使用するクライアントの余計な",{"2":{"134":1,"211":1,"275":1}}],["メソッド引数への代入は行わない",{"2":{"141":1,"218":1,"282":1}}],["メソッドはオーバーライドされず全く別のメソッドとして扱われ",{"2":{"142":1,"219":1,"283":1}}],["メソッドは",{"2":{"134":1,"211":1,"275":1,"461":1,"503":1,"546":1}}],["メソッド名は区切りのみ大文字にする",{"2":{"123":1,"200":1,"264":1}}],["メソッド",{"0":{"123":1,"134":1,"200":1,"211":1,"264":1,"275":1,"435":1},"2":{"131":1,"144":2,"167":1,"208":1,"221":2,"240":1,"272":1,"285":2,"303":1}}],["メソッドだけの変更で済む",{"2":{"118":1,"195":1,"259":1}}],["メソッドに紐づかない操作であれば",{"2":{"462":1}}],["メソッドに分割することを検討してください",{"2":{"151":1,"152":1}}],["メソッドに分割すべきである",{"2":{"118":1,"195":1,"259":1}}],["メソッドに書かれる内容まで把握する必要が生じるためである",{"2":{"118":1,"195":1,"259":1}}],["メソッドの配下に定義されるオペレーションオブジェクトは",{"2":{"503":1}}],["メソッドの記載が必須である場合は除く",{"2":{"476":1,"531":1}}],["メソッドの追記は",{"2":{"476":1,"531":1}}],["メソッドの代わりに個別の動詞",{"2":{"462":1}}],["メソッドの引数オブジェクトがメソッド内で変更されるケースなど",{"2":{"166":1,"239":1,"302":1}}],["メソッドのパラメータ名とインスタンス変数名を一緒にしない",{"2":{"124":1,"201":1,"265":1}}],["メソッドの",{"2":{"118":1,"195":1,"259":1}}],["メソッドの役割が明確で",{"2":{"118":1,"195":1,"259":1}}],["メソッドと同じ名前のメソッドをサブクラスで定義しないこと",{"2":{"142":1,"219":1,"283":1}}],["メソッドと",{"2":{"118":1,"195":1,"259":1,"507":1}}],["メインの開発ブランチにマージコミットは作成されず",{"2":{"102":1}}],["メインの開発ブランチにマージコミットが作成される",{"2":{"101":1}}],["メインの更新はversion2",{"2":{"63":1}}],["メモ目的でバージョンを記載する運用を推奨とする",{"2":{"75":1}}],["メモリリークの修正",{"2":{"46":1}}],["メジャーバージョンを1→2に上げることがる",{"2":{"63":1}}],["上書きで定義する",{"2":{"511":1}}],["上記観点でメンションを行う",{"2":{"666":1}}],["上記どちらのケースも",{"2":{"474":1,"529":1}}],["上記に加えて",{"2":{"131":2,"208":2,"272":2}}],["上記の場合は",{"2":{"96":1}}],["上記の設定漏れや手順が増えてしまうため",{"2":{"94":1}}],["上記のルールに従った",{"2":{"46":1}}],["上でプルリクエスト",{"2":{"100":1}}],["上でprを経由する運用を行うこと",{"2":{"66":1}}],["上で",{"2":{"1":1}}],["♻️リファクタリング",{"2":{"45":1}}],["🎉",{"2":{"46":1}}],["🎉大きな機能追加",{"2":{"45":1}}],["🆙依存パッケージ等のアップデート",{"2":{"45":1}}],["🏗️アーキテクチャの変更",{"2":{"45":1}}],["🎨レイアウト関連の修正",{"2":{"45":1}}],["hint",{"0":{"569":1,"619":1},"2":{"569":2,"619":2}}],["history",{"0":{"106":1},"2":{"88":2,"104":1}}],["hh",{"2":{"321":1,"322":1,"473":1,"541":1}}],["here",{"0":{"672":1},"2":{"672":5}}],["height",{"2":{"159":4}}],["headercontenttype",{"2":{"518":2}}],["headers",{"0":{"521":1},"2":{"512":1,"521":3,"544":1}}],["header",{"0":{"477":1,"532":1},"2":{"463":1,"508":2,"518":2}}],["head`",{"2":{"105":1}}],["head",{"2":{"65":1,"66":1,"79":1,"85":1,"92":1,"435":1,"461":1,"463":1}}],["heart",{"2":{"45":1}}],["has",{"2":{"443":1}}],["hash",{"2":{"158":1,"233":1}}],["hashtable",{"2":{"153":1,"228":1,"292":1}}],["hashmap",{"2":{"129":3,"137":1,"153":1,"159":1,"206":3,"214":1,"228":1,"270":3,"278":2,"292":1}}],["hasstock",{"2":{"130":2,"207":2,"271":2}}],["hasexpired",{"2":{"123":1,"200":1,"264":1}}],["hoge\\t=\\tyyy",{"2":{"563":1,"613":1}}],["hogelist",{"2":{"231":2}}],["host",{"0":{"453":1},"2":{"447":2,"453":5}}],["how",{"2":{"85":1,"544":1}}],["hotfixブランチ",{"0":{"56":1}}],["hotfix",{"2":{"51":2,"58":2,"69":1}}],["htmlからの引用",{"2":{"151":1,"152":1}}],["html",{"2":{"37":1,"47":1,"98":1,"111":1,"167":1,"188":1,"240":1,"252":1,"303":1,"317":1,"418":1,"459":2,"481":1,"492":1,"526":1,"545":1,"597":2,"645":1}}],["httpステータスコード",{"2":{"465":1}}],["httpステータスが200以外",{"2":{"347":1,"373":1,"376":2,"381":1,"388":3}}],["httpステータスが200",{"2":{"340":1,"347":1,"366":1,"376":1,"388":3}}],["httpステータスが500系",{"2":{"340":1,"366":1,"373":1}}],["httpステータスが400系",{"2":{"340":1,"366":1,"373":1}}],["httpメソッドの粒度",{"2":{"543":1}}],["httpメソッドの子要素はtags以外を省略",{"2":{"461":1}}],["httpメソッド名",{"2":{"463":1}}],["httpメソッド",{"2":{"460":1,"462":1}}],["httpの指定は通常",{"2":{"455":1}}],["https",{"2":{"37":1,"82":1,"97":3,"111":2,"151":1,"152":1,"188":2,"252":2,"447":1,"455":4,"456":2,"463":1,"474":1,"481":1,"490":1,"502":3,"506":1,"527":2,"529":1,"545":1}}],["http",{"0":{"435":1,"436":1,"477":1,"532":1},"1":{"437":1,"438":1,"439":1,"440":1,"441":1},"2":{"6":1,"19":1,"82":5,"111":5,"137":2,"147":6,"188":5,"214":2,"224":6,"252":5,"278":2,"288":6,"436":1,"455":5,"457":1,"461":1,"462":3,"463":5,"464":1,"465":1,"502":1,"503":2,"507":1,"508":1,"509":2,"512":1,"514":2,"522":1,"527":1,"544":4,"546":2}}],["👍️🎉☺",{"2":{"674":1}}],["👍",{"2":{"674":1}}],["👍機能改善",{"2":{"45":1}}],["🚀release",{"2":{"75":2}}],["🚀パフォーマンス改善",{"2":{"45":1}}],["🐛fix",{"2":{"73":1}}],["🐛バグ修正",{"2":{"45":1}}],["💄",{"2":{"46":1}}],["💄lintエラーの修正やコードスタイルの修正",{"2":{"45":1}}],["📝",{"2":{"46":1}}],["📝ドキュメント修正",{"2":{"45":1}}],["🚑",{"2":{"46":1}}],["🚑致命的なバグ修正",{"2":{"45":1}}],["🔥コードやファイルの削除",{"2":{"45":1}}],["💡ソースコードへのコメント追加や修正",{"2":{"45":1}}],["🔧設定ファイルの修正",{"2":{"45":1}}],["💚テストやciの修正",{"2":{"45":1}}],["👮セキュリティ関連の修正",{"2":{"45":1}}],["説明文2",{"2":{"489":1}}],["説明文1",{"2":{"489":1}}],["説明は割愛する",{"2":{"177":1}}],["説明",{"2":{"43":1,"131":1,"160":1,"208":1,"272":1,"495":1}}],["ほとんど問題にはなりませんが",{"2":{"248":1,"311":1}}],["ほとんど全ての操作はコマンドパレットからも実行可能だが",{"2":{"177":1}}],["ほかの要素についてはプロジェクトの運用にしたがい任意とする",{"2":{"42":1}}],["ほぼ全ての",{"2":{"12":1}}],["頭文字のみの略語の場合は大文字のみ",{"2":{"39":1}}],["停止時刻",{"2":{"38":1}}],["費用の負担先を想定",{"2":{"38":1}}],["費用按分",{"2":{"38":1}}],["ozawa",{"2":{"675":1}}],["omit",{"2":{"465":1}}],["omitempty",{"2":{"465":1}}],["oapi",{"2":{"509":1,"510":1}}],["oai",{"2":{"463":1}}],["oauth2認証ありの場合",{"2":{"456":1}}],["oauth2",{"2":{"456":4}}],["oas",{"2":{"444":1,"490":2,"491":2,"523":1,"546":1}}],["oas2",{"2":{"444":1,"447":1}}],["occupation",{"2":{"416":1}}],["over",{"2":{"408":1,"421":1}}],["overrideアノテーションの指定がない",{"2":{"142":1,"219":1,"283":1}}],["override",{"2":{"131":1,"142":2,"170":2,"208":1,"219":2,"243":2,"272":1,"283":2,"306":2}}],["overrideのあるメソッドでは",{"2":{"131":1,"208":1,"272":1}}],["old",{"0":{"316":1}}],["o2",{"2":{"170":10,"243":10,"306":10}}],["o1",{"2":{"170":10,"243":10,"306":10}}],["object",{"2":{"463":1,"465":1,"512":1,"513":3,"514":4,"544":12}}],["objectoutputstream",{"2":{"161":1,"234":1,"297":1}}],["objects",{"2":{"158":3,"233":3}}],["objectclub",{"2":{"111":2,"188":2,"252":2}}],["openopentelemetry",{"2":{"477":2,"532":2}}],["opentelemetry",{"0":{"477":1,"532":1},"2":{"477":1,"532":1}}],["open",{"2":{"469":1,"537":1}}],["openapiのパス+各bl設計",{"2":{"407":1}}],["openapi",{"0":{"491":1,"495":1,"497":1},"2":{"393":1,"400":1,"413":1,"415":1,"416":1,"434":2,"444":1,"447":1,"449":1,"453":1,"457":1,"463":1,"466":1,"474":1,"475":1,"477":1,"480":1,"483":1,"490":8,"493":1,"495":4,"496":1,"497":2,"498":1,"507":2,"509":1,"510":1,"523":1,"524":1,"527":1,"528":1,"529":1,"530":1,"532":1,"537":1,"542":1,"543":3,"544":11,"546":3}}],["operationsでも利用されているため",{"2":{"507":1}}],["operation",{"0":{"462":1},"2":{"460":1,"543":1}}],["operationid",{"0":{"507":1},"2":{"447":1,"457":1,"462":2,"503":1,"507":3,"544":4}}],["op",{"2":{"151":2}}],["options",{"2":{"476":4,"531":4}}],["optional",{"0":{"157":1,"232":1,"296":1},"2":{"157":4,"232":4,"296":4}}],["option",{"2":{"66":1,"92":1}}],["output",{"0":{"322":1},"2":{"544":1}}],["outputstream",{"0":{"161":1,"234":1,"297":1}}],["out",{"2":{"147":2,"148":2,"160":3,"182":1,"224":2,"225":2,"288":2,"289":2,"527":1}}],["o",{"2":{"145":19,"222":2,"286":2}}],["of",{"2":{"88":1,"134":2,"137":6,"153":8,"156":3,"158":1,"211":2,"214":6,"228":8,"231":3,"233":1,"295":3,"416":1,"444":1,"480":1,"490":9,"493":1,"544":18,"546":2}}],["offset",{"0":{"568":1,"618":1},"2":{"517":1,"568":2,"618":2}}],["off",{"2":{"85":1,"147":1,"151":5,"152":4,"224":1,"288":1,"487":1}}],["only",{"2":{"568":1,"651":1}}],["oneof",{"2":{"513":1}}],["one",{"2":{"136":2,"213":2,"277":2,"544":1}}],["on",{"2":{"85":1,"132":1,"147":1,"209":1,"224":1,"273":1,"288":1,"469":1,"487":1,"537":1,"561":1,"566":1,"616":1}}],["oss開発を行う場合など",{"2":{"66":1}}],["ora",{"2":{"587":1,"637":1}}],["oracle",{"2":{"111":1,"151":1,"152":1,"188":1,"252":1,"548":1,"571":1,"596":1,"597":1}}],["order",{"0":{"574":1,"623":1},"2":{"557":1,"566":2,"568":1,"574":1,"608":1,"616":2,"618":1,"623":1}}],["orelse",{"2":{"157":2,"232":2,"296":2}}],["orelsethrow",{"2":{"157":2,"232":2,"296":2}}],["or",{"2":{"131":1,"208":1,"272":1,"566":1,"581":1,"616":1,"632":1}}],["origin",{"2":{"65":1,"79":2,"85":1,"476":2,"531":2}}],["organization配下に作成",{"2":{"84":1}}],["organizations",{"2":{"37":1,"40":1}}],["organization",{"2":{"2":1}}],["ok",{"2":{"53":2,"73":1,"75":1,"140":1,"217":1,"281":1,"438":2,"440":1,"441":1,"447":1,"453":1,"454":1,"455":1,"456":2,"457":3,"458":1,"463":1,"464":2,"465":1,"487":1,"488":1,"510":2,"544":1,"546":1}}],["owners",{"2":{"503":1}}],["owner",{"2":{"38":1}}],["✅推奨例",{"2":{"667":1}}],["✅️",{"2":{"51":3,"85":4,"88":7,"90":2,"91":3}}],["✅",{"2":{"38":5}}],["形式いずれかのフォーマットで記載できるが",{"2":{"483":1}}],["形式",{"2":{"473":1,"483":2,"541":1,"571":2}}],["形式である",{"2":{"452":1}}],["形式であるが",{"2":{"36":1}}],["形式のクラスや",{"2":{"159":1}}],["形式を推奨する",{"2":{"38":1,"501":1}}],["wait",{"2":{"591":1}}],["wait指定なしの場合はロックが解除されてもプログラムに制御が返らないことがある",{"2":{"591":1}}],["wait秒数指定",{"2":{"591":1}}],["waitまたは",{"2":{"591":1}}],["warn",{"2":{"323":2,"326":2}}],["wss",{"2":{"455":1}}],["win",{"2":{"480":1}}],["winter",{"2":{"127":2,"204":2,"268":2}}],["width",{"2":{"159":4}}],["with",{"0":{"106":1,"567":1,"585":1,"617":1},"2":{"65":2,"75":1,"79":1,"97":1,"104":1,"161":1,"162":2,"234":1,"235":2,"297":1,"298":2,"544":2,"567":3,"585":2,"617":3}}],["w",{"2":{"111":1,"151":2,"188":1,"252":1,"430":1}}],["www",{"2":{"111":4,"188":4,"252":4}}],["where",{"0":{"578":1,"627":1},"2":{"557":1,"559":1,"560":1,"566":2,"569":1,"572":1,"578":3,"586":3,"608":1,"610":1,"611":1,"616":2,"619":1,"621":1,"627":3,"636":3}}],["when",{"2":{"88":1,"561":2,"563":1,"613":1}}],["whitespace",{"2":{"480":1}}],["whitepapers",{"2":{"37":1}}],["while",{"2":{"146":4,"223":4,"287":4}}],["writing",{"2":{"111":1,"188":1,"252":1}}],["write",{"2":{"86":1}}],["wrench",{"2":{"45":1}}],["workspace",{"0":{"651":1},"2":{"656":1}}],["workspaceを利用しているため",{"2":{"649":1}}],["work",{"2":{"152":4}}],["workflows",{"2":{"90":2}}],["workflowの補足説明",{"2":{"82":1}}],["word",{"2":{"47":1,"98":1,"317":1,"405":1,"418":1,"492":1,"597":2}}],["well",{"2":{"456":1}}],["wednesday",{"2":{"151":6,"152":2}}],["west",{"2":{"8":2}}],["websocket",{"2":{"455":1}}],["webapi",{"2":{"400":1,"401":1,"450":1}}],["webacl",{"2":{"12":1}}],["webworkshop",{"2":{"111":1,"188":1,"252":1}}],["webアプリケーションなどの",{"2":{"48":1}}],["web",{"0":{"393":1,"413":1,"415":1,"416":1,"434":1},"1":{"416":1,"435":1,"436":1,"437":1,"438":1,"439":1,"440":1,"441":1,"442":1,"443":1},"2":{"6":7,"14":4,"19":2,"20":1,"21":2,"22":1,"85":1,"402":1,"403":1,"409":1,"415":2,"434":1,"444":2,"449":3,"451":1,"455":2,"456":1,"457":2,"458":2,"474":3,"475":1,"490":1,"493":2,"498":3,"499":1,"500":1,"502":2,"525":1,"529":3,"530":1,"546":5}}],["将来の変更の影響を考慮する",{"2":{"37":1}}],["多要素認証の強制",{"2":{"648":1}}],["多くのクライアントは",{"2":{"465":1}}],["多くの業務画面で重要である",{"2":{"403":1}}],["多くのサービスでユーザー名には慣習的にアンダースコアを用いることが多いため",{"2":{"33":1}}],["多めに使用する",{"2":{"37":1}}],["整数",{"2":{"469":1,"537":1}}],["整数値",{"2":{"469":1,"537":1}}],["整理など",{"2":{"37":1}}],["整合性を持たせるため",{"2":{"14":1}}],["コミュニケーションを活性化させるためにも絵文字リアクションを積極的に行い推奨",{"2":{"664":1}}],["コミュニケーションを活性化させ",{"2":{"663":1}}],["コミュニケーションを迅速",{"2":{"662":1}}],["コミットを作成できる",{"2":{"183":1}}],["コミットを作成するため",{"2":{"65":1}}],["コミット",{"0":{"183":1}}],["コミットグラフ",{"2":{"181":1,"182":1,"183":1}}],["コミットグラフを表示できる",{"2":{"180":1}}],["コミットグラフを表示する拡張機能",{"2":{"178":1}}],["コミットグラフの表示",{"0":{"180":1}}],["コミットしたくない",{"2":{"96":1}}],["コミット時の挙動",{"2":{"94":1}}],["コミットの履歴が汚れるため",{"2":{"69":1}}],["コミットの目的がわかりやすくなる",{"2":{"42":1}}],["コミットメッセージ規則",{"0":{"70":1}}],["コミットメッセージ規約",{"0":{"42":1},"1":{"43":1,"44":1,"45":1,"46":1},"2":{"70":1}}],["コミットメッセージのサンプルは以下のようなものとなる",{"2":{"46":1}}],["コミットメッセージの必須要素とはしないこととする",{"2":{"44":1}}],["コミットメッセージ例",{"0":{"46":1}}],["コネクト等でチャンネル内に社外のメンバーが含まれる場合には",{"2":{"660":1}}],["コレに対応する様々なツールやフレームワークといったエコシステムがあり",{"2":{"546":1}}],["コレクション要素の結合であればstring",{"2":{"172":1,"245":1,"308":1}}],["コレクション",{"0":{"153":1,"228":1,"292":1}}],["コロンを使用する",{"2":{"152":1}}],["コメントアウトが途中で切れてしまう恐れがあるため",{"2":{"570":1,"620":1}}],["コメントアウトされたコード",{"2":{"131":1,"208":1,"272":1}}],["コメントがあることを強調する",{"2":{"570":1,"620":1}}],["コメントを始めるスラッシュとアスタリスクは",{"2":{"570":1,"620":1}}],["コメント本文",{"2":{"556":1,"607":1}}],["コメント種類",{"2":{"167":1,"240":1,"303":1}}],["コメントのスタイルに関しては",{"2":{"167":1,"240":1,"303":1}}],["コメントの存在を保障することにもつながる",{"2":{"166":1,"239":1,"302":1}}],["コメント形式を採用",{"2":{"166":1,"239":1,"302":1}}],["コメントによってコードが理解しやすくなることで",{"2":{"166":1,"239":1,"302":1}}],["コメントには",{"2":{"131":1,"166":1,"208":1,"239":1,"272":1,"302":1}}],["コメント化する価値がないプログラムならば",{"2":{"166":1,"239":1,"302":1}}],["コメント規約",{"0":{"165":1,"238":1,"301":1},"1":{"166":1,"167":1,"239":1,"240":1,"302":1,"303":1}}],["コメントはシンプルに",{"2":{"166":1,"239":1,"302":1}}],["コメントは必須",{"2":{"166":1,"239":1,"302":1}}],["コメントは必要なものだけを簡潔に",{"2":{"131":1,"208":1,"272":1}}],["コメントは",{"2":{"156":1,"167":2,"231":1,"240":2,"295":1,"303":2}}],["コメントではなくわかりやすい名前を付ける",{"2":{"131":1,"208":1,"272":1}}],["コメント",{"0":{"131":1,"167":1,"208":1,"240":1,"272":1,"303":1,"570":1,"620":1},"2":{"166":2,"167":1,"239":2,"240":1,"302":2,"303":1,"430":1,"433":1,"570":1,"620":1}}],["コピー範囲などを独自判断で狭められることを防ぐなどの理由で",{"2":{"679":1}}],["コピーできないエラー表示など",{"2":{"679":1}}],["コピーしたインスタンス",{"2":{"131":1,"208":1,"272":1}}],["コピー",{"2":{"117":1,"131":1,"194":1,"208":1,"258":1,"272":1}}],["コーティング規約",{"0":{"549":1,"600":1},"1":{"550":1,"551":1,"552":1,"553":1,"554":1,"555":1,"556":1,"557":1,"558":1,"559":1,"560":1,"561":1,"562":1,"563":1,"564":1,"565":1,"566":1,"567":1,"568":1,"569":1,"570":1,"571":1,"572":1,"573":1,"574":1,"575":1,"576":1,"577":1,"578":1,"579":1,"601":1,"602":1,"603":1,"604":1,"605":1,"606":1,"607":1,"608":1,"609":1,"610":1,"611":1,"612":1,"613":1,"614":1,"615":1,"616":1,"617":1,"618":1,"619":1,"620":1,"621":1,"622":1,"623":1,"624":1,"625":1,"626":1,"627":1,"628":1,"629":1,"630":1}}],["コールバックのような仕組みを実現するには",{"2":{"524":1}}],["コールバック",{"2":{"524":1}}],["コード生成やドキュメントの価値を高める",{"2":{"546":1}}],["コード生成ツールのために型情報を付与させる",{"2":{"514":1}}],["コード生成が不要",{"2":{"476":2,"531":2}}],["コード生成対象によっては",{"2":{"462":1}}],["コード生成で利用される",{"2":{"526":1}}],["コード生成で利用される項目なので",{"2":{"462":1}}],["コード生成で利用され",{"2":{"459":1}}],["コード生成などツール側で予期しない動作をすることがあるため",{"2":{"457":1,"458":1}}],["コードと設計書が同一リポジトリで管理される",{"2":{"404":1}}],["コード体系について補足",{"2":{"402":1}}],["コード体系",{"0":{"402":1}}],["コードにコメントを書く時間を費やせば",{"2":{"166":1,"239":1,"302":1}}],["コードにコメントを書く理由は",{"2":{"166":1,"239":1,"302":1}}],["コードに合わせてインデントする",{"2":{"160":1}}],["コード内で思いがけないフォール",{"2":{"151":1,"152":1}}],["コード中に",{"2":{"136":1,"213":1,"277":1}}],["コードからすぐわかること",{"2":{"131":1,"208":1,"272":1}}],["コードを読めば分かることを書かない",{"2":{"166":1,"239":1,"302":1}}],["コードを読んでもすぐに理解できないような実装は",{"2":{"114":1,"191":1,"255":1}}],["コードを書く前にコードがどのように動作するかについて考えるよい機会となり",{"2":{"166":1,"239":1,"302":1}}],["コードを書く前にコメントを書くことである",{"2":{"166":1,"239":1,"302":1}}],["コードを書く前に先にコメントを記述する",{"2":{"166":1,"239":1,"302":1}}],["コードをコメント化する最良の方法は",{"2":{"166":1,"239":1,"302":1}}],["コードをコピー",{"2":{"117":1,"194":1,"258":1}}],["コードを表示するディスプレイや印刷するプリントに使われるフォントはプロポーショナルだったりそうでなかったりして",{"2":{"166":1,"239":1,"302":1}}],["コードを明確化するコメントを書く",{"2":{"166":1,"239":1,"302":1}}],["コードを",{"2":{"116":1,"193":1,"257":1}}],["コードの概要",{"2":{"167":1,"240":1,"303":1}}],["コードの一部分を見ればそれが何かを理解することはできる",{"2":{"166":1,"239":1,"302":1}}],["コードの開発中にアドバンテージを得ることができる",{"2":{"166":1,"239":1,"302":1}}],["コードの",{"2":{"118":2,"195":2,"259":2}}],["コードの可読性",{"2":{"136":1,"140":1,"213":1,"217":1,"277":1,"281":1}}],["コードの可読性を下げる原因となる",{"2":{"116":1,"193":1,"257":1}}],["コードの可読性に非常に大きな影響を及ぼす",{"2":{"115":1,"192":1,"256":1}}],["コードの見やすさは",{"2":{"114":1,"191":1,"255":1}}],["コードの保守性を向上させる具体的な方法を示している",{"2":{"113":1,"190":1,"254":1}}],["コードの書き方に関する一種のパターンと考えることもでき",{"2":{"113":1,"190":1,"254":1}}],["コードの変更に伴い",{"2":{"97":1}}],["コーディングミスによるフォールスルーを避けるため",{"2":{"151":1,"152":1}}],["コーディングミス",{"2":{"146":1,"156":1,"223":1,"231":1,"287":1,"295":1}}],["コーディング時からできるだけ気をつけておきたいことでもある",{"2":{"117":1,"194":1,"258":1}}],["コーディング時よりリファクタリング",{"2":{"117":1,"194":1,"258":1}}],["コーディングでは",{"2":{"115":1,"192":1,"256":1}}],["コーディングにあたっては",{"2":{"114":1,"191":1,"255":1}}],["コーディングの心得",{"0":{"113":1,"190":1,"254":1},"1":{"114":1,"115":1,"116":1,"117":1,"118":1,"191":1,"192":1,"193":1,"194":1,"195":1,"255":1,"256":1,"257":1,"258":1,"259":1},"2":{"113":1,"190":1,"254":1}}],["コーディング規約が利用できます",{"2":{"596":1}}],["コーディング規約にあわせて半角スペースではなくタブ文字とする",{"2":{"550":1,"601":1}}],["コーディング規約についてまとめたものである",{"2":{"548":1,"599":1}}],["コーディング規約を守ることに加えて",{"2":{"113":1,"190":1,"254":1}}],["コーディング規約は",{"2":{"113":1,"190":1,"254":1}}],["コーディング規約",{"0":{"128":1,"205":1,"269":1,"580":1,"631":1},"1":{"129":1,"130":1,"131":1,"132":1,"133":1,"134":1,"135":1,"136":1,"137":1,"138":1,"139":1,"140":1,"141":1,"142":1,"143":1,"144":1,"145":1,"146":1,"147":1,"148":1,"149":1,"150":1,"151":1,"152":1,"153":1,"154":1,"155":1,"156":1,"157":1,"158":1,"159":1,"160":1,"161":1,"162":1,"163":1,"164":1,"206":1,"207":1,"208":1,"209":1,"210":1,"211":1,"212":1,"213":1,"214":1,"215":1,"216":1,"217":1,"218":1,"219":1,"220":1,"221":1,"222":1,"223":1,"224":1,"225":1,"226":1,"227":1,"228":1,"229":1,"230":1,"231":1,"232":1,"233":1,"234":1,"235":1,"236":1,"237":1,"270":1,"271":1,"272":1,"273":1,"274":1,"275":1,"276":1,"277":1,"278":1,"279":1,"280":1,"281":1,"282":1,"283":1,"284":1,"285":1,"286":1,"287":1,"288":1,"289":1,"290":1,"291":1,"292":1,"293":1,"294":1,"295":1,"296":1,"297":1,"298":1,"299":1,"300":1,"581":1,"582":1,"583":1,"584":1,"585":1,"586":1,"587":1,"588":1,"589":1,"590":1,"591":1,"592":1,"593":1,"594":1,"632":1,"633":1,"634":1,"635":1,"636":1,"637":1,"638":1,"639":1,"640":1,"641":1,"642":1,"643":1},"2":{"111":2,"188":2,"252":2,"491":1}}],["コーディング規約やガイドラインを以下に示す",{"2":{"111":1,"188":1,"252":1}}],["コーディング標準",{"2":{"111":1,"188":1,"252":1}}],["コマンド",{"2":{"109":2,"110":2}}],["コマンドを使用して",{"2":{"101":1,"102":1,"103":1}}],["コマンドライン経由でのタグ作成は混ぜないようにし",{"2":{"73":1}}],["コマンドラインからタグを作成する必要がある場合は",{"2":{"73":1,"75":1}}],["コスト",{"2":{"407":1}}],["コスト管理",{"2":{"38":1}}],["コスト追跡",{"2":{"37":1}}],["コンポーネント化したレスポンスオブジェクトを参照",{"2":{"510":2}}],["コンポーネント化したリクエストボディを参照",{"2":{"509":1}}],["コンポーネント化をせず",{"2":{"509":1,"510":1}}],["コンポーネント化",{"2":{"509":1,"510":1}}],["コンパイルで自動的にこれらの処理に変換されるため",{"2":{"248":1,"311":1}}],["コンストラクタ参照は",{"2":{"170":1,"243":1,"306":1}}],["コンストラクタ参照を利用する",{"2":{"154":1,"229":1,"293":1}}],["コンストラクタ参照が利用できる場合はメソッド参照",{"2":{"154":1,"229":1,"293":1}}],["コンストラクタ参照",{"0":{"154":1,"170":1,"229":1,"243":1,"293":1,"306":1}}],["コンストラクター",{"2":{"144":1,"221":1,"285":1}}],["コンストラクタ",{"0":{"133":1,"210":1,"274":1}}],["コンストラクタと同じ名前のメソッドはつくらない",{"2":{"123":1,"200":1,"264":1}}],["コンフリクトを避けるため原則共通化は行わない",{"2":{"516":1}}],["コンフリクトの解決を記録しておき",{"2":{"82":1}}],["コンフリクト対応",{"2":{"79":1}}],["コンフリクトリスクは",{"2":{"65":1}}],["コンシューマーを名前に含めることは推奨しない",{"2":{"30":1}}],["コンシューマーを取りうるため",{"2":{"30":1}}],["コンソールで見たときにどの",{"2":{"14":1}}],["コンソールや設計ドキュメントなどで一覧化した場合に見切れる可能性を減らして可読性を高める",{"2":{"4":1}}],["=であれば",{"2":{"581":1,"632":1}}],["=\\t",{"2":{"556":1,"607":1}}],["=受講時間になっている場合に",{"2":{"376":1}}],["==",{"2":{"130":4,"134":4,"145":3,"146":3,"147":1,"148":1,"175":2,"207":4,"211":4,"222":1,"223":3,"224":1,"225":1,"250":2,"271":4,"275":4,"286":1,"287":3,"288":1,"289":1,"313":2}}],["====",{"2":{"45":2}}],["=develop",{"2":{"62":1}}],["=",{"2":{"37":1,"109":1,"110":1,"115":2,"125":1,"126":2,"129":6,"130":13,"135":3,"136":4,"137":7,"139":3,"140":4,"145":10,"146":22,"147":19,"148":4,"149":3,"151":17,"152":8,"153":1,"154":4,"156":12,"157":7,"158":17,"159":3,"160":26,"161":1,"162":1,"163":2,"166":1,"169":4,"170":4,"172":9,"173":5,"174":3,"175":2,"192":2,"202":1,"203":2,"206":6,"207":13,"212":3,"213":4,"214":7,"216":3,"217":4,"222":4,"223":22,"224":19,"225":4,"226":3,"228":1,"229":4,"231":12,"232":7,"233":17,"234":1,"235":1,"236":2,"239":1,"242":4,"243":4,"245":9,"246":5,"247":3,"248":4,"249":6,"250":2,"256":2,"266":1,"267":2,"270":6,"271":13,"276":3,"277":4,"278":7,"280":3,"281":4,"286":4,"287":22,"288":17,"289":4,"290":3,"292":1,"293":4,"295":12,"296":7,"297":1,"298":1,"299":2,"302":1,"305":4,"306":4,"308":9,"309":5,"310":3,"311":4,"312":6,"313":2,"423":2,"425":2,"426":4,"480":7,"556":1,"573":1,"586":2,"607":1,"622":1,"630":2,"636":2}}],["5xx",{"2":{"510":1,"512":1,"514":2}}],["59",{"2":{"473":1,"541":1}}],["527max",{"2":{"175":1,"250":1,"313":1}}],["559",{"2":{"173":1,"246":1,"309":1}}],["576",{"2":{"174":1,"247":1,"310":1}}],["572",{"2":{"170":1,"243":1,"306":1}}],["571",{"2":{"170":1,"243":1,"306":1}}],["5",{"2":{"85":1,"113":1,"137":4,"166":1,"167":1,"172":3,"173":1,"190":1,"214":4,"239":1,"240":1,"245":3,"246":1,"254":1,"278":4,"302":1,"303":1,"308":3,"309":1,"324":1,"473":1,"541":1,"568":2,"618":2}}],["503",{"2":{"465":1}}],["500",{"2":{"430":2,"437":1,"447":1,"464":3,"544":4,"546":1}}],["5000",{"2":{"115":2,"192":2,"256":2}}],["50",{"2":{"37":1,"174":1,"247":1,"310":1,"544":6}}],["51",{"2":{"28":1,"172":1,"245":1,"308":1}}],["viewer",{"2":{"480":1}}],["view",{"2":{"180":1,"583":1,"634":1}}],["vector",{"2":{"153":1,"228":1,"292":1}}],["verified",{"2":{"90":1}}],["versions",{"0":{"316":1},"2":{"463":1}}],["version1を示すブランチ",{"2":{"63":1}}],["version1の利用ユーザーが存在する場合",{"2":{"63":1}}],["version",{"0":{"452":1,"501":1},"2":{"36":2,"74":1,"75":1,"91":1,"131":2,"208":2,"272":2,"447":1,"449":2,"490":1,"491":1,"498":2,"501":2,"544":2}}],["valid",{"2":{"544":2}}],["validation",{"2":{"465":1}}],["value\\t=\\t1",{"2":{"560":1,"611":1}}],["valueofが効率的ですが",{"2":{"248":1,"311":1}}],["valueof",{"2":{"145":2,"147":2,"224":2,"248":5,"249":2,"288":2,"311":5,"312":2}}],["valuesの意味で使用されることもある",{"2":{"160":1}}],["valuesの略",{"2":{"160":2}}],["values",{"2":{"129":2,"137":6,"159":1,"160":1,"206":2,"214":6,"270":2,"278":6,"558":1,"609":1}}],["value",{"2":{"85":1,"86":1,"88":1,"89":1,"90":1,"91":1,"124":7,"129":2,"141":1,"146":2,"151":4,"175":4,"201":7,"206":2,"218":1,"223":2,"248":2,"249":3,"250":4,"265":7,"270":2,"282":1,"287":2,"311":2,"312":3,"313":4,"321":1,"322":1,"323":1,"326":1,"352":1,"359":1,"366":1,"373":1,"388":1,"544":4}}],["varを利用しない",{"2":{"158":1,"233":1}}],["varを混在させるとソースコードの見通しと保守性が悪くなります",{"2":{"158":1,"233":1}}],["variable",{"0":{"158":1,"233":1},"2":{"158":1,"233":1}}],["var",{"0":{"158":1,"233":1},"2":{"145":4,"151":8,"158":9,"159":3,"233":9}}],["void",{"2":{"141":1,"142":4,"158":1,"160":4,"218":1,"219":4,"233":1,"282":1,"283":4}}],["vscodeでgitlensを使う",{"2":{"178":1}}],["vscode上でのgit操作は",{"2":{"177":1}}],["vscode上でのgit操作",{"0":{"177":1},"1":{"178":1,"179":1,"180":1,"181":1,"182":1,"183":1,"184":1,"185":1,"186":1,"187":1},"2":{"80":1}}],["vs",{"0":{"80":1},"2":{"80":1,"480":1}}],["v3",{"2":{"75":2,"479":1}}],["v",{"2":{"74":1,"89":1}}],["v2",{"2":{"74":2,"75":3,"76":1,"442":1,"454":2,"465":1,"484":1,"493":1}}],["v1",{"2":{"63":1,"73":3,"74":5,"75":4,"76":1,"442":1,"447":1,"454":1,"465":1,"485":1,"502":3,"544":2}}],["vpc",{"0":{"18":1},"2":{"10":1,"14":1,"18":2,"26":1,"455":1}}],["細かく設定する場合",{"2":{"36":1}}],["細かく設定し再利用するパターン",{"2":{"36":1}}],["こういった場面では",{"2":{"664":1}}],["ことがある",{"2":{"465":1}}],["ここに記載する",{"2":{"462":1}}],["ここではこちらの拡張機能を使用する",{"2":{"178":1}}],["ここでは",{"2":{"36":1}}],["これは",{"2":{"512":1,"581":1,"632":1}}],["これはサーバサイドで区分値を増やす必要があるケースで",{"2":{"465":1}}],["これら運用方法は利用者の所属する部署やチームごとに自然と決めていくことが多いが",{"2":{"647":1}}],["これらの要素を大まかに把握しておくことが重要である",{"2":{"495":1}}],["これらのファイルはpandocを利用して作成しています",{"2":{"317":1,"418":1,"492":1,"597":1}}],["これらの拡張機能がインストールされていることを前提に説明を行う",{"2":{"178":1}}],["これらの代わりにlist",{"2":{"153":1,"228":1,"292":1}}],["これらをバイトコード上で確認するとそれぞれ以下のようになります",{"2":{"173":1,"246":1,"309":1}}],["これに対して",{"2":{"148":1,"225":1,"289":1}}],["これにより意図せず他の人のコミットを上書きすることを防ぎつつ",{"2":{"65":1}}],["これにより",{"2":{"61":1,"72":1}}],["これでは",{"2":{"115":1,"192":1,"256":1}}],["これを書いたプログラマの気前がよかったのか",{"2":{"166":1,"239":1,"302":1}}],["これを忘れると",{"2":{"151":1,"152":1}}],["これを防ぐには",{"2":{"65":1}}],["これをベースとして選択する",{"2":{"58":1}}],["この際拡張子が設定されていないとslack内でそのままファイルを開くことができなくなってしまう",{"2":{"679":1}}],["この際",{"2":{"578":1,"627":1,"674":1}}],["この",{"2":{"452":1,"501":1}}],["このような設計を暗黙的に考慮し",{"2":{"434":1}}],["このような例はよく見られる",{"2":{"116":1,"193":1,"257":1}}],["このルールに必ずしも準じる必要は無いが",{"2":{"434":1}}],["このため",{"2":{"248":1,"311":1}}],["このコードは",{"2":{"167":1,"240":1,"303":1}}],["この形式以外のコメントはドキュメントとして出力されないことに注意",{"2":{"167":1,"240":1,"303":1}}],["このソースコードをテキストとしてみた場合",{"2":{"159":1}}],["このことはクラスの設計にもあてはまる",{"2":{"118":1,"195":1,"259":1}}],["このメソッドは",{"2":{"118":1,"195":1,"259":1}}],["この場合もレスポンスで利用する場合は指定しない",{"2":{"472":1,"540":1}}],["この場合は",{"2":{"465":2}}],["この場合は命名粒度が",{"2":{"36":1}}],["この場合",{"2":{"118":1,"195":1,"259":1,"464":1}}],["この方法では",{"2":{"103":1}}],["この方法を選択した場合は",{"2":{"101":1,"102":1,"106":1}}],["このときよく用いるのが",{"2":{"94":1}}],["このときは複数リリースバージョンを並行して開発するため",{"2":{"61":1}}],["この記述は削除しないようにする",{"2":{"66":1}}],["この選択にあたり",{"2":{"65":1}}],["この例ではversion1とversion2が別リソースとして動いていることを前提としている",{"2":{"63":1}}],["この時に過去バージョンもサポートする必要があると",{"2":{"63":1}}],["この中でも",{"2":{"42":1}}],["この制約を踏まえ",{"2":{"34":1}}],["仮に",{"2":{"34":1}}],["各ユーザーの考え方",{"2":{"647":1}}],["各行を",{"2":{"570":1,"620":1}}],["各オブジェクトの詳細については公式ドキュメントを参照されたい",{"2":{"495":1}}],["各種",{"2":{"495":1}}],["各種規約を理解する上で",{"2":{"495":1}}],["各種インプット取得",{"2":{"421":1}}],["各アプリ開発者が生成されたコードで悩んだり",{"2":{"477":1,"532":1}}],["各項目の",{"2":{"463":1}}],["各",{"2":{"456":1,"464":1}}],["各開発チームにおいて必要な情報を追加",{"2":{"405":1}}],["各クエリパラメータ指定されたパラメータを設定",{"2":{"381":1}}],["各プロジェクトで",{"2":{"158":1,"159":1,"233":1}}],["各中間処理ごとにも",{"2":{"169":1,"242":1,"305":1}}],["各中間処理",{"2":{"156":1,"231":1,"295":1}}],["各ロールの権限については",{"2":{"86":1}}],["各ブランチ戦略ごとに",{"2":{"59":1}}],["各タグキーごとに原則",{"2":{"39":1}}],["各役職ごとに基本となるグループを作成し",{"2":{"34":1}}],["各リソース名に環境名を付与することを推奨",{"2":{"3":1}}],["各リソースの名前に用いる要素を次の一覧に示す",{"2":{"2":1}}],["所属可能なグループ数は最大で",{"2":{"34":1}}],["人事情報など機密情報は",{"2":{"680":1}}],["人事相談",{"2":{"665":1}}],["人によっては手を抜きがちとなる",{"2":{"115":1,"192":1,"256":1}}],["人が利用する",{"2":{"33":1}}],["人またはシステム",{"2":{"33":1}}],["個程度でも",{"2":{"587":1,"637":1}}],["個まで指定できるが",{"2":{"587":1,"637":1}}],["個々の",{"2":{"511":1,"525":1}}],["個人を識別しやすくなる",{"2":{"656":1}}],["個人識別におけるアイコン画像の有用性が高いため",{"2":{"656":1}}],["個人的gitおすすめtips",{"2":{"96":1}}],["個人的にgitリポジトリ配下のフォルダに格納したいが",{"2":{"96":1}}],["個人用のファイルをgit管理対象外とする",{"0":{"96":1}}],["個人情報有無",{"2":{"411":1}}],["個人情報",{"2":{"37":1,"680":1}}],["個のタグを設定できる",{"2":{"37":1}}],["個の英数字またはハイフンを使用する必要があります",{"2":{"26":1}}],["個別のアプリケーション要件でブレが少なく",{"2":{"514":1}}],["個別のグループ",{"2":{"34":1}}],["個別に記載する",{"2":{"520":1}}],["個別に定義する",{"2":{"512":1}}],["個別に発行することを推奨する",{"2":{"33":1}}],["誰に",{"2":{"396":1}}],["誰が操作したのかといった証跡を追えなくなってしまうため",{"2":{"33":1}}],["誰",{"2":{"33":1}}],["点について述べる",{"2":{"32":1}}],["グループ用のポリシーを作成する例では",{"2":{"36":1}}],["グループ名には",{"2":{"34":1}}],["グループ数をむやみに増やさないためにグループ名に環境名",{"2":{"34":1}}],["グループに追加可能だが",{"2":{"34":1}}],["グループに",{"2":{"34":1}}],["グループ",{"0":{"34":1},"2":{"32":1}}],["スクリーンショットでの共有を希望する場合",{"2":{"679":1}}],["スクリーンショットなどの画像で共有しても良い",{"2":{"679":1}}],["スタックトレースはスレッド内に記載します",{"2":{"667":1}}],["スタッシュ",{"0":{"187":1}}],["スキームを提供するサービスの定義である場合は",{"2":{"455":1}}],["スキーマファースト",{"2":{"546":1}}],["スキーマ",{"2":{"29":1}}],["スコープ",{"2":{"429":1,"432":1}}],["スコープが狭い変数名は省略した名前でもよい",{"2":{"126":1,"203":1,"267":1}}],["スレッド投稿数をなるべく減らしたいなどの意図がある場合は",{"2":{"674":1}}],["スレッドを用いる意味が薄れるので",{"2":{"669":1}}],["スレッド内のやり取りを細かくalso",{"2":{"669":1}}],["スレッド内の投稿をチャンネルのタイムライン側に重複投稿ができる",{"2":{"669":1}}],["スレッド内で重要な決定事項に至った場合は",{"2":{"669":1}}],["スレッド先頭",{"2":{"667":1}}],["スレッド先頭の投稿",{"2":{"667":2}}],["スレッドのトップ",{"0":{"667":1}}],["スレッド単位であれば",{"2":{"666":1}}],["スレッドでの利用を推奨する",{"2":{"666":1}}],["スレッド処理",{"2":{"169":1,"242":1,"305":1}}],["スレッドセーフ性が保証されていない箇所では`stringbuffer`クラスを利用する",{"2":{"147":1,"224":1,"288":1}}],["ストリームを扱う",{"2":{"161":1,"234":1,"297":1}}],["ストリーム",{"0":{"161":1,"234":1,"297":1},"2":{"323":1,"326":1}}],["ストリームのクローズ処理を行っていないサンプルコードであっても",{"2":{"116":1,"193":1,"257":1}}],["スルーが発生する場合があります",{"2":{"151":1,"152":1}}],["スーパークラスにある",{"2":{"142":1,"219":1,"283":1}}],["スーパークラスで",{"2":{"142":1,"219":1,"283":1}}],["スーパークラスのメソッドをオーバーライドするときは",{"2":{"142":1,"219":1,"283":1}}],["スーパークラスのフィールドはサブクラスで宣言されたフィールドによって隠ぺいされてしまうので",{"2":{"142":1,"219":1,"283":1}}],["スーパークラスのインスタンス変数をサブクラスでオーバーライドしない",{"2":{"142":1,"219":1,"283":1}}],["スーパークラスと同じ名前のフィールドをサブクラスで宣言しないこと",{"2":{"142":1,"219":1,"283":1}}],["ステートメントの終わりを示す",{"2":{"556":1,"607":1}}],["ステートメントが無い",{"2":{"146":1,"223":1,"287":1}}],["ステータスは見過ごされる可能性が高い",{"2":{"677":1}}],["ステータス変更に気が付きにくい",{"2":{"677":1}}],["ステータス機能でもチームメンバーに不在であるという状態を表明できる",{"2":{"677":1}}],["ステータス機能で",{"2":{"677":1}}],["ステータスコードを記載する",{"2":{"546":1}}],["ステータスコードを記載します",{"2":{"436":1}}],["ステータスコード",{"2":{"514":2}}],["ステータスコードは発生し得る全てのパターンを列挙する",{"2":{"464":1}}],["ステータスコードに応じたレスポンス",{"2":{"460":1}}],["ステータス",{"0":{"436":1},"1":{"437":1,"438":1,"439":1,"440":1,"441":1},"2":{"430":1}}],["ステージ",{"0":{"183":1},"2":{"502":1}}],["ステージング環境は日次など定期的なci",{"2":{"59":1}}],["ステージング環境",{"2":{"59":1}}],["ステップ数",{"2":{"113":1,"190":1,"254":1}}],["スカッシュ",{"2":{"100":1}}],["スカッシュマージはこのケースでは選択できない",{"2":{"65":1}}],["スカッシュマージ",{"0":{"103":1},"2":{"64":1,"66":5,"67":1,"100":1}}],["スラッシュとする",{"2":{"74":1}}],["スペース",{"0":{"555":1,"606":1},"2":{"37":1,"555":1,"606":1}}],["スケジュールタイプのルールの場合は",{"2":{"31":1}}],["数百万件レベル",{"2":{"584":1,"635":1}}],["数値または整数値",{"2":{"470":1,"538":1}}],["数値文字列のstringをintに変換するには",{"2":{"249":1,"312":1}}],["数値文字列のstringをintegerに変換するには",{"2":{"248":1,"311":1}}],["数値文字列のlist",{"2":{"169":2,"242":2,"305":2}}],["数値の比較は精度に気をつける",{"2":{"148":1,"225":1,"289":1}}],["数値",{"0":{"148":1,"225":1,"289":1},"2":{"136":1,"213":1,"277":1,"469":2,"537":2}}],["数値を先頭にしない",{"2":{"13":1}}],["数行",{"2":{"126":1,"203":1,"267":1}}],["数カ月後に大型リリースを行いたい場合がある",{"2":{"61":1}}],["数字の構文は使用せずに",{"2":{"574":1,"575":1,"623":1,"624":1}}],["数字部分に新しい体系を作らない",{"2":{"402":1}}],["数字",{"2":{"31":1,"37":1}}],["呼ばれたメンバーには",{"2":{"666":1}}],["呼び出しで発生しうる全ての",{"2":{"546":1}}],["呼び出しの",{"2":{"524":1}}],["呼び出し元によって動的な値を返したい場合があり",{"2":{"476":1,"531":1}}],["呼び出しとしては次のようなフローとする",{"2":{"474":1,"529":1}}],["呼び出し",{"2":{"367":1,"368":1}}],["呼び出したいジョブ名",{"2":{"29":1}}],["呼び出し用であることが明確になるように命名する",{"2":{"29":1}}],["呼ぶが",{"2":{"4":1}}],["毎に分離することもあるため",{"2":{"29":1}}],["設備コード",{"2":{"324":1}}],["設備有効開始の取り込みを行う",{"2":{"318":1}}],["設備有効開始受信",{"0":{"318":1},"1":{"319":1,"320":1,"321":1,"322":1,"323":1,"324":1,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1,"332":1,"333":1,"334":1}}],["設計上のポイント",{"0":{"528":1},"1":{"529":1,"530":1,"531":1,"532":1,"533":1,"534":1,"535":1,"536":1,"537":1,"538":1,"539":1,"540":1,"541":1,"542":1,"543":1,"544":1}}],["設計などに必要な型桁情報を渡すのに有用であるため",{"2":{"466":1,"534":1}}],["設計標準に利用するステータスコードなどは記載しています",{"2":{"444":1}}],["設計標準",{"0":{"434":1},"1":{"435":1,"436":1,"437":1,"438":1,"439":1,"440":1,"441":1,"442":1,"443":1},"2":{"493":1}}],["設計ドキュメントの陳腐化を防ぐのに有効だと思われる",{"2":{"405":1}}],["設計ドキュメントのファイル形式に制約は無いという前提に立つため",{"2":{"405":1}}],["設計ドキュメントが開発以外の観点から求められない場合において",{"2":{"405":1}}],["設計ドキュメントを精緻に管理していく優先度より",{"2":{"405":1}}],["設計ドキュメントを管理する",{"2":{"399":1}}],["設計ドキュメントは様々な前提条件",{"2":{"405":1}}],["設計書へのリンクを記載しても良い",{"2":{"506":1}}],["設計書",{"0":{"398":1,"401":1,"413":1},"2":{"397":1}}],["設計者確認待ち",{"2":{"166":1,"239":1,"302":1}}],["設計やコーディングにおいて",{"2":{"111":1,"188":1,"252":1}}],["設計によっては",{"2":{"29":1}}],["設定された日時で予約を指定する",{"2":{"350":1}}],["設定値",{"2":{"94":1}}],["設定値の変更はパラメータグループを適用している全ての",{"2":{"26":1}}],["設定ファイル",{"0":{"93":1},"1":{"94":1,"95":1,"96":1,"97":1}}],["設定可能なタグ値を指定する",{"2":{"40":1}}],["known",{"2":{"456":1,"546":1}}],["kamoku",{"2":{"556":1,"607":1}}],["kana",{"2":{"416":2}}],["kazurof",{"2":{"111":1,"188":1,"252":1}}],["kirk",{"2":{"167":1,"240":1,"303":1}}],["kind",{"2":{"146":4,"223":4,"287":4}}],["kinesis",{"0":{"29":1}}],["k",{"2":{"126":1,"203":1,"267":1}}],["keywordsに",{"2":{"658":1}}],["key1",{"2":{"579":1,"628":1}}],["key1\\t\\t=\\t",{"2":{"578":3,"627":3}}],["key2\\t\\t=\\t",{"2":{"578":3,"627":3}}],["key",{"2":{"38":1,"159":5,"576":1,"625":1}}],["kebab",{"2":{"12":1}}],["ロゴ画像を取得する",{"2":{"457":1}}],["ログイン情報が不正の場合はアカウントが存在しても404を返すことがあります",{"2":{"462":1}}],["ログインのバックエンドで発生",{"2":{"430":1}}],["ログイン画面で発生",{"2":{"430":2}}],["ログイン済み判定",{"2":{"366":1}}],["ログイン済みである場合",{"2":{"364":1}}],["ログイン状態",{"2":{"366":1,"373":1}}],["ログインモーダル起動",{"2":{"364":1}}],["ログインへの導線",{"2":{"363":1}}],["ログイン中のトレーニーのスケジュールを表示",{"2":{"350":1}}],["ログインする",{"0":{"340":1},"2":{"337":1}}],["ログイン処理周りでのエラー",{"2":{"429":1}}],["ログイン処理",{"2":{"336":1}}],["ログインや会員登録導線を提供する",{"2":{"336":1}}],["ログイン",{"0":{"335":1,"368":1},"1":{"336":1,"337":1,"338":1,"339":1,"340":1,"341":1},"2":{"364":2,"366":1,"392":1}}],["ログを保管するバケットの命名規約",{"2":{"28":1}}],["ロジック中に",{"2":{"167":1,"240":1,"303":1}}],["ロジックに誤りがあった場合",{"2":{"118":1,"195":1,"259":1}}],["ロジックの簡潔さや",{"2":{"114":1,"191":1,"255":1}}],["ロジックが読みやすく",{"2":{"113":1,"190":1,"254":1}}],["ローマ字でも漢字でもサジェストされる状態にすることでユーザビリティの向上が期待できるため",{"2":{"657":1}}],["ローマ字及び漢字",{"2":{"657":1}}],["ローマ字の短縮は",{"2":{"553":1,"604":1}}],["ローカル開発では",{"2":{"455":1}}],["ローカル開発で用いる環境を指定する",{"2":{"453":1}}],["ローカル変数は",{"2":{"140":1,"217":1,"281":1}}],["ローカル変数は安易に再利用しない",{"2":{"140":1,"217":1,"281":1}}],["ローカル変数は利用する直前で宣言する",{"2":{"140":1,"217":1,"281":1}}],["ローカル変数とインスタンス変数を使いわける",{"2":{"136":1,"213":1,"277":1}}],["ローカル変数で事足りるものをインスタンス変数として利用するなど",{"2":{"136":1,"213":1,"277":1}}],["ローカル変数",{"0":{"126":1,"140":1,"203":1,"217":1,"267":1,"281":1}}],["ローカル側",{"2":{"66":1}}],["ローカルでのgit操作",{"0":{"78":1},"1":{"79":1,"80":1}}],["ローカルで",{"2":{"65":1}}],["ローカルの双方で速やかにfeatureブランチを削除させるため",{"2":{"66":1}}],["ローカルの状態が最新でない場合",{"2":{"65":1}}],["ローカルのリモート追跡ブランチの",{"2":{"65":1}}],["ローカル環境",{"2":{"4":1}}],["ロールを付与する",{"2":{"86":2}}],["ロールを誰が使うのかを明確にすることを主目的とする",{"2":{"35":1}}],["ロールと等しくなるため",{"2":{"36":1}}],["ロールの命名では細かい権限を表現することは避け",{"2":{"35":1}}],["ロールに複数の",{"2":{"35":1}}],["ロールは",{"2":{"35":1}}],["ロールで付与することを想定している",{"2":{"33":1}}],["ロール",{"0":{"35":1},"2":{"26":2,"32":1}}],["隣接するピリオドとダッシュは使用できない",{"2":{"28":1}}],["連絡先情報",{"2":{"449":1,"498":1}}],["連携件数確認",{"2":{"328":1}}],["連携タイミング",{"2":{"323":1,"326":1}}],["連携方式",{"2":{"323":1,"326":1}}],["連携",{"2":{"321":1,"322":1}}],["連携先に桁数変更の旨を調整するなどの考慮を行う",{"2":{"470":1,"538":1}}],["連携先定義",{"0":{"326":1}}],["連携先",{"2":{"319":1}}],["連携元またはifの処理内容の修正と再実行",{"2":{"334":1}}],["連携元から提供されているデータ形式が想定外",{"2":{"334":1}}],["連携元定義",{"0":{"323":1},"1":{"324":1,"325":1}}],["連携元",{"2":{"319":1}}],["連続するピリオド",{"2":{"28":1}}],["連番とする",{"2":{"402":1}}],["連番",{"2":{"27":1}}],["埋めする",{"2":{"27":1}}],["埋めしない",{"2":{"27":1}}],["テスター",{"2":{"433":1}}],["テストケースごとにデータファイルを作成して",{"2":{"543":1}}],["テストツールとして",{"2":{"543":1}}],["テスト",{"2":{"490":1}}],["テストなどの検証作業を行う必要がある",{"2":{"65":1}}],["テストという単語は汎用的であるため複数の環境にあてはまる",{"2":{"4":1}}],["テーマは",{"2":{"408":1}}],["テーブルの順序は",{"2":{"578":1,"627":1}}],["テーブルのエイリアス名は同",{"2":{"553":1,"604":1}}],["テーブルのエイリアスは必ず付与すること",{"2":{"553":1,"604":1}}],["テーブル単位にまとめて順番に記述する",{"2":{"578":1,"627":1}}],["テーブル1",{"2":{"556":1,"557":1,"558":1,"559":1,"560":1,"607":1,"608":1,"609":1,"610":1,"611":1}}],["テーブル定義書",{"0":{"411":1}}],["テーブル定義",{"2":{"407":1}}],["テーブル一覧",{"0":{"394":1}}],["テーブル名に対応する論理名を入れる場合",{"2":{"556":1,"607":1}}],["テーブル名",{"2":{"27":1}}],["テーブル名は含めなくても良いため",{"2":{"27":1}}],["テキストでの情報提供が難しい場合",{"2":{"679":1}}],["テキストで共有することを推奨する",{"2":{"679":1}}],["テキストスニペット利用時は",{"2":{"679":1}}],["テキストスニペットを使えば1投稿あたりのデフォルト表示域を制限できる",{"2":{"679":1}}],["テキストスニペットの推奨",{"0":{"679":1}}],["テキストコミュニケーションは",{"2":{"663":1}}],["テキストベースにおける設計書の注意点",{"0":{"406":1}}],["テキストベース",{"2":{"405":1}}],["テキストブロックのインデントにスペース文字とタブ文字を混在させない",{"2":{"160":1}}],["テキストブロックのインデントは開始引用符",{"2":{"160":1}}],["テキストブロックの開始引用符",{"2":{"160":1}}],["テキストブロックをローカル変数やフィールドへ代入してから使用することを推奨する",{"2":{"160":1}}],["テキストブロックで定義する文字列のインデントは基本的に周辺の",{"2":{"160":1}}],["テキストブロックで定義した文字列を処理する場合は",{"2":{"160":1}}],["テキストブロックです",{"2":{"160":9}}],["テキストブロックでは単一の二重引用符",{"2":{"160":1}}],["テキストブロック内では基本的に改行コードのエスケープシーケンス",{"2":{"160":1}}],["テキストブロックは使用せず文字列リテラルを使用する",{"2":{"160":1}}],["テキストブロック",{"0":{"160":1}}],["テンプレートとしての利用を想定する",{"2":{"405":1}}],["テンプレートの例を以下にあげる",{"2":{"97":1}}],["テンプレート",{"0":{"97":1}}],["大きく分けて以下の",{"2":{"474":1,"529":1}}],["大きな注文に時間限定サービスがあるのか",{"2":{"166":1,"239":1,"302":1}}],["大きな注文ではディスカウントがつきものだというビジネスルールがあるのだろうか",{"2":{"166":1,"239":1,"302":1}}],["大量件数",{"2":{"584":1,"635":1}}],["大量に処理する場合など",{"2":{"175":1,"250":1,"313":1}}],["大量の処理が見込まれる場合は考慮が必要です",{"2":{"169":1,"242":1,"305":1}}],["大変難易度の高い作業だが",{"2":{"115":1,"192":1,"256":1}}],["大型機能の準備を行う必要がある",{"2":{"61":1}}],["大文字を使用する",{"2":{"551":1}}],["大文字",{"2":{"31":1,"120":1,"197":1,"261":1}}],["大文字と小文字が区別される",{"2":{"27":1}}],["大阪",{"2":{"8":1}}],["8休",{"2":{"677":1}}],["8qapxaaaqqabamgbaydaaedag",{"2":{"544":1}}],["8601",{"2":{"465":2}}],["864",{"2":{"170":1,"243":1,"306":1}}],["8259",{"2":{"323":1,"326":1}}],["822",{"2":{"169":1,"242":1,"305":1}}],["88",{"2":{"169":1,"242":1,"305":1}}],["8001",{"2":{"453":1,"502":1}}],["8000",{"2":{"82":2}}],["80",{"2":{"30":1,"453":3,"550":1,"601":1}}],["8",{"2":{"27":1,"37":1,"75":2,"168":1,"173":1,"174":1,"241":1,"246":1,"247":1,"304":1,"309":1,"310":1,"323":1,"324":1,"326":1,"480":1,"486":1,"554":1,"605":1}}],["すみかっこ",{"2":{"678":1}}],["すでにインターネットに公開されているslack利用ガイドラインや記事等も参照させていただいた",{"2":{"683":1}}],["すでに登録済みのユーザーidを用いている",{"2":{"464":1}}],["すでにログイン中と判断し",{"2":{"366":1}}],["すでに予約済みの時間がわかるようにする",{"2":{"349":1}}],["すべて大文字",{"2":{"125":1,"127":1,"202":1,"204":1,"266":1,"268":1}}],["すべての変更をステージする",{"2":{"183":1}}],["すべての機能開発や不具合修正に",{"2":{"50":1}}],["すべてのリソースタイプに一貫して適用する",{"2":{"37":1}}],["すべての名前は",{"2":{"27":1}}],["すべての",{"2":{"26":1}}],["する必要がある",{"2":{"115":1,"192":1,"256":1}}],["する",{"2":{"3":1,"13":1,"327":1}}],["つに対応しています",{"2":{"490":1}}],["つとする",{"2":{"486":1}}],["つだけ指定して表現する",{"2":{"472":1,"540":1}}],["つだけ生成されますが",{"2":{"169":1,"242":1,"305":1}}],["つ以上続く二重引用符",{"2":{"160":1}}],["つ以上のステートメントを記述しない",{"2":{"130":1,"207":1,"271":1}}],["つ",{"2":{"156":1,"231":1,"295":1}}],["つまり定数",{"2":{"129":1,"206":1,"270":1}}],["つまり",{"2":{"118":2,"195":2,"259":2}}],["つであれば単体テストが行いやすくなる",{"2":{"118":1,"195":1,"259":1}}],["つの操作を定義します",{"2":{"462":1}}],["つの変数宣言",{"2":{"136":1,"213":1,"277":1}}],["つのステートメントには",{"2":{"136":1,"213":1,"277":1}}],["つの役割にする",{"2":{"134":1,"211":1,"275":1}}],["つのキューに対し",{"2":{"30":1}}],["つの",{"2":{"26":2,"30":2}}],["つ続けて使用したりすることはできません",{"2":{"26":1}}],["字目は文字である必要があります",{"2":{"26":1}}],["60",{"2":{"487":1}}],["600",{"2":{"465":1}}],["6",{"2":{"111":1,"170":1,"173":1,"174":1,"188":1,"243":1,"246":1,"247":1,"252":1,"306":1,"309":1,"310":1,"474":2,"529":2,"544":3,"676":1}}],["63",{"2":{"26":1,"28":1}}],["64",{"2":{"24":1,"25":1,"31":1,"465":1}}],["タブは半角スペース",{"2":{"486":1}}],["タイプが異なる場合",{"2":{"572":1,"621":1}}],["タイプを指定する",{"2":{"458":1}}],["タイプを指定します",{"2":{"457":1}}],["タイトル",{"2":{"465":1,"667":1,"679":1}}],["タイトルや本文を自動生成する",{"2":{"75":1}}],["タイマー",{"2":{"407":1}}],["タグオブジェクトとして定義されていないタグが指定されている",{"2":{"504":1}}],["タグオブジェクトとして事前定義したタグの中から選択する",{"2":{"504":1}}],["タグごとに",{"2":{"459":1}}],["タグを用いて",{"2":{"459":1}}],["タグをリスト表示した場合に視認性を上げることができる",{"2":{"74":1}}],["タグ",{"2":{"166":1,"239":1,"302":1}}],["タグメッセージの規則",{"0":{"75":1}}],["タグ規則",{"0":{"72":1},"1":{"73":1,"74":1,"75":1,"76":1}}],["タグポリシーを適用するリソースタイプを指定",{"2":{"40":1}}],["タグポリシーにより実現できることは以下",{"2":{"40":1}}],["タグポリシー",{"0":{"40":1}}],["タグポリシーで値を設定する",{"2":{"39":1}}],["タグ値の元となる命名規約に従う",{"2":{"39":1}}],["タグ値",{"0":{"39":1}}],["タグ値を利用した",{"2":{"38":1}}],["タグ値は最長",{"2":{"37":1}}],["タグと平仄を合わせるため",{"2":{"38":1}}],["タグキーの大文字小文字の組み合わせを強制する",{"2":{"40":1}}],["タグキー",{"0":{"38":1}}],["タグキーは最長",{"2":{"37":1}}],["タグキーは一意でなければならない",{"2":{"37":1}}],["タグは",{"2":{"37":1}}],["タグ付けのベストプラクティスは以下である",{"2":{"37":1}}],["タグに",{"2":{"37":1}}],["タグの運用ルール",{"0":{"73":1}}],["タグの標準化を促進するタグポリシーの設定が可能となる",{"2":{"40":1}}],["タグのキーと値では大文字と小文字が区別されます",{"2":{"37":1}}],["タグの命名規則",{"0":{"74":1},"2":{"73":1}}],["タグの命名",{"0":{"37":1},"1":{"38":1,"39":1,"40":1}}],["タスク定義の命名規約",{"2":{"22":1}}],["タスク定義",{"2":{"22":1}}],["ターゲットグループ名をユニークにし",{"2":{"21":1}}],["0ガイドのpaths",{"2":{"507":1}}],["0ポイント以上",{"2":{"465":1}}],["09",{"2":{"407":1,"490":1}}],["08",{"2":{"407":1,"490":4}}],["081",{"2":{"169":1,"242":1,"305":1}}],["07",{"2":{"407":1,"433":1,"469":2,"490":1,"537":2}}],["077",{"2":{"249":1,"312":1}}],["06",{"2":{"407":1,"433":1,"490":1}}],["060",{"2":{"249":1,"312":1}}],["05+09",{"2":{"465":1}}],["05",{"2":{"407":1,"433":1}}],["059",{"2":{"173":1,"246":1,"309":1}}],["04",{"2":{"407":1,"433":1,"447":1,"465":5,"570":2,"620":2}}],["0件の場合は",{"2":{"388":2}}],["0件の場合は何もしない",{"2":{"352":2}}],["03",{"2":{"325":2,"400":1,"401":1,"407":1,"433":1,"452":1,"490":1,"501":1}}],["00など",{"2":{"676":1}}],["004",{"2":{"544":3}}],["003",{"2":{"544":4}}],["002",{"2":{"457":1,"544":3}}],["001",{"2":{"447":1,"462":2,"505":1,"506":2,"544":3}}],["005",{"2":{"366":1,"373":1}}],["00",{"2":{"166":1,"239":1,"302":1,"323":2,"326":2,"465":1,"676":1}}],["0001",{"2":{"465":1}}],["000z",{"2":{"447":1,"465":2}}],["00000053",{"2":{"325":1}}],["00000052",{"2":{"324":1,"325":1}}],["00001",{"2":{"324":1}}],["000",{"2":{"147":1,"169":1,"172":1,"173":1,"174":1,"224":1,"242":1,"245":1,"246":1,"247":1,"249":1,"288":1,"305":1,"308":1,"309":1,"310":1,"312":1}}],["02t15",{"2":{"465":1}}],["026",{"2":{"169":1,"242":1,"305":1}}],["02",{"2":{"27":1,"400":1,"401":1,"407":2,"433":1,"465":1,"490":2}}],["01t11",{"2":{"447":1,"465":2}}],["0123",{"2":{"487":1}}],["012",{"2":{"376":1}}],["016",{"2":{"172":1,"245":1,"308":1}}],["01",{"2":{"26":1,"27":1,"325":1,"400":1,"401":1,"407":2,"433":1,"473":1,"541":1}}],["0",{"2":{"22":2,"27":2,"73":3,"74":8,"75":13,"76":4,"89":3,"129":1,"130":4,"134":1,"136":2,"137":1,"140":2,"146":4,"148":3,"166":1,"168":1,"169":2,"170":4,"172":9,"173":3,"174":19,"175":8,"206":1,"207":4,"211":1,"213":2,"214":1,"217":2,"223":4,"225":3,"239":1,"241":1,"242":2,"243":4,"245":9,"246":3,"247":19,"250":8,"270":1,"271":4,"275":1,"277":2,"278":1,"281":2,"287":4,"289":3,"302":1,"304":1,"305":2,"306":4,"308":9,"309":3,"310":19,"313":8,"323":1,"326":1,"402":2,"413":1,"433":3,"438":1,"444":2,"447":5,"448":1,"452":3,"463":3,"465":3,"471":2,"473":4,"490":20,"491":5,"493":2,"497":4,"501":3,"523":2,"524":1,"537":2,"539":4,"541":4,"544":6,"581":1,"632":1}}],["英数字とハイフンが利用可能",{"2":{"21":1}}],["lsuds向けのweb",{"2":{"453":1}}],["lsuds",{"2":{"444":1,"493":1,"546":1}}],["lf",{"2":{"323":1,"326":1,"480":1}}],["ldc",{"2":{"173":2,"246":2,"309":2}}],["level",{"2":{"432":1}}],["length",{"2":{"130":2,"140":2,"146":4,"207":2,"217":2,"223":4,"271":2,"281":2,"287":4,"324":1}}],["lease",{"2":{"65":2,"79":1}}],["lt",{"2":{"85":2,"130":6,"207":6,"271":6,"376":1,"573":1,"581":1,"622":1,"632":1}}],["l",{"2":{"74":1,"151":3,"152":3}}],["listはng",{"2":{"465":1}}],["listにはarraylistのようなrandomaccessを",{"2":{"174":1,"247":1,"310":1}}],["list3",{"2":{"158":1,"233":1}}],["list2",{"2":{"156":2,"158":1,"231":2,"233":1,"295":2}}],["list1",{"2":{"156":2,"158":1,"231":2,"233":1,"295":2}}],["listクラスの要素をソートする際は",{"2":{"153":1,"228":1,"292":1}}],["listのソートはlist",{"2":{"153":1,"228":1,"292":1}}],["list等への置き換えをすること",{"2":{"137":1,"214":1,"278":1}}],["list",{"0":{"174":1,"247":1,"310":1},"2":{"129":2,"134":4,"137":5,"146":1,"153":7,"156":9,"158":3,"169":8,"172":8,"174":9,"206":2,"211":4,"214":5,"223":1,"228":7,"231":9,"233":3,"242":8,"245":8,"247":9,"270":2,"275":2,"278":3,"287":1,"292":3,"295":9,"305":8,"308":8,"310":9,"465":2,"544":2}}],["link",{"2":{"544":1}}],["links",{"0":{"523":1},"2":{"512":1,"523":2,"527":1}}],["linkedlist拡張",{"2":{"174":1,"247":1,"310":1}}],["linkedlistforeach",{"2":{"174":1,"247":1,"310":1}}],["linkedlistfor",{"2":{"174":1,"247":1,"310":1}}],["linkedlistのようなランダムアクセスをサポートしていない",{"2":{"174":1,"247":1,"310":1}}],["lineの処理",{"2":{"140":2,"217":2,"281":2}}],["line",{"2":{"140":3,"217":3,"281":3,"480":1}}],["lines",{"2":{"140":4,"217":4,"281":4}}],["linear",{"0":{"106":1},"2":{"88":2,"104":1}}],["lintエラーの修正",{"2":{"46":1}}],["limit",{"0":{"618":1},"2":{"85":1,"468":1,"517":2,"536":1,"544":1,"618":2}}],["lightweight",{"2":{"73":1}}],["lite",{"2":{"58":1,"59":1}}],["lipstick",{"2":{"45":1}}],["license",{"0":{"41":1,"176":1,"251":1,"314":1,"481":1,"545":1,"595":1,"644":1,"646":1},"2":{"449":1,"498":1}}],["layout",{"2":{"472":1,"540":1}}],["layers",{"2":{"25":1}}],["layer",{"0":{"25":1}}],["large",{"2":{"444":1,"474":1,"493":1,"514":2,"521":1,"529":1,"546":1}}],["last",{"2":{"416":2}}],["lang",{"2":{"132":1,"173":11,"209":1,"246":11,"273":1,"309":11}}],["langパッケージはインポートしない",{"2":{"132":1,"209":1,"273":1}}],["language",{"2":{"111":1,"151":1,"152":1,"188":1,"252":1}}],["latest",{"2":{"37":1,"317":1,"481":1,"545":1}}],["lambda",{"0":{"23":1,"24":1,"25":1},"1":{"24":1,"25":1},"2":{"24":1,"25":1,"31":1,"35":1,"474":1,"529":1}}],["lombok",{"2":{"159":1}}],["longへの変換の場合はlong",{"2":{"249":1,"312":1}}],["long",{"0":{"248":1,"249":1,"311":1,"312":1},"2":{"138":2,"215":2,"248":2,"279":2,"311":2,"465":1}}],["logo",{"2":{"457":1}}],["login",{"2":{"340":1}}],["log",{"2":{"73":1,"130":1,"163":2,"180":1,"207":1,"236":2,"271":1,"299":2}}],["logs",{"2":{"28":2}}],["loading",{"2":{"474":1,"529":1}}],["load",{"2":{"21":1}}],["localhost",{"2":{"453":2,"502":2}}],["localcalendar",{"2":{"151":6,"152":6}}],["localdate",{"2":{"151":2,"152":2}}],["localも追加すると良い",{"2":{"95":1}}],["localがついたファイルはクレデンシャルなどの機微な情報を扱うファイルとして定着しているため",{"2":{"95":1}}],["localといった",{"2":{"95":1}}],["local",{"0":{"158":1,"233":1},"2":{"1":1,"4":2,"95":1,"158":1,"233":1,"453":1,"502":1}}],["lb",{"0":{"21":1},"2":{"21":3}}],["が大量に発行されると",{"2":{"587":1,"637":1}}],["が存在した場合",{"2":{"570":1,"620":1}}],["が存在するが",{"2":{"19":1}}],["が利用可能だが",{"2":{"543":1}}],["が利用するのかを識別することを目的とする",{"2":{"33":1}}],["が対応していない",{"2":{"523":1}}],["が定めるヘッダ類は",{"2":{"532":1}}],["が定めるヘッダー類は",{"2":{"477":1}}],["が定義される場合に",{"2":{"512":1}}],["が提供するlinterの定義としては",{"2":{"507":1}}],["が提供する機能の概要",{"2":{"451":1,"500":1}}],["が非推奨であることの宣言",{"2":{"503":1}}],["が複数ある場合は各ステージ分の情報を記載する",{"2":{"502":1}}],["が複数の対象があり区別したいときに利用する",{"2":{"2":1}}],["がどのような値を返すか",{"2":{"476":1,"531":1}}],["が考えられる",{"2":{"464":1}}],["が要求を受け入れる際の",{"2":{"458":1}}],["が応答する際の",{"2":{"457":1}}],["が必須であるため",{"2":{"454":1}}],["が必要な場合はパターンマッチングを使用する",{"2":{"145":1}}],["が必要になる",{"2":{"65":1}}],["が",{"2":{"364":1,"464":1}}],["が作成されます",{"2":{"173":1,"246":1,"309":1}}],["が作成される",{"2":{"109":1}}],["がある",{"2":{"664":1}}],["があるため",{"2":{"465":1}}],["があるのでれば",{"2":{"462":1}}],["がある場合",{"2":{"166":1,"239":1,"302":1}}],["があがることになる",{"2":{"118":1,"195":1,"259":1}}],["がありますので",{"2":{"444":1}}],["があり",{"2":{"69":1}}],["が高まる",{"2":{"118":1,"195":1,"259":1}}],["が選択できないようにする",{"2":{"88":1}}],["が使用可能",{"2":{"31":1}}],["ショップで購入のたびにマネージャーに通知を送るといった",{"2":{"524":1}}],["シーケンスオブジェクト",{"2":{"328":1}}],["シーケンスの取得",{"2":{"328":1}}],["シーケンシャルアクセス",{"2":{"174":1,"247":1,"310":1}}],["システム障害等",{"2":{"676":1}}],["システム障害時などの緊急時は電話連絡とし",{"2":{"676":1}}],["システム障害時など",{"2":{"671":1}}],["システム障害対応など優先度の高い問い合わせのために",{"2":{"671":1}}],["システムエラー",{"2":{"437":1}}],["システム間の連携について定義と",{"2":{"417":1}}],["システム構成図",{"0":{"408":1}}],["システム開発で必要なアプリケーション開発",{"2":{"404":1}}],["システムi",{"2":{"402":2}}],["システム",{"2":{"319":1,"328":14,"417":1,"421":8}}],["システム依存記号",{"2":{"147":1,"224":1,"288":1}}],["システム名やサービス名",{"2":{"450":1,"499":1}}],["システム名",{"2":{"38":1}}],["システムが利用する",{"2":{"33":2}}],["システム上は一意である必要はない",{"2":{"19":1}}],["シンプルにするため",{"2":{"662":1}}],["シンプルな命名にする",{"2":{"459":1,"526":1}}],["シンプルな要点をまとめた注釈であった",{"2":{"166":1,"239":1,"302":1}}],["シングルリージョン構成または",{"2":{"8":1}}],["シンガポール",{"2":{"8":1}}],["どうしても敬称を付けて欲しい場合",{"2":{"662":1}}],["どんなメニューでトレーニングしたかを管理できる",{"2":{"396":1}}],["どこかソースコード中か別な文書にコメントされていない限り",{"2":{"166":1,"239":1,"302":1}}],["どこのゾーンかを識別するため",{"2":{"18":1}}],["どちらのケースも",{"2":{"475":1,"530":1}}],["どちらかといえば",{"2":{"117":1,"194":1,"258":1}}],["どちらかといえばラベルとprのタイトルが重要",{"2":{"70":1}}],["どちらも同じファイルの修正を含む",{"2":{"69":1}}],["どちら",{"2":{"21":1}}],["どのツールがどのバージョンに対応しているかは",{"2":{"490":1}}],["どのような異常系があるかは有用な場合が多いからである",{"2":{"546":1}}],["どのようなプロトコル",{"2":{"417":1}}],["どのような処理を行うかを規定する",{"2":{"29":1}}],["どのチームがどれくらい利用したかをトレースするために設定",{"2":{"38":1}}],["どのジョブを利用するかが重要であるため",{"2":{"29":1}}],["どの",{"2":{"14":1}}],["だけ記載する",{"2":{"458":1}}],["だけの使用であれば",{"2":{"16":1}}],["だけではなく",{"2":{"16":1}}],["キーワード検索で見つけにくくなるため",{"2":{"679":1}}],["キーワード検索で見つけやすくするため",{"2":{"665":1}}],["キーワードをリソース名に含めることは非推奨とする",{"2":{"16":1}}],["キー自体を含めない",{"2":{"513":1}}],["キー",{"2":{"456":1}}],["キャメルケースの書式は",{"2":{"507":1}}],["キャパシティサイジング",{"2":{"407":1}}],["キャッチアップ",{"2":{"407":1}}],["キャッシュ",{"2":{"6":1}}],["キャンセルの場合は閉じる",{"2":{"375":1}}],["キャストによって型が明確に判断できます",{"2":{"158":1,"233":1}}],["キャスト",{"2":{"145":1}}],["キューの場合には",{"2":{"30":1}}],["キューとメッセージの識別子",{"2":{"30":1}}],["サムネイルやアイコン画像など",{"2":{"475":1,"530":1}}],["サムネイルなど限定されたユースケースの場合に向く",{"2":{"474":1,"529":1}}],["サムネイル画像",{"2":{"366":1}}],["サイドバー",{"2":{"179":1}}],["サイドバーの",{"2":{"177":1}}],["サイズのみ不変で",{"2":{"153":1,"228":1}}],["サブクエリになる",{"2":{"576":1,"625":1}}],["サブパッケージ名の重複は可能",{"2":{"121":1,"198":1,"262":1}}],["サブネット",{"2":{"26":1}}],["サンプル説明",{"0":{"544":1}}],["サンプルapiはシステムにおけるユーザーのアカウント",{"2":{"447":1}}],["サンプルapi",{"2":{"447":1}}],["サンプル設計書を参考にする",{"2":{"409":1}}],["サンプル",{"0":{"325":1}}],["サンプルコードをそのまま適用した結果",{"2":{"116":1,"193":1,"257":1}}],["サンプルコードを活用すること自体は",{"2":{"116":1,"193":1,"257":1}}],["サンプルコードは",{"2":{"116":1,"193":1,"257":1}}],["サンプルコードの間違いを気づかないまま適用してしまうこともある",{"2":{"116":1,"193":1,"257":1}}],["サンプルコードだけを鵜呑みにして",{"2":{"116":1,"193":1,"257":1}}],["サンプルを鵜呑みにしない",{"0":{"116":1,"193":1,"257":1},"2":{"113":1,"190":1,"254":1}}],["サフィックスを付与する考えもある",{"2":{"16":1}}],["サードパーティ向けに広く開発する",{"2":{"546":1}}],["サービス概要",{"2":{"396":1}}],["サービスコンセプト",{"0":{"396":1}}],["サービスに権限を付与する目的で利用する",{"2":{"35":1}}],["サービスに権限付与する場合は",{"2":{"33":1}}],["サービスによって異なる命名規約と例を記載する",{"2":{"17":1}}],["サービス",{"2":{"22":1,"65":1}}],["サービス別の命名規約",{"0":{"17":1},"1":{"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1}}],["サービスのロゴ画像をpng形式で取得します",{"2":{"457":1}}],["サービスのリリース時に",{"2":{"452":1,"501":1}}],["サービスのリソースを見ているか自明である",{"2":{"14":1}}],["サービスの命名規約",{"2":{"22":1}}],["サービスの何で利用されているかを示す場合には利用することがある",{"2":{"14":1}}],["サービス名を含めている",{"2":{"18":2}}],["サービス名を含めない",{"0":{"14":1},"2":{"14":1}}],["サービス名などの単位で区切りを明確にできる",{"2":{"12":1}}],["サービス名自体にパスカルケースを用いることは許容する",{"2":{"12":1}}],["サービスではリソース名にハイフンを許容する",{"2":{"12":1}}],["サーバへの接続情報",{"2":{"495":1}}],["サーバ側が指定されたコールバック",{"2":{"524":1}}],["サーバ側",{"2":{"476":1,"531":1}}],["サーバサイドが当初よりリクエストのバリデーションを緩めた場合に",{"2":{"465":1}}],["サーバサイドで区分値を追加した場合には",{"2":{"465":1}}],["サーバサイドのコード生成やモック時の利用に用い",{"2":{"546":1}}],["サーバサイドの内部的な予期せぬエラー",{"2":{"464":1}}],["サーバサイドのマイクロサービス同士の通信で",{"2":{"455":1}}],["サーバに",{"2":{"6":1}}],["サーバ",{"2":{"6":1,"465":1}}],["サーバとしての役割",{"2":{"6":1}}],["ganbatte",{"2":{"663":1}}],["gather",{"2":{"24":2}}],["gateway",{"0":{"19":1},"2":{"18":2,"19":2,"474":1,"476":1,"529":1,"531":1}}],["go",{"2":{"459":1,"462":1,"476":1,"526":1,"531":1,"546":1}}],["googlejavastyle",{"2":{"111":1,"188":1,"252":1}}],["google",{"2":{"16":1,"111":2,"188":2,"252":2,"649":1,"656":1,"681":4}}],["gym",{"2":{"347":1,"381":1}}],["ghi",{"2":{"160":2}}],["guest",{"2":{"433":1}}],["guiでのgit操作にあたり",{"2":{"178":1}}],["guide",{"2":{"160":1}}],["guidelines",{"2":{"111":2,"158":1,"160":1,"188":2,"233":1,"252":2,"683":2}}],["guardian",{"2":{"97":1}}],["gen",{"2":{"544":5}}],["gender",{"2":{"416":1,"471":1,"539":4}}],["generatorを使用する場合は",{"2":{"509":1,"510":1}}],["generate",{"2":{"75":1}}],["general",{"0":{"85":1},"2":{"85":1,"652":1}}],["getusers",{"2":{"507":1}}],["getuser",{"2":{"462":3}}],["getuseraccount",{"2":{"447":1}}],["getlogoimage",{"2":{"457":1}}],["getでの処理をすべて禁止することはできませんが",{"2":{"174":1,"247":1,"310":1}}],["getなどインデックスを利用するような操作のパフォーマンスが低いので注意してください",{"2":{"174":1,"247":1,"310":1}}],["getid",{"2":{"159":1}}],["getpets",{"2":{"544":1}}],["getpetspetid",{"2":{"544":2}}],["getparenid",{"2":{"159":1}}],["getprotocol",{"2":{"147":2,"224":2,"288":2}}],["getrole",{"2":{"157":1,"232":1,"296":1}}],["getdata",{"2":{"158":1,"233":1}}],["getdayofweek",{"2":{"151":2,"152":2}}],["getdept",{"2":{"157":1,"232":1,"296":1}}],["getdivision",{"2":{"157":1,"232":1,"296":1}}],["getstr",{"2":{"156":6,"231":6,"295":6}}],["getmax",{"2":{"154":2,"229":2,"293":2}}],["getnumberinstance",{"2":{"147":1,"224":1,"288":1}}],["getname",{"2":{"123":3,"145":1,"200":3,"222":1,"264":3,"286":1}}],["getclass",{"2":{"145":1,"222":1,"286":1}}],["getter",{"2":{"138":2,"215":2,"279":2}}],["get",{"0":{"438":1},"2":{"109":1,"110":1,"123":1,"158":1,"161":1,"162":1,"163":2,"172":3,"174":4,"200":1,"233":1,"234":1,"235":1,"236":2,"245":3,"247":4,"264":1,"297":1,"298":1,"299":2,"308":3,"310":4,"347":1,"352":2,"366":1,"373":2,"376":1,"381":1,"388":2,"435":1,"447":1,"456":1,"457":1,"458":1,"461":4,"462":2,"463":2,"464":1,"503":9,"504":4,"505":1,"506":1,"507":3,"508":4,"509":3,"517":1,"519":1,"521":1,"539":1,"544":10,"546":1}}],["globalフォルダにはwindows",{"2":{"95":1}}],["global",{"2":{"66":1,"82":12,"94":1}}],["gt",{"0":{"461":1,"462":2,"463":2,"464":2,"499":1,"500":1,"501":1,"504":3,"505":3,"506":3,"507":3,"508":3,"509":3,"510":3,"511":3,"513":1,"514":1,"515":1,"520":1,"521":1,"522":1,"523":1,"524":1},"1":{"516":1,"517":1,"518":1,"519":1},"2":{"61":1,"90":2,"130":4,"151":2,"152":2,"160":1,"179":2,"180":1,"181":2,"182":3,"183":7,"207":4,"271":4,"474":2,"529":2,"573":1,"581":1,"622":1,"632":1,"658":2,"676":1}}],["gitflowなど",{"2":{"407":1}}],["gitに関する様々な機能を提供する拡張機能",{"2":{"178":1}}],["gitにはタグ機能があり",{"2":{"72":1}}],["gitlensにもコミットグラフはありますが",{"2":{"178":1}}],["gitlens",{"2":{"178":1}}],["gitlabを利用するの手順",{"0":{"104":1},"1":{"105":1,"106":1,"107":1}}],["gitlabでは",{"2":{"97":1}}],["gitlabではプロジェクト設定で",{"2":{"66":1}}],["gitlab推奨設定",{"0":{"92":1}}],["gitlabの推奨設定をまとめる",{"2":{"81":1}}],["gitlab",{"2":{"48":1,"58":5,"59":2,"65":1,"66":1,"97":1,"100":1,"404":1,"656":1}}],["gitブランチフロー規約",{"0":{"98":1},"2":{"98":1}}],["gitで管理したくないファイル名のルールを定義する",{"2":{"95":1}}],["gitignoreファイルも入れる",{"2":{"95":1}}],["gitignore",{"0":{"95":1},"2":{"96":2}}],["gitリポジトリ上の改行コードは統一した方が余計な差分が生じず扱いやすくなる",{"2":{"94":1}}],["gitリポジトリを新規作成するとデフォルトで作成されるブランチ",{"2":{"52":1}}],["gitattributes",{"2":{"94":4}}],["gitattribute",{"0":{"94":1}}],["gitワークフロー",{"2":{"82":1}}],["gitやgithubb",{"2":{"81":1}}],["gitコマンド",{"0":{"79":1}}],["gitクライアントによっては",{"2":{"74":1}}],["gitのコミットメッセージをルール化する方ことにより",{"2":{"70":1}}],["gitのコミットメッセージは原則自由とする",{"2":{"70":1}}],["gitのコミットメッセージにの書式についてルール化することで",{"2":{"42":1}}],["gitの利用開始前に決めチームで統制を図ることが重要である",{"2":{"64":1}}],["git",{"0":{"82":1,"83":1,"179":1,"181":2,"182":2,"183":3,"184":1,"185":1,"186":1,"187":1},"2":{"58":1,"65":6,"66":1,"73":2,"74":1,"75":4,"79":7,"82":14,"83":1,"85":1,"94":1,"96":1,"101":1,"102":1,"103":1,"105":4,"109":5,"110":5,"178":1,"180":2,"404":1,"406":1,"452":1,"501":1}}],["githubにおける",{"2":{"105":1,"107":2}}],["githubを利用する場合",{"2":{"100":1}}],["githubを利用中の場合",{"2":{"75":1}}],["githubやgitlabでは",{"2":{"97":1}}],["githubの場合",{"0":{"100":1},"1":{"101":1,"102":1,"103":1}}],["githubの",{"2":{"92":1}}],["github推奨設定",{"0":{"84":1},"1":{"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1}}],["github利用時の規則に合わせて次のように作成する",{"2":{"75":1}}],["githubなどの画面経由でタグを作成する",{"2":{"73":1}}],["githubでは",{"2":{"66":2,"97":1}}],["githubではfile",{"2":{"65":2}}],["githubではconversationタブで確認",{"2":{"65":1}}],["github投稿したレビューコメントが履歴として何かしらのページで取得できるかどうか",{"2":{"65":1}}],["github",{"0":{"90":1},"2":{"48":1,"53":1,"57":1,"58":1,"65":1,"66":1,"77":2,"90":1,"96":1,"97":5,"100":1,"111":1,"188":1,"252":1,"404":1,"463":1,"527":2,"656":1}}],["gitmojiについては任意の要素となり",{"2":{"45":1}}],["gitmoji",{"0":{"45":1}}],["gitmojiの最大3つの要素から構成され",{"2":{"42":1}}],["gitmoji>",{"2":{"42":1}}],["grid",{"2":{"649":1}}],["graph",{"2":{"178":1,"180":2}}],["grandtotal",{"2":{"166":3,"239":3,"302":3}}],["green",{"2":{"21":3,"45":1}}],["group",{"0":{"575":1,"624":1},"2":{"2":1,"18":1,"21":1,"36":1,"566":1,"575":1,"616":1,"624":1}}],["gcp",{"2":{"16":1}}],["に従い",{"2":{"680":1}}],["に従う",{"2":{"73":1}}],["に従う必要がある",{"2":{"20":1}}],["に拡張子をつける",{"2":{"679":1}}],["にすればよいのではないか",{"2":{"677":1}}],["にする",{"2":{"123":4,"130":1,"136":1,"200":4,"207":1,"213":1,"264":4,"271":1,"277":1}}],["に付けるか",{"2":{"667":1}}],["に相談する",{"2":{"585":1,"590":1,"592":1,"641":1}}],["に相当する書き込み先を提供し",{"2":{"474":1,"529":1}}],["にインデックスがある場合",{"2":{"581":1,"632":1}}],["にファイルパスを指定する",{"2":{"543":1}}],["に存在した",{"2":{"537":1}}],["にて",{"2":{"657":1}}],["にて記述する",{"2":{"556":1,"607":1}}],["にて参考情報となる",{"2":{"527":1}}],["にてコスト配分タグの設定が必要",{"2":{"38":1}}],["においてはクラスに相当する",{"2":{"526":1}}],["においてはパッケージ",{"2":{"526":1}}],["において認証が全く存在しないケースは考えにくいため",{"2":{"525":1}}],["における共通の定義",{"2":{"495":1}}],["における",{"2":{"476":2,"531":2,"546":1}}],["におけるファイルアップロードのよく利用される実装手段は",{"2":{"474":1,"529":1}}],["に共通で適用されるセキュリティ設定を定義する",{"2":{"525":1}}],["に切り出して定義し",{"2":{"514":1}}],["に複数の型を定義しない",{"2":{"513":1}}],["に定義する必要はない",{"2":{"512":1}}],["に定義する",{"2":{"512":1}}],["に指定する必要がある",{"2":{"510":1}}],["にステータスコード等の標準を記載しているため",{"2":{"493":1}}],["にあるように",{"2":{"480":1,"523":1}}],["に対応する代替サーバ",{"2":{"503":1}}],["に対応していることを明記し開発者に周知できるメリットより",{"2":{"477":1,"532":1}}],["に対して行っていくが",{"2":{"63":1}}],["に埋め込んで渡しても良い",{"2":{"475":1,"530":1}}],["にエンコードして",{"2":{"475":1,"530":1}}],["にエスケープを使用する必要がありません",{"2":{"160":1}}],["に固定する",{"2":{"463":1}}],["に紐づく",{"2":{"462":1}}],["に書き換える",{"2":{"366":1}}],["に変換するといった作業が不要",{"2":{"474":1,"529":1}}],["に変換する分",{"2":{"474":1,"529":1}}],["に変わる",{"2":{"364":1}}],["に変更が反映される",{"2":{"26":1}}],["にチェックを入れると",{"2":{"182":1}}],["に前述のコードと置き換えたためコメント化した",{"2":{"167":1,"240":1,"303":1}}],["に合わせる必要はない",{"2":{"160":1}}],["に与えられた配列インスタンスにも影響します",{"2":{"153":1,"228":1}}],["にでき",{"2":{"151":1}}],["にならないように制御すること",{"2":{"145":1,"222":1,"286":1}}],["に記載した",{"2":{"544":1}}],["に記載された順番に記載する",{"2":{"447":1}}],["に記載する",{"2":{"97":1,"462":1}}],["に記載があるように",{"2":{"77":1}}],["に追記したくない",{"2":{"96":1}}],["にdevelop",{"2":{"88":1}}],["に上げる",{"2":{"76":2}}],["にマージされる",{"2":{"56":1}}],["に基づく",{"2":{"45":1}}],["によって",{"2":{"167":1,"240":1,"303":1}}],["によって処理され",{"2":{"167":1,"240":1,"303":1}}],["によっては",{"2":{"159":1}}],["によって生産性が評価されたのは",{"2":{"113":1,"190":1,"254":1}}],["によるエスケープを無効にできます",{"2":{"630":1}}],["によるエスケープは利用しない",{"2":{"630":1}}],["による表現を行う",{"2":{"533":1}}],["によるループで記述するのが無難です",{"2":{"174":1,"247":1,"310":1}}],["によるループ",{"2":{"174":3,"247":3,"310":3}}],["によるインポート",{"2":{"132":1,"209":1,"273":1}}],["による変更の取り込みを行う場合",{"2":{"66":1}}],["による方法を推奨する",{"2":{"65":1,"66":1}}],["によると以下の制約である",{"2":{"24":1,"26":1,"27":1,"28":1,"29":1,"30":1}}],["によれば",{"2":{"37":1}}],["によれば以下の制約である",{"2":{"37":1}}],["にアクセスするグループといった使い方を想定している",{"2":{"34":1}}],["につき",{"2":{"504":1}}],["についてはパフォーマンスの観点からも禁止とする",{"2":{"576":1,"625":1}}],["については",{"2":{"415":1,"474":1,"529":1}}],["についてはよく用いる",{"2":{"4":1}}],["につけない理由は次である",{"2":{"33":1}}],["に",{"2":{"31":1,"137":1,"214":1,"278":1,"457":1,"513":1}}],["にまで設定変更が反映されるリスクを避けるため",{"2":{"26":1}}],["に所属しているかをわかるようにする",{"2":{"21":1}}],["に関する追加の文書",{"2":{"503":1}}],["に関するメタデータ",{"2":{"495":1}}],["に関するメタデータを記載する",{"2":{"449":1,"498":1}}],["に関しては",{"2":{"21":1}}],["に関わるリソースの命名について記載する",{"2":{"18":1,"32":1}}],["には適合しない場合もあるのでご留意いただきたい",{"2":{"493":1}}],["には対応していないのでご注意ください",{"2":{"490":1}}],["にはサービス名を指定する",{"2":{"484":1}}],["には開発環境",{"2":{"453":1}}],["にはマッチしない可能性があります",{"2":{"444":1}}],["には",{"2":{"21":1,"29":1,"544":1,"570":1,"620":1}}],["には複数の機能種別",{"2":{"19":1}}],["にタグを付ける",{"2":{"21":1}}],["に配置するかを意識させないため",{"2":{"20":1}}],["に則る",{"2":{"19":1}}],["にリソース名を繰り返さないという記載があり",{"2":{"14":1}}],["+p",{"2":{"480":1}}],["+アイコン",{"2":{"183":2}}],["+演算子を利用したほうがパフォーマンスが高いこともあるということを理解してください",{"2":{"173":1,"246":1,"309":1}}],["+演算子を利用した場合コンパイル時に最適化され",{"2":{"173":1,"246":1,"309":1}}],["+演算子",{"2":{"172":2,"173":2,"245":2,"246":2,"308":2,"309":2}}],["+演算子で処理することはアンチパターンとして知られています",{"2":{"172":1,"245":1,"308":1}}],["++",{"2":{"130":2,"207":2,"271":2}}],["+=",{"2":{"129":1,"130":2,"146":1,"147":1,"172":2,"206":1,"207":2,"223":1,"224":1,"245":2,"270":1,"271":2,"287":1,"288":1,"308":2}}],["+属性名",{"2":{"123":3,"200":3,"264":3}}],["+オブジェクト名",{"2":{"123":1,"200":1,"264":1}}],["+1",{"2":{"45":1}}],["+",{"2":{"13":1,"24":1,"25":1,"27":1,"29":1,"37":1,"89":2,"130":4,"147":5,"151":2,"154":8,"156":2,"160":2,"173":1,"207":4,"224":5,"229":8,"231":2,"246":1,"271":4,"293":8,"295":2,"309":1,"423":1,"443":3,"450":1,"480":3,"499":1,"569":1,"571":3,"619":1}}],["9j2wbdaa",{"2":{"544":1}}],["9a",{"2":{"447":1,"463":2,"465":1}}],["900",{"2":{"170":1,"243":1,"306":1}}],["949",{"2":{"169":1,"242":1,"305":1}}],["9403",{"2":{"53":1}}],["95",{"2":{"166":1,"239":1,"302":1}}],["9",{"2":{"13":1,"22":2,"24":1,"25":1,"27":1,"29":1,"30":1,"75":2,"89":3,"167":1,"169":1,"170":2,"173":1,"240":1,"242":1,"243":2,"246":1,"303":1,"305":1,"306":2,"309":1,"402":2,"443":3,"471":2,"473":2,"539":3,"541":2}}],["zzzマスタ",{"2":{"421":1,"425":1}}],["zipcode",{"2":{"416":1}}],["zeroと比較しても同じことができますが",{"2":{"175":1,"250":1,"313":1}}],["zero",{"0":{"175":1,"250":1,"313":1},"2":{"136":1,"139":2,"146":1,"175":2,"213":1,"216":2,"223":1,"250":2,"277":1,"280":2,"287":1,"313":2}}],["zenn",{"2":{"97":1}}],["za",{"2":{"24":1,"25":1,"27":1,"29":1,"30":1,"443":3,"447":1,"463":2,"465":1}}],["z",{"2":{"22":3,"130":2,"207":2,"271":2,"447":1,"463":2,"465":1}}],["z0",{"2":{"13":1,"24":1,"25":1,"27":1,"29":1,"30":1,"443":3}}],["zones",{"2":{"1":1}}],["推奨する運用",{"2":{"681":1}}],["推奨する拡張機能",{"0":{"178":1}}],["推奨ケース",{"2":{"672":1}}],["推奨ツール",{"0":{"480":1}}],["推奨されない",{"2":{"129":1,"206":1,"270":1}}],["推奨値の5を設定する",{"2":{"85":1}}],["推奨設定",{"0":{"81":1},"1":{"82":1,"83":1,"84":1,"85":1,"86":1,"87":1,"88":1,"89":1,"90":1,"91":1,"92":1,"93":1,"94":1,"95":1,"96":1,"97":1}}],["推奨",{"2":{"13":1,"73":1,"75":1,"488":1}}],["一時表",{"2":{"587":1,"637":1}}],["一時表を利用して",{"2":{"587":1,"637":1}}],["一時変数の定義内容などを記述する",{"2":{"167":1,"240":1,"303":1}}],["一意制約違反エラー",{"2":{"439":1}}],["一意となるように命名する",{"2":{"19":1}}],["一覧表示する",{"2":{"379":1}}],["一緒に仕事をしている人",{"2":{"166":1,"239":1,"302":1}}],["一致",{"2":{"148":1,"225":1,"289":1}}],["一つの値を変数に代入するための",{"2":{"151":1}}],["一つの",{"2":{"143":1,"220":1,"284":1}}],["一度宣言したローカル変数を",{"2":{"140":1,"217":1,"281":1}}],["一度タグをつけた後は削除しない",{"2":{"73":1}}],["一般に",{"2":{"681":1}}],["一般に利用",{"2":{"111":1,"188":1,"252":1}}],["一般ユーザー視点での利活用を中心とする",{"2":{"648":1}}],["一般的である",{"2":{"507":1}}],["一般的なgitブランチ運用のプラクティスに従い",{"2":{"50":1}}],["一方で適当に行ってもコードの動作は変わらないため",{"2":{"115":1,"192":1,"256":1}}],["一方で",{"2":{"12":1,"96":1,"405":1}}],["一部更新",{"2":{"435":1}}],["一部のクライアント側のコード生成で",{"2":{"465":1}}],["一部のコード生成ツールにおいて",{"2":{"457":1}}],["一部のサービス",{"2":{"16":1}}],["一部のリージョンでのみ利用可能な機能は想定していない",{"2":{"1":1}}],["一部を抜粋",{"2":{"1":1}}],["なにか問題があれば",{"2":{"681":1}}],["なにも本を書く必要はなく",{"2":{"166":1,"239":1,"302":1}}],["な",{"2":{"444":1,"546":1}}],["なし",{"2":{"323":1,"326":1,"330":1,"332":1}}],["なぜこれが必要なのか",{"2":{"420":1}}],["なぜそうなのか",{"2":{"166":1,"239":1,"302":1}}],["なぜそうなのかを書く",{"2":{"166":1,"239":1,"302":1}}],["なぜなら",{"2":{"118":1,"195":1,"259":1}}],["なlistで",{"2":{"153":1,"228":1}}],["なるべく宛先を狭めるべきである",{"2":{"680":1}}],["なるべく利用を避けた方が無難である",{"2":{"671":1}}],["なるべく先頭に新規参画者が欲する情報を配備する",{"2":{"407":1}}],["なるべくアロー構文を使用することを推奨する",{"2":{"152":1}}],["なるべく早くリリースしたい",{"2":{"69":1}}],["な定数は作成しない",{"2":{"137":1,"214":1,"278":1}}],["なお",{"2":{"12":1,"181":1,"570":1,"620":1,"663":1,"666":1,"667":1,"668":1}}],["などと広すぎる場合は",{"2":{"675":1}}],["などといった形でユースケースに合わせて使い分ける",{"2":{"668":1}}],["など付けることで",{"2":{"663":1}}],["などにエンコードして",{"2":{"474":1,"529":1}}],["など書き込み時のスキーマが厳密であったとしても",{"2":{"465":1}}],["などリクエストボディが無い操作では無視される",{"2":{"458":1}}],["などインクリメントしていく",{"2":{"452":1}}],["など領域ごとにプレフィックスを付与する形式を取る",{"2":{"74":1}}],["などはタグキーとして設定できなくなる",{"2":{"40":1}}],["などで別の環境にアクセスする際に混乱が生じる",{"2":{"33":1}}],["などをするときはバージョンを上げることを検討する",{"2":{"442":1}}],["などを組み合わせたマルチクラウド運用を行っている",{"2":{"16":1}}],["などを指定する",{"2":{"2":1}}],["など",{"2":{"7":1,"29":1,"40":1,"51":1,"147":1,"224":1,"288":1,"469":1,"470":1,"476":1,"502":1,"531":1,"537":1,"538":1,"553":1,"604":1}}],["などの型桁はできる限り細かく指定する",{"2":{"465":1}}],["などの条件について",{"2":{"463":1}}],["などの条件式で",{"2":{"130":1,"207":1,"271":1}}],["などのローカル開発への向き先変更は",{"2":{"453":1}}],["などの命名を代わりに検討する",{"2":{"443":1}}],["などのインターフェースを利用することで",{"2":{"153":1,"228":1,"292":1}}],["などの機密情報や秘匿性の高い情報をタグに設定しない",{"2":{"37":1}}],["などの種類があるが",{"2":{"21":1}}],["などの",{"2":{"6":1,"74":1}}],["などの名前をつけて互いに完全に分離",{"2":{"3":1}}],["など識別したい値を指定する",{"2":{"2":1}}],["パラレルヒント句は",{"2":{"590":1}}],["パラレルヒント句",{"0":{"590":1}}],["パラメータにデフォルト値がある場合はdefault",{"2":{"468":1,"536":1}}],["パラメータ不正",{"2":{"447":1,"464":2}}],["パラメータのバリデーションをどこまで厳密に定義すべきかという議論はしばしば行われる",{"2":{"534":1}}],["パラメータのキー自体を含めないこと",{"2":{"533":1}}],["パラメータの命名",{"0":{"443":1}}],["パラメータの受け渡し",{"2":{"409":1}}],["パラメータあり",{"2":{"170":2,"243":2,"306":2}}],["パラメータ",{"2":{"159":2}}],["パラメータグループは",{"2":{"26":1}}],["パーティションキーの",{"2":{"583":1,"634":1}}],["パーソナルトレーニー",{"2":{"396":1}}],["パーソナルトレーナーを身近なものにして",{"2":{"396":1}}],["パーソナルトレーナーを検索する",{"2":{"343":1}}],["パーソナルトレーナー情報を表示",{"2":{"385":1}}],["パーソナルトレーナーが提供するトレーニング一覧を表示する",{"2":{"385":1}}],["パーソナルトレーナーの再検索を指定可能とする",{"2":{"378":1}}],["パーソナルトレーナーの一覧表示",{"2":{"378":1}}],["パーソナルトレーナーの検索への導線",{"2":{"363":1,"370":1}}],["パーソナルトレーナー検索モーダル起動",{"2":{"364":1,"371":1}}],["パイプ",{"2":{"489":1}}],["パイパスを許容しない",{"2":{"88":1}}],["パワーポイントなどのファイル形式で作成することが多い",{"2":{"405":1}}],["パネル内でコミットメッセージを入力し",{"2":{"183":1}}],["パネル",{"2":{"180":1,"181":1,"182":1,"183":3}}],["パフォーマンス性",{"0":{"580":1,"631":1},"1":{"581":1,"582":1,"583":1,"584":1,"585":1,"586":1,"587":1,"588":1,"589":1,"590":1,"591":1,"592":1,"593":1,"594":1,"632":1,"633":1,"634":1,"635":1,"636":1,"637":1,"638":1,"639":1,"640":1,"641":1,"642":1,"643":1}}],["パフォーマンスは",{"2":{"168":1,"241":1,"304":1}}],["パフォーマンスを考慮した",{"2":{"168":1,"241":1,"304":1}}],["パフォーマンス",{"0":{"168":1,"241":1,"304":1},"1":{"169":1,"170":1,"171":1,"172":1,"173":1,"174":1,"175":1,"242":1,"243":1,"244":1,"245":1,"246":1,"247":1,"248":1,"249":1,"250":1,"305":1,"306":1,"307":1,"308":1,"309":1,"310":1,"311":1,"312":1,"313":1},"2":{"169":1,"242":1,"305":1}}],["パフォーマンスについても記載しているので参考にしてください",{"2":{"147":1,"154":1,"156":1,"224":1,"229":1,"231":1,"288":1,"293":1,"295":1}}],["パフォーマンスや可読性の低下やの大きな要因となる上",{"2":{"136":1,"213":1,"277":1}}],["パッケージ名は意味のある名前にする",{"2":{"121":1,"198":1,"262":1}}],["パッケージ名はすべて小文字にする",{"2":{"121":1,"198":1,"262":1}}],["パッケージ",{"0":{"121":1,"198":1,"262":1},"2":{"144":1,"221":1,"285":1}}],["パターンについて説明する",{"2":{"36":1}}],["パターンを用いる場合は次のようにサフィックスに追加して区別する",{"2":{"24":1}}],["パスワードポリシー",{"2":{"648":1}}],["パスワード管理アプリなどの利用を推奨する",{"2":{"33":1}}],["パスパラメータ",{"0":{"516":1},"2":{"515":1}}],["パスが複数の単語からなる場合",{"2":{"503":1}}],["パスの組み合わせをキャメルケースで表現する",{"2":{"507":1}}],["パスの全てで",{"2":{"454":1}}],["パスの追加ごとにマイナーバージョンをインクリメントしていく",{"2":{"501":1}}],["パスの追加ごとに",{"2":{"452":1}}],["パスキー検索系",{"2":{"438":1}}],["パスカルケース",{"2":{"12":1,"38":1}}],["パブリックサブネット",{"2":{"10":1}}],["パブリックサブネットを区別したい場合はリソース名にアクセス修飾子を付与する",{"2":{"10":1}}],["パブリックサブネットの場合インターネットに直接アクセスできる",{"2":{"10":1}}],["できれば1",{"2":{"675":1}}],["できる限り利用しない",{"2":{"487":1}}],["できる限り詳しく指定する",{"2":{"466":1,"534":1}}],["できる限り具体的な値にする",{"2":{"465":1}}],["できるだけローカル変数を利用する",{"2":{"136":1,"213":1,"277":1}}],["できるかぎりシンプルなモデルを選択し",{"2":{"58":1}}],["で最終判断するため",{"2":{"593":1,"642":1}}],["でコメントアウトする",{"2":{"570":1,"620":1}}],["でコメントを囲った箱を書く習慣があった",{"2":{"166":1,"239":1,"302":1}}],["で保存する",{"2":{"554":1,"605":1}}],["で使い分けていたり",{"2":{"546":1}}],["で個別に設定は行わない",{"2":{"511":1}}],["で参照する",{"2":{"510":1}}],["で始まる文字列",{"2":{"487":1}}],["で現在編集中の",{"2":{"480":1}}],["でもペイロード制限があるため",{"2":{"474":1,"529":1}}],["で代用できる場合は利用しない",{"2":{"470":1,"538":1}}],["で入力が隠される",{"2":{"469":1,"537":1}}],["でエンコードされた文字列",{"2":{"469":1,"537":1}}],["でサーバのモックとして動かす場合に返される値になるため",{"2":{"465":1}}],["でサポートされるデータ型と命名規則",{"2":{"27":1}}],["でクライアントがレスポンスを検証すると動作しなくなるため",{"2":{"465":1}}],["で項目を全て指定する",{"2":{"465":1}}],["でまとめて指定させる",{"2":{"464":1}}],["であり",{"2":{"681":1}}],["であるため",{"2":{"463":1}}],["であれば",{"2":{"457":1,"458":1}}],["で物理名を記載します",{"2":{"463":1}}],["でグルーピングした順番に記載する",{"2":{"461":1}}],["で指定する",{"2":{"459":1,"526":1}}],["で未認証を受け入れる場合は記載しない",{"2":{"456":1}}],["で用いるられるtraceparent",{"2":{"477":1,"532":1}}],["で用いるリクエストボディに対しては",{"2":{"463":1}}],["で用いる",{"2":{"453":1}}],["で対象リソースが存在しないエラー",{"2":{"438":1}}],["で結果",{"2":{"438":1}}],["で記載する",{"2":{"459":1,"462":1,"463":1,"465":1}}],["で記載すること",{"2":{"413":1}}],["で記載済みであれば",{"2":{"416":1}}],["で行う",{"2":{"556":1,"607":1}}],["で行うことが大半であり",{"2":{"476":1,"531":1}}],["で行えないため",{"2":{"411":1}}],["で行われることが多い",{"2":{"117":1,"194":1,"258":1}}],["で作成する",{"2":{"408":1}}],["で作成すること",{"2":{"408":1}}],["でgit管理するという思想を採用する",{"2":{"405":1}}],["で管理され",{"2":{"404":1}}],["で管理している",{"2":{"394":1}}],["で遅いということはないので",{"2":{"174":1,"247":1,"310":1}}],["で処理しようとすると以下のようになります",{"2":{"173":1,"246":1,"309":1}}],["で処理する場合",{"2":{"169":1,"242":1,"305":1}}],["で終わる",{"2":{"167":2,"240":2,"303":2}}],["で開始され",{"2":{"167":3,"240":3,"303":3}}],["で生成したlistは",{"2":{"153":2,"228":2}}],["で追加されたラムダ式",{"2":{"170":1,"243":1,"306":1}}],["で追加された",{"2":{"169":1,"242":1,"305":1}}],["で追加されたメソッド",{"2":{"153":2,"228":2,"292":1}}],["で追加されたlist",{"2":{"153":1,"228":1,"292":1}}],["で整理されたわかりやすいメソッドを利用でき",{"2":{"153":1,"228":1,"292":1}}],["では利用不可である",{"2":{"543":1}}],["では区分値の再利用ができるため",{"2":{"539":1}}],["ではパッケージ名や",{"2":{"459":1}}],["では複数のホストを指定できない",{"2":{"453":1}}],["では",{"2":{"167":1,"240":1,"303":1,"456":1,"457":1,"537":1,"663":2,"667":1}}],["ではreset",{"2":{"161":1,"234":1,"297":1}}],["ではインスタンス生成時に指定された桁数での精度が保証される",{"2":{"148":1,"225":1,"289":1}}],["ではないメソッドから書き込まない",{"2":{"137":1,"214":1,"278":1}}],["ではない",{"2":{"137":1,"214":1,"278":1}}],["ではなくtoplainstring",{"2":{"148":1,"225":1,"289":1}}],["ではなく長さゼロの配列を戻すようにする",{"2":{"134":1,"211":1,"275":1}}],["ではなく",{"2":{"69":1,"82":1,"546":2,"571":1,"664":1}}],["で定義する",{"2":{"137":1,"214":1,"278":1}}],["で宣言するクラス変数とインスタンス変数は",{"2":{"137":1,"214":1,"278":1}}],["で宣言する",{"2":{"129":1,"206":1,"270":1}}],["でのフルネームを登録すること",{"2":{"657":1}}],["での",{"2":{"548":1,"599":1}}],["での記述は",{"2":{"169":1,"242":1,"305":1}}],["での検証結果を元にした内容です",{"2":{"168":1,"241":1,"304":1}}],["での対応を推奨する",{"2":{"94":1}}],["での利用を想定",{"2":{"2":1}}],["で表現できる文字",{"2":{"37":1}}],["で",{"2":{"34":1,"459":1,"474":1,"477":1,"490":1,"511":1,"526":1,"529":1,"532":1}}],["で共有し過ぎることにより意図しない",{"2":{"26":1}}],["で言語バージョンを指定する",{"2":{"25":1}}],["で区別すれば十分である",{"2":{"16":1}}],["で命名する",{"2":{"12":1,"36":1}}],["プレビュー表示を行わない操作がslack上で可能である",{"2":{"681":1}}],["プレビュー表示されるのは1枚目",{"2":{"681":1}}],["プレビューが可能",{"2":{"480":1}}],["プレミアム",{"2":{"447":1,"465":2}}],["プレミアムユーザー",{"2":{"433":1}}],["プレフィックス",{"2":{"321":1,"322":1}}],["プレフィックスの区切り文字は",{"2":{"74":1}}],["プレフィックスにすることで",{"2":{"74":1}}],["プレフィックスが無い",{"2":{"53":1}}],["プレフィックスは禁止",{"2":{"37":1}}],["プルを追記する",{"2":{"181":1}}],["プル",{"0":{"181":1}}],["プルリクエスト作成時のテンプレートを作ることができる",{"2":{"97":1}}],["プルリクエストを経由して",{"2":{"100":1}}],["プルリクエストを経由してfeatureブランチの修正内容をマージする",{"2":{"50":1}}],["プルリクエストを必須とする",{"2":{"88":1}}],["プルリクエスト",{"2":{"66":1}}],["プラス記号や改行コードのエスケープシーケンスのような無駄を排除でき",{"2":{"160":2}}],["プライベートチャンネルの投稿コメントを",{"2":{"682":1}}],["プライベートチャンネルの投稿に対する引用",{"0":{"682":1}}],["プライベートセグメント",{"2":{"455":1}}],["プライベートリポジトリ",{"2":{"84":1}}],["プライベートサブネット",{"2":{"10":1}}],["プリミティブ型とstring",{"2":{"147":1,"224":1,"288":1}}],["プリミティブ型もしくは",{"2":{"137":1,"214":1,"278":1}}],["プッシュ",{"0":{"183":1}}],["プッシュ前に",{"2":{"65":1}}],["プッシュに失敗する",{"2":{"65":2}}],["プッシュ先のリモートブランチに変更が入ったが",{"2":{"65":1}}],["プロフェッショナルとしてふさわしくない内容は登録しないこと",{"2":{"663":1}}],["プロフィールを更新",{"2":{"388":1}}],["プログラム設計書を参考にする",{"2":{"414":1}}],["プログラム設計書",{"0":{"414":1,"415":1},"1":{"416":1},"2":{"415":1}}],["プログラマにはアスタリスク",{"2":{"166":1,"239":1,"302":1}}],["プログラマに聞くと",{"2":{"115":1,"192":1,"256":1}}],["プロテクトブランチの機能などを利用するために必要",{"2":{"84":1}}],["プロキシが独自の証明書を持っている場合は",{"2":{"82":1}}],["プロキシ設定",{"2":{"82":1}}],["プロダクト種別",{"2":{"465":2}}],["プロダクト開発の効率とビジネスピードをより重視する場合もあり",{"2":{"405":1}}],["プロダクト名",{"2":{"27":1}}],["プロダクト名をそのまま利用しても問題ない",{"2":{"6":1}}],["プロダクション環境",{"2":{"59":1,"62":1}}],["プロダクション環境リリース前には",{"2":{"59":1}}],["プロダクション環境との同期",{"2":{"51":1}}],["プロデューサー",{"2":{"30":1}}],["プロジェクトでの利用の場合は",{"2":{"651":1}}],["プロジェクトで利用されているわけではなく",{"2":{"0":1,"49":1,"445":1,"493":1,"649":1}}],["プロジェクトが",{"2":{"404":1}}],["プロジェクトが解散すると管理主管が曖昧になる",{"2":{"15":1}}],["プロジェクトの設定で",{"2":{"92":1}}],["プロジェクトのコミット履歴の管理",{"2":{"64":1}}],["プロジェクトのフェーズや体制に応じて",{"2":{"58":1}}],["プロジェクトの粒度",{"2":{"15":1}}],["プロジェクト名の替わりにプロダクト名を含めることとする",{"2":{"15":1}}],["プロジェクト名を含めない",{"0":{"15":1}}],["プロジェクト制を取っている場合",{"2":{"15":1}}],["プロジェクト制でプロダクトを開発する際のプロジェクト名または",{"2":{"2":1}}],["プロジェクトコード",{"2":{"2":1}}],["プロジェクト",{"2":{"2":1}}],["ソースファイルのようにファイルの先頭にコメント行を入れると",{"2":{"556":1,"607":1}}],["ソースファイルと同じく",{"2":{"554":1,"605":1}}],["ソースコード",{"2":{"167":1,"240":1,"303":1}}],["ソースコード管理システムで管理されている",{"2":{"131":1,"208":1,"272":1}}],["ソースコード管理システム",{"2":{"131":1,"208":1,"272":1}}],["ソースのファイルヘッダにコピーライト標記は法的拘束力がないため",{"2":{"131":1,"208":1,"272":1}}],["ソースブランチがターゲットブランチより古い場合はリベースしないとマージできない",{"2":{"106":1}}],["ソースブランチの更新を提案してくれる",{"2":{"85":1}}],["ソフトウェアの外部的振る舞いを変更せずに内部構造を改善する作業",{"2":{"117":1,"194":1,"258":1}}],["ソフトウェアメンテナンスにおける",{"2":{"112":1,"189":1,"253":1}}],["ソフトウェア開発では複数の環境を用意し",{"2":{"3":1}}],["ソウル",{"2":{"8":1}}],["東京",{"2":{"8":1}}],["オンボーディングコストを抑えるため",{"2":{"407":1}}],["オーバーライドさせたくないメソッドはfinalを利用する",{"2":{"134":1,"211":1,"275":1}}],["オーバーライドされないメソッド",{"2":{"129":2,"206":2,"270":2}}],["オートボクシング",{"2":{"249":1,"312":1}}],["オートボクシングが利用できるため",{"2":{"249":1,"312":1}}],["オートボクシングを利用した場合",{"2":{"248":1,"311":1}}],["オートメーション",{"2":{"37":1,"38":1}}],["オートヒーリング構成をする場合にどこの",{"2":{"20":1}}],["オブジェクト名",{"2":{"552":1,"603":1}}],["オブジェクトのスキーマは",{"2":{"514":1}}],["オブジェクトの変換には",{"2":{"147":1,"224":1,"288":1}}],["オブジェクトとして定義を行い",{"2":{"510":1}}],["オブジェクトとして共通化",{"2":{"509":1,"510":1}}],["オブジェクトストレージの可用性",{"2":{"474":1,"529":1}}],["オブジェクトストレージの",{"2":{"474":1,"475":1,"529":1,"530":1}}],["オブジェクトには",{"2":{"449":1}}],["オブジェクト同士はequals",{"2":{"145":1,"222":1,"286":1}}],["オブジェクトで参照する",{"2":{"137":1,"214":1,"278":1}}],["オブジェクトを参照する際は",{"2":{"129":1,"206":1,"270":1}}],["オブジェクト指向の手法を利用する",{"2":{"146":1,"223":1,"287":1}}],["オブジェクト指向",{"2":{"111":1,"188":1,"252":1}}],["オブジェクト倶楽部",{"2":{"111":1,"188":1,"252":1}}],["オブジェクト倶楽部版",{"2":{"111":1,"188":1,"252":1}}],["オプションを",{"2":{"510":1}}],["オプションを選択してマージした場合",{"2":{"105":1}}],["オプションを有効にすることが該当",{"2":{"92":1}}],["オプションは必須である",{"2":{"79":1}}],["オレゴン",{"2":{"8":1}}],["オハイオ",{"2":{"8":1}}],["北カリフォルニア",{"2":{"8":1}}],["米国西部",{"2":{"8":2}}],["米国東部",{"2":{"8":2}}],["2名に宛先を絞り",{"2":{"675":1}}],["2xx",{"2":{"510":1}}],["23仕様変更管理番号",{"2":{"570":1,"620":1}}],["23",{"2":{"473":1,"541":1,"570":1,"620":1}}],["28z",{"2":{"469":1,"537":1}}],["2を用いる",{"2":{"485":1}}],["2を用い",{"2":{"411":1}}],["21t17",{"2":{"469":1,"537":1}}],["213min",{"2":{"175":1,"250":1,"313":1}}],["21",{"2":{"175":1,"250":1,"313":1,"469":1,"537":1}}],["26",{"2":{"173":1,"175":1,"246":1,"250":1,"309":1,"313":1,"452":1,"490":1,"501":1}}],["22",{"2":{"173":1,"246":1,"309":1,"490":1,"676":1}}],["29",{"2":{"172":1,"245":1,"308":1}}],["2つの方法が考えられる",{"2":{"108":1}}],["2つのチケット",{"2":{"69":1}}],["2の例を以下に図示する",{"2":{"69":1}}],["2のcherry",{"2":{"69":1}}],["2でコンフリクトが起こらないよう",{"2":{"62":1}}],["256",{"2":{"37":1}}],["255",{"2":{"22":2,"27":1}}],["24h型ジムでサービスを提供できる",{"2":{"396":1}}],["24",{"2":{"28":1}}],["204",{"2":{"441":1,"464":1,"546":1}}],["20160101",{"2":{"581":1,"632":1}}],["20151231",{"2":{"581":1,"632":1}}],["2011",{"2":{"490":1}}],["2014",{"2":{"490":2}}],["2017",{"2":{"490":2}}],["2018",{"2":{"490":1}}],["201",{"2":{"439":1,"464":2,"503":2}}],["2012",{"2":{"36":2,"490":1}}],["200",{"2":{"438":2,"440":1,"441":1,"447":1,"457":1,"464":2,"510":4,"521":1,"544":7,"546":1,"587":1,"637":1}}],["2004",{"2":{"111":1,"188":1,"252":1,"570":2,"620":2}}],["2020",{"2":{"490":1}}],["2021",{"2":{"490":1}}],["2023",{"2":{"447":1,"452":1,"465":4,"469":2,"474":2,"490":1,"501":1,"523":1,"529":2,"537":2,"544":2}}],["202",{"2":{"439":1,"440":1,"464":1}}],["2022",{"2":{"324":1,"325":2}}],["2024年7月に実施した調査結果では問題なかった",{"2":{"65":1}}],["20",{"2":{"27":1,"173":2,"174":1,"246":2,"247":1,"309":2,"310":1,"468":1,"490":1,"536":1,"544":3}}],["2",{"0":{"63":1,"66":1,"102":1,"106":1,"110":1,"340":1,"347":1,"353":1,"360":1,"367":1,"374":1,"382":1,"389":1},"2":{"8":3,"13":1,"26":1,"27":1,"36":1,"58":2,"66":1,"74":2,"130":1,"137":6,"146":3,"153":1,"167":2,"169":2,"172":1,"174":3,"207":1,"214":6,"223":3,"228":1,"240":2,"242":2,"245":1,"247":3,"271":1,"278":6,"287":3,"292":1,"303":2,"305":2,"308":1,"310":3,"328":1,"337":1,"344":1,"350":1,"357":2,"364":1,"371":1,"379":1,"386":1,"394":1,"402":1,"423":1,"433":1,"444":1,"447":3,"448":1,"463":1,"465":3,"471":2,"473":1,"480":1,"486":1,"490":8,"491":3,"493":1,"537":1,"539":3,"541":1,"544":1}}],["バイト配列",{"2":{"469":1,"537":1}}],["バイナリ",{"2":{"457":1,"469":1,"537":1}}],["バリデーション",{"0":{"534":1},"1":{"535":1,"536":1,"537":1,"538":1,"539":1,"540":1,"541":1}}],["バリデーションをどこまで厳密に定義すべきかという議論はよく行いがちである",{"2":{"466":1}}],["バリデーションについて",{"0":{"466":1},"1":{"467":1,"468":1,"469":1,"470":1,"471":1,"472":1,"473":1}}],["バリデーションエラー",{"2":{"437":1}}],["バリデーションロジックなどを定義する",{"2":{"409":1}}],["バックスラッシュ",{"2":{"630":2}}],["バックエンド",{"0":{"410":1},"1":{"411":1,"412":1,"413":1,"414":1,"415":1,"416":1,"417":1}}],["バックエンド系のコード",{"2":{"397":1,"407":1}}],["バックエンドで整合性を保っているのであれば",{"2":{"75":1}}],["バッチ設計書",{"2":{"407":1}}],["バッチ",{"0":{"414":1},"2":{"402":1,"415":1}}],["バッチ処理など",{"2":{"6":1}}],["バグにつながる恐れがある",{"2":{"142":1,"219":1,"283":1}}],["バグトラッキングシステムで管理している内容はソースコードにコメントで記載する必要はない",{"2":{"131":1,"208":1,"272":1}}],["バグfixやセキュリティアップデートを並行して行う",{"2":{"63":1}}],["バグの修正",{"2":{"43":1}}],["バージョンを上げることを考える",{"2":{"478":1}}],["バージョン管理",{"0":{"442":1}}],["バージョン",{"0":{"485":1},"2":{"131":2,"208":2,"272":2,"433":1}}],["バージョンアップ規則",{"0":{"76":1}}],["バージョン別にsupportブランチを作成する",{"2":{"63":1}}],["バージニア北部",{"2":{"8":1}}],["バケット",{"2":{"321":1,"322":1}}],["バケット名を",{"2":{"28":1}}],["バケット名では",{"2":{"28":1}}],["バケット名の各ラベルは",{"2":{"28":1}}],["バケットの命名要件",{"2":{"28":1}}],["body",{"2":{"463":9,"509":1}}],["boundary",{"2":{"408":3}}],["bool",{"2":{"487":1}}],["booleanutils",{"2":{"147":1,"224":1,"288":1}}],["boolean変数はtrue",{"2":{"125":1,"202":1,"266":1}}],["boolean変数を返すメソッド名はtrue",{"2":{"123":1,"200":1,"264":1}}],["boolean",{"2":{"123":3,"125":2,"130":1,"146":2,"147":1,"152":2,"200":3,"202":2,"207":1,"223":2,"224":1,"264":3,"266":2,"271":1,"287":2,"288":1,"443":1,"469":1,"537":1}}],["booking",{"2":{"376":2}}],["bookings",{"2":{"352":1,"373":1,"376":1}}],["blog",{"2":{"667":1}}],["blogs",{"2":{"474":1,"529":1}}],["blobdownload",{"2":{"514":1}}],["blobupload",{"2":{"514":1}}],["blob",{"2":{"463":1,"514":2,"527":1}}],["blocks",{"2":{"160":2}}],["blue",{"2":{"21":5}}],["b2",{"2":{"154":2,"158":1,"229":2,"233":1,"293":2}}],["b1",{"2":{"154":2,"158":1,"229":2,"233":1,"293":2}}],["bearerformat",{"2":{"522":1,"544":2}}],["bearer",{"2":{"522":4,"525":1,"544":8}}],["bean",{"2":{"131":1,"208":1,"272":1}}],["belgium",{"2":{"111":1,"188":1,"252":1}}],["before",{"2":{"88":5}}],["be",{"2":{"85":1,"88":1,"111":1,"188":1,"252":1}}],["best",{"2":{"37":2}}],["byを指定する",{"2":{"591":1,"640":1}}],["byte",{"2":{"469":1,"537":1}}],["bypassing",{"2":{"88":1}}],["by",{"0":{"574":1,"575":1,"623":1,"624":1},"2":{"66":2,"90":1,"92":1,"474":1,"529":1,"544":2,"557":1,"566":3,"568":1,"574":1,"575":1,"608":1,"616":3,"618":1,"623":1,"624":1,"651":1}}],["breedername",{"2":{"544":1}}],["breeder",{"2":{"544":3}}],["break",{"2":{"152":4,"223":6,"287":6}}],["break文またはyield文の挿入を忘れがちです",{"2":{"151":1,"152":1}}],["br",{"2":{"82":1}}],["branchを削除するため有効にする",{"2":{"85":1}}],["branchname>",{"2":{"79":1}}],["branch",{"0":{"182":1},"2":{"66":1,"82":1,"85":1,"88":1,"92":2,"109":1,"110":1,"182":4,"183":2}}],["branches",{"0":{"88":1},"2":{"66":1,"85":3,"88":2,"92":1,"183":1}}],["bridge",{"0":{"31":1}}],["b",{"2":{"65":2,"79":1,"130":2,"137":2,"139":2,"145":2,"146":2,"147":3,"148":4,"151":4,"153":4,"156":3,"158":3,"173":6,"207":2,"214":2,"216":2,"223":2,"224":3,"225":4,"228":4,"231":3,"233":3,"246":6,"271":2,"278":2,"280":2,"287":2,"288":3,"289":4,"292":4,"295":3,"309":6,"474":2,"529":2,"578":3,"627":3}}],["bundle",{"2":{"544":1}}],["builder",{"2":{"147":3,"224":3,"288":3}}],["building",{"2":{"45":1}}],["bulb",{"2":{"45":1}}],["bug",{"2":{"45":1}}],["bucket",{"0":{"28":1},"2":{"14":1}}],["binary",{"2":{"469":1,"514":3,"537":3}}],["birth",{"2":{"416":1,"544":3}}],["biz",{"2":{"340":1,"347":1,"373":2,"376":2,"381":1,"388":3}}],["bigdecimalをstring変換する際はtostring",{"2":{"148":1,"225":1,"289":1}}],["bigdecimal",{"0":{"175":1,"250":1,"313":1},"2":{"139":2,"145":3,"146":3,"148":9,"175":4,"216":2,"223":3,"225":9,"250":4,"280":2,"287":3,"289":9,"313":4}}],["bigquery",{"2":{"16":1}}],["billing",{"2":{"38":1}}],["bar",{"2":{"667":1}}],["badrequest",{"2":{"510":2,"514":2}}],["bad",{"2":{"437":2,"464":1,"510":2,"514":1,"630":1}}],["bat02",{"2":{"402":1}}],["bat01",{"0":{"419":1},"1":{"420":1,"421":1,"422":1,"423":1,"424":1,"425":1,"426":1,"427":1},"2":{"402":1}}],["bat",{"2":{"402":1}}],["batch",{"2":{"22":1,"402":1}}],["basic",{"2":{"544":1}}],["base64",{"2":{"469":1,"474":3,"475":1,"529":3,"530":1,"537":1}}],["basepath",{"0":{"454":1},"2":{"447":2,"454":3}}],["base",{"2":{"105":1}}],["based",{"2":{"85":1}}],["bashredocly",{"2":{"544":1}}],["bash",{"2":{"105":1,"109":1,"110":1}}],["bastion",{"2":{"18":1,"34":1,"35":1,"36":1}}],["backlog",{"2":{"53":1,"523":1}}],["backend",{"2":{"7":1,"74":1,"75":7,"397":1,"407":1,"429":1,"432":1}}],["balancer",{"2":{"21":1}}],["bff",{"2":{"7":1}}],["ディレクトリ構成",{"2":{"544":1}}],["ディスカウントされることは理解できる",{"2":{"166":1,"239":1,"302":1}}],["デメリット",{"2":{"474":3,"529":3}}],["デメリットがあり開発規模などで使い分けが想定されるため",{"2":{"36":1}}],["デバッグ時に一時的に無効化するときに使用する",{"2":{"167":1,"240":1,"303":1}}],["デバッグも難しくなるため",{"2":{"156":1,"231":1,"295":1}}],["デバッグのデメリットがほとんどなく",{"2":{"153":1,"228":1,"292":1}}],["デバイス名やセンサー名などの発生源の名前を持たせる",{"2":{"29":1}}],["デフォルトのアイコン利用は極力避け",{"2":{"656":1}}],["デフォルトチャンネル",{"0":{"652":1}}],["デフォルト無効",{"2":{"630":1}}],["デフォルト値を後から変更する",{"2":{"478":2}}],["デフォルト値",{"0":{"468":1,"536":1}}],["デフォルト",{"2":{"463":1}}],["デフォルトでコミットメッセージに",{"2":{"66":1}}],["デフォルトブランチ",{"2":{"58":1}}],["データ型によって",{"2":{"470":1,"538":1}}],["データモデル",{"2":{"407":1}}],["データ",{"2":{"400":1,"401":1}}],["データ種別",{"2":{"29":1}}],["データ授受で利用する場合の命名規約",{"2":{"28":1}}],["データは長く残り",{"2":{"27":1}}],["データベース",{"2":{"6":1}}],["デプロイフローをドキュメント化",{"2":{"46":1}}],["デプロイを行う場合は",{"2":{"21":1}}],["デプロイメント環境に対応するブランチを整理する",{"2":{"59":1}}],["デプロイメント環境",{"2":{"4":1}}],["フレームワークで実行する",{"2":{"556":1,"607":1}}],["フレームワーク",{"2":{"546":1}}],["フロー情報向けのツールである",{"2":{"668":1}}],["フロー",{"2":{"474":1,"529":1}}],["フローの",{"2":{"474":1,"529":1}}],["フロントエンド系のコード",{"2":{"397":1,"407":1}}],["フロントエンド側でチェックし",{"2":{"347":1}}],["フロントエンド",{"0":{"409":1},"2":{"75":1,"407":1}}],["フォルダを作成し",{"2":{"407":1}}],["フォルダ階層の推奨",{"0":{"407":1}}],["フォルダ階層",{"0":{"397":1,"400":1}}],["フォーマッタを導入している場合はフォーマッタに合わせます",{"2":{"159":1}}],["フォーマットを推奨する",{"2":{"465":2}}],["フォーマットエラー",{"2":{"334":1}}],["フォーマット",{"0":{"130":1,"207":1,"271":1,"469":1,"483":1,"537":1},"2":{"469":1,"537":1}}],["フォーマットはもちろん",{"2":{"114":1,"191":1,"255":1}}],["フェッチ後に以下のようなダイアログが表示される場合があるが",{"2":{"181":1}}],["フューチャー技術ブログ",{"2":{"178":1}}],["フューチャーアーキテクトには多様なプロジェクトが存在し",{"2":{"0":1,"49":1,"445":1,"493":1,"649":1}}],["ファクトリーによって型が明確に判断できます",{"2":{"158":1,"233":1}}],["ファイルが存在すること自体は知られて良い",{"2":{"681":1}}],["ファイルが存在しなかった場合",{"2":{"328":1}}],["ファイル共有をしたい場合",{"2":{"665":1}}],["ファイルbundle後",{"2":{"544":1}}],["ファイルは以下のように作成する",{"2":{"544":1}}],["ファイルはpandocを利用して作成しています",{"2":{"47":1,"98":1,"645":1}}],["ファイル分割例",{"2":{"544":2}}],["ファイル分割",{"0":{"542":1},"1":{"543":1,"544":1}}],["ファイル単位",{"0":{"479":1}}],["ファイル容量がごく小さい場合は",{"2":{"475":1,"530":1}}],["ファイルダウンロード",{"0":{"475":1,"530":1}}],["ファイルに紐づかせるキーや属性情報などを登録",{"2":{"474":1,"529":1}}],["ファイルに複数のクラスを記載するのは",{"2":{"143":1,"220":1,"284":1}}],["ファイルを",{"2":{"474":1,"529":1}}],["ファイルを送信する",{"2":{"474":1,"529":1}}],["ファイルを配備する",{"2":{"407":1}}],["ファイルのオーナー",{"2":{"681":1}}],["ファイルの共有に注意する",{"0":{"681":1}}],["ファイルの先頭にコメントを記述することは禁止とする",{"2":{"570":1,"620":1}}],["ファイルの先頭は必ずselect",{"2":{"556":1,"607":1}}],["ファイルの先頭への",{"2":{"131":1,"208":1,"272":1}}],["ファイルの文字コード",{"2":{"554":1,"605":1}}],["ファイルの肥大化による",{"2":{"542":1}}],["ファイルの最終行には空行を入れる",{"2":{"486":1}}],["ファイルの拡張子は",{"2":{"484":1}}],["ファイルのコンテンツを",{"2":{"474":1,"529":1}}],["ファイルアップロードと同様",{"2":{"475":1,"530":1}}],["ファイルアップロード",{"0":{"474":1,"529":1},"2":{"474":1,"529":1}}],["ファイルレイアウト",{"0":{"486":1},"2":{"472":1,"540":1}}],["ファイル定義を分けるようにする",{"2":{"455":1}}],["ファイル定義に則ったバリデーションを実施",{"2":{"327":1}}],["ファイルフォーマット規約に従う",{"2":{"494":1}}],["ファイルフォーマット規約に準じる",{"2":{"446":1}}],["ファイルフォーマット規約",{"0":{"482":1},"1":{"483":1,"484":1,"485":1,"486":1,"487":1,"488":1,"489":1}}],["ファイルフォーマット",{"0":{"446":1,"494":1}}],["ファイル連携処理",{"2":{"328":1}}],["ファイル種別",{"2":{"323":1,"326":1}}],["ファイル",{"2":{"323":2,"326":2,"469":1}}],["ファイル名",{"0":{"484":1},"2":{"321":1,"322":1,"679":1}}],["ファイル上部へ移動して対応するレコードコンポーネントの説明を探さなければなりません",{"2":{"159":1}}],["ファイル入出力を行う",{"2":{"6":1}}],["フィードバックが難しい場合や",{"2":{"674":1}}],["フィードバック付きでコメントを返すことが望ましい",{"2":{"674":1}}],["フィールドの型を変更する",{"2":{"478":2}}],["フィールドの直前に書く",{"2":{"167":1,"240":1,"303":1}}],["フィールドから除外される",{"2":{"465":1}}],["フィールド名",{"2":{"449":1,"495":1,"498":1,"503":1,"512":1}}],["フィールドstrの要素を取得",{"2":{"156":2,"231":2,"295":2}}],["フィールドstrの要素を取得して処理する",{"2":{"156":1,"231":1,"295":1}}],["フィールド",{"2":{"136":1,"137":1,"144":2,"213":1,"214":1,"221":2,"277":1,"278":1,"285":2}}],["フィーチャーフラグ",{"2":{"48":1}}],["フラグを併用する",{"2":{"65":1}}],["f定義+受信",{"2":{"407":1}}],["framework",{"2":{"546":1}}],["frenchbulldog",{"2":{"544":2}}],["friendly",{"2":{"544":5}}],["friday",{"2":{"151":6,"152":2}}],["fromat",{"2":{"465":1}}],["from",{"2":{"130":2,"160":4,"181":1,"182":1,"207":2,"271":2,"556":1,"557":1,"560":1,"566":2,"568":1,"569":1,"578":1,"586":3,"587":1,"607":1,"608":1,"611":1,"616":2,"618":1,"619":1,"627":1,"636":3,"637":1}}],["frontend",{"2":{"7":1,"22":1,"25":1,"74":6,"75":1,"397":1,"407":1,"429":1,"432":1}}],["found",{"2":{"438":1,"439":1,"440":1,"441":1,"544":1,"546":1}}],["foo7",{"2":{"408":2}}],["foo6",{"2":{"408":2}}],["foo5",{"2":{"408":2}}],["foo4",{"2":{"408":2}}],["foo3",{"2":{"408":2}}],["foo2",{"2":{"408":2}}],["foo1",{"2":{"408":2}}],["foolist",{"2":{"156":2,"295":2}}],["foo",{"2":{"145":4,"156":6,"160":6,"161":1,"162":1,"163":2,"222":2,"231":6,"234":1,"235":1,"236":2,"286":2,"295":6,"297":1,"298":1,"299":2,"408":9,"667":1}}],["formal",{"2":{"490":1}}],["format",{"2":{"147":1,"149":1,"224":1,"226":1,"288":1,"290":1,"323":1,"324":1,"326":1,"447":1,"465":6,"468":1,"469":1,"514":3,"536":1,"537":2,"544":14}}],["form",{"2":{"474":1,"529":1}}],["formdata",{"2":{"463":1}}],["forbiddend",{"2":{"464":1}}],["forbidden",{"2":{"437":1}}],["foreachはこの限りではない",{"2":{"153":1,"228":1,"292":1}}],["foreachは原則利用しない",{"2":{"153":1,"228":1,"292":1}}],["foreach",{"2":{"153":6,"156":3,"174":2,"228":6,"231":3,"247":2,"292":6,"295":3,"310":2}}],["forward",{"0":{"107":1},"2":{"104":1}}],["force",{"2":{"65":6,"79":2}}],["for",{"0":{"315":1,"316":1,"591":1,"640":1},"2":{"7":1,"111":1,"126":1,"129":1,"130":1,"140":1,"146":8,"147":2,"153":3,"158":1,"159":1,"160":1,"169":4,"172":3,"174":6,"188":1,"203":1,"206":1,"207":1,"217":1,"223":8,"224":2,"228":3,"233":1,"242":4,"245":3,"247":6,"252":1,"267":1,"270":1,"271":1,"281":1,"287":8,"288":2,"292":3,"305":4,"308":3,"310":6,"317":3,"457":1,"465":1,"481":1,"527":1,"545":1,"591":2,"597":2,"640":1}}],["float",{"2":{"469":1,"537":1}}],["flowの呼称である",{"2":{"58":1}}],["flowと命名する",{"2":{"58":1}}],["flowからreleaseブランチを除いたパターン",{"2":{"58":1}}],["flow",{"2":{"58":5,"59":2,"456":1,"488":1}}],["flowではfeatureブランチのことをtopicブランチと呼称する場合があるが",{"2":{"57":1}}],["flag",{"2":{"125":1,"202":1,"266":1,"443":1}}],["failed",{"2":{"667":1}}],["favorite",{"2":{"347":1,"381":1}}],["fall",{"2":{"127":2,"204":2,"268":2}}],["falseの状態がわかるようにする",{"2":{"123":1,"200":1,"264":1}}],["false",{"2":{"82":1,"94":1,"125":1,"146":1,"147":1,"151":4,"152":2,"202":1,"223":1,"224":1,"266":1,"287":1,"288":1,"463":1,"465":3,"487":1,"517":1,"544":1}}],["fastapi",{"2":{"546":1}}],["fast",{"0":{"107":1},"2":{"104":1}}],["ff",{"2":{"101":1,"102":1,"105":1}}],["female",{"2":{"544":2}}],["fedict",{"2":{"111":1,"188":1,"252":1}}],["fetch",{"0":{"181":1,"568":1},"2":{"65":2,"66":1,"82":2,"109":2,"110":2,"160":4,"181":2,"568":2}}],["featuretopic",{"2":{"58":1}}],["featureブランチにコミットを行った人がauthorになるのではなく",{"2":{"66":1}}],["featureブランチに準じる",{"2":{"51":2}}],["featureブランチでの作業中に",{"2":{"65":1}}],["featureブランチで実現する機能を複数人で開発する場合に使用するブランチである",{"2":{"57":1}}],["featureブランチからdevelopブランチへ変更を取り込む",{"0":{"66":1},"2":{"64":1}}],["featureブランチのコミットログが",{"2":{"66":1}}],["featureブランチのマージ後",{"2":{"63":1}}],["featureブランチのみの運用では必須ではない",{"2":{"56":1}}],["featureブランチへの直接プッシュを行ってはならない",{"2":{"57":1}}],["featureブランチ",{"0":{"53":1}}],["featureブランチを使用する",{"2":{"50":1}}],["feature",{"2":{"51":3,"53":3,"69":1,"85":1,"105":2,"109":3,"110":3}}],["feat",{"2":{"43":1,"45":4}}],["fields",{"2":{"463":1}}],["first",{"2":{"416":2,"490":1}}],["fire",{"2":{"45":1}}],["figmaで判断可能な見た目の情報は",{"2":{"409":1}}],["figmaを用いて",{"2":{"409":1}}],["figmaのパスなど",{"2":{"407":1}}],["figma",{"2":{"390":1,"400":1}}],["find",{"2":{"527":1}}],["findbugs",{"2":{"248":1,"249":1,"311":1,"312":1}}],["findemployee",{"2":{"157":4,"232":4,"296":4}}],["finalize",{"2":{"164":1,"237":1,"300":1}}],["final",{"0":{"155":2,"230":2,"294":2},"2":{"125":1,"129":6,"136":3,"137":9,"139":1,"141":1,"147":2,"151":1,"155":1,"173":6,"202":1,"206":6,"213":3,"214":9,"216":1,"218":1,"224":2,"230":1,"246":6,"266":1,"270":6,"277":3,"278":9,"280":1,"282":1,"288":2,"294":1,"309":6,"480":1}}],["finalとし",{"2":{"125":1,"202":1,"266":1}}],["filter",{"2":{"156":3,"169":1,"231":3,"242":1,"295":3,"305":1,"476":1,"531":1}}],["file",{"2":{"457":1,"469":1,"472":1,"537":2,"540":1}}],["files",{"2":{"97":1,"111":1,"161":1,"162":1,"163":2,"188":1,"234":1,"235":1,"236":2,"252":1,"297":1,"298":1,"299":2,"474":1,"529":1}}],["file2>",{"2":{"79":1}}],["file1>",{"2":{"79":1}}],["fileupload",{"2":{"2":1,"7":1,"14":4,"19":1,"28":1}}],["fixed",{"2":{"463":1}}],["fixtypo",{"2":{"53":1}}],["fix",{"2":{"43":1,"45":9}}],["fifoキューの命名規約",{"2":{"30":1}}],["fifo",{"2":{"30":4}}],["fis",{"2":{"28":1}}],["full",{"0":{"657":1},"2":{"36":1,"469":1,"537":1,"657":1}}],["future",{"0":{"395":1},"1":{"396":1,"397":1,"398":1},"2":{"30":2,"33":1,"34":3,"36":2,"319":1,"402":1,"403":1}}],["function",{"0":{"24":1}}],["fuga\\t=\\tyyy",{"2":{"563":1,"613":1}}],["fuga",{"2":{"14":4,"17":1,"18":8,"19":2,"20":1,"21":2,"22":4,"24":3,"25":2,"26":2,"27":2,"28":3,"29":3,"30":2,"31":3,"33":2,"35":2,"36":4,"563":2,"613":2}}],["f",{"0":{"417":1},"2":{"6":1,"145":2,"151":2,"402":2,"417":2,"430":1}}],["jwt",{"2":{"522":1,"544":2}}],["jwks",{"2":{"456":1}}],["js",{"2":{"408":1}}],["json",{"2":{"36":2,"447":2,"456":1,"457":3,"458":2,"462":1,"465":1,"472":1,"474":2,"475":2,"480":1,"483":2,"509":3,"510":4,"514":4,"529":2,"530":2,"540":1,"544":7}}],["jre1",{"2":{"168":1,"241":1,"304":1}}],["jre",{"2":{"168":1,"241":1,"304":1}}],["jdk1",{"2":{"153":1,"228":1,"292":1}}],["join",{"2":{"172":3,"245":3,"308":3,"571":1}}],["joinが利用できます",{"2":{"172":1,"245":1,"308":1}}],["joining",{"2":{"147":1,"224":1,"288":1}}],["job",{"2":{"6":2,"24":1,"29":1}}],["junit",{"2":{"132":1,"209":1,"273":1}}],["jcs",{"2":{"111":1,"188":1,"252":1}}],["j",{"2":{"111":1,"126":1,"167":1,"188":1,"203":1,"240":1,"252":1,"267":1,"303":1}}],["j2ee",{"2":{"111":2,"188":2,"252":2}}],["jjguideline",{"2":{"111":1,"188":1,"252":1}}],["java11",{"2":{"316":1,"317":1}}],["java17",{"0":{"315":1},"2":{"315":1}}],["javaarrays",{"2":{"292":2}}],["javaarraylist",{"2":{"129":1,"206":1,"270":1}}],["javahogelist",{"2":{"231":1}}],["javanew",{"2":{"170":1,"243":1,"306":1}}],["javatry",{"2":{"161":1,"162":1,"163":2,"234":1,"235":1,"236":2,"297":1,"298":1,"299":2}}],["javathis",{"2":{"154":1,"229":1,"293":1}}],["javaoptional",{"2":{"157":2,"232":2,"296":2}}],["javaemployee",{"2":{"157":1,"232":1,"296":1}}],["javaenum",{"2":{"127":2,"204":2,"268":2}}],["javafoolist",{"2":{"156":1,"295":1}}],["javafor",{"2":{"130":2,"140":1,"146":2,"153":2,"174":1,"207":2,"217":1,"223":2,"228":2,"247":1,"271":2,"281":1,"287":2,"292":2,"310":1}}],["java9",{"2":{"153":1,"228":1}}],["java2",{"2":{"153":1,"228":1,"292":1}}],["javavar",{"2":{"151":7,"152":4,"158":5,"233":5}}],["javadate",{"2":{"149":1,"226":1,"290":1}}],["javadoc",{"2":{"131":2,"159":2,"166":1,"167":3,"208":2,"239":1,"240":3,"272":2,"302":1,"303":3}}],["javascript",{"2":{"474":1,"529":1,"546":1}}],["javastream",{"2":{"156":2,"231":2,"295":2}}],["javastringbuffer",{"2":{"172":1,"245":1,"308":1}}],["javastringbuilder",{"2":{"147":1,"172":1,"224":1,"245":1,"288":1,"308":1}}],["javastring",{"2":{"126":1,"140":1,"145":2,"146":1,"147":8,"154":1,"160":15,"172":1,"203":1,"217":1,"222":2,"223":1,"224":8,"229":1,"245":1,"248":2,"249":2,"267":1,"281":1,"286":2,"287":1,"288":6,"293":1,"308":1,"311":2,"312":2}}],["javase",{"2":{"151":1,"152":1}}],["javaswitch",{"2":{"146":1,"223":1,"287":1}}],["javabeans",{"2":{"159":2}}],["javaboolean",{"2":{"146":2,"223":2,"287":2}}],["javabigdecimal",{"2":{"139":2,"148":2,"154":1,"175":2,"216":2,"225":2,"229":1,"250":2,"280":2,"289":2,"293":1,"313":2}}],["java8",{"2":{"143":1,"153":2,"169":1,"170":1,"220":1,"228":2,"242":1,"243":1,"284":1,"292":2,"305":1,"306":1,"316":1,"317":1}}],["javaclass",{"2":{"133":2,"210":2,"274":2}}],["javacomparator",{"2":{"170":4,"243":4,"306":4}}],["javacode",{"2":{"160":3}}],["javacodingkind",{"2":{"146":1,"223":1,"287":1}}],["javacodingstandard",{"2":{"111":1,"188":1,"252":1}}],["javacodingstandard2004",{"2":{"111":1,"188":1,"252":1}}],["javacodingstandards",{"2":{"111":1,"188":1,"252":1}}],["javacordingrule",{"2":{"111":1,"188":1,"252":1}}],["javareturn",{"2":{"130":1,"172":1,"207":1,"245":1,"271":1,"308":1}}],["javaimport",{"2":{"132":2,"209":2,"273":2}}],["javai",{"2":{"130":1,"207":1,"271":1}}],["javai++",{"2":{"130":1,"207":1,"271":1}}],["javainteger",{"2":{"135":1,"212":1,"276":1}}],["javaint",{"2":{"130":3,"135":1,"146":2,"147":1,"151":1,"174":1,"207":3,"212":1,"223":2,"224":1,"247":1,"271":3,"276":1,"287":2,"288":1,"310":1}}],["javaif",{"2":{"126":1,"130":6,"145":4,"146":2,"166":1,"203":1,"207":6,"222":2,"223":2,"239":1,"267":1,"271":6,"286":2,"287":2,"302":1}}],["javalist",{"2":{"129":1,"153":3,"156":3,"169":2,"174":1,"206":1,"228":3,"231":3,"242":2,"247":1,"270":1,"292":1,"295":3,"305":2,"310":1}}],["javaprocessvalues",{"2":{"160":1}}],["javaprocess",{"2":{"130":2,"207":2,"271":2}}],["javaprivate",{"2":{"120":2,"125":5,"136":5,"147":2,"173":4,"197":2,"202":5,"213":5,"224":2,"246":4,"261":2,"266":5,"277":5,"288":2,"309":4}}],["javapublic",{"2":{"122":2,"123":5,"124":2,"134":2,"136":1,"137":7,"138":2,"141":1,"142":3,"159":2,"160":4,"199":2,"200":5,"201":2,"211":2,"213":1,"214":7,"215":2,"218":1,"219":3,"263":2,"264":5,"265":2,"275":2,"277":1,"278":7,"279":2,"282":1,"283":3}}],["java",{"0":{"167":1,"240":1,"303":1},"2":{"111":11,"129":1,"130":1,"131":2,"132":3,"136":1,"143":1,"146":1,"153":1,"154":7,"156":1,"158":1,"159":2,"160":1,"167":1,"168":1,"173":11,"188":11,"206":1,"207":1,"208":2,"209":3,"213":1,"220":1,"223":1,"228":1,"229":7,"231":1,"233":1,"240":1,"241":1,"246":11,"252":11,"270":1,"271":1,"272":2,"273":3,"277":1,"284":1,"287":1,"292":1,"293":7,"295":1,"303":1,"304":1,"309":11,"476":1,"531":1,"546":1,"550":1,"554":1,"556":1,"601":1,"605":1,"607":1}}],["ja",{"2":{"97":1,"111":1,"188":1,"252":1,"481":1,"545":1,"683":1}}],["jpg",{"2":{"408":1}}],["jp",{"2":{"82":2,"111":3,"151":1,"152":1,"173":1,"188":3,"246":1,"252":3,"309":1,"474":1,"481":1,"529":1,"545":1}}],["jira",{"2":{"53":1}}],["jenkins",{"2":{"2":1,"6":1}}],["や休日など業務時間外の投稿は原則禁止とし",{"2":{"676":1}}],["やエラー等のドメインオブジェクトを定義する",{"2":{"512":1}}],["や機能名があるのであれば記載する",{"2":{"505":1}}],["やリリースで管理するようなバージョン",{"2":{"452":1,"501":1}}],["やスネークケース",{"2":{"12":1}}],["や",{"2":{"6":1,"7":1,"16":1,"29":1,"51":1,"53":2,"130":1,"207":1,"248":1,"271":1,"311":1,"443":1,"464":2,"476":1,"484":1,"531":1,"546":1,"566":1,"576":1,"616":1,"625":1}}],["操作に失敗すれば",{"2":{"546":1}}],["操作フローの理解はそこまで難しくないことが多い",{"2":{"523":1}}],["操作をグループ化することができる",{"2":{"459":1}}],["操作ミスを低減する",{"2":{"6":1}}],["操作の対象",{"2":{"2":1}}],["開発につなげることを前提とする",{"2":{"546":1}}],["開発においては本番環境の",{"2":{"502":1}}],["開発方針や",{"2":{"543":1}}],["開発太郎",{"2":{"167":1,"240":1,"303":1}}],["開発",{"2":{"109":1,"490":1}}],["開発ブランチの変更を機能ブランチに取り込む方法を指す",{"2":{"109":1,"110":1}}],["開発ブランチに機能ブランチの変更を取り込む方法は3種類ある",{"2":{"100":1,"104":1}}],["開発ブランチに機能ブランチの変更を取り込む方法",{"0":{"99":1},"1":{"100":1,"101":1,"102":1,"103":1,"104":1,"105":1,"106":1,"107":1}}],["開発が完了した機能ブランチをメインの開発ブランチに取り込むためには",{"2":{"100":1}}],["開発が完了したfeatureブランチをメインのdevelopブランチに取り込むためには",{"2":{"66":1}}],["開発規約",{"2":{"97":1,"407":1}}],["開発を行わない",{"2":{"86":1}}],["開発しているプロダクトがシステム",{"2":{"76":1}}],["開発しているプロダクトがライブラリの場合",{"2":{"76":1}}],["開発プロセスの円滑な進行",{"2":{"64":1}}],["開発環境へのデプロイ漏れを防ぐため定期的にci",{"2":{"59":1}}],["開発環境へはdevelopマージをトリガーにci",{"2":{"59":2}}],["開発環境",{"2":{"59":1}}],["開発の中心となるブランチである",{"2":{"54":1}}],["開発の大元",{"2":{"51":1}}],["開発中で最も使われる短命なブランチである",{"2":{"53":1}}],["開発で利用する",{"2":{"48":1}}],["開発者",{"2":{"433":1}}],["開発者には",{"2":{"86":1}}],["開発者視点での楽しみリリースの大きなマイルストーンの名称など",{"2":{"75":1}}],["開発者が任意に選択するものとする",{"2":{"45":1}}],["開発者の理解を助け",{"2":{"6":1}}],["開発担当チーム",{"2":{"38":1}}],["開発チームが開発するための環境",{"2":{"4":1}}],["開発チームが",{"2":{"1":1}}],["識別子",{"2":{"430":1}}],["識別子を追加するかどうか",{"0":{"16":1}}],["識別子の末尾に連番をつける",{"2":{"5":1}}],["識別子に採用した単語は一般的に用いられている略称である",{"2":{"4":1}}],["例外クラスは無駄に定義しない",{"2":{"163":1,"236":1,"299":1}}],["例外処理をする",{"2":{"163":1,"236":1,"299":1}}],["例外",{"0":{"163":1,"236":1,"299":1},"2":{"136":1,"213":1,"277":1}}],["例外的に特定のユーザーにのみ権限を付与する",{"2":{"34":1}}],["例2",{"2":{"76":1}}],["例1",{"2":{"76":1}}],["例",{"2":{"4":2,"5":1,"19":1,"20":1,"21":2,"22":3,"24":1,"25":1,"26":2,"27":1,"28":3,"29":2,"30":2,"31":1,"33":2,"34":2,"35":1,"36":3,"40":1,"166":2,"167":1,"239":2,"240":1,"302":2,"303":1,"402":1,"450":1,"462":3,"463":1,"469":2,"473":1,"487":1,"512":2,"514":1,"517":1,"519":1,"537":2,"541":1,"544":2,"551":1,"552":1,"553":2,"602":1,"603":1,"604":2,"677":1}}],["例えばあるスレッドで設計方針について議論したのであれば",{"2":{"668":1}}],["例えば内輪ネタのような",{"2":{"663":1}}],["例えば次のような対立が考えられる",{"2":{"647":1}}],["例えばredocly",{"2":{"544":1}}],["例えば各",{"2":{"544":1}}],["例えばpathは",{"2":{"543":1}}],["例えば更新と削除",{"2":{"516":1}}],["例えばクライアントがモバイルである場合",{"2":{"465":1}}],["例えば以下ののような方針で統一してください",{"2":{"158":1,"233":1}}],["例えばスキーマファイルの参照のみ必要であれば",{"2":{"86":1}}],["例えば",{"2":{"1":2,"6":1,"16":1,"114":1,"115":1,"116":1,"118":1,"166":1,"191":1,"192":1,"193":1,"195":1,"239":1,"255":1,"256":1,"257":1,"259":1,"302":1,"406":1,"415":1,"464":1,"465":1,"543":1,"546":2,"657":1,"660":1,"672":1,"677":1}}],["4191",{"2":{"667":1}}],["4xx",{"2":{"510":1,"512":1,"514":2}}],["405",{"2":{"464":1}}],["409",{"2":{"439":1,"464":1}}],["404",{"2":{"438":1,"439":1,"440":1,"441":1,"447":1,"464":2,"544":4,"546":1}}],["403",{"2":{"437":1,"464":1}}],["401",{"2":{"437":1,"464":1,"514":2}}],["400",{"2":{"430":1,"437":2,"447":1,"464":3,"465":1,"510":4,"514":2}}],["44",{"2":{"174":1,"247":1,"310":1}}],["45",{"2":{"174":1,"247":1,"310":1,"447":1,"465":2}}],["421",{"2":{"465":1}}],["424max",{"2":{"175":1,"250":1,"313":1}}],["42",{"2":{"172":1,"245":1,"308":1}}],["4名以上でもngとする",{"2":{"86":1}}],["4",{"0":{"376":1},"2":{"4":1,"32":1,"73":3,"74":1,"130":1,"137":4,"160":1,"173":1,"174":2,"207":1,"214":4,"246":1,"247":2,"249":1,"271":1,"278":4,"309":1,"310":2,"312":1,"371":1,"447":3,"463":2,"465":5}}],["と考えられる",{"2":{"681":1}}],["とチャンネルにメンバー追加できる担当者が必ずしも1",{"2":{"681":1}}],["と予約語を登録することで",{"2":{"658":1}}],["とシングルクォーテーションを二つつなげた記述をする",{"2":{"630":1}}],["と記述する",{"2":{"579":1,"628":1}}],["と記載しして上書き定義する必要がある",{"2":{"456":1}}],["と記載する",{"2":{"31":1,"455":1,"456":1}}],["とandについては各行の先頭に記述する",{"2":{"556":1,"607":1}}],["とディレクトリ構成は下の通り",{"2":{"544":1}}],["と比較して",{"2":{"483":1}}],["と区別できない場合",{"2":{"465":1}}],["と重複する部分で自明な内容",{"2":{"415":1}}],["と表示",{"2":{"388":1}}],["と表示する",{"2":{"347":2,"352":2}}],["との比較",{"0":{"175":1,"250":1,"313":1}}],["との差分を把握することができる",{"2":{"62":1}}],["とその値の変数は同じものを示す名前となり",{"2":{"157":1,"232":1,"296":1}}],["とlist",{"2":{"153":1,"228":1}}],["とすると良い",{"2":{"674":1}}],["とする",{"2":{"140":1,"143":2,"217":1,"220":2,"281":1,"284":2,"441":1,"476":1,"477":1,"484":2,"486":1,"531":1,"532":1,"576":1,"625":1}}],["とすることで",{"2":{"65":1}}],["とオペランドの間には空白文字を入れない",{"2":{"130":1,"207":1,"271":1}}],["ととらえていては",{"2":{"116":1,"193":1,"257":1}}],["と同期に投げる場合など",{"2":{"665":1}}],["と同様に",{"2":{"465":1}}],["と同様に機能id単位で作成する",{"2":{"415":1}}],["と同様のマージ方法になる",{"2":{"105":1,"107":2}}],["と同じコマンドを使用して",{"2":{"106":1}}],["と同じである",{"2":{"21":1}}],["とリモートの",{"2":{"65":1}}],["と連番にする",{"2":{"51":1}}],["という懸念への考え方",{"2":{"666":1}}],["という記載を推奨する",{"2":{"657":1}}],["という記載は",{"2":{"579":1,"628":1}}],["という記述があるとする",{"2":{"115":1,"192":1,"256":1}}],["というプレフィックスを付与する形式を推奨する",{"2":{"517":1,"518":1,"519":1}}],["というステージ区別であれば",{"2":{"453":1}}],["という命名は非推奨とする",{"2":{"443":1}}],["という名称で管理する",{"2":{"411":1}}],["というコメントを記述すること",{"2":{"163":1,"236":1,"299":1}}],["という考え方に基づく",{"2":{"115":1,"192":1,"256":1}}],["というクラス名があるとする",{"2":{"115":1,"192":1,"256":1}}],["ということもよく言われる",{"2":{"114":1,"191":1,"255":1}}],["というファイルをgitリポジトリのルートにコミットしておけば",{"2":{"94":1}}],["という設定である",{"2":{"94":1}}],["というグループが",{"2":{"34":1}}],["という制約があるため注意が必要である",{"2":{"34":1}}],["といった迷いが生じる",{"2":{"666":1}}],["といった絵文字リアクションを付けることで解決するため",{"2":{"664":1}}],["といった共通のエラーモデルを利用を推奨する",{"2":{"465":1}}],["といった",{"2":{"465":2}}],["といった命名規約にしたくなるが",{"2":{"462":1}}],["といった形式でコメントすること",{"2":{"662":1}}],["といった形式も許容する",{"2":{"452":1}}],["といった形式や",{"2":{"7":1}}],["といったパスで表現する",{"2":{"442":1}}],["といったフォーマットに従うこと",{"2":{"402":1}}],["といった複数のdevelopブランチを作る必要がある",{"2":{"61":1}}],["といった名前を",{"2":{"36":1}}],["といった名称を使っても良い",{"2":{"6":1}}],["といったプレフィックスを持つ",{"2":{"407":1}}],["といったプレフィックス",{"2":{"16":1}}],["とし",{"2":{"452":1,"501":1}}],["とした場合は",{"2":{"248":1,"311":1}}],["とした場合",{"2":{"248":1,"311":1}}],["とした場合の例をあげる",{"2":{"17":1}}],["としたほうが分かりやすいはずである",{"2":{"115":1,"192":1,"256":1}}],["として採用する",{"2":{"548":1,"599":1}}],["として認識させたくない",{"2":{"487":1}}],["として生成される",{"2":{"167":1,"240":1,"303":1}}],["としてはオブジェクトストレージにダウンロード用のファイルを書き込み",{"2":{"475":1,"530":1}}],["としては",{"2":{"159":1}}],["として表面的に適用してしまうことである",{"2":{"116":1,"193":1,"257":1}}],["としている",{"2":{"36":1}}],["として書式設定することはできない",{"2":{"28":1}}],["としなくても良い",{"2":{"27":1}}],["とは別である",{"2":{"452":1,"501":1}}],["とは互換性がないため使用している各種ライブラリの対応状況にも注意する必要があります",{"2":{"159":1}}],["とは異なり",{"2":{"33":1}}],["とは異なりアカウント単位での一意性は不要なため",{"2":{"27":1}}],["とは命名しない",{"2":{"4":1}}],["と",{"2":{"21":1,"27":1,"105":1,"131":3,"146":1,"159":1,"173":1,"208":3,"223":1,"246":1,"272":3,"287":1,"309":1,"457":1,"490":1}}],["と合わせてリソースが一意に特定できる名称を設定する",{"2":{"7":1}}],["と見間違えを防ぐため",{"2":{"4":1}}],["とアプリのように複数のサービスを稼働させるといった構成は考慮しない",{"2":{"1":1}}],["uri",{"2":{"514":1}}],["urlパス",{"2":{"460":1}}],["urlを入力すると",{"2":{"179":1}}],["url",{"2":{"111":1,"147":2,"188":1,"224":2,"252":1,"288":2,"340":1,"347":1,"352":1,"359":1,"366":2,"373":2,"376":2,"381":1,"388":3,"390":1,"449":1,"454":1,"461":1,"462":1,"464":1,"474":5,"475":2,"498":1,"502":6,"503":1,"507":1,"514":3,"524":3,"527":3,"529":5,"530":2,"544":2}}],["uuid",{"2":{"469":1,"537":1}}],["ui設計",{"2":{"407":1}}],["uim",{"2":{"402":1}}],["uim001",{"2":{"368":1}}],["uim002",{"2":{"367":1,"374":1}}],["uim003に遷移",{"2":{"357":1}}],["uim04",{"0":{"355":1},"1":{"356":1,"357":1,"358":1,"359":1,"360":1,"361":1},"2":{"354":1,"392":1}}],["uim03に遷移",{"2":{"360":1}}],["uim03",{"0":{"348":1},"1":{"349":1,"350":1,"351":1,"352":1,"353":1,"354":1},"2":{"389":1,"392":1}}],["uim02",{"0":{"342":1},"1":{"343":1,"344":1,"345":1,"346":1,"347":1},"2":{"392":1,"402":1}}],["uim01",{"0":{"335":1},"1":{"336":1,"337":1,"338":1,"339":1,"340":1,"341":1},"2":{"392":1,"402":1}}],["ui",{"2":{"402":2,"459":1,"469":1,"523":1,"537":1}}],["uisであれば",{"2":{"402":1}}],["uis",{"2":{"402":2}}],["uis04",{"0":{"384":1},"1":{"385":1,"386":1,"387":1,"388":1,"389":1},"2":{"391":1}}],["uis04に遷移",{"2":{"379":1,"382":1}}],["uis03",{"0":{"377":1},"1":{"378":1,"379":1,"380":1,"381":1,"382":1,"383":1},"2":{"391":1}}],["uis03に遷移",{"2":{"347":1}}],["uis02",{"0":{"369":1},"1":{"370":1,"371":1,"372":1,"373":1,"374":1,"375":1,"376":1},"2":{"391":1,"402":1}}],["uis02に遷移",{"2":{"340":1}}],["uis01",{"0":{"362":1},"1":{"363":1,"364":1,"365":1,"366":1,"367":1,"368":1},"2":{"391":1,"402":1}}],["undefined",{"2":{"533":1}}],["unknown",{"2":{"444":1,"493":1,"546":1}}],["unauthorized",{"2":{"437":1,"464":1,"514":3}}],["unauthenticated",{"2":{"433":1}}],["unmodifiablemap",{"2":{"278":1}}],["unmodifiablelist",{"2":{"278":2}}],["unionはdistinct処理が含まれパフォーマンス上問題があるため",{"2":{"589":1,"639":1}}],["union",{"0":{"589":1,"639":1},"2":{"589":1,"639":1}}],["uniqueitems",{"2":{"159":2,"470":1,"538":1}}],["unicode",{"2":{"37":2,"554":1,"605":1}}],["util",{"2":{"132":1,"209":1,"273":1}}],["utf",{"2":{"27":1,"37":1,"323":1,"326":1,"480":1,"486":1,"554":1,"605":1}}],["upload",{"2":{"514":1}}],["updateで複数行にロックをかける場合",{"2":{"591":1,"640":1}}],["updateはno",{"2":{"591":1}}],["update文",{"2":{"561":1}}],["update",{"0":{"559":1,"591":1,"610":1,"640":1},"2":{"551":1,"556":1,"570":2,"583":2,"602":1,"607":1,"620":2,"634":2}}],["updates",{"2":{"91":2}}],["updated",{"2":{"85":1}}],["updating",{"2":{"85":1}}],["up",{"2":{"45":1,"88":1,"544":1}}],["uw2",{"2":{"8":1}}],["uw1",{"2":{"8":1}}],["ue2",{"2":{"8":1}}],["ue1",{"2":{"8":1}}],["uat",{"2":{"4":1}}],["using",{"2":{"481":1,"514":2,"545":1,"561":1}}],["useful",{"2":{"527":1}}],["use",{"2":{"28":2}}],["useraccounts",{"2":{"465":1}}],["useraccount",{"2":{"447":2,"459":1,"464":1,"465":2}}],["users",{"2":{"447":1,"456":1,"461":3,"462":1,"463":1,"464":2,"487":1,"503":2,"504":9,"505":1,"506":1,"507":3,"508":6,"509":4}}],["userstate",{"2":{"366":1,"373":1}}],["username",{"2":{"33":1}}],["userinfo",{"2":{"28":1}}],["userprofile",{"2":{"24":1}}],["user",{"2":{"2":1,"4":2,"7":1,"27":2,"82":2,"366":1,"373":2,"376":1,"416":9,"432":2,"433":2,"447":8,"456":1,"459":2,"461":6,"462":2,"463":5,"464":1,"465":9,"488":4,"513":1,"526":2}}],["us",{"2":{"8":4}}],["usage",{"0":{"7":1},"2":{"2":3,"12":1,"16":1,"18":2,"19":1,"21":3,"22":2,"24":4,"25":1,"27":1,"29":1,"30":2,"31":1,"33":1,"34":1,"35":2,"36":3,"37":1}}],["tbl1",{"2":{"581":1,"618":3,"632":1}}],["tip",{"2":{"652":1,"658":1}}],["times内ではなく相談は別メッセージに切り出して行うことを推奨する",{"2":{"666":1}}],["times内とはいえ",{"2":{"666":1}}],["timesスレッドでメンションを飛ばすと",{"2":{"666":1}}],["timesスレッドでメンションしても良い",{"2":{"666":1}}],["timesスレッドのコメント数は100以上になることもあり",{"2":{"666":1}}],["timesスレッド内のメンション",{"2":{"666":1}}],["timesスレッド作成者の注意事項",{"2":{"666":1}}],["timesスレッドは",{"2":{"666":1}}],["times専用のチャンネルを作成すれば良い",{"2":{"666":1}}],["timesのコメントを",{"2":{"666":1}}],["timesのメンションを受けたユーザーが",{"2":{"666":1}}],["timesの投稿を読んで欲しいときは",{"2":{"666":1}}],["timesの利用を推奨する",{"2":{"666":1}}],["timesの推奨",{"0":{"666":1}}],["timesとは",{"2":{"666":1}}],["times",{"2":{"647":1,"666":1}}],["time",{"2":{"447":1,"465":3,"469":2,"473":1,"514":1,"537":2,"541":1,"544":1}}],["title",{"0":{"450":1,"499":1},"2":{"447":1,"449":2,"465":2,"498":2,"499":1,"509":1,"510":1,"544":2}}],["tsv",{"2":{"160":1}}],["t",{"2":{"151":2,"167":1,"240":1,"303":1}}],["tuesday",{"2":{"151":6,"152":2}}],["that",{"2":{"630":2}}],["thumbnail",{"2":{"366":1}}],["thursday",{"2":{"151":6,"152":2}}],["throw",{"2":{"163":2,"236":2,"299":2}}],["thisisipaddress",{"2":{"125":1,"202":1,"266":1}}],["thisisstring",{"2":{"125":1,"202":1,"266":1}}],["this",{"2":{"124":3,"153":2,"156":3,"174":1,"201":3,"228":2,"231":3,"247":1,"265":3,"292":2,"295":3,"310":1}}],["then",{"2":{"563":1,"613":1}}],["then\\t\\t",{"2":{"561":1}}],["then\\t\\t\\t",{"2":{"561":1}}],["theme",{"2":{"328":1,"408":1,"421":1}}],["the",{"2":{"88":1,"111":1,"188":1,"252":1,"490":7,"527":3,"544":5}}],["trim",{"2":{"480":1}}],["triage",{"2":{"86":1}}],["trailing",{"2":{"480":1}}],["trainee",{"2":{"352":1,"366":1,"373":2,"376":1}}],["trainer",{"2":{"352":2,"359":1,"388":4}}],["trainers",{"2":{"347":1,"352":1,"381":1,"388":3}}],["trainnumber",{"2":{"120":1,"197":1,"261":1}}],["traceparent",{"0":{"477":1,"532":1}}],["transferring",{"2":{"474":1,"529":1}}],["try",{"2":{"146":2,"161":1,"162":2,"223":2,"234":1,"235":2,"287":2,"297":1,"298":2}}],["trueの場合は原則としてminitems",{"2":{"470":1,"538":1}}],["trueを定義する",{"2":{"470":1,"538":1}}],["trueまたはexclusivemaximum",{"2":{"470":1,"538":1}}],["true",{"2":{"65":2,"66":1,"82":3,"94":1,"130":1,"147":2,"151":7,"152":2,"207":1,"224":2,"271":1,"288":2,"447":1,"463":7,"465":1,"467":1,"480":3,"487":1,"509":2,"510":1,"518":1,"519":1,"535":1,"539":1,"544":3}}],["txt支払金額",{"2":{"423":1}}],["txtfeat",{"2":{"46":1}}],["txt",{"2":{"45":1,"161":1,"162":1,"163":2,"234":1,"235":1,"236":2,"297":1,"298":1,"299":2,"672":2}}],["token",{"2":{"544":2}}],["tokenurl",{"2":{"456":1}}],["tools",{"2":{"490":1}}],["tool",{"2":{"481":1,"545":1}}],["too",{"2":{"465":1,"521":1,"630":1}}],["toc",{"2":{"444":1,"493":1}}],["tocodingkind",{"2":{"146":2,"223":2,"287":2}}],["toypoodle",{"2":{"544":2}}],["toy",{"2":{"328":1,"408":2,"421":1}}],["todo",{"2":{"166":4,"181":1,"182":1,"184":1,"185":1,"186":1,"187":1,"239":4,"302":4,"479":1}}],["tolowercase",{"2":{"156":5,"231":5,"295":5}}],["tolist",{"2":{"134":2,"156":7,"169":1,"211":2,"231":7,"242":1,"275":2,"295":7,"305":1}}],["toplainstring",{"2":{"145":2}}],["topicブランチが必要なケースでは",{"2":{"57":1}}],["topicブランチ",{"0":{"57":1}}],["topicブランチを利用する場合は",{"2":{"51":1}}],["topic",{"2":{"51":2}}],["toarray",{"2":{"134":2,"211":2,"275":2}}],["tostringonoff",{"2":{"147":1,"224":1,"288":1}}],["tostring",{"2":{"123":1,"131":1,"147":3,"148":1,"172":2,"173":2,"200":1,"208":1,"224":3,"225":1,"245":2,"246":2,"264":1,"272":1,"288":1,"289":1,"308":2,"309":2}}],["to",{"0":{"669":1},"2":{"85":1,"88":3,"97":1,"123":1,"130":2,"160":1,"200":1,"207":2,"264":1,"271":2,"408":7,"544":7,"581":1,"632":1,"669":2}}],["toggle",{"2":{"29":1}}],["tomcat",{"2":{"6":1}}],["tanimura",{"2":{"675":1}}],["tab",{"2":{"130":1,"160":2,"207":1,"271":1}}],["table1",{"2":{"618":1}}],["tableの結合条件",{"2":{"578":2,"627":2}}],["tableの絞り込み",{"2":{"578":3,"627":3}}],["table\\tc\\t",{"2":{"578":1,"627":1}}],["table\\tb\\t",{"2":{"578":1,"627":1}}],["table\\ta\\t",{"2":{"578":1,"627":1}}],["table",{"2":{"18":1,"160":4,"578":3,"627":3,"630":2}}],["taskforce",{"2":{"90":4}}],["tada",{"2":{"45":1}}],["tags",{"0":{"89":1,"459":1,"504":1,"526":1},"2":{"85":1,"89":1,"447":2,"459":2,"461":6,"462":1,"495":1,"503":1,"504":6,"544":6}}],["tagging",{"2":{"37":2}}],["tag",{"2":{"37":1,"38":1,"73":2,"74":1,"75":4,"452":1,"501":1,"544":8}}],["taro",{"2":{"33":1,"657":1}}],["target",{"2":{"2":1,"21":1,"31":1,"34":1}}],["types",{"2":{"465":1}}],["typescript",{"2":{"459":1,"526":1,"546":1}}],["typeの使い分けが実現しやすい場合は以下でも良い",{"2":{"457":1}}],["typeについては必須の要素となり",{"2":{"43":1}}],["type>",{"2":{"42":1}}],["type",{"0":{"43":1,"158":1,"233":1},"2":{"14":1,"42":2,"43":1,"45":1,"132":1,"158":1,"209":1,"233":1,"273":1,"324":1,"416":2,"447":7,"456":1,"457":3,"463":7,"465":24,"468":1,"469":1,"471":1,"472":1,"473":1,"488":2,"508":5,"512":1,"513":5,"514":5,"517":1,"518":2,"519":1,"521":1,"522":1,"536":1,"537":2,"539":2,"540":1,"541":1,"544":55}}],["tech",{"2":{"667":1}}],["technology",{"2":{"111":2,"188":2,"252":2}}],["technetwork",{"2":{"111":1,"188":1,"252":1}}],["ten",{"2":{"556":2,"607":2}}],["termsofservice",{"2":{"449":1,"498":1}}],["terraform",{"2":{"14":1}}],["tel",{"2":{"416":1}}],["text",{"2":{"145":4,"147":5,"160":6,"222":4,"224":5,"286":4,"288":5,"630":2}}],["text=auto",{"2":{"94":1}}],["team",{"2":{"111":1,"188":1,"252":1}}],["teams",{"2":{"86":1}}],["teamsプラン以上の有料契約",{"2":{"84":1}}],["templates",{"2":{"97":1}}],["template",{"2":{"97":2}}],["testcase004",{"2":{"544":1}}],["testcase002",{"2":{"544":1}}],["testcase001",{"2":{"544":1}}],["testcase003",{"2":{"544":3}}],["tester",{"2":{"433":1}}],["test",{"2":{"4":4,"544":9}}],["本チャンネル側のノイズになることはない",{"2":{"666":1}}],["本ガイドラインが皆様のslack活用をより快適にする一助となれば幸いである",{"2":{"683":1}}],["本ガイドラインの策定にあたっては",{"2":{"683":1}}],["本ガイドラインでは氏名に記載することを推奨する",{"2":{"657":1}}],["本ガイドラインはslackを対象に利用方針についてのベースとなる規約を設け",{"2":{"647":1}}],["本章ではパフォーマンス性を高めることを目的としたコーディング規約について記載する",{"2":{"580":1,"631":1}}],["本章では可読性",{"2":{"549":1,"600":1}}],["本書は",{"2":{"548":1,"599":1}}],["本ドキュメントは",{"2":{"493":1}}],["本当に使ってよかった",{"2":{"480":1}}],["本日以降の週間カレンダーを表示する",{"2":{"349":1}}],["本内容は",{"2":{"168":1,"241":1,"304":1}}],["本来",{"2":{"115":1,"192":1,"256":1}}],["本来想定していたリリーススケジュールを破って",{"2":{"69":1}}],["本来想定していたリリーススケジュールから見て",{"2":{"69":1}}],["本来のgitlab",{"2":{"58":1}}],["本紙の範囲を超えるため紹介のみに留める",{"2":{"37":1}}],["本番リリースに対して迅速にパッチを当てて修正する場合に使用するブランチで",{"2":{"56":1}}],["本番と同じ構成でテストするための環境",{"2":{"4":1}}],["本番運用環境",{"2":{"4":1}}],["本規約もスレッドurlの活用を推奨する",{"2":{"668":1}}],["本規約も以下の方針に則る",{"2":{"50":1}}],["本規約を利用するに当たり必須条件ではないが",{"2":{"546":1}}],["本規約をそのままプロジェクトに導入することを推奨する",{"2":{"1":1}}],["本規約の推奨は次のとおり",{"2":{"666":1}}],["本規約の推奨は",{"2":{"452":1}}],["本規約の推奨は以下の通り",{"2":{"669":1}}],["本規約の推奨は以下",{"2":{"83":1}}],["本規約の前提条件に従い作成されています",{"2":{"444":1}}],["本規約の作成においても",{"2":{"111":1,"188":1,"252":1}}],["本規約のコミットメッセージの書式としては",{"2":{"42":1}}],["本規約にあるgitブランチ運用は",{"2":{"81":1}}],["本規約で",{"2":{"474":1,"529":1}}],["本規約でファイルアップロードについて上記の",{"2":{"474":1,"529":1}}],["本規約で紹介した各設計ドキュメントの記載内容を参考にしつつ",{"2":{"405":1}}],["本規約で紹介する設計ドキュメントの位置付け",{"0":{"405":1}}],["本規約で推奨するブランチ戦略は次の2パターンであり",{"2":{"58":1}}],["本規約で想定する",{"2":{"51":1}}],["本規約では対応していないツールが多い場合",{"2":{"546":1}}],["本規約ではルートレベルで認証を設定し",{"2":{"525":1}}],["本規約では記載しないことを推奨とする",{"2":{"523":1,"524":1}}],["本規約ではfeatureブランチから派生するブランチをtopicブランチと定義する",{"2":{"57":1}}],["本規約では",{"2":{"16":1,"58":1,"94":2,"405":1}}],["本規約はこれは想定しない",{"2":{"546":1}}],["本規約は以下の前提で作成されたものである",{"2":{"546":1}}],["本規約は以下の前提で作成されている",{"2":{"404":1}}],["本規約はバージョン3",{"2":{"497":1}}],["本規約は前提条件に基づいて作成されており",{"2":{"493":1}}],["本規約はコード生成などのエコシステムがよく対応している",{"2":{"490":1}}],["本規約はそれらを否定するものではなく",{"2":{"405":1}}],["本規約はgitブランチ管理の標準的な運用ルールをまとめている",{"2":{"48":1}}],["本規約はフューチャーアーキテクトの全ての部署",{"2":{"0":1,"49":1,"445":1,"493":1,"649":1}}],["はslackを見ていないユーザにも通知が飛ぶため",{"2":{"671":1}}],["はsquash",{"2":{"85":1}}],["は非推奨とする",{"2":{"667":1}}],["は非常に多くの用途で用いることがあるため",{"2":{"28":1}}],["は具体的に書く",{"0":{"667":1}}],["は設定によって円マーク",{"2":{"630":1}}],["はなるべく想定件数の少ない表にする",{"2":{"594":1,"643":1}}],["は使用せずに",{"2":{"588":1,"638":1}}],["は使用しない",{"2":{"147":1,"224":1,"288":1}}],["は原則行わない",{"2":{"583":2,"634":2}}],["は原則指定しない",{"2":{"513":1}}],["は省略可能であるが",{"2":{"577":1,"626":1}}],["は省略しない",{"2":{"146":1,"223":1,"287":1}}],["は統一の観点から利用しない",{"2":{"576":1,"625":1}}],["は条件文の右にくるカラムに付与する",{"2":{"571":1}}],["は記述しない",{"2":{"556":1,"607":1}}],["は除去すること",{"2":{"555":1,"606":1}}],["は除去する",{"0":{"555":1,"606":1}}],["は広く受け入れられており",{"2":{"546":1}}],["は存在しない",{"2":{"537":1}}],["はパスパラメータとして再利用できるが",{"2":{"516":1}}],["は次のように複数のバージョンが存在します",{"2":{"490":1}}],["は項目定義がネストすることで縦長な定義になりやすい",{"2":{"488":1}}],["はコメントを示す記号のためである",{"2":{"487":1}}],["は視覚的に見やすく",{"2":{"483":1}}],["はアプリケーション固有の紐づけルールにおいて",{"2":{"474":1,"529":1}}],["は以下の型の詳細情報を示すもので",{"2":{"469":1,"537":1}}],["は以下である",{"2":{"4":1}}],["は必須で指定する",{"2":{"464":1,"470":1,"538":1}}],["は必須で記載する",{"2":{"464":1}}],["は短いものから並べる",{"2":{"461":1}}],["は根幹となる定義部分であり",{"2":{"460":1}}],["は不要と通常は考えらえるので",{"2":{"458":1}}],["は不要と通常は考えられるので",{"2":{"457":1}}],["は無効なユーザードメインです",{"2":{"430":1}}],["は連携先の対向システムが存在するため",{"2":{"417":1}}],["は完了しましたか",{"2":{"375":1,"376":1}}],["はgitlensのコミットグラフだが",{"2":{"180":1}}],["は並列処理",{"2":{"169":1,"242":1,"305":1}}],["は前の行の右端に記述する",{"2":{"160":1}}],["は同メソッド内で値を取り出す場合は極力変数代入しないこと",{"2":{"157":1,"232":1,"296":1}}],["は中間処理",{"2":{"156":1,"231":1,"295":1}}],["は極力変数代入しないこと",{"2":{"156":1,"231":1,"295":1}}],["は利用できる箇所が限定されていることに注意する",{"2":{"543":1}}],["は利用せず",{"2":{"153":1,"228":1,"527":1}}],["は利用しないこと",{"2":{"153":1,"228":1,"292":1}}],["は利用しない",{"2":{"12":1,"146":1,"153":1,"223":1,"228":1,"287":1,"292":1,"513":1}}],["は行わない",{"2":{"132":1,"209":1,"273":1}}],["は価格",{"2":{"115":1,"192":1,"256":1}}],["は作成されない",{"2":{"110":1}}],["は選択できないため",{"2":{"67":1}}],["はdevelop",{"2":{"61":1}}],["はじめに",{"0":{"48":1,"111":1,"188":1,"252":1,"444":1,"493":1,"547":1,"598":1,"647":1},"1":{"494":1,"495":1,"548":1,"599":1},"2":{"648":1}}],["はユーザーが担う役割を表す",{"2":{"34":1}}],["はつけない",{"2":{"34":1}}],["は自動でマルチ",{"2":{"26":1}}],["はマルチ",{"2":{"26":1}}],["は含めない",{"2":{"26":1}}],["は実行環境が重要であるため",{"2":{"25":1}}],["は運用を経てリソース数が増えやすいサービスの一つである",{"2":{"24":1}}],["は基本的に含めない",{"2":{"20":1}}],["は認証が入っているかなどをチェックできる",{"2":{"19":1}}],["は",{"2":{"19":1,"27":1,"65":1,"148":1,"225":1,"289":1,"458":1,"465":1,"469":1,"523":1,"524":1,"537":1,"554":1,"586":1,"605":1,"636":1}}],["は最大",{"2":{"4":1}}],["は考慮しない",{"2":{"1":1}}],["its",{"2":{"544":2}}],["iterator",{"2":{"153":1,"169":1,"174":2,"228":1,"242":1,"247":2,"292":1,"305":1,"310":2}}],["items",{"2":{"159":1,"461":1,"465":1,"544":2}}],["item>",{"2":{"159":1}}],["item",{"2":{"2":1,"73":1,"85":1,"86":1,"88":1,"89":1,"90":1,"91":1,"159":5,"321":1,"322":1,"323":1,"326":1,"461":2}}],["ignore",{"2":{"163":1,"236":1,"299":1}}],["illegalargumentexception",{"2":{"157":2,"232":2,"296":2}}],["i2",{"2":{"154":6,"158":1,"229":6,"233":1,"293":6}}],["i1",{"2":{"154":6,"158":1,"229":6,"233":1,"293":6}}],["imagebinary",{"2":{"514":1}}],["image",{"2":{"457":1,"514":2,"544":5}}],["implements",{"2":{"174":1,"247":1,"310":1}}],["implementation",{"2":{"143":1,"220":1,"284":1}}],["importer",{"2":{"481":1,"545":1}}],["import",{"2":{"22":1,"24":1,"29":3,"132":1,"209":1,"273":1,"321":1,"322":1}}],["immutable",{"2":{"137":1,"153":1,"214":1,"228":1,"278":1}}],["i++",{"2":{"130":2,"140":2,"146":1,"172":3,"174":1,"207":2,"217":2,"223":1,"245":3,"247":1,"271":2,"281":2,"287":1,"308":3,"310":1}}],["isalphabetic",{"2":{"156":3,"231":3,"295":3}}],["isasleep",{"2":{"123":1,"200":1,"264":1}}],["isholiday",{"2":{"151":6,"152":6}}],["iso",{"2":{"465":2}}],["isoff",{"2":{"151":4,"152":4}}],["isopen",{"2":{"125":1,"202":1,"266":1}}],["isempty",{"2":{"134":4,"145":4,"158":1,"211":4,"233":1,"275":4}}],["is",{"2":{"123":1,"200":1,"264":1,"443":1,"465":1,"556":2,"607":2}}],["issueの起票などのみ実施するマネージャーであれば",{"2":{"86":1}}],["issueやprを分類することができるラベルについての利用は自由とする",{"2":{"77":1}}],["issue",{"2":{"44":1,"53":1,"69":12}}],["ioexception",{"2":{"163":1,"236":1,"299":1}}],["io",{"2":{"111":1,"188":1,"252":1,"408":1,"527":1,"544":2}}],["iotsensor",{"2":{"29":2}}],["iot",{"2":{"29":1}}],["ip",{"2":{"28":1,"453":1}}],["iam",{"0":{"32":1,"33":1,"34":1,"35":1,"36":1},"1":{"33":1,"34":1,"35":1,"36":1},"2":{"26":2,"32":5,"33":6,"34":4,"35":5,"36":3,"38":1}}],["invite",{"2":{"651":1}}],["invokevirtual",{"2":{"173":2,"246":2,"309":2}}],["invokespecial",{"2":{"173":1,"246":1,"309":1}}],["in句は",{"2":{"588":1,"638":1}}],["initial",{"2":{"490":1}}],["iniroot",{"2":{"480":1}}],["insert文",{"2":{"561":1}}],["insert",{"0":{"558":1,"609":1},"2":{"480":1,"551":1,"556":1,"570":2,"602":1,"607":1,"620":2}}],["instanceof",{"2":{"145":9,"222":1,"286":1}}],["indent",{"2":{"160":1,"480":2}}],["infrastructure",{"2":{"407":1}}],["infra",{"2":{"397":1}}],["inference",{"0":{"158":1,"233":1},"2":{"158":1,"233":1}}],["information",{"2":{"544":1}}],["infoオブジェクトには",{"2":{"498":1}}],["info",{"0":{"449":1,"498":1,"499":1,"500":1,"501":1},"1":{"450":1,"451":1,"452":1,"499":1,"500":1,"501":1},"2":{"96":1,"447":2,"449":1,"495":1,"544":2}}],["inherit",{"2":{"131":1,"208":1,"272":1}}],["into",{"2":{"558":1,"561":1,"609":1}}],["int32",{"2":{"465":1,"469":1,"537":1,"544":5}}],["int64",{"2":{"465":1,"469":1,"537":1,"544":5}}],["interceptor",{"2":{"476":1,"531":1}}],["interface",{"2":{"167":1,"240":1,"303":1,"402":2}}],["internalservererror",{"2":{"544":5}}],["internal",{"2":{"21":1,"437":1,"464":2,"544":1}}],["internet",{"2":{"18":1}}],["integer>",{"2":{"137":3,"214":3,"278":3}}],["integer",{"0":{"248":1,"311":1},"2":{"135":1,"137":2,"212":1,"214":2,"248":8,"249":6,"276":1,"278":2,"311":8,"312":6,"465":2,"468":1,"469":2,"517":1,"536":1,"537":2,"544":10}}],["int",{"0":{"249":1,"312":1},"2":{"115":2,"120":4,"129":4,"130":2,"133":2,"135":1,"136":5,"137":1,"140":2,"141":1,"146":3,"154":3,"158":1,"159":2,"170":2,"172":3,"174":4,"192":2,"197":4,"206":4,"207":2,"210":2,"212":1,"213":5,"214":1,"217":2,"218":1,"223":3,"229":3,"233":1,"243":2,"245":3,"247":4,"248":1,"249":3,"256":2,"261":4,"270":4,"271":2,"274":2,"276":1,"277":5,"278":1,"281":2,"282":1,"287":3,"293":3,"306":2,"308":3,"310":4,"311":1,"312":3}}],["inputstreamに対する処理を記載",{"2":{"161":1,"162":1,"234":1,"235":1,"297":1,"298":1}}],["inputstream",{"0":{"161":1,"234":1,"297":1},"2":{"161":2,"162":2,"163":4,"234":2,"235":2,"236":4,"297":2,"298":2,"299":4}}],["input",{"0":{"321":1},"2":{"94":2}}],["includes",{"2":{"65":3,"79":1}}],["in",{"0":{"564":1,"587":1,"588":1,"614":1,"637":1,"638":1},"2":{"14":1,"85":1,"158":1,"233":1,"447":1,"463":6,"465":2,"508":6,"517":1,"518":1,"519":1,"539":1,"544":3,"587":4,"588":1,"637":4,"638":1}}],["id=userstate",{"2":{"366":1,"373":2,"376":1}}],["idまたはパスワードが異なります",{"2":{"340":1}}],["ide",{"2":{"159":1}}],["identifier",{"2":{"4":2,"6":1,"8":1,"9":1,"10":1}}],["idについては",{"2":{"44":1}}],["idx",{"2":{"27":5}}],["id",{"2":{"9":1,"33":1,"82":2,"133":2,"138":2,"159":2,"160":4,"210":2,"215":2,"274":2,"279":2,"340":1,"347":1,"352":4,"359":3,"366":2,"373":4,"376":4,"381":1,"388":7,"391":1,"392":1,"447":4,"456":1,"461":2,"462":1,"463":3,"464":1,"465":4,"488":2,"503":2,"505":1,"507":1,"516":1,"544":27}}],["if定義書を参考にする",{"2":{"417":1}}],["if設計書",{"2":{"407":1}}],["ifr02",{"2":{"402":1}}],["ifr01",{"2":{"402":1}}],["ifr",{"2":{"402":1}}],["ifs02",{"2":{"402":1}}],["ifs01",{"2":{"402":1}}],["ifs",{"2":{"402":1}}],["if受信管理",{"2":{"328":2}}],["if01",{"0":{"318":1},"1":{"319":1,"320":1,"321":1,"322":1,"323":1,"324":1,"325":1,"326":1,"327":1,"328":1,"329":1,"330":1,"331":1,"332":1,"333":1,"334":1}}],["if",{"2":{"6":1,"28":2,"65":3,"79":1,"126":2,"130":1,"134":4,"145":2,"146":7,"147":4,"148":2,"151":4,"152":4,"154":2,"160":2,"169":1,"172":3,"175":2,"203":2,"207":1,"211":4,"222":2,"223":7,"224":4,"225":2,"229":2,"242":1,"245":3,"250":2,"267":2,"271":1,"275":4,"286":2,"287":7,"288":4,"289":2,"293":2,"305":1,"308":3,"313":2,"423":1}}],["i",{"0":{"417":1},"2":{"6":1,"126":1,"130":4,"140":6,"146":3,"147":3,"172":12,"174":3,"203":1,"207":4,"217":6,"223":3,"224":3,"245":12,"247":3,"267":1,"271":4,"281":6,"287":3,"288":3,"308":12,"310":3,"407":1,"417":2}}],["リンクが切れてしまう",{"2":{"583":1,"634":1}}],["リマインド時刻",{"2":{"473":1,"541":1}}],["リクエスト制",{"2":{"651":1}}],["リクエスト項目",{"2":{"478":1}}],["リクエストボディやレスポンスボディにおいてオブジェクトがネストする場合",{"2":{"512":1}}],["リクエストボディそのものは通常複数の",{"2":{"509":1}}],["リクエストボディで送る",{"2":{"474":1,"529":1}}],["リクエストボディ",{"2":{"465":1}}],["リクエストボディは",{"2":{"463":1,"509":1,"512":1,"520":1}}],["リクエストボディ自体が未指定だった場合",{"2":{"463":1}}],["リクエストの定義を記載する",{"2":{"463":1}}],["リクエストパラメータの各項目に対して",{"2":{"466":1,"534":1}}],["リクエストパラメータの定義や",{"2":{"415":1}}],["リクエストパラメータが存在する場合は",{"2":{"464":1}}],["リクエストパラメータ",{"2":{"460":1}}],["リクエストヘッダ",{"2":{"456":1}}],["リスト構文",{"2":{"488":1}}],["リスト表示する",{"2":{"381":1}}],["リストワークに以下のカラムでレコードを登録する",{"2":{"331":1}}],["リバート",{"0":{"184":1}}],["リバートを行うことが正しい",{"2":{"69":1}}],["リテラルによって型が明確に判断できます",{"2":{"158":1,"233":1}}],["リテラル定数の名前はその値の意味を正しく表現したものにする",{"2":{"136":1,"213":1,"277":1}}],["リテラル定数",{"2":{"136":1,"213":1,"277":1}}],["リテラルとは",{"2":{"136":1,"213":1,"277":1}}],["リテラルは使用しない",{"2":{"136":1,"213":1,"277":1}}],["リポジトリ直下に",{"2":{"407":1}}],["リポジトリをクローンできる",{"2":{"179":1}}],["リポジトリのクローン",{"0":{"179":1}}],["リポジトリは以下の条件を満たす前提とする",{"2":{"84":1}}],["リポジトリに追加されないようにできる",{"2":{"83":1}}],["リモートワーク時代を生き抜くai",{"2":{"667":1}}],["リモートワーク",{"2":{"647":1}}],["リモートリポジトリをフェッチできる",{"2":{"181":1}}],["リモートリポジトリで削除されたブランチを削除する",{"2":{"82":1}}],["リモートのフェッチ",{"0":{"181":1}}],["リモートの変更を上書きする形で強制プッシュができてしまうため",{"2":{"65":1}}],["リモート追跡ブランチの最新化",{"2":{"109":1,"110":1}}],["リモート追跡ブランチの変更がローカルに全て取り込まれていない場合は",{"2":{"65":1}}],["リモートブランチへプッシュ",{"2":{"79":1}}],["リモートブランチの変更を同期",{"2":{"79":1}}],["リモート側で削除されたブランチをローカル側でも削除する",{"2":{"66":1}}],["リモート側",{"2":{"66":1}}],["リモートにプッシュ済のブランチがあり",{"2":{"65":1}}],["リベースとは",{"2":{"110":1}}],["リベースは全く新しい",{"2":{"65":1}}],["リベースの選択による悪影響は存在しない",{"2":{"65":1}}],["リベース問わず発生するもので",{"2":{"65":1}}],["リベース",{"0":{"102":1,"110":1,"186":1},"2":{"64":1,"65":1,"67":1,"100":1,"108":1}}],["リベースすると",{"2":{"61":1}}],["リリース方式",{"2":{"407":1}}],["リリースノート自動生成という観点でラベルを準備すること",{"2":{"77":1}}],["リリースノートの生成をラベル単位にグルーピングできる",{"2":{"77":1}}],["リリースノートの自動生成での扱いは",{"2":{"70":1}}],["リリースごとに新しいバージョンを示したタグを発行する",{"2":{"73":1}}],["リリースしたアプリケーションやライブラリに何か不具合があれば",{"2":{"72":1}}],["リリースポイントとしてタグを作成する運用とする",{"2":{"72":1}}],["リリースする",{"2":{"63":1}}],["リリースするために使用するブランチで",{"2":{"55":1}}],["リリース作業と開発作業が並行して行う必要があるか",{"2":{"58":1}}],["リリース作業時にdevelopマージを止められる場合に利用する",{"2":{"58":1}}],["リリース作業ブランチ",{"2":{"58":1}}],["リリース作業用途",{"2":{"51":1}}],["リリース前の検証を開発と並行して実施する場合に利用する",{"2":{"55":1}}],["リリースバージョン",{"2":{"51":1}}],["リファクタリング",{"2":{"43":1,"114":1,"191":1,"255":1}}],["リソースが無ければ",{"2":{"546":1}}],["リソースが存在しない",{"2":{"447":1,"464":1}}],["リソース単位にディレクトリを作成して",{"2":{"544":1}}],["リソース解放を必要とするクラスを作成する場合はautocloseableをimplementsする",{"2":{"162":1,"235":1,"298":1}}],["リソース解放を必要とするクラスを利用するときは",{"2":{"162":1,"235":1,"298":1}}],["リソース整理",{"2":{"38":1}}],["リソース作成時に自動生成される",{"2":{"38":1}}],["リソースアクセスコントロールの管理",{"2":{"37":1}}],["リソースの存在チェック",{"2":{"435":1}}],["リソースの解放",{"0":{"162":1,"235":1,"298":1}}],["リソースの命名規約に従う",{"2":{"39":1}}],["リソースの命名には識別子を用いる",{"2":{"4":1}}],["リソースの管理主管部署",{"2":{"38":1}}],["リソースの識別子として機能名などを設定",{"2":{"38":1}}],["リソースのタグ付け",{"2":{"20":1,"37":1}}],["リソース名が単複同形で",{"2":{"465":1}}],["リソース名は",{"2":{"19":1}}],["リソース名に",{"2":{"14":1,"16":1,"20":1}}],["リソース名に含めることで",{"2":{"6":1}}],["リソース名のみでどの環境にあるか素早く判断できるようにする",{"2":{"3":1}}],["リソース名のみで環境を特定できるようにする事で",{"2":{"3":1}}],["リソースによっては名前の文字数の制限が厳しい",{"2":{"4":1}}],["リージョンにつき一意である必要がある",{"2":{"30":1}}],["リージョンにつき",{"2":{"26":1}}],["リージョン間のリソースの関係が疎である場合はリージョン識別子を付与しない",{"2":{"8":1}}],["リージョンを意識する必要のある場合に利用する",{"2":{"8":1}}],["リージョンを分ける",{"2":{"3":1}}],["リージョンコード",{"2":{"2":1,"8":1}}],["リージョン",{"0":{"8":1},"2":{"2":1}}],["同時実行されるとデットロックを起こす可能性があるため",{"2":{"591":1,"640":1}}],["同時にその理由も説明する",{"2":{"546":1}}],["同士の関係だけを示すだけでは業務モデリング図とのダブルメンテナンスになったり",{"2":{"523":1}}],["同様であれば記載しない",{"2":{"462":1}}],["同期",{"2":{"439":1,"440":1}}],["同期必要な設計ドキュメントを更新した",{"2":{"97":1}}],["同期の注意点",{"2":{"61":1}}],["同じ意味の変数名が複数現れることで可読性が下がるため",{"2":{"157":1,"232":1,"296":1}}],["同じ名前のフィールドを宣言すると",{"2":{"142":1,"219":1,"283":1}}],["同じ名前のリソースを作成できない",{"2":{"3":1}}],["同じコードをまとめる作業は",{"2":{"117":1,"194":1,"258":1}}],["同じコードを二度書かない",{"2":{"113":1,"190":1,"254":1}}],["同じコードが現れるようならまとめて一つにし",{"2":{"117":1,"194":1,"258":1}}],["同じコードは二度書かない",{"0":{"117":1,"194":1,"258":1}}],["同じコンフリクトの解消を何度も求められることを解消するため",{"2":{"65":1}}],["同じユーザーを複数の人やシステムで使いまわすと",{"2":{"33":1}}],["同じリージョン内および同じイベントバス上の別のルールと同じ名前を付けることは不可",{"2":{"31":1}}],["同じパラメータグループを複数の",{"2":{"26":1}}],["同一の名前であっても",{"2":{"577":1,"626":1}}],["同一行の最後にコメントをつける",{"2":{"570":1,"620":1}}],["同一カテゴリー内では以下の可視性の順で記述する",{"2":{"144":1,"221":1,"285":1}}],["同一リソースで複数バージョンが稼働する場合はversion2のブランチで対応を行う必要がある",{"2":{"63":1}}],["同一目的の環境が複数必要な場合は",{"2":{"5":1}}],["同一目的の複数環境",{"0":{"5":1}}],["同一",{"2":{"3":1,"16":1}}],["slack上にアップロードされたファイルが",{"2":{"681":1}}],["slackはテキストスニペットに設定されたタイトルをそのままファイル名としてダウンロードするよう動作する",{"2":{"679":1}}],["slackは本来",{"2":{"668":1}}],["slackのファイル共有は便利であるが",{"2":{"681":1}}],["slackの通知設定にて次に示す設定を施すことで防ぐことが可能なので活用すると良い",{"2":{"680":1}}],["slackの書式以外にも",{"2":{"678":1}}],["slackのアップデートにより",{"2":{"676":1}}],["slack内にてストック情報を取り扱うことも可能である",{"2":{"668":1}}],["slackにおける情報ストック機能",{"2":{"668":1}}],["slackでの依頼時に気付けるため",{"2":{"677":1}}],["slackで要件を書かずに",{"2":{"667":1}}],["slackではアカウント名のインクリメンタルサーチが強力である",{"2":{"657":1}}],["slack",{"2":{"649":1,"660":1,"683":2}}],["slackを用いてより良いコミュニケーションを促進することを目的とする",{"2":{"647":1}}],["slack利用ガイドライン",{"0":{"645":1},"2":{"645":1}}],["small",{"2":{"546":1}}],["src",{"2":{"527":1}}],["swagger",{"0":{"448":1},"2":{"444":1,"447":3,"453":1,"454":2,"456":1,"459":1,"469":1,"478":1,"480":4,"481":1,"484":2,"490":3,"491":1,"523":1,"527":6,"537":1,"544":4,"545":1}}],["switch",{"0":{"151":1,"152":1},"2":{"33":1,"146":2,"151":13,"152":9,"223":2,"287":2}}],["svg",{"2":{"408":1}}],["sskds",{"2":{"502":1,"546":1}}],["sss",{"2":{"327":1}}],["ss",{"2":{"321":1,"322":1,"327":1}}],["ssl",{"2":{"455":1}}],["sslcainfo",{"2":{"82":1}}],["sslverify",{"2":{"82":1}}],["sb",{"2":{"172":8,"245":8,"308":8}}],["s5",{"2":{"147":2,"224":2}}],["s4",{"2":{"147":2,"224":2}}],["s2",{"2":{"145":4,"147":8,"154":10,"158":2,"222":4,"224":8,"229":10,"233":2,"286":4,"288":4,"293":10}}],["s1",{"2":{"145":4,"147":8,"154":10,"158":2,"222":4,"224":8,"229":10,"233":2,"286":4,"288":4,"293":10}}],["sato",{"2":{"677":1}}],["saturday",{"2":{"151":7,"152":2}}],["sample",{"2":{"544":1}}],["samplearray",{"2":{"136":2,"213":2,"277":2}}],["sandbox",{"2":{"453":1}}],["saas",{"2":{"33":1}}],["space",{"2":{"480":1}}],["sparkles",{"2":{"45":1}}],["specifying",{"2":{"544":2}}],["specification",{"0":{"491":1},"2":{"413":1,"434":2,"444":1,"447":1,"457":1,"463":1,"490":8,"493":2,"546":2}}],["specific",{"2":{"143":1,"220":1,"284":1}}],["spectral",{"2":{"480":1}}],["spring",{"2":{"127":2,"204":2,"268":2,"476":1,"531":1}}],["size",{"2":{"172":3,"174":3,"245":3,"247":3,"308":3,"310":3,"474":1,"480":1,"529":1}}],["simpledateformat",{"2":{"149":2,"226":2,"290":2}}],["simpledateformatまたはdatetimeformatterを使う",{"2":{"149":1,"226":1,"290":1}}],["since",{"2":{"131":1,"208":1,"272":1}}],["singleline",{"2":{"160":2}}],["single",{"2":{"85":1}}],["sites",{"2":{"111":1,"188":1,"252":1}}],["signum",{"2":{"175":4,"250":4,"313":4}}],["signumを利用したほうが効率的です",{"2":{"175":1,"250":1,"313":1}}],["signumを利用します",{"2":{"175":1,"250":1,"313":1}}],["signedurl",{"2":{"514":3}}],["signed",{"2":{"88":1,"474":5,"475":2,"514":1,"529":5,"530":2}}],["sign",{"2":{"85":1}}],["sqltbl1",{"2":{"581":3,"632":3}}],["sqlt1",{"2":{"571":1}}],["sqlfrom",{"2":{"578":1,"627":1}}],["sqlcase",{"2":{"563":1,"613":1}}],["sqland\\txxx\\t=\\t",{"2":{"562":1,"612":1}}],["sqlmerge",{"2":{"561":1}}],["sqldelete",{"2":{"560":1,"611":1}}],["sqlupdate",{"2":{"559":1,"610":1,"630":2}}],["sqlinsert",{"2":{"558":1,"609":1}}],["sqlwhere",{"2":{"556":1,"576":1,"578":1,"607":1,"625":1,"627":1}}],["sqlselect",{"2":{"556":1,"557":1,"566":1,"568":1,"569":1,"586":2,"607":1,"608":1,"616":1,"618":1,"619":1,"636":2}}],["sql",{"0":{"549":1,"556":1,"580":1,"596":1,"600":1,"607":1,"631":1},"1":{"550":1,"551":1,"552":1,"553":1,"554":1,"555":1,"556":1,"557":2,"558":2,"559":2,"560":2,"561":2,"562":2,"563":2,"564":2,"565":2,"566":2,"567":2,"568":2,"569":2,"570":1,"571":1,"572":1,"573":1,"574":1,"575":1,"576":1,"577":1,"578":1,"579":1,"581":1,"582":1,"583":1,"584":1,"585":1,"586":1,"587":1,"588":1,"589":1,"590":1,"591":1,"592":1,"593":1,"594":1,"601":1,"602":1,"603":1,"604":1,"605":1,"606":1,"607":1,"608":2,"609":2,"610":2,"611":2,"612":2,"613":2,"614":2,"615":2,"616":2,"617":2,"618":2,"619":2,"620":1,"621":1,"622":1,"623":1,"624":1,"625":1,"626":1,"627":1,"628":1,"629":1,"630":1,"632":1,"633":1,"634":1,"635":1,"636":1,"637":1,"638":1,"639":1,"640":1,"641":1,"642":1,"643":1},"2":{"394":1,"411":1,"548":2,"550":1,"553":3,"554":1,"556":5,"561":1,"567":1,"570":4,"581":2,"587":1,"591":1,"596":1,"599":2,"601":1,"604":3,"605":1,"607":5,"617":1,"620":4,"632":2,"637":1}}],["squash",{"2":{"85":1,"100":1,"103":1,"105":4,"107":2}}],["sqs",{"0":{"30":1},"2":{"30":1,"36":1}}],["some",{"2":{"527":1}}],["sorted",{"2":{"156":3,"231":3,"295":3}}],["sort",{"2":{"153":3,"228":3,"292":3}}],["sort=",{"2":{"74":1}}],["source",{"2":{"14":1,"31":2,"66":1,"92":2,"105":1,"177":1,"179":1,"180":1,"181":1,"182":1,"183":3,"527":1}}],["southeast",{"2":{"8":1}}],["shiba",{"2":{"544":2}}],["shift",{"2":{"480":2}}],["shpaths",{"2":{"460":1}}],["shdocs",{"2":{"400":1,"407":1}}],["show",{"2":{"180":1}}],["shortday",{"2":{"151":2}}],["shortname",{"2":{"136":2,"213":2,"277":2}}],["sharing",{"2":{"476":1,"531":1}}],["sha",{"2":{"105":1}}],["sha=`git",{"2":{"105":1}}],["sha2",{"2":{"82":1}}],["sh$",{"2":{"74":1}}],["sh",{"2":{"53":1,"73":1,"75":1,"79":1,"82":1,"94":1,"397":1,"407":1}}],["system",{"2":{"38":1,"125":1,"146":1,"147":2,"148":2,"160":3,"202":1,"223":1,"224":2,"225":2,"266":1,"287":1,"288":2,"289":2,"450":1,"499":1}}],["scott",{"2":{"111":1,"188":1,"252":1}}],["scheme",{"2":{"522":1,"544":2}}],["schemes",{"0":{"455":1},"2":{"447":2,"455":2}}],["schemas",{"0":{"513":1},"2":{"512":3,"513":1,"514":7,"539":2,"544":4}}],["schema",{"2":{"29":1,"447":5,"457":1,"463":3,"464":10,"514":5,"517":1,"518":1,"519":1,"521":1,"539":1,"544":11}}],["schedule",{"2":{"31":2,"352":1}}],["scatter",{"2":{"24":2}}],["summary",{"0":{"505":1},"2":{"447":1,"457":1,"462":3,"503":5,"505":1,"544":4}}],["summer",{"2":{"127":2,"204":2,"268":2}}],["sumvalue",{"2":{"129":3,"206":3,"270":3}}],["sum",{"2":{"129":1,"206":1,"270":1}}],["sunday",{"2":{"151":12,"152":4}}],["sun",{"2":{"111":2,"188":2,"252":2}}],["suggest",{"2":{"85":1}}],["support",{"2":{"63":1,"523":1}}],["sub",{"2":{"142":3,"219":3,"283":3,"544":8}}],["subjectについては必須の要素となり",{"2":{"44":1}}],["subjectについては必須とし",{"2":{"42":1}}],["subject",{"0":{"44":1},"2":{"42":1}}],["subject>",{"2":{"42":1}}],["subnet",{"2":{"18":1}}],["successrate",{"2":{"24":1}}],["s3presignedurl",{"2":{"474":1,"529":1}}],["s3",{"0":{"28":1},"2":{"14":1,"18":1,"28":2,"31":2,"36":3,"147":2,"224":2,"321":1,"322":1,"328":4}}],["s3bucket",{"2":{"4":1}}],["snake",{"2":{"12":1,"36":1,"463":1}}],["s",{"2":{"6":1,"126":2,"130":2,"134":16,"145":4,"146":13,"147":12,"149":1,"151":2,"153":4,"156":8,"158":3,"160":1,"169":2,"172":4,"174":2,"181":1,"203":2,"207":2,"211":16,"223":13,"224":12,"226":1,"228":4,"231":8,"233":3,"242":2,"245":4,"247":2,"248":6,"249":6,"267":2,"271":2,"275":16,"287":13,"288":10,"290":1,"292":4,"295":8,"305":2,"308":4,"310":2,"311":6,"312":6,"465":1,"570":1,"620":1,"630":2}}],["sex",{"2":{"544":11}}],["search",{"2":{"544":2}}],["searchuser",{"2":{"462":1}}],["season",{"2":{"127":2,"204":2,"268":2}}],["sensitive",{"2":{"324":1}}],["sendrawemail",{"2":{"36":1}}],["sendemail",{"2":{"36":1}}],["send",{"0":{"669":1},"2":{"36":1,"402":1,"669":2}}],["separated",{"2":{"160":4}}],["setを行った場合",{"2":{"153":1,"228":1}}],["set等による値の操作が可能なlistです",{"2":{"153":1,"228":1}}],["setter",{"2":{"138":2,"215":2,"279":2}}],["settings",{"2":{"88":1,"416":1}}],["set",{"2":{"123":1,"153":1,"200":1,"228":1,"264":1,"292":1,"444":1,"493":1,"546":2,"559":1,"610":1,"630":2}}],["semi",{"0":{"106":1},"2":{"104":1}}],["select~",{"2":{"588":2,"638":2}}],["selecty",{"2":{"160":2}}],["selectx",{"2":{"160":2}}],["select",{"0":{"557":1,"591":1,"608":1,"640":1},"2":{"90":2,"160":4,"551":1,"553":1,"566":2,"567":4,"570":2,"576":1,"577":1,"586":1,"587":1,"591":2,"602":1,"604":1,"616":2,"617":4,"620":2,"625":1,"626":1,"636":1,"637":1,"640":1}}],["secretsを導入する",{"2":{"83":1}}],["secretsを用いることで",{"2":{"83":1}}],["secrets",{"0":{"83":1}}],["securityschemes",{"0":{"522":1},"2":{"512":1,"522":1,"544":2}}],["securitydefinitions",{"0":{"456":1},"2":{"456":1}}],["security",{"0":{"91":1,"456":1,"511":1,"525":1},"2":{"2":1,"18":1,"91":1,"456":3,"495":1,"503":1,"511":2,"544":2}}],["ses",{"2":{"36":3}}],["session",{"2":{"34":1,"511":1}}],["serial",{"2":{"26":1}}],["servlet",{"2":{"476":1,"531":1}}],["service",{"2":{"18":2,"28":1,"35":1,"36":2,"484":2}}],["servers",{"0":{"502":1},"2":{"495":1,"503":1,"544":2}}],["serverless",{"2":{"474":1,"529":1}}],["server",{"2":{"6":1,"437":1,"464":2,"502":4,"510":1,"544":1}}],["segment",{"2":{"24":1}}],["stoplightio",{"2":{"543":1}}],["stoplight",{"2":{"507":2}}],["stores",{"2":{"459":1}}],["store",{"2":{"347":1,"459":1,"527":2}}],["strict",{"2":{"510":1}}],["stringbuffer",{"2":{"172":4,"245":4,"308":4}}],["stringbuilderを利用した場合は最適化はされず",{"2":{"173":1,"246":1,"309":1}}],["stringbuilder",{"2":{"147":3,"172":4,"173":8,"224":3,"245":4,"246":8,"288":1,"308":4,"309":8}}],["stringjoiner",{"2":{"172":1,"245":1,"308":1}}],["string>>",{"2":{"153":1,"228":1,"292":1}}],["string>",{"2":{"129":2,"134":2,"137":2,"156":7,"158":4,"169":4,"170":6,"206":2,"211":2,"214":2,"231":7,"233":4,"242":4,"243":6,"270":2,"275":2,"278":2,"295":7,"305":4,"306":6}}],["string",{"0":{"248":1,"249":1,"311":1,"312":1},"2":{"123":6,"125":3,"126":1,"129":3,"131":1,"132":1,"134":9,"136":4,"137":1,"140":1,"142":2,"145":11,"146":4,"147":13,"149":1,"153":3,"154":2,"156":2,"158":1,"160":11,"169":4,"170":5,"172":12,"173":12,"174":2,"200":6,"202":3,"203":1,"206":3,"208":1,"209":1,"211":9,"213":4,"214":1,"217":1,"219":2,"222":2,"223":4,"224":13,"226":1,"228":3,"229":2,"231":2,"233":1,"242":4,"243":5,"245":12,"246":12,"247":2,"248":4,"249":4,"264":6,"266":3,"267":1,"270":3,"272":1,"273":1,"275":9,"277":4,"278":1,"281":1,"283":2,"286":2,"287":4,"288":13,"290":1,"292":3,"293":2,"295":2,"305":4,"306":5,"308":12,"309":12,"310":2,"311":4,"312":4,"324":3,"432":1,"447":5,"463":4,"465":11,"469":4,"471":1,"472":1,"473":1,"514":3,"518":1,"519":1,"521":1,"537":5,"539":2,"540":1,"541":1,"544":30}}],["streamは使用済のためエラーになる",{"2":{"156":1,"231":1,"295":1}}],["stream2",{"2":{"156":2,"231":2,"295":2}}],["stream1",{"2":{"156":2,"231":2,"295":2}}],["streamapi",{"2":{"156":1,"169":1,"231":1,"242":1,"295":1,"305":1}}],["stream",{"0":{"156":1,"169":1,"231":1,"242":1,"295":1,"305":1},"2":{"147":1,"156":18,"169":7,"224":1,"231":18,"242":7,"288":1,"295":18,"305":7}}],["streams",{"0":{"29":1}}],["str",{"2":{"145":2}}],["style",{"2":{"111":1,"158":1,"160":1,"188":1,"233":1,"252":1,"480":1,"488":1}}],["stephan",{"2":{"111":1,"188":1,"252":1}}],["st",{"2":{"82":1}}],["standards",{"0":{"491":1,"596":1}}],["standard",{"2":{"402":1}}],["startuml",{"2":{"328":1,"408":1,"421":1}}],["startat",{"2":{"38":1}}],["stash",{"0":{"187":1}}],["stage",{"2":{"183":2}}],["staging",{"2":{"4":1,"453":1,"502":3}}],["stale",{"2":{"88":1}}],["static",{"2":{"125":1,"129":1,"132":2,"133":1,"136":3,"137":11,"139":1,"144":3,"147":2,"173":7,"202":1,"206":1,"209":2,"210":1,"213":3,"214":11,"216":1,"221":3,"224":2,"246":7,"266":1,"270":1,"273":2,"274":1,"277":3,"278":11,"280":1,"285":3,"288":2,"309":7}}],["status",{"2":{"82":1,"88":1,"376":1,"465":2}}],["statement",{"2":{"36":2}}],["stg2",{"2":{"5":1}}],["stg1",{"2":{"5":1}}],["stg",{"2":{"3":1,"4":2,"14":2,"18":8,"19":2,"20":1,"21":2,"22":4,"24":3,"25":2,"26":2,"27":2,"28":3,"29":3,"30":2,"31":3,"35":2,"36":4}}],["driveのurl共有時プレビュー表示について",{"2":{"681":1}}],["drive側で権限設定が可能",{"2":{"681":1}}],["drive側で適切な権限に絞り込む",{"2":{"681":1}}],["driveなどにファイルをアップロードする",{"2":{"681":1}}],["drawio",{"2":{"408":3}}],["draw",{"2":{"408":1}}],["dmグループの活用を推奨する",{"2":{"680":1}}],["dmの利用を推奨するケース",{"2":{"665":1}}],["dmよりチャンネルでのやり取りを推奨する",{"2":{"665":1}}],["dmはなるべく避ける",{"0":{"665":1}}],["dml",{"2":{"556":1,"607":1}}],["django",{"2":{"546":1}}],["dup",{"2":{"173":1,"246":1,"309":1}}],["display",{"2":{"657":1}}],["distinct",{"0":{"586":1,"636":1},"2":{"586":2,"636":2}}],["dismiss",{"2":{"88":1}}],["dividedを参照すること",{"2":{"544":1}}],["division",{"2":{"157":1,"232":1,"296":1}}],["diagrams",{"2":{"408":2}}],["diffを用いた差分が見れるメリットも下がる",{"2":{"406":1}}],["day=$",{"2":{"321":1,"322":1}}],["dayofweek",{"2":{"151":5,"152":2}}],["day",{"2":{"151":10,"152":4}}],["daku10",{"2":{"97":1}}],["datetime",{"2":{"465":1}}],["dateformat",{"2":{"149":2,"226":2,"290":2}}],["date",{"2":{"88":1,"149":3,"151":14,"152":14,"226":3,"290":3,"324":1,"325":1,"416":1,"447":1,"465":5,"469":4,"490":1,"514":1,"537":4,"544":12,"581":1,"632":1}}],["database",{"2":{"328":1,"408":3,"421":1}}],["data",{"0":{"29":1},"2":{"14":1,"159":1,"474":1,"521":1,"529":1,"630":2}}],["dynamodb",{"0":{"27":1},"2":{"27":4}}],["ddthh",{"2":{"327":1}}],["dd",{"2":{"26":1,"131":1,"149":1,"208":1,"226":1,"272":1,"290":1,"321":2,"322":2,"324":1,"501":1}}],["dwh",{"2":{"16":1}}],["dog10005",{"2":{"544":1}}],["dog10004",{"2":{"544":1}}],["dog10003",{"2":{"544":1}}],["dog10002",{"2":{"544":1}}],["dog10001",{"2":{"544":1}}],["dog",{"2":{"544":5}}],["download",{"2":{"514":1}}],["downloads",{"2":{"111":2,"188":2,"252":2}}],["document",{"2":{"490":1,"546":1}}],["docs",{"0":{"399":1},"1":{"400":1,"401":1,"402":1,"403":1},"2":{"37":1,"43":1,"45":3,"77":1,"97":1,"151":1,"152":1,"397":1,"398":1,"407":2,"481":1,"545":1}}],["domain",{"2":{"430":1}}],["double",{"2":{"124":6,"136":5,"159":13,"201":6,"213":5,"265":6,"277":5,"469":1,"537":1}}],["do",{"2":{"14":1,"88":1,"118":2,"146":1,"195":2,"223":1,"259":2,"287":1}}],["d",{"2":{"9":2,"130":2,"146":6,"207":2,"223":6,"271":2,"287":6,"586":8,"636":8}}],["del",{"2":{"570":2,"620":2}}],["deleteの何れかになる",{"2":{"607":1}}],["deleteuser",{"2":{"462":1}}],["delete",{"0":{"441":1,"560":1,"611":1},"2":{"66":2,"85":1,"92":3,"435":1,"461":1,"463":1,"503":1,"508":1,"546":1,"551":1,"556":1,"570":1,"584":1,"602":1,"620":1,"635":1}}],["details",{"2":{"457":1,"465":1,"544":4}}],["detail",{"2":{"416":5,"465":2,"544":5}}],["desription",{"2":{"463":1}}],["describing",{"2":{"509":1}}],["descriptionには区分値の論理名を記載する",{"2":{"471":1,"539":1}}],["descriptionは",{"2":{"416":1}}],["description",{"0":{"500":1,"506":1},"2":{"334":1,"416":2,"447":13,"449":2,"457":2,"459":4,"462":2,"463":2,"464":11,"465":17,"468":1,"471":1,"472":1,"473":1,"487":3,"498":2,"502":5,"503":1,"506":1,"510":4,"514":5,"517":1,"519":1,"521":1,"522":1,"526":5,"527":4,"536":1,"539":1,"540":1,"541":1,"544":18}}],["desctiption",{"0":{"451":1}}],["desc",{"2":{"170":2,"243":2,"306":2,"618":1}}],["dest",{"2":{"28":1}}],["definition",{"2":{"527":1}}],["definitions",{"0":{"465":1},"2":{"447":7,"463":3,"464":10,"465":2,"487":1}}],["def",{"2":{"160":2}}],["default",{"2":{"66":1,"85":1,"92":1,"111":1,"151":4,"188":1,"223":2,"252":1,"287":2,"447":1,"464":5,"468":2,"536":2}}],["decode2",{"2":{"146":1,"223":1,"287":1}}],["decode1",{"2":{"146":1,"223":1,"287":1}}],["decode",{"2":{"146":1,"223":1,"287":1}}],["declaration",{"2":{"132":1,"209":1,"273":1}}],["demand",{"2":{"132":1,"209":1,"273":1}}],["department",{"2":{"586":2,"636":2}}],["deprecated",{"2":{"503":1}}],["deprecatedで指定されたメソッドは利用しないこと",{"2":{"129":1,"206":1,"270":1}}],["dept",{"2":{"157":2,"232":2,"296":2,"586":6,"636":6}}],["dependabot",{"2":{"91":4}}],["deploy",{"2":{"31":1}}],["device",{"2":{"324":1,"325":1}}],["devicetype",{"2":{"29":1}}],["devleop2",{"2":{"61":1}}],["develop`",{"2":{"105":1}}],["developの場合はsquash",{"2":{"88":1}}],["developなどのマージ時に必要",{"2":{"85":1}}],["developからdevelop2へマージ後",{"2":{"62":1}}],["developからdevelop2へマージコミットする",{"2":{"62":1}}],["developブランチに対し",{"2":{"88":1}}],["developブランチにfeatureブランチの変更を取り込む方法に記載した3パターンのうち",{"2":{"66":1}}],["developブランチの履歴をクリーンに保てるため",{"2":{"66":1}}],["developブランチの変更を取り込む場合",{"2":{"65":1}}],["developブランチの変更をfeatureブランチに取り込む方法に記載した2つの方法のうち",{"2":{"65":1}}],["developブランチからさらに変更をリベースで取り込んだ場合",{"2":{"65":1}}],["developブランチからfeatureブランチへ変更を取り込む",{"0":{"65":1},"2":{"64":1}}],["developブランチが更新された場合",{"2":{"65":1}}],["developブランチがあると必要になる可能性がある",{"2":{"56":1}}],["developブランチを複数作成する場合",{"0":{"61":1},"1":{"62":1},"2":{"60":1}}],["developブランチ",{"0":{"54":1}}],["develop2からdevelopへのマージとすると以下のメリットがある",{"2":{"62":1}}],["develop2からdevelopにマージを行い",{"2":{"62":1}}],["develop2をmainブランチに反映させる手順も考えられるが",{"2":{"62":1}}],["develop2を削除する",{"2":{"62":1}}],["develop2のリリース手順",{"0":{"62":1}}],["develop2",{"2":{"51":1,"61":4}}],["develop",{"2":{"36":2,"51":4,"58":3,"59":3,"61":3,"62":1,"67":1,"79":1,"85":2,"105":1,"109":3,"110":3,"453":2,"502":1}}],["developerguide",{"2":{"481":1,"545":1}}],["developers",{"2":{"444":1,"493":1,"546":2}}],["developer",{"2":{"34":2,"433":1}}],["development",{"2":{"4":1,"97":1,"502":1}}],["dev3",{"2":{"5":1}}],["dev2",{"2":{"5":1}}],["dev1",{"2":{"5":1}}],["dev",{"2":{"3":1,"4":2,"34":3,"95":1,"97":1,"453":1,"502":1}}],["deny",{"2":{"2":1}}],["dba",{"2":{"585":1,"590":1,"592":1,"593":2,"641":1,"642":2}}],["dbパラメータグループの命名規約",{"2":{"26":1}}],["db",{"0":{"329":1,"424":1},"1":{"330":1,"331":1,"332":1,"425":1,"426":1,"427":1},"2":{"1":1,"6":2,"26":6,"328":7,"421":5,"466":1,"470":1,"534":1,"538":1,"546":1,"556":1,"561":1,"590":1,"607":1}}],["権限についての注意",{"2":{"462":1}}],["権限は",{"2":{"86":2}}],["権限を",{"2":{"86":1}}],["権限",{"2":{"2":1}}],["murata",{"2":{"675":1}}],["muscle",{"0":{"395":1},"1":{"396":1,"397":1,"398":1},"2":{"395":1,"402":1,"403":1}}],["multipart",{"2":{"474":1,"529":1}}],["multiple",{"2":{"97":1}}],["multiline",{"2":{"160":2}}],["mk",{"2":{"394":1,"411":1}}],["msg01",{"0":{"428":1},"1":{"429":1,"430":1}}],["msg",{"2":{"340":1,"347":1,"373":2,"376":2,"381":1,"388":3}}],["ms",{"2":{"169":2,"170":5,"172":4,"173":2,"174":6,"242":2,"243":5,"245":4,"246":2,"247":6,"249":2,"305":2,"306":5,"308":4,"309":2,"310":6,"312":2}}],["mod",{"2":{"570":2,"620":2}}],["modifier",{"2":{"2":1}}],["moveitemlist",{"2":{"462":1}}],["mordal",{"2":{"402":1}}],["more",{"2":{"181":1,"182":1,"183":1,"527":1}}],["month=$",{"2":{"321":1,"322":1}}],["monday",{"2":{"151":6,"152":2}}],["mycalendar",{"2":{"151":4,"152":4}}],["my",{"2":{"145":1,"222":1,"286":1,"658":1}}],["middleware",{"2":{"476":1,"531":1}}],["mime",{"2":{"457":1,"458":1}}],["mimeタイプ",{"2":{"160":1}}],["miniaturedachshund",{"2":{"544":2}}],["minitems",{"2":{"470":1,"538":1}}],["minimum",{"2":{"465":1,"468":1,"470":2,"536":1,"538":2}}],["minor",{"2":{"452":1,"501":1}}],["minlength",{"2":{"447":4,"463":3,"465":10,"470":1,"538":1}}],["minusdays",{"2":{"151":2,"152":2}}],["mi",{"2":{"136":4,"213":4,"277":4,"327":1}}],["miletometre",{"2":{"136":2,"213":2,"277":2}}],["mile",{"2":{"136":2,"213":2,"277":2}}],["microsystems",{"2":{"111":2,"188":2,"252":2}}],["mirrorで誤ってリモートブランチを破壊しないようにする",{"2":{"85":1}}],["mirai",{"2":{"33":1,"657":1,"667":1,"674":2,"675":1}}],["mercari",{"2":{"683":1}}],["mercan",{"2":{"683":1}}],["merging",{"2":{"85":2,"88":5}}],["mergeのテーブル名記述箇所には単数行コメントでテーブルの論理名を記載する",{"2":{"570":1,"620":1}}],["mergeのカラム名記述箇所には単数行コメントでカラムの論理名を記載する",{"2":{"570":1,"620":1}}],["mergeの何れかになる",{"2":{"556":1}}],["mergeを求めるため有効にする",{"2":{"88":1}}],["mergeを推奨",{"2":{"85":1}}],["merge",{"0":{"97":1,"105":1,"106":1,"107":1,"185":1,"561":1},"2":{"85":1,"88":1,"97":2,"100":3,"101":1,"102":1,"103":1,"104":3,"105":6,"106":1,"107":2,"109":2,"327":1,"566":1}}],["menus",{"2":{"388":1}}],["menu",{"2":{"359":1}}],["meta",{"2":{"521":1}}],["methodb",{"2":{"158":1,"233":1}}],["methoda",{"2":{"158":1,"233":1}}],["method",{"0":{"504":1,"505":1,"506":1,"507":1,"508":1,"509":1,"510":1,"511":1},"2":{"143":1,"220":1,"284":1,"464":1}}],["metre",{"2":{"136":2,"213":2,"277":2}}],["message",{"2":{"129":1,"160":17,"206":1,"270":1,"465":1,"544":2}}],["memo",{"2":{"4":1,"6":1,"45":1,"85":1,"86":1,"88":1,"89":1,"90":1,"91":1,"323":1,"324":1,"326":1,"352":1,"359":1,"366":1,"373":1,"388":1}}],["m",{"2":{"73":1,"75":4,"151":2,"416":9,"432":1}}],["md",{"2":{"42":1,"97":4,"400":1,"407":1,"463":1,"506":1,"683":1}}],["matched",{"2":{"561":2}}],["matching",{"2":{"88":1}}],["male",{"2":{"544":3}}],["max",{"2":{"544":1}}],["maxitems",{"2":{"470":1,"538":1,"544":1}}],["maximum",{"2":{"465":1,"468":1,"470":2,"536":1,"538":2,"544":1}}],["maxlength",{"2":{"447":4,"463":3,"465":10,"470":3,"538":3,"544":18}}],["major",{"2":{"452":1,"501":1}}],["map",{"2":{"129":3,"137":5,"153":3,"156":10,"157":3,"158":1,"159":3,"206":3,"214":5,"228":3,"231":10,"232":3,"233":1,"270":3,"278":4,"292":3,"295":10,"296":3}}],["macosのos固有設定や",{"2":{"95":1}}],["macなど複数存在することは少なくなく",{"2":{"94":1}}],["marketplace",{"2":{"90":1}}],["markdown設計書には",{"2":{"409":2}}],["markdownで表を記載することは可能ですが",{"2":{"406":1}}],["markdown",{"2":{"47":1,"98":1,"317":3,"405":1,"407":1,"418":1,"492":1,"597":2,"645":1}}],["mano",{"2":{"662":1,"675":1}}],["many",{"2":{"85":1,"544":1}}],["manager",{"2":{"34":1}}],["mainなど永続的なブランチに保護設定を追加する",{"2":{"88":1}}],["maintain",{"2":{"86":1}}],["maintainer",{"2":{"34":1}}],["maindeveloprelease",{"2":{"58":1}}],["maindevelopfeaturetopic",{"2":{"58":1}}],["mainブランチの場合はoffとするが",{"2":{"88":1}}],["mainブランチにてタグを作成する",{"2":{"73":1}}],["mainブランチに対する即時修正",{"2":{"51":1}}],["mainブランチでタグを打つこととする",{"2":{"59":1}}],["mainブランチをdevelopブランチへマージ後",{"2":{"55":1}}],["mainブランチ",{"0":{"52":1},"2":{"63":1}}],["main",{"2":{"51":5,"56":2,"59":2,"61":1,"67":1,"85":1,"463":1,"527":1}}],["masterブランチのマージコミットにリリースタグを打ち",{"2":{"55":1}}],["masterからmainに改名された経緯を持つ",{"2":{"52":1}}],["master",{"2":{"2":1,"7":1,"527":1,"683":1}}],["mm",{"2":{"26":1,"131":1,"149":1,"208":1,"226":1,"272":1,"290":1,"321":3,"322":3,"324":1,"327":1,"473":1,"501":1,"541":1}}],["アクティビティ",{"2":{"676":1}}],["アクセサから宣言へのジャンプを使用すると",{"2":{"159":1}}],["アクセサメソッドやコンストラクタなど",{"2":{"124":1,"201":1,"265":1}}],["アクセスキーなどの機密情報が含まれる可能性のあるコードなどをgit",{"2":{"83":1}}],["アクセス制御",{"2":{"38":1}}],["アクセス修飾子",{"0":{"10":1},"2":{"2":1}}],["アップロードするために複数の",{"2":{"474":1,"529":1}}],["アップロード用に用いる",{"2":{"474":1,"529":1}}],["アロー構文を使用しない",{"2":{"152":1}}],["アロー構文の",{"2":{"151":1}}],["アスタリスクとスラッシュは",{"2":{"570":1,"620":1}}],["アスタリスク",{"2":{"132":1,"209":1,"273":1}}],["アノテーション引数との混在による可読性の低下の回避",{"2":{"159":1}}],["アノテーションを付与したときでも比較的読みやすい",{"2":{"159":1}}],["アノテーションを指定する",{"2":{"142":1,"219":1,"283":1}}],["アノテーション",{"2":{"129":1,"206":1,"270":1}}],["アドレス",{"2":{"28":1}}],["アンダーバー",{"2":{"31":1}}],["アンダースコア区切りを推奨する",{"2":{"33":1}}],["アンダースコア",{"2":{"28":1,"124":1,"201":1,"265":1}}],["アンダースコアを許容しない",{"2":{"12":1}}],["アンチパターンのため構成を見直すべきと考える",{"2":{"20":1}}],["アベイラビリティゾーン",{"0":{"9":1}}],["アベイラビリティーゾーン",{"2":{"2":1}}],["アジアパシフィック",{"2":{"8":4}}],["アプリ上でジム公認のトレーナーを検索",{"2":{"396":1}}],["アプリサーバに",{"2":{"6":1}}],["アプリケーションコードから",{"2":{"546":1}}],["アプリケーションの",{"2":{"474":1,"529":1}}],["アプリケーションのバージョン",{"2":{"452":1,"501":1}}],["アプリケーションからfinalize",{"2":{"164":1,"237":1,"300":1}}],["アプリケーション",{"2":{"48":1,"76":1}}],["アプリケーションとしての役割",{"2":{"6":1}}],["アプリケーションを構成する要素には役割がある",{"2":{"6":1}}],["アカウント登録時に各自のアイコン画像を積極的に登録する",{"2":{"656":1}}],["アカウントアイコンを設定する",{"0":{"656":1}}],["アカウント種別については",{"2":{"462":1}}],["アカウント種別",{"2":{"447":1,"465":2}}],["アカウントに対して",{"2":{"33":1}}],["アカウントに関与する人が単一の会社に属する人だけである場合は",{"2":{"33":1}}],["アカウントであれば同名が許容",{"2":{"29":1}}],["アカウント",{"2":{"26":1,"30":1}}],["アカウント構成を完全には理解できていない可能性がある",{"2":{"3":1}}],["アカウントかつ同一リージョン内には",{"2":{"3":1}}],["アカウントを作成する",{"2":{"3":1}}],["を定期的に確認するような工夫をする",{"2":{"676":1}}],["を定義している場合",{"2":{"503":1}}],["を定義する",{"2":{"467":1,"468":1,"512":2,"517":1,"519":1,"535":1,"536":1}}],["を追加",{"2":{"672":1}}],["を追加する必要が出てくる",{"2":{"465":1}}],["をやめたほうがいい理由",{"2":{"667":1}}],["を知りたい場面も多い",{"2":{"664":1}}],["を超えるような長い",{"2":{"587":1,"637":1}}],["を1文字入れる",{"2":{"565":1,"615":1}}],["を確認しないと行えないチェックである",{"2":{"546":1}}],["を確認した",{"2":{"97":1}}],["を自動生成する開発手法も存在するが",{"2":{"546":1}}],["を対象とする",{"2":{"546":1}}],["を編集する場合は",{"2":{"543":1}}],["を論理的にグループ化するためのタグを定義する",{"2":{"526":1}}],["を書いたと言って",{"2":{"523":1}}],["を跨いで再利用されるものではないため",{"2":{"509":1,"510":1}}],["を跨いでの設定は行わない",{"2":{"26":1}}],["を識別するための一意な文字列を記載する",{"2":{"507":1}}],["を不用意に公開したくないケースが多く",{"2":{"502":1}}],["をグルーピングするためのタグ",{"2":{"495":1}}],["をレスポンスの",{"2":{"475":1,"530":1}}],["を設定する",{"0":{"657":1}}],["を設定するとあるが",{"2":{"457":1}}],["を設計すれば良いため",{"2":{"474":1,"529":1}}],["を推奨する",{"2":{"474":1,"484":1,"529":1}}],["を取得",{"2":{"474":1,"529":1}}],["を発行し",{"2":{"474":1,"529":1}}],["を扱うのとほぼ変わらないため楽",{"2":{"474":1,"529":1}}],["を以前より大きい値に変更してはならない",{"2":{"470":1,"538":1}}],["を接尾辞につけることを推奨とする",{"2":{"469":2,"537":2}}],["を返し",{"2":{"546":1}}],["を返した場合に",{"2":{"465":1}}],["を返すなどのケースがあれば",{"2":{"457":1}}],["を返すとする",{"2":{"438":1}}],["を付けずに",{"2":{"672":1}}],["を付けて表現する",{"2":{"465":1}}],["を付与する",{"2":{"465":1}}],["を保持しつつ",{"2":{"465":1}}],["をデータストアに持ち",{"2":{"465":1}}],["を末尾に付けて区別する",{"2":{"465":1}}],["を活用する",{"2":{"465":1}}],["を必ず付ける",{"2":{"591":1}}],["を必ずしも守る必要はないが",{"2":{"546":1}}],["を必ず指定する",{"2":{"463":1}}],["を必須項目とする",{"2":{"449":1,"498":1,"502":1,"526":1}}],["を当てはめる",{"2":{"462":1}}],["を記載できる",{"2":{"527":1}}],["を記載しているため",{"2":{"462":1}}],["を記載する方が",{"2":{"527":1}}],["を記載する",{"2":{"457":1,"462":1,"515":1}}],["を記述する",{"2":{"131":3,"208":3,"272":3}}],["を参考に",{"2":{"463":1}}],["を参考にする",{"2":{"412":1,"413":1}}],["を参照ください",{"2":{"462":1}}],["を参照",{"2":{"26":1,"51":1,"139":1,"167":1,"216":1,"240":1,"280":1,"303":1,"394":1,"398":1}}],["を起動",{"2":{"374":1}}],["を起動する",{"2":{"354":1,"389":1}}],["を表示する",{"2":{"381":1,"388":1}}],["を表示",{"2":{"340":1}}],["をクリック",{"2":{"181":1,"183":1}}],["をクリックし",{"2":{"181":1,"182":1,"183":1}}],["をクリックすると",{"2":{"180":1,"183":2}}],["をあらかじめ結合して",{"2":{"173":1,"246":1,"309":1}}],["を生成した場合の計測結果を記載します",{"2":{"170":1,"243":1,"306":1}}],["を呼び出さない",{"2":{"164":1,"237":1,"300":1}}],["を呼び出す例が示されている",{"2":{"524":1}}],["を呼び出すという仕組みである",{"2":{"524":1}}],["を呼び出す方法を明示できるセクションである",{"2":{"523":1}}],["を呼び出す",{"2":{"164":1,"237":1,"300":1}}],["をオーバーライドした場合はsuper",{"2":{"164":1,"237":1,"300":1}}],["をエスケープする際は",{"2":{"160":1}}],["を作成します",{"2":{"159":1}}],["をキーとして指定",{"2":{"544":1}}],["をキーとして",{"2":{"159":1}}],["を適切に利用する",{"2":{"129":1,"206":1,"270":1}}],["をつける",{"2":{"660":1}}],["をつけての区別は原則禁止とする",{"2":{"124":1,"201":1,"265":1}}],["をつけず",{"2":{"34":1}}],["を経由する運用を前提とする",{"2":{"100":1}}],["を経由してファイルをアップロードする",{"2":{"474":1,"529":1}}],["を経由して",{"2":{"66":1}}],["を開き",{"2":{"97":1}}],["を配置する",{"2":{"97":1}}],["を用いず",{"2":{"533":1}}],["を用いる",{"2":{"489":1,"514":1}}],["を用いることを推奨する",{"2":{"488":1}}],["を用いる場合は",{"2":{"480":1}}],["を用いる場合は以下のプラグインを推奨する",{"2":{"480":1}}],["を用いると",{"2":{"96":1}}],["を用いたアップロードであり",{"2":{"474":1,"529":1}}],["を用いない",{"2":{"473":1,"541":1}}],["を用いない記載は許可しない",{"2":{"463":1}}],["を用いて",{"2":{"75":1,"463":1}}],["を選択",{"2":{"181":1,"182":2,"183":2}}],["を選択して",{"2":{"105":1}}],["を選択してマージした場合",{"2":{"105":1,"107":1}}],["を選択しておくとデフォルトで有効になる",{"2":{"92":1}}],["を選択すると",{"2":{"181":1,"182":1}}],["を選択することを推奨することで",{"2":{"88":1}}],["を選択することで",{"2":{"66":1}}],["を選択する",{"2":{"66":1}}],["を使っても良い",{"2":{"671":1}}],["を使用できる場合は必ず使用する",{"2":{"581":1,"632":1}}],["を使用するデータ更新は禁止",{"2":{"583":1,"634":1}}],["を使用すると",{"2":{"570":1,"620":1}}],["を使用する場合はケバブケースで表現しても良い",{"2":{"507":1}}],["を使用すること",{"2":{"136":1,"153":1,"213":1,"228":1,"277":1,"292":1}}],["を使用する",{"2":{"130":1,"160":1,"207":1,"271":1,"570":2,"571":1,"588":1,"620":2,"638":1}}],["を使用しないが",{"2":{"160":1}}],["を使用しない",{"2":{"129":1,"206":1,"270":1}}],["を使用している場合はそちらを参照されたい",{"2":{"493":1}}],["を使用しても良い",{"2":{"160":1}}],["を使用して",{"2":{"109":1,"110":1}}],["を使用してエンコードする必要があり",{"2":{"27":1}}],["を使うことは禁止とする",{"2":{"672":1}}],["を使うことでフォルダのように階層表示ができるため",{"2":{"74":1}}],["を使うべきだ",{"2":{"647":1}}],["を使う",{"2":{"126":1,"203":1,"267":1}}],["を基本とする",{"2":{"74":1}}],["をベースとした以下の規約を推奨する",{"2":{"70":1}}],["を採用する",{"2":{"67":1}}],["を行わない",{"2":{"509":1,"510":1}}],["を行った人がauthorになる",{"2":{"66":1}}],["を行う際のリソース",{"2":{"516":1}}],["を行う場合",{"2":{"66":1}}],["を行うと",{"2":{"66":1}}],["を行う",{"2":{"6":1}}],["を実行済みの場合は",{"2":{"65":1}}],["を実行する",{"2":{"65":2}}],["を比較し",{"2":{"65":1}}],["を上げたタグをコミットし",{"2":{"63":1}}],["を別途作成",{"2":{"63":1}}],["を元にfeatureブランチを作成して開発している開発者が混乱することになるため",{"2":{"61":1}}],["を指定していないとフロントエンド側でパースエラーとなることがあるため",{"2":{"464":1}}],["を指定していてもサーバサイドのチェックが有効に働かないことがあるため",{"2":{"463":1}}],["を指定した場合",{"2":{"40":1}}],["を指定できるため",{"2":{"457":1}}],["を指定することで名称の指定が可能となる",{"2":{"509":1,"510":1}}],["を指定することも多いが",{"2":{"455":1}}],["を指定すること",{"2":{"408":1}}],["を指定する",{"2":{"2":1,"465":2}}],["を利用して下記のように記述します",{"2":{"248":1,"249":1,"311":1,"312":1}}],["を利用している場合",{"2":{"40":1}}],["を利用した操作のみに影響し",{"2":{"458":1}}],["を利用した記述のほうが効率的です",{"2":{"248":1,"311":1}}],["を利用した処理など",{"2":{"174":1,"247":1,"310":1}}],["を利用した場合",{"2":{"148":1,"225":1,"289":1}}],["を利用します",{"2":{"172":1,"245":1,"249":1,"308":1,"312":1}}],["を利用する場合は",{"2":{"474":1,"529":1}}],["を利用する必要はありませんが",{"2":{"175":1,"250":1,"313":1}}],["を利用するときは",{"2":{"161":1,"234":1,"297":1}}],["を利用することで",{"2":{"669":1}}],["を利用すること",{"2":{"148":1,"153":1,"225":1,"228":1,"289":1,"292":1}}],["を利用することを推奨する",{"2":{"96":1}}],["を利用する",{"2":{"137":3,"153":3,"155":1,"161":1,"214":3,"228":3,"230":1,"234":1,"292":1,"294":1,"297":1,"483":1,"519":1,"573":1,"622":1}}],["を利用するようなケース",{"2":{"16":1}}],["を含めた",{"2":{"36":1}}],["を含めてグルーピングしやすい名前にする",{"2":{"24":1}}],["を",{"2":{"33":1,"48":1,"455":1,"464":1,"472":1,"540":1}}],["を省略しても良い",{"2":{"33":1}}],["を持つことができるが",{"2":{"27":1}}],["を名前に含めることで",{"2":{"19":1}}],["を異なるクラウドサービスで運用することは稀",{"2":{"16":1}}],["を提供するサーバの情報を記載する",{"2":{"502":1}}],["を提供する",{"2":{"6":1}}],["を区別したいときに利用する",{"2":{"2":1}}],["を意識する場合に用いる",{"2":{"2":1}}],["を示す演算子は",{"2":{"573":1,"622":1}}],["を示す",{"2":{"2":1,"7":1}}],["構成例を次にあげる",{"2":{"407":1}}],["構成をとっているため",{"2":{"26":1}}],["構成をとることが推奨のため",{"2":{"26":1}}],["構成などで",{"2":{"2":1}}],["構築する製品名またはシステム名",{"2":{"2":1}}],["のファイルはアップロードして良い",{"2":{"681":1}}],["の緊急性やアクションを求める意味合いが弱まり",{"2":{"672":1}}],["のビルドエラーの解消についての相談です",{"2":{"667":1}}],["の時",{"2":{"658":1}}],["の縦位置は揃える",{"2":{"556":1,"607":1}}],["のエコシステムがターゲット",{"2":{"546":1}}],["のエスケープを避ける目的ではテキストブロックを使用しても良い",{"2":{"160":1}}],["の振る舞いを読み手に伝えるものとして",{"2":{"546":1}}],["の振る舞いの詳細や注意点を記載する",{"2":{"506":1}}],["の振る舞いの詳細や注意点",{"2":{"462":1,"503":1}}],["のように書き換える",{"2":{"587":1,"637":1}}],["のように",{"2":{"546":1}}],["のようなイメージである",{"2":{"674":1}}],["のような命名を推奨する",{"2":{"499":1}}],["のような命名とすることを推奨する",{"2":{"450":1}}],["のようなサービスを利用する場合は",{"2":{"476":1,"531":1}}],["のようなサービスがある",{"2":{"12":1}}],["のような設定を行うチームも多い",{"2":{"94":1}}],["のような連番での管理を推奨する",{"2":{"27":1}}],["の要求が成功すれば",{"2":{"546":1}}],["のテーブル単位の中で絞り込み条件をまず記述し",{"2":{"578":1,"627":1}}],["のテーブル名には",{"2":{"27":1}}],["のテストケース",{"2":{"544":1}}],["の両方に当てはまる場合のサンプルを用いて説明する",{"2":{"544":1}}],["の単位で分割する",{"2":{"543":1}}],["の新機能の1つで",{"2":{"523":1,"524":1}}],["の認証方式を記載する",{"2":{"511":1}}],["の章にも記載がある通り",{"2":{"509":1}}],["のレスポンスオブジェクト",{"2":{"514":2}}],["のレスポンスの場合",{"2":{"514":1}}],["のレスポンスを定義する",{"2":{"514":1}}],["のレスポンスを記載する",{"2":{"510":1}}],["のレスポンスは個別に定義するのではなく",{"2":{"510":1}}],["のレスポンスは通常複数の",{"2":{"510":1}}],["のレスポンス",{"2":{"503":1,"512":1}}],["のリクエストヘッダは",{"2":{"532":1}}],["のリクエストヘッダーは",{"2":{"477":1}}],["のリクエストボディを記載する",{"2":{"509":1}}],["のリクエストボディ",{"2":{"503":1}}],["のリクエストパラメータを記載する",{"2":{"508":1}}],["のリクエストパラメータ",{"2":{"503":1}}],["の操作概要",{"2":{"503":1}}],["の操作概要を記載する",{"2":{"505":1}}],["の操作概要を",{"2":{"462":1}}],["の論理的なグループを指定する",{"2":{"504":1}}],["の論理的なグループ",{"2":{"503":1}}],["の昇順に定義する",{"2":{"503":1}}],["の日付形式も許容する",{"2":{"501":1}}],["の規約も存在するため",{"2":{"493":1}}],["の規約を設計",{"2":{"490":1}}],["の規約は",{"2":{"111":1,"188":1,"252":1}}],["の作成タイミングと合わせて追記する",{"2":{"479":1}}],["の作成やフレームワークとして",{"2":{"132":1,"209":1,"273":1}}],["のために",{"2":{"476":1,"531":1}}],["の項目として設定し",{"2":{"474":1,"529":1}}],["のうちどれか指定する",{"2":{"469":1,"537":1}}],["のバージョン管理",{"0":{"478":1}}],["のバージョンを上げることや",{"2":{"470":1,"538":1}}],["のバージョンを上げること",{"2":{"468":1,"536":1}}],["のバージョンやスペックによって変化します",{"2":{"168":1,"241":1,"304":1}}],["の互換性が崩れるため",{"2":{"468":1,"536":1}}],["の値は",{"2":{"465":1}}],["の指定は不要",{"2":{"465":1}}],["のどれかを指定する",{"2":{"463":1}}],["のどれを採用するか判断する",{"2":{"64":1}}],["の順に定義する",{"2":{"503":1}}],["の順にする",{"2":{"461":1}}],["の順序を制御できる",{"2":{"459":1}}],["の併記は許可しない",{"2":{"455":1}}],["の仕様上",{"2":{"454":1}}],["のかわりに",{"2":{"452":1}}],["の簡単な説明",{"2":{"449":1,"498":1}}],["の総称を記載する",{"2":{"450":1,"499":1}}],["の総称",{"2":{"449":1,"498":1}}],["の基本構造は以下の",{"2":{"447":1}}],["の基本は",{"2":{"114":1,"191":1,"255":1}}],["の方針に原則則る",{"2":{"436":1}}],["の設計自体はこの規約の範囲外であるが",{"2":{"493":1}}],["の設計開発をする方は",{"2":{"490":1}}],["の設計ルールをまとめる",{"2":{"434":1}}],["の設定を推奨する",{"2":{"651":1}}],["の設定例は記載しない",{"2":{"474":1,"529":1}}],["の設定とは重複する",{"2":{"94":1}}],["の最新の処理連番",{"2":{"425":1}}],["の応答項目が",{"2":{"403":1}}],["のfuture",{"2":{"395":1}}],["のタグを追加する",{"2":{"327":1}}],["のタグポリシーを利用することで",{"2":{"37":1}}],["の説明に記載した通り",{"2":{"249":1,"312":1}}],["の間の数値であればキャッシュから取り出すためインスタンスを生成しません",{"2":{"248":1,"311":1}}],["の判定はbigdecimal",{"2":{"175":1,"250":1,"313":1}}],["の正",{"2":{"175":1,"250":1,"313":1}}],["の種類を減らす",{"2":{"478":1}}],["の種類",{"0":{"174":1,"247":1,"310":1}}],["の機能をサポートしていますので",{"2":{"169":1,"242":1,"305":1}}],["の件数",{"2":{"169":1,"172":1,"174":1,"242":1,"245":1,"247":1,"305":1,"308":1,"310":1}}],["の処理を行う際",{"2":{"169":1,"242":1,"305":1}}],["のコーディングについて以下に示す",{"2":{"168":1,"241":1,"304":1}}],["のほかに",{"2":{"166":1,"239":1,"302":1}}],["のオーバーライド実装は禁止",{"2":{"164":1,"237":1,"300":1}}],["の定義ファイルを駆動に",{"2":{"546":1}}],["の定義へジャンプするものがあります",{"2":{"159":1}}],["の定数固有メソッド実装",{"2":{"143":1,"220":1,"284":1}}],["のカンマの後に改行することを推奨する",{"2":{"159":1}}],["の前に改行を挿入すること",{"2":{"568":1,"618":1}}],["の前に改行する",{"2":{"159":1}}],["の前後に改行を挿入すること",{"2":{"567":1,"617":1}}],["の前後には空白文字を挿入する",{"2":{"130":5,"207":5,"271":5}}],["の前の行の右端に",{"2":{"160":1}}],["の後",{"2":{"159":1}}],["の後にステートメントを記述しない",{"2":{"130":1,"207":1,"271":1}}],["の使用はせず",{"2":{"581":1,"582":1,"632":1,"633":1}}],["の使用を前提に記述している",{"2":{"548":1,"599":1}}],["の使用を混在させるとソースコードの見通しと保守性が悪くなります",{"2":{"159":1}}],["の使用用途により",{"2":{"544":1}}],["の使用用途に合わせて",{"2":{"543":1}}],["の使い分けが難しいため",{"2":{"457":1}}],["の使い分け",{"0":{"167":1,"240":1,"303":1}}],["の使い分けを意識する",{"2":{"146":1,"223":1,"287":1}}],["の違い",{"2":{"153":1,"228":1}}],["の条件式で",{"2":{"146":1,"223":1,"287":1}}],["の",{"0":{"175":1,"250":1,"313":1},"2":{"146":1,"159":1,"166":1,"223":1,"239":1,"287":1,"302":1,"457":1,"459":1,"462":1,"463":1,"465":1,"470":1,"476":1,"490":1,"531":1,"538":1,"544":2,"566":3,"584":1,"616":2,"635":1}}],["のラムダ式は内部的にインナークラスとされるがこれらは許可する",{"2":{"143":1,"220":1,"284":1}}],["の配列以外は生成不可能なため",{"2":{"137":1,"214":1,"278":1}}],["の表記について",{"2":{"131":1,"208":1,"272":1}}],["の変数代入は行わないこととする",{"2":{"157":1,"232":1,"296":1}}],["の変数を比較しない",{"2":{"130":1,"207":1,"271":1}}],["の変更にはバグフィックスや軽微なui向上が含まれ",{"2":{"61":1}}],["の状態がわかるようにする",{"2":{"125":1,"202":1,"266":1}}],["の背景には",{"2":{"115":1,"192":1,"256":1}}],["の略だと言うのだが",{"2":{"115":1,"192":1,"256":1}}],["の略称を用いる",{"2":{"2":1}}],["の必要がある",{"2":{"114":1,"191":1,"255":1}}],["の常識的な使い方などから生まれる",{"2":{"114":1,"191":1,"255":1}}],["の2つのコミットが作成されるため注意する",{"2":{"105":1}}],["の推奨設定を紹介する",{"2":{"82":1}}],["の場合にリクエストボディを指定",{"2":{"509":1}}],["の場合にのみ指定する",{"2":{"508":1}}],["の場合のみ指定する",{"2":{"509":1}}],["の場合も",{"2":{"472":1,"540":1}}],["の場合は",{"2":{"463":1}}],["の場合は==演算子を利用して比較する",{"2":{"145":1,"222":1,"286":1}}],["の場合",{"2":{"76":1,"134":1,"211":1,"275":1,"463":2,"484":1,"556":1,"607":1,"657":1}}],["のプロジェクトidをブランチ名に利用",{"2":{"53":1}}],["のプレフィックスを付ける",{"2":{"53":1}}],["の利用を推奨する",{"2":{"527":1}}],["の利用可能なエンドポイントと操作方法",{"2":{"503":1}}],["の利用可能なエンドポイントと操作方法を記載する",{"2":{"503":1}}],["の利用可能なパスと操作方法",{"2":{"495":1}}],["の利用者",{"2":{"466":1,"534":1}}],["の利用",{"2":{"48":1}}],["の自動起動停止の管理など",{"2":{"38":1}}],["のサフィックスで終わる必要がある",{"2":{"30":1}}],["のサブネットを参照",{"2":{"26":1}}],["のサブネットは",{"2":{"10":1}}],["のセマンティクスを伝えるのに有用であるが",{"2":{"523":1}}],["のセキュリティ機構",{"2":{"503":1}}],["のセンシングを始めとしたイベントデータの場合は",{"2":{"29":1}}],["のセット内で一意である必要がある",{"2":{"21":1}}],["のグローバルセカンダリインデックス",{"2":{"27":1}}],["の命名に関する制約",{"2":{"26":1}}],["の命名規約は以下のとおりである",{"2":{"22":1}}],["の命名規約",{"2":{"21":1,"27":1}}],["の命名規則",{"2":{"14":1}}],["のみの利用を推奨する",{"2":{"463":2}}],["のみ利用可能",{"2":{"22":1}}],["のみ",{"2":{"16":1,"457":1,"511":1}}],["の考え方では",{"2":{"4":1}}],["の構成はマネージドサービスを活用するベストプラクティスに従うものとする",{"2":{"1":1}}],["right",{"2":{"630":1}}],["rpt02",{"2":{"402":1}}],["rpt01",{"2":{"402":1}}],["rpt",{"2":{"402":1}}],["rfc3339",{"2":{"469":2,"537":2}}],["rfc9205",{"2":{"436":1}}],["rfc",{"2":{"323":1,"326":1,"436":1,"457":1,"465":2}}],["randomaccessではないlistは",{"2":{"174":1,"247":1,"310":1}}],["rate",{"2":{"124":2,"201":2,"265":2}}],["r",{"2":{"147":1,"224":1,"288":1}}],["rules",{"2":{"88":1}}],["rule",{"0":{"31":1}}],["runtime",{"2":{"25":2}}],["rdbms",{"2":{"548":1,"599":1}}],["rdb",{"2":{"27":1,"465":2}}],["rds",{"0":{"26":1},"2":{"26":2}}],["rows",{"2":{"568":2}}],["robust",{"2":{"111":1,"188":1,"252":1}}],["rocket",{"2":{"45":1}}],["route",{"2":{"18":1}}],["role",{"0":{"6":1},"2":{"2":1,"7":1,"12":1,"19":1,"20":1,"21":2,"22":2,"24":5,"26":5,"29":2,"33":1,"34":2,"86":1,"157":2,"232":2,"296":2,"432":1}}],["retrieve",{"2":{"544":2}}],["returnは必ず省略する",{"2":{"154":1,"229":1,"293":1}}],["return",{"2":{"124":3,"129":1,"130":5,"131":2,"134":8,"136":2,"146":2,"147":2,"154":5,"157":1,"159":1,"169":2,"170":2,"172":3,"173":1,"201":3,"206":1,"207":5,"208":2,"211":8,"213":2,"223":2,"224":2,"229":5,"232":1,"242":2,"243":2,"245":3,"246":1,"265":3,"270":1,"271":5,"272":2,"275":8,"277":2,"287":2,"293":5,"296":1,"305":2,"306":2,"308":3,"309":1,"544":1}}],["reqpostproductsbody",{"2":{"509":2}}],["requestbodies",{"0":{"520":1},"2":{"509":2,"512":1}}],["requestbody",{"0":{"509":1},"2":{"503":1,"509":4,"544":1}}],["request作成後",{"2":{"85":1}}],["request",{"0":{"97":2},"2":{"85":1,"88":2,"97":2,"437":2,"464":1,"465":1,"509":1,"510":2,"514":1,"544":2,"651":1}}],["requests",{"2":{"85":1,"97":1}}],["require",{"2":{"85":1,"88":8}}],["required",{"2":{"38":1,"88":1,"447":2,"463":9,"465":4,"467":1,"470":1,"488":2,"509":2,"517":1,"518":1,"519":1,"535":1,"538":1,"539":1,"544":13}}],["reginster",{"2":{"544":1}}],["registration",{"2":{"544":10}}],["registered",{"2":{"544":1}}],["register",{"2":{"447":2,"463":1,"465":4,"488":2,"544":1}}],["region",{"0":{"8":1},"2":{"2":1,"8":1}}],["remote",{"2":{"181":1}}],["receive",{"2":{"402":1}}],["recovery",{"2":{"334":1}}],["recordは",{"2":{"159":1}}],["recordの使用しても良い箇所について方針を決めた上で使用するようにしてください",{"2":{"159":1}}],["recordを利用しないか",{"2":{"159":1}}],["recordとクラスと",{"2":{"159":1}}],["record",{"2":{"122":1,"159":4}}],["rect",{"2":{"159":3}}],["recycle",{"2":{"45":1}}],["reviews",{"2":{"388":1}}],["revert",{"0":{"184":1}}],["rev",{"2":{"105":1}}],["renaming",{"2":{"97":1}}],["reusable",{"2":{"90":2}}],["readme",{"2":{"400":1,"407":1}}],["read",{"2":{"86":1}}],["refname",{"2":{"74":1}}],["ref",{"2":{"65":2}}],["refactorなど",{"2":{"45":1}}],["refactor",{"2":{"43":1,"45":4}}],["rerere",{"2":{"65":1,"82":2}}],["rebase",{"0":{"186":1},"2":{"65":1,"82":2,"85":1,"100":1,"107":1,"110":3}}],["releaseブランチにマージするといった場合がある",{"2":{"67":1}}],["releaseブランチを削除する",{"2":{"55":1}}],["releaseブランチではバグ修正",{"2":{"55":1}}],["releaseブランチ",{"0":{"55":1}}],["release",{"2":{"51":3,"58":1,"59":1,"75":1,"77":1,"490":9}}],["repository",{"2":{"179":1,"527":1}}],["report",{"2":{"24":1,"402":1}}],["repeat",{"2":{"14":1}}],["resppostproductsbody",{"2":{"510":2}}],["response",{"2":{"460":1,"544":2}}],["responses",{"0":{"464":1,"510":1,"514":1},"2":{"447":1,"457":1,"460":1,"462":1,"463":2,"464":2,"503":1,"510":8,"512":1,"514":2,"521":1,"544":16}}],["resultlist",{"2":{"169":5,"242":5,"305":5}}],["resolution",{"2":{"88":1}}],["resources",{"0":{"47":1,"317":1,"418":1,"492":1,"597":1},"2":{"161":1,"162":2,"234":1,"235":2,"297":1,"298":2,"527":1}}],["resource",{"2":{"14":3,"18":1,"36":4,"476":1,"481":1,"531":1,"545":1}}],["restish",{"2":{"546":1}}],["rest",{"2":{"19":1,"546":2}}],["nchj",{"2":{"553":1,"604":1}}],["ncharacter",{"2":{"160":1}}],["nichijo",{"2":{"553":1,"604":1}}],["n文字列です",{"2":{"160":1}}],["n",{"2":{"147":2,"160":5,"224":2,"288":2,"328":4,"421":7,"487":1,"561":1}}],["nullのis",{"2":{"556":1,"607":1}}],["null",{"2":{"130":3,"134":8,"145":3,"146":3,"157":2,"207":3,"211":8,"222":1,"223":3,"232":2,"271":3,"275":8,"286":1,"287":3,"296":2,"513":2,"533":1}}],["num",{"2":{"120":2,"146":3,"197":2,"223":3,"261":2,"287":3}}],["numberformat",{"2":{"147":1,"224":1,"288":1}}],["numberformatexception",{"2":{"146":1,"223":1,"287":1}}],["number",{"2":{"88":1,"468":1,"469":2,"536":1,"537":2}}],["next",{"2":{"544":2,"568":1}}],["netの場合は",{"2":{"408":1}}],["net",{"2":{"408":1}}],["network",{"2":{"2":1}}],["newline",{"2":{"480":1}}],["news",{"2":{"474":1,"529":1}}],["newinputstream",{"2":{"161":1,"162":1,"163":2,"234":1,"235":1,"236":2,"297":1,"298":1,"299":2}}],["newによって型が明確に判断できます",{"2":{"158":1,"233":1}}],["newarray",{"2":{"146":3,"223":3,"287":3}}],["new",{"2":{"88":1,"129":4,"134":2,"136":2,"137":1,"146":2,"147":4,"148":4,"149":2,"153":1,"157":2,"158":3,"159":2,"169":1,"170":1,"172":2,"173":2,"175":2,"206":4,"211":2,"213":2,"214":1,"223":2,"224":4,"225":4,"226":2,"228":1,"232":2,"233":3,"242":1,"243":1,"245":2,"246":2,"248":2,"249":1,"250":2,"270":4,"275":2,"277":2,"278":2,"287":2,"288":2,"289":4,"290":2,"292":1,"296":2,"305":1,"306":1,"308":2,"309":2,"311":2,"312":1,"313":2,"544":1}}],["ngパターンindexが利用されない場合があります",{"2":{"581":1,"632":1}}],["ngパターン",{"2":{"581":2,"632":2}}],["ng",{"2":{"53":1,"73":1,"75":1,"143":2,"146":2,"220":2,"223":2,"284":2,"287":2,"453":2,"454":1,"455":1,"459":2,"463":1,"465":1,"487":1,"488":1,"579":1,"628":1}}],["nginx",{"2":{"6":1}}],["nlb",{"2":{"21":2}}],["nat",{"2":{"18":2}}],["naming",{"2":{"18":1,"37":1}}],["name2",{"2":{"567":2,"617":2}}],["name1",{"2":{"567":2,"617":2}}],["name\\t\\t",{"2":{"561":1}}],["name\\t=",{"2":{"561":1}}],["nameテーブル",{"2":{"561":1}}],["nameなど",{"2":{"381":1}}],["nameが未設定の場合は",{"2":{"347":1}}],["nameは隠ぺいされる",{"2":{"142":1,"219":1,"283":1}}],["name",{"0":{"657":1},"2":{"2":1,"4":1,"6":1,"8":1,"10":1,"14":1,"18":1,"21":1,"38":2,"40":4,"82":2,"125":1,"136":2,"142":2,"160":4,"202":1,"213":2,"219":2,"266":1,"277":2,"283":2,"324":2,"347":1,"352":1,"359":1,"366":1,"373":1,"388":1,"416":4,"447":4,"459":7,"463":8,"465":7,"468":1,"488":2,"504":1,"508":6,"517":1,"518":1,"519":1,"526":5,"536":1,"539":1,"544":16,"586":4,"636":4,"657":2}}],["no\\tis\\tnull",{"2":{"556":1,"607":1}}],["no\\t=\\tb",{"2":{"556":1,"607":1}}],["now",{"2":{"151":2,"152":2}}],["no",{"2":{"101":1,"105":1,"337":1,"344":1,"350":1,"357":1,"364":1,"371":1,"379":1,"386":1,"441":1,"464":1,"487":1,"544":5,"546":1,"556":1,"586":8,"607":1,"636":8}}],["non",{"2":{"90":2}}],["nodejs18",{"2":{"25":1}}],["nor",{"2":{"14":1}}],["northeast",{"2":{"8":3,"9":3}}],["notification",{"2":{"658":1}}],["notfound",{"2":{"464":1,"544":5}}],["noteは何かしら加工処理により生み出された項目であれば",{"2":{"416":1}}],["notes",{"2":{"75":1,"490":1}}],["note",{"2":{"18":1,"38":1,"408":1,"416":1,"421":1,"544":8}}],["not",{"0":{"588":1,"638":1},"2":{"14":2,"88":1,"438":1,"439":1,"440":1,"441":1,"464":1,"521":1,"544":1,"546":1,"561":1,"588":2,"638":2}}],["aの方針でよろしくお願いします",{"2":{"663":2}}],["a=2とする方がa",{"2":{"581":1,"632":1}}],["a=1",{"2":{"581":1,"632":1}}],["a=x",{"2":{"130":1,"207":1,"271":1}}],["age",{"2":{"544":11}}],["at",{"2":{"447":2,"463":1,"465":4,"469":1,"488":2,"514":1,"537":1,"544":1,"683":1}}],["a5er",{"2":{"394":1,"400":1,"411":2}}],["a5",{"2":{"394":1,"411":1}}],["about",{"2":{"527":1,"544":2}}],["above",{"2":{"88":1}}],["ab",{"2":{"173":6,"246":6,"309":6}}],["abc",{"2":{"160":2}}],["abs",{"2":{"142":7,"219":7,"283":7}}],["a+=",{"2":{"130":1,"207":1,"271":1}}],["as",{"0":{"577":1,"626":1},"2":{"408":8,"567":4,"577":2,"586":4,"617":4,"618":1,"626":2,"636":4}}],["aslist",{"2":{"137":1,"153":4,"214":1,"228":4,"275":2,"278":3,"292":4}}],["asset",{"2":{"90":4}}],["as1",{"2":{"8":1}}],["administrator",{"2":{"433":1}}],["admin",{"2":{"86":1,"504":1}}],["addpermission",{"2":{"462":1}}],["add",{"0":{"183":1},"2":{"79":2,"141":1,"151":2,"154":2,"169":1,"218":1,"229":2,"242":1,"282":1,"293":2,"305":1,"570":2,"620":2}}],["address",{"2":{"22":1}}],["amount4",{"2":{"578":1,"627":1}}],["amount3\\t+\\ttbl",{"2":{"578":1,"627":1}}],["amount2\\t>\\ttbl",{"2":{"578":1,"627":1}}],["ambysoft",{"2":{"111":1,"188":1,"252":1}}],["ambler",{"2":{"111":1,"188":1,"252":1}}],["ambulance",{"2":{"45":1}}],["amp",{"2":{"109":1,"110":1,"111":1,"130":3,"188":1,"207":3,"252":1,"271":3}}],["amazons3fullaccess",{"2":{"36":1}}],["amazon",{"2":{"20":1,"26":1,"27":1,"28":1,"30":1,"37":1,"474":2,"476":1,"481":1,"529":2,"531":1,"545":1}}],["arg",{"2":{"170":2,"243":2,"306":2}}],["arguments",{"2":{"14":1}}],["arraycopy",{"2":{"146":1,"223":1,"287":1}}],["arrays",{"2":{"137":1,"146":1,"147":1,"153":4,"214":1,"223":1,"224":1,"228":4,"275":2,"278":3,"287":1,"288":1,"292":2}}],["arrayutils",{"2":{"134":1,"211":1,"275":1}}],["array",{"2":{"130":2,"134":1,"146":10,"147":3,"207":2,"211":1,"223":10,"224":3,"271":2,"275":1,"287":10,"288":3,"465":4,"469":1,"537":1,"544":2}}],["arraylist拡張",{"2":{"174":1,"247":1,"310":1}}],["arraylistforeach",{"2":{"174":1,"247":1,"310":1}}],["arraylistfor",{"2":{"174":1,"247":1,"310":1}}],["arraylist",{"2":{"129":2,"153":2,"158":3,"169":1,"206":2,"228":2,"233":3,"242":1,"270":2,"292":2,"305":1}}],["arrival",{"2":{"29":1}}],["are",{"2":{"88":1}}],["articles",{"2":{"97":1}}],["art",{"2":{"45":1}}],["archive",{"2":{"31":1}}],["autocloseableをimplementsすることで",{"2":{"162":1,"235":1,"298":1}}],["autocrlf",{"2":{"94":3}}],["automation",{"0":{"87":1},"1":{"88":1,"89":1,"90":1,"91":1}}],["automatically",{"2":{"66":1,"85":1,"92":1}}],["authenthicaiton",{"2":{"544":2}}],["authorize",{"2":{"456":1}}],["authorizationurl",{"2":{"456":1}}],["author",{"2":{"131":2,"167":1,"208":2,"240":1,"272":2,"303":1}}],["authors",{"2":{"97":1}}],["authored",{"2":{"66":1}}],["authorが失われる",{"2":{"66":1}}],["auth0",{"2":{"31":1,"33":1}}],["auth",{"2":{"7":1,"22":1,"25":1,"26":2}}],["aurora",{"0":{"26":1},"2":{"26":1}}],["also",{"0":{"669":1},"2":{"669":1}}],["alt",{"2":{"328":1,"480":1}}],["allを使用する",{"2":{"589":1,"639":1}}],["allof",{"2":{"513":1}}],["allowed",{"2":{"464":1}}],["allow",{"2":{"2":1,"36":6,"85":4,"88":1,"90":4,"476":1,"531":1}}],["all",{"2":{"183":1}}],["alphabetlower",{"2":{"156":3,"231":3,"295":3}}],["alerts",{"2":{"91":1}}],["alias2",{"2":{"567":2,"617":2}}],["alias1",{"2":{"567":2,"617":2}}],["alias",{"2":{"82":4}}],["alb",{"2":{"21":2,"28":1}}],["a",{"2":{"9":2,"13":1,"18":1,"22":3,"24":1,"25":1,"27":1,"29":1,"30":1,"65":2,"75":4,"79":2,"85":1,"86":1,"88":2,"97":1,"100":1,"105":3,"109":3,"110":3,"130":4,"135":2,"137":2,"139":2,"146":6,"148":4,"151":4,"153":4,"156":3,"158":6,"173":6,"207":4,"212":2,"214":2,"216":2,"223":6,"225":4,"228":4,"231":3,"233":6,"246":6,"271":4,"276":2,"278":2,"280":2,"287":6,"289":4,"292":4,"295":3,"309":6,"319":1,"443":3,"544":11,"578":2,"581":2,"627":2,"630":2,"632":2}}],["ansi",{"2":{"571":1}}],["answer",{"2":{"130":2,"207":2,"271":2}}],["anken",{"2":{"556":1,"607":1}}],["an",{"2":{"514":1}}],["anyof",{"2":{"513":1}}],["analysis",{"0":{"91":1}}],["annotated",{"2":{"73":1}}],["and\\tc",{"2":{"578":5,"627":5}}],["and\\tb",{"2":{"578":3,"627":3}}],["and\\ttbl",{"2":{"578":1,"627":1}}],["and\\tt1",{"2":{"566":1,"616":1}}],["and\\ta",{"2":{"556":2,"578":1,"607":2,"627":1}}],["and",{"0":{"87":1,"91":1,"562":1,"612":1},"1":{"88":1,"89":1,"90":1,"91":1},"2":{"14":1,"37":1,"85":1,"86":1,"90":4,"97":1,"100":2,"107":2,"111":2,"188":2,"252":2,"474":1,"507":1,"529":1,"566":1,"581":1,"616":1,"632":1}}],["an3",{"2":{"8":1}}],["an2",{"2":{"8":1}}],["an1",{"2":{"8":1}}],["ap",{"2":{"8":4,"9":3}}],["apikey",{"2":{"519":1}}],["api詳細設計書",{"2":{"506":1}}],["apigateway",{"2":{"481":1,"545":1}}],["api定義全体",{"2":{"460":1}}],["apis",{"2":{"457":1,"465":1}}],["apiサーバアプリケーションの開発時を除いて不要であるためわざわざ追加しない",{"2":{"455":1}}],["api開発では不用意に本番環境を触られたくないときが多く",{"2":{"453":1}}],["api応答例",{"0":{"416":1}}],["api応答項目にも画面項目多く",{"2":{"403":1}}],["apiにおいては",{"2":{"415":1}}],["apiについても",{"2":{"415":1}}],["apiの呼び出しやイベントの定義",{"2":{"409":1}}],["api設計書",{"2":{"407":1}}],["api処理設計",{"2":{"400":1}}],["apixxx",{"2":{"359":1}}],["api02",{"2":{"402":1}}],["api026",{"2":{"352":1}}],["api01",{"2":{"402":1}}],["api010",{"2":{"388":1}}],["api010を呼び出し",{"2":{"388":1}}],["api016",{"2":{"376":1}}],["api016が有効な場合",{"2":{"373":1,"376":1}}],["api013",{"2":{"352":1,"373":1}}],["api011",{"2":{"352":2}}],["api008",{"2":{"388":1}}],["api008を呼び出し",{"2":{"388":1}}],["api009",{"2":{"388":1}}],["api007",{"2":{"347":1,"381":1}}],["api001",{"2":{"340":1}}],["api",{"0":{"19":1,"156":1,"169":1,"231":1,"242":1,"295":1,"305":1,"393":1,"413":1,"415":1,"434":1,"442":1,"478":1},"1":{"416":1,"435":1,"436":1,"437":1,"438":1,"439":1,"440":1,"441":1,"442":1,"443":1},"2":{"6":3,"19":2,"21":1,"22":1,"33":1,"35":1,"73":1,"114":1,"129":1,"161":1,"169":4,"191":1,"206":1,"234":1,"242":4,"255":1,"270":1,"297":1,"305":4,"323":1,"326":1,"366":1,"373":1,"376":1,"402":2,"403":1,"413":1,"434":1,"438":2,"444":3,"447":2,"449":3,"450":2,"451":1,"452":1,"453":4,"454":1,"455":1,"456":4,"457":4,"458":2,"459":1,"460":1,"462":4,"464":1,"465":2,"466":1,"468":3,"469":1,"470":3,"474":6,"475":1,"476":2,"477":1,"484":2,"490":1,"493":4,"495":6,"498":3,"499":3,"500":1,"501":2,"502":5,"503":17,"504":2,"505":3,"506":3,"507":1,"508":1,"509":2,"510":2,"511":4,"512":9,"513":1,"514":1,"515":1,"516":1,"517":1,"518":1,"519":1,"520":1,"521":1,"522":1,"523":6,"524":1,"525":3,"526":1,"527":3,"529":6,"530":1,"531":2,"532":1,"534":1,"536":3,"537":1,"538":3,"542":1,"543":1,"544":3,"546":7}}],["apperr",{"2":{"465":1}}],["append",{"2":{"147":6,"172":4,"173":2,"224":6,"245":4,"246":2,"288":1,"308":4,"309":2}}],["applicaton",{"2":{"457":1}}],["application",{"2":{"6":1,"21":1,"447":2,"457":8,"458":3,"462":1,"509":3,"510":4,"514":4,"544":7}}],["approvals",{"2":{"88":3}}],["app",{"2":{"6":1}}],["apache",{"2":{"6":1}}],["acaccount",{"2":{"508":1}}],["account",{"2":{"447":3,"456":1,"459":2,"461":2,"463":3,"464":1,"465":4,"488":2,"508":3,"526":2}}],["accepted",{"2":{"439":1,"440":1,"464":1}}],["acceptance",{"2":{"4":2}}],["accesscode",{"2":{"456":1}}],["accesslog",{"2":{"27":1}}],["access",{"0":{"10":1,"86":1,"651":1},"2":{"2":2,"18":2,"19":1,"21":2,"34":1,"476":1,"531":1}}],["actor",{"2":{"408":3}}],["activation",{"2":{"324":1,"325":1}}],["activate",{"2":{"321":1,"322":1}}],["actions",{"0":{"90":1},"2":{"90":5,"181":1,"182":1,"183":1}}],["action",{"2":{"2":1,"7":1,"36":4,"131":1,"208":1,"272":1}}],["acroquest",{"2":{"111":4,"188":4,"252":4}}],["azure",{"2":{"16":1}}],["az",{"0":{"9":1},"2":{"2":3,"9":2,"18":2,"20":2,"26":2}}],["awsの設定で確認したいのですが~",{"2":{"675":1}}],["aws上の命名制約",{"2":{"19":1,"21":1,"22":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"37":1}}],["aws",{"0":{"14":1,"16":1},"2":{"1":2,"3":6,"4":3,"6":1,"12":1,"14":4,"16":3,"18":4,"26":2,"29":1,"30":2,"33":2,"35":2,"36":2,"37":4,"38":1,"40":1,"83":1,"474":3,"481":1,"529":3,"545":1}}],["pjメンバーに都度参照して欲しい特定のメッセージがある場合にはピン留め",{"2":{"668":1}}],["pjで利用している課題管理サービスのurlを共有したい場合にはブックマーク",{"2":{"668":1}}],["pedigree",{"2":{"544":8}}],["pets",{"2":{"544":25}}],["petstore",{"2":{"527":2,"544":4}}],["pet",{"2":{"527":2,"544":30}}],["perf",{"2":{"4":1}}],["performance",{"2":{"4":1}}],["permissions",{"2":{"90":1}}],["permission",{"2":{"2":1,"36":1,"432":1}}],["python",{"2":{"462":1,"546":1}}],["python310",{"2":{"25":1}}],["png",{"2":{"408":1,"457":1}}],["plantumlの場合",{"2":{"408":1}}],["plantuml",{"2":{"328":1,"408":2,"421":1}}],["physical",{"2":{"324":1}}],["p",{"2":{"115":2,"158":1,"192":2,"233":1,"256":2,"480":1}}],["pdf",{"2":{"111":5,"188":5,"252":5}}],["publish",{"2":{"183":1}}],["public",{"2":{"2":1,"10":1,"18":2,"19":3,"21":2,"123":3,"124":1,"129":3,"131":2,"133":2,"134":2,"136":1,"137":2,"138":1,"139":1,"142":3,"144":1,"159":2,"160":4,"170":2,"200":3,"201":1,"206":3,"208":2,"210":2,"211":2,"213":1,"214":2,"215":1,"216":1,"219":3,"221":1,"243":2,"264":3,"265":1,"270":3,"272":2,"274":2,"275":2,"277":1,"278":2,"279":1,"280":1,"283":3,"285":1,"306":2}}],["putproductsproductid",{"2":{"507":1}}],["putuseraccount",{"2":{"463":3}}],["putstatic",{"2":{"173":1,"246":1,"309":1}}],["putifabsent",{"2":{"159":1}}],["put",{"0":{"440":1},"2":{"137":3,"214":3,"278":6,"376":1,"435":1,"458":1,"461":1,"463":4,"503":1,"507":1,"509":1,"546":1}}],["pushed",{"2":{"88":1}}],["pushes",{"2":{"85":1}}],["push",{"0":{"183":1},"2":{"65":2,"79":1,"85":2,"183":2}}],["pull時にリベースする",{"2":{"82":1}}],["pullした際にリベースしているため",{"2":{"79":1}}],["pull",{"0":{"97":1,"181":1},"2":{"65":2,"79":1,"82":2,"85":3,"88":2,"97":2,"109":1,"110":1}}],["pickは操作",{"2":{"69":1}}],["pickは行わない",{"2":{"61":1}}],["pick",{"2":{"69":1}}],["pii",{"2":{"37":1}}],["point",{"2":{"463":1,"465":2}}],["postpets",{"2":{"544":1}}],["postuseraccount",{"2":{"463":1,"465":1}}],["postuser",{"2":{"462":1}}],["post",{"0":{"439":1},"2":{"340":1,"435":1,"458":1,"461":1,"463":3,"464":1,"503":3,"508":3,"509":3,"510":4,"511":1,"518":1,"544":2,"546":1}}],["postgresql",{"2":{"596":1,"597":1,"599":1,"630":1}}],["postgres",{"2":{"2":1}}],["polling",{"2":{"31":1}}],["portal",{"2":{"19":1}}],["page",{"2":{"544":1}}],["paged",{"2":{"544":1}}],["path",{"0":{"461":1,"462":1,"463":1,"464":1,"504":1,"505":1,"506":1,"507":1,"508":1,"509":1,"510":1,"511":1},"2":{"447":1,"460":1,"463":4,"465":1,"542":1,"543":2,"544":4}}],["paths",{"0":{"460":1,"461":1,"462":1,"463":1,"464":1,"503":1,"504":1,"505":1,"506":1,"507":1,"508":1,"509":1,"510":1,"511":1},"1":{"461":1,"462":1,"463":1,"464":1,"504":1,"505":1,"506":1,"507":1,"508":1,"509":1,"510":1,"511":1},"2":{"161":1,"162":1,"163":2,"234":1,"235":1,"236":2,"297":1,"298":1,"299":2,"447":2,"456":1,"457":1,"460":2,"461":1,"495":1,"503":1,"544":3}}],["patchuseraccount",{"2":{"463":1}}],["patch",{"2":{"435":1,"458":1,"461":2,"490":3,"503":1,"509":1,"546":1}}],["pattern",{"2":{"334":1,"447":1,"463":3,"465":4,"466":1,"473":2,"534":1,"541":2}}],["packagename",{"2":{"173":1,"246":1,"309":1}}],["partnerにおいては",{"2":{"403":1}}],["partnerのプロダクト規模であれば",{"2":{"402":1}}],["partnerのリポジトリ",{"2":{"395":1}}],["partner",{"0":{"395":1},"1":{"396":1,"397":1,"398":1}}],["participant",{"2":{"328":2,"408":2,"421":1}}],["partially",{"2":{"14":1}}],["parentid",{"2":{"159":2}}],["parallel",{"2":{"156":1,"231":1,"295":1}}],["parallelstream",{"2":{"156":1,"231":1,"295":1}}],["parameters",{"0":{"508":1,"515":1},"1":{"516":1,"517":1,"518":1,"519":1},"2":{"447":1,"462":1,"463":2,"464":2,"503":1,"508":6,"512":1,"517":3,"518":3,"519":3,"539":1,"544":3}}],["parameter",{"0":{"463":1},"2":{"340":1,"347":1,"352":1,"359":1,"366":1,"373":2,"376":2,"381":1,"388":3,"416":1,"460":1}}],["paramの説明とで距離が空いてしまう場合があり",{"2":{"159":1}}],["param形式でレコード名の上部に記述しますが",{"2":{"159":1}}],["param",{"2":{"131":1,"159":4,"208":1,"272":1}}],["parselong",{"2":{"249":1,"312":1}}],["parseint",{"2":{"249":3,"312":3}}],["parse",{"2":{"105":1}}],["pass",{"2":{"88":1}}],["password",{"2":{"82":2,"469":1,"537":1}}],["pascalcase",{"2":{"12":1,"36":1,"38":1,"463":1,"465":1}}],["prismを使用する場合",{"2":{"543":1}}],["prism",{"2":{"465":1}}],["println",{"2":{"147":2,"148":2,"160":3,"224":2,"225":2,"288":2,"289":2}}],["price",{"2":{"115":2,"192":2,"256":2}}],["privateメソッドを作成しメソッド参照を利用する",{"2":{"154":1,"229":1,"293":1}}],["private権限のコンストラクタを作成する",{"2":{"133":1,"210":1,"274":1}}],["private",{"2":{"2":1,"10":1,"19":2,"120":2,"129":2,"136":3,"138":1,"142":3,"144":2,"154":1,"173":2,"197":2,"206":2,"213":3,"215":1,"219":3,"221":2,"229":1,"246":2,"261":2,"270":2,"277":3,"279":1,"283":3,"285":2,"293":1,"309":2}}],["prを後で探しやすくするための検索キーとしての位置づけと",{"2":{"77":1}}],["prをよりシンプルに保つインセンティブとしたいため",{"2":{"66":1}}],["prに適切なラベルを設定し",{"2":{"77":1}}],["prune",{"2":{"66":1,"82":2}}],["pr",{"2":{"66":1}}],["prレビュー承認後にfeatureブランチから開発環境へのデプロイを許容する",{"2":{"59":1}}],["presigned",{"2":{"514":2}}],["preview",{"2":{"480":1}}],["premium",{"2":{"433":1}}],["precision",{"2":{"324":1}}],["pre",{"2":{"58":1}}],["prefix",{"2":{"33":1}}],["prから参照する運用を想定し",{"2":{"44":1}}],["practices",{"2":{"37":2}}],["problemdetailerror",{"2":{"513":1,"514":3,"544":3}}],["problem+json",{"2":{"457":4}}],["problem",{"2":{"457":2,"465":1}}],["profileテーブル",{"2":{"561":1}}],["profile",{"2":{"366":1,"373":1,"388":1}}],["pro版でのみの提供となる",{"2":{"180":1}}],["pro",{"2":{"178":1}}],["programmer",{"2":{"160":1}}],["programming",{"2":{"111":1,"188":1,"252":1}}],["proc",{"2":{"156":3,"231":3,"295":3}}],["processvalues",{"2":{"160":1}}],["process",{"2":{"142":4,"153":2,"160":4,"219":4,"228":2,"283":4,"292":2}}],["processresult",{"2":{"30":2}}],["protocol",{"2":{"137":1,"147":4,"214":1,"224":4,"278":1,"288":4,"323":1,"326":1}}],["protected",{"2":{"129":1,"142":6,"144":1,"206":1,"219":6,"221":1,"270":1,"283":6,"285":1}}],["protect",{"2":{"88":1,"89":1}}],["protection",{"2":{"88":1}}],["proxy",{"2":{"82":4}}],["propertiesstg",{"2":{"14":2}}],["properties",{"2":{"12":1,"19":1,"20":1,"21":2,"22":1,"24":2,"25":1,"26":1,"27":1,"28":1,"29":2,"30":1,"31":1,"33":2,"34":2,"35":1,"447":1,"463":1,"465":3,"512":1,"513":3,"514":2,"544":12}}],["produces",{"0":{"457":1},"2":{"447":1,"457":3,"462":1}}],["productowners",{"2":{"503":1}}],["products",{"2":{"459":1,"503":4,"507":1,"510":4,"517":1,"518":1,"519":1,"521":1,"526":1,"539":1}}],["productionをreleaseに言い換えている",{"2":{"58":1}}],["productionをmain",{"2":{"58":1}}],["production",{"2":{"4":2,"453":1,"502":1}}],["product",{"2":{"2":1,"12":1,"16":1,"18":8,"19":1,"20":1,"21":2,"22":3,"24":4,"25":1,"26":6,"27":1,"28":3,"29":2,"30":2,"31":1,"33":1,"35":1,"36":2,"459":1,"465":2,"503":1,"507":1,"513":1,"526":1}}],["prod",{"2":{"3":1,"4":2,"453":1,"502":1}}],["projectid>",{"2":{"53":1}}],["project",{"2":{"2":1,"38":1,"97":1}}],["役割ごとに新しいものを宣言して初期化することにより",{"2":{"140":1,"217":1,"281":1}}],["役割が一つであれば",{"2":{"118":1,"195":1,"259":1}}],["役割は一つに",{"0":{"118":1,"195":1,"259":1},"2":{"113":1,"190":1,"254":1}}],["役割や権限といった情報は名前に含めない",{"2":{"33":1}}],["役割を示す",{"2":{"2":1}}],["役割",{"0":{"6":1},"2":{"2":1,"7":1,"51":1}}],["環境構築",{"2":{"407":1}}],["環境構築ミスなど何らかのトラブルで動作しなかった場合に改行コードミスで特にジュニアクラスのメンバーが困る状況もゼロとは言えないため",{"2":{"94":1}}],["環境情報",{"0":{"320":1},"1":{"321":1,"322":1}}],["環境設定を",{"2":{"95":1}}],["環境にアクセス可能なポリシーをグループにアタッチする方針としている",{"2":{"34":1}}],["環境のみにアクセスできるといったような制御をする場合でも",{"2":{"34":1}}],["環境の区別",{"2":{"2":1}}],["環境名",{"2":{"12":1,"33":1}}],["環境名をそのまま利用しない",{"2":{"4":1}}],["環境を単にテスト環境",{"2":{"4":1}}],["環境識別子の数は通常そこまで多くならないず",{"2":{"4":1}}],["環境識別子",{"0":{"4":1},"2":{"38":1}}],["環境単位で",{"2":{"3":2}}],["環境",{"0":{"3":1},"1":{"4":1,"5":1},"2":{"2":1,"27":1}}],["everything",{"2":{"544":2}}],["event",{"0":{"31":1},"2":{"408":1}}],["editorconfig",{"2":{"480":1}}],["editing",{"2":{"97":1}}],["erd",{"2":{"394":1,"400":2,"407":1,"411":2,"470":1,"538":1,"570":1,"620":1}}],["error",{"2":{"130":2,"163":4,"207":2,"236":4,"271":2,"299":4,"323":1,"326":1,"437":1,"447":4,"464":10,"465":3,"544":1}}],["elseの後に改行を挿入すること",{"2":{"563":1,"613":1}}],["else",{"2":{"146":2,"151":2,"154":2,"223":2,"229":2,"287":2,"293":2}}],["elb",{"2":{"4":1}}],["equals",{"2":{"145":3,"147":4,"148":1,"151":1,"158":1,"170":2,"222":3,"224":4,"225":1,"233":1,"243":2,"286":3,"288":4,"289":1,"306":2}}],["e",{"2":{"130":2,"146":1,"158":1,"163":6,"207":2,"223":1,"233":1,"236":6,"271":2,"287":1,"299":6,"430":2,"570":1,"586":4,"620":1,"636":4}}],["eol=lf",{"2":{"94":1}}],["employeeopt",{"2":{"157":2,"232":2,"296":2}}],["employee>",{"2":{"157":3,"232":3,"296":3}}],["employeeid",{"2":{"157":4,"232":4,"296":4}}],["employee",{"2":{"138":2,"157":10,"215":2,"232":10,"279":2,"296":10,"586":2,"636":2}}],["emptylist",{"2":{"134":1,"211":1,"275":1}}],["empty",{"2":{"134":1,"145":2,"211":1,"275":1}}],["email",{"2":{"82":2,"469":1,"537":1}}],["emojis",{"2":{"45":1}}],["effectively",{"0":{"155":1,"230":1,"294":1}}],["effect",{"2":{"36":4}}],["ext",{"2":{"660":1}}],["externaldocs",{"0":{"527":1},"2":{"495":1,"503":1,"527":2}}],["extends",{"2":{"142":3,"219":3,"283":3}}],["ex",{"2":{"468":1,"536":1}}],["exampe",{"2":{"465":1}}],["examples",{"2":{"512":1,"543":1,"544":11}}],["exampleが必須",{"2":{"465":1}}],["example",{"2":{"4":1,"18":1,"82":3,"321":1,"322":1,"324":1,"447":5,"453":3,"456":2,"465":13,"473":1,"502":3,"506":1,"541":1}}],["expected",{"2":{"544":2}}],["expired",{"2":{"514":1}}],["explorer",{"2":{"179":1}}],["expressions",{"2":{"151":1,"152":1}}],["export",{"2":{"29":1}}],["exclusivemaximum",{"2":{"465":1}}],["exclude",{"2":{"96":1}}],["excelなどのファイル形式を利用することを推奨する",{"2":{"406":1}}],["excel",{"2":{"405":1}}],["exception",{"2":{"130":1,"131":1,"163":2,"207":1,"208":1,"236":2,"271":1,"272":1,"299":2}}],["exists",{"0":{"576":1,"625":1},"2":{"123":1,"200":1,"264":1,"576":1,"586":2,"588":1,"625":1,"636":2,"638":1}}],["ec",{"2":{"524":1}}],["eclipse",{"2":{"166":1,"239":1,"302":1}}],["ecs",{"0":{"22":1},"2":{"22":1}}],["ec2",{"0":{"20":1},"2":{"1":1,"18":1,"20":1,"34":1,"35":1,"36":1,"38":1}}],["enterprise",{"2":{"649":1}}],["entraidに接続できません",{"2":{"430":1}}],["entry>",{"2":{"129":2,"206":2,"270":2}}],["entry",{"2":{"122":2,"131":1,"133":4,"199":2,"208":1,"210":4,"263":2,"272":1,"274":4}}],["entity",{"2":{"408":3}}],["entity2",{"2":{"160":2}}],["entity1",{"2":{"160":2}}],["encode2",{"2":{"146":1,"223":1,"287":1}}],["encode1",{"2":{"146":1,"223":1,"287":1}}],["encode",{"2":{"146":1,"223":1,"287":1}}],["enumは指定しないこと",{"2":{"465":1}}],["enum01",{"0":{"431":1},"1":{"432":1,"433":1}}],["enumeration",{"2":{"153":1,"228":1,"292":1}}],["enum",{"0":{"127":1,"204":1,"268":1},"2":{"122":1,"127":1,"143":1,"145":1,"151":2,"199":1,"204":1,"220":1,"222":1,"263":1,"268":1,"284":1,"286":1,"324":1,"465":3,"466":1,"468":1,"471":2,"472":2,"478":1,"534":1,"536":1,"539":3,"540":2,"546":1}}],["en",{"2":{"111":1,"188":1,"252":1}}],["enable",{"2":{"66":1,"92":1,"481":1,"545":1}}],["enabled",{"2":{"65":1,"82":2}}],["endの前までは",{"2":{"563":1,"613":1}}],["enduml",{"2":{"328":1,"408":1,"421":1}}],["end",{"2":{"328":1,"423":1,"480":1,"563":1,"613":1}}],["endswith",{"2":{"169":2,"242":2,"305":2}}],["endat",{"2":{"38":1}}],["endpoint",{"2":{"18":1}}],["envで行うのが一般的になってきているが",{"2":{"95":1}}],["env",{"0":{"3":1},"1":{"4":1,"5":1},"2":{"2":1,"12":1,"18":8,"19":1,"20":1,"21":2,"22":3,"24":4,"25":1,"26":5,"27":1,"28":3,"29":2,"30":2,"31":1,"33":1,"34":1,"35":1,"36":2,"38":1,"40":1,"95":2,"321":1,"322":1}}],["eip",{"2":{"18":1}}],["east",{"2":{"8":2}}],["cmptr",{"2":{"553":1,"604":1}}],["csrfトークン",{"2":{"519":1}}],["csrftoken",{"2":{"519":1}}],["csrf",{"2":{"519":1}}],["csvcompany",{"2":{"325":1}}],["csv",{"2":{"160":3,"321":1,"322":1,"323":1,"326":1}}],["ctrl",{"2":{"480":1}}],["cross",{"2":{"476":1,"531":1}}],["creating",{"2":{"97":2}}],["creators",{"2":{"90":1}}],["created",{"2":{"90":1,"439":1,"464":1}}],["create",{"2":{"88":1,"100":1,"105":1,"182":3}}],["createstream",{"2":{"29":1}}],["createfunction",{"2":{"24":1}}],["cpu",{"2":{"474":1,"529":1,"587":1,"637":1}}],["c0001",{"2":{"115":1,"192":1,"256":1}}],["cer",{"2":{"82":1}}],["customer",{"2":{"167":1,"240":1,"303":1}}],["custom",{"2":{"82":1}}],["chihuahua",{"2":{"544":2}}],["channelすると",{"2":{"669":1}}],["channel",{"0":{"671":1},"2":{"669":1,"671":2}}],["channelは乱発しない",{"0":{"669":1}}],["changes",{"2":{"97":1,"183":3}}],["changed",{"2":{"97":1}}],["char",{"2":{"581":1,"632":1}}],["charset",{"2":{"480":1}}],["character",{"2":{"156":6,"231":6,"295":6}}],["character>",{"2":{"156":3,"231":3,"295":3}}],["chagedタブで確認",{"2":{"65":2}}],["choose",{"2":{"86":1}}],["checkanddo",{"2":{"118":2,"195":2,"259":2}}],["checks",{"2":{"88":1}}],["checkout",{"0":{"182":1},"2":{"79":1,"82":1,"105":2}}],["check",{"2":{"29":1,"118":3,"182":1,"195":3,"259":3}}],["checkconsistency",{"2":{"24":1}}],["cliを使用して以下コマンドを実行する",{"2":{"544":1}}],["cli",{"2":{"480":1}}],["clientside",{"2":{"474":1,"529":1}}],["cliツール",{"2":{"48":1}}],["clone",{"0":{"179":1},"2":{"179":1}}],["classname",{"2":{"173":1,"246":1,"309":1}}],["class",{"2":{"122":2,"129":1,"138":2,"142":6,"145":2,"160":8,"167":1,"173":1,"199":2,"206":1,"215":2,"219":6,"222":1,"240":1,"246":1,"263":2,"270":1,"279":2,"283":6,"286":1,"303":1,"309":1,"459":1}}],["clb",{"2":{"21":1}}],["c",{"2":{"9":1,"65":2,"130":2,"137":2,"145":2,"156":3,"158":3,"167":3,"170":4,"207":2,"214":2,"231":3,"233":3,"240":3,"243":4,"271":2,"278":2,"295":3,"303":3,"306":4,"578":3,"627":3}}],["count",{"0":{"579":1,"628":1},"2":{"579":4,"628":4}}],["col3",{"2":{"578":1,"627":1}}],["col3\\t\\t=\\tb",{"2":{"578":1,"627":1}}],["col1",{"2":{"578":2,"581":1,"627":2,"632":1}}],["col1\\t>=\\tto",{"2":{"581":1,"632":1}}],["col1\\t>\\t100\\t",{"2":{"581":1,"632":1}}],["col1\\t+\\t1\\t>\\t100",{"2":{"581":1,"632":1}}],["col1\\t\\t=\\ta",{"2":{"578":2,"627":2}}],["col1\\t=\\t2",{"2":{"581":1,"632":1}}],["col1\\t=\\t1",{"2":{"581":1,"632":1}}],["col1\\t=\\tm",{"2":{"576":1,"625":1}}],["col1\\t=\\tt2",{"2":{"571":1}}],["col2\\t\\t=\\ta",{"2":{"578":1,"627":1}}],["col2",{"2":{"571":1,"578":1,"627":1}}],["col",{"2":{"567":4,"617":4}}],["column4",{"2":{"566":1,"616":1}}],["column4\\t=\\tt2",{"2":{"566":1,"616":1}}],["column2\\t=\\t1",{"2":{"569":1,"619":1}}],["column2\\t=\\t100\\t",{"2":{"559":1,"610":1}}],["column2\\tdesc",{"2":{"568":1}}],["column2\\tas\\tcolumn2",{"2":{"566":1,"616":1}}],["column2\\tas\\tcolumn2\\t",{"2":{"556":1,"557":1,"607":1,"608":1}}],["column2",{"2":{"557":1,"562":1,"566":1,"608":1,"612":1,"616":1,"618":1}}],["column1\\t=\\t1",{"2":{"578":1,"627":1}}],["column1\\t=\\t10",{"2":{"559":1,"610":1}}],["column1\\tas\\tcolumn1",{"2":{"566":1,"568":1,"569":1,"616":1,"619":1}}],["column1\\tas\\tcolumn1\\t",{"2":{"556":1,"557":1,"607":1,"608":1}}],["column1",{"2":{"557":1,"562":1,"566":1,"608":1,"612":1,"616":1,"618":2}}],["column3\\t=\\t100\\t",{"2":{"559":1,"610":1}}],["column3\\t=\\t1",{"2":{"557":1,"566":1,"608":1,"616":1}}],["collectors",{"2":{"147":1,"224":1,"231":7,"242":1,"288":1,"295":7,"305":1}}],["collect",{"2":{"147":1,"224":1,"231":7,"242":1,"288":1,"295":7,"305":1}}],["collection",{"2":{"145":3,"153":2,"228":2,"292":2}}],["collections",{"2":{"134":1,"211":1,"275":1,"278":3,"408":3}}],["collaborators",{"2":{"86":1}}],["cookiecsrftoken",{"2":{"519":2}}],["cookie",{"0":{"519":1},"2":{"515":1,"519":5}}],["corp",{"2":{"553":1,"604":1}}],["corporation",{"2":{"553":1,"604":1}}],["cors",{"0":{"476":1,"531":1},"2":{"476":1,"481":1,"531":1,"545":1}}],["core",{"2":{"94":3}}],["cobol",{"2":{"166":1,"239":1,"302":1}}],["coding",{"0":{"596":1}}],["codingkind",{"2":{"146":5,"223":5,"287":5}}],["codingstd",{"2":{"111":1,"188":1,"252":1}}],["codingstandard",{"2":{"111":2,"188":2,"252":2}}],["codegenを使用する場合は",{"2":{"509":1,"510":1}}],["codeでのgit操作を紹介する",{"2":{"177":1}}],["codeconvtoc",{"2":{"111":1,"188":1,"252":1}}],["code上でのgit操作を紹介する",{"2":{"80":1}}],["codepipeline",{"2":{"31":1}}],["code",{"0":{"80":1,"87":1,"91":1},"1":{"88":1,"89":1,"90":1,"91":1},"2":{"8":1,"111":2,"136":2,"188":2,"213":2,"252":2,"277":2,"480":1,"544":2}}],["co",{"2":{"66":1,"82":3,"111":1,"173":1,"188":1,"246":1,"252":1,"309":1}}],["consumes",{"0":{"458":1},"2":{"447":1,"458":2,"462":1}}],["const",{"2":{"173":11,"246":11,"309":11}}],["constant",{"2":{"143":1,"220":1,"284":1}}],["construction",{"2":{"45":1}}],["conflict",{"2":{"439":1}}],["config推奨設定",{"0":{"82":1}}],["config",{"2":{"65":2,"66":1,"82":14,"94":1}}],["contact",{"2":{"449":1,"498":1}}],["contains",{"2":{"147":1,"224":1,"288":1}}],["contents",{"2":{"537":1}}],["contenttype",{"2":{"508":1}}],["content",{"2":{"441":1,"457":2,"464":1,"508":1,"509":3,"510":4,"514":5,"518":1,"544":7,"546":1}}],["control",{"2":{"177":1,"179":1,"180":1,"181":1,"182":1,"183":3,"408":3,"476":1,"531":1}}],["contributors",{"2":{"85":1}}],["conversation",{"2":{"88":1}}],["conventional",{"2":{"42":1,"70":1}}],["conventions",{"2":{"37":1,"111":3,"188":3,"252":3}}],["convention",{"2":{"18":1}}],["copyof",{"2":{"146":2,"223":2,"287":2}}],["copy",{"2":{"131":1,"208":1,"272":1}}],["copyright",{"2":{"131":1,"208":1,"272":1}}],["cop",{"2":{"45":1}}],["comment",{"2":{"167":3,"240":3,"303":3}}],["comma",{"2":{"160":1}}],["community",{"2":{"111":2,"188":2,"252":2}}],["committing",{"2":{"97":1}}],["commit",{"0":{"105":1,"106":1,"183":1},"2":{"79":2,"82":1,"88":1,"97":1,"100":1,"104":2,"105":4,"106":1,"180":1,"183":1}}],["commits",{"2":{"70":1,"85":2,"88":2,"97":1,"105":2,"107":1}}],["commitsをベースとした規約としている",{"2":{"42":1}}],["common",{"2":{"2":1,"38":1,"544":2}}],["com",{"2":{"37":1,"82":1,"97":2,"111":2,"151":1,"152":1,"188":2,"252":2,"447":1,"453":3,"456":2,"463":1,"474":1,"481":1,"502":3,"506":1,"527":2,"529":1,"545":1}}],["computer",{"2":{"553":1,"604":1}}],["components",{"0":{"512":1,"513":1,"514":1,"515":1,"520":1,"521":1,"522":1,"523":1,"524":1},"1":{"513":1,"514":1,"515":1,"516":2,"517":2,"518":2,"519":2,"520":1,"521":1,"522":1,"523":1,"524":1},"2":{"495":1,"509":3,"510":6,"514":4,"517":2,"518":2,"519":2,"521":2,"539":3,"544":17}}],["completed",{"2":{"327":1}}],["completely",{"2":{"14":1}}],["comparing",{"2":{"156":3,"231":3,"295":3}}],["comparator",{"2":{"156":3,"170":3,"231":3,"243":3,"295":3,"306":3}}],["comparetoを利用してbigdecimal",{"2":{"175":1,"250":1,"313":1}}],["comparetoignorecase",{"2":{"154":2,"170":7,"229":2,"243":7,"293":2,"306":7}}],["compareto",{"2":{"148":1,"175":3,"225":1,"250":3,"289":1,"313":3}}],["compare",{"2":{"135":2,"158":1,"170":2,"212":2,"233":1,"243":2,"276":2,"306":2}}],["company",{"2":{"2":1,"30":2,"33":2,"34":1,"36":1,"324":1}}],["comp",{"2":{"135":2,"212":2,"276":2}}],["cd\\t",{"2":{"556":1,"607":1}}],["cd周り",{"2":{"407":1}}],["cdによるデプロイを推奨する",{"2":{"59":1}}],["cdでdevelop断面をリリースすることを推奨する",{"2":{"59":1}}],["cdでデプロイを推奨する",{"2":{"59":2}}],["cd",{"2":{"6":3,"324":2,"325":2,"465":1}}],["ciパイプラインのワークフロー名を指定",{"2":{"88":1}}],["ciの成功を条件とする",{"2":{"88":1}}],["ci",{"2":{"6":4,"82":1,"407":1}}],["carta",{"2":{"667":1}}],["carnumber",{"2":{"120":1,"197":1,"261":1}}],["camelcase",{"2":{"462":1}}],["catch",{"2":{"130":1,"146":1,"163":4,"207":1,"223":1,"236":4,"271":1,"287":1,"299":4}}],["category",{"2":{"2":1,"38":1,"85":1,"86":1,"88":1,"89":1,"90":1,"91":1,"323":1,"326":1,"544":19}}],["calculateutils",{"2":{"129":1,"206":1,"270":1}}],["calc",{"2":{"124":3,"201":3,"265":3}}],["callbacks",{"0":{"524":1},"2":{"503":1,"512":1,"524":1}}],["call",{"2":{"29":2}}],["canvas",{"2":{"668":1}}],["can",{"2":{"85":1}}],["ca",{"2":{"82":1}}],["caseの後",{"2":{"563":1,"613":1}}],["caseラベルが生成する値をyield文で指定します",{"2":{"151":1,"152":1}}],["case",{"0":{"563":1,"613":1},"2":{"12":2,"36":1,"146":4,"151":27,"152":13,"223":4,"287":4,"463":1,"544":13,"563":1,"613":1}}],["cacheable",{"2":{"521":1}}],["cache",{"2":{"6":2}}],["名に",{"2":{"519":1}}],["名にはリージョンコードを含めず",{"2":{"9":1}}],["名程度の規模",{"2":{"404":1}}],["名程度で構築する規模での利用を想定している",{"2":{"1":1}}],["名を利用した比較をおこなわない",{"2":{"145":1,"222":1,"286":1}}],["名を分けたいという考えもあるかもしれないが",{"2":{"33":1}}],["名はクラス名と同じく",{"2":{"127":1,"204":1,"268":1}}],["名はクラス名に準ずる",{"2":{"122":1,"199":1,"263":1}}],["名",{"2":{"122":1,"131":1,"208":1,"272":1,"416":2}}],["名称にステータスコードの名称",{"2":{"514":1}}],["名称は単数形で定義する",{"2":{"513":1}}],["名称はアッパーキャメルケースで定義する",{"2":{"513":1,"514":1}}],["名称を指定するためにコンポーネント化が必要となるが",{"2":{"509":1,"510":1}}],["名称",{"2":{"58":1,"59":1,"94":1}}],["名前",{"2":{"160":1}}],["名前の説明",{"2":{"131":1,"208":1,"272":1}}],["名前の構成要素",{"0":{"2":1},"1":{"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1}}],["名前付け",{"2":{"115":1,"192":1,"256":1}}],["名前は",{"2":{"20":1}}],["名前を一般化せず",{"2":{"6":1}}],["名前には必ず識別子を用いる",{"2":{"4":1}}],["台の",{"2":{"1":1}}],["1シート目",{"2":{"681":1}}],["1ではない",{"2":{"681":1}}],["1理由",{"2":{"672":1}}],["1ng",{"2":{"672":1}}],["15時点では",{"2":{"523":1}}],["15",{"2":{"490":1}}],["1を定義する",{"2":{"470":1,"538":1}}],["1~100が指定可能",{"2":{"468":1,"536":1}}],["1つのタグを指定する",{"2":{"504":1}}],["1つの画面の利用項目数が数十以上になり得る場合は",{"2":{"406":1}}],["1つのコミットが複数の作成者に帰属するようにするようになっている",{"2":{"66":1}}],["1件以上存在する場合は",{"2":{"388":1}}],["1件以上存在した場合は",{"2":{"352":2}}],["11111111",{"2":{"544":1}}],["111",{"2":{"340":1,"347":1,"373":2,"376":2,"381":1,"388":3}}],["11",{"2":{"173":2,"246":2,"309":2,"407":1,"677":1}}],["114",{"2":{"169":1,"242":1,"305":1}}],["1しかし",{"2":{"173":1,"246":1,"309":1}}],["14",{"2":{"170":1,"173":1,"243":1,"246":1,"306":1,"309":1,"490":1}}],["1995",{"2":{"167":1,"240":1,"303":1}}],["1997",{"2":{"167":1,"240":1,"303":1}}],["1970",{"2":{"166":1,"239":1,"302":1}}],["1960",{"2":{"166":1,"239":1,"302":1}}],["198",{"2":{"28":1}}],["1良い例",{"2":{"154":1,"229":1,"293":1,"581":1,"632":1}}],["16進数と見なしてa~fを導入する拡張を行う",{"2":{"402":1}}],["16",{"2":{"151":1,"152":1,"174":1,"247":1,"310":1,"323":2,"324":1,"326":2,"447":2,"463":2,"465":3}}],["1609",{"2":{"136":2,"213":2,"277":2}}],["1変数名に固有名詞が含まれる場合",{"2":{"125":1,"202":1,"266":1}}],["1悪い例",{"2":{"122":1,"123":1,"125":1,"130":4,"135":1,"136":1,"137":3,"139":1,"146":1,"147":1,"153":1,"154":4,"199":1,"200":1,"202":1,"207":4,"212":1,"213":1,"214":3,"216":1,"223":1,"224":1,"228":1,"229":4,"263":1,"264":1,"266":1,"271":4,"276":1,"277":1,"278":2,"280":1,"287":1,"288":1,"292":1,"293":4,"497":1}}],["136057",{"2":{"111":1,"188":1,"252":1}}],["1通常",{"2":{"94":1}}],["1名でも",{"2":{"86":1}}],["1のリバートはgithubの機能で提供されていることもあり簡単に行えるが",{"2":{"69":1}}],["1txtrefactor",{"2":{"46":1}}],["1txtdocs",{"2":{"46":1}}],["1txtfix",{"2":{"46":1}}],["1コミットメッセージは",{"2":{"42":1}}],["17",{"2":{"36":2,"173":1,"174":1,"246":1,"247":1,"309":1,"310":1}}],["101",{"2":{"503":2}}],["10mb",{"2":{"474":1,"529":1}}],["10",{"2":{"34":1,"36":2,"130":2,"136":2,"170":3,"172":1,"174":1,"207":2,"213":2,"243":3,"245":1,"247":1,"271":2,"277":2,"306":3,"308":1,"310":1,"324":2,"404":1,"407":1,"490":2,"544":5}}],["10005",{"2":{"544":1}}],["10004",{"2":{"430":1,"544":1}}],["10003",{"2":{"430":1,"544":1}}],["10002",{"2":{"430":1,"544":1}}],["10001",{"2":{"430":1,"544":1}}],["1000$を超える請求には",{"2":{"167":1,"240":1,"303":1}}],["1000",{"2":{"147":2,"166":1,"224":2,"239":1,"288":2,"302":1,"587":1,"637":1}}],["100",{"2":{"28":1,"169":1,"170":2,"172":1,"174":1,"242":1,"243":2,"245":1,"247":1,"305":1,"306":2,"308":1,"310":1,"468":1,"536":1,"544":4,"587":1,"637":1}}],["1024",{"2":{"19":1}}],["12良い例",{"2":{"581":1,"632":1}}],["12121",{"2":{"325":2}}],["12javastring",{"2":{"249":1,"312":1}}],["127",{"2":{"248":1,"311":1}}],["12これらの違いは",{"2":{"248":1,"311":1}}],["12しかし",{"2":{"248":1,"249":1,"311":1,"312":1}}],["123stringbuilder",{"2":{"173":1,"246":1,"309":1}}],["123なお",{"2":{"166":1,"239":1,"302":1}}],["123一見すると",{"2":{"160":1}}],["123javavoid",{"2":{"158":1,"233":1}}],["123ただし",{"2":{"153":1,"228":1,"292":1}}],["123",{"2":{"130":2,"136":1,"141":1,"146":1,"147":1,"149":1,"153":1,"154":1,"158":2,"160":1,"161":1,"162":1,"174":1,"207":2,"213":1,"218":1,"222":1,"223":1,"224":1,"226":1,"228":1,"229":1,"233":2,"234":1,"235":1,"247":1,"271":2,"277":1,"282":1,"286":1,"287":1,"290":1,"292":1,"293":1,"297":1,"298":1,"310":1,"325":1,"458":1,"502":1,"503":1,"570":1,"578":1,"620":1,"627":1}}],["123悪い例",{"2":{"123":1,"124":1,"130":2,"145":1,"146":1,"147":1,"153":1,"158":1,"160":2,"200":1,"201":1,"207":2,"222":1,"223":1,"224":1,"228":1,"233":1,"264":1,"265":1,"271":2,"286":1,"287":1,"292":1,"503":1}}],["1234プロジェクトで観点を決めるべき例",{"2":{"158":1,"233":1}}],["1234悪い例",{"2":{"126":1,"140":1,"146":1,"151":1,"156":1,"158":1,"160":1,"203":1,"217":1,"223":1,"231":1,"233":1,"267":1,"281":1,"287":1,"295":1,"503":1,"630":1}}],["1234",{"2":{"24":1,"145":1,"160":3,"472":1,"503":1,"505":1,"506":1,"540":1,"556":1,"607":1,"630":1}}],["12345docs",{"2":{"407":1}}],["12345ただし",{"2":{"145":1,"222":1,"286":1}}],["12345悪い例",{"2":{"133":1,"136":1,"145":1,"147":3,"148":1,"156":1,"160":2,"210":1,"213":1,"222":1,"224":3,"225":1,"231":1,"274":1,"277":1,"286":1,"288":3,"289":1,"295":1,"526":1}}],["12345個別のグループは",{"2":{"34":1}}],["12345",{"2":{"21":1,"29":1,"33":1,"53":1,"73":1,"133":1,"140":1,"147":3,"166":1,"169":1,"174":1,"210":1,"217":1,"224":3,"239":1,"242":1,"247":1,"274":1,"281":1,"288":3,"302":1,"305":1,"310":1,"397":1,"423":1,"473":1,"507":1,"526":1,"541":1,"560":1,"581":1,"611":1,"632":1}}],["12345ターゲットグループ名は",{"2":{"21":1}}],["12345オートスケーリング",{"2":{"20":1}}],["123456以下の場合は必須で利用する",{"2":{"487":1}}],["123456悪い例",{"2":{"127":1,"136":1,"138":1,"160":1,"163":1,"204":1,"213":1,"215":1,"236":1,"268":1,"277":1,"279":1,"299":1,"504":1}}],["123456また",{"2":{"74":1}}],["123456iam",{"2":{"36":1}}],["123456特定のリソースに付与するポリシーを書き出す場合",{"2":{"36":1}}],["123456ここでの",{"2":{"34":1}}],["123456aws",{"2":{"33":1}}],["123456ジョブキューとして用いる場合は",{"2":{"29":1}}],["123456なお",{"2":{"27":1}}],["1234567良い例",{"2":{"160":1}}],["1234567悪い例",{"2":{"146":1,"152":1,"156":1,"160":1,"223":1,"231":1,"278":1,"287":1,"295":1,"502":1,"503":1,"508":3}}],["12345678where",{"2":{"556":1,"607":1}}],["12345678ある",{"2":{"457":1}}],["12345678もし",{"2":{"455":1}}],["12345678悪い例",{"2":{"151":1,"504":1,"510":1}}],["123456789良い例",{"2":{"586":1,"636":1}}],["123456789case",{"2":{"563":1,"613":1}}],["123456789openapi",{"2":{"539":1}}],["123456789",{"2":{"146":1,"159":1,"160":1,"172":3,"223":1,"245":3,"287":1,"308":3,"453":1,"471":1,"488":1,"510":1,"569":1,"576":1,"619":1,"625":1}}],["123456789悪い例",{"2":{"145":1,"154":1,"160":1,"229":1,"293":1,"507":1,"509":2}}],["12345678910悪い例",{"2":{"160":1}}],["12345678910",{"2":{"109":1,"110":1,"145":1,"146":1,"159":2,"223":1,"287":1,"527":1,"557":1,"608":1}}],["12345678910properties",{"2":{"36":1}}],["1234567891011悪い例",{"2":{"151":1}}],["123456789101112悪い例",{"2":{"142":1,"151":1,"219":1,"283":1}}],["12345678910111213複雑な処理に直接テキストブロックを使用すると可読性を下げる可能性があります",{"2":{"160":1}}],["12345678910111213",{"2":{"134":1,"156":1,"160":1,"211":1,"231":1,"275":1,"295":1,"457":1,"509":1,"513":1,"561":1}}],["12345678910111213悪い例",{"2":{"134":1,"211":1,"275":1}}],["1234567891011121314悪い例",{"2":{"510":1}}],["123456789101112131415悪い例",{"2":{"160":1}}],["123456789101112131415",{"2":{"146":1,"421":1,"456":1,"459":1,"517":1,"519":1,"521":1}}],["12345678910111213141516悪い例",{"2":{"152":1}}],["12345678910111213141516",{"2":{"129":1,"152":1,"206":1,"270":1}}],["1234567891011121314151617",{"2":{"28":1}}],["12345678910111213141516171819",{"2":{"544":1}}],["1234567891011121314151617181920",{"2":{"463":1,"578":1,"627":1}}],["12345678910111213141516171819202122正常系のレスポンスの例としてはファイルアップロード",{"2":{"514":1}}],["123456789101112131415161718192021222324252627",{"2":{"567":1,"617":1}}],["123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354",{"2":{"544":1}}],["123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325",{"2":{"544":1}}],["1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495",{"2":{"465":1}}],["123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081",{"2":{"447":1}}],["123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051",{"2":{"464":1}}],["1234567891011121314151617181920212223242526272829303132",{"2":{"463":1}}],["12345678910111213141516171819202122232425262728293031",{"2":{"328":1,"514":1}}],["12345678910111213141516171819202122232425sh",{"2":{"544":1}}],["12345678910111213141516171819202122232425",{"2":{"461":1}}],["1234567891011121314151617181920212223",{"2":{"223":1,"287":1}}],["123456789101112131415161718192021システム構成図などは上記では対応しにくいことが多いため",{"2":{"408":1}}],["123456789101112131415161718192021git",{"2":{"82":1}}],["1234567891011121314151617181920properties",{"2":{"36":1}}],["123456789101112131415161718次にポイントを説明します",{"2":{"159":1}}],["123456789101112131415161718az",{"2":{"26":1}}],["123456789101112131415161718",{"2":{"22":1,"45":1,"151":1}}],["1234567891011121314",{"2":{"79":1,"97":1,"157":1,"232":1,"296":1,"407":1,"510":1,"518":1,"539":1,"586":1,"636":1}}],["123456789101112",{"2":{"131":1,"142":1,"151":1,"173":1,"208":1,"219":1,"246":1,"272":1,"283":1,"309":1,"462":1,"558":1,"566":1,"609":1,"616":1}}],["1234567891011",{"2":{"30":1,"146":1,"223":1,"287":1,"465":1,"480":1}}],["12345678変数sの利用範囲が広いので役割が明確になる変数名に変更する",{"2":{"126":1,"203":1,"267":1}}],["12345678",{"2":{"53":1,"152":1,"156":1,"169":1,"231":1,"242":1,"295":1,"305":1,"468":1,"504":2,"522":1,"536":1,"568":1,"570":1,"618":1,"620":1}}],["1234567",{"2":{"31":1,"75":1,"124":1,"137":1,"142":1,"146":1,"147":1,"154":1,"170":1,"201":1,"214":1,"219":1,"223":1,"224":1,"229":1,"243":1,"265":1,"278":1,"283":1,"287":1,"288":1,"293":1,"306":1,"503":1,"508":3,"509":1,"559":1,"562":1,"610":1,"612":1}}],["1234567もし",{"2":{"24":1}}],["123456",{"2":{"19":1,"25":1,"35":1,"105":1,"123":2,"127":1,"131":1,"138":1,"148":1,"151":2,"156":1,"158":1,"163":1,"170":1,"200":2,"204":1,"208":1,"215":1,"225":1,"231":1,"233":1,"236":1,"243":1,"264":2,"268":1,"272":1,"279":1,"289":1,"295":1,"299":1,"306":1,"400":1,"454":1,"460":1,"489":1,"511":1}}],["12",{"2":{"120":1,"129":1,"130":1,"135":1,"139":1,"146":2,"147":1,"156":1,"157":1,"160":1,"167":1,"170":1,"175":2,"197":1,"206":1,"207":1,"212":1,"216":1,"223":2,"224":1,"231":1,"232":1,"240":1,"243":1,"249":1,"250":2,"261":1,"270":1,"271":1,"276":1,"280":1,"287":2,"288":1,"295":1,"296":1,"303":1,"306":1,"312":1,"313":2,"487":1,"490":1,"499":1,"501":2,"523":1,"525":1,"537":1}}],["128",{"2":{"29":1,"37":1,"248":1,"311":1,"447":1,"465":3}}],["12悪い例",{"2":{"14":1,"120":1,"129":1,"130":2,"157":1,"197":1,"206":1,"207":2,"232":1,"261":1,"270":1,"271":2,"296":1}}],["12理由",{"2":{"12":1,"14":1}}],["1d",{"2":{"9":1}}],["1c",{"2":{"9":1}}],["1a",{"2":{"9":1}}],["1",{"0":{"61":1,"65":1,"101":1,"105":1,"109":1,"339":1,"346":1,"352":1,"359":1,"366":1,"373":1,"381":1,"388":1},"1":{"62":1},"2":{"1":1,"8":4,"9":1,"24":1,"25":1,"26":4,"27":1,"28":1,"29":1,"30":3,"46":1,"51":2,"52":1,"58":2,"74":2,"75":1,"88":1,"118":1,"122":1,"123":1,"125":3,"130":7,"132":2,"134":1,"136":7,"137":9,"146":2,"147":2,"148":4,"151":2,"152":3,"153":1,"154":4,"158":1,"166":1,"169":5,"170":3,"172":7,"173":3,"174":5,"175":1,"195":1,"199":1,"200":1,"202":3,"207":7,"209":2,"211":1,"213":7,"214":9,"223":2,"224":2,"225":4,"228":1,"229":4,"233":1,"239":1,"242":5,"243":3,"245":7,"246":3,"247":5,"248":2,"249":5,"250":1,"259":1,"263":1,"264":1,"266":3,"271":7,"273":2,"275":1,"277":7,"278":9,"287":2,"288":2,"289":4,"292":1,"293":4,"302":1,"305":5,"306":3,"308":7,"309":3,"310":5,"311":2,"312":5,"313":1,"323":1,"324":1,"326":1,"328":1,"337":1,"344":1,"350":1,"357":1,"364":1,"371":1,"379":1,"386":1,"402":2,"433":3,"447":6,"452":5,"462":1,"465":14,"468":1,"471":2,"472":1,"476":1,"490":11,"497":1,"501":3,"504":1,"531":1,"536":1,"539":3,"540":1,"544":9,"550":2,"556":1,"563":1,"570":1,"571":1,"576":1,"578":1,"579":1,"581":2,"586":1,"601":2,"607":1,"613":1,"620":1,"625":1,"627":1,"628":1,"632":2,"636":1}}],["そちらを優先すること",{"2":{"649":1}}],["そうではない場合は",{"2":{"465":1}}],["そういった環境分離のために",{"2":{"3":1}}],["そこで説明する内容に絞ったコードが多いため",{"2":{"116":1,"193":1,"257":1}}],["それから",{"2":{"570":1,"620":1}}],["それだけを1行に置く",{"2":{"570":2,"620":2}}],["それらの機能を前提にしている記述がある",{"2":{"649":1}}],["それらの型定義の参考にするためである",{"2":{"465":1}}],["それらの開発チームでは設計ドキュメントが存在さえない",{"2":{"405":1}}],["それらをブロック内に囲みます",{"2":{"151":1,"152":1}}],["それともずっとサービスがあるのか",{"2":{"166":1,"239":1,"302":1}}],["それによって得られるものがある",{"2":{"166":1,"239":1,"302":1}}],["それに気づかずに自分のコードに適用してしまい",{"2":{"116":1,"193":1,"257":1}}],["それがなぜなのかを知ることはできない",{"2":{"166":1,"239":1,"302":1}}],["それが",{"2":{"166":1,"239":1,"302":1}}],["それはもう長い長いテキストブロックのためインデントするとエディタ上でテキストを見るためには横スクロールが必要になるかもしれません",{"2":{"160":2}}],["それ以外はvarを利用してはいけません",{"2":{"158":1,"233":1}}],["それならば略さずに",{"2":{"115":1,"192":1,"256":1}}],["それぞれに",{"2":{"543":1}}],["それぞれ重要な要素ごとに規約を示す",{"2":{"460":1}}],["それぞれは後述する書式に従うものとする",{"2":{"42":1}}],["それぞれのチームごとに管理者権限保持者を設定すること",{"2":{"654":1}}],["それぞれの",{"2":{"561":1}}],["それぞれの状況に合わせて工夫された運営方針が存在する",{"2":{"649":1}}],["それぞれの状況に合わせて工夫された設計開発の方針が存在する",{"2":{"49":1}}],["それぞれの状況に合わせた開発手法が採用されている",{"2":{"0":1,"445":1,"493":1}}],["それぞれの場合の命名方法について記載する",{"2":{"36":1}}],["それぞれの設計方針にはメリット",{"2":{"36":1}}],["それを",{"2":{"6":1}}],["その情報が役立ったのか",{"2":{"674":1}}],["そのスレッドのurlをコピーして",{"2":{"668":1}}],["そのスレッドの通知を切ることで対応する",{"2":{"666":1}}],["その旨をメンバー全員が理解しコミュニケーションから除外してしまわないように注意すること",{"2":{"658":1}}],["その際",{"2":{"657":1}}],["その中に",{"2":{"570":1,"620":1}}],["その",{"2":{"546":1}}],["そのエンドポイントを指定しても良い",{"2":{"453":1}}],["その受信",{"2":{"417":1}}],["その配下に設計ドキュメントとなる",{"2":{"407":1}}],["その分の性能劣化が懸念されます",{"2":{"169":1,"242":1,"305":1}}],["そのソースコード行が終わるまで続く",{"2":{"167":1,"240":1,"303":1}}],["その内容",{"2":{"166":1,"239":1,"302":1}}],["その内容や背景を理解しないまま",{"2":{"116":1,"193":1,"257":1}}],["その部分については",{"2":{"163":1,"236":1,"299":1}}],["そのオブジェクトの実装クラスを用いて宣言できるが",{"2":{"129":1,"206":1,"270":1}}],["その場合にこの機能に頼ると想定以上の追加作業が発生する",{"2":{"524":1}}],["その場合",{"2":{"116":1,"193":1,"257":1}}],["その対象の本質を表すような名前を考える作業である",{"2":{"115":1,"192":1,"256":1}}],["その心得について述べる",{"2":{"113":1,"190":1,"254":1}}],["その開発環境の普及",{"2":{"111":1,"188":1,"252":1}}],["その開発チームの持ち物であることを示すためプロジェクト名をリソース名に含めたくなるが非推奨である",{"2":{"15":1}}],["そのgitリポジトリを使う全員で改行コードの扱いをlfに統一できる",{"2":{"94":1}}],["その成熟度や初回リリースの区切りでバージョンアップを行うことを推奨する",{"2":{"76":1}}],["その後の投稿によってメンション先のユーザーに通知が飛んでしまうのではないか",{"2":{"666":1}}],["その後の投稿の通知を受け取りたくない場合は",{"2":{"666":1}}],["その後の項目やオプション",{"2":{"452":1,"501":1}}],["その後結合条件を記述する",{"2":{"578":1,"627":1}}],["その後ろに単数行コメント",{"2":{"556":1,"607":1}}],["その後に着手されたissue",{"2":{"69":1}}],["その後は通常のリリースフローに従う",{"2":{"62":1}}],["そのため次の運用が望ましい",{"2":{"681":1}}],["そのため議論があればスレッドを利用し",{"2":{"668":1}}],["そのために",{"2":{"465":1}}],["そのため",{"2":{"453":1,"666":1,"668":1}}],["そのためprをなるべく小さなまとまりにする",{"2":{"66":1}}],["そのためマージ後はリモート",{"2":{"66":1}}],["そのため個別の機能名の前に",{"2":{"24":1}}],["そのブランチからfeatureブランチを作成する",{"2":{"63":1}}],["そのような場面では",{"2":{"664":1}}],["そのような名前はユーザーに紐づけるロールが増えた際などに名前と役割や権限の実態が乖離してしまうためである",{"2":{"33":1}}],["そのような構成をしないという方針は",{"2":{"20":1}}],["その他利用サービスも同様のアイコンを利用することで",{"2":{"656":1}}],["その他チームコミュニケーションにおけるルールを設定する",{"2":{"653":1}}],["その他",{"0":{"473":1,"541":1},"2":{"465":1,"469":2,"537":2}}],["その他予期せぬエラー",{"2":{"447":1,"464":2}}],["その他のリリースに伴うタスクのみを実施する",{"2":{"55":1}}],["その他の環境についても",{"2":{"4":1}}],["その他制約",{"2":{"22":1}}],["そのものではなく略称を識別子として用いる",{"2":{"8":1}}],["そのままの導入ができない場合は",{"2":{"1":1}}],["~outer",{"2":{"571":1}}],["~",{"2":{"1":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"404":1,"571":1}}],["3などと記述するのよりパフォーマンス上優位な場合が多い",{"2":{"581":1,"632":1}}],["3とする",{"2":{"497":1}}],["3を対象としているため",{"2":{"497":1}}],["3に則った",{"2":{"493":1}}],["3について例を示します",{"2":{"158":1,"233":1}}],["3規約",{"2":{"413":1}}],["31",{"2":{"544":2}}],["318",{"2":{"249":1,"312":1}}],["312をマージしてしまったことが原因であれば",{"2":{"69":1}}],["312をリバートする",{"2":{"69":1}}],["312はdevelopにマージせず待機しておくべきだった",{"2":{"69":1}}],["312のマージがおかしいとするケース",{"2":{"69":1}}],["312のリリースは業務上の合意が得られていない",{"2":{"69":1}}],["312がdevelopにマージされている状態が正しくないのであれば",{"2":{"69":1}}],["312がdevelopにマージされ",{"2":{"69":1}}],["312",{"2":{"69":1}}],["396",{"2":{"249":1,"312":1}}],["394を優先してリリースしたいというのであれば",{"2":{"69":1}}],["394のマージがおかしいとするケース",{"2":{"69":1}}],["394のコミットのみをcherry",{"2":{"69":1}}],["394は不具合修正であり業務上の優先度が高いため",{"2":{"69":1}}],["394分を先にリリースしたい",{"2":{"69":1}}],["394がマージされた",{"2":{"69":1}}],["394とする",{"2":{"69":1}}],["367min",{"2":{"175":1,"250":1,"313":1}}],["34",{"2":{"173":1,"246":1,"309":1,"487":1}}],["344",{"2":{"136":2,"213":2,"277":2}}],["374",{"2":{"170":1,"243":1,"306":1}}],["380",{"2":{"170":1,"243":1,"306":1}}],["3桁区切り",{"2":{"147":1,"224":1,"288":1}}],["32ab1aaad100eavv",{"2":{"447":1,"465":2}}],["32",{"2":{"4":1,"21":1,"469":1,"537":1}}],["30",{"2":{"1":1,"170":1,"172":2,"173":1,"174":3,"243":1,"245":2,"246":1,"247":3,"306":1,"308":2,"309":1,"310":3,"325":1,"447":1,"465":2}}],["3",{"0":{"67":1,"103":1,"107":1,"167":1,"240":1,"303":1,"341":1,"354":1,"361":1,"368":1,"375":1,"383":1},"2":{"1":1,"8":1,"27":1,"74":1,"88":1,"114":1,"137":6,"156":3,"160":1,"167":1,"173":1,"191":1,"214":6,"231":3,"240":1,"246":1,"249":1,"255":1,"278":6,"295":3,"303":1,"309":1,"312":1,"321":1,"322":1,"337":1,"350":1,"364":1,"371":1,"379":1,"404":1,"413":1,"444":2,"447":1,"453":1,"457":2,"465":3,"473":1,"474":2,"490":18,"491":4,"493":1,"497":4,"507":1,"523":2,"524":1,"529":2,"537":1,"539":1,"541":1,"544":4}}],["免責事項",{"0":{"0":1,"49":1,"445":1,"649":1},"1":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"446":1,"447":1,"448":1,"449":1,"450":1,"451":1,"452":1,"453":1,"454":1,"455":1,"456":1,"457":1,"458":1,"459":1,"460":1,"461":1,"462":1,"463":1,"464":1,"465":1,"466":1,"467":1,"468":1,"469":1,"470":1,"471":1,"472":1,"473":1,"474":1,"475":1,"476":1,"477":1,"478":1,"479":1}}]],"serializationVersion":2}';export{t as default}; diff --git a/assets/chunks/VPLocalSearchBox.7XG85Pby.js b/assets/chunks/VPLocalSearchBox.7XG85Pby.js new file mode 100644 index 00000000..9aaf6659 --- /dev/null +++ b/assets/chunks/VPLocalSearchBox.7XG85Pby.js @@ -0,0 +1,8 @@ +var Ft=Object.defineProperty;var Ot=(a,e,t)=>e in a?Ft(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var Ae=(a,e,t)=>Ot(a,typeof e!="symbol"?e+"":e,t);import{V as Ct,p as ie,h as me,a8 as tt,a9 as Rt,aa as At,q as $e,ab as Mt,d as Lt,D as xe,ac as st,ad as Dt,ae as zt,s as Pt,af as jt,v as Me,P as he,O as _e,ag as Vt,ah as $t,W as Bt,R as Wt,$ as Kt,o as H,b as Jt,j as _,a0 as Ut,k as L,ai as qt,aj as Gt,ak as Ht,c as Z,n as nt,e as Se,C as it,F as rt,a as fe,t as pe,al as Qt,a2 as at,am as Yt,an as Zt,ao as Xt,ap as es,_ as ts}from"./framework.BDUoXecB.js";import{u as ss,c as ns}from"./theme.C7mmewBt.js";const is={root:()=>Ct(()=>import("./@localSearchIndexroot.D_-2RLp1.js"),[])};/*! +* tabbable 6.2.0 +* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE +*/var mt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Ne=mt.join(","),gt=typeof Element>"u",ae=gt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Fe=!gt&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a==null?void 0:a.ownerDocument},Oe=function a(e,t){var s;t===void 0&&(t=!0);var n=e==null||(s=e.getAttribute)===null||s===void 0?void 0:s.call(e,"inert"),r=n===""||n==="true",i=r||t&&e&&a(e.parentNode);return i},rs=function(e){var t,s=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return s===""||s==="true"},bt=function(e,t,s){if(Oe(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Ne));return t&&ae.call(e,Ne)&&n.unshift(e),n=n.filter(s),n},yt=function a(e,t,s){for(var n=[],r=Array.from(e);r.length;){var i=r.shift();if(!Oe(i,!1))if(i.tagName==="SLOT"){var o=i.assignedElements(),l=o.length?o:i.children,c=a(l,!0,s);s.flatten?n.push.apply(n,c):n.push({scopeParent:i,candidates:c})}else{var h=ae.call(i,Ne);h&&s.filter(i)&&(t||!e.includes(i))&&n.push(i);var m=i.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(i),f=!Oe(m,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(i));if(m&&f){var b=a(m===!0?i.children:m.children,!0,s);s.flatten?n.push.apply(n,b):n.push({scopeParent:i,candidates:b})}else r.unshift.apply(r,i.children)}}return n},wt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},re=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||rs(e))&&!wt(e)?0:e.tabIndex},as=function(e,t){var s=re(e);return s<0&&t&&!wt(e)?0:s},os=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},xt=function(e){return e.tagName==="INPUT"},ls=function(e){return xt(e)&&e.type==="hidden"},cs=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(s){return s.tagName==="SUMMARY"});return t},us=function(e,t){for(var s=0;ssummary:first-of-type"),i=r?e.parentElement:e;if(ae.call(i,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof n=="function"){for(var o=e;e;){var l=e.parentElement,c=Fe(e);if(l&&!l.shadowRoot&&n(l)===!0)return ot(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=o}if(ps(e))return!e.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return ot(e);return!1},ms=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var s=0;s=0)},bs=function a(e){var t=[],s=[];return e.forEach(function(n,r){var i=!!n.scopeParent,o=i?n.scopeParent:n,l=as(o,i),c=i?a(n.candidates):o;l===0?i?t.push.apply(t,c):t.push(o):s.push({documentOrder:r,tabIndex:l,item:n,isScope:i,content:c})}),s.sort(os).reduce(function(n,r){return r.isScope?n.push.apply(n,r.content):n.push(r.content),n},[]).concat(t)},ys=function(e,t){t=t||{};var s;return t.getShadowRoot?s=yt([e],t.includeContainer,{filter:Be.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:gs}):s=bt(e,t.includeContainer,Be.bind(null,t)),bs(s)},ws=function(e,t){t=t||{};var s;return t.getShadowRoot?s=yt([e],t.includeContainer,{filter:Ce.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s=bt(e,t.includeContainer,Ce.bind(null,t)),s},oe=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ae.call(e,Ne)===!1?!1:Be(t,e)},xs=mt.concat("iframe").join(","),Le=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ae.call(e,xs)===!1?!1:Ce(t,e)};/*! +* focus-trap 7.6.2 +* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE +*/function We(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,s=Array(e);t0){var s=e[e.length-1];s!==t&&s.pause()}var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var s=e.indexOf(t);s!==-1&&e.splice(s,1),e.length>0&&e[e.length-1].unpause()}},Os=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Cs=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},ge=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Rs=function(e){return ge(e)&&!e.shiftKey},As=function(e){return ge(e)&&e.shiftKey},dt=function(e){return setTimeout(e,0)},ve=function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n1&&arguments[1]!==void 0?arguments[1]:{},g=d.hasFallback,T=g===void 0?!1:g,k=d.params,O=k===void 0?[]:k,S=r[u];if(typeof S=="function"&&(S=S.apply(void 0,Is(O))),S===!0&&(S=void 0),!S){if(S===void 0||S===!1)return S;throw new Error("`".concat(u,"` was specified but was not a node, or did not return a node"))}var C=S;if(typeof S=="string"){try{C=s.querySelector(S)}catch(v){throw new Error("`".concat(u,'` appears to be an invalid selector; error="').concat(v.message,'"'))}if(!C&&!T)throw new Error("`".concat(u,"` as selector refers to no known node"))}return C},m=function(){var u=h("initialFocus",{hasFallback:!0});if(u===!1)return!1;if(u===void 0||u&&!Le(u,r.tabbableOptions))if(c(s.activeElement)>=0)u=s.activeElement;else{var d=i.tabbableGroups[0],g=d&&d.firstTabbableNode;u=g||h("fallbackFocus")}else u===null&&(u=h("fallbackFocus"));if(!u)throw new Error("Your focus-trap needs to have at least one focusable element");return u},f=function(){if(i.containerGroups=i.containers.map(function(u){var d=ys(u,r.tabbableOptions),g=ws(u,r.tabbableOptions),T=d.length>0?d[0]:void 0,k=d.length>0?d[d.length-1]:void 0,O=g.find(function(v){return oe(v)}),S=g.slice().reverse().find(function(v){return oe(v)}),C=!!d.find(function(v){return re(v)>0});return{container:u,tabbableNodes:d,focusableNodes:g,posTabIndexesFound:C,firstTabbableNode:T,lastTabbableNode:k,firstDomTabbableNode:O,lastDomTabbableNode:S,nextTabbableNode:function(p){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,F=d.indexOf(p);return F<0?E?g.slice(g.indexOf(p)+1).find(function(z){return oe(z)}):g.slice(0,g.indexOf(p)).reverse().find(function(z){return oe(z)}):d[F+(E?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(u){return u.tabbableNodes.length>0}),i.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(i.containerGroups.find(function(u){return u.posTabIndexesFound})&&i.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},b=function(u){var d=u.activeElement;if(d)return d.shadowRoot&&d.shadowRoot.activeElement!==null?b(d.shadowRoot):d},y=function(u){if(u!==!1&&u!==b(document)){if(!u||!u.focus){y(m());return}u.focus({preventScroll:!!r.preventScroll}),i.mostRecentlyFocusedNode=u,Os(u)&&u.select()}},x=function(u){var d=h("setReturnFocus",{params:[u]});return d||(d===!1?!1:u)},w=function(u){var d=u.target,g=u.event,T=u.isBackward,k=T===void 0?!1:T;d=d||Ee(g),f();var O=null;if(i.tabbableGroups.length>0){var S=c(d,g),C=S>=0?i.containerGroups[S]:void 0;if(S<0)k?O=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:O=i.tabbableGroups[0].firstTabbableNode;else if(k){var v=i.tabbableGroups.findIndex(function(j){var I=j.firstTabbableNode;return d===I});if(v<0&&(C.container===d||Le(d,r.tabbableOptions)&&!oe(d,r.tabbableOptions)&&!C.nextTabbableNode(d,!1))&&(v=S),v>=0){var p=v===0?i.tabbableGroups.length-1:v-1,E=i.tabbableGroups[p];O=re(d)>=0?E.lastTabbableNode:E.lastDomTabbableNode}else ge(g)||(O=C.nextTabbableNode(d,!1))}else{var F=i.tabbableGroups.findIndex(function(j){var I=j.lastTabbableNode;return d===I});if(F<0&&(C.container===d||Le(d,r.tabbableOptions)&&!oe(d,r.tabbableOptions)&&!C.nextTabbableNode(d))&&(F=S),F>=0){var z=F===i.tabbableGroups.length-1?0:F+1,P=i.tabbableGroups[z];O=re(d)>=0?P.firstTabbableNode:P.firstDomTabbableNode}else ge(g)||(O=C.nextTabbableNode(d))}}else O=h("fallbackFocus");return O},R=function(u){var d=Ee(u);if(!(c(d,u)>=0)){if(ve(r.clickOutsideDeactivates,u)){o.deactivate({returnFocus:r.returnFocusOnDeactivate});return}ve(r.allowOutsideClick,u)||u.preventDefault()}},A=function(u){var d=Ee(u),g=c(d,u)>=0;if(g||d instanceof Document)g&&(i.mostRecentlyFocusedNode=d);else{u.stopImmediatePropagation();var T,k=!0;if(i.mostRecentlyFocusedNode)if(re(i.mostRecentlyFocusedNode)>0){var O=c(i.mostRecentlyFocusedNode),S=i.containerGroups[O].tabbableNodes;if(S.length>0){var C=S.findIndex(function(v){return v===i.mostRecentlyFocusedNode});C>=0&&(r.isKeyForward(i.recentNavEvent)?C+1=0&&(T=S[C-1],k=!1))}}else i.containerGroups.some(function(v){return v.tabbableNodes.some(function(p){return re(p)>0})})||(k=!1);else k=!1;k&&(T=w({target:i.mostRecentlyFocusedNode,isBackward:r.isKeyBackward(i.recentNavEvent)})),y(T||i.mostRecentlyFocusedNode||m())}i.recentNavEvent=void 0},J=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=u;var g=w({event:u,isBackward:d});g&&(ge(u)&&u.preventDefault(),y(g))},Q=function(u){(r.isKeyForward(u)||r.isKeyBackward(u))&&J(u,r.isKeyBackward(u))},W=function(u){Cs(u)&&ve(r.escapeDeactivates,u)!==!1&&(u.preventDefault(),o.deactivate())},V=function(u){var d=Ee(u);c(d,u)>=0||ve(r.clickOutsideDeactivates,u)||ve(r.allowOutsideClick,u)||(u.preventDefault(),u.stopImmediatePropagation())},$=function(){if(i.active)return ut.activateTrap(n,o),i.delayInitialFocusTimer=r.delayInitialFocus?dt(function(){y(m())}):y(m()),s.addEventListener("focusin",A,!0),s.addEventListener("mousedown",R,{capture:!0,passive:!1}),s.addEventListener("touchstart",R,{capture:!0,passive:!1}),s.addEventListener("click",V,{capture:!0,passive:!1}),s.addEventListener("keydown",Q,{capture:!0,passive:!1}),s.addEventListener("keydown",W),o},be=function(){if(i.active)return s.removeEventListener("focusin",A,!0),s.removeEventListener("mousedown",R,!0),s.removeEventListener("touchstart",R,!0),s.removeEventListener("click",V,!0),s.removeEventListener("keydown",Q,!0),s.removeEventListener("keydown",W),o},M=function(u){var d=u.some(function(g){var T=Array.from(g.removedNodes);return T.some(function(k){return k===i.mostRecentlyFocusedNode})});d&&y(m())},U=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(M):void 0,q=function(){U&&(U.disconnect(),i.active&&!i.paused&&i.containers.map(function(u){U.observe(u,{subtree:!0,childList:!0})}))};return o={get active(){return i.active},get paused(){return i.paused},activate:function(u){if(i.active)return this;var d=l(u,"onActivate"),g=l(u,"onPostActivate"),T=l(u,"checkCanFocusTrap");T||f(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=s.activeElement,d==null||d();var k=function(){T&&f(),$(),q(),g==null||g()};return T?(T(i.containers.concat()).then(k,k),this):(k(),this)},deactivate:function(u){if(!i.active)return this;var d=ct({onDeactivate:r.onDeactivate,onPostDeactivate:r.onPostDeactivate,checkCanReturnFocus:r.checkCanReturnFocus},u);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,be(),i.active=!1,i.paused=!1,q(),ut.deactivateTrap(n,o);var g=l(d,"onDeactivate"),T=l(d,"onPostDeactivate"),k=l(d,"checkCanReturnFocus"),O=l(d,"returnFocus","returnFocusOnDeactivate");g==null||g();var S=function(){dt(function(){O&&y(x(i.nodeFocusedBeforeActivation)),T==null||T()})};return O&&k?(k(x(i.nodeFocusedBeforeActivation)).then(S,S),this):(S(),this)},pause:function(u){if(i.paused||!i.active)return this;var d=l(u,"onPause"),g=l(u,"onPostPause");return i.paused=!0,d==null||d(),be(),q(),g==null||g(),this},unpause:function(u){if(!i.paused||!i.active)return this;var d=l(u,"onUnpause"),g=l(u,"onPostUnpause");return i.paused=!1,d==null||d(),f(),$(),q(),g==null||g(),this},updateContainerElements:function(u){var d=[].concat(u).filter(Boolean);return i.containers=d.map(function(g){return typeof g=="string"?s.querySelector(g):g}),i.active&&f(),q(),this}},o.updateContainerElements(e),o};function Ds(a,e={}){let t;const{immediate:s,...n}=e,r=ie(!1),i=ie(!1),o=f=>t&&t.activate(f),l=f=>t&&t.deactivate(f),c=()=>{t&&(t.pause(),i.value=!0)},h=()=>{t&&(t.unpause(),i.value=!1)},m=me(()=>{const f=tt(a);return(Array.isArray(f)?f:[f]).map(b=>{const y=tt(b);return typeof y=="string"?y:Rt(y)}).filter(At)});return $e(m,f=>{f.length&&(t=Ls(f,{...n,onActivate(){r.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){r.value=!1,e.onDeactivate&&e.onDeactivate()}}),s&&o())},{flush:"post"}),Mt(()=>l()),{hasFocus:r,isPaused:i,activate:o,deactivate:l,pause:c,unpause:h}}class ce{constructor(e,t=!0,s=[],n=5e3){this.ctx=e,this.iframes=t,this.exclude=s,this.iframesTimeout=n}static matches(e,t){const s=typeof t=="string"?[t]:t,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(n){let r=!1;return s.every(i=>n.call(e,i)?(r=!0,!1):!0),r}else return!1}getContexts(){let e,t=[];return typeof this.ctx>"u"||!this.ctx?e=[]:NodeList.prototype.isPrototypeOf(this.ctx)?e=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?e=this.ctx:typeof this.ctx=="string"?e=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):e=[this.ctx],e.forEach(s=>{const n=t.filter(r=>r.contains(s)).length>0;t.indexOf(s)===-1&&!n&&t.push(s)}),t}getIframeContents(e,t,s=()=>{}){let n;try{const r=e.contentWindow;if(n=r.document,!r||!n)throw new Error("iframe inaccessible")}catch{s()}n&&t(n)}isIframeBlank(e){const t="about:blank",s=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&s!==t&&s}observeIframeLoad(e,t,s){let n=!1,r=null;const i=()=>{if(!n){n=!0,clearTimeout(r);try{this.isIframeBlank(e)||(e.removeEventListener("load",i),this.getIframeContents(e,t,s))}catch{s()}}};e.addEventListener("load",i),r=setTimeout(i,this.iframesTimeout)}onIframeReady(e,t,s){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,t,s):this.getIframeContents(e,t,s):this.observeIframeLoad(e,t,s)}catch{s()}}waitForIframes(e,t){let s=0;this.forEachIframe(e,()=>!0,n=>{s++,this.waitForIframes(n.querySelector("html"),()=>{--s||t()})},n=>{n||t()})}forEachIframe(e,t,s,n=()=>{}){let r=e.querySelectorAll("iframe"),i=r.length,o=0;r=Array.prototype.slice.call(r);const l=()=>{--i<=0&&n(o)};i||l(),r.forEach(c=>{ce.matches(c,this.exclude)?l():this.onIframeReady(c,h=>{t(c)&&(o++,s(h)),l()},l)})}createIterator(e,t,s){return document.createNodeIterator(e,t,s,!1)}createInstanceOnIframe(e){return new ce(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,s){const n=e.compareDocumentPosition(s),r=Node.DOCUMENT_POSITION_PRECEDING;if(n&r)if(t!==null){const i=t.compareDocumentPosition(s),o=Node.DOCUMENT_POSITION_FOLLOWING;if(i&o)return!0}else return!0;return!1}getIteratorNode(e){const t=e.previousNode();let s;return t===null?s=e.nextNode():s=e.nextNode()&&e.nextNode(),{prevNode:t,node:s}}checkIframeFilter(e,t,s,n){let r=!1,i=!1;return n.forEach((o,l)=>{o.val===s&&(r=l,i=o.handled)}),this.compareNodeIframe(e,t,s)?(r===!1&&!i?n.push({val:s,handled:!0}):r!==!1&&!i&&(n[r].handled=!0),!0):(r===!1&&n.push({val:s,handled:!1}),!1)}handleOpenIframes(e,t,s,n){e.forEach(r=>{r.handled||this.getIframeContents(r.val,i=>{this.createInstanceOnIframe(i).forEachNode(t,s,n)})})}iterateThroughNodes(e,t,s,n,r){const i=this.createIterator(t,e,n);let o=[],l=[],c,h,m=()=>({prevNode:h,node:c}=this.getIteratorNode(i),c);for(;m();)this.iframes&&this.forEachIframe(t,f=>this.checkIframeFilter(c,h,f,o),f=>{this.createInstanceOnIframe(f).forEachNode(e,b=>l.push(b),n)}),l.push(c);l.forEach(f=>{s(f)}),this.iframes&&this.handleOpenIframes(o,e,s,n),r()}forEachNode(e,t,s,n=()=>{}){const r=this.getContexts();let i=r.length;i||n(),r.forEach(o=>{const l=()=>{this.iterateThroughNodes(e,o,t,s,()=>{--i<=0&&n()})};this.iframes?this.waitForIframes(o,l):l()})}}let zs=class{constructor(e){this.ctx=e,this.ie=!1;const t=window.navigator.userAgent;(t.indexOf("MSIE")>-1||t.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(e){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},e)}get opt(){return this._opt}get iterator(){return new ce(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const s=this.opt.log;this.opt.debug&&typeof s=="object"&&typeof s[t]=="function"&&s[t](`mark.js: ${e}`)}escapeStr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(e){return this.opt.wildcards!=="disabled"&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),this.opt.wildcards!=="disabled"&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),e}createSynonymsRegExp(e){const t=this.opt.synonyms,s=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let r in t)if(t.hasOwnProperty(r)){const i=t[r],o=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(r):this.escapeStr(r),l=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(i):this.escapeStr(i);o!==""&&l!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(o)}|${this.escapeStr(l)})`,`gm${s}`),n+`(${this.processSynomyms(o)}|${this.processSynomyms(l)})`+n))}return e}processSynomyms(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}setupWildcardsRegExp(e){return e=e.replace(/(?:\\)*\?/g,t=>t.charAt(0)==="\\"?"?":""),e.replace(/(?:\\)*\*/g,t=>t.charAt(0)==="\\"?"*":"")}createWildcardsRegExp(e){let t=this.opt.wildcards==="withSpaces";return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(e){return e.replace(/[^(|)\\]/g,(t,s,n)=>{let r=n.charAt(s+1);return/[(|)\\]/.test(r)||r===""?t:t+"\0"})}createJoinersRegExp(e){let t=[];const s=this.opt.ignorePunctuation;return Array.isArray(s)&&s.length&&t.push(this.escapeStr(s.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join(`[${t.join("")}]*`):e}createDiacriticsRegExp(e){const t=this.opt.caseSensitive?"":"i",s=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"];let n=[];return e.split("").forEach(r=>{s.every(i=>{if(i.indexOf(r)!==-1){if(n.indexOf(i)>-1)return!1;e=e.replace(new RegExp(`[${i}]`,`gm${t}`),`[${i}]`),n.push(i)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let s=this.opt.accuracy,n=typeof s=="string"?s:s.value,r=typeof s=="string"?[]:s.limiters,i="";switch(r.forEach(o=>{i+=`|${this.escapeStr(o)}`}),n){case"partially":default:return`()(${e})`;case"complementary":return i="\\s"+(i||this.escapeStr(t)),`()([^${i}]*${e}[^${i}]*)`;case"exactly":return`(^|\\s${i})(${e})(?=$|\\s${i})`}}getSeparatedKeywords(e){let t=[];return e.forEach(s=>{this.opt.separateWordSearch?s.split(" ").forEach(n=>{n.trim()&&t.indexOf(n)===-1&&t.push(n)}):s.trim()&&t.indexOf(s)===-1&&t.push(s)}),{keywords:t.sort((s,n)=>n.length-s.length),length:t.length}}isNumeric(e){return Number(parseFloat(e))==e}checkRanges(e){if(!Array.isArray(e)||Object.prototype.toString.call(e[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];const t=[];let s=0;return e.sort((n,r)=>n.start-r.start).forEach(n=>{let{start:r,end:i,valid:o}=this.callNoMatchOnInvalidRanges(n,s);o&&(n.start=r,n.length=i-r,t.push(n),s=i)}),t}callNoMatchOnInvalidRanges(e,t){let s,n,r=!1;return e&&typeof e.start<"u"?(s=parseInt(e.start,10),n=s+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&n-t>0&&n-s>0?r=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(e)}`),this.opt.noMatch(e))):(this.log(`Ignoring invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)),{start:s,end:n,valid:r}}checkWhitespaceRanges(e,t,s){let n,r=!0,i=s.length,o=t-i,l=parseInt(e.start,10)-o;return l=l>i?i:l,n=l+parseInt(e.length,10),n>i&&(n=i,this.log(`End range automatically set to the max value of ${i}`)),l<0||n-l<0||l>i||n>i?(r=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):s.substring(l,n).replace(/\s+/g,"")===""&&(r=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:l,end:n,valid:r}}getTextNodes(e){let t="",s=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,n=>{s.push({start:t.length,end:(t+=n.textContent).length,node:n})},n=>this.matchesExclude(n.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{e({value:t,nodes:s})})}matchesExclude(e){return ce.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,s){const n=this.opt.element?this.opt.element:"mark",r=e.splitText(t),i=r.splitText(s-t);let o=document.createElement(n);return o.setAttribute("data-markjs","true"),this.opt.className&&o.setAttribute("class",this.opt.className),o.textContent=r.textContent,r.parentNode.replaceChild(o,r),i}wrapRangeInMappedTextNode(e,t,s,n,r){e.nodes.every((i,o)=>{const l=e.nodes[o+1];if(typeof l>"u"||l.start>t){if(!n(i.node))return!1;const c=t-i.start,h=(s>i.end?i.end:s)-i.start,m=e.value.substr(0,i.start),f=e.value.substr(h+i.start);if(i.node=this.wrapRangeInTextNode(i.node,c,h),e.value=m+f,e.nodes.forEach((b,y)=>{y>=o&&(e.nodes[y].start>0&&y!==o&&(e.nodes[y].start-=h),e.nodes[y].end-=h)}),s-=h,r(i.node.previousSibling,i.start),s>i.end)t=i.end;else return!1}return!0})}wrapMatches(e,t,s,n,r){const i=t===0?0:t+1;this.getTextNodes(o=>{o.nodes.forEach(l=>{l=l.node;let c;for(;(c=e.exec(l.textContent))!==null&&c[i]!=="";){if(!s(c[i],l))continue;let h=c.index;if(i!==0)for(let m=1;m{let l;for(;(l=e.exec(o.value))!==null&&l[i]!=="";){let c=l.index;if(i!==0)for(let m=1;ms(l[i],m),(m,f)=>{e.lastIndex=f,n(m)})}r()})}wrapRangeFromIndex(e,t,s,n){this.getTextNodes(r=>{const i=r.value.length;e.forEach((o,l)=>{let{start:c,end:h,valid:m}=this.checkWhitespaceRanges(o,i,r.value);m&&this.wrapRangeInMappedTextNode(r,c,h,f=>t(f,o,r.value.substring(c,h),l),f=>{s(f,o)})}),n()})}unwrapMatches(e){const t=e.parentNode;let s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.removeChild(e.firstChild));t.replaceChild(s,e),this.ie?this.normalizeTextNode(t):t.normalize()}normalizeTextNode(e){if(e){if(e.nodeType===3)for(;e.nextSibling&&e.nextSibling.nodeType===3;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}markRegExp(e,t){this.opt=t,this.log(`Searching with expression "${e}"`);let s=0,n="wrapMatches";const r=i=>{s++,this.opt.each(i)};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),this[n](e,this.opt.ignoreGroups,(i,o)=>this.opt.filter(o,i,s),r,()=>{s===0&&this.opt.noMatch(e),this.opt.done(s)})}mark(e,t){this.opt=t;let s=0,n="wrapMatches";const{keywords:r,length:i}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),o=this.opt.caseSensitive?"":"i",l=c=>{let h=new RegExp(this.createRegExp(c),`gm${o}`),m=0;this.log(`Searching with expression "${h}"`),this[n](h,1,(f,b)=>this.opt.filter(b,c,s,m),f=>{m++,s++,this.opt.each(f)},()=>{m===0&&this.opt.noMatch(c),r[i-1]===c?this.opt.done(s):l(r[r.indexOf(c)+1])})};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),i===0?this.opt.done(s):l(r[0])}markRanges(e,t){this.opt=t;let s=0,n=this.checkRanges(e);n&&n.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(n)),this.wrapRangeFromIndex(n,(r,i,o,l)=>this.opt.filter(r,i,o,l),(r,i)=>{s++,this.opt.each(r,i)},()=>{this.opt.done(s)})):this.opt.done(s)}unmark(e){this.opt=e;let t=this.opt.element?this.opt.element:"*";t+="[data-markjs]",this.opt.className&&(t+=`.${this.opt.className}`),this.log(`Removal selector "${t}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,s=>{this.unwrapMatches(s)},s=>{const n=ce.matches(s,t),r=this.matchesExclude(s);return!n||r?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function Ps(a){const e=new zs(a);return this.mark=(t,s)=>(e.mark(t,s),this),this.markRegExp=(t,s)=>(e.markRegExp(t,s),this),this.markRanges=(t,s)=>(e.markRanges(t,s),this),this.unmark=t=>(e.unmark(t),this),this}function ke(a,e,t,s){function n(r){return r instanceof t?r:new t(function(i){i(r)})}return new(t||(t=Promise))(function(r,i){function o(h){try{c(s.next(h))}catch(m){i(m)}}function l(h){try{c(s.throw(h))}catch(m){i(m)}}function c(h){h.done?r(h.value):n(h.value).then(o,l)}c((s=s.apply(a,[])).next())})}const js="ENTRIES",_t="KEYS",St="VALUES",D="";class De{constructor(e,t){const s=e._tree,n=Array.from(s.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:s,keys:n}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:e,keys:t}=le(this._path);if(le(t)===D)return{done:!1,value:this.result()};const s=e.get(le(t));return this._path.push({node:s,keys:Array.from(s.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=le(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>le(e)).filter(e=>e!==D).join("")}value(){return le(this._path).node.get(D)}result(){switch(this._type){case St:return this.value();case _t:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const le=a=>a[a.length-1],Vs=(a,e,t)=>{const s=new Map;if(e===void 0)return s;const n=e.length+1,r=n+t,i=new Uint8Array(r*n).fill(t+1);for(let o=0;o{const l=r*i;e:for(const c of a.keys())if(c===D){const h=n[l-1];h<=t&&s.set(o,[a.get(c),h])}else{let h=r;for(let m=0;mt)continue e}Et(a.get(c),e,t,s,n,h,i,o+c)}};class X{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,s]=Re(this._tree,e.slice(this._prefix.length));if(t===void 0){const[n,r]=qe(s);for(const i of n.keys())if(i!==D&&i.startsWith(r)){const o=new Map;return o.set(i.slice(r.length),n.get(i)),new X(o,e)}}return new X(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,$s(this._tree,e)}entries(){return new De(this,js)}forEach(e){for(const[t,s]of this)e(t,s,this)}fuzzyGet(e,t){return Vs(this._tree,e,t)}get(e){const t=Ke(this._tree,e);return t!==void 0?t.get(D):void 0}has(e){const t=Ke(this._tree,e);return t!==void 0&&t.has(D)}keys(){return new De(this,_t)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,ze(this._tree,e).set(D,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const s=ze(this._tree,e);return s.set(D,t(s.get(D))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const s=ze(this._tree,e);let n=s.get(D);return n===void 0&&s.set(D,n=t()),n}values(){return new De(this,St)}[Symbol.iterator](){return this.entries()}static from(e){const t=new X;for(const[s,n]of e)t.set(s,n);return t}static fromObject(e){return X.from(Object.entries(e))}}const Re=(a,e,t=[])=>{if(e.length===0||a==null)return[a,t];for(const s of a.keys())if(s!==D&&e.startsWith(s))return t.push([a,s]),Re(a.get(s),e.slice(s.length),t);return t.push([a,e]),Re(void 0,"",t)},Ke=(a,e)=>{if(e.length===0||a==null)return a;for(const t of a.keys())if(t!==D&&e.startsWith(t))return Ke(a.get(t),e.slice(t.length))},ze=(a,e)=>{const t=e.length;e:for(let s=0;a&&s{const[t,s]=Re(a,e);if(t!==void 0){if(t.delete(D),t.size===0)Tt(s);else if(t.size===1){const[n,r]=t.entries().next().value;It(s,n,r)}}},Tt=a=>{if(a.length===0)return;const[e,t]=qe(a);if(e.delete(t),e.size===0)Tt(a.slice(0,-1));else if(e.size===1){const[s,n]=e.entries().next().value;s!==D&&It(a.slice(0,-1),s,n)}},It=(a,e,t)=>{if(a.length===0)return;const[s,n]=qe(a);s.set(n+e,t),s.delete(n)},qe=a=>a[a.length-1],Ge="or",kt="and",Bs="and_not";class ue{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?Ve:e.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},je),e),{autoVacuum:t,searchOptions:Object.assign(Object.assign({},ht),e.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},qs),e.autoSuggestOptions||{})}),this._index=new X,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Ue,this.addFields(this._options.fields)}add(e){const{extractField:t,tokenize:s,processTerm:n,fields:r,idField:i}=this._options,o=t(e,i);if(o==null)throw new Error(`MiniSearch: document does not have ID field "${i}"`);if(this._idToShortId.has(o))throw new Error(`MiniSearch: duplicate ID ${o}`);const l=this.addDocumentId(o);this.saveStoredFields(l,e);for(const c of r){const h=t(e,c);if(h==null)continue;const m=s(h.toString(),c),f=this._fieldIds[c],b=new Set(m).size;this.addFieldLength(l,f,this._documentCount-1,b);for(const y of m){const x=n(y,c);if(Array.isArray(x))for(const w of x)this.addTerm(f,l,w);else x&&this.addTerm(f,l,x)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:s=10}=t,n={chunk:[],promise:Promise.resolve()},{chunk:r,promise:i}=e.reduce(({chunk:o,promise:l},c,h)=>(o.push(c),(h+1)%s===0?{chunk:[],promise:l.then(()=>new Promise(m=>setTimeout(m,0))).then(()=>this.addAll(o))}:{chunk:o,promise:l}),n);return i.then(()=>this.addAll(r))}remove(e){const{tokenize:t,processTerm:s,extractField:n,fields:r,idField:i}=this._options,o=n(e,i);if(o==null)throw new Error(`MiniSearch: document does not have ID field "${i}"`);const l=this._idToShortId.get(o);if(l==null)throw new Error(`MiniSearch: cannot remove document with ID ${o}: it is not in the index`);for(const c of r){const h=n(e,c);if(h==null)continue;const m=t(h.toString(),c),f=this._fieldIds[c],b=new Set(m).size;this.removeFieldLength(l,f,this._documentCount,b);for(const y of m){const x=s(y,c);if(Array.isArray(x))for(const w of x)this.removeTerm(f,l,w);else x&&this.removeTerm(f,l,x)}}this._storedFields.delete(l),this._documentIds.delete(l),this._idToShortId.delete(o),this._fieldLength.delete(l),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new X,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(t==null)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((s,n)=>{this.removeFieldLength(t,n,this._documentCount,s)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:e,minDirtCount:t,batchSize:s,batchWait:n}=this._options.autoVacuum;this.conditionalVacuum({batchSize:s,batchWait:n},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const s of e)this.discard(s)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:s}=this._options,n=s(e,t);this.discard(n),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const s=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Ue,this.performVacuuming(e,s)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}performVacuuming(e,t){return ke(this,void 0,void 0,function*(){const s=this._dirtCount;if(this.vacuumConditionsMet(t)){const n=e.batchSize||Je.batchSize,r=e.batchWait||Je.batchWait;let i=1;for(const[o,l]of this._index){for(const[c,h]of l)for(const[m]of h)this._documentIds.has(m)||(h.size<=1?l.delete(c):h.delete(m));this._index.get(o).size===0&&this._index.delete(o),i%n===0&&(yield new Promise(c=>setTimeout(c,r))),i+=1}this._dirtCount-=s}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:s}=e;return t=t||Ve.minDirtCount,s=s||Ve.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=s}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){const{searchOptions:s}=this._options,n=Object.assign(Object.assign({},s),t),r=this.executeQuery(e,t),i=[];for(const[o,{score:l,terms:c,match:h}]of r){const m=c.length||1,f={id:this._documentIds.get(o),score:l*m,terms:Object.keys(h),queryTerms:c,match:h};Object.assign(f,this._storedFields.get(o)),(n.filter==null||n.filter(f))&&i.push(f)}return e===ue.wildcard&&n.boostDocument==null||i.sort(pt),i}autoSuggest(e,t={}){t=Object.assign(Object.assign({},this._options.autoSuggestOptions),t);const s=new Map;for(const{score:r,terms:i}of this.search(e,t)){const o=i.join(" "),l=s.get(o);l!=null?(l.score+=r,l.count+=1):s.set(o,{score:r,terms:i,count:1})}const n=[];for(const[r,{score:i,terms:o,count:l}]of s)n.push({suggestion:r,terms:o,score:i/l});return n.sort(pt),n}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static loadJSONAsync(e,t){return ke(this,void 0,void 0,function*(){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)})}static getDefault(e){if(je.hasOwnProperty(e))return Pe(je,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:s,documentIds:n,fieldLength:r,storedFields:i,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=Te(n),l._fieldLength=Te(r),l._storedFields=Te(i);for(const[c,h]of l._documentIds)l._idToShortId.set(h,c);for(const[c,h]of s){const m=new Map;for(const f of Object.keys(h)){let b=h[f];o===1&&(b=b.ds),m.set(parseInt(f,10),Te(b))}l._index.set(c,m)}return l}static loadJSAsync(e,t){return ke(this,void 0,void 0,function*(){const{index:s,documentIds:n,fieldLength:r,storedFields:i,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=yield Ie(n),l._fieldLength=yield Ie(r),l._storedFields=yield Ie(i);for(const[h,m]of l._documentIds)l._idToShortId.set(m,h);let c=0;for(const[h,m]of s){const f=new Map;for(const b of Object.keys(m)){let y=m[b];o===1&&(y=y.ds),f.set(parseInt(b,10),yield Ie(y))}++c%1e3===0&&(yield Nt(0)),l._index.set(h,f)}return l})}static instantiateMiniSearch(e,t){const{documentCount:s,nextId:n,fieldIds:r,averageFieldLength:i,dirtCount:o,serializationVersion:l}=e;if(l!==1&&l!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const c=new ue(t);return c._documentCount=s,c._nextId=n,c._idToShortId=new Map,c._fieldIds=r,c._avgFieldLength=i,c._dirtCount=o||0,c._index=new X,c}executeQuery(e,t={}){if(e===ue.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const f=Object.assign(Object.assign(Object.assign({},t),e),{queries:void 0}),b=e.queries.map(y=>this.executeQuery(y,f));return this.combineResults(b,f.combineWith)}const{tokenize:s,processTerm:n,searchOptions:r}=this._options,i=Object.assign(Object.assign({tokenize:s,processTerm:n},r),t),{tokenize:o,processTerm:l}=i,m=o(e).flatMap(f=>l(f)).filter(f=>!!f).map(Us(i)).map(f=>this.executeQuerySpec(f,i));return this.combineResults(m,i.combineWith)}executeQuerySpec(e,t){const s=Object.assign(Object.assign({},this._options.searchOptions),t),n=(s.fields||this._options.fields).reduce((x,w)=>Object.assign(Object.assign({},x),{[w]:Pe(s.boost,w)||1}),{}),{boostDocument:r,weights:i,maxFuzzy:o,bm25:l}=s,{fuzzy:c,prefix:h}=Object.assign(Object.assign({},ht.weights),i),m=this._index.get(e.term),f=this.termResults(e.term,e.term,1,e.termBoost,m,n,r,l);let b,y;if(e.prefix&&(b=this._index.atPrefix(e.term)),e.fuzzy){const x=e.fuzzy===!0?.2:e.fuzzy,w=x<1?Math.min(o,Math.round(e.term.length*x)):x;w&&(y=this._index.fuzzyGet(e.term,w))}if(b)for(const[x,w]of b){const R=x.length-e.term.length;if(!R)continue;y==null||y.delete(x);const A=h*x.length/(x.length+.3*R);this.termResults(e.term,x,A,e.termBoost,w,n,r,l,f)}if(y)for(const x of y.keys()){const[w,R]=y.get(x);if(!R)continue;const A=c*x.length/(x.length+R);this.termResults(e.term,x,A,e.termBoost,w,n,r,l,f)}return f}executeWildcardQuery(e){const t=new Map,s=Object.assign(Object.assign({},this._options.searchOptions),e);for(const[n,r]of this._documentIds){const i=s.boostDocument?s.boostDocument(r,"",this._storedFields.get(n)):1;t.set(n,{score:i,terms:[],match:{}})}return t}combineResults(e,t=Ge){if(e.length===0)return new Map;const s=t.toLowerCase(),n=Ws[s];if(!n)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(n)||new Map}toJSON(){const e=[];for(const[t,s]of this._index){const n={};for(const[r,i]of s)n[r]=Object.fromEntries(i);e.push([t,n])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,s,n,r,i,o,l,c=new Map){if(r==null)return c;for(const h of Object.keys(i)){const m=i[h],f=this._fieldIds[h],b=r.get(f);if(b==null)continue;let y=b.size;const x=this._avgFieldLength[f];for(const w of b.keys()){if(!this._documentIds.has(w)){this.removeTerm(f,w,t),y-=1;continue}const R=o?o(this._documentIds.get(w),t,this._storedFields.get(w)):1;if(!R)continue;const A=b.get(w),J=this._fieldLength.get(w)[f],Q=Js(A,y,this._documentCount,J,x,l),W=s*n*m*R*Q,V=c.get(w);if(V){V.score+=W,Gs(V.terms,e);const $=Pe(V.match,t);$?$.push(h):V.match[t]=[h]}else c.set(w,{score:W,terms:[e],match:{[t]:[h]}})}}return c}addTerm(e,t,s){const n=this._index.fetch(s,vt);let r=n.get(e);if(r==null)r=new Map,r.set(t,1),n.set(e,r);else{const i=r.get(t);r.set(t,(i||0)+1)}}removeTerm(e,t,s){if(!this._index.has(s)){this.warnDocumentChanged(t,e,s);return}const n=this._index.fetch(s,vt),r=n.get(e);r==null||r.get(t)==null?this.warnDocumentChanged(t,e,s):r.get(t)<=1?r.size<=1?n.delete(e):r.delete(t):r.set(t,r.get(t)-1),this._index.get(s).size===0&&this._index.delete(s)}warnDocumentChanged(e,t,s){for(const n of Object.keys(this._fieldIds))if(this._fieldIds[n]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${s}" was not present in field "${n}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;tObject.prototype.hasOwnProperty.call(a,e)?a[e]:void 0,Ws={[Ge]:(a,e)=>{for(const t of e.keys()){const s=a.get(t);if(s==null)a.set(t,e.get(t));else{const{score:n,terms:r,match:i}=e.get(t);s.score=s.score+n,s.match=Object.assign(s.match,i),ft(s.terms,r)}}return a},[kt]:(a,e)=>{const t=new Map;for(const s of e.keys()){const n=a.get(s);if(n==null)continue;const{score:r,terms:i,match:o}=e.get(s);ft(n.terms,i),t.set(s,{score:n.score+r,terms:n.terms,match:Object.assign(n.match,o)})}return t},[Bs]:(a,e)=>{for(const t of e.keys())a.delete(t);return a}},Ks={k:1.2,b:.7,d:.5},Js=(a,e,t,s,n,r)=>{const{k:i,b:o,d:l}=r;return Math.log(1+(t-e+.5)/(e+.5))*(l+a*(i+1)/(a+i*(1-o+o*s/n)))},Us=a=>(e,t,s)=>{const n=typeof a.fuzzy=="function"?a.fuzzy(e,t,s):a.fuzzy||!1,r=typeof a.prefix=="function"?a.prefix(e,t,s):a.prefix===!0,i=typeof a.boostTerm=="function"?a.boostTerm(e,t,s):1;return{term:e,fuzzy:n,prefix:r,termBoost:i}},je={idField:"id",extractField:(a,e)=>a[e],tokenize:a=>a.split(Hs),processTerm:a=>a.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(a,e)=>{typeof(console==null?void 0:console[a])=="function"&&console[a](e)},autoVacuum:!0},ht={combineWith:Ge,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Ks},qs={combineWith:kt,prefix:(a,e,t)=>e===t.length-1},Je={batchSize:1e3,batchWait:10},Ue={minDirtFactor:.1,minDirtCount:20},Ve=Object.assign(Object.assign({},Je),Ue),Gs=(a,e)=>{a.includes(e)||a.push(e)},ft=(a,e)=>{for(const t of e)a.includes(t)||a.push(t)},pt=({score:a},{score:e})=>e-a,vt=()=>new Map,Te=a=>{const e=new Map;for(const t of Object.keys(a))e.set(parseInt(t,10),a[t]);return e},Ie=a=>ke(void 0,void 0,void 0,function*(){const e=new Map;let t=0;for(const s of Object.keys(a))e.set(parseInt(s,10),a[s]),++t%1e3===0&&(yield Nt(0));return e}),Nt=a=>new Promise(e=>setTimeout(e,a)),Hs=/[\n\r\p{Z}\p{P}]+/u;class Qs{constructor(e=10){Ae(this,"max");Ae(this,"cache");this.max=e,this.cache=new Map}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){this.cache.has(e)?this.cache.delete(e):this.cache.size===this.max&&this.cache.delete(this.first()),this.cache.set(e,t)}first(){return this.cache.keys().next().value}clear(){this.cache.clear()}}const Ys=["aria-owns"],Zs={class:"shell"},Xs=["title"],en={class:"search-actions before"},tn=["title"],sn=["aria-activedescendant","aria-controls","placeholder"],nn={class:"search-actions"},rn=["title"],an=["disabled","title"],on=["id","role","aria-labelledby"],ln=["id","aria-selected"],cn=["href","aria-label","onMouseenter","onFocusin","data-index"],un={class:"titles"},dn=["innerHTML"],hn={class:"title main"},fn=["innerHTML"],pn={key:0,class:"excerpt-wrapper"},vn={key:0,class:"excerpt",inert:""},mn=["innerHTML"],gn={key:0,class:"no-results"},bn={class:"search-keyboard-shortcuts"},yn=["aria-label"],wn=["aria-label"],xn=["aria-label"],_n=["aria-label"],Sn=Lt({__name:"VPLocalSearchBox",emits:["close"],setup(a,{emit:e}){var S,C;const t=e,s=xe(),n=xe(),r=xe(is),i=ss(),{activate:o}=Ds(s,{immediate:!0,allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0}),{localeIndex:l,theme:c}=i,h=st(async()=>{var v,p,E,F,z,P,j,I,K;return at(ue.loadJSON((E=await((p=(v=r.value)[l.value])==null?void 0:p.call(v)))==null?void 0:E.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1},...((F=c.value.search)==null?void 0:F.provider)==="local"&&((P=(z=c.value.search.options)==null?void 0:z.miniSearch)==null?void 0:P.searchOptions)},...((j=c.value.search)==null?void 0:j.provider)==="local"&&((K=(I=c.value.search.options)==null?void 0:I.miniSearch)==null?void 0:K.options)}))}),f=me(()=>{var v,p;return((v=c.value.search)==null?void 0:v.provider)==="local"&&((p=c.value.search.options)==null?void 0:p.disableQueryPersistence)===!0}).value?ie(""):Dt("vitepress:local-search-filter",""),b=zt("vitepress:local-search-detailed-list",((S=c.value.search)==null?void 0:S.provider)==="local"&&((C=c.value.search.options)==null?void 0:C.detailedView)===!0),y=me(()=>{var v,p,E;return((v=c.value.search)==null?void 0:v.provider)==="local"&&(((p=c.value.search.options)==null?void 0:p.disableDetailedView)===!0||((E=c.value.search.options)==null?void 0:E.detailedView)===!1)}),x=me(()=>{var p,E,F,z,P,j,I;const v=((p=c.value.search)==null?void 0:p.options)??c.value.algolia;return((P=(z=(F=(E=v==null?void 0:v.locales)==null?void 0:E[l.value])==null?void 0:F.translations)==null?void 0:z.button)==null?void 0:P.buttonText)||((I=(j=v==null?void 0:v.translations)==null?void 0:j.button)==null?void 0:I.buttonText)||"Search"});Pt(()=>{y.value&&(b.value=!1)});const w=xe([]),R=ie(!1);$e(f,()=>{R.value=!1});const A=st(async()=>{if(n.value)return at(new Ps(n.value))},null),J=new Qs(16);jt(()=>[h.value,f.value,b.value],async([v,p,E],F,z)=>{var ee,ye,He,Qe;(F==null?void 0:F[0])!==v&&J.clear();let P=!1;if(z(()=>{P=!0}),!v)return;w.value=v.search(p).slice(0,16),R.value=!0;const j=E?await Promise.all(w.value.map(B=>Q(B.id))):[];if(P)return;for(const{id:B,mod:te}of j){const se=B.slice(0,B.indexOf("#"));let Y=J.get(se);if(Y)continue;Y=new Map,J.set(se,Y);const G=te.default??te;if(G!=null&&G.render||G!=null&&G.setup){const ne=Yt(G);ne.config.warnHandler=()=>{},ne.provide(Zt,i),Object.defineProperties(ne.config.globalProperties,{$frontmatter:{get(){return i.frontmatter.value}},$params:{get(){return i.page.value.params}}});const Ye=document.createElement("div");ne.mount(Ye),Ye.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(de=>{var et;const we=(et=de.querySelector("a"))==null?void 0:et.getAttribute("href"),Ze=(we==null?void 0:we.startsWith("#"))&&we.slice(1);if(!Ze)return;let Xe="";for(;(de=de.nextElementSibling)&&!/^h[1-6]$/i.test(de.tagName);)Xe+=de.outerHTML;Y.set(Ze,Xe)}),ne.unmount()}if(P)return}const I=new Set;if(w.value=w.value.map(B=>{const[te,se]=B.id.split("#"),Y=J.get(te),G=(Y==null?void 0:Y.get(se))??"";for(const ne in B.match)I.add(ne);return{...B,text:G}}),await he(),P)return;await new Promise(B=>{var te;(te=A.value)==null||te.unmark({done:()=>{var se;(se=A.value)==null||se.markRegExp(k(I),{done:B})}})});const K=((ee=s.value)==null?void 0:ee.querySelectorAll(".result .excerpt"))??[];for(const B of K)(ye=B.querySelector('mark[data-markjs="true"]'))==null||ye.scrollIntoView({block:"center"});(Qe=(He=n.value)==null?void 0:He.firstElementChild)==null||Qe.scrollIntoView({block:"start"})},{debounce:200,immediate:!0});async function Q(v){const p=Xt(v.slice(0,v.indexOf("#")));try{if(!p)throw new Error(`Cannot find file for id: ${v}`);return{id:v,mod:await import(p)}}catch(E){return console.error(E),{id:v,mod:{}}}}const W=ie(),V=me(()=>{var v;return((v=f.value)==null?void 0:v.length)<=0});function $(v=!0){var p,E;(p=W.value)==null||p.focus(),v&&((E=W.value)==null||E.select())}Me(()=>{$()});function be(v){v.pointerType==="mouse"&&$()}const M=ie(-1),U=ie(!0);$e(w,v=>{M.value=v.length?0:-1,q()});function q(){he(()=>{const v=document.querySelector(".result.selected");v==null||v.scrollIntoView({block:"nearest"})})}_e("ArrowUp",v=>{v.preventDefault(),M.value--,M.value<0&&(M.value=w.value.length-1),U.value=!0,q()}),_e("ArrowDown",v=>{v.preventDefault(),M.value++,M.value>=w.value.length&&(M.value=0),U.value=!0,q()});const N=Vt();_e("Enter",v=>{if(v.isComposing||v.target instanceof HTMLButtonElement&&v.target.type!=="submit")return;const p=w.value[M.value];if(v.target instanceof HTMLInputElement&&!p){v.preventDefault();return}p&&(N.go(p.id),t("close"))}),_e("Escape",()=>{t("close")});const d=ns({modal:{displayDetails:"Display detailed list",resetButtonTitle:"Reset search",backButtonTitle:"Close search",noResultsText:"No results for",footer:{selectText:"to select",selectKeyAriaLabel:"enter",navigateText:"to navigate",navigateUpKeyAriaLabel:"up arrow",navigateDownKeyAriaLabel:"down arrow",closeText:"to close",closeKeyAriaLabel:"escape"}}});Me(()=>{window.history.pushState(null,"",null)}),$t("popstate",v=>{v.preventDefault(),t("close")});const g=Bt(Wt?document.body:null);Me(()=>{he(()=>{g.value=!0,he().then(()=>o())})}),Kt(()=>{g.value=!1});function T(){f.value="",he().then(()=>$(!1))}function k(v){return new RegExp([...v].sort((p,E)=>E.length-p.length).map(p=>`(${es(p)})`).join("|"),"gi")}function O(v){var F;if(!U.value)return;const p=(F=v.target)==null?void 0:F.closest(".result"),E=Number.parseInt(p==null?void 0:p.dataset.index);E>=0&&E!==M.value&&(M.value=E),U.value=!1}return(v,p)=>{var E,F,z,P,j;return H(),Jt(Qt,{to:"body"},[_("div",{ref_key:"el",ref:s,role:"button","aria-owns":(E=w.value)!=null&&E.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"localsearch-label",class:"VPLocalSearchBox"},[_("div",{class:"backdrop",onClick:p[0]||(p[0]=I=>v.$emit("close"))}),_("div",Zs,[_("form",{class:"search-bar",onPointerup:p[4]||(p[4]=I=>be(I)),onSubmit:p[5]||(p[5]=Ut(()=>{},["prevent"]))},[_("label",{title:x.value,id:"localsearch-label",for:"localsearch-input"},p[7]||(p[7]=[_("span",{"aria-hidden":"true",class:"vpi-search search-icon local-search-icon"},null,-1)]),8,Xs),_("div",en,[_("button",{class:"back-button",title:L(d)("modal.backButtonTitle"),onClick:p[1]||(p[1]=I=>v.$emit("close"))},p[8]||(p[8]=[_("span",{class:"vpi-arrow-left local-search-icon"},null,-1)]),8,tn)]),qt(_("input",{ref_key:"searchInput",ref:W,"onUpdate:modelValue":p[2]||(p[2]=I=>Ht(f)?f.value=I:null),"aria-activedescendant":M.value>-1?"localsearch-item-"+M.value:void 0,"aria-autocomplete":"both","aria-controls":(F=w.value)!=null&&F.length?"localsearch-list":void 0,"aria-labelledby":"localsearch-label",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"search-input",id:"localsearch-input",enterkeyhint:"go",maxlength:"64",placeholder:x.value,spellcheck:"false",type:"search"},null,8,sn),[[Gt,L(f)]]),_("div",nn,[y.value?Se("",!0):(H(),Z("button",{key:0,class:nt(["toggle-layout-button",{"detailed-list":L(b)}]),type:"button",title:L(d)("modal.displayDetails"),onClick:p[3]||(p[3]=I=>M.value>-1&&(b.value=!L(b)))},p[9]||(p[9]=[_("span",{class:"vpi-layout-list local-search-icon"},null,-1)]),10,rn)),_("button",{class:"clear-button",type:"reset",disabled:V.value,title:L(d)("modal.resetButtonTitle"),onClick:T},p[10]||(p[10]=[_("span",{class:"vpi-delete local-search-icon"},null,-1)]),8,an)])],32),_("ul",{ref_key:"resultsEl",ref:n,id:(z=w.value)!=null&&z.length?"localsearch-list":void 0,role:(P=w.value)!=null&&P.length?"listbox":void 0,"aria-labelledby":(j=w.value)!=null&&j.length?"localsearch-label":void 0,class:"results",onMousemove:O},[(H(!0),Z(rt,null,it(w.value,(I,K)=>(H(),Z("li",{key:I.id,id:"localsearch-item-"+K,"aria-selected":M.value===K?"true":"false",role:"option"},[_("a",{href:I.id,class:nt(["result",{selected:M.value===K}]),"aria-label":[...I.titles,I.title].join(" > "),onMouseenter:ee=>!U.value&&(M.value=K),onFocusin:ee=>M.value=K,onClick:p[6]||(p[6]=ee=>v.$emit("close")),"data-index":K},[_("div",null,[_("div",un,[p[12]||(p[12]=_("span",{class:"title-icon"},"#",-1)),(H(!0),Z(rt,null,it(I.titles,(ee,ye)=>(H(),Z("span",{key:ye,class:"title"},[_("span",{class:"text",innerHTML:ee},null,8,dn),p[11]||(p[11]=_("span",{class:"vpi-chevron-right local-search-icon"},null,-1))]))),128)),_("span",hn,[_("span",{class:"text",innerHTML:I.title},null,8,fn)])]),L(b)?(H(),Z("div",pn,[I.text?(H(),Z("div",vn,[_("div",{class:"vp-doc",innerHTML:I.text},null,8,mn)])):Se("",!0),p[13]||(p[13]=_("div",{class:"excerpt-gradient-bottom"},null,-1)),p[14]||(p[14]=_("div",{class:"excerpt-gradient-top"},null,-1))])):Se("",!0)])],42,cn)],8,ln))),128)),L(f)&&!w.value.length&&R.value?(H(),Z("li",gn,[fe(pe(L(d)("modal.noResultsText"))+' "',1),_("strong",null,pe(L(f)),1),p[15]||(p[15]=fe('" '))])):Se("",!0)],40,on),_("div",bn,[_("span",null,[_("kbd",{"aria-label":L(d)("modal.footer.navigateUpKeyAriaLabel")},p[16]||(p[16]=[_("span",{class:"vpi-arrow-up navigate-icon"},null,-1)]),8,yn),_("kbd",{"aria-label":L(d)("modal.footer.navigateDownKeyAriaLabel")},p[17]||(p[17]=[_("span",{class:"vpi-arrow-down navigate-icon"},null,-1)]),8,wn),fe(" "+pe(L(d)("modal.footer.navigateText")),1)]),_("span",null,[_("kbd",{"aria-label":L(d)("modal.footer.selectKeyAriaLabel")},p[18]||(p[18]=[_("span",{class:"vpi-corner-down-left navigate-icon"},null,-1)]),8,xn),fe(" "+pe(L(d)("modal.footer.selectText")),1)]),_("span",null,[_("kbd",{"aria-label":L(d)("modal.footer.closeKeyAriaLabel")},"esc",8,_n),fe(" "+pe(L(d)("modal.footer.closeText")),1)])])])],8,Ys)])}}}),Fn=ts(Sn,[["__scopeId","data-v-68e678c9"]]);export{Fn as default}; diff --git a/assets/chunks/arc.w3rEdi5q.js b/assets/chunks/arc.w3rEdi5q.js new file mode 100644 index 00000000..d65608b3 --- /dev/null +++ b/assets/chunks/arc.w3rEdi5q.js @@ -0,0 +1 @@ +import{L as ln,M as un,N as y,O as tn,P as X,Q as O,R as _,S as an,T as rn,V as $,W as o,X as N,Y as sn,Z as on,$ as fn}from"../app.CXGmg8Jv.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,D,S,v,R,Q,u){var E=D-l,i=S-h,n=Q-v,d=u-R,a=d*E-n*i;if(!(a*ar*r+W*W&&(L=w,M=p),{cx:L,cy:M,x01:-n,y01:-d,x11:L*(v/T-1),y11:M*(v/T-1)}}function hn(){var l=cn,h=yn,D=N(0),S=null,v=gn,R=dn,Q=mn,u=null,E=ln(i);function i(){var n,d,a=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,V=an(c-f),t=c>f;if(u||(u=n=E()),sy))u.moveTo(0,0);else if(V>tn-y)u.moveTo(s*X(f),s*O(f)),u.arc(0,0,s,f,c,!t),a>y&&(u.moveTo(a*X(c),a*O(c)),u.arc(0,0,a,c,f,t));else{var m=f,g=c,A=f,T=c,P=V,I=V,L=Q.apply(this,arguments)/2,M=L>y&&(S?+S.apply(this,arguments):$(a*a+s*s)),w=_(an(s-a)/2,+D.apply(this,arguments)),p=w,x=w,e,r;if(M>y){var W=sn(M/a*O(L)),j=sn(M/s*O(L));(P-=W*2)>y?(W*=t?1:-1,A+=W,T-=W):(P=0,A=T=(f+c)/2),(I-=j*2)>y?(j*=t?1:-1,m+=j,g-=j):(I=0,m=g=(f+c)/2)}var Y=s*X(m),Z=s*O(m),z=a*X(T),B=a*O(T);if(w>y){var C=s*X(g),F=s*O(g),H=a*X(A),J=a*O(A),q;if(Vy?x>y?(e=G(H,J,Y,Z,s,x,t),r=G(C,F,z,B,s,x,t),u.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?u.lineTo(z,B):p>y?(e=G(z,B,C,F,a,-p,t),r=G(Y,Z,H,J,a,-p,t),u.lineTo(e.cx+e.x01,e.cy+e.y01),ph?(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(h+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(t){var h=this.rect.x;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(h,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},A.exports=a},function(A,G,N){var g=N(0);function s(){}for(var i in g)s[i]=g[i];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,A.exports=s},function(A,G,N){function g(s,i){s==null&&i==null?(this.x=0,this.y=0):(this.x=s,this.y=i)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.setX=function(s){this.x=s},g.prototype.setY=function(s){this.y=s},g.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},g.prototype.getCopy=function(){return new g(this.x,this.y)},g.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},A.exports=g},function(A,G,N){var g=N(2),s=N(10),i=N(0),r=N(7),e=N(3),f=N(1),a=N(13),y=N(12),t=N(11);function h(c,l,T){g.call(this,T),this.estimatedSize=s.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}h.prototype=Object.create(g.prototype);for(var o in g)h[o]=g[o];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(c,l,T){if(l==null&&T==null){var u=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},h.prototype.remove=function(c){var l=c;if(c instanceof e){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),u,d=T.length,L=0;L-1&&P>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(M,1),u.target!=u.source&&u.target.edges.splice(P,1);var F=u.source.owner.getEdges().indexOf(u);if(F==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(F,1)}},h.prototype.updateLeftTop=function(){for(var c=s.MAX_VALUE,l=s.MAX_VALUE,T,u,d,L=this.getNodes(),F=L.length,M=0;MT&&(c=T),l>u&&(l=u)}return c==s.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new y(this.left,this.top))},h.prototype.updateBounds=function(c){for(var l=s.MAX_VALUE,T=-s.MAX_VALUE,u=s.MAX_VALUE,d=-s.MAX_VALUE,L,F,M,P,J,V=this.nodes,Q=V.length,D=0;DL&&(l=L),TM&&(u=M),dL&&(l=L),TM&&(u=M),d=this.nodes.length){var Q=0;T.forEach(function(D){D.owner==c&&Q++}),Q==this.nodes.length&&(this.isConnected=!0)}},A.exports=h},function(A,G,N){var g,s=N(1);function i(r){g=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),e=this.layout.newNode(null),f=this.add(r,e);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,e,f,a,y){if(f==null&&a==null&&y==null){if(r==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return r.parent=e,e.child=r,r}else{y=f,a=e,f=r;var t=a.getOwner(),h=y.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==h)return f.isInterGraph=!1,t.add(f,a,y);if(f.isInterGraph=!0,f.source=a,f.target=y,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof g){var e=r;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(e.getEdges());for(var a,y=f.length,t=0;t=r.getRight()?e[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(e[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?e[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(e[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var y=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(y=1);var t=y*e[0],h=e[1]/y;e[0]t)return e[0]=f,e[1]=o,e[2]=y,e[3]=V,!1;if(ay)return e[0]=h,e[1]=a,e[2]=P,e[3]=t,!1;if(fy?(e[0]=l,e[1]=T,n=!0):(e[0]=c,e[1]=o,n=!0):v===p&&(f>y?(e[0]=h,e[1]=o,n=!0):(e[0]=u,e[1]=T,n=!0)),-E===p?y>f?(e[2]=J,e[3]=V,m=!0):(e[2]=P,e[3]=M,m=!0):E===p&&(y>f?(e[2]=F,e[3]=M,m=!0):(e[2]=Q,e[3]=V,m=!0)),n&&m)return!1;if(f>y?a>t?(I=this.getCardinalDirection(v,p,4),w=this.getCardinalDirection(E,p,2)):(I=this.getCardinalDirection(-v,p,3),w=this.getCardinalDirection(-E,p,1)):a>t?(I=this.getCardinalDirection(-v,p,1),w=this.getCardinalDirection(-E,p,3)):(I=this.getCardinalDirection(v,p,2),w=this.getCardinalDirection(E,p,4)),!n)switch(I){case 1:H=o,R=f+-L/p,e[0]=R,e[1]=H;break;case 2:R=u,H=a+d*p,e[0]=R,e[1]=H;break;case 3:H=T,R=f+L/p,e[0]=R,e[1]=H;break;case 4:R=l,H=a+-d*p,e[0]=R,e[1]=H;break}if(!m)switch(w){case 1:k=M,x=y+-rt/p,e[2]=x,e[3]=k;break;case 2:x=Q,k=t+D*p,e[2]=x,e[3]=k;break;case 3:k=V,x=y+rt/p,e[2]=x,e[3]=k;break;case 4:x=J,k=t+-D*p,e[2]=x,e[3]=k;break}}return!1},s.getCardinalDirection=function(i,r,e){return i>r?e:1+e%4},s.getIntersection=function(i,r,e,f){if(f==null)return this.getIntersection2(i,r,e);var a=i.x,y=i.y,t=r.x,h=r.y,o=e.x,c=e.y,l=f.x,T=f.y,u=void 0,d=void 0,L=void 0,F=void 0,M=void 0,P=void 0,J=void 0,V=void 0,Q=void 0;return L=h-y,M=a-t,J=t*y-a*h,F=T-c,P=o-l,V=l*c-o*T,Q=L*P-F*M,Q===0?null:(u=(M*V-P*J)/Q,d=(F*J-L*V)/Q,new g(u,d))},s.angleOfVector=function(i,r,e,f){var a=void 0;return i!==e?(a=Math.atan((f-r)/(e-i)),e=0){var T=(-o+Math.sqrt(o*o-4*h*c))/(2*h),u=(-o-Math.sqrt(o*o-4*h*c))/(2*h),d=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:d}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,A.exports=s},function(A,G,N){function g(){}g.sign=function(s){return s>0?1:s<0?-1:0},g.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},g.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},A.exports=g},function(A,G,N){function g(){}g.MAX_VALUE=2147483647,g.MIN_VALUE=-2147483648,A.exports=g},function(A,G,N){var g=function(){function a(y,t){for(var h=0;h"u"?"undefined":g(i);return i==null||r!="object"&&r!="function"},A.exports=s},function(A,G,N){function g(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(L.push(M[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),d.add(P);for(var J=P.getEdges(),u=0;u-1&&M.splice(rt,1)}d=new Set,F=new Map}}return o},h.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u0){for(var T=this.edgeToDummyNodes.get(l),u=0;u=0&&c.splice(V,1);var Q=F.getNeighborsList();Q.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),v=m-1;v==1&&P.push(n),T.set(n,v)}})}l=l.concat(P),(c.length==1||c.length==2)&&(u=!0,d=c[0])}return d},h.prototype.setGraphManager=function(o){this.graphManager=o},A.exports=h},function(A,G,N){function g(){}g.seed=1,g.x=0,g.nextDouble=function(){return g.x=Math.sin(g.seed++)*1e4,g.x-Math.floor(g.x)},A.exports=g},function(A,G,N){var g=N(5);function s(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(i){this.lworldExtX=i},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(i){this.lworldExtY=i},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},s.prototype.transformX=function(i){var r=0,e=this.lworldExtX;return e!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/e),r},s.prototype.transformY=function(i){var r=0,e=this.lworldExtY;return e!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/e),r},s.prototype.inverseTransformX=function(i){var r=0,e=this.ldeviceExtX;return e!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/e),r},s.prototype.inverseTransformY=function(i){var r=0,e=this.ldeviceExtY;return e!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/e),r},s.prototype.inverseTransformPoint=function(i){var r=new g(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},A.exports=s},function(A,G,N){function g(t){if(Array.isArray(t)){for(var h=0,o=Array(t.length);hi.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),h,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,u=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},a.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=u.length||L>=u[0].length)){for(var F=0;Fa}}]),e}();A.exports=r},function(A,G,N){function g(){}g.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var i=Math.min(this.m,this.n);this.s=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(Math.min(this.m+1,this.n)),this.U=function(Nt){var Mt=function Zt(Gt){if(Gt.length==0)return 0;for(var $t=[],Ft=0;Ft0;)Mt.push(0);return Mt}(this.n),e=function(Nt){for(var Mt=[];Nt-- >0;)Mt.push(0);return Mt}(this.m),f=!0,a=Math.min(this.m-1,this.n),y=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var p=E+1;p=0;W--){if(function(Nt,Mt){return Nt&&Mt}(W0;){var q=void 0,Rt=void 0;for(q=n-2;q>=-1&&q!==-1;q--)if(Math.abs(r[q])<=lt+_*(Math.abs(this.s[q])+Math.abs(this.s[q+1]))){r[q]=0;break}if(q===n-2)Rt=4;else{var Lt=void 0;for(Lt=n-1;Lt>=q&&Lt!==q;Lt--){var vt=(Lt!==n?Math.abs(r[Lt]):0)+(Lt!==q+1?Math.abs(r[Lt-1]):0);if(Math.abs(this.s[Lt])<=lt+_*vt){this.s[Lt]=0;break}}Lt===q?Rt=3:Lt===n-1?Rt=1:(Rt=2,q=Lt)}switch(q++,Rt){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=q;ut--){var Tt=g.hypot(this.s[ut],it),At=this.s[ut]/Tt,Dt=it/Tt;this.s[ut]=Tt,ut!==q&&(it=-Dt*r[ut-1],r[ut-1]=At*r[ut-1]);for(var mt=0;mt=this.s[q+1]);){var Ct=this.s[q];if(this.s[q]=this.s[q+1],this.s[q+1]=Ct,qMath.abs(i)?(r=i/s,r=Math.abs(s)*Math.sqrt(1+r*r)):i!=0?(r=s/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},A.exports=g},function(A,G,N){var g=function(){function r(e,f){for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:1,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,r),this.sequence1=e,this.sequence2=f,this.match_score=a,this.mismatch_penalty=y,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;e--){var f=this.listeners[e];f.event===i&&f.callback===r&&this.listeners.splice(e,1)}},s.emit=function(i,r){for(var e=0;e{var G={45:(i,r,e)=>{var f={};f.layoutBase=e(551),f.CoSEConstants=e(806),f.CoSEEdge=e(767),f.CoSEGraph=e(880),f.CoSEGraphManager=e(578),f.CoSELayout=e(765),f.CoSENode=e(991),f.ConstraintHandler=e(902),i.exports=f},806:(i,r,e)=>{var f=e(551).FDLayoutConstants;function a(){}for(var y in f)a[y]=f[y];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,i.exports=a},767:(i,r,e)=>{var f=e(551).FDLayoutEdge;function a(t,h,o){f.call(this,t,h,o)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},880:(i,r,e)=>{var f=e(551).LGraph;function a(t,h,o){f.call(this,t,h,o)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},578:(i,r,e)=>{var f=e(551).LGraphManager;function a(t){f.call(this,t)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},765:(i,r,e)=>{var f=e(551).FDLayout,a=e(578),y=e(880),t=e(991),h=e(767),o=e(806),c=e(902),l=e(551).FDLayoutConstants,T=e(551).LayoutConstants,u=e(551).Point,d=e(551).PointD,L=e(551).DimensionD,F=e(551).Layout,M=e(551).Integer,P=e(551).IGeometry,J=e(551).LGraph,V=e(551).Transform,Q=e(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var rt in f)D[rt]=f[rt];D.prototype.newGraphManager=function(){var n=new a(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new y(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new h(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(v)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(v),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(p){return n.has(p)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var v=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(v,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},v=0;v0&&this.updateDisplacements();for(var v=0;v0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var H=this.constraints.alignmentConstraint.vertical,v=0;v=2*O.length/3;_--)X=Math.floor(Math.random()*(_+1)),B=O[_],O[_]=O[X],O[X]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(X)||(n.nodesInRelativeHorizontal.push(X),n.nodeToRelativeConstraintMapHorizontal.set(X,[]),n.dummyToNodeForVerticalAlignment.has(X)?n.nodeToTempPositionMapHorizontal.set(X,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(X,n.idToNodeMap.get(X).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(X).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:X,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(lt)||(n.nodesInRelativeVertical.push(lt),n.nodeToRelativeConstraintMapVertical.set(lt,[]),n.dummyToNodeForHorizontalAlignment.has(lt)?n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(lt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:lt,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(lt).push({top:_,gap:O.gap})}});else{var k=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;k.has(X)?k.get(X).push(B):k.set(X,[B]),k.has(B)?k.get(B).push(X):k.set(B,[X])}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;W.has(_)?W.get(_).push(lt):W.set(_,[lt]),W.has(lt)?W.get(lt).push(_):W.set(lt,[_])}});var U=function(X,B){var _=[],lt=[],q=new Q,Rt=new Set,Lt=0;return X.forEach(function(vt,it){if(!Rt.has(it)){_[Lt]=[],lt[Lt]=!1;var ut=it;for(q.push(ut),Rt.add(ut),_[Lt].push(ut);q.length!=0;){ut=q.shift(),B.has(ut)&&(lt[Lt]=!0);var Tt=X.get(ut);Tt.forEach(function(At){Rt.has(At)||(q.push(At),Rt.add(At),_[Lt].push(At))})}Lt++}}),{components:_,isFixed:lt}},et=U(k,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=U(W,n.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=n.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,v=0;v1){var R;for(R=0;RE&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,v){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var p=J.calculateBounds(n),I=new V;I.setDeviceOrgX(p.getMinX()),I.setDeviceOrgY(p.getMinY()),I.setWorldOrgX(v.x),I.setWorldOrgY(v.y);for(var w=0;w1;){var B=X[0];X.splice(0,1);var _=W.indexOf(B);_>=0&&W.splice(_,1),z--,U--}m!=null?O=(W.indexOf(X[0])+1)%z:O=0;for(var lt=Math.abs(E-v)/U,q=O;et!=U;q=++q%z){var Rt=W[q].getOtherEnd(n);if(Rt!=m){var Lt=(v+et*lt)%360,vt=(Lt+lt)%360;D.branchRadialLayout(Rt,n,Lt,vt,p+I,I),et++}}},D.maxDiagonalInTree=function(n){for(var m=M.MIN_VALUE,v=0;vm&&(m=p)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var v=[],E=this.graphManager.getAllNodes(),p=0;p"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(H){if(m[H].length>1){var x="DummyCompound_"+H;n.memberGroups[x]=m[H];var k=m[H][0].getParent(),W=new t(n.graphManager);W.id=x,W.paddingLeft=k.paddingLeft||0,W.paddingRight=k.paddingRight||0,W.paddingBottom=k.paddingBottom||0,W.paddingTop=k.paddingTop||0,n.idToDummyNode[x]=W;var U=n.getGraphManager().add(n.newGraph(),W),et=k.getChild();et.add(W);for(var z=0;zp?(E.rect.x-=(E.labelWidth-p)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-p)/2):E.labelPosHorizontal=="right"&&E.setWidth(p+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],v=m.id,E=m.paddingLeft,p=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[v],m.rect.x,m.rect.y,E,p,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(v){var E=n.idToDummyNode[v],p=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[v],E.rect.x,E.rect.y,p,I,w,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var v=n.getChild();if(v==null)return this.toBeTiled[m]=!1,!1;for(var E=v.getNodes(),p=0;p0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),v=0,E=0;Ek&&(k=U.rect.height)}v+=k+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var v=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var p=m[E];if(v.tiledMemberPack[E]=v.tileNodes(n[E],p.paddingLeft+p.paddingRight),p.rect.width=v.tiledMemberPack[E].width,p.rect.height=v.tiledMemberPack[E].height,p.setCenter(v.tiledMemberPack[E].centerX,v.tiledMemberPack[E].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=p.rect.width,w=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(I+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>I?(p.rect.x-=(p.labelWidth-I)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-I)/2):p.labelPosHorizontal=="right"&&p.setWidth(I+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},D.prototype.tileNodes=function(n,m){var v=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),p=this.getOrgRatio(v),I=this.getOrgRatio(E),w;return IR&&(R=z.getWidth())});var H=I/p,x=w/p,k=Math.pow(v-E,2)+4*(H+E)*(x+v)*p,W=(E-v+Math.sqrt(k))/(2*(H+E)),U;m?(U=Math.ceil(W),U==W&&U++):U=Math.floor(W);var et=U*(H+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(n,m,v){var E=o.TILING_PADDING_VERTICAL,p=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:p,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(n,v));var R=function(O){return O.rect.width*O.rect.height},H=function(O,X){return R(X)-R(O)};n.sort(function(z,O){var X=H;return w.idealRowWidth?(X=I,X(z.id,O.id)):X(z,O)});for(var x=0,k=0,W=0;W0&&(w+=n.horizontalPadding),n.rowWidth[v]=w,n.width0&&(R+=n.verticalPadding);var H=0;R>n.rowHeight[v]&&(H=n.rowHeight[v],n.rowHeight[v]=R,H=n.rowHeight[v]-H),n.height+=H,n.rows[v].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,v=Number.MAX_VALUE,E=0;Ev&&(m=E,v=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,v){if(n.idealRowWidth){var E=n.rows.length-1,p=n.rowWidth[E];return p+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var w=n.rowWidth[I];if(w+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=v+n.verticalPadding-n.rowHeight[I]);var H;n.width-w>=m+n.horizontalPadding?H=(n.height+R)/(w+m+n.horizontalPadding):H=(n.height+R)/n.width,R=v+n.verticalPadding;var x;return n.widthI&&m!=v){E.splice(-1,1),n.rows[v].push(p),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[v]=n.rowWidth[v]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,R=0;Rw&&(w=E[R].height);m>0&&(w+=n.verticalPadding);var H=n.rowHeight[m]+n.rowHeight[v];n.rowHeight[m]=w,n.rowHeight[v]0)for(var et=p;et<=I;et++)U[0]+=this.grid[et][w-1].length+this.grid[et][w].length-1;if(I0)for(var et=w;et<=R;et++)U[3]+=this.grid[p-1][et].length+this.grid[p][et].length-1;for(var z=M.MAX_VALUE,O,X,B=0;B{var f=e(551).FDLayoutNode,a=e(551).IMath;function y(h,o,c,l){f.call(this,h,o,c,l)}y.prototype=Object.create(f.prototype);for(var t in f)y[t]=f[t];y.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},y.prototype.propogateDisplacementToChildren=function(h,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Ct=0;st.forEach(function(ht){$=="horizontal"?(tt.set(ht,u.has(ht)?d[u.get(ht)]:Z.get(ht)),Ct+=tt.get(ht)):(tt.set(ht,u.has(ht)?L[u.get(ht)]:Z.get(ht)),Ct+=tt.get(ht))}),Ct=Ct/st.length,ft.forEach(function(ht){K.has(ht)||tt.set(ht,Ct)})}else{var ct=0;ft.forEach(function(ht){$=="horizontal"?ct+=u.has(ht)?d[u.get(ht)]:Z.get(ht):ct+=u.has(ht)?L[u.get(ht)]:Z.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){tt.set(ht,ct)})}});for(var wt=function(){var st=dt.shift(),Ct=b.get(st);Ct.forEach(function(ct){if(tt.get(ct.id)ht&&(ht=qt),_tWt&&(Wt=_t)}}catch(ie){Mt=!0,Zt=ie}finally{try{!Nt&&Gt.return&&Gt.return()}finally{if(Mt)throw Zt}}var ce=(Ct+ht)/2-(ct+Wt)/2,Kt=!0,te=!1,ee=void 0;try{for(var jt=ft[Symbol.iterator](),se;!(Kt=(se=jt.next()).done);Kt=!0){var re=se.value;tt.set(re,tt.get(re)+ce)}}catch(ie){te=!0,ee=ie}finally{try{!Kt&&jt.return&&jt.return()}finally{if(te)throw ee}}})}return tt},rt=function(b){var $=0,K=0,Z=0,at=0;if(b.forEach(function(j){j.left?d[u.get(j.left)]-d[u.get(j.right)]>=0?$++:K++:L[u.get(j.top)]-L[u.get(j.bottom)]>=0?Z++:at++}),$>K&&Z>at)for(var gt=0;gtK)for(var ot=0;otat)for(var tt=0;tt1)l.fixedNodeConstraint.forEach(function(S,b){E[b]=[S.position.x,S.position.y],p[b]=[d[u.get(S.nodeId)],L[u.get(S.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var S=0;if(l.alignmentConstraint.vertical){for(var b=l.alignmentConstraint.vertical,$=function(tt){var j=new Set;b[tt].forEach(function(yt){j.add(yt)});var dt=new Set([].concat(f(j)).filter(function(yt){return R.has(yt)})),wt=void 0;dt.size>0?wt=d[u.get(dt.values().next().value)]:wt=Q(j).x,b[tt].forEach(function(yt){E[S]=[wt,L[u.get(yt)]],p[S]=[d[u.get(yt)],L[u.get(yt)]],S++})},K=0;K0?wt=d[u.get(dt.values().next().value)]:wt=Q(j).y,Z[tt].forEach(function(yt){E[S]=[d[u.get(yt)],wt],p[S]=[d[u.get(yt)],L[u.get(yt)]],S++})},gt=0;gtW&&(W=k[et].length,U=et);if(W0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(S,b){var $={x:d[u.get(S.nodeId)],y:L[u.get(S.nodeId)]},K=S.position,Z=V(K,$);mt.x+=Z.x,mt.y+=Z.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(S,b){d[b]+=mt.x}),L.forEach(function(S,b){L[b]+=mt.y}),l.fixedNodeConstraint.forEach(function(S){d[u.get(S.nodeId)]=S.position.x,L[u.get(S.nodeId)]=S.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var xt=l.alignmentConstraint.vertical,St=function(b){var $=new Set;xt[b].forEach(function(at){$.add(at)});var K=new Set([].concat(f($)).filter(function(at){return R.has(at)})),Z=void 0;K.size>0?Z=d[u.get(K.values().next().value)]:Z=Q($).x,$.forEach(function(at){R.has(at)||(d[u.get(at)]=Z)})},Vt=0;Vt0?Z=L[u.get(K.values().next().value)]:Z=Q($).y,$.forEach(function(at){R.has(at)||(L[u.get(at)]=Z)})},bt=0;bt{i.exports=A}},N={};function g(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,g),e.exports}var s=g(45);return s})()})}(pe)),pe.exports}(function(C,Y){(function(G,N){C.exports=N(cr())})(Te,function(A){return(()=>{var G={658:i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments.length,f=Array(e>1?e-1:0),a=1;a{var f=function(){function t(h,o){var c=[],l=!0,T=!1,u=void 0;try{for(var d=h[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(F){T=!0,u=F}finally{try{!l&&d.return&&d.return()}finally{if(T)throw u}}return c}return function(h,o){if(Array.isArray(h))return h;if(Symbol.iterator in Object(h))return t(h,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=e(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(t){for(var h={},o=0;o0&&I.merge(x)});for(var w=0;w1){L=u[0],F=L.connectedEdges().length,u.forEach(function(p){p.connectedEdges().length0&&c.set("dummy"+(c.size+1),J),V},y.relocateComponent=function(t,h,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,F=void 0;try{for(var M=h.nodeIndexes[Symbol.iterator](),P;!(d=(P=M.next()).done);d=!0){var J=P.value,V=f(J,2),Q=V[0],D=V[1],rt=o.cy.getElementById(Q);if(rt){var n=rt.boundingBox(),m=h.xCoords[D]-n.w/2,v=h.xCoords[D]+n.w/2,E=h.yCoords[D]-n.h/2,p=h.yCoords[D]+n.h/2;ml&&(l=v),Eu&&(u=p)}}}catch(x){L=!0,F=x}finally{try{!d&&M.return&&M.return()}finally{if(L)throw F}}var I=t.x-(l+c)/2,w=t.y-(u+T)/2;h.xCoords=h.xCoords.map(function(x){return x+I}),h.yCoords=h.yCoords.map(function(x){return x+w})}else{Object.keys(h).forEach(function(x){var k=h[x],W=k.getRect().x,U=k.getRect().x+k.getRect().width,et=k.getRect().y,z=k.getRect().y+k.getRect().height;Wl&&(l=U),etu&&(u=z)});var R=t.x-(l+c)/2,H=t.y-(u+T)/2;Object.keys(h).forEach(function(x){var k=h[x];k.setCenter(k.getCenterX()+R,k.getCenterY()+H)})}}},y.calcBoundingBox=function(t,h,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,F=void 0,M=void 0,P=void 0,J=t.descendants().not(":parent"),V=J.length,Q=0;QL&&(l=L),TM&&(u=M),d{var f=e(548),a=e(140).CoSELayout,y=e(140).CoSENode,t=e(140).layoutBase.PointD,h=e(140).layoutBase.DimensionD,o=e(140).layoutBase.LayoutConstants,c=e(140).layoutBase.FDLayoutConstants,l=e(140).CoSEConstants,T=function(d,L){var F=d.cy,M=d.eles,P=M.nodes(),J=M.edges(),V=void 0,Q=void 0,D=void 0,rt={};d.randomize&&(V=L.nodeIndexes,Q=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,k){return n(x)?x(k):x},v=f.calcParentsWithoutChildren(F,M),E=function H(x,k,W,U){for(var et=k.length,z=0;z0){var q=void 0;q=W.getGraphManager().add(W.newGraph(),B),H(q,X,W,U)}}},p=function(x,k,W){for(var U=0,et=0,z=0;z0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=U/et:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,k){k.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=k.fixedNodeConstraint),k.alignmentConstraint&&(x.constraints.alignmentConstraint=k.alignmentConstraint),k.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=k.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new a,R=w.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(P),w,d),p(w,R,J),I(w,d),w.runLayout(),rt};i.exports={coseLayout:T}},212:(i,r,e)=>{var f=function(){function d(L,F){for(var M=0;M0)if(v){var I=t.getTopMostNodes(M.eles.nodes());if(D=t.connectComponents(P,M.eles,I),D.forEach(function(vt){var it=vt.boundingBox();rt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),M.randomize&&D.forEach(function(vt){M.eles=vt,V.push(o(M))}),M.quality=="default"||M.quality=="proof"){var w=P.collection();if(M.tile){var R=new Map,H=[],x=[],k=0,W={nodeIndexes:R,xCoords:H,yCoords:x},U=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Tt){w.merge(vt.nodes()[Tt]),ut.isParent()||(W.nodeIndexes.set(vt.nodes()[Tt].id(),k++),W.xCoords.push(vt.nodes()[0].position().x),W.yCoords.push(vt.nodes()[0].position().y))}),U.push(it))}),w.length>1){var et=w.boundingBox();rt.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(w),V.push(W);for(var z=U.length-1;z>=0;z--)D.splice(U[z],1),V.splice(U[z],1),rt.splice(U[z],1)}}D.forEach(function(vt,it){M.eles=vt,Q.push(l(M,V[it])),t.relocateComponent(rt[it],Q[it],M)})}else D.forEach(function(vt,it){t.relocateComponent(rt[it],V[it],M)});var O=new Set;if(D.length>1){var X=[],B=J.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var ut=void 0;if(M.quality=="draft"&&(ut=V[it].nodeIndexes),vt.nodes().not(B).length>0){var Tt={};Tt.edges=[],Tt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Dt){if(M.quality=="draft")if(!Dt.isParent())At=ut.get(Dt.id()),Tt.nodes.push({x:V[it].xCoords[At]-Dt.boundingbox().w/2,y:V[it].yCoords[At]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,V[it].xCoords,V[it].yCoords,ut);Tt.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else Q[it][Dt.id()]&&Tt.nodes.push({x:Q[it][Dt.id()].getLeft(),y:Q[it][Dt.id()].getTop(),width:Q[it][Dt.id()].getWidth(),height:Q[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),xt=Dt.target();if(mt.css("display")!="none"&&xt.css("display")!="none")if(M.quality=="draft"){var St=ut.get(mt.id()),Vt=ut.get(xt.id()),Xt=[],Ut=[];if(mt.isParent()){var bt=t.calcBoundingBox(mt,V[it].xCoords,V[it].yCoords,ut);Xt.push(bt.topLeftX+bt.width/2),Xt.push(bt.topLeftY+bt.height/2)}else Xt.push(V[it].xCoords[St]),Xt.push(V[it].yCoords[St]);if(xt.isParent()){var Ht=t.calcBoundingBox(xt,V[it].xCoords,V[it].yCoords,ut);Ut.push(Ht.topLeftX+Ht.width/2),Ut.push(Ht.topLeftY+Ht.height/2)}else Ut.push(V[it].xCoords[Vt]),Ut.push(V[it].yCoords[Vt]);Tt.edges.push({startX:Xt[0],startY:Xt[1],endX:Ut[0],endY:Ut[1]})}else Q[it][mt.id()]&&Q[it][xt.id()]&&Tt.edges.push({startX:Q[it][mt.id()].getCenterX(),startY:Q[it][mt.id()].getCenterY(),endX:Q[it][xt.id()].getCenterX(),endY:Q[it][xt.id()].getCenterY()})}),Tt.nodes.length>0&&(X.push(Tt),O.add(it))}});var _=m.packComponents(X,M.randomize).shifts;if(M.quality=="draft")V.forEach(function(vt,it){var ut=vt.xCoords.map(function(At){return At+_[it].dx}),Tt=vt.yCoords.map(function(At){return At+_[it].dy});vt.xCoords=ut,vt.yCoords=Tt});else{var lt=0;O.forEach(function(vt){Object.keys(Q[vt]).forEach(function(it){var ut=Q[vt][it];ut.setCenter(ut.getCenterX()+_[lt].dx,ut.getCenterY()+_[lt].dy)}),lt++})}}}else{var E=M.eles.boundingBox();if(rt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),M.randomize){var p=o(M);V.push(p)}M.quality=="default"||M.quality=="proof"?(Q.push(l(M,V[0])),t.relocateComponent(rt[0],Q[0],M)):t.relocateComponent(rt[0],V[0],M)}var q=function(it,ut){if(M.quality=="default"||M.quality=="proof"){typeof it=="number"&&(it=ut);var Tt=void 0,At=void 0,Dt=it.data("id");return Q.forEach(function(xt){Dt in xt&&(Tt={x:xt[Dt].getRect().getCenterX(),y:xt[Dt].getRect().getCenterY()},At=xt[Dt])}),M.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?Tt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(Tt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?Tt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(Tt.y-=At.labelHeight/2))),Tt==null&&(Tt={x:it.position("x"),y:it.position("y")}),{x:Tt.x,y:Tt.y}}else{var mt=void 0;return V.forEach(function(xt){var St=xt.nodeIndexes.get(it.id());St!=null&&(mt={x:xt.xCoords[St],y:xt.yCoords[St]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(M.quality=="default"||M.quality=="proof"||M.randomize){var Rt=t.calcParentsWithoutChildren(P,J),Lt=J.filter(function(vt){return vt.css("display")=="none"});M.eles=J.not(Lt),J.nodes().not(":parent").not(Lt).layoutPositions(F,M,q),Rt.length>0&&Rt.forEach(function(vt){vt.position(q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();i.exports=u},657:(i,r,e)=>{var f=e(548),a=e(140).layoutBase.Matrix,y=e(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),u=l.nodes(":parent"),d=new Map,L=new Map,F=new Map,M=[],P=[],J=[],V=[],Q=[],D=[],rt=[],n=[],m=void 0,v=1e8,E=1e-9,p=o.piTol,I=o.samplingType,w=o.nodeSeparation,R=void 0,H=function(){for(var b=0,$=0,K=!1;$=at;){ot=Z[at++];for(var It=M[ot],ft=0;ftdt&&(dt=Q[Ct],wt=Ct)}return wt},k=function(b){var $=void 0;if(b){$=Math.floor(Math.random()*m);for(var Z=0;Z=1)break;j=tt}for(var yt=0;yt=1)break;j=tt}for(var ft=0;ft0&&($.isParent()?M[b].push(F.get($.id())):M[b].push($.id()))})});var Lt=function(b){var $=L.get(b),K=void 0;d.get(b).forEach(function(Z){c.getElementById(Z).isParent()?K=F.get(Z):K=Z,M[$].push(K),M[L.get(K)].push(b)})},vt=!0,it=!1,ut=void 0;try{for(var Tt=d.keys()[Symbol.iterator](),At;!(vt=(At=Tt.next()).done);vt=!0){var Dt=At.value;Lt(Dt)}}catch(S){it=!0,ut=S}finally{try{!vt&&Tt.return&&Tt.return()}finally{if(it)throw ut}}m=L.size;var mt=void 0;if(m>2){R=m{var f=e(212),a=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&a(cytoscape),i.exports=a},140:i=>{i.exports=A}},N={};function g(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,g),e.exports}var s=g(579);return s})()})})(be);var gr=be.exports;const ur=ke(gr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:nt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:nt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:nt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:nt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},he={L:nt((C,Y)=>C-Y+2,"L"),R:nt((C,Y)=>C-2,"R"),T:nt((C,Y)=>C-Y+2,"T"),B:nt((C,Y)=>C-2,"B")},dr=nt(function(C){return zt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=nt(function(C){const Y=C;return Y==="L"||Y==="R"||Y==="T"||Y==="B"},"isArchitectureDirection"),zt=nt(function(C){const Y=C;return Y==="L"||Y==="R"},"isArchitectureDirectionX"),Qt=nt(function(C){const Y=C;return Y==="T"||Y==="B"},"isArchitectureDirectionY"),Pe=nt(function(C,Y){const A=zt(C)&&Qt(Y),G=Qt(C)&&zt(Y);return A||G},"isArchitectureDirectionXY"),vr=nt(function(C){const Y=C[0],A=C[1],G=zt(Y)&&Qt(A),N=Qt(Y)&&zt(A);return G||N},"isArchitecturePairXY"),pr=nt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),me=nt(function(C,Y){const A=`${C}${Y}`;return pr(A)?A:void 0},"getArchitectureDirectionPair"),yr=nt(function([C,Y],A){const G=A[0],N=A[1];return zt(G)?Qt(N)?[C+(G==="L"?-1:1),Y+(N==="T"?1:-1)]:[C+(G==="L"?-1:1),Y]:zt(N)?[C+(N==="L"?1:-1),Y+(G==="T"?1:-1)]:[C,Y+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Er=nt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mr=nt(function(C){return C.type==="service"},"isArchitectureService"),Tr=nt(function(C){return C.type==="junction"},"isArchitectureJunction"),Ge=nt(C=>C.data(),"edgeData"),ne=nt(C=>C.data(),"nodeData"),Ue=qe.architecture,pt=new hr(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Ue,dataStructures:void 0,elements:{}})),Nr=nt(()=>{pt.reset(),ar()},"clear"),Lr=nt(function({id:C,icon:Y,in:A,title:G,iconText:N}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The service [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(pt.records.registeredIds[A]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"service",icon:Y,iconText:N,title:G,edges:[],in:A}},"addService"),Cr=nt(()=>Object.values(pt.records.nodes).filter(mr),"getServices"),Mr=nt(function({id:C,in:Y}){pt.records.registeredIds[C]="node",pt.records.nodes[C]={id:C,type:"junction",edges:[],in:Y}},"addJunction"),Ar=nt(()=>Object.values(pt.records.nodes).filter(Tr),"getJunctions"),wr=nt(()=>Object.values(pt.records.nodes),"getNodes"),Or=nt(C=>pt.records.nodes[C],"getNode"),Dr=nt(function({id:C,icon:Y,in:A,title:G}){if(pt.records.registeredIds[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${pt.records.registeredIds[C]}`);if(A!==void 0){if(C===A)throw new Error(`The group [${C}] cannot be placed within itself`);if(pt.records.registeredIds[A]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(pt.records.registeredIds[A]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}pt.records.registeredIds[C]="group",pt.records.groups[C]={id:C,icon:Y,title:G,in:A}},"addGroup"),xr=nt(()=>Object.values(pt.records.groups),"getGroups"),Ir=nt(function({lhsId:C,rhsId:Y,lhsDir:A,rhsDir:G,lhsInto:N,rhsInto:g,lhsGroup:s,rhsGroup:i,title:r}){if(!Re(A))throw new Error(`Invalid direction given for left hand side of edge ${C}--${Y}. Expected (L,R,T,B) got ${A}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${C}--${Y}. Expected (L,R,T,B) got ${G}`);if(pt.records.nodes[C]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(pt.records.nodes[Y]===void 0&&pt.records.groups[C]===void 0)throw new Error(`The right-hand id [${Y}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=pt.records.nodes[C].in,f=pt.records.nodes[Y].in;if(s&&e&&f&&e==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&e&&f&&e==f)throw new Error(`The right-hand id [${Y}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const a={lhsId:C,lhsDir:A,lhsInto:N,lhsGroup:s,rhsId:Y,rhsDir:G,rhsInto:g,rhsGroup:i,title:r};pt.records.edges.push(a),pt.records.nodes[C]&&pt.records.nodes[Y]&&(pt.records.nodes[C].edges.push(pt.records.edges[pt.records.edges.length-1]),pt.records.nodes[Y].edges.push(pt.records.edges[pt.records.edges.length-1]))},"addEdge"),Rr=nt(()=>pt.records.edges,"getEdges"),Sr=nt(()=>{if(pt.records.dataStructures===void 0){const C=Object.entries(pt.records.nodes).reduce((s,[i,r])=>(s[i]=r.edges.reduce((e,f)=>{if(f.lhsId===i){const a=me(f.lhsDir,f.rhsDir);a&&(e[a]=f.rhsId)}else{const a=me(f.rhsDir,f.lhsDir);a&&(e[a]=f.lhsId)}return e},{}),s),{}),Y=Object.keys(C)[0],A={[Y]:1},G=Object.keys(C).reduce((s,i)=>i===Y?s:{...s,[i]:1},{}),N=nt(s=>{const i={[s]:[0,0]},r=[s];for(;r.length>0;){const e=r.shift();if(e){A[e]=1,delete G[e];const f=C[e],[a,y]=i[e];Object.entries(f).forEach(([t,h])=>{A[h]||(i[h]=yr([a,y],t),r.push(h))})}}return i},"BFS"),g=[N(Y)];for(;Object.keys(G).length>0;)g.push(N(Object.keys(G)[0]));pt.records.dataStructures={adjList:C,spatialMaps:g}}return pt.records.dataStructures},"getDataStructures"),Fr=nt((C,Y)=>{pt.records.elements[C]=Y},"setElementForId"),br=nt(C=>pt.records.elements[C],"getElementById"),le={clear:Nr,setDiagramTitle:Ke,getDiagramTitle:je,setAccTitle:_e,getAccTitle:tr,setAccDescription:er,getAccDescription:rr,addService:Lr,getServices:Cr,addJunction:Mr,getJunctions:Ar,getNodes:wr,getNode:Or,addGroup:Dr,getGroups:xr,addEdge:Ir,getEdges:Rr,setElementForId:Fr,getElementById:br,getDataStructures:Sr};function Pt(C){const Y=fe().architecture;return Y!=null&&Y[C]?Y[C]:Ue[C]}nt(Pt,"getConfigField");var Pr=nt((C,Y)=>{sr(C,Y),C.groups.map(Y.addGroup),C.services.map(A=>Y.addService({...A,type:"service"})),C.junctions.map(A=>Y.addJunction({...A,type:"junction"})),C.edges.map(Y.addEdge)},"populateDb"),Gr={parse:nt(async C=>{const Y=await lr("architecture",C);Se.debug(Y),Pr(Y,le)},"parse")},Ur=nt(C=>` + .edge { + stroke-width: ${C.archEdgeWidth}; + stroke: ${C.archEdgeColor}; + fill: none; + } + + .arrow { + fill: ${C.archEdgeArrowColor}; + } + + .node-bkg { + fill: none; + stroke: ${C.archGroupBorderColor}; + stroke-width: ${C.archGroupBorderWidth}; + stroke-dasharray: 8; + } + .node-icon-text { + display: flex; + align-items: center; + } + + .node-icon-text > div { + color: #fff; + margin: 1px; + height: fit-content; + text-align: center; + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + } +`,"getStyles"),Yr=Ur,ae=nt(C=>`${C}`,"wrapIcon"),oe={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:ae('')},server:{body:ae('')},disk:{body:ae('')},internet:{body:ae('')},cloud:{body:ae('')},unknown:Je,blank:{body:ae("")}}},Xr=nt(async function(C,Y){const A=Pt("padding"),G=Pt("iconSize"),N=G/2,g=G/6,s=g/2;await Promise.all(Y.edges().map(async i=>{var P,J;const{source:r,sourceDir:e,sourceArrow:f,sourceGroup:a,target:y,targetDir:t,targetArrow:h,targetGroup:o,label:c}=Ge(i);let{x:l,y:T}=i[0].sourceEndpoint();const{x:u,y:d}=i[0].midpoint();let{x:L,y:F}=i[0].targetEndpoint();const M=A+4;if(a&&(zt(e)?l+=e==="L"?-M:M:T+=e==="T"?-M:M+18),o&&(zt(t)?L+=t==="L"?-M:M:F+=t==="T"?-M:M+18),!a&&((P=le.getNode(r))==null?void 0:P.type)==="junction"&&(zt(e)?l+=e==="L"?N:-N:T+=e==="T"?N:-N),!o&&((J=le.getNode(y))==null?void 0:J.type)==="junction"&&(zt(t)?L+=t==="L"?N:-N:F+=t==="T"?N:-N),i[0]._private.rscratch){const V=C.insert("g");if(V.insert("path").attr("d",`M ${l},${T} L ${u},${d} L${L},${F} `).attr("class","edge"),f){const Q=zt(e)?he[e](l,g):l-s,D=Qt(e)?he[e](T,g):T-s;V.insert("polygon").attr("points",Ie[e](g)).attr("transform",`translate(${Q},${D})`).attr("class","arrow")}if(h){const Q=zt(t)?he[t](L,g):L-s,D=Qt(t)?he[t](F,g):F-s;V.insert("polygon").attr("points",Ie[t](g)).attr("transform",`translate(${Q},${D})`).attr("class","arrow")}if(c){const Q=Pe(e,t)?"XY":zt(e)?"X":"Y";let D=0;Q==="X"?D=Math.abs(l-L):Q==="Y"?D=Math.abs(T-F)/1.5:D=Math.abs(l-L)/2;const rt=V.append("g");if(await Ne(rt,c,{useHtmlLabels:!1,width:D,classes:"architecture-service-label"},fe()),rt.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),Q==="X")rt.attr("transform","translate("+u+", "+d+")");else if(Q==="Y")rt.attr("transform","translate("+u+", "+d+") rotate(-90)");else if(Q==="XY"){const n=me(e,t);if(n&&vr(n)){const m=rt.node().getBoundingClientRect(),[v,E]=Er(n);rt.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*v*E*45})`);const p=rt.node().getBoundingClientRect();rt.attr("transform",` + translate(${u}, ${d-m.height/2}) + translate(${v*p.width/2}, ${E*p.height/2}) + rotate(${-1*v*E*45}, 0, ${m.height/2}) + `)}}}}}))},"drawEdges"),Hr=nt(async function(C,Y){const G=Pt("padding")*.75,N=Pt("fontSize"),s=Pt("iconSize")/2;await Promise.all(Y.nodes().map(async i=>{const r=ne(i);if(r.type==="group"){const{h:e,w:f,x1:a,y1:y}=i.boundingBox();C.append("rect").attr("x",a+s).attr("y",y+s).attr("width",f).attr("height",e).attr("class","node-bkg");const t=C.append("g");let h=a,o=y;if(r.icon){const c=t.append("g");c.html(`${await Ee(r.icon,{height:G,width:G,fallbackPrefix:oe.prefix})}`),c.attr("transform","translate("+(h+s+1)+", "+(o+s+1)+")"),h+=G,o+=N/2-1-2}if(r.label){const c=t.append("g");await Ne(c,r.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},fe()),c.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),c.attr("transform","translate("+(h+s+4)+", "+(o+s+2)+")")}}}))},"drawGroups"),Wr=nt(async function(C,Y,A){for(const G of A){const N=Y.append("g"),g=Pt("iconSize");if(G.title){const e=N.append("g");await Ne(e,G.title,{useHtmlLabels:!1,width:g*1.5,classes:"architecture-service-label"},fe()),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+g/2+", "+g+")")}const s=N.append("g");if(G.icon)s.html(`${await Ee(G.icon,{height:g,width:g,fallbackPrefix:oe.prefix})}`);else if(G.iconText){s.html(`${await Ee("blank",{height:g,width:g,fallbackPrefix:oe.prefix})}`);const a=s.append("g").append("foreignObject").attr("width",g).attr("height",g).append("div").attr("class","node-icon-text").attr("style",`height: ${g}px;`).append("div").html(G.iconText),y=parseInt(window.getComputedStyle(a.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;a.attr("style",`-webkit-line-clamp: ${Math.floor((g-2)/y)};`)}else s.append("path").attr("class","node-bkg").attr("id","node-"+G.id).attr("d",`M0 ${g} v${-g} q0,-5 5,-5 h${g} q5,0 5,5 v${g} H0 Z`);N.attr("class","architecture-service");const{width:i,height:r}=N._groups[0][0].getBBox();G.width=i,G.height=r,C.setElementForId(G.id,N)}return 0},"drawServices"),Vr=nt(function(C,Y,A){A.forEach(G=>{const N=Y.append("g"),g=Pt("iconSize");N.append("g").append("rect").attr("id","node-"+G.id).attr("fill-opacity","0").attr("width",g).attr("height",g),N.attr("class","architecture-junction");const{width:i,height:r}=N._groups[0][0].getBBox();N.width=i,N.height=r,C.setElementForId(G.id,N)})},"drawJunctions");Qe([{name:oe.prefix,icons:oe}]);Fe.use(ur);function Ye(C,Y){C.forEach(A=>{Y.add({group:"nodes",data:{type:"service",id:A.id,icon:A.icon,label:A.title,parent:A.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-service"})})}nt(Ye,"addServices");function Xe(C,Y){C.forEach(A=>{Y.add({group:"nodes",data:{type:"junction",id:A.id,parent:A.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-junction"})})}nt(Xe,"addJunctions");function He(C,Y){Y.nodes().map(A=>{const G=ne(A);if(G.type==="group")return;G.x=A.position().x,G.y=A.position().y,C.getElementById(G.id).attr("transform","translate("+(G.x||0)+","+(G.y||0)+")")})}nt(He,"positionNodes");function We(C,Y){C.forEach(A=>{Y.add({group:"nodes",data:{type:"group",id:A.id,icon:A.icon,label:A.title,parent:A.in},classes:"node-group"})})}nt(We,"addGroups");function Ve(C,Y){C.forEach(A=>{const{lhsId:G,rhsId:N,lhsInto:g,lhsGroup:s,rhsInto:i,lhsDir:r,rhsDir:e,rhsGroup:f,title:a}=A,y=Pe(A.lhsDir,A.rhsDir)?"segments":"straight",t={id:`${G}-${N}`,label:a,source:G,sourceDir:r,sourceArrow:g,sourceGroup:s,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%",target:N,targetDir:e,targetArrow:i,targetGroup:f,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};Y.add({group:"edges",data:t,classes:y})})}nt(Ve,"addEdges");function ze(C){const Y=C.map(N=>{const g={},s={};return Object.entries(N).forEach(([i,[r,e]])=>{g[e]||(g[e]=[]),s[r]||(s[r]=[]),g[e].push(i),s[r].push(i)}),{horiz:Object.values(g).filter(i=>i.length>1),vert:Object.values(s).filter(i=>i.length>1)}}),[A,G]=Y.reduce(([N,g],{horiz:s,vert:i})=>[[...N,...s],[...g,...i]],[[],[]]);return{horizontal:A,vertical:G}}nt(ze,"getAlignments");function Be(C){const Y=[],A=nt(N=>`${N[0]},${N[1]}`,"posToStr"),G=nt(N=>N.split(",").map(g=>parseInt(g)),"strToPos");return C.forEach(N=>{const g=Object.fromEntries(Object.entries(N).map(([e,f])=>[A(f),e])),s=[A([0,0])],i={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){const e=s.shift();if(e){i[e]=1;const f=g[e];if(f){const a=G(e);Object.entries(r).forEach(([y,t])=>{const h=A([a[0]+t[0],a[1]+t[1]]),o=g[h];o&&!i[h]&&(s.push(h),Y.push({[xe[y]]:o,[xe[dr(y)]]:f,gap:1.5*Pt("iconSize")}))})}}}}),Y}nt(Be,"getRelativeConstraints");function $e(C,Y,A,G,{spatialMaps:N}){return new Promise(g=>{const s=ir("body").append("div").attr("id","cy").attr("style","display:none"),i=Fe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Pt("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Pt("padding")}px`}}]});s.remove(),We(A,i),Ye(C,i),Xe(Y,i),Ve(G,i);const r=ze(N),e=Be(N),f=i.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(a){const[y,t]=a.connectedNodes(),{parent:h}=ne(y),{parent:o}=ne(t);return h===o?1.5*Pt("iconSize"):.5*Pt("iconSize")},edgeElasticity(a){const[y,t]=a.connectedNodes(),{parent:h}=ne(y),{parent:o}=ne(t);return h===o?.45:.001},alignmentConstraint:r,relativePlacementConstraint:e});f.one("layoutstop",()=>{var y;function a(t,h,o,c){let l,T;const{x:u,y:d}=t,{x:L,y:F}=h;T=(c-d+(u-o)*(d-F)/(u-L))/Math.sqrt(1+Math.pow((d-F)/(u-L),2)),l=Math.sqrt(Math.pow(c-d,2)+Math.pow(o-u,2)-Math.pow(T,2));const M=Math.sqrt(Math.pow(L-u,2)+Math.pow(F-d,2));l=l/M;let P=(L-u)*(c-d)-(F-d)*(o-u);switch(!0){case P>=0:P=1;break;case P<0:P=-1;break}let J=(L-u)*(o-u)+(F-d)*(c-d);switch(!0){case J>=0:J=1;break;case J<0:J=-1;break}return T=Math.abs(T)*P,l=l*J,{distances:T,weights:l}}nt(a,"getSegmentWeights"),i.startBatch();for(const t of Object.values(i.edges()))if((y=t.data)!=null&&y.call(t)){const{x:h,y:o}=t.source().position(),{x:c,y:l}=t.target().position();if(h!==c&&o!==l){const T=t.sourceEndpoint(),u=t.targetEndpoint(),{sourceDir:d}=Ge(t),[L,F]=Qt(d)?[T.x,u.y]:[u.x,T.y],{weights:M,distances:P}=a(T,u,L,F);t.style("segment-distances",P),t.style("segment-weights",M)}}i.endBatch(),f.run()}),f.run(),i.ready(a=>{Se.info("Ready",a),g(i)})})}nt($e,"layoutArchitecture");var zr=nt(async(C,Y,A,G)=>{const N=G.db,g=N.getServices(),s=N.getJunctions(),i=N.getGroups(),r=N.getEdges(),e=N.getDataStructures(),f=nr(Y),a=f.append("g");a.attr("class","architecture-edges");const y=f.append("g");y.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await Wr(N,y,g),Vr(N,y,s);const h=await $e(g,s,i,r,e);await Xr(a,h),await Hr(t,h),He(N,h),or(void 0,f,Pt("padding"),Pt("useMaxWidth"))},"draw"),Br={draw:zr},ei={parser:Gr,db:le,renderer:Br,styles:Yr};export{ei as diagram}; diff --git a/assets/chunks/basePickBy.DBxcSOni.js b/assets/chunks/basePickBy.DBxcSOni.js new file mode 100644 index 00000000..bedb22bc --- /dev/null +++ b/assets/chunks/basePickBy.DBxcSOni.js @@ -0,0 +1 @@ +import{e as x,c as b,g as m,k as P,h as p,j as w,l as N,m as c,n as I,t as A,o as M}from"./baseUniq.DbzeOdwK.js";import{aL as g,aq as E,aM as F,aN as T,aO as _,aP as l,aQ as $,aR as B,aS as S,aT as y}from"../app.CXGmg8Jv.js";var L=/\s/;function R(n){for(var r=n.length;r--&&L.test(n.charAt(r)););return r}var q=/^\s+/;function G(n){return n&&n.slice(0,R(n)+1).replace(q,"")}var o=NaN,H=/^[-+]0x[0-9a-f]+$/i,z=/^0b[01]+$/i,C=/^0o[0-7]+$/i,K=parseInt;function Q(n){if(typeof n=="number")return n;if(x(n))return o;if(g(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=g(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=G(n);var t=z.test(n);return t||C.test(n)?K(n.slice(2),t?2:8):H.test(n)?o:+n}var v=1/0,W=17976931348623157e292;function X(n){if(!n)return n===0?n:0;if(n=Q(n),n===v||n===-v){var r=n<0?-1:1;return r*W}return n===n?n:0}function Y(n){var r=X(n),t=r%1;return r===r?t?r-t:r:0}function fn(n){var r=n==null?0:n.length;return r?b(n):[]}var O=Object.prototype,D=O.hasOwnProperty,dn=E(function(n,r){n=Object(n);var t=-1,i=r.length,a=i>2?r[2]:void 0;for(a&&F(r[0],r[1],a)&&(i=1);++t-1?a[f?r[e]:e]:void 0}}var U=Math.max;function Z(n,r,t){var i=n==null?0:n.length;if(!i)return-1;var a=t==null?0:Y(t);return a<0&&(a=U(i+a,0)),p(n,m(r),a)}var hn=J(Z);function V(n,r){var t=-1,i=l(n)?Array(n.length):[];return w(n,function(a,f,e){i[++t]=r(a,f,e)}),i}function gn(n,r){var t=$(n)?N:V;return t(n,m(r))}var j=Object.prototype,k=j.hasOwnProperty;function nn(n,r){return n!=null&&k.call(n,r)}function mn(n,r){return n!=null&&c(n,r,nn)}function rn(n,r){return n-1}function $(n){return sn(n)?xn(n):mn(n)}var nr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rr=/^\w*$/;function B(n,r){if(T(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||U(n)?!0:rr.test(n)||!nr.test(n)||r!=null&&n in Object(r)}var er=500;function tr(n){var r=Fn(n,function(t){return e.size===er&&e.clear(),t}),e=r.cache;return r}var ir=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ar=/\\(\\)?/g,fr=tr(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(ir,function(e,t,a,i){r.push(a?i.replace(ar,"$1"):t||e)}),r});function sr(n){return n==null?"":dn(n)}function An(n,r){return T(n)?n:B(n,r)?[n]:fr(sr(n))}var ur=1/0;function m(n){if(typeof n=="string"||U(n))return n;var r=n+"";return r=="0"&&1/n==-ur?"-0":r}function yn(n,r){r=An(r,n);for(var e=0,t=r.length;n!=null&&es))return!1;var b=i.get(n),l=i.get(r);if(b&&l)return b==r&&l==n;var o=-1,c=!0,h=e&Re?new E:void 0;for(i.set(n,r),i.set(r,n);++o=Ot){var b=r?null:wt(n);if(b)return H(b);f=!1,a=Sn,u=new E}else u=r?[]:s;n:for(;++t"u"&&(M.yylloc={});var ut=M.yylloc;c.push(ut);var oe=M.options&&M.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(H){u.length=u.length-2*H,S.length=S.length-H,c.length=c.length-H}d(he,"popStack");function Dt(){var H;return H=w.pop()||M.lex()||W,typeof H!="number"&&(H instanceof Array&&(w=H,H=w.pop()),H=g.symbols_[H]||H),H}d(Dt,"lex");for(var Y,Q,U,pt,$={},st,q,Nt,it;;){if(Q=u[u.length-1],this.defaultActions[Q]?U=this.defaultActions[Q]:((Y===null||typeof Y>"u")&&(Y=Dt()),U=_[Q]&&_[Q][Y]),typeof U>"u"||!U.length||!U[0]){var ft="";it=[];for(st in _[Q])this.terminals_[st]&&st>X&&it.push("'"+this.terminals_[st]+"'");M.showPosition?ft="Parse error on line "+(A+1)+`: +`+M.showPosition()+` +Expecting `+it.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":ft="Parse error on line "+(A+1)+": Unexpected "+(Y==W?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(ft,{text:M.match,token:this.terminals_[Y]||Y,line:M.yylineno,loc:ut,expected:it})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+Y);switch(U[0]){case 1:u.push(Y),S.push(M.yytext),c.push(M.yylloc),u.push(U[1]),Y=null,O=M.yyleng,p=M.yytext,A=M.yylineno,ut=M.yylloc;break;case 2:if(q=this.productions_[U[1]][1],$.$=S[S.length-q],$._$={first_line:c[c.length-(q||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(q||1)].first_column,last_column:c[c.length-1].last_column},oe&&($._$.range=[c[c.length-(q||1)].range[0],c[c.length-1].range[1]]),pt=this.performAction.apply($,[p,O,A,J.yy,U[1],S,c].concat(ce)),typeof pt<"u")return pt;q&&(u=u.slice(0,-1*q*2),S=S.slice(0,-1*q),c=c.slice(0,-1*q)),u.push(this.productions_[U[1]][0]),S.push($.$),c.push($._$),Nt=_[u[u.length-2]][u[u.length-1]],u.push(Nt);break;case 3:return!0}}return!0},"parse")},T=function(){var N={EOF:1,parseError:d(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:d(function(x,g){return this.yy=g||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var g=x.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:d(function(x){var g=x.length,u=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var w=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===w.length?this.yylloc.first_column:0)+w[w.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(x){this.unput(this.match.slice(x))},"less"),pastInput:d(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var x=this.pastInput(),g=new Array(x.length+1).join("-");return x+this.upcomingInput()+` +`+g+"^"},"showPosition"),test_match:d(function(x,g){var u,w,S;if(this.options.backtrack_lexer&&(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(S.yylloc.range=this.yylloc.range.slice(0))),w=x[0].match(/(?:\r\n?|\n).*/g),w&&(this.yylineno+=w.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:w?w[w.length-1].length-w[w.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],u=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var c in S)this[c]=S[c];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,g,u,w;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),c=0;cg[0].length)){if(g=u,w=c,this.options.backtrack_lexer){if(x=this.test_match(u,S[c]),x!==!1)return x;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(x=this.test_match(g,S[w]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var g=this.next();return g||this.lex()},"lex"),begin:d(function(g){this.conditionStack.push(g)},"begin"),popState:d(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:d(function(g){this.begin(g)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:d(function(g,u,w,S){switch(w){case 0:return 10;case 1:return g.getLogger().debug("Found space-block"),31;case 2:return g.getLogger().debug("Found nl-block"),31;case 3:return g.getLogger().debug("Found space-block"),29;case 4:g.getLogger().debug(".",u.yytext);break;case 5:g.getLogger().debug("_",u.yytext);break;case 6:return 5;case 7:return u.yytext=-1,28;case 8:return u.yytext=u.yytext.replace(/columns\s+/,""),g.getLogger().debug("COLUMNS (LEX)",u.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:g.getLogger().debug("LEX: POPPING STR:",u.yytext),this.popState();break;case 14:return g.getLogger().debug("LEX: STR end:",u.yytext),"STR";case 15:return u.yytext=u.yytext.replace(/space\:/,""),g.getLogger().debug("SPACE NUM (LEX)",u.yytext),21;case 16:return u.yytext="1",g.getLogger().debug("COLUMNS (LEX)",u.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),g.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),g.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),g.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),g.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),g.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),g.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),g.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),g.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),g.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),g.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return g.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return g.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return g.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return g.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return g.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return g.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return g.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),g.getLogger().debug("LEX ARR START"),38;case 75:return g.getLogger().debug("Lex: NODE_ID",u.yytext),32;case 76:return g.getLogger().debug("Lex: EOF",u.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:g.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:g.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return g.getLogger().debug("LEX: NODE_DESCR:",u.yytext),"NODE_DESCR";case 84:g.getLogger().debug("LEX POPPING"),this.popState();break;case 85:g.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (right): dir:",u.yytext),"DIR";case 87:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (left):",u.yytext),"DIR";case 88:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (x):",u.yytext),"DIR";case 89:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (y):",u.yytext),"DIR";case 90:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (up):",u.yytext),"DIR";case 91:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (down):",u.yytext),"DIR";case 92:return u.yytext="]>",g.getLogger().debug("Lex (ARROW_DIR end):",u.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return g.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 94:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 95:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 96:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 97:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 98:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 99:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return g.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),g.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 103:return this.popState(),g.getLogger().debug("Lex: LINK",u.yytext),15;case 104:return this.popState(),g.getLogger().debug("Lex: LINK",u.yytext),15;case 105:return g.getLogger().debug("Lex: COLON",u.yytext),u.yytext=u.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return N}();v.lexer=T;function k(){this.yy={}}return d(k,"Parser"),k.prototype=v,v.Parser=k,new k}();yt.parser=yt;var Ee=yt,V=new Map,St=[],bt=new Map,Ct="color",Bt="fill",_e="bgFill",Ht=",",ke=z(),ct=new Map,De=d(e=>me.sanitizeText(e,ke),"sanitizeText"),Ne=d(function(e,t=""){let r=ct.get(e);r||(r={id:e,styles:[],textStyles:[]},ct.set(e,r)),t!=null&&t.split(Ht).forEach(n=>{const i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Ct).exec(n)){const s=i.replace(Bt,_e).replace(Ct,Bt);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),Te=d(function(e,t=""){const r=V.get(e);t!=null&&(r.styles=t.split(Ht))},"addStyle2Node"),Ce=d(function(e,t){e.split(",").forEach(function(r){let n=V.get(r);if(n===void 0){const i=r.trim();n={id:i,type:"na",children:[]},V.set(i,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),Kt=d((e,t)=>{const r=e.flat(),n=[];for(const i of r){if(i.label&&(i.label=De(i.label)),i.type==="classDef"){Ne(i.id,i.css);continue}if(i.type==="applyClass"){Ce(i.id,(i==null?void 0:i.styleClass)??"");continue}if(i.type==="applyStyles"){i!=null&&i.stylesStr&&Te(i.id,i==null?void 0:i.stylesStr);continue}if(i.type==="column-setting")t.columns=i.columns??-1;else if(i.type==="edge"){const a=(bt.get(i.id)??0)+1;bt.set(i.id,a),i.id=a+"-"+i.id,St.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);const a=V.get(i.id);if(a===void 0?V.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&Kt(i.children,i),i.type==="space"){const s=i.width??1;for(let l=0;l{L.debug("Clear called"),xe(),rt={id:"root",type:"composite",children:[],columns:-1},V=new Map([["root",rt]]),vt=[],ct=new Map,St=[],bt=new Map},"clear");function Xt(e){switch(L.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return L.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}d(Xt,"typeStr2Type");function Ut(e){switch(L.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}d(Ut,"edgeTypeStr2Type");function jt(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}d(jt,"edgeStrToEdgeData");var It=0,Ie=d(()=>(It++,"id-"+Math.random().toString(36).substr(2,12)+"-"+It),"generateId"),Oe=d(e=>{rt.children=e,Kt(e,rt),vt=rt.children},"setHierarchy"),Re=d(e=>{const t=V.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),ze=d(()=>[...V.values()],"getBlocksFlat"),Ae=d(()=>vt||[],"getBlocks"),Me=d(()=>St,"getEdges"),Fe=d(e=>V.get(e),"getBlock"),We=d(e=>{V.set(e.id,e)},"setBlock"),Pe=d(()=>console,"getLogger"),Ye=d(function(){return ct},"getClasses"),He={getConfig:d(()=>at().block,"getConfig"),typeStr2Type:Xt,edgeTypeStr2Type:Ut,edgeStrToEdgeData:jt,getLogger:Pe,getBlocksFlat:ze,getBlocks:Ae,getEdges:Me,setHierarchy:Oe,getBlock:Fe,setBlock:We,getColumns:Re,getClasses:Ye,clear:Be,generateId:Ie},Ke=He,nt=d((e,t)=>{const r=ve,n=r(e,"r"),i=r(e,"g"),a=r(e,"b");return ye(n,i,a,t)},"fade"),Xe=d(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span,p { + color: ${e.titleColor}; + } + + + + .label text,span,p { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${nt(e.edgeLabelBackground,.5)}; + // background-color: + } + + .node .cluster { + // fill: ${nt(e.mainBkg,.5)}; + fill: ${nt(e.clusterBkg,.5)}; + stroke: ${nt(e.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span,p { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`,"getStyles"),Ue=Xe,je=d((e,t,r,n)=>{t.forEach(i=>{rr[i](e,r,n)})},"insertMarkers"),Ve=d((e,t,r)=>{L.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Ge=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ze=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),qe=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Je=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Qe=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),$e=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),tr=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),er=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),rr={extension:Ve,composition:Ge,aggregation:Ze,dependency:qe,lollipop:Je,point:Qe,circle:$e,cross:tr,barb:er},ar=je,Wt,Pt,I=((Pt=(Wt=z())==null?void 0:Wt.block)==null?void 0:Pt.padding)??8;function Vt(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const r=t%e,n=Math.floor(t/e);return{px:r,py:n}}d(Vt,"calculateBlockPosition");var sr=d(e=>{let t=0,r=0;for(const n of e.children){const{width:i,height:a,x:s,y:l}=n.size??{width:0,height:0,x:0,y:0};L.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",l,n.type),n.type!=="space"&&(i>t&&(t=i/(e.widthInColumns??1)),a>r&&(r=a))}return{width:t,height:r}},"getMaxChildSize");function ot(e,t,r=0,n=0){var s,l,o,f,h,y,b,m,E,D,v;L.debug("setBlockSizes abc95 (start)",e.id,(s=e==null?void 0:e.size)==null?void 0:s.x,"block width =",e==null?void 0:e.size,"sieblingWidth",r),(l=e==null?void 0:e.size)!=null&&l.width||(e.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(((o=e.children)==null?void 0:o.length)>0){for(const S of e.children)ot(S,t);const T=sr(e);i=T.width,a=T.height,L.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,a);for(const S of e.children)S.size&&(L.debug(`abc95 Setting size of children of ${e.id} id=${S.id} ${i} ${a} ${JSON.stringify(S.size)}`),S.size.width=i*(S.widthInColumns??1)+I*((S.widthInColumns??1)-1),S.size.height=a,S.size.x=0,S.size.y=0,L.debug(`abc95 updating size of ${e.id} children child:${S.id} maxWidth:${i} maxHeight:${a}`));for(const S of e.children)ot(S,t,i,a);const k=e.columns??-1;let N=0;for(const S of e.children)N+=S.widthInColumns??1;let x=e.children.length;k>0&&k0?Math.min(e.children.length,k):e.children.length;if(S>0){const c=(u-S*I-I)/S;L.debug("abc95 (growing to fit) width",e.id,u,(b=e.size)==null?void 0:b.width,c);for(const _ of e.children)_.size&&(_.size.width=c)}}e.size={width:u,height:w,x:0,y:0}}L.debug("setBlockSizes abc94 (done)",e.id,(m=e==null?void 0:e.size)==null?void 0:m.x,(E=e==null?void 0:e.size)==null?void 0:E.width,(D=e==null?void 0:e.size)==null?void 0:D.y,(v=e==null?void 0:e.size)==null?void 0:v.height)}d(ot,"setBlockSizes");function Et(e,t){var n,i,a,s,l,o,f,h,y,b,m,E,D,v,T,k,N;L.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(n=e==null?void 0:e.size)==null?void 0:n.x} y: ${(i=e==null?void 0:e.size)==null?void 0:i.y} width: ${(a=e==null?void 0:e.size)==null?void 0:a.width}`);const r=e.columns??-1;if(L.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){const x=((l=(s=e==null?void 0:e.children[0])==null?void 0:s.size)==null?void 0:l.width)??0,g=e.children.length*x+(e.children.length-1)*I;L.debug("widthOfChildren 88",g,"posX");let u=0;L.debug("abc91 block?.size?.x",e.id,(o=e==null?void 0:e.size)==null?void 0:o.x);let w=(f=e==null?void 0:e.size)!=null&&f.x?((h=e==null?void 0:e.size)==null?void 0:h.x)+(-((y=e==null?void 0:e.size)==null?void 0:y.width)/2||0):-I,S=0;for(const c of e.children){const _=e;if(!c.size)continue;const{width:p,height:A}=c.size,{px:O,py:X}=Vt(r,u);if(X!=S&&(S=X,w=(b=e==null?void 0:e.size)!=null&&b.x?((m=e==null?void 0:e.size)==null?void 0:m.x)+(-((E=e==null?void 0:e.size)==null?void 0:E.width)/2||0):-I,L.debug("New row in layout for block",e.id," and child ",c.id,S)),L.debug(`abc89 layout blocks (child) id: ${c.id} Pos: ${u} (px, py) ${O},${X} (${(D=_==null?void 0:_.size)==null?void 0:D.x},${(v=_==null?void 0:_.size)==null?void 0:v.y}) parent: ${_.id} width: ${p}${I}`),_.size){const W=p/2;c.size.x=w+I+W,L.debug(`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${w} new startingPosX${c.size.x} ${W} padding=${I} width=${p} halfWidth=${W} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${p*((c==null?void 0:c.widthInColumns)??1)/2}`),w=c.size.x+W,c.size.y=_.size.y-_.size.height/2+X*(A+I)+A/2+I,L.debug(`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${w}${I}${W}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${p*((c==null?void 0:c.widthInColumns)??1)/2}`)}c.children&&Et(c),u+=(c==null?void 0:c.widthInColumns)??1,L.debug("abc88 columnsPos",c,u)}}L.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(T=e==null?void 0:e.size)==null?void 0:T.x} y: ${(k=e==null?void 0:e.size)==null?void 0:k.y} width: ${(N=e==null?void 0:e.size)==null?void 0:N.width}`)}d(Et,"layoutBlocks");function _t(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:a,y:s,width:l,height:o}=e.size;a-l/2n&&(n=a+l/2),s+o/2>i&&(i=s+o/2)}if(e.children)for(const a of e.children)({minX:t,minY:r,maxX:n,maxY:i}=_t(a,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}d(_t,"findBounds");function Gt(e){const t=e.getBlock("root");if(!t)return;ot(t,e,0,0),Et(t),L.debug("getBlocks",JSON.stringify(t,null,2));const{minX:r,minY:n,maxX:i,maxY:a}=_t(t),s=a-n,l=i-r;return{x:r,y:n,width:l,height:s}}d(Gt,"layout");function wt(e,t){t&&e.attr("style",t)}d(wt,"applyStyle");function Zt(e){const t=R(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label,i=e.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),wt(a,e.labelStyle),a.attr("class",i),wt(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}d(Zt,"addHtmlLabel");var ir=d((e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),Z(z().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
    "),L.debug("vertexText"+i);const a={isNode:n,label:we(xt(i)),labelStyle:t.replace("fill:","color:")};return Zt(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|/gi):Array.isArray(i)?s=i:s=[];for(const l of s){const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=l.trim(),a.appendChild(o)}return a}},"createLabel"),j=ir,nr=d((e,t,r,n,i)=>{t.arrowTypeStart&&Ot(e,"start",t.arrowTypeStart,r,n,i),t.arrowTypeEnd&&Ot(e,"end",t.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),lr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ot=d((e,t,r,n,i,a)=>{const s=lr[r];if(!s){L.warn(`Unknown arrow type: ${r}`);return}const l=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${i}_${a}-${s}${l})`)},"addEdgeMarker"),mt={},P={},cr=d((e,t)=>{const r=z(),n=Z(r.flowchart.htmlLabels),i=t.labelType==="markdown"?Yt(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):j(t.label,t.labelStyle),a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let l=i.getBBox();if(n){const f=i.children[0],h=R(i);l=f.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),mt[t.id]=a,t.width=l.width,t.height=l.height;let o;if(t.startLabelLeft){const f=j(t.startLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),P[t.id]||(P[t.id]={}),P[t.id].startLeft=h,et(o,t.startLabelLeft)}if(t.startLabelRight){const f=j(t.startLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=h.node().appendChild(f),y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),P[t.id]||(P[t.id]={}),P[t.id].startRight=h,et(o,t.startLabelRight)}if(t.endLabelLeft){const f=j(t.endLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),P[t.id]||(P[t.id]={}),P[t.id].endLeft=h,et(o,t.endLabelLeft)}if(t.endLabelRight){const f=j(t.endLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),P[t.id]||(P[t.id]={}),P[t.id].endRight=h,et(o,t.endLabelRight)}return i},"insertEdgeLabel");function et(e,t){z().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(et,"setTerminalWidth");var or=d((e,t)=>{L.debug("Moving label abc88 ",e.id,e.label,mt[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=z(),{subGraphTitleTotalMargin:i}=ge(n);if(e.label){const a=mt[e.id];let s=e.x,l=e.y;if(r){const o=tt.calcLabelPosition(r);L.debug("Moving label "+e.label+" from (",s,",",l,") to (",o.x,",",o.y,") abc88"),t.updatedPath&&(s=o.x,l=o.y)}a.attr("transform",`translate(${s}, ${l+i/2})`)}if(e.startLabelLeft){const a=P[e.id].startLeft;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.startLabelRight){const a=P[e.id].startRight;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelLeft){const a=P[e.id].endLeft;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelRight){const a=P[e.id].endRight;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),hr=d((e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),a=Math.abs(t.y-n),s=e.width/2,l=e.height/2;return i>=s||a>=l},"outsideNode"),dr=d((e,t,r)=>{L.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,a=Math.abs(n-r.x),s=e.width/2;let l=r.xMath.abs(n-t.x)*o){let y=r.y{L.debug("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(!hr(t,a)&&!i){const s=dr(t,n,a);let l=!1;r.forEach(o=>{l=l||o.x===s.x&&o.y===s.y}),r.some(o=>o.x===s.x&&o.y===s.y)||r.push(s),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),gr=d(function(e,t,r,n,i,a,s){let l=r.points;L.debug("abc88 InsertEdge: edge=",r,"e=",t);let o=!1;const f=a.node(t.v);var h=a.node(t.w);h!=null&&h.intersect&&(f!=null&&f.intersect)&&(l=l.slice(1,r.points.length-1),l.unshift(f.intersect(l[0])),l.push(h.intersect(l[l.length-1]))),r.toCluster&&(L.debug("to cluster abc88",n[r.toCluster]),l=Rt(r.points,n[r.toCluster].node),o=!0),r.fromCluster&&(L.debug("from cluster abc88",n[r.fromCluster]),l=Rt(l.reverse(),n[r.fromCluster].node).reverse(),o=!0);const y=l.filter(x=>!Number.isNaN(x.y));let b=be;r.curve&&(i==="graph"||i==="flowchart")&&(b=r.curve);const{x:m,y:E}=ue(r),D=pe().x(m).y(E).curve(b);let v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}const T=e.append("path").attr("d",D(y)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";(z().flowchart.arrowMarkerAbsolute||z().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),nr(T,r,k,s,i);let N={};return o&&(N.updatedPath=l),N.originalPath=r.points,N},"insertEdge"),ur=d(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),pr=d((e,t,r)=>{const n=ur(e),i=2,a=t.height+2*r.padding,s=a/i,l=t.width+2*s+r.padding,o=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:l/2,y:2*o},{x:l-s,y:0},{x:l,y:0},{x:l,y:-a/3},{x:l+2*o,y:-a/2},{x:l,y:-2*a/3},{x:l,y:-a},{x:l-s,y:-a},{x:l/2,y:-a-2*o},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*o,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:l-s,y:-a},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-s},{x:l,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:l,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a+o},{x:l/2,y:-a},{x:l,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o},{x:l,y:-o}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-s},{x:l,y:-a}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-a}]:n.has("right")?[{x:s,y:-o},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a+o}]:n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a+o},{x:l/2,y:-a},{x:l,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o},{x:l,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function qt(e,t){return e.intersect(t)}d(qt,"intersectNode");var fr=qt;function Jt(e,t,r,n){var i=e.x,a=e.y,s=i-n.x,l=a-n.y,o=Math.sqrt(t*t*l*l+r*r*s*s),f=Math.abs(t*r*s/o);n.x0}d(Lt,"sameSign");var yr=te,br=ee;function ee(e,t,r){var n=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(E){s=Math.min(s,E.x),l=Math.min(l,E.y)}):(s=Math.min(s,t.x),l=Math.min(l,t.y));for(var o=n-e.width/2-s,f=i-e.height/2-l,h=0;h1&&a.sort(function(E,D){var v=E.x-r.x,T=E.y-r.y,k=Math.sqrt(v*v+T*T),N=D.x-r.x,x=D.y-r.y,g=Math.sqrt(N*N+x*x);return k{var r=e.x,n=e.y,i=t.x-r,a=t.y-n,s=e.width/2,l=e.height/2,o,f;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),o=a===0?0:l*i/a,f=l):(i<0&&(s=-s),o=s,f=i===0?0:s*a/i),{x:r+o,y:n+f}},"intersectRect"),mr=wr,C={node:fr,circle:xr,ellipse:Qt,polygon:br,rect:mr},F=d(async(e,t,r,n)=>{const i=z();let a;const s=t.useHtmlLabels||Z(i.flowchart.htmlLabels);r?a=r:a="node default";const l=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=l.insert("g").attr("class","label").attr("style",t.labelStyle);let f;t.labelText===void 0?f="":f=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=o.node();let y;t.labelType==="markdown"?y=Yt(o,Tt(xt(f),i),{useHtmlLabels:s,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):y=h.appendChild(j(Tt(xt(f),i),t.labelStyle,!1,n));let b=y.getBBox();const m=t.padding/2;if(Z(i.flowchart.htmlLabels)){const E=y.children[0],D=R(y),v=E.getElementsByTagName("img");if(v){const T=f.replace(/]*>/g,"").trim()==="";await Promise.all([...v].map(k=>new Promise(N=>{function x(){if(k.style.display="flex",k.style.flexDirection="column",T){const g=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,w=parseInt(g,10)*5+"px";k.style.minWidth=w,k.style.maxWidth=w}else k.style.width="100%";N(k)}d(x,"setupImage"),setTimeout(()=>{k.complete&&x()}),k.addEventListener("error",x),k.addEventListener("load",x)})))}b=E.getBoundingClientRect(),D.attr("width",b.width),D.attr("height",b.height)}return s?o.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):o.attr("transform","translate(0, "+-b.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:l,bbox:b,halfPadding:m,label:o}},"labelHelper"),B=d((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");function G(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}d(G,"insertPolygonShape");var Lr=d(async(e,t)=>{t.useHtmlLabels||z().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:n,bbox:i,halfPadding:a}=await F(e,t,"node "+t.classes,!0);L.info("Classes = ",t.classes);const s=n.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+t.padding).attr("height",i.height+t.padding),B(t,s),t.intersect=function(l){return C.rect(t,l)},n},"note"),Sr=Lr,zt=d(e=>e?" "+e:"","formatClass"),K=d((e,t)=>`${t||"node default"}${zt(e.classes)} ${zt(e.class)}`,"getClassesFromNode"),At=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=i+a,l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];L.info("Question main (Circle)");const o=G(r,s,s,l);return o.attr("style",t.style),B(t,o),t.intersect=function(f){return L.warn("Intersect called"),C.polygon(t,l,f)},r},"question"),vr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return C.circle(t,14,s)},r},"choice"),Er=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=4,a=n.height+t.padding,s=a/i,l=n.width+2*s+t.padding,o=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],f=G(r,l,a,o);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return C.polygon(t,o,h)},r},"hexagon"),_r=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,void 0,!0),i=2,a=n.height+2*t.padding,s=a/i,l=n.width+2*s+t.padding,o=pr(t.directions,n,t),f=G(r,l,a,o);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return C.polygon(t,o,h)},r},"block_arrow"),kr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return G(r,i,a,s).attr("style",t.style),t.width=i+a,t.height=a,t.intersect=function(o){return C.polygon(t,s,o)},r},"rect_left_inv_arrow"),Dr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"lean_right"),Nr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"lean_left"),Tr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"trapezoid"),Cr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"inv_trapezoid"),Br=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"rect_right_inv_arrow"),Ir=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=i/2,s=a/(2.5+i/50),l=n.height+s+t.padding,o="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-l,f=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",o).attr("transform","translate("+-i/2+","+-(l/2+s)+")");return B(t,f),t.intersect=function(h){const y=C.rect(t,h),b=y.x-t.x;if(a!=0&&(Math.abs(b)t.height/2-s)){let m=s*s*(1-b*b/(a*a));m!=0&&(m=Math.sqrt(m)),m=s-m,h.y-t.y>0&&(m=-m),y.y+=m}return y},r},"cylinder"),Or=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes+" "+t.class,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,o=t.positioned?-s/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",f).attr("width",s).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ht(a,t.props.borders,s,l),h.delete("borders")),h.forEach(y=>{L.warn(`Unknown node property ${y}`)})}return B(t,a),t.intersect=function(h){return C.rect(t,h)},r},"rect"),Rr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,o=t.positioned?-s/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",f).attr("width",s).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ht(a,t.props.borders,s,l),h.delete("borders")),h.forEach(y=>{L.warn(`Unknown node property ${y}`)})}return B(t,a),t.intersect=function(h){return C.rect(t,h)},r},"composite"),zr=d(async(e,t)=>{const{shapeSvg:r}=await F(e,t,"label",!0);L.trace("Classes = ",t.class);const n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(ht(n,t.props.borders,i,a),s.delete("borders")),s.forEach(l=>{L.warn(`Unknown node property ${l}`)})}return B(t,n),t.intersect=function(s){return C.rect(t,s)},r},"labelRect");function ht(e,t,r,n){const i=[],a=d(l=>{i.push(l,0)},"addBorder"),s=d(l=>{i.push(0,l)},"skipBorder");t.includes("t")?(L.debug("add top border"),a(r)):s(r),t.includes("r")?(L.debug("add right border"),a(n)):s(n),t.includes("b")?(L.debug("add bottom border"),a(r)):s(r),t.includes("l")?(L.debug("add left border"),a(n)):s(n),e.attr("stroke-dasharray",i.join(" "))}d(ht,"applyNodePropertyBorders");var Ar=d((e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText;let o="";typeof l=="object"?o=l[0]:o=l,L.info("Label text abc79",o,l,typeof l=="object");const f=s.node().appendChild(j(o,t.labelStyle,!0,!0));let h={width:0,height:0};if(Z(z().flowchart.htmlLabels)){const D=f.children[0],v=R(f);h=D.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}L.info("Text 2",l);const y=l.slice(1,l.length);let b=f.getBBox();const m=s.node().appendChild(j(y.join?y.join("
    "):y,t.labelStyle,!0,!0));if(Z(z().flowchart.htmlLabels)){const D=m.children[0],v=R(m);h=D.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}const E=t.padding/2;return R(m).attr("transform","translate( "+(h.width>b.width?0:(b.width-h.width)/2)+", "+(b.height+E+5)+")"),R(f).attr("transform","translate( "+(h.width{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.height+t.padding,a=n.width+i/4+t.padding,s=r.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return B(t,s),t.intersect=function(l){return C.rect(t,l)},r},"stadium"),Fr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,K(t,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("Circle main"),B(t,a),t.intersect=function(s){return L.info("Circle intersect",t,n.width/2+i,s),C.circle(t,n.width/2+i,s)},r},"circle"),Wr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,K(t,void 0),!0),a=5,s=r.insert("g",":first-child"),l=s.insert("circle"),o=s.insert("circle");return s.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i+a).attr("width",n.width+t.padding+a*2).attr("height",n.height+t.padding+a*2),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("DoubleCircle main"),B(t,l),t.intersect=function(f){return L.info("DoubleCircle intersect",t,n.width/2+i+a,f),C.circle(t,n.width/2+i+a,f)},r},"doublecircle"),Pr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"subroutine"),Yr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),B(t,n),t.intersect=function(i){return C.circle(t,7,i)},r},"start"),Mt=d((e,t,r)=>{const n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,a=10;r==="LR"&&(i=10,a=70);const s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return B(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return C.rect(t,l)},n},"forkJoin"),Hr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),B(t,i),t.intersect=function(a){return C.circle(t,7,a)},r},"end"),Kr=d((e,t)=>{var S;const r=t.padding/2,n=4,i=8;let a;t.classes?a="node "+t.classes:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=s.insert("rect",":first-child"),o=s.insert("line"),f=s.insert("line");let h=0,y=n;const b=s.insert("g").attr("class","label");let m=0;const E=(S=t.classData.annotations)==null?void 0:S[0],D=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",v=b.node().appendChild(j(D,t.labelStyle,!0,!0));let T=v.getBBox();if(Z(z().flowchart.htmlLabels)){const c=v.children[0],_=R(v);T=c.getBoundingClientRect(),_.attr("width",T.width),_.attr("height",T.height)}t.classData.annotations[0]&&(y+=T.height+n,h+=T.width);let k=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(z().flowchart.htmlLabels?k+="<"+t.classData.type+">":k+="<"+t.classData.type+">");const N=b.node().appendChild(j(k,t.labelStyle,!0,!0));R(N).attr("class","classTitle");let x=N.getBBox();if(Z(z().flowchart.htmlLabels)){const c=N.children[0],_=R(N);x=c.getBoundingClientRect(),_.attr("width",x.width),_.attr("height",x.height)}y+=x.height+n,x.width>h&&(h=x.width);const g=[];t.classData.members.forEach(c=>{const _=c.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(//g,">"));const A=b.node().appendChild(j(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(Z(z().flowchart.htmlLabels)){const X=A.children[0],W=R(A);O=X.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}O.width>h&&(h=O.width),y+=O.height+n,g.push(A)}),y+=i;const u=[];if(t.classData.methods.forEach(c=>{const _=c.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(//g,">"));const A=b.node().appendChild(j(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(Z(z().flowchart.htmlLabels)){const X=A.children[0],W=R(A);O=X.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}O.width>h&&(h=O.width),y+=O.height+n,u.push(A)}),y+=i,E){let c=(h-T.width)/2;R(v).attr("transform","translate( "+(-1*h/2+c)+", "+-1*y/2+")"),m=T.height+n}let w=(h-x.width)/2;return R(N).attr("transform","translate( "+(-1*h/2+w)+", "+(-1*y/2+m)+")"),m+=x.height+n,o.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-y/2-r+i+m).attr("y2",-y/2-r+i+m),m+=i,g.forEach(c=>{R(c).attr("transform","translate( "+-h/2+", "+(-1*y/2+m+i/2)+")");const _=c==null?void 0:c.getBBox();m+=((_==null?void 0:_.height)??0)+n}),m+=i,f.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-y/2-r+i+m).attr("y2",-y/2-r+i+m),m+=i,u.forEach(c=>{R(c).attr("transform","translate( "+-h/2+", "+(-1*y/2+m)+")");const _=c==null?void 0:c.getBBox();m+=((_==null?void 0:_.height)??0)+n}),l.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(y/2)-r).attr("width",h+t.padding).attr("height",y+t.padding),B(t,l),t.intersect=function(c){return C.rect(t,c)},s},"class_box"),Ft={rhombus:At,composite:Rr,question:At,rect:Or,labelRect:zr,rectWithTitle:Ar,choice:vr,circle:Fr,doublecircle:Wr,stadium:Mr,hexagon:Er,block_arrow:_r,rect_left_inv_arrow:kr,lean_right:Dr,lean_left:Nr,trapezoid:Tr,inv_trapezoid:Cr,rect_right_inv_arrow:Br,cylinder:Ir,start:Yr,end:Hr,note:Sr,subroutine:Pr,fork:Mt,join:Mt,class_box:Kr},lt={},re=d(async(e,t,r)=>{let n,i;if(t.link){let a;z().securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a),i=await Ft[t.shape](n,t,r)}else i=await Ft[t.shape](e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),lt[t.id]=n,t.haveCallback&<[t.id].attr("class",lt[t.id].attr("class")+" clickable"),n},"insertNode"),Xr=d(e=>{const t=lt[e.id];L.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function kt(e,t,r=!1){var b,m,E;const n=e;let i="default";(((b=n==null?void 0:n.classes)==null?void 0:b.length)||0)>0&&(i=((n==null?void 0:n.classes)??[]).join(" ")),i=i+" flowchart-label";let a=0,s="",l;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",l=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}const o=de((n==null?void 0:n.styles)??[]),f=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:o.labelStyle,shape:s,labelText:f,rx:a,ry:a,class:i,style:o.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:l??((E=(m=at())==null?void 0:m.block)==null?void 0:E.padding)??0}}d(kt,"getNodeFromBlock");async function ae(e,t,r){const n=kt(t,r,!1);if(n.type==="group")return;const i=at(),a=await re(e,n,{config:i}),s=a.node().getBBox(),l=r.getBlock(n.id);l.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(l),a.remove()}d(ae,"calculateBlockSize");async function se(e,t,r){const n=kt(t,r,!0);if(r.getBlock(n.id).type!=="space"){const a=at();await re(e,n,{config:a}),t.intersect=n==null?void 0:n.intersect,Xr(n)}}d(se,"insertBlockPositioned");async function dt(e,t,r,n){for(const i of t)await n(e,i,r),i.children&&await dt(e,i.children,r,n)}d(dt,"performOperations");async function ie(e,t,r){await dt(e,t,r,ae)}d(ie,"calculateBlockSizes");async function ne(e,t,r){await dt(e,t,r,se)}d(ne,"insertBlocks");async function le(e,t,r,n,i){const a=new Se({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of t)if(s.start&&s.end){const l=n.getBlock(s.start),o=n.getBlock(s.end);if(l!=null&&l.size&&(o!=null&&o.size)){const f=l.size,h=o.size,y=[{x:f.x,y:f.y},{x:f.x+(h.x-f.x)/2,y:f.y+(h.y-f.y)/2},{x:h.x,y:h.y}];gr(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await cr(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),or({...s,x:y[1].x,y:y[1].y},{originalPath:y}))}}}d(le,"insertEdges");var Ur=d(function(e,t){return t.db.getClasses()},"getClasses"),jr=d(async function(e,t,r,n){const{securityLevel:i,block:a}=at(),s=n.db;let l;i==="sandbox"&&(l=R("#i"+t));const o=i==="sandbox"?R(l.nodes()[0].contentDocument.body):R("body"),f=i==="sandbox"?o.select(`[id="${t}"]`):R(`[id="${t}"]`);ar(f,["point","circle","cross"],n.type,t);const y=s.getBlocks(),b=s.getBlocksFlat(),m=s.getEdges(),E=f.insert("g").attr("class","block");await ie(E,y,s);const D=Gt(s);if(await ne(E,y,s),await le(E,m,b,s,t),D){const v=D,T=Math.max(1,Math.round(.125*(v.width/v.height))),k=v.height+T+10,N=v.width+10,{useMaxWidth:x}=a;fe(f,k,N,!!x),L.debug("Here Bounds",D,v),f.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),Vr={draw:jr,getClasses:Ur},ea={parser:Ee,db:Ke,renderer:Vr,styles:Ue};export{ea as diagram}; diff --git a/assets/chunks/buttons.esm.DK2fWHEW.js b/assets/chunks/buttons.esm.DK2fWHEW.js new file mode 100644 index 00000000..0fc62bb7 --- /dev/null +++ b/assets/chunks/buttons.esm.DK2fWHEW.js @@ -0,0 +1,5 @@ +/*! + * github-buttons v2.29.1 + * (c) 2024 なつき + * @license BSD-2-Clause + */var C=window.document,p=window.Math,k=window.HTMLElement,b=window.XMLHttpRequest,F=function(e,t){for(var r=0,o=e.length;r
    '}}},download:{heights:{16:{width:16,path:''}}},eye:{heights:{16:{width:16,path:''}}},heart:{heights:{16:{width:16,path:''}}},"issue-opened":{heights:{16:{width:16,path:''}}},"mark-github":{heights:{16:{width:16,path:''}}},package:{heights:{16:{width:16,path:''}}},play:{heights:{16:{width:16,path:''}}},"repo-forked":{heights:{16:{width:16,path:''}}},"repo-template":{heights:{16:{width:16,path:''}}},star:{heights:{16:{width:16,path:''}}}},oe=function(e,t){e=Z(e).replace(/^octicon-/,""),m(x,e)||(e="mark-github");var r=t>=24&&24 in x[e].heights?24:16,o=x[e].heights[r];return'"},y={},re=function(e,t){var r=y[e]||(y[e]=[]);if(!(r.push(t)>1)){var o=V(function(){for(delete y[e];t=r.shift();)t.apply(null,arguments)});if(H){var a=new b;f(a,"abort",o),f(a,"error",o),f(a,"load",function(){var s;try{s=JSON.parse(this.responseText)}catch(d){o(d);return}o(this.status!==200,s)}),a.open("GET",e),a.send()}else{var n=this||window;n._=function(s){n._=null,o(s.meta.status!==200,s.data)};var c=A(n.document)("script",{async:!0,src:e+(e.indexOf("?")!==-1?"&":"?")+"callback=_"}),l=function(){n._&&n._({meta:{}})};f(c,"load",l),f(c,"error",l),$(c,/de|m/,l),n.document.getElementsByTagName("head")[0].appendChild(c)}}},T=function(e,t,r){var o=A(e.ownerDocument),a=e.appendChild(o("style",{type:"text/css"})),n=J+te(t["data-color-scheme"]);a.styleSheet?a.styleSheet.cssText=n:a.appendChild(e.ownerDocument.createTextNode(n));var c=Z(t["data-size"])==="large",l=o("a",{className:"btn",href:t.href,rel:"noopener",target:"_blank",title:t.title||void 0,"aria-label":t["aria-label"]||void 0,innerHTML:oe(t["data-icon"],c?16:14)+" "},[o("span",{},[t["data-text"]||""])]),s=e.appendChild(o("div",{className:"widget"+(c?" widget-lg":"")},[l])),d=l.hostname.replace(/\.$/,"");if(("."+d).substring(d.length-u.length)!=="."+u){l.removeAttribute("href"),r(s);return}var i=(" /"+l.pathname).split(/\/+/);if(((d===u||d==="gist."+u)&&i[3]==="archive"||d===u&&i[3]==="releases"&&(i[4]==="download"||i[4]==="latest"&&i[5]==="download")||d==="codeload."+u)&&(l.target="_top"),Z(t["data-show-count"])!=="true"||d!==u||i[1]==="marketplace"||i[1]==="sponsors"||i[1]==="orgs"||i[1]==="users"||i[1]==="-"){r(s);return}var v,h;if(!i[2]&&i[1])h="followers",v="?tab=followers";else if(!i[3]&&i[2])h="stargazers_count",v="/stargazers";else if(!i[4]&&i[3]==="subscription")h="subscribers_count",v="/watchers";else if(!i[4]&&i[3]==="fork")h="forks_count",v="/forks";else if(i[3]==="issues")h="open_issues_count",v="/issues";else{r(s);return}var D=i[2]?"/repos/"+i[1]+"/"+i[2]:"/users/"+i[1];re.call(this,P+D,function(B,L){if(!B){var w=L[h];s.appendChild(o("a",{className:"social-count",href:L.html_url+v,rel:"noopener",target:"_blank","aria-label":w+" "+h.replace(/_count$/,"").replace("_"," ").slice(0,w<2?-1:void 0)+" on GitHub"},[(""+w).replace(/\B(?=(\d{3})+(?!\d))/g,",")]))}r(s)})},M=window.devicePixelRatio||1,z=function(e){return(M>1?p.ceil(p.round(e*M)/M*2)/2:p.ceil(e))||0},ae=function(e){var t=e.offsetWidth,r=e.offsetHeight;if(e.getBoundingClientRect){var o=e.getBoundingClientRect();t=p.max(t,z(o.width)),r=p.max(r,z(o.height))}return[t,r]},S=function(e,t){e.style.width=t[0]+"px",e.style.height=t[1]+"px"},ne=function(e,t){if(!(e==null||t==null))if(e.getAttribute&&(e=q(e)),R){var r=_("span");T(r.attachShadow({mode:"closed"}),e,function(){t(r)})}else{var o=_("iframe",{src:"javascript:0",title:e.title||void 0,allowtransparency:!0,scrolling:"no",frameBorder:0});S(o,[0,0]),o.style.border="none",o.style.colorScheme="light";var a=function(){var n=o.contentWindow,c;try{c=n.document.body}catch{C.body.appendChild(o.parentNode.removeChild(o));return}E(o,"load",a),T.call(n,c,e,function(l){var s=ae(l);o.parentNode.removeChild(o),I(o,"load",function(){S(o,s)}),o.src=N+"#"+(o.name=W(e)),t(o)})};f(o,"load",a),C.body.appendChild(o)}};export{ne as render}; diff --git a/assets/chunks/c4Diagram-6F5ED5ID.B8JqF2R5.js b/assets/chunks/c4Diagram-6F5ED5ID.B8JqF2R5.js new file mode 100644 index 00000000..a6634aa6 --- /dev/null +++ b/assets/chunks/c4Diagram-6F5ED5ID.B8JqF2R5.js @@ -0,0 +1,10 @@ +import{d as Se,g as De}from"./chunk-ASOPGD6M.9xhfAZUp.js";import{_ as g,a as Pe,s as Be,g as Ie,b as Me,c as Le,d as Bt,w as Ne,e as $t,f as de,h as Tt,i as ge,j as jt,l as fe,k as Ye,m as je}from"../app.CXGmg8Jv.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";var Ft=function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(St,[2,19]),e(St,[2,20]),{25:[1,78]},{27:[1,79]},e(St,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(St,[2,21]),e(St,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Dt[At]&&Dt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`: +`+D.showPosition()+` +Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+I);switch(N[0]){case 1:v.push(I),R.push(D.yytext),h.push(D.yylloc),v.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,kt.yy,N[1],R,h].concat(Te)),typeof Jt<"u")return Jt;W&&(v=v.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),v.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Dt[v[v.length-2]][v[v.length-1]],v.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=function(){var _t={EOF:1,parseError:g(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:g(function(x,m){return this.yy=m||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var m=x.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:g(function(x){var m=x.length,v=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===b.length?this.yylloc.first_column:0)+b[b.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(x){this.unput(this.match.slice(x))},"less"),pastInput:g(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var x=this.pastInput(),m=new Array(x.length+1).join("-");return x+this.upcomingInput()+` +`+m+"^"},"showPosition"),test_match:g(function(x,m){var v,b,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),b=x[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],v=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var h in R)this[h]=R[h];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,m,v,b;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),h=0;hm[0].length)){if(m=v,b=h,this.options.backtrack_lexer){if(x=this.test_match(v,R[h]),x!==!1)return x;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(x=this.test_match(m,R[b]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var m=this.next();return m||this.lex()},"lex"),begin:g(function(m){this.conditionStack.push(m)},"begin"),popState:g(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:g(function(m){this.begin(m)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(m,v,b,R){switch(b){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t}();qt.lexer=Ce;function Lt(){this.yy={}}return g(Lt,"Parser"),Lt.prototype=qt,qt.Parser=Lt,new Lt}();Ft.parser=Ft;var Ue=Ft,V=[],xt=[""],B="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],It=[],ie="",ne=!1,Vt=4,zt=2,be,Fe=g(function(){return be},"getC4Type"),Ve=g(function(e){be=ge(e,Bt())},"setC4Type"),ze=g(function(e,t,s,o,l,a,r,n,i){if(e==null||t===void 0||t===null||s===void 0||s===null||o===void 0||o===null)return;let u={};const d=It.find(f=>f.from===t&&f.to===s);if(d?u=d:It.push(u),u.type=e,u.from=t,u.to=s,u.label={text:o},l==null)u.techn={text:""};else if(typeof l=="object"){let[f,y]=Object.entries(l)[0];u[f]={text:y}}else u.techn={text:l};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[f,y]=Object.entries(a)[0];u[f]={text:y}}else u.descr={text:a};if(typeof r=="object"){let[f,y]=Object.entries(r)[0];u[f]=y}else u.sprite=r;if(typeof n=="object"){let[f,y]=Object.entries(n)[0];u[f]=y}else u.tags=n;if(typeof i=="object"){let[f,y]=Object.entries(i)[0];u[f]=y}else u.link=i;u.wrap=mt()},"addRel"),Xe=g(function(e,t,s,o,l,a,r){if(t===null||s===null)return;let n={};const i=V.find(u=>u.alias===t);if(i&&t===i.alias?n=i:(n.alias=t,V.push(n)),s==null?n.label={text:""}:n.label={text:s},o==null)n.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];n[u]={text:d}}else n.descr={text:o};if(typeof l=="object"){let[u,d]=Object.entries(l)[0];n[u]=d}else n.sprite=l;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];n[u]=d}else n.tags=a;if(typeof r=="object"){let[u,d]=Object.entries(r)[0];n[u]=d}else n.link=r;n.typeC4Shape={text:e},n.parentBoundary=B,n.wrap=mt()},"addPersonOrSystem"),We=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];i[d]=f}else i.sprite=a;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addContainer"),Qe=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];i[d]=f}else i.sprite=a;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addComponent"),He=g(function(e,t,s,o,l){if(e===null||t===null)return;let a={};const r=X.find(n=>n.alias===e);if(r&&e===r.alias?a=r:(a.alias=e,X.push(a)),t==null?a.label={text:""}:a.label={text:t},s==null)a.type={text:"system"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];a[n]={text:i}}else a.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];a[n]=i}else a.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];a[n]=i}else a.link=l;a.parentBoundary=B,a.wrap=mt(),F=B,B=e,xt.push(F)},"addPersonOrSystemBoundary"),qe=g(function(e,t,s,o,l){if(e===null||t===null)return;let a={};const r=X.find(n=>n.alias===e);if(r&&e===r.alias?a=r:(a.alias=e,X.push(a)),t==null?a.label={text:""}:a.label={text:t},s==null)a.type={text:"container"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];a[n]={text:i}}else a.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];a[n]=i}else a.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];a[n]=i}else a.link=l;a.parentBoundary=B,a.wrap=mt(),F=B,B=e,xt.push(F)},"addContainerBoundary"),Ge=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=X.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,X.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.type={text:"node"};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.type={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.nodeType=e,i.parentBoundary=B,i.wrap=mt(),F=B,B=t,xt.push(F)},"addDeploymentNode"),Ke=g(function(){B=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),Je=g(function(e,t,s,o,l,a,r,n,i,u,d){let f=V.find(y=>y.alias===t);if(!(f===void 0&&(f=X.find(y=>y.alias===t),f===void 0))){if(s!=null)if(typeof s=="object"){let[y,E]=Object.entries(s)[0];f[y]=E}else f.bgColor=s;if(o!=null)if(typeof o=="object"){let[y,E]=Object.entries(o)[0];f[y]=E}else f.fontColor=o;if(l!=null)if(typeof l=="object"){let[y,E]=Object.entries(l)[0];f[y]=E}else f.borderColor=l;if(a!=null)if(typeof a=="object"){let[y,E]=Object.entries(a)[0];f[y]=E}else f.shadowing=a;if(r!=null)if(typeof r=="object"){let[y,E]=Object.entries(r)[0];f[y]=E}else f.shape=r;if(n!=null)if(typeof n=="object"){let[y,E]=Object.entries(n)[0];f[y]=E}else f.sprite=n;if(i!=null)if(typeof i=="object"){let[y,E]=Object.entries(i)[0];f[y]=E}else f.techn=i;if(u!=null)if(typeof u=="object"){let[y,E]=Object.entries(u)[0];f[y]=E}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[y,E]=Object.entries(d)[0];f[y]=E}else f.legendSprite=d}},"updateElStyle"),Ze=g(function(e,t,s,o,l,a,r){const n=It.find(i=>i.from===t&&i.to===s);if(n!==void 0){if(o!=null)if(typeof o=="object"){let[i,u]=Object.entries(o)[0];n[i]=u}else n.textColor=o;if(l!=null)if(typeof l=="object"){let[i,u]=Object.entries(l)[0];n[i]=u}else n.lineColor=l;if(a!=null)if(typeof a=="object"){let[i,u]=Object.entries(a)[0];n[i]=parseInt(u)}else n.offsetX=parseInt(a);if(r!=null)if(typeof r=="object"){let[i,u]=Object.entries(r)[0];n[i]=parseInt(u)}else n.offsetY=parseInt(r)}},"updateRelStyle"),$e=g(function(e,t,s){let o=Vt,l=zt;if(typeof t=="object"){const a=Object.values(t)[0];o=parseInt(a)}else o=parseInt(t);if(typeof s=="object"){const a=Object.values(s)[0];l=parseInt(a)}else l=parseInt(s);o>=1&&(Vt=o),l>=1&&(zt=l)},"updateLayoutConfig"),t0=g(function(){return Vt},"getC4ShapeInRow"),e0=g(function(){return zt},"getC4BoundaryInRow"),a0=g(function(){return B},"getCurrentBoundaryParse"),i0=g(function(){return F},"getParentBoundaryParse"),_e=g(function(e){return e==null?V:V.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),n0=g(function(e){return V.find(t=>t.alias===e)},"getC4Shape"),r0=g(function(e){return Object.keys(_e(e))},"getC4ShapeKeys"),xe=g(function(e){return e==null?X:X.filter(t=>t.parentBoundary===e)},"getBoundaries"),s0=xe,l0=g(function(){return It},"getRels"),o0=g(function(){return ie},"getTitle"),c0=g(function(e){ne=e},"setWrap"),mt=g(function(){return ne},"autoWrap"),h0=g(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",B="global",xt=[""],It=[],xt=[""],ie="",ne=!1,Vt=4,zt=2},"clear"),u0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},d0={FILLED:0,OPEN:1},f0={LEFTOF:0,RIGHTOF:1,OVER:2},p0=g(function(e){ie=ge(e,Bt())},"setTitle"),te={addPersonOrSystem:Xe,addPersonOrSystemBoundary:He,addContainer:We,addContainerBoundary:qe,addComponent:Qe,addDeploymentNode:Ge,popBoundaryParseStack:Ke,addRel:ze,updateElStyle:Je,updateRelStyle:Ze,updateLayoutConfig:$e,autoWrap:mt,setWrap:c0,getC4ShapeArray:_e,getC4Shape:n0,getC4ShapeKeys:r0,getBoundaries:xe,getBoundarys:s0,getCurrentBoundaryParse:a0,getParentBoundaryParse:i0,getRels:l0,getTitle:o0,getC4Type:Fe,getC4ShapeInRow:t0,getC4BoundaryInRow:e0,setAccTitle:Be,getAccTitle:Ie,getAccDescription:Me,setAccDescription:Le,getConfig:g(()=>Bt().c4,"getConfig"),clear:h0,LINETYPE:u0,ARROWTYPE:d0,PLACEMENT:f0,setTitle:p0,setC4Type:Ve},re=g(function(e,t){return Se(e,t)},"drawRect"),me=g(function(e,t,s,o,l,a){const r=e.append("image");r.attr("width",t),r.attr("height",s),r.attr("x",o),r.attr("y",l);let n=a.startsWith("data:image/png;base64")?a:je(a);r.attr("xlink:href",n)},"drawImage"),y0=g((e,t,s)=>{const o=e.append("g");let l=0;for(let a of t){let r=a.textColor?a.textColor:"#444444",n=a.lineColor?a.lineColor:"#444444",i=a.offsetX?parseInt(a.offsetX):0,u=a.offsetY?parseInt(a.offsetY):0,d="";if(l===0){let y=o.append("line");y.attr("x1",a.startPoint.x),y.attr("y1",a.startPoint.y),y.attr("x2",a.endPoint.x),y.attr("y2",a.endPoint.y),y.attr("stroke-width","1"),y.attr("stroke",n),y.style("fill","none"),a.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)"),l=-1}else{let y=o.append("path");y.attr("fill","none").attr("stroke-width","1").attr("stroke",n).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)")}let f=s.messageFont();Q(s)(a.label.text,o,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+i,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+u,a.label.width,a.label.height,{fill:r},f),a.techn&&a.techn.text!==""&&(f=s.messageFont(),Q(s)("["+a.techn.text+"]",o,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+i,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+s.messageFontSize+5+u,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:r,"font-style":"italic"},f))}},"drawRels"),g0=g(function(e,t,s){const o=e.append("g");let l=t.bgColor?t.bgColor:"none",a=t.borderColor?t.borderColor:"#444444",r=t.fontColor?t.fontColor:"black",n={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(n={"stroke-width":1});let i={x:t.x,y:t.y,fill:l,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:n};re(o,i);let u=s.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=r,Q(s)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=s.boundaryFont(),u.fontColor=r,Q(s)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=s.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=r,Q(s)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),b0=g(function(e,t,s){var f;let o=t.bgColor?t.bgColor:s[t.typeC4Shape.text+"_bg_color"],l=t.borderColor?t.borderColor:s[t.typeC4Shape.text+"_border_color"],a=t.fontColor?t.fontColor:"#FFFFFF",r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const n=e.append("g");n.attr("class","person-man");const i=De();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":i.x=t.x,i.y=t.y,i.fill=o,i.width=t.width,i.height=t.height,i.stroke=l,i.rx=2.5,i.ry=2.5,i.attrs={"stroke-width":.5},re(n,i);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=w0(s,t.typeC4Shape.text);switch(n.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":me(n,48,48,t.x+t.width/2-24,t.y+t.image.Y,r);break}let d=s[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=a,Q(s)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},d),d=s[t.typeC4Shape.text+"Font"](),d.fontColor=a,t.techn&&((f=t.techn)==null?void 0:f.text)!==""?Q(s)(t.techn.text,n,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(s)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=s.personFont(),d.fontColor=a,Q(s)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},d)),t.height},"drawC4Shape"),_0=g(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),x0=g(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),m0=g(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),v0=g(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),E0=g(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),k0=g(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),A0=g(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),C0=g(function(e){const s=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);s.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),s.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),w0=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Q=function(){function e(l,a,r,n,i,u,d){const f=a.append("text").attr("x",r+i/2).attr("y",n+u/2+5).style("text-anchor","middle").text(l);o(f,d)}g(e,"byText");function t(l,a,r,n,i,u,d,f){const{fontSize:y,fontFamily:E,fontWeight:O}=f,S=l.split($t.lineBreakRegex);for(let P=0;P=this.data.widthLimit||o>=this.data.widthLimit||this.nextData.cnt>ve)&&(s=this.nextData.startx+t.margin+_.nextLinePaddingX,l=this.nextData.stopy+t.margin*2,this.nextData.stopx=o=s+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=l+t.height,this.nextData.cnt=1),t.x=s,t.y=l,this.updateVal(this.data,"startx",s,Math.min),this.updateVal(this.data,"starty",l,Math.min),this.updateVal(this.data,"stopx",o,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",s,Math.min),this.updateVal(this.nextData,"starty",l,Math.min),this.updateVal(this.nextData,"stopx",o,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},ae(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},g(Ot,"Bounds"),Ot),ae=g(function(e){Pe(_,e),e.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=e.fontFamily),e.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=e.fontSize),e.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=e.fontWeight)},"setConf"),Pt=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),Ut=g(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),T0=g(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function j(e,t,s,o,l){if(!t[e].width)if(s)t[e].text=Ne(t[e].text,l,o),t[e].textLines=t[e].text.split($t.lineBreakRegex).length,t[e].width=l,t[e].height=de(t[e].text,o);else{let a=t[e].text.split($t.lineBreakRegex);t[e].textLines=a.length;let r=0;t[e].height=0,t[e].width=0;for(const n of a)t[e].width=Math.max(Tt(n,o),t[e].width),r=de(n,o),t[e].height=t[e].height+r}}g(j,"calcC4ShapeTextWH");var ke=g(function(e,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,l=Ut(_);l.fontSize=l.fontSize+2,l.fontWeight="bold";let a=Tt(t.label.text,l);j("label",t,o,l,a),z.drawBoundary(e,t,_)},"drawBoundary"),Ae=g(function(e,t,s,o){let l=0;for(const a of o){l=0;const r=s[a];let n=Pt(_,r.typeC4Shape.text);switch(n.fontSize=n.fontSize-2,r.typeC4Shape.width=Tt("«"+r.typeC4Shape.text+"»",n),r.typeC4Shape.height=n.fontSize+2,r.typeC4Shape.Y=_.c4ShapePadding,l=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height;break}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height);let i=r.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=Pt(_,r.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",r,i,d,u),r.label.Y=l+8,l=r.label.Y+r.label.height,r.type&&r.type.text!==""){r.type.text="["+r.type.text+"]";let E=Pt(_,r.typeC4Shape.text);j("type",r,i,E,u),r.type.Y=l+5,l=r.type.Y+r.type.height}else if(r.techn&&r.techn.text!==""){r.techn.text="["+r.techn.text+"]";let E=Pt(_,r.techn.text);j("techn",r,i,E,u),r.techn.Y=l+5,l=r.techn.Y+r.techn.height}let f=l,y=r.label.width;if(r.descr&&r.descr.text!==""){let E=Pt(_,r.typeC4Shape.text);j("descr",r,i,E,u),r.descr.Y=l+20,l=r.descr.Y+r.descr.height,y=Math.max(r.label.width,r.descr.width),f=l-r.descr.textLines*5}y=y+_.c4ShapePadding,r.width=Math.max(r.width||_.width,y,_.width),r.height=Math.max(r.height||_.height,f,_.height),r.margin=r.margin||_.c4ShapeMargin,e.insert(r),z.drawC4Shape(t,r,_)}e.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Rt,Y=(Rt=class{constructor(t,s){this.x=t,this.y=s}},g(Rt,"Point"),Rt),pe=g(function(e,t){let s=e.x,o=e.y,l=t.x,a=t.y,r=s+e.width/2,n=o+e.height/2,i=Math.abs(s-l),u=Math.abs(o-a),d=u/i,f=e.height/e.width,y=null;return o==a&&sl?y=new Y(s,n):s==l&&oa&&(y=new Y(r,o)),s>l&&o=d?y=new Y(s,n+d*e.width/2):y=new Y(r-i/u*e.height/2,o+e.height):s=d?y=new Y(s+e.width,n+d*e.width/2):y=new Y(r+i/u*e.height/2,o+e.height):sa?f>=d?y=new Y(s+e.width,n-d*e.width/2):y=new Y(r+e.height/2*i/u,o):s>l&&o>a&&(f>=d?y=new Y(s,n-e.width/2*d):y=new Y(r-e.height/2*i/u,o)),y},"getIntersectPoint"),O0=g(function(e,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let o=pe(e,s);s.x=e.x+e.width/2,s.y=e.y+e.height/2;let l=pe(t,s);return{startPoint:o,endPoint:l}},"getIntersectPoints"),R0=g(function(e,t,s,o){let l=0;for(let a of t){l=l+1;let r=a.wrap&&_.wrap,n=T0(_);o.db.getC4Type()==="C4Dynamic"&&(a.label.text=l+": "+a.label.text);let u=Tt(a.label.text,n);j("label",a,r,n,u),a.techn&&a.techn.text!==""&&(u=Tt(a.techn.text,n),j("techn",a,r,n,u)),a.descr&&a.descr.text!==""&&(u=Tt(a.descr.text,n),j("descr",a,r,n,u));let d=s(a.from),f=s(a.to),y=O0(d,f);a.startPoint=y.startPoint,a.endPoint=y.endPoint}z.drawRels(e,t,_)},"drawRels");function se(e,t,s,o,l){let a=new Ee(l);a.data.widthLimit=s.data.widthLimit/Math.min(ee,o.length);for(let[r,n]of o.entries()){let i=0;n.image={width:0,height:0,Y:0},n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height);let u=n.wrap&&_.wrap,d=Ut(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",n,u,d,a.data.widthLimit),n.label.Y=i+8,i=n.label.Y+n.label.height,n.type&&n.type.text!==""){n.type.text="["+n.type.text+"]";let O=Ut(_);j("type",n,u,O,a.data.widthLimit),n.type.Y=i+5,i=n.type.Y+n.type.height}if(n.descr&&n.descr.text!==""){let O=Ut(_);O.fontSize=O.fontSize-2,j("descr",n,u,O,a.data.widthLimit),n.descr.Y=i+20,i=n.descr.Y+n.descr.height}if(r==0||r%ee===0){let O=s.data.startx+_.diagramMarginX,S=s.data.stopy+_.diagramMarginY+i;a.setData(O,O,S,S)}else{let O=a.data.stopx!==a.data.startx?a.data.stopx+_.diagramMarginX:a.data.startx,S=a.data.starty;a.setData(O,O,S,S)}a.name=n.alias;let f=l.db.getC4ShapeArray(n.alias),y=l.db.getC4ShapeKeys(n.alias);y.length>0&&Ae(a,e,f,y),t=n.alias;let E=l.db.getBoundarys(t);E.length>0&&se(e,t,a,E,l),n.alias!=="global"&&ke(e,n,a),s.data.stopy=Math.max(a.data.stopy+_.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(a.data.stopx+_.c4ShapeMargin,s.data.stopx),Xt=Math.max(Xt,s.data.stopx),Wt=Math.max(Wt,s.data.stopy)}}g(se,"drawInsideBoundary");var S0=g(function(e,t,s,o){_=Bt().c4;const l=Bt().securityLevel;let a;l==="sandbox"&&(a=jt("#i"+t));const r=l==="sandbox"?jt(a.nodes()[0].contentDocument.body):jt("body");let n=o.db;o.db.setWrap(_.wrap),ve=n.getC4ShapeInRow(),ee=n.getC4BoundaryInRow(),fe.debug(`C:${JSON.stringify(_,null,2)}`);const i=l==="sandbox"?r.select(`[id="${t}"]`):jt(`[id="${t}"]`);z.insertComputerIcon(i),z.insertDatabaseIcon(i),z.insertClockIcon(i);let u=new Ee(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,Xt=_.diagramMarginX,Wt=_.diagramMarginY;const d=o.db.getTitle();let f=o.db.getBoundarys("");se(i,"",u,f,o),z.insertArrowHead(i),z.insertArrowEnd(i),z.insertArrowCrossHead(i),z.insertArrowFilledHead(i),R0(i,o.db.getRels(),o.db.getC4Shape,o),u.data.stopx=Xt,u.data.stopy=Wt;const y=u.data;let O=y.stopy-y.starty+2*_.diagramMarginY;const P=y.stopx-y.startx+2*_.diagramMarginX;d&&i.append("text").text(d).attr("x",(y.stopx-y.startx)/2-4*_.diagramMarginX).attr("y",y.starty+_.diagramMarginY),Ye(i,O,P,_.useMaxWidth);const M=d?60:0;i.attr("viewBox",y.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),fe.debug("models:",y)},"draw"),ye={drawPersonOrSystemArray:Ae,drawBoundary:ke,setConf:ae,draw:S0},D0=g(e=>`.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; + } +`,"getStyles"),P0=D0,N0={parser:Ue,db:te,renderer:ye,styles:P0,init:g(({c4:e,wrap:t})=>{ye.setConf(e),te.setWrap(t)},"init")};export{N0 as diagram}; diff --git a/assets/chunks/channel.w7CYfGuh.js b/assets/chunks/channel.w7CYfGuh.js new file mode 100644 index 00000000..f5b4875a --- /dev/null +++ b/assets/chunks/channel.w7CYfGuh.js @@ -0,0 +1 @@ +import{U as a,C as n}from"../app.CXGmg8Jv.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/assets/chunks/chunk-5HRBRIJM.CiC8nwb0.js b/assets/chunks/chunk-5HRBRIJM.CiC8nwb0.js new file mode 100644 index 00000000..25010b02 --- /dev/null +++ b/assets/chunks/chunk-5HRBRIJM.CiC8nwb0.js @@ -0,0 +1 @@ +import{_ as n,j as r,k as g,l as d}from"../app.CXGmg8Jv.js";var u=n((t,e)=>{let o;return e==="sandbox"&&(o=r("#i"+t)),(e==="sandbox"?r(o.nodes()[0].contentDocument.body):r("body")).select(`[id="${t}"]`)},"getDiagramElement"),b=n((t,e,o,i)=>{t.attr("class",o);const{width:a,height:s,x:h,y:x}=l(t,e);g(t,s,a,i);const c=w(h,x,a,s,e);t.attr("viewBox",c),d.debug(`viewBox configured: ${c} with padding: ${e}`)},"setupViewPortForSVG"),l=n((t,e)=>{var i;const o=((i=t.node())==null?void 0:i.getBBox())||{width:0,height:0,x:0,y:0};return{width:o.width+e*2,height:o.height+e*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),w=n((t,e,o,i,a)=>`${t-a} ${e-a} ${o} ${i}`,"createViewBox");export{u as g,b as s}; diff --git a/assets/chunks/chunk-7U56Z5CX.BNSSxKI9.js b/assets/chunks/chunk-7U56Z5CX.BNSSxKI9.js new file mode 100644 index 00000000..86247e1d --- /dev/null +++ b/assets/chunks/chunk-7U56Z5CX.BNSSxKI9.js @@ -0,0 +1,220 @@ +import{g as De,s as Ce}from"./chunk-5HRBRIJM.CiC8nwb0.js";import{_ as r,e as H,d as x,g as xe,s as Ae,b as Le,c as Ie,q as Re,r as Oe,l as b,A as Ne,v as we,x as $e,a9 as Pe}from"../app.CXGmg8Jv.js";var Ot=function(){var t=r(function($,o,u,n){for(u=u||{},n=$.length;n--;u[$[n]]=o);return u},"o"),e=[1,2],c=[1,3],a=[1,4],d=[2,4],s=[1,9],p=[1,11],g=[1,16],l=[1,17],_=[1,18],v=[1,19],A=[1,32],B=[1,20],Y=[1,21],I=[1,22],f=[1,23],L=[1,24],R=[1,26],F=[1,27],V=[1,28],N=[1,29],w=[1,30],rt=[1,31],at=[1,34],nt=[1,35],lt=[1,36],ot=[1,37],J=[1,33],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],Vt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],kt={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:r(function(o,u,n,y,T,i,q){var h=i.length-1;switch(T){case 3:return y.setRootDoc(i[h]),i[h];case 4:this.$=[];break;case 5:i[h]!="nl"&&(i[h-1].push(i[h]),this.$=i[h-1]);break;case 6:case 7:this.$=i[h];break;case 8:this.$="nl";break;case 12:this.$=i[h];break;case 13:const Q=i[h-1];Q.description=y.trimColon(i[h]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[h-2],state2:i[h]};break;case 15:const Dt=y.trimColon(i[h]);this.$={stmt:"relation",state1:i[h-3],state2:i[h-1],description:Dt};break;case 19:this.$={stmt:"state",id:i[h-3],type:"default",description:"",doc:i[h-1]};break;case 20:var M=i[h],W=i[h-2].trim();if(i[h].match(":")){var ht=i[h].split(":");M=ht[0],W=[W,ht[1]]}this.$={stmt:"state",id:M,type:"default",description:W};break;case 21:this.$={stmt:"state",id:i[h-3],type:"default",description:i[h-5],doc:i[h-1]};break;case 22:this.$={stmt:"state",id:i[h],type:"fork"};break;case 23:this.$={stmt:"state",id:i[h],type:"join"};break;case 24:this.$={stmt:"state",id:i[h],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[h-1].trim(),note:{position:i[h-2].trim(),text:i[h].trim()}};break;case 29:this.$=i[h].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=i[h].trim(),y.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:i[h-1].trim(),classes:i[h].trim()};break;case 34:this.$={stmt:"style",id:i[h-1].trim(),styleClass:i[h].trim()};break;case 35:this.$={stmt:"applyClass",id:i[h-1].trim(),styleClass:i[h].trim()};break;case 36:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:i[h].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:i[h-2].trim(),classes:[i[h].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:i[h-2].trim(),classes:[i[h].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:c,6:a},{1:[3]},{3:5,4:e,5:c,6:a},{3:6,4:e,5:c,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],d,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:l,19:_,22:v,24:A,25:B,26:Y,27:I,28:f,29:L,32:25,33:R,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:g,17:l,19:_,22:v,24:A,25:B,26:Y,27:I,28:f,29:L,32:25,33:R,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,39],15:[1,40]}),t(S,[2,16]),{18:[1,41]},t(S,[2,18],{20:[1,42]}),{23:[1,43]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(S,[2,28]),{34:[1,48]},{36:[1,49]},t(S,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(ct,[2,42],{55:[1,54]}),t(ct,[2,43],{55:[1,55]}),t(S,[2,36]),t(S,[2,37]),t(S,[2,38]),t(S,[2,39]),t(S,[2,6]),t(S,[2,13]),{13:56,24:A,54:J},t(S,[2,17]),t(Vt,d,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(S,[2,29]),t(S,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(S,[2,14],{14:[1,67]}),{4:s,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:l,19:_,21:[1,68],22:v,24:A,25:B,26:Y,27:I,28:f,29:L,32:25,33:R,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(S,[2,32]),t(S,[2,33]),t(S,[2,34]),t(S,[2,35]),t(ct,[2,44]),t(ct,[2,45]),t(S,[2,15]),t(S,[2,19]),t(Vt,d,{7:72}),t(S,[2,26]),t(S,[2,27]),{4:s,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:l,19:_,21:[1,73],22:v,24:A,25:B,26:Y,27:I,28:f,29:L,32:25,33:R,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:r(function(o,u){if(u.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=u,n}},"parseError"),parse:r(function(o){var u=this,n=[0],y=[],T=[null],i=[],q=this.table,h="",M=0,W=0,ht=2,Q=1,Dt=i.slice.call(arguments,1),E=Object.create(this.lexer),U={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(U.yy[Ct]=this.yy[Ct]);E.setInput(o,U.yy),U.yy.lexer=E,U.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var xt=E.yylloc;i.push(xt);var me=E.options&&E.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(D){n.length=n.length-2*D,T.length=T.length-D,i.length=i.length-D}r(ke,"popStack");function Mt(){var D;return D=y.pop()||E.lex()||Q,typeof D!="number"&&(D instanceof Array&&(y=D,D=y.pop()),D=u.symbols_[D]||D),D}r(Mt,"lex");for(var m,j,C,At,X={},dt,O,Ut,ft;;){if(j=n[n.length-1],this.defaultActions[j]?C=this.defaultActions[j]:((m===null||typeof m>"u")&&(m=Mt()),C=q[j]&&q[j][m]),typeof C>"u"||!C.length||!C[0]){var Lt="";ft=[];for(dt in q[j])this.terminals_[dt]&&dt>ht&&ft.push("'"+this.terminals_[dt]+"'");E.showPosition?Lt="Parse error on line "+(M+1)+`: +`+E.showPosition()+` +Expecting `+ft.join(", ")+", got '"+(this.terminals_[m]||m)+"'":Lt="Parse error on line "+(M+1)+": Unexpected "+(m==Q?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(Lt,{text:E.match,token:this.terminals_[m]||m,line:E.yylineno,loc:xt,expected:ft})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+m);switch(C[0]){case 1:n.push(m),T.push(E.yytext),i.push(E.yylloc),n.push(C[1]),m=null,W=E.yyleng,h=E.yytext,M=E.yylineno,xt=E.yylloc;break;case 2:if(O=this.productions_[C[1]][1],X.$=T[T.length-O],X._$={first_line:i[i.length-(O||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(O||1)].first_column,last_column:i[i.length-1].last_column},me&&(X._$.range=[i[i.length-(O||1)].range[0],i[i.length-1].range[1]]),At=this.performAction.apply(X,[h,W,M,U.yy,C[1],T,i].concat(Dt)),typeof At<"u")return At;O&&(n=n.slice(0,-1*O*2),T=T.slice(0,-1*O),i=i.slice(0,-1*O)),n.push(this.productions_[C[1]][0]),T.push(X.$),i.push(X._$),Ut=q[n[n.length-2]][n[n.length-1]],n.push(Ut);break;case 3:return!0}}return!0},"parse")},be=function(){var $={EOF:1,parseError:r(function(u,n){if(this.yy.parser)this.yy.parser.parseError(u,n);else throw new Error(u)},"parseError"),setInput:r(function(o,u){return this.yy=u||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:r(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var u=o.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:r(function(o){var u=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var T=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===y.length?this.yylloc.first_column:0)+y[y.length-n.length].length-n[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r(function(o){this.unput(this.match.slice(o))},"less"),pastInput:r(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var o=this.pastInput(),u=new Array(o.length+1).join("-");return o+this.upcomingInput()+` +`+u+"^"},"showPosition"),test_match:r(function(o,u){var n,y,T;if(this.options.backtrack_lexer&&(T={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(T.yylloc.range=this.yylloc.range.slice(0))),y=o[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],n=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in T)this[i]=T[i];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,u,n,y;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),i=0;iu[0].length)){if(u=n,y=i,this.options.backtrack_lexer){if(o=this.test_match(n,T[i]),o!==!1)return o;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(o=this.test_match(u,T[y]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r(function(){var u=this.next();return u||this.lex()},"lex"),begin:r(function(u){this.conditionStack.push(u)},"begin"),popState:r(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:r(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:r(function(u){this.begin(u)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(u,n,y,T){switch(y){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 32:return this.pushState("SCALE"),17;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:return this.popState(),"ID";case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;case 54:break;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 67:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return n.yytext=n.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return $}();kt.lexer=be;function ut(){this.yy={}}return r(ut,"Parser"),ut.prototype=kt,kt.Parser=ut,new ut}();Ot.parser=Ot;var As=Ot,Ge="LR",qt="TB",_t="state",wt="relation",Be="classDef",Ye="style",Fe="applyClass",st="default",Qt="divider",Zt="fill:none",te="fill: #333",ee="c",se="text",ie="normal",It="rect",Rt="rectWithTitle",Ve="stateStart",Me="stateEnd",jt="divider",Ht="roundedWithTitle",Ue="note",je="noteGroup",it="statediagram",He="state",ze=`${it}-${He}`,re="transition",We="note",Xe="note-edge",Ke=`${re} ${Xe}`,Je=`${it}-${We}`,qe="cluster",Qe=`${it}-${qe}`,Ze="cluster-alt",ts=`${it}-${Ze}`,ae="parent",ne="note",es="state",$t="----",ss=`${$t}${ne}`,zt=`${$t}${ae}`,le=r((t,e=qt)=>{if(!t.doc)return e;let c=e;for(const a of t.doc)a.stmt==="dir"&&(c=a.value);return c},"getDir"),is=r(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),rs=r(async function(t,e,c,a){b.info("REF0:"),b.info("Drawing state diagram (v2)",e);const{securityLevel:d,state:s,layout:p}=x();a.db.extract(a.db.getRootDocV2());const g=a.db.getData(),l=De(e,d);g.type=a.type,g.layoutAlgorithm=p,g.nodeSpacing=(s==null?void 0:s.nodeSpacing)||50,g.rankSpacing=(s==null?void 0:s.rankSpacing)||50,g.markers=["barb"],g.diagramId=e,await Ne(g,l);const _=8;we.insertTitle(l,"statediagramTitleText",(s==null?void 0:s.titleTopMargin)??25,a.db.getDiagramTitle()),Ce(l,_,it,(s==null?void 0:s.useMaxWidth)??!0)},"draw"),Ls={getClasses:is,draw:rs,getDir:le},St=new Map,P=0;function yt(t="",e=0,c="",a=$t){const d=c!==null&&c.length>0?`${a}${c}`:"";return`${es}-${t}${d}-${e}`}r(yt,"stateDomId");var as=r((t,e,c,a,d,s,p,g)=>{b.trace("items",e),e.forEach(l=>{switch(l.stmt){case _t:tt(t,l,c,a,d,s,p,g);break;case st:tt(t,l,c,a,d,s,p,g);break;case wt:{tt(t,l.state1,c,a,d,s,p,g),tt(t,l.state2,c,a,d,s,p,g);const _={id:"edge"+P,start:l.state1.id,end:l.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Zt,labelStyle:"",label:H.sanitizeText(l.description,x()),arrowheadStyle:te,labelpos:ee,labelType:se,thickness:ie,classes:re,look:p};d.push(_),P++}break}})},"setupDoc"),Wt=r((t,e=qt)=>{let c=e;if(t.doc)for(const a of t.doc)a.stmt==="dir"&&(c=a.value);return c},"getDir");function Z(t,e,c){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(d=>{if(c.get(d)){const s=c.get(d);e.cssCompiledStyles=[...e.cssCompiledStyles,...s.styles]}}));const a=t.find(d=>d.id===e.id);a?Object.assign(a,e):t.push(e)}r(Z,"insertOrUpdateNode");function oe(t){var e;return((e=t==null?void 0:t.classes)==null?void 0:e.join(" "))??""}r(oe,"getClassesFromDbInfo");function ce(t){return(t==null?void 0:t.styles)??[]}r(ce,"getStylesFromDbInfo");var tt=r((t,e,c,a,d,s,p,g)=>{var B,Y;const l=e.id,_=c.get(l),v=oe(_),A=ce(_);if(b.info("dataFetcher parsedItem",e,_,A),l!=="root"){let I=It;e.start===!0?I=Ve:e.start===!1&&(I=Me),e.type!==st&&(I=e.type),St.get(l)||St.set(l,{id:l,shape:I,description:H.sanitizeText(l,x()),cssClasses:`${v} ${ze}`,cssStyles:A});const f=St.get(l);e.description&&(Array.isArray(f.description)?(f.shape=Rt,f.description.push(e.description)):((B=f.description)==null?void 0:B.length)>0?(f.shape=Rt,f.description===l?f.description=[e.description]:f.description=[f.description,e.description]):(f.shape=It,f.description=e.description),f.description=H.sanitizeTextOrArray(f.description,x())),((Y=f.description)==null?void 0:Y.length)===1&&f.shape===Rt&&(f.type==="group"?f.shape=Ht:f.shape=It),!f.type&&e.doc&&(b.info("Setting cluster for XCX",l,Wt(e)),f.type="group",f.isGroup=!0,f.dir=Wt(e),f.shape=e.type===Qt?jt:Ht,f.cssClasses=`${f.cssClasses} ${Qe} ${s?ts:""}`);const L={labelStyle:"",shape:f.shape,label:f.description,cssClasses:f.cssClasses,cssCompiledStyles:[],cssStyles:f.cssStyles,id:l,dir:f.dir,domId:yt(l,P),type:f.type,isGroup:f.type==="group",padding:8,rx:10,ry:10,look:p};if(L.shape===jt&&(L.label=""),t&&t.id!=="root"&&(b.trace("Setting node ",l," to be child of its parent ",t.id),L.parentId=t.id),L.centerLabel=!0,e.note){const R={labelStyle:"",shape:Ue,label:e.note.text,cssClasses:Je,cssStyles:[],cssCompilesStyles:[],id:l+ss+"-"+P,domId:yt(l,P,ne),type:f.type,isGroup:f.type==="group",padding:x().flowchart.padding,look:p,position:e.note.position},F=l+zt,V={labelStyle:"",shape:je,label:e.note.text,cssClasses:f.cssClasses,cssStyles:[],id:l+zt,domId:yt(l,P,ae),type:"group",isGroup:!0,padding:16,look:p,position:e.note.position};P++,V.id=F,R.parentId=F,Z(a,V,g),Z(a,R,g),Z(a,L,g);let N=l,w=R.id;e.note.position==="left of"&&(N=R.id,w=l),d.push({id:N+"-"+w,start:N,end:w,arrowhead:"none",arrowTypeEnd:"",style:Zt,labelStyle:"",classes:Ke,arrowheadStyle:te,labelpos:ee,labelType:se,thickness:ie,look:p})}else Z(a,L,g)}e.doc&&(b.trace("Adding nodes children "),as(e,e.doc,c,a,d,!s,p,g))},"dataFetcher"),ns=r(()=>{St.clear(),P=0},"reset"),Pt="[*]",ue="start",he=Pt,de="end",Xt="color",Kt="fill",ls="bgFill",os=",";function Gt(){return new Map}r(Gt,"newClassesList");var Tt=[],Bt=[],fe=Ge,Et=[],K=Gt(),pe=r(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),vt={root:pe()},k=vt.root,et=0,Jt=0,cs={LINE:0,DOTTED_LINE:1},us={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},pt=r(t=>JSON.parse(JSON.stringify(t)),"clone"),hs=r(t=>{b.info("Setting root doc",t),Et=t},"setRootDoc"),ds=r(()=>Et,"getRootDoc"),gt=r((t,e,c)=>{if(e.stmt===wt)gt(t,e.state1,!0),gt(t,e.state2,!1);else if(e.stmt===_t&&(e.id==="[*]"?(e.id=c?t.id+"_start":t.id+"_end",e.start=c):e.id=e.id.trim()),e.doc){const a=[];let d=[],s;for(s=0;s0&&d.length>0){const p={stmt:_t,id:Pe(),type:"divider",doc:pt(d)};a.push(pt(p)),e.doc=a}e.doc.forEach(p=>gt(e,p,!0))}},"docTranslator"),Yt=r(()=>(gt({id:"root"},{id:"root",doc:Et},!0),{id:"root",doc:Et}),"getRootDocV2"),fs=r(t=>{let e;t.doc?e=t.doc:e=t,b.info(e),Se(!0),b.info("Extract initial document:",e),e.forEach(s=>{switch(b.warn("Statement",s.stmt),s.stmt){case _t:G(s.id.trim(),s.type,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles);break;case wt:Ee(s.state1,s.state2,s.description);break;case Be:ve(s.id.trim(),s.classes);break;case Ye:{const p=s.id.trim().split(","),g=s.styleClass.split(",");p.forEach(l=>{let _=z(l);if(_===void 0){const v=l.trim();G(v),_=z(v)}_.styles=g.map(v=>{var A;return(A=v.replace(/;/g,""))==null?void 0:A.trim()})})}break;case Fe:Ft(s.id.trim(),s.styleClass);break}});const c=ye(),d=x().look;ns(),tt(void 0,Yt(),c,Tt,Bt,!0,d,K),Tt.forEach(s=>{if(Array.isArray(s.label)){if(s.description=s.label.slice(1),s.isGroup&&s.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+s.id+"]");s.label=s.label[0]}})},"extract"),G=r(function(t,e=st,c=null,a=null,d=null,s=null,p=null,g=null){const l=t==null?void 0:t.trim();if(k.states.has(l)?(k.states.get(l).doc||(k.states.get(l).doc=c),k.states.get(l).type||(k.states.get(l).type=e)):(b.info("Adding state ",l,a),k.states.set(l,{id:l,descriptions:[],type:e,doc:c,note:d,classes:[],styles:[],textStyles:[]})),a&&(b.info("Setting state description",l,a),typeof a=="string"&&Nt(l,a.trim()),typeof a=="object"&&a.forEach(_=>Nt(l,_.trim()))),d){const _=k.states.get(l);_.note=d,_.note.text=H.sanitizeText(_.note.text,x())}s&&(b.info("Setting state classes",l,s),(typeof s=="string"?[s]:s).forEach(v=>Ft(l,v.trim()))),p&&(b.info("Setting state styles",l,p),(typeof p=="string"?[p]:p).forEach(v=>Ts(l,v.trim()))),g&&(b.info("Setting state styles",l,p),(typeof g=="string"?[g]:g).forEach(v=>Es(l,v.trim())))},"addState"),Se=r(function(t){Tt=[],Bt=[],vt={root:pe()},k=vt.root,et=0,K=Gt(),t||$e()},"clear"),z=r(function(t){return k.states.get(t)},"getState"),ye=r(function(){return k.states},"getStates"),ps=r(function(){b.info("Documents = ",vt)},"logDocuments"),Ss=r(function(){return k.relations},"getRelations");function bt(t=""){let e=t;return t===Pt&&(et++,e=`${ue}${et}`),e}r(bt,"startIdIfNeeded");function mt(t="",e=st){return t===Pt?ue:e}r(mt,"startTypeIfNeeded");function ge(t=""){let e=t;return t===he&&(et++,e=`${de}${et}`),e}r(ge,"endIdIfNeeded");function _e(t="",e=st){return t===he?de:e}r(_e,"endTypeIfNeeded");function Te(t,e,c){let a=bt(t.id.trim()),d=mt(t.id.trim(),t.type),s=bt(e.id.trim()),p=mt(e.id.trim(),e.type);G(a,d,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),G(s,p,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),k.relations.push({id1:a,id2:s,relationTitle:H.sanitizeText(c,x())})}r(Te,"addRelationObjs");var Ee=r(function(t,e,c){if(typeof t=="object")Te(t,e,c);else{const a=bt(t.trim()),d=mt(t),s=ge(e.trim()),p=_e(e);G(a,d),G(s,p),k.relations.push({id1:a,id2:s,title:H.sanitizeText(c,x())})}},"addRelation"),Nt=r(function(t,e){const c=k.states.get(t),a=e.startsWith(":")?e.replace(":","").trim():e;c.descriptions.push(H.sanitizeText(a,x()))},"addDescription"),ys=r(function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},"cleanupLabel"),gs=r(()=>(Jt++,"divider-id-"+Jt),"getDividerId"),ve=r(function(t,e=""){K.has(t)||K.set(t,{id:t,styles:[],textStyles:[]});const c=K.get(t);e!=null&&e.split(os).forEach(a=>{const d=a.replace(/([^;]*);/,"$1").trim();if(RegExp(Xt).exec(a)){const p=d.replace(Kt,ls).replace(Xt,Kt);c.textStyles.push(p)}c.styles.push(d)})},"addStyleClass"),_s=r(function(){return K},"getClasses"),Ft=r(function(t,e){t.split(",").forEach(function(c){let a=z(c);if(a===void 0){const d=c.trim();G(d),a=z(d)}a.classes.push(e)})},"setCssClass"),Ts=r(function(t,e){const c=z(t);c!==void 0&&c.styles.push(e)},"setStyle"),Es=r(function(t,e){const c=z(t);c!==void 0&&c.textStyles.push(e)},"setTextStyle"),vs=r(()=>fe,"getDirection"),bs=r(t=>{fe=t},"setDirection"),ms=r(t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),"trimColon"),ks=r(()=>{const t=x();return{nodes:Tt,edges:Bt,other:{},config:t,direction:le(Yt())}},"getData"),Is={getConfig:r(()=>x().state,"getConfig"),getData:ks,addState:G,clear:Se,getState:z,getStates:ye,getRelations:Ss,getClasses:_s,getDirection:vs,addRelation:Ee,getDividerId:gs,setDirection:bs,cleanupLabel:ys,lineType:cs,relationType:us,logDocuments:ps,getRootDoc:ds,setRootDoc:hs,getRootDocV2:Yt,extract:fs,trimColon:ms,getAccTitle:xe,setAccTitle:Ae,getAccDescription:Le,setAccDescription:Ie,addStyleClass:ve,setCssClass:Ft,addDescription:Nt,setDiagramTitle:Re,getDiagramTitle:Oe},Ds=r(t=>` +defs #statediagram-barbEnd { + fill: ${t.transitionColor}; + stroke: ${t.transitionColor}; + } +g.stateGroup text { + fill: ${t.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${t.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${t.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.stateGroup line { + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${t.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${t.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + + text { + fill: ${t.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${t.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${t.transitionLabelColor||t.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${t.transitionLabelColor||t.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${t.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node .fork-join { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node circle.state-end { + fill: ${t.innerEndBackground}; + stroke: ${t.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${t.compositeBackground||t.background}; + // stroke: ${t.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${t.stateBkg||t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${t.lineColor}; +} + +.statediagram-cluster rect { + fill: ${t.compositeTitleBackground}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${t.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${t.stateBorder||t.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${t.compositeBackground||t.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${t.altBackground?t.altBackground:"#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${t.altBackground?t.altBackground:"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${t.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${t.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${t.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${t.lineColor}; + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} +`,"getStyles"),Rs=Ds;export{Is as a,Rs as b,Ls as c,As as s}; diff --git a/assets/chunks/chunk-ASOPGD6M.9xhfAZUp.js b/assets/chunks/chunk-ASOPGD6M.9xhfAZUp.js new file mode 100644 index 00000000..92387f9c --- /dev/null +++ b/assets/chunks/chunk-ASOPGD6M.9xhfAZUp.js @@ -0,0 +1 @@ +import{_ as n,n as c,m as l}from"../app.CXGmg8Jv.js";var o=n((a,t)=>{const e=a.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const r in t.attrs)e.attr(r,t.attrs[r]);return t.class&&e.attr("class",t.class),e},"drawRect"),d=n((a,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};o(a,e).lower()},"drawBackgroundRect"),g=n((a,t)=>{const e=t.text.replace(c," "),r=a.append("text");r.attr("x",t.x),r.attr("y",t.y),r.attr("class","legend"),r.style("text-anchor",t.anchor),t.class&&r.attr("class",t.class);const s=r.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),r},"drawText"),m=n((a,t,e,r)=>{const s=a.append("image");s.attr("x",t),s.attr("y",e);const i=l(r);s.attr("xlink:href",i)},"drawImage"),h=n((a,t,e,r)=>{const s=a.append("use");s.attr("x",t),s.attr("y",e);const i=l(r);s.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),y=n(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=n(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj");export{p as a,d as b,h as c,o as d,m as e,g as f,y as g}; diff --git a/assets/chunks/chunk-KFBOBJHC.DtEDTmGR.js b/assets/chunks/chunk-KFBOBJHC.DtEDTmGR.js new file mode 100644 index 00000000..13196957 --- /dev/null +++ b/assets/chunks/chunk-KFBOBJHC.DtEDTmGR.js @@ -0,0 +1 @@ +import{_ as s}from"../app.CXGmg8Jv.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I}; diff --git a/assets/chunks/chunk-T2TOU4HS.BecFh13f.js b/assets/chunks/chunk-T2TOU4HS.BecFh13f.js new file mode 100644 index 00000000..83401bf9 --- /dev/null +++ b/assets/chunks/chunk-T2TOU4HS.BecFh13f.js @@ -0,0 +1,164 @@ +import{g as mt,s as Et}from"./chunk-5HRBRIJM.CiC8nwb0.js";import{_ as u,i as bt,d as D,a7 as z,s as kt,g as yt,b as Tt,c as Ft,q as Dt,r as _t,e as I,x as Bt,l as ze,v as Qe,j as ie,y as St,z as vt,A as Nt}from"../app.CXGmg8Jv.js";var Ke=function(){var e=u(function(O,o,h,d){for(h=h||{},d=O.length;d--;h[O[d]]=o);return h},"o"),i=[1,18],a=[1,19],l=[1,20],c=[1,41],r=[1,42],A=[1,26],f=[1,24],T=[1,25],S=[1,32],ke=[1,33],ye=[1,34],m=[1,45],Te=[1,35],Fe=[1,36],De=[1,37],_e=[1,38],Be=[1,27],Se=[1,28],ve=[1,29],Ne=[1,30],Le=[1,31],E=[1,44],b=[1,46],k=[1,43],F=[1,47],xe=[1,9],p=[1,8,9],re=[1,58],ue=[1,59],le=[1,60],oe=[1,61],ce=[1,62],Ie=[1,63],Oe=[1,64],he=[1,8,9,41],qe=[1,76],G=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],pe=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],de=[13,58,84,99,101,102],Q=[13,58,71,72,84,99,101,102],He=[13,58,66,67,68,69,70,84,99,101,102],we=[1,98],W=[1,115],X=[1,107],q=[1,113],H=[1,108],J=[1,109],Z=[1,110],$=[1,111],ee=[1,112],te=[1,114],Je=[22,58,59,80,84,85,86,87,88,89],Ve=[1,8,9,39,41,44],Ae=[1,8,9,22],Ze=[1,143],$e=[1,8,9,59],N=[1,8,9,22,58,59,80,84,85,86,87,88,89],Pe={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:u(function(o,h,d,n,C,t,se){var s=t.length-1;switch(C){case 8:this.$=t[s-1];break;case 9:case 12:case 14:this.$=t[s];break;case 10:case 13:this.$=t[s-2]+"."+t[s];break;case 11:case 15:this.$=t[s-1]+t[s];break;case 16:case 17:this.$=t[s-1]+"~"+t[s]+"~";break;case 18:n.addRelation(t[s]);break;case 19:t[s-1].title=n.cleanupLabel(t[s]),n.addRelation(t[s-1]);break;case 30:this.$=t[s].trim(),n.setAccTitle(this.$);break;case 31:case 32:this.$=t[s].trim(),n.setAccDescription(this.$);break;case 33:n.addClassesToNamespace(t[s-3],t[s-1]);break;case 34:n.addClassesToNamespace(t[s-4],t[s-1]);break;case 35:this.$=t[s],n.addNamespace(t[s]);break;case 36:this.$=[t[s]];break;case 37:this.$=[t[s-1]];break;case 38:t[s].unshift(t[s-2]),this.$=t[s];break;case 40:n.setCssClass(t[s-2],t[s]);break;case 41:n.addMembers(t[s-3],t[s-1]);break;case 42:n.setCssClass(t[s-5],t[s-3]),n.addMembers(t[s-5],t[s-1]);break;case 43:this.$=t[s],n.addClass(t[s]);break;case 44:this.$=t[s-1],n.addClass(t[s-1]),n.setClassLabel(t[s-1],t[s]);break;case 45:n.addAnnotation(t[s],t[s-2]);break;case 46:case 59:this.$=[t[s]];break;case 47:t[s].push(t[s-1]),this.$=t[s];break;case 48:break;case 49:n.addMember(t[s-1],n.cleanupLabel(t[s]));break;case 50:break;case 51:break;case 52:this.$={id1:t[s-2],id2:t[s],relation:t[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:t[s-3],id2:t[s],relation:t[s-1],relationTitle1:t[s-2],relationTitle2:"none"};break;case 54:this.$={id1:t[s-3],id2:t[s],relation:t[s-2],relationTitle1:"none",relationTitle2:t[s-1]};break;case 55:this.$={id1:t[s-4],id2:t[s],relation:t[s-2],relationTitle1:t[s-3],relationTitle2:t[s-1]};break;case 56:n.addNote(t[s],t[s-1]);break;case 57:n.addNote(t[s]);break;case 58:this.$=t[s-2],n.defineClass(t[s-1],t[s]);break;case 60:this.$=t[s-2].concat([t[s]]);break;case 61:n.setDirection("TB");break;case 62:n.setDirection("BT");break;case 63:n.setDirection("RL");break;case 64:n.setDirection("LR");break;case 65:this.$={type1:t[s-2],type2:t[s],lineType:t[s-1]};break;case 66:this.$={type1:"none",type2:t[s],lineType:t[s-1]};break;case 67:this.$={type1:t[s-1],type2:"none",lineType:t[s]};break;case 68:this.$={type1:"none",type2:"none",lineType:t[s]};break;case 69:this.$=n.relationType.AGGREGATION;break;case 70:this.$=n.relationType.EXTENSION;break;case 71:this.$=n.relationType.COMPOSITION;break;case 72:this.$=n.relationType.DEPENDENCY;break;case 73:this.$=n.relationType.LOLLIPOP;break;case 74:this.$=n.lineType.LINE;break;case 75:this.$=n.lineType.DOTTED_LINE;break;case 76:case 82:this.$=t[s-2],n.setClickEvent(t[s-1],t[s]);break;case 77:case 83:this.$=t[s-3],n.setClickEvent(t[s-2],t[s-1]),n.setTooltip(t[s-2],t[s]);break;case 78:this.$=t[s-2],n.setLink(t[s-1],t[s]);break;case 79:this.$=t[s-3],n.setLink(t[s-2],t[s-1],t[s]);break;case 80:this.$=t[s-3],n.setLink(t[s-2],t[s-1]),n.setTooltip(t[s-2],t[s]);break;case 81:this.$=t[s-4],n.setLink(t[s-3],t[s-2],t[s]),n.setTooltip(t[s-3],t[s-1]);break;case 84:this.$=t[s-3],n.setClickEvent(t[s-2],t[s-1],t[s]);break;case 85:this.$=t[s-4],n.setClickEvent(t[s-3],t[s-2],t[s-1]),n.setTooltip(t[s-3],t[s]);break;case 86:this.$=t[s-3],n.setLink(t[s-2],t[s]);break;case 87:this.$=t[s-4],n.setLink(t[s-3],t[s-1],t[s]);break;case 88:this.$=t[s-4],n.setLink(t[s-3],t[s-1]),n.setTooltip(t[s-3],t[s]);break;case 89:this.$=t[s-5],n.setLink(t[s-4],t[s-2],t[s]),n.setTooltip(t[s-4],t[s-1]);break;case 90:this.$=t[s-2],n.setCssStyle(t[s-1],t[s]);break;case 91:n.setCssClass(t[s-1],t[s]);break;case 92:this.$=[t[s]];break;case 93:t[s-2].push(t[s]),this.$=t[s-2];break;case 95:this.$=t[s-1]+t[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:l,38:22,42:c,43:23,46:r,47:A,49:f,50:T,52:S,54:ke,55:ye,58:m,60:Te,61:Fe,62:De,63:_e,73:Be,74:Se,76:ve,80:Ne,81:Le,84:E,99:b,101:k,102:F},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(xe,[2,5],{8:[1,48]}),{8:[1,49]},e(p,[2,18],{22:[1,50]}),e(p,[2,20]),e(p,[2,21]),e(p,[2,22]),e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,27]),e(p,[2,28]),e(p,[2,29]),{34:[1,51]},{36:[1,52]},e(p,[2,32]),e(p,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:re,67:ue,68:le,69:oe,70:ce,71:Ie,72:Oe}),{39:[1,65]},e(he,[2,39],{39:[1,67],44:[1,66]}),e(p,[2,50]),e(p,[2,51]),{16:68,58:m,84:E,99:b,101:k},{16:39,18:69,19:40,58:m,84:E,99:b,101:k,102:F},{16:39,18:70,19:40,58:m,84:E,99:b,101:k,102:F},{16:39,18:71,19:40,58:m,84:E,99:b,101:k,102:F},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:m,84:E,99:b,101:k,102:F},{13:qe,53:75},{56:77,58:[1,78]},e(p,[2,61]),e(p,[2,62]),e(p,[2,63]),e(p,[2,64]),e(G,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:m,84:E,99:b,101:k,102:F}),e(G,[2,14],{20:[1,82]}),{15:83,16:84,58:m,84:E,99:b,101:k},{16:39,18:85,19:40,58:m,84:E,99:b,101:k,102:F},e(pe,[2,118]),e(pe,[2,119]),e(pe,[2,120]),e(pe,[2,121]),e([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),e(xe,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:i,35:a,37:l,42:c,46:r,47:A,49:f,50:T,52:S,54:ke,55:ye,58:m,60:Te,61:Fe,62:De,63:_e,73:Be,74:Se,76:ve,80:Ne,81:Le,84:E,99:b,101:k,102:F}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:l,38:22,42:c,43:23,46:r,47:A,49:f,50:T,52:S,54:ke,55:ye,58:m,60:Te,61:Fe,62:De,63:_e,73:Be,74:Se,76:ve,80:Ne,81:Le,84:E,99:b,101:k,102:F},e(p,[2,19]),e(p,[2,30]),e(p,[2,31]),{13:[1,89],16:39,18:88,19:40,58:m,84:E,99:b,101:k,102:F},{51:90,64:56,65:57,66:re,67:ue,68:le,69:oe,70:ce,71:Ie,72:Oe},e(p,[2,49]),{65:91,71:Ie,72:Oe},e(de,[2,68],{64:92,66:re,67:ue,68:le,69:oe,70:ce}),e(Q,[2,69]),e(Q,[2,70]),e(Q,[2,71]),e(Q,[2,72]),e(Q,[2,73]),e(He,[2,74]),e(He,[2,75]),{8:[1,94],24:95,40:93,43:23,46:r},{16:96,58:m,84:E,99:b,101:k},{45:97,49:we},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:W,57:104,58:X,80:q,82:105,83:106,84:H,85:J,86:Z,87:$,88:ee,89:te},{58:[1,116]},{13:qe,53:117},e(p,[2,57]),e(p,[2,123]),{22:W,57:118,58:X,59:[1,119],80:q,82:105,83:106,84:H,85:J,86:Z,87:$,88:ee,89:te},e(Je,[2,59]),{16:39,18:120,19:40,58:m,84:E,99:b,101:k,102:F},e(G,[2,15]),e(G,[2,16]),e(G,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:m,84:E,99:b,101:k},e(Ve,[2,43],{11:123,12:[1,124]}),e(xe,[2,7]),{9:[1,125]},e(Ae,[2,52]),{16:39,18:126,19:40,58:m,84:E,99:b,101:k,102:F},{13:[1,128],16:39,18:127,19:40,58:m,84:E,99:b,101:k,102:F},e(de,[2,67],{64:129,66:re,67:ue,68:le,69:oe,70:ce}),e(de,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:r},{8:[1,132],41:[2,36]},e(he,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:we},{16:39,18:136,19:40,58:m,84:E,99:b,101:k,102:F},e(p,[2,76],{13:[1,137]}),e(p,[2,78],{13:[1,139],75:[1,138]}),e(p,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},e(p,[2,90],{59:Ze}),e($e,[2,92],{83:144,22:W,58:X,80:q,84:H,85:J,86:Z,87:$,88:ee,89:te}),e(N,[2,94]),e(N,[2,96]),e(N,[2,97]),e(N,[2,98]),e(N,[2,99]),e(N,[2,100]),e(N,[2,101]),e(N,[2,102]),e(N,[2,103]),e(N,[2,104]),e(p,[2,91]),e(p,[2,56]),e(p,[2,58],{59:Ze}),{58:[1,145]},e(G,[2,13]),{15:146,16:84,58:m,84:E,99:b,101:k},{39:[2,11]},e(Ve,[2,44]),{13:[1,147]},{1:[2,4]},e(Ae,[2,54]),e(Ae,[2,53]),{16:39,18:148,19:40,58:m,84:E,99:b,101:k,102:F},e(de,[2,65]),e(p,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:r},{45:151,49:we},e(he,[2,41]),{41:[2,47]},e(p,[2,45]),e(p,[2,77]),e(p,[2,79]),e(p,[2,80],{75:[1,152]}),e(p,[2,83]),e(p,[2,84],{13:[1,153]}),e(p,[2,86],{13:[1,155],75:[1,154]}),{22:W,58:X,80:q,82:156,83:106,84:H,85:J,86:Z,87:$,88:ee,89:te},e(N,[2,95]),e(Je,[2,60]),{39:[2,10]},{14:[1,157]},e(Ae,[2,55]),e(p,[2,34]),{41:[2,38]},{41:[1,158]},e(p,[2,81]),e(p,[2,85]),e(p,[2,87]),e(p,[2,88],{75:[1,159]}),e($e,[2,93],{83:144,22:W,58:X,80:q,84:H,85:J,86:Z,87:$,88:ee,89:te}),e(Ve,[2,8]),e(he,[2,42]),e(p,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:u(function(o,h){if(h.recoverable)this.trace(o);else{var d=new Error(o);throw d.hash=h,d}},"parseError"),parse:u(function(o){var h=this,d=[0],n=[],C=[null],t=[],se=this.table,s="",ge=0,et=0,At=2,tt=1,ft=t.slice.call(arguments,1),y=Object.create(this.lexer),V={yy:{}};for(var Re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Re)&&(V.yy[Re]=this.yy[Re]);y.setInput(o,V.yy),V.yy.lexer=y,V.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Me=y.yylloc;t.push(Me);var gt=y.options&&y.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(B){d.length=d.length-2*B,C.length=C.length-B,t.length=t.length-B}u(Ct,"popStack");function st(){var B;return B=n.pop()||y.lex()||tt,typeof B!="number"&&(B instanceof Array&&(n=B,B=n.pop()),B=h.symbols_[B]||B),B}u(st,"lex");for(var _,P,v,Ge,U={},Ce,x,it,me;;){if(P=d[d.length-1],this.defaultActions[P]?v=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=st()),v=se[P]&&se[P][_]),typeof v>"u"||!v.length||!v[0]){var Ue="";me=[];for(Ce in se[P])this.terminals_[Ce]&&Ce>At&&me.push("'"+this.terminals_[Ce]+"'");y.showPosition?Ue="Parse error on line "+(ge+1)+`: +`+y.showPosition()+` +Expecting `+me.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Ue="Parse error on line "+(ge+1)+": Unexpected "+(_==tt?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Ue,{text:y.match,token:this.terminals_[_]||_,line:y.yylineno,loc:Me,expected:me})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch(v[0]){case 1:d.push(_),C.push(y.yytext),t.push(y.yylloc),d.push(v[1]),_=null,et=y.yyleng,s=y.yytext,ge=y.yylineno,Me=y.yylloc;break;case 2:if(x=this.productions_[v[1]][1],U.$=C[C.length-x],U._$={first_line:t[t.length-(x||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(x||1)].first_column,last_column:t[t.length-1].last_column},gt&&(U._$.range=[t[t.length-(x||1)].range[0],t[t.length-1].range[1]]),Ge=this.performAction.apply(U,[s,et,ge,V.yy,v[1],C,t].concat(ft)),typeof Ge<"u")return Ge;x&&(d=d.slice(0,-1*x*2),C=C.slice(0,-1*x),t=t.slice(0,-1*x)),d.push(this.productions_[v[1]][0]),C.push(U.$),t.push(U._$),it=se[d[d.length-2]][d[d.length-1]],d.push(it);break;case 3:return!0}}return!0},"parse")},dt=function(){var O={EOF:1,parseError:u(function(h,d){if(this.yy.parser)this.yy.parser.parseError(h,d);else throw new Error(h)},"parseError"),setInput:u(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:u(function(o){var h=o.length,d=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===n.length?this.yylloc.first_column:0)+n[n.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(o){this.unput(this.match.slice(o))},"less"),pastInput:u(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+` +`+h+"^"},"showPosition"),test_match:u(function(o,h){var d,n,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),n=o[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],d=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var t in C)this[t]=C[t];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,h,d,n;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),t=0;th[0].length)){if(h=d,n=t,this.options.backtrack_lexer){if(o=this.test_match(d,C[t]),o!==!1)return o;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(o=this.test_match(h,C[n]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var h=this.next();return h||this.lex()},"lex"),begin:u(function(h){this.conditionStack.push(h)},"begin"),popState:u(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:u(function(h){this.begin(h)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:u(function(h,d,n,C){switch(n){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 75;case 65:return 75;case 66:return 75;case 67:return 75;case 68:return 67;case 69:return 67;case 70:return 69;case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:return 88;case 85:return 88;case 86:return 89;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:return 87;case 96:return 87;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return O}();Pe.lexer=dt;function fe(){this.yy={}}return u(fe,"Parser"),fe.prototype=Pe,Pe.Parser=fe,new fe}();Ke.parser=Ke;var os=Ke,nt=["#","+","~","-",""],Y,at=(Y=class{constructor(i,a){this.memberType=a,this.visibility="",this.classifier="",this.text="";const l=bt(i,D());this.parseMember(l)}getDisplayDetails(){let i=this.visibility+z(this.id);this.memberType==="method"&&(i+=`(${z(this.parameters.trim())})`,this.returnType&&(i+=" : "+z(this.returnType))),i=i.trim();const a=this.parseClassifier();return{displayText:i,cssStyle:a}}parseMember(i){let a="";if(this.memberType==="method"){const r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(r){const A=r[1]?r[1].trim():"";if(nt.includes(A)&&(this.visibility=A),this.id=r[2],this.parameters=r[3]?r[3].trim():"",a=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",a===""){const f=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(f)&&(a=f,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const c=i.length,r=i.substring(0,1),A=i.substring(c-1);nt.includes(r)&&(this.visibility=r),/[$*]/.exec(A)&&(a=A),this.id=i.substring(this.visibility===""?0:1,a===""?c:c-1)}this.classifier=a,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const l=`${this.visibility?"\\"+this.visibility:""}${z(this.id)}${this.memberType==="method"?`(${z(this.parameters)})${this.returnType?" : "+z(this.returnType):""}`:""}`;this.text=l.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},u(Y,"ClassMember"),Y),Ee="classId-",be=[],g=new Map,rt=new Map,ne=[],j=[],ut=0,L=new Map,Ye=0,ae=[],R=u(e=>I.sanitizeText(e,D()),"sanitizeText"),M=u(function(e){const i=I.sanitizeText(e,D());let a="",l=i;if(i.indexOf("~")>0){const c=i.split("~");l=R(c[0]),a=R(c[1])}return{className:l,type:a}},"splitClassNameAndType"),Lt=u(function(e,i){const a=I.sanitizeText(e,D());i&&(i=R(i));const{className:l}=M(a);g.get(l).label=i,g.get(l).text=`${i}${g.get(l).type?`<${g.get(l).type}>`:""}`},"setClassLabel"),K=u(function(e){const i=I.sanitizeText(e,D()),{className:a,type:l}=M(i);if(g.has(a))return;const c=I.sanitizeText(a,D());g.set(c,{id:c,type:l,label:c,text:`${c}${l?`<${l}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:Ee+c+"-"+ut}),ut++},"addClass"),lt=u(function(e,i){const a={id:`interface${j.length}`,label:e,classId:i};j.push(a)},"addInterface"),ot=u(function(e){const i=I.sanitizeText(e,D());if(g.has(i))return g.get(i).domId;throw new Error("Class not found: "+i)},"lookUpDomId"),xt=u(function(){be=[],g=new Map,ne=[],j=[],ae=[],ae.push(ht),L=new Map,Ye=0,Xe="TB",Bt()},"clear"),It=u(function(e){return g.get(e)},"getClass"),Ot=u(function(){return g},"getClasses"),wt=u(function(){return be},"getRelations"),Vt=u(function(){return ne},"getNotes"),Pt=u(function(e){ze.debug("Adding relation: "+JSON.stringify(e));const i=[w.LOLLIPOP,w.AGGREGATION,w.COMPOSITION,w.DEPENDENCY,w.EXTENSION];e.relation.type1===w.LOLLIPOP&&!i.includes(e.relation.type2)?(K(e.id2),lt(e.id1,e.id2),e.id1=`interface${j.length-1}`):e.relation.type2===w.LOLLIPOP&&!i.includes(e.relation.type1)?(K(e.id1),lt(e.id2,e.id1),e.id2=`interface${j.length-1}`):(K(e.id1),K(e.id2)),e.id1=M(e.id1).className,e.id2=M(e.id2).className,e.relationTitle1=I.sanitizeText(e.relationTitle1.trim(),D()),e.relationTitle2=I.sanitizeText(e.relationTitle2.trim(),D()),be.push(e)},"addRelation"),Rt=u(function(e,i){const a=M(e).className;g.get(a).annotations.push(i)},"addAnnotation"),ct=u(function(e,i){K(e);const a=M(e).className,l=g.get(a);if(typeof i=="string"){const c=i.trim();c.startsWith("<<")&&c.endsWith(">>")?l.annotations.push(R(c.substring(2,c.length-2))):c.indexOf(")")>0?l.methods.push(new at(c,"method")):c&&l.members.push(new at(c,"attribute"))}},"addMember"),Mt=u(function(e,i){Array.isArray(i)&&(i.reverse(),i.forEach(a=>ct(e,a)))},"addMembers"),Gt=u(function(e,i){const a={id:`note${ne.length}`,class:i,text:e};ne.push(a)},"addNote"),Ut=u(function(e){return e.startsWith(":")&&(e=e.substring(1)),R(e.trim())},"cleanupLabel"),We=u(function(e,i){e.split(",").forEach(function(a){let l=a;/\d/.exec(a[0])&&(l=Ee+l);const c=g.get(l);c&&(c.cssClasses+=" "+i)})},"setCssClass"),zt=u(function(e,i){for(const a of e){let l=rt.get(a);l===void 0&&(l={id:a,styles:[],textStyles:[]},rt.set(a,l)),i&&i.forEach(function(c){if(/color/.exec(c)){const r=c.replace("fill","bgFill");l.textStyles.push(r)}l.styles.push(c)}),g.forEach(c=>{c.cssClasses.includes(a)&&c.styles.push(...i.flatMap(r=>r.split(",")))})}},"defineClass"),Kt=u(function(e,i){e.split(",").forEach(function(a){i!==void 0&&(g.get(a).tooltip=R(i))})},"setTooltip"),Yt=u(function(e,i){return i&&L.has(i)?L.get(i).classes.get(e).tooltip:g.get(e).tooltip},"getTooltip"),jt=u(function(e,i,a){const l=D();e.split(",").forEach(function(c){let r=c;/\d/.exec(c[0])&&(r=Ee+r);const A=g.get(r);A&&(A.link=Qe.formatUrl(i,l),l.securityLevel==="sandbox"?A.linkTarget="_top":typeof a=="string"?A.linkTarget=R(a):A.linkTarget="_blank")}),We(e,"clickable")},"setLink"),Qt=u(function(e,i,a){e.split(",").forEach(function(l){Wt(l,i,a),g.get(l).haveCallback=!0}),We(e,"clickable")},"setClickEvent"),Wt=u(function(e,i,a){const l=I.sanitizeText(e,D());if(D().securityLevel!=="loose"||i===void 0)return;const r=l;if(g.has(r)){const A=ot(r);let f=[];if(typeof a=="string"){f=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let T=0;T")),c.classed("hover",!0)}).on("mouseout",function(){i.transition().duration(500).style("opacity",0),ie(this).classed("hover",!1)})},"setupToolTips");ae.push(ht);var Xe="TB",pt=u(()=>Xe,"getDirection"),Ht=u(e=>{Xe=e},"setDirection"),Jt=u(function(e){L.has(e)||(L.set(e,{id:e,classes:new Map,children:{},domId:Ee+e+"-"+Ye}),Ye++)},"addNamespace"),Zt=u(function(e){return L.get(e)},"getNamespace"),$t=u(function(){return L},"getNamespaces"),es=u(function(e,i){if(L.has(e))for(const a of i){const{className:l}=M(a);g.get(l).parent=e,L.get(e).classes.set(l,g.get(l))}},"addClassesToNamespace"),ts=u(function(e,i){const a=g.get(e);if(!(!i||!a))for(const l of i)l.includes(",")?a.styles.push(...l.split(",")):a.styles.push(l)},"setCssStyle");function je(e){let i;switch(e){case 0:i="aggregation";break;case 1:i="extension";break;case 2:i="composition";break;case 3:i="dependency";break;case 4:i="lollipop";break;default:i="none"}return i}u(je,"getArrowMarker");var ss=u(()=>{var c;const e=[],i=[],a=D();for(const r of L.keys()){const A=L.get(r);if(A){const f={id:A.id,label:A.id,isGroup:!0,padding:a.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:a.look};e.push(f)}}for(const r of g.keys()){const A=g.get(r);if(A){const f=A;f.parentId=A.parent,f.look=a.look,e.push(f)}}let l=0;for(const r of ne){l++;const A={id:r.id,label:r.text,isGroup:!1,shape:"note",padding:a.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${a.themeVariables.noteBkgColor}`,`stroke: ${a.themeVariables.noteBorderColor}`],look:a.look};e.push(A);const f=((c=g.get(r.class))==null?void 0:c.id)??"";if(f){const T={id:`edgeNote${l}`,start:r.id,end:f,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:a.look};i.push(T)}}for(const r of j){const A={id:r.id,label:r.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:a.look};e.push(A)}l=0;for(const r of be){l++;const A={id:St(r.id1,r.id2,{prefix:"id",counter:l}),start:r.id1,end:r.id2,type:"normal",label:r.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:je(r.relation.type1),arrowTypeEnd:je(r.relation.type2),startLabelRight:r.relationTitle1==="none"?"":r.relationTitle1,endLabelLeft:r.relationTitle2==="none"?"":r.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:r.style||"",pattern:r.relation.lineType==1?"dashed":"solid",look:a.look};i.push(A)}return{nodes:e,edges:i,other:{},config:a,direction:pt()}},"getData"),cs={setAccTitle:kt,getAccTitle:yt,getAccDescription:Tt,setAccDescription:Ft,getConfig:u(()=>D().class,"getConfig"),addClass:K,bindFunctions:Xt,clear:xt,getClass:It,getClasses:Ot,getNotes:Vt,addAnnotation:Rt,addNote:Gt,getRelations:wt,addRelation:Pt,getDirection:pt,setDirection:Ht,addMember:ct,addMembers:Mt,cleanupLabel:Ut,lineType:qt,relationType:w,setClickEvent:Qt,setCssClass:We,defineClass:zt,setLink:jt,getTooltip:Yt,setTooltip:Kt,lookUpDomId:ot,setDiagramTitle:Dt,getDiagramTitle:_t,setClassLabel:Lt,addNamespace:Jt,addClassesToNamespace:es,getNamespace:Zt,getNamespaces:$t,setCssStyle:ts,getData:ss},is=u(e=>`g.classGroup text { + fill: ${e.nodeBorder||e.classText}; + stroke: none; + font-family: ${e.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${e.classText}; +} +.edgeLabel .label rect { + fill: ${e.mainBkg}; +} +.label text { + fill: ${e.classText}; +} + +.labelBkg { + background: ${e.mainBkg}; +} +.edgeLabel .label span { + background: ${e.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.classGroup line { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${e.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${e.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} +`,"getStyles"),hs=is,ns=u((e,i="TB")=>{if(!e.doc)return i;let a=i;for(const l of e.doc)l.stmt==="dir"&&(a=l.value);return a},"getDir"),as=u(function(e,i){return i.db.getClasses()},"getClasses"),rs=u(async function(e,i,a,l){ze.info("REF0:"),ze.info("Drawing class diagram (v3)",i);const{securityLevel:c,state:r,layout:A}=D(),f=l.db.getData(),T=mt(i,c);f.type=l.type,f.layoutAlgorithm=vt(A),f.nodeSpacing=(r==null?void 0:r.nodeSpacing)||50,f.rankSpacing=(r==null?void 0:r.rankSpacing)||50,f.markers=["aggregation","extension","composition","dependency","lollipop"],f.diagramId=i,await Nt(f,T);const S=8;Qe.insertTitle(T,"classDiagramTitleText",(r==null?void 0:r.titleTopMargin)??25,l.db.getDiagramTitle()),Et(T,S,"classDiagram",(r==null?void 0:r.useMaxWidth)??!0)},"draw"),ps={getClasses:as,draw:rs,getDir:ns};export{cs as a,ps as b,os as c,hs as s}; diff --git a/assets/chunks/chunk-TMUBEWPD.DdUvJo-R.js b/assets/chunks/chunk-TMUBEWPD.DdUvJo-R.js new file mode 100644 index 00000000..a0f1d9fb --- /dev/null +++ b/assets/chunks/chunk-TMUBEWPD.DdUvJo-R.js @@ -0,0 +1 @@ +import{_ as l}from"../app.CXGmg8Jv.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p}; diff --git a/assets/chunks/classDiagram-LNE6IOMH.DdJyZtDn.js b/assets/chunks/classDiagram-LNE6IOMH.DdJyZtDn.js new file mode 100644 index 00000000..6e970991 --- /dev/null +++ b/assets/chunks/classDiagram-LNE6IOMH.DdJyZtDn.js @@ -0,0 +1 @@ +import{c as s,a as r,b as e,s as t}from"./chunk-T2TOU4HS.BecFh13f.js";import{_ as l}from"../app.CXGmg8Jv.js";import"./chunk-5HRBRIJM.CiC8nwb0.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";var p={parser:s,db:r,renderer:e,styles:t,init:l(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute,r.clear()},"init")};export{p as diagram}; diff --git a/assets/chunks/classDiagram-v2-MQ7JQ4JX.DdJyZtDn.js b/assets/chunks/classDiagram-v2-MQ7JQ4JX.DdJyZtDn.js new file mode 100644 index 00000000..6e970991 --- /dev/null +++ b/assets/chunks/classDiagram-v2-MQ7JQ4JX.DdJyZtDn.js @@ -0,0 +1 @@ +import{c as s,a as r,b as e,s as t}from"./chunk-T2TOU4HS.BecFh13f.js";import{_ as l}from"../app.CXGmg8Jv.js";import"./chunk-5HRBRIJM.CiC8nwb0.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";var p={parser:s,db:r,renderer:e,styles:t,init:l(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute,r.clear()},"init")};export{p as diagram}; diff --git a/assets/chunks/clone.b2N_W2Ea.js b/assets/chunks/clone.b2N_W2Ea.js new file mode 100644 index 00000000..bcbcd48d --- /dev/null +++ b/assets/chunks/clone.b2N_W2Ea.js @@ -0,0 +1 @@ +import{b as r}from"./baseUniq.DbzeOdwK.js";var e=4;function a(o){return r(o,e)}export{a as c}; diff --git a/assets/chunks/cytoscape.esm.FpOb6hff.js b/assets/chunks/cytoscape.esm.FpOb6hff.js new file mode 100644 index 00000000..e2ff6b7d --- /dev/null +++ b/assets/chunks/cytoscape.esm.FpOb6hff.js @@ -0,0 +1,16 @@ +function Ue(r){"@babel/helpers - typeof";return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ue(r)}function ii(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Hu(r,e){for(var t=0;tr.length)&&(e=r.length);for(var t=0,a=new Array(e);t=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,o;return{s:function(){t=t.call(r)},n:function(){var l=t.next();return i=l.done,l},e:function(l){s=!0,o=l},f:function(){try{!i&&t.return!=null&&t.return()}finally{if(s)throw o}}}}var Ke=typeof window>"u"?null:window,Oi=Ke?Ke.navigator:null;Ke&&Ke.document;var Uu=Ue(""),Qs=Ue({}),Yu=Ue(function(){}),Xu=typeof HTMLElement>"u"?"undefined":Ue(HTMLElement),wa=function(e){return e&&e.instanceString&&qe(e.instanceString)?e.instanceString():null},ce=function(e){return e!=null&&Ue(e)==Uu},qe=function(e){return e!=null&&Ue(e)===Yu},Oe=function(e){return!yr(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Te=function(e){return e!=null&&Ue(e)===Qs&&!Oe(e)&&e.constructor===Object},Zu=function(e){return e!=null&&Ue(e)===Qs},ne=function(e){return e!=null&&Ue(e)===Ue(1)&&!isNaN(e)},Qu=function(e){return ne(e)&&Math.floor(e)===e},_a=function(e){if(Xu!=="undefined")return e!=null&&e instanceof HTMLElement},yr=function(e){return xa(e)||Js(e)},xa=function(e){return wa(e)==="collection"&&e._private.single},Js=function(e){return wa(e)==="collection"&&!e._private.single},oi=function(e){return wa(e)==="core"},_s=function(e){return wa(e)==="stylesheet"},Ju=function(e){return wa(e)==="event"},jr=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},_u=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},ju=function(e){return Te(e)&&ne(e.x1)&&ne(e.x2)&&ne(e.y1)&&ne(e.y2)},el=function(e){return Zu(e)&&qe(e.then)},rl=function(){return Oi&&Oi.userAgent.match(/msie|trident|edge/i)},la=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;st?1:0},ul=function(e,t){return-1*eo(e,t)},pe=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t1&&(p-=1),p<1/6?d+(y-d)*6*p:p<1/2?y:p<2/3?d+(y-d)*(2/3-p)*6:d}var f=new RegExp("^"+nl+"$").exec(e);if(f){if(a=parseInt(f[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(f[2]),n<0||n>100||(n=n/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,h=2*i-c;o=Math.round(255*v(h,c,a+1/3)),l=Math.round(255*v(h,c,a)),u=Math.round(255*v(h,c,a-1/3))}t=[o,l,u,s]}return t},fl=function(e){var t,a=new RegExp("^"+tl+"$").exec(e);if(a){t=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;t.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;t.push(u)}}return t},cl=function(e){return hl[e.toLowerCase()]},dl=function(e){return(Oe(e)?e:null)||cl(e)||ll(e)||fl(e)||vl(e)},hl={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},ro=function(e){for(var t=e.map,a=e.keys,n=a.length,i=0;i=e||x<0||f&&D>=i}function g(){var E=Mn();if(p(E))return m(E);o=setTimeout(g,y(E))}function m(E){return o=void 0,c&&a?h(E):(a=n=void 0,s)}function b(){o!==void 0&&clearTimeout(o),u=0,a=l=n=o=void 0}function w(){return o===void 0?s:m(Mn())}function S(){var E=Mn(),x=p(E);if(a=arguments,n=this,l=E,x){if(o===void 0)return d(l);if(f)return clearTimeout(o),o=setTimeout(g,e),h(l)}return o===void 0&&(o=setTimeout(g,e)),s}return S.cancel=b,S.flush=w,S}var cn=_l,Ln=Ke?Ke.performance:null,io=Ln&&Ln.now?function(){return Ln.now()}:function(){return Date.now()},jl=function(){if(Ke){if(Ke.requestAnimationFrame)return function(r){Ke.requestAnimationFrame(r)};if(Ke.mozRequestAnimationFrame)return function(r){Ke.mozRequestAnimationFrame(r)};if(Ke.webkitRequestAnimationFrame)return function(r){Ke.webkitRequestAnimationFrame(r)};if(Ke.msRequestAnimationFrame)return function(r){Ke.msRequestAnimationFrame(r)}}return function(r){r&&setTimeout(function(){r(io())},1e3/60)}}(),ja=function(e){return jl(e)},Hr=io,kt=9261,so=65599,aa=5381,oo=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:kt,a=t,n;n=e.next(),!n.done;)a=a*so+n.value|0;return a},va=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:kt;return t*so+e|0},fa=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:aa;return(t<<5)+t+e|0},ev=function(e,t){return e*2097152+t},Yr=function(e){return e[0]*2097152+e[1]},La=function(e,t){return[va(e[0],t[0]),fa(e[1],t[1])]},rv=function(e,t){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n=0;n--)e[n]===t&&e.splice(n,1)},fi=function(e){e.splice(0,e.length)},uv=function(e,t){for(var a=0;a"u"?"undefined":Ue(Set))!==vv?Set:fv,dn=function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!oi(e)){$e("An element must have a core reference and parameters set");return}var n=t.group;if(n==null&&(t.data&&t.data.source!=null&&t.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){$e("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0?!0:!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0?!0:!!t.grabbable,pannable:t.pannable===void 0?n==="edges":!!t.pannable,active:!1,classes:new Vt,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),t.renderedPosition){var s=t.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];Oe(t.classes)?u=t.classes:ce(t.classes)&&(u=t.classes.split(/\s+/));for(var v=0,f=u.length;vm?1:0},v=function(g,m,b,w,S){var E;if(b==null&&(b=0),S==null&&(S=a),b<0)throw new Error("lo must be non-negative");for(w==null&&(w=g.length);bM;0<=M?C++:C--)D.push(C);return D}).apply(this).reverse(),x=[],w=0,S=E.length;wP;0<=P?++D:--D)B.push(s(g,b));return B},y=function(g,m,b,w){var S,E,x;for(w==null&&(w=a),S=g[b];b>m;){if(x=b-1>>1,E=g[x],w(S,E)<0){g[b]=E,b=x;continue}break}return g[b]=S},p=function(g,m,b){var w,S,E,x,D;for(b==null&&(b=a),S=g.length,D=m,E=g[m],w=2*m+1;w0;){var E=m.pop(),x=p(E),D=E.id();if(c[D]=x,x!==1/0)for(var C=E.neighborhood().intersect(d),M=0;M0)for(I.unshift(R);f[G];){var F=f[G];I.unshift(F.edge),I.unshift(F.node),V=F.node,G=V.id()}return o.spawn(I)}}}},gv={kruskal:function(e){e=e||function(b){return 1};for(var t=this.byGroup(),a=t.nodes,n=t.edges,i=a.length,s=new Array(i),o=a,l=function(w){for(var S=0;S0;){if(S(),x++,w===v){for(var D=[],C=i,M=v,P=g[M];D.unshift(C),P!=null&&D.unshift(P),C=p[M],C!=null;)M=C.id(),P=g[M];return{found:!0,distance:f[w],path:this.spawn(D),steps:x}}h[w]=!0;for(var B=b._private.edges,L=0;LP&&(d[M]=P,m[M]=C,b[M]=S),!i){var B=C*v+D;!i&&d[B]>P&&(d[B]=P,m[B]=D,b[B]=S)}}}for(var L=0;L1&&arguments[1]!==void 0?arguments[1]:s,Le=b(oe),Ce=[],xe=Le;;){if(xe==null)return t.spawn();var Ae=m(xe),Ee=Ae.edge,Pe=Ae.pred;if(Ce.unshift(xe[0]),xe.same(de)&&Ce.length>0)break;Ee!=null&&Ce.unshift(Ee),xe=Pe}return l.spawn(Ce)},E=0;E=0;v--){var f=u[v],c=f[1],h=f[2];(t[c]===o&&t[h]===l||t[c]===l&&t[h]===o)&&u.splice(v,1)}for(var d=0;dn;){var i=Math.floor(Math.random()*t.length);t=Cv(i,e,t),a--}return t},Sv={kargerStein:function(){var e=this,t=this.byGroup(),a=t.nodes,n=t.edges;n.unmergeBy(function(I){return I.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/Ev);if(i<2){$e("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],v=0;v1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=t;s1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(t,a):(a0&&e.splice(0,t));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(c,h){return c-h});var v=e.length,f=Math.floor(v/2);return v%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},Mv=function(e){return Math.PI*e/180},Aa=function(e,t){return Math.atan2(t,e)-Math.PI/2},ci=Math.log2||function(r){return Math.log(r)/Math.log(2)},go=function(e){return e>0?1:e<0?-1:0},ht=function(e,t){return Math.sqrt(ot(e,t))},ot=function(e,t){var a=t.x-e.x,n=t.y-e.y;return a*a+n*n},Lv=function(e){for(var t=e.length,a=0,n=0;n=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Rv=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},Ov=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},Iv=function(e,t,a){return{x1:e.x1+t,x2:e.x2+t,y1:e.y1+a,y2:e.y2+a,w:e.w,h:e.h}},po=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},zv=function(e,t,a){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},Ga=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Ka=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(t.length===1)a=n=i=s=t[0];else if(t.length===2)a=i=t[0],s=n=t[1];else if(t.length===4){var o=Tr(t,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Hi=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},di=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},It=function(e,t,a){return e.x1<=t&&t<=e.x2&&e.y1<=a&&a<=e.y2},Nv=function(e,t){return It(e,t.x,t.y)},yo=function(e,t){return It(e,t.x1,t.y1)&&It(e,t.x2,t.y2)},mo=function(e,t,a,n,i,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?gt(i,s):l,v=i/2,f=s/2;u=Math.min(u,v,f);var c=u!==v,h=u!==f,d;if(c){var y=a-v+u-o,p=n-f-o,g=a+v-u+o,m=p;if(d=Qr(e,t,a,n,y,p,g,m,!1),d.length>0)return d}if(h){var b=a+v+o,w=n-f+u-o,S=b,E=n+f-u+o;if(d=Qr(e,t,a,n,b,w,S,E,!1),d.length>0)return d}if(c){var x=a-v+u-o,D=n+f+o,C=a+v-u+o,M=D;if(d=Qr(e,t,a,n,x,D,C,M,!1),d.length>0)return d}if(h){var P=a-v-o,B=n-f+u-o,L=P,k=n+f-u+o;if(d=Qr(e,t,a,n,P,B,L,k,!1),d.length>0)return d}var O;{var A=a-v+u,R=n-f+u;if(O=na(e,t,a,n,A,R,u+o),O.length>0&&O[0]<=A&&O[1]<=R)return[O[0],O[1]]}{var I=a+v-u,V=n-f+u;if(O=na(e,t,a,n,I,V,u+o),O.length>0&&O[0]>=I&&O[1]<=V)return[O[0],O[1]]}{var G=a+v-u,F=n+f-u;if(O=na(e,t,a,n,G,F,u+o),O.length>0&&O[0]>=G&&O[1]>=F)return[O[0],O[1]]}{var q=a-v+u,Y=n+f-u;if(O=na(e,t,a,n,q,Y,u+o),O.length>0&&O[0]<=q&&O[1]>=Y)return[O[0],O[1]]}return[]},Fv=function(e,t,a,n,i,s,o){var l=o,u=Math.min(a,i),v=Math.max(a,i),f=Math.min(n,s),c=Math.max(n,s);return u-l<=e&&e<=v+l&&f-l<=t&&t<=c+l},Vv=function(e,t,a,n,i,s,o,l,u){var v={x1:Math.min(a,o,i)-u,x2:Math.max(a,o,i)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(ev.x2||tv.y2)},qv=function(e,t,a,n){a-=n;var i=t*t-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-t+s)/o,u=(-t-s)/o;return[l,u]},$v=function(e,t,a,n,i){var s=1e-5;e===0&&(e=s),t/=e,a/=e,n/=e;var o,l,u,v,f,c,h,d;if(l=(3*a-t*t)/9,u=-(27*n)+t*(9*a-2*(t*t)),u/=54,o=l*l*l+u*u,i[1]=0,h=t/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),c=u-Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-h+f+c,h+=(f+c)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-c+f)/2,i[3]=h,i[5]=-h;return}if(i[5]=i[3]=0,o===0){d=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-h+2*d,i[4]=i[2]=-(d+h);return}l=-l,v=l*l*l,v=Math.acos(u/Math.sqrt(v)),d=2*Math.sqrt(l),i[0]=-h+d*Math.cos(v/3),i[2]=-h+d*Math.cos((v+2*Math.PI)/3),i[4]=-h+d*Math.cos((v+4*Math.PI)/3)},Hv=function(e,t,a,n,i,s,o,l){var u=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,v=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,f=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*l-n*t+2*s*s+2*s*t-l*t,c=1*a*i-a*a+a*e-i*e+n*s-n*n+n*t-s*t,h=[];$v(u,v,f,c,h);for(var d=1e-7,y=[],p=0;p<6;p+=2)Math.abs(h[p+1])=0&&h[p]<=1&&y.push(h[p]);y.push(1),y.push(0);for(var g=-1,m,b,w,S=0;S=0?wu?(e-i)*(e-i)+(t-s)*(t-s):v-c},dr=function(e,t,a){for(var n,i,s,o,l,u=0,v=0;v=e&&e>=s||n<=e&&e<=s)l=(e-n)/(s-n)*(o-i)+i,l>t&&u++;else continue;return u%2!==0},Gr=function(e,t,a,n,i,s,o,l,u){var v=new Array(a.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var c=Math.cos(-f),h=Math.sin(-f),d=0;d0){var p=tn(v,-u);y=rn(p)}else y=v;return dr(e,t,y)},Kv=function(e,t,a,n,i,s,o,l){for(var u=new Array(a.length*2),v=0;v=0&&p<=1&&m.push(p),g>=0&&g<=1&&m.push(g),m.length===0)return[];var b=m[0]*l[0]+e,w=m[0]*l[1]+t;if(m.length>1){if(m[0]==m[1])return[b,w];var S=m[1]*l[0]+e,E=m[1]*l[1]+t;return[b,w,S,E]}else return[b,w]},Rn=function(e,t,a){return t<=e&&e<=a||a<=e&&e<=t?e:e<=t&&t<=a||a<=t&&t<=e?t:a},Qr=function(e,t,a,n,i,s,o,l,u){var v=e-i,f=a-e,c=o-i,h=t-s,d=n-t,y=l-s,p=c*h-y*v,g=f*h-d*v,m=y*f-c*d;if(m!==0){var b=p/m,w=g/m,S=.001,E=0-S,x=1+S;return E<=b&&b<=x&&E<=w&&w<=x?[e+b*f,t+b*d]:u?[e+b*f,t+b*d]:[]}else return p===0||g===0?Rn(e,a,o)===o?[o,l]:Rn(e,a,i)===i?[i,s]:Rn(i,o,a)===a?[a,n]:[]:[]},ha=function(e,t,a,n,i,s,o,l){var u=[],v,f=new Array(a.length),c=!0;s==null&&(c=!1);var h;if(c){for(var d=0;d0){var y=tn(f,-l);h=rn(y)}else h=f}else h=a;for(var p,g,m,b,w=0;w2){for(var d=[v[0],v[1]],y=Math.pow(d[0]-e,2)+Math.pow(d[1]-t,2),p=1;pv&&(v=w)},get:function(b){return u[b]}},c=0;c0?A=O.edgesTo(k)[0]:A=k.edgesTo(O)[0];var R=n(A);k=k.id(),D[k]>D[B]+R&&(D[k]=D[B]+R,C.nodes.indexOf(k)<0?C.push(k):C.updateItem(k),x[k]=0,E[k]=[]),D[k]==D[B]+R&&(x[k]=x[k]+x[B],E[k].push(B))}else for(var I=0;I0;){for(var q=S.pop(),Y=0;Y0&&o.push(a[l]);o.length!==0&&i.push(n.collection(o))}return i},of=function(e,t){for(var a=0;a5&&arguments[5]!==void 0?arguments[5]:vf,o=n,l,u,v=0;v=2?_t(e,t,a,0,Yi,ff):_t(e,t,a,0,Ui)},squaredEuclidean:function(e,t,a){return _t(e,t,a,0,Yi)},manhattan:function(e,t,a){return _t(e,t,a,0,Ui)},max:function(e,t,a){return _t(e,t,a,-1/0,cf)}};zt["squared-euclidean"]=zt.squaredEuclidean;zt.squaredeuclidean=zt.squaredEuclidean;function gn(r,e,t,a,n,i){var s;return qe(r)?s=r:s=zt[r]||zt.euclidean,e===0&&qe(r)?s(n,i):s(e,t,a,n,i)}var df=rr({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),gi=function(e){return df(e)},an=function(e,t,a,n,i){var s=i!=="kMedoids",o=s?function(f){return a[f]}:function(f){return n[f](a)},l=function(c){return n[c](t)},u=a,v=t;return gn(e,n.length,o,l,u,v)},On=function(e,t,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(t),l=null,u=0;ua)return!1}return!0},pf=function(e,t,a){for(var n=0;no&&(o=t[u][v],l=v);i[l].push(e[u])}for(var f=0;f=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var d=t[s],y=t[n[s]],p;i.mode==="dendrogram"?p={left:d,right:y,key:d.key}:p={value:d.value.concat(y.value),key:d.key},e[d.index]=p,e.splice(y.index,1),t[d.key]=p;for(var g=0;ga[y.key][m.key]&&(l=a[y.key][m.key])):i.linkage==="max"?(l=a[d.key][m.key],a[d.key][m.key]0&&n.push(i);return n},ji=function(e,t,a){for(var n=[],i=0;io&&(s=u,o=t[i*e+u])}s>0&&n.push(s)}for(var v=0;vu&&(l=v,u=f)}a[i]=s[l]}return n=ji(e,t,a),n},es=function(e){for(var t=this.cy(),a=this.nodes(),n=Mf(e),i={},s=0;s=P?(B=P,P=k,L=O):k>B&&(B=k);for(var A=0;A0?1:0;x[C%n.minIterations*o+q]=Y,F+=Y}if(F>0&&(C>=n.minIterations-1||C==n.maxIterations-1)){for(var Q=0,J=0;J1||E>1)&&(o=!0),f[b]=[],m.outgoers().forEach(function(D){D.isEdge()&&f[b].push(D.id())})}else c[b]=[void 0,m.target().id()]}):s.forEach(function(m){var b=m.id();if(m.isNode()){var w=m.degree(!0);w%2&&(l?u?o=!0:u=b:l=b),f[b]=[],m.connectedEdges().forEach(function(S){return f[b].push(S.id())})}else c[b]=[m.source().id(),m.target().id()]});var h={found:!1,trail:void 0};if(o)return h;if(u&&l)if(i){if(v&&u!=v)return h;v=u}else{if(v&&u!=v&&l!=v)return h;v||(v=u)}else v||(v=s[0].id());var d=function(b){for(var w=b,S=[b],E,x,D;f[w].length;)E=f[w].shift(),x=c[E][0],D=c[E][1],w!=D?(f[D]=f[D].filter(function(C){return C!=E}),w=D):!i&&w!=x&&(f[x]=f[x].filter(function(C){return C!=E}),w=x),S.unshift(E),S.unshift(w);return S},y=[],p=[];for(p=d(v);p.length!=1;)f[p[0]].length==0?(y.unshift(s.getElementById(p.shift())),y.unshift(s.getElementById(p.shift()))):p=d(p.shift()).concat(p);y.unshift(s.getElementById(p.shift()));for(var g in f)if(f[g].length)return h;return h.found=!0,h.trail=this.spawn(y,!0),h}},Ia=function(){var e=this,t={},a=0,n=0,i=[],s=[],o={},l=function(c,h){for(var d=s.length-1,y=[],p=e.spawn();s[d].x!=c||s[d].y!=h;)y.push(s.pop().edge),d--;y.push(s.pop().edge),y.forEach(function(g){var m=g.connectedNodes().intersection(e);p.merge(g),m.forEach(function(b){var w=b.id(),S=b.connectedEdges().intersection(e);p.merge(b),t[w].cutVertex?p.merge(S.filter(function(E){return E.isLoop()})):p.merge(S)})}),i.push(p)},u=function f(c,h,d){c===d&&(n+=1),t[h]={id:a,low:a++,cutVertex:!1};var y=e.getElementById(h).connectedEdges().intersection(e);if(y.size()===0)i.push(e.spawn(e.getElementById(h)));else{var p,g,m,b;y.forEach(function(w){p=w.source().id(),g=w.target().id(),m=p===h?g:p,m!==d&&(b=w.id(),o[b]||(o[b]=!0,s.push({x:h,y:m,edge:w})),m in t?t[h].low=Math.min(t[h].low,t[m].id):(f(c,m,h),t[h].low=Math.min(t[h].low,t[m].low),t[h].id<=t[m].low&&(t[h].cutVertex=!0,l(h,m))))})}};e.forEach(function(f){if(f.isNode()){var c=f.id();c in t||(n=0,u(c,c),t[c].cutVertex=n>1)}});var v=Object.keys(t).filter(function(f){return t[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(v),components:i}},Ff={hopcroftTarjanBiconnected:Ia,htbc:Ia,htb:Ia,hopcroftTarjanBiconnectedComponents:Ia},za=function(){var e=this,t={},a=0,n=[],i=[],s=e.spawn(e),o=function l(u){i.push(u),t[u]={index:a,low:a++,explored:!1};var v=e.getElementById(u).connectedEdges().intersection(e);if(v.forEach(function(y){var p=y.target().id();p!==u&&(p in t||l(p),t[p].explored||(t[u].low=Math.min(t[u].low,t[p].low)))}),t[u].index===t[u].low){for(var f=e.spawn();;){var c=i.pop();if(f.merge(e.getElementById(c)),t[c].low=t[u].index,t[c].explored=!0,c===u)break}var h=f.edgesWith(f),d=f.merge(h);n.push(d),s=s.difference(d)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in t||o(u)}}),{cut:s,components:n}},Vf={tarjanStronglyConnected:za,tsc:za,tscc:za,tarjanStronglyConnectedComponents:za},To={};[ca,hv,gv,yv,bv,xv,Sv,Zv,Lt,At,Wn,lf,Ef,Pf,If,Nf,Ff,Vf].forEach(function(r){pe(To,r)});/*! +Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable +Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) +Licensed under The MIT License (http://opensource.org/licenses/MIT) +*/var Do=0,ko=1,Po=2,Kr=function r(e){if(!(this instanceof r))return new r(e);this.id="Thenable/1.0.7",this.state=Do,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Kr.prototype={fulfill:function(e){return rs(this,ko,"fulfillValue",e)},reject:function(e){return rs(this,Po,"rejectReason",e)},then:function(e,t){var a=this,n=new Kr;return a.onFulfilled.push(as(e,n,"fulfill")),a.onRejected.push(as(t,n,"reject")),Bo(a),n.proxy}};var rs=function(e,t,a,n){return e.state===Do&&(e.state=t,e[a]=n,Bo(e)),e},Bo=function(e){e.state===ko?ts(e,"onFulfilled",e.fulfillValue):e.state===Po&&ts(e,"onRejected",e.rejectReason)},ts=function(e,t,a){if(e[t].length!==0){var n=e[t];e[t]=[];var i=function(){for(var o=0;o0}},clearQueue:function(){return function(){var t=this,a=t.length!==void 0,n=a?t:[t],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var s=0;s-1}var Uc=Wc;function Yc(r,e){var t=this.__data__,a=yn(t,r);return a<0?(++this.size,t.push([r,e])):t[a][1]=e,this}var Xc=Yc;function Ht(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e-1&&r%1==0&&r0&&this.spawn(n).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},toggleClass:function(e,t){Oe(e)||(e=e.match(/\S+/g)||[]);for(var a=this,n=t===void 0,i=[],s=0,o=a.length;s0&&this.spawn(i).updateStyle().emit("class"),a},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var a=this;if(t==null)t=250;else if(t===0)return a;return a.addClass(e),setTimeout(function(){a.removeClass(e)},t),a}};Wa.className=Wa.classNames=Wa.classes;var Se={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:We,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Se.variable="(?:[\\w-.]|(?:\\\\"+Se.metaChar+"))+";Se.className="(?:[\\w-]|(?:\\\\"+Se.metaChar+"))+";Se.value=Se.string+"|"+Se.number;Se.id=Se.variable;(function(){var r,e,t;for(r=Se.comparatorOp.split("|"),t=0;t=0)&&e!=="="&&(Se.comparatorOp+="|\\!"+e)})();var Re=function(){return{checks:[]}},ue={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},Yn=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(r,e){return ul(r.selector,e.selector)}),_d=function(){for(var r={},e,t=0;t0&&v.edgeCount>0)return Me("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(v.edgeCount>1)return Me("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;v.edgeCount===1&&Me("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},nh=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(v){return v??""},t=function(v){return ce(v)?'"'+v+'"':e(v)},a=function(v){return" "+v+" "},n=function(v,f){var c=v.type,h=v.value;switch(c){case ue.GROUP:{var d=e(h);return d.substring(0,d.length-1)}case ue.DATA_COMPARE:{var y=v.field,p=v.operator;return"["+y+a(e(p))+t(h)+"]"}case ue.DATA_BOOL:{var g=v.operator,m=v.field;return"["+e(g)+m+"]"}case ue.DATA_EXIST:{var b=v.field;return"["+b+"]"}case ue.META_COMPARE:{var w=v.operator,S=v.field;return"[["+S+a(e(w))+t(h)+"]]"}case ue.STATE:return h;case ue.ID:return"#"+h;case ue.CLASS:return"."+h;case ue.PARENT:case ue.CHILD:return i(v.parent,f)+a(">")+i(v.child,f);case ue.ANCESTOR:case ue.DESCENDANT:return i(v.ancestor,f)+" "+i(v.descendant,f);case ue.COMPOUND_SPLIT:{var E=i(v.left,f),x=i(v.subject,f),D=i(v.right,f);return E+(E.length>0?" ":"")+x+D}case ue.TRUE:return""}},i=function(v,f){return v.checks.reduce(function(c,h,d){return c+(f===v&&d===0?"$":"")+n(h,f)},"")},s="",o=0;o1&&o=0&&(t=t.replace("!",""),f=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),v=!0),(i||o||v)&&(l=!i&&!s?"":""+e,u=""+a),v&&(e=l=l.toLowerCase(),a=u=u.toLowerCase()),t){case"*=":n=l.indexOf(u)>=0;break;case"$=":n=l.indexOf(u,l.length-u.length)>=0;break;case"^=":n=l.indexOf(u)===0;break;case"=":n=e===a;break;case">":c=!0,n=e>a;break;case">=":c=!0,n=e>=a;break;case"<":c=!0,n=e0;){var v=n.shift();e(v),i.add(v.id()),o&&a(n,i,v)}return r}function Fo(r,e,t){if(t.isParent())for(var a=t._private.children,n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;return wi(this,r,e,Fo)};function Vo(r,e,t){if(t.isChild()){var a=t._private.parent;e.has(a.id())||r.push(a)}}Nt.forEachUp=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return wi(this,r,e,Vo)};function ch(r,e,t){Vo(r,e,t),Fo(r,e,t)}Nt.forEachUpAndDown=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return wi(this,r,e,ch)};Nt.ancestors=Nt.parents;var pa,qo;pa=qo={data:Be.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Be.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Be.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Be.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Be.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Be.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};pa.attr=pa.data;pa.removeAttr=pa.removeData;var dh=qo,bn={};function zn(r){return function(e){var t=this;if(e===void 0&&(e=!0),t.length!==0)if(t.isNode()&&!t.removed()){for(var a=0,n=t[0],i=n._private.edges,s=0;se}),minIndegree:Et("indegree",function(r,e){return re}),minOutdegree:Et("outdegree",function(r,e){return re})});pe(bn,{totalDegree:function(e){for(var t=0,a=this.nodes(),n=0;n0,c=f;f&&(v=v[0]);var h=c?v.position():{x:0,y:0};t!==void 0?u.position(e,t+h[e]):i!==void 0&&u.position({x:i.x+h.x,y:i.y+h.y})}else{var d=a.position(),y=o?a.parent():null,p=y&&y.length>0,g=p;p&&(y=y[0]);var m=g?y.position():{x:0,y:0};return i={x:d.x-m.x,y:d.y-m.y},e===void 0?i:i[e]}else if(!s)return;return this}};Pr.modelPosition=Pr.point=Pr.position;Pr.modelPositions=Pr.points=Pr.positions;Pr.renderedPoint=Pr.renderedPosition;Pr.relativePoint=Pr.relativePosition;var hh=$o,Rt,nt;Rt=nt={};nt.renderedBoundingBox=function(r){var e=this.boundingBox(r),t=this.cy(),a=t.zoom(),n=t.pan(),i=e.x1*a+n.x,s=e.x2*a+n.x,o=e.y1*a+n.y,l=e.y2*a+n.y;return{x1:i,x2:s,y1:o,y2:l,w:s-i,h:l-o}};nt.dirtyCompoundBoundsCache=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(t){if(t.isParent()){var a=t._private;a.compoundBoundsClean=!1,a.bbCache=null,r||t.emitAndNotify("bounds")}}),this)};nt.updateCompoundBounds=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!r&&e.batching())return this;function t(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",v={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),c=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=c.x-f.w/2,f.x2=c.x+f.w/2,f.y1=c.y-f.h/2,f.y2=c.y+f.h/2);function h(C,M,P){var B=0,L=0,k=M+P;return C>0&&k>0&&(B=M/k*C,L=P/k*C),{biasDiff:B,biasComplementDiff:L}}function d(C,M,P,B){if(P.units==="%")switch(B){case"width":return C>0?P.pfValue*C:0;case"height":return M>0?P.pfValue*M:0;case"average":return C>0&&M>0?P.pfValue*(C+M)/2:0;case"min":return C>0&&M>0?C>M?P.pfValue*M:P.pfValue*C:0;case"max":return C>0&&M>0?C>M?P.pfValue*C:P.pfValue*M:0;default:return 0}else return P.units==="px"?P.pfValue:0}var y=v.width.left.value;v.width.left.units==="px"&&v.width.val>0&&(y=y*100/v.width.val);var p=v.width.right.value;v.width.right.units==="px"&&v.width.val>0&&(p=p*100/v.width.val);var g=v.height.top.value;v.height.top.units==="px"&&v.height.val>0&&(g=g*100/v.height.val);var m=v.height.bottom.value;v.height.bottom.units==="px"&&v.height.val>0&&(m=m*100/v.height.val);var b=h(v.width.val-f.w,y,p),w=b.biasDiff,S=b.biasComplementDiff,E=h(v.height.val-f.h,g,m),x=E.biasDiff,D=E.biasComplementDiff;o.autoPadding=d(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,v.width.val),c.x=(-w+f.x1+f.x2+S)/2,o.autoHeight=Math.max(f.h,v.height.val),c.y=(-x+f.y1+f.y2+D)/2}for(var a=0;ae.x2?n:e.x2,e.y1=ae.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},ut=function(e,t){return t==null?e:Dr(e,t.x1,t.y1,t.x2,t.y2)},jt=function(e,t,a){return kr(e,t,a)},Na=function(e,t,a){if(!t.cy().headless()){var n=t._private,i=n.rstyle,s=i.arrowWidth/2,o=t.pstyle(a+"-arrow-shape").value,l,u;if(o!=="none"){a==="source"?(l=i.srcX,u=i.srcY):a==="target"?(l=i.tgtX,u=i.tgtY):(l=i.midX,u=i.midY);var v=n.arrowBounds=n.arrowBounds||{},f=v[a]=v[a]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,Ga(f,1),Dr(e,f.x1,f.y1,f.x2,f.y2)}}},Nn=function(e,t,a){if(!t.cy().headless()){var n;a?n=a+"-":n="";var i=t._private,s=i.rstyle,o=t.pstyle(n+"label").strValue;if(o){var l=t.pstyle("text-halign"),u=t.pstyle("text-valign"),v=jt(s,"labelWidth",a),f=jt(s,"labelHeight",a),c=jt(s,"labelX",a),h=jt(s,"labelY",a),d=t.pstyle(n+"text-margin-x").pfValue,y=t.pstyle(n+"text-margin-y").pfValue,p=t.isEdge(),g=t.pstyle(n+"text-rotation"),m=t.pstyle("text-outline-width").pfValue,b=t.pstyle("text-border-width").pfValue,w=b/2,S=t.pstyle("text-background-padding").pfValue,E=2,x=f,D=v,C=D/2,M=x/2,P,B,L,k;if(p)P=c-C,B=c+C,L=h-M,k=h+M;else{switch(l.value){case"left":P=c-D,B=c;break;case"center":P=c-C,B=c+C;break;case"right":P=c,B=c+D;break}switch(u.value){case"top":L=h-x,k=h;break;case"center":L=h-M,k=h+M;break;case"bottom":L=h,k=h+x;break}}var O=d-Math.max(m,w)-S-E,A=d+Math.max(m,w)+S+E,R=y-Math.max(m,w)-S-E,I=y+Math.max(m,w)+S+E;P+=O,B+=A,L+=R,k+=I;var V=a||"main",G=i.labelBounds,F=G[V]=G[V]||{};F.x1=P,F.y1=L,F.x2=B,F.y2=k,F.w=B-P,F.h=k-L,F.leftPad=O,F.rightPad=A,F.topPad=R,F.botPad=I;var q=p&&g.strValue==="autorotate",Y=g.pfValue!=null&&g.pfValue!==0;if(q||Y){var Q=q?jt(i.rstyle,"labelAngle",a):g.pfValue,J=Math.cos(Q),_=Math.sin(Q),j=(P+B)/2,W=(L+k)/2;if(!p){switch(l.value){case"left":j=B;break;case"right":j=P;break}switch(u.value){case"top":W=k;break;case"bottom":W=L;break}}var z=function(le,oe){return le=le-j,oe=oe-W,{x:le*J-oe*_+j,y:le*_+oe*J+W}},K=z(P,L),X=z(P,k),ae=z(B,L),he=z(B,k);P=Math.min(K.x,X.x,ae.x,he.x),B=Math.max(K.x,X.x,ae.x,he.x),L=Math.min(K.y,X.y,ae.y,he.y),k=Math.max(K.y,X.y,ae.y,he.y)}var te=V+"Rot",re=G[te]=G[te]||{};re.x1=P,re.y1=L,re.x2=B,re.y2=k,re.w=B-P,re.h=k-L,Dr(e,P,L,B,k),Dr(i.labelBounds.all,P,L,B,k)}return e}},gh=function(e,t){if(!t.cy().headless()){var a=t.pstyle("outline-opacity").value,n=t.pstyle("outline-width").value;if(a>0&&n>0){var i=t.pstyle("outline-offset").value,s=t.pstyle("shape").value,o=n+i,l=(e.w+o*2)/e.w,u=(e.h+o*2)/e.h,v=0,f=0;["diamond","pentagon","round-triangle"].includes(s)?(l=(e.w+o*2.4)/e.w,f=-o/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?l=(e.w+o*2.4)/e.w:s==="star"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.6)/e.h,f=-o/3.8):s==="triangle"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.4)/e.h,f=-o/1.4):s==="vee"&&(l=(e.w+o*4.4)/e.w,u=(e.h+o*3.8)/e.h,f=-o*.5);var c=e.h*u-e.h,h=e.w*l-e.w;if(Ka(e,[Math.ceil(c/2),Math.ceil(h/2)]),v!=0||f!==0){var d=Iv(e,v,f);po(e,d)}}}},ph=function(e,t){var a=e._private.cy,n=a.styleEnabled(),i=a.headless(),s=hr(),o=e._private,l=e.isNode(),u=e.isEdge(),v,f,c,h,d,y,p=o.rstyle,g=l&&n?e.pstyle("bounds-expansion").pfValue:[0],m=function(ve){return ve.pstyle("display").value!=="none"},b=!n||m(e)&&(!u||m(e.source())&&m(e.target()));if(b){var w=0,S=0;n&&t.includeOverlays&&(w=e.pstyle("overlay-opacity").value,w!==0&&(S=e.pstyle("overlay-padding").value));var E=0,x=0;n&&t.includeUnderlays&&(E=e.pstyle("underlay-opacity").value,E!==0&&(x=e.pstyle("underlay-padding").value));var D=Math.max(S,x),C=0,M=0;if(n&&(C=e.pstyle("width").pfValue,M=C/2),l&&t.includeNodes){var P=e.position();d=P.x,y=P.y;var B=e.outerWidth(),L=B/2,k=e.outerHeight(),O=k/2;v=d-L,f=d+L,c=y-O,h=y+O,Dr(s,v,c,f,h),n&&t.includeOutlines&&gh(s,e)}else if(u&&t.includeEdges)if(n&&!i){var A=e.pstyle("curve-style").strValue;if(v=Math.min(p.srcX,p.midX,p.tgtX),f=Math.max(p.srcX,p.midX,p.tgtX),c=Math.min(p.srcY,p.midY,p.tgtY),h=Math.max(p.srcY,p.midY,p.tgtY),v-=M,f+=M,c-=M,h+=M,Dr(s,v,c,f,h),A==="haystack"){var R=p.haystackPts;if(R&&R.length===2){if(v=R[0].x,c=R[0].y,f=R[1].x,h=R[1].y,v>f){var I=v;v=f,f=I}if(c>h){var V=c;c=h,h=V}Dr(s,v-M,c-M,f+M,h+M)}}else if(A==="bezier"||A==="unbundled-bezier"||A.endsWith("segments")||A.endsWith("taxi")){var G;switch(A){case"bezier":case"unbundled-bezier":G=p.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":G=p.linePts;break}if(G!=null)for(var F=0;Ff){var j=v;v=f,f=j}if(c>h){var W=c;c=h,h=W}v-=M,f+=M,c-=M,h+=M,Dr(s,v,c,f,h)}if(n&&t.includeEdges&&u&&(Na(s,e,"mid-source"),Na(s,e,"mid-target"),Na(s,e,"source"),Na(s,e,"target")),n){var z=e.pstyle("ghost").value==="yes";if(z){var K=e.pstyle("ghost-offset-x").pfValue,X=e.pstyle("ghost-offset-y").pfValue;Dr(s,s.x1+K,s.y1+X,s.x2+K,s.y2+X)}}var ae=o.bodyBounds=o.bodyBounds||{};Hi(ae,s),Ka(ae,g),Ga(ae,1),n&&(v=s.x1,f=s.x2,c=s.y1,h=s.y2,Dr(s,v-D,c-D,f+D,h+D));var he=o.overlayBounds=o.overlayBounds||{};Hi(he,s),Ka(he,g),Ga(he,1);var te=o.labelBounds=o.labelBounds||{};te.all!=null?Ov(te.all):te.all=hr(),n&&t.includeLabels&&(t.includeMainLabels&&Nn(s,e,null),u&&(t.includeSourceLabels&&Nn(s,e,"source"),t.includeTargetLabels&&Nn(s,e,"target")))}return s.x1=xr(s.x1),s.y1=xr(s.y1),s.x2=xr(s.x2),s.y2=xr(s.y2),s.w=xr(s.x2-s.x1),s.h=xr(s.y2-s.y1),s.w>0&&s.h>0&&b&&(Ka(s,g),Ga(s,1)),s},Go=function(e){var t=0,a=function(s){return(s?1:0)<0&&arguments[0]!==void 0?arguments[0]:Lh,e=arguments.length>1?arguments[1]:void 0,t=0;t=0;o--)s(o);return this};at.removeAllListeners=function(){return this.removeListener("*")};at.emit=at.trigger=function(r,e,t){var a=this.listeners,n=a.length;return this.emitting++,Oe(e)||(e=[e]),Ah(this,function(i,s){t!=null&&(a=[{event:s.event,type:s.type,namespace:s.namespace,callback:t}],n=a.length);for(var o=function(v){var f=a[v];if(f.type===s.type&&(!f.namespace||f.namespace===s.namespace||f.namespace===Mh)&&i.eventMatches(i.context,f,s)){var c=[s];e!=null&&uv(c,e),i.beforeEmit(i.context,f,s),f.conf&&f.conf.one&&(i.listeners=i.listeners.filter(function(y){return y!==f}));var h=i.callbackContext(i.context,f,s),d=f.callback.apply(h,c);i.afterEmit(i.context,f,s),d===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,i.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,a=e._private.data.id,n=t.map,i=n.get(a);if(!i)return this;var s=i.index;return this.unmergeAt(s),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&ce(e)){var a=e;e=t.mutableElements().filter(a)}for(var n=0;n=0;t--){var a=this[t];e(a)&&this.unmergeAt(t)}return this},map:function(e,t){for(var a=[],n=this,i=0;ia&&(a=l,n=o)}return{value:a,ele:n}},min:function(e,t){for(var a=1/0,n,i=this,s=0;s=0&&i"u"?"undefined":Ue(Symbol))!=e&&Ue(Symbol.iterator)!=e;t&&(nn[Symbol.iterator]=function(){var a=this,n={value:void 0,done:!1},i=0,s=this.length;return Ys({next:function(){return i1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],n=a.cy();if(n.styleEnabled()&&a){this.cleanStyle();var i=a._private.style[e];return i??(t?n.style().getDefaultProperty(e):null)}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var a=t.pstyle(e);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var a=this[0];if(a)return t.style().getRenderedStyle(a,e)},style:function(e,t){var a=this.cy();if(!a.styleEnabled())return this;var n=!1,i=a.style();if(Te(e)){var s=e;i.applyBypass(this,s,n),this.emitAndNotify("style")}else if(ce(e))if(t===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,t,n),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?i.getRawStyle(l):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var a=!1,n=t.style(),i=this;if(e===void 0)for(var s=0;s0&&e.push(v[0]),e.push(o[0])}return this.spawn(e,!0).filter(r)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});ir.neighbourhood=ir.neighborhood;ir.closedNeighbourhood=ir.closedNeighborhood;ir.openNeighbourhood=ir.openNeighborhood;pe(ir,{source:Er(function(e){var t=this[0],a;return t&&(a=t._private.source||t.cy().collection()),a&&e?a.filter(e):a},"source"),target:Er(function(e){var t=this[0],a;return t&&(a=t._private.target||t.cy().collection()),a&&e?a.filter(e):a},"target"),sources:ws({attr:"source"}),targets:ws({attr:"target"})});function ws(r){return function(t){for(var a=[],n=0;n0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});ir.componentsOf=ir.components;var er=function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){$e("A collection must have a reference to the core");return}var i=new Ir,s=!1;if(!t)t=[];else if(t.length>0&&Te(t[0])&&!xa(t[0])){s=!0;for(var o=[],l=new Vt,u=0,v=t.length;u0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,a=t.cy(),n=a._private,i=[],s=[],o,l=0,u=t.length;l0){for(var V=o.length===t.length?t:new er(a,o),G=0;G0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,a=[],n={},i=t._private.cy;function s(k){for(var O=k._private.edges,A=0;A0&&(r?P.emitAndNotify("remove"):e&&P.emit("remove"));for(var B=0;B0?B=k:P=k;while(Math.abs(L)>s&&++O=i?m(M,O):A===0?O:w(M,P,P+u)}var E=!1;function x(){E=!0,(r!==e||t!==a)&&b()}var D=function(P){return E||x(),r===e&&t===a?P:P===0?0:P===1?1:p(S(P),e,a)};D.getControlPoints=function(){return[{x:r,y:e},{x:t,y:a}]};var C="generateBezier("+[r,e,t,a]+")";return D.toString=function(){return C},D}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var Gh=function(){function r(a){return-a.tension*a.x-a.friction*a.v}function e(a,n,i){var s={x:a.x+i.dx*n,v:a.v+i.dv*n,tension:a.tension,friction:a.friction};return{dx:s.v,dv:r(s)}}function t(a,n){var i={dx:a.v,dv:r(a)},s=e(a,n*.5,i),o=e(a,n*.5,s),l=e(a,n,o),u=1/6*(i.dx+2*(s.dx+o.dx)+l.dx),v=1/6*(i.dv+2*(s.dv+o.dv)+l.dv);return a.x=a.x+u*n,a.v=a.v+v*n,a}return function a(n,i,s){var o={x:-1,v:0,tension:null,friction:null},l=[0],u=0,v=1/1e4,f=16/1e3,c,h,d;for(n=parseFloat(n)||500,i=parseFloat(i)||20,s=s||null,o.tension=n,o.friction=i,c=s!==null,c?(u=a(n,i),h=u/s*f):h=f;d=t(d||o,h),l.push(1+d.x),u+=16,Math.abs(d.x)>v&&Math.abs(d.v)>v;);return c?function(y){return l[y*(l.length-1)|0]}:u}}(),ze=function(e,t,a,n){var i=Hh(e,t,a,n);return function(s,o,l){return s+(o-s)*i(l)}},Ya={linear:function(e,t,a){return e+(t-e)*a},ease:ze(.25,.1,.25,1),"ease-in":ze(.42,0,1,1),"ease-out":ze(0,0,.58,1),"ease-in-out":ze(.42,0,.58,1),"ease-in-sine":ze(.47,0,.745,.715),"ease-out-sine":ze(.39,.575,.565,1),"ease-in-out-sine":ze(.445,.05,.55,.95),"ease-in-quad":ze(.55,.085,.68,.53),"ease-out-quad":ze(.25,.46,.45,.94),"ease-in-out-quad":ze(.455,.03,.515,.955),"ease-in-cubic":ze(.55,.055,.675,.19),"ease-out-cubic":ze(.215,.61,.355,1),"ease-in-out-cubic":ze(.645,.045,.355,1),"ease-in-quart":ze(.895,.03,.685,.22),"ease-out-quart":ze(.165,.84,.44,1),"ease-in-out-quart":ze(.77,0,.175,1),"ease-in-quint":ze(.755,.05,.855,.06),"ease-out-quint":ze(.23,1,.32,1),"ease-in-out-quint":ze(.86,0,.07,1),"ease-in-expo":ze(.95,.05,.795,.035),"ease-out-expo":ze(.19,1,.22,1),"ease-in-out-expo":ze(1,0,0,1),"ease-in-circ":ze(.6,.04,.98,.335),"ease-out-circ":ze(.075,.82,.165,1),"ease-in-out-circ":ze(.785,.135,.15,.86),spring:function(e,t,a){if(a===0)return Ya.linear;var n=Gh(e,t,a);return function(i,s,o){return i+(s-i)*n(o)}},"cubic-bezier":ze};function Cs(r,e,t,a,n){if(a===1||e===t)return t;var i=n(e,t,a);return r==null||((r.roundValue||r.color)&&(i=Math.round(i)),r.min!==void 0&&(i=Math.max(i,r.min)),r.max!==void 0&&(i=Math.min(i,r.max))),i}function Ss(r,e){return r.pfValue!=null||r.value!=null?r.pfValue!=null&&(e==null||e.type.units!=="%")?r.pfValue:r.value:r}function Ct(r,e,t,a,n){var i=n!=null?n.type:null;t<0?t=0:t>1&&(t=1);var s=Ss(r,n),o=Ss(e,n);if(ne(s)&&ne(o))return Cs(i,s,o,t,a);if(Oe(s)&&Oe(o)){for(var l=[],u=0;u0?(h==="spring"&&d.push(s.duration),s.easingImpl=Ya[h].apply(null,d)):s.easingImpl=Ya[h]}var y=s.easingImpl,p;if(s.duration===0?p=1:p=(t-l)/s.duration,s.applying&&(p=s.progress),p<0?p=0:p>1&&(p=1),s.delay==null){var g=s.startPosition,m=s.position;if(m&&n&&!r.locked()){var b={};ra(g.x,m.x)&&(b.x=Ct(g.x,m.x,p,y)),ra(g.y,m.y)&&(b.y=Ct(g.y,m.y,p,y)),r.position(b)}var w=s.startPan,S=s.pan,E=i.pan,x=S!=null&&a;x&&(ra(w.x,S.x)&&(E.x=Ct(w.x,S.x,p,y)),ra(w.y,S.y)&&(E.y=Ct(w.y,S.y,p,y)),r.emit("pan"));var D=s.startZoom,C=s.zoom,M=C!=null&&a;M&&(ra(D,C)&&(i.zoom=da(i.minZoom,Ct(D,C,p,y),i.maxZoom)),r.emit("zoom")),(x||M)&&r.emit("viewport");var P=s.style;if(P&&P.length>0&&n){for(var B=0;B=0;x--){var D=E[x];D()}E.splice(0,E.length)},m=h.length-1;m>=0;m--){var b=h[m],w=b._private;if(w.stopped){h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,g(w.frames);continue}!w.playing&&!w.applying||(w.playing&&w.applying&&(w.applying=!1),w.started||Wh(v,b,r),Kh(v,b,r,f),w.applying&&(w.applying=!1),g(w.frames),w.step!=null&&w.step(r),b.completed()&&(h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,g(w.completes)),y=!0)}return!f&&h.length===0&&d.length===0&&a.push(v),y}for(var i=!1,s=0;s0?e.notify("draw",t):e.notify("draw")),t.unmerge(a),e.emit("step")}var Uh={animate:Be.animate(),animation:Be.animation(),animated:Be.animated(),clearQueue:Be.clearQueue(),delay:Be.delay(),delayAnimation:Be.delayAnimation(),stop:Be.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function t(){e._private.animationsRunning&&ja(function(i){Ts(i,e),t()})}var a=e.renderer();a&&a.beforeRender?a.beforeRender(function(i,s){Ts(s,e)},a.beforeRenderPriorities.animations):t()}},Yh={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,a){var n=t.qualifier;return n!=null?e!==a.target&&xa(a.target)&&n.matches(a.target):!0},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,a){return t.qualifier!=null?a.target:e}},qa=function(e){return ce(e)?new rt(e):e},eu={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new wn(Yh,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,a){return this.emitter().on(e,qa(t),a),this},removeListener:function(e,t,a){return this.emitter().removeListener(e,qa(t),a),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,a){return this.emitter().one(e,qa(t),a),this},once:function(e,t,a){return this.emitter().one(e,qa(t),a),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Be.eventAliasesOn(eu);var Zn={png:function(e){var t=this._private.renderer;return e=e||{},t.png(e)},jpg:function(e){var t=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",t.jpg(e)}};Zn.jpeg=Zn.jpg;var Xa={layout:function(e){var t=this;if(e==null){$e("Layout options must be specified to make a layout");return}if(e.name==null){$e("A `name` must be specified to make a layout");return}var a=e.name,n=t.extension("layout",a);if(n==null){$e("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;ce(e.eles)?i=t.$(e.eles):i=e.eles!=null?e.eles:t.$();var s=new n(pe({},e,{cy:t,eles:i}));return s}};Xa.createLayout=Xa.makeLayout=Xa.layout;var Xh={notify:function(e,t){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var n=a.batchNotifications[e]=a.batchNotifications[e]||this.collection();t!=null&&n.merge(t);return}if(a.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,t)}},notifications:function(e){var t=this._private;return e===void 0?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(a){var n=e.batchNotifications[a];n.empty()?t.notify(a):t.notify(a,n)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var a=Object.keys(e),n=0;n0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(a){var n=a._private;n.rscratch={},n.rstyle={},n.animation.current=[],n.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Qn.invalidateDimensions=Qn.resize;var Za={collection:function(e,t){return ce(e)?this.$(e):yr(e)?e.collection():Oe(e)?(t||(t={}),new er(this,e,t.unique,t.removed)):new er(this)},nodes:function(e){var t=this.$(function(a){return a.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(a){return a.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};Za.elements=Za.filter=Za.$;var or={},oa="t",Qh="f";or.apply=function(r){for(var e=this,t=e._private,a=t.cy,n=a.collection(),i=0;i0;if(c||f&&h){var d=void 0;c&&h||c?d=u.properties:h&&(d=u.mappedProperties);for(var y=0;y1&&(w=1),o.color){var E=a.valueMin[0],x=a.valueMax[0],D=a.valueMin[1],C=a.valueMax[1],M=a.valueMin[2],P=a.valueMax[2],B=a.valueMin[3]==null?1:a.valueMin[3],L=a.valueMax[3]==null?1:a.valueMax[3],k=[Math.round(E+(x-E)*w),Math.round(D+(C-D)*w),Math.round(M+(P-M)*w),Math.round(B+(L-B)*w)];i={bypass:a.bypass,name:a.name,value:k,strValue:"rgb("+k[0]+", "+k[1]+", "+k[2]+")"}}else if(o.number){var O=a.valueMin+(a.valueMax-a.valueMin)*w;i=this.parse(a.name,O,a.bypass,c)}else return!1;if(!i)return y(),!1;i.mapping=a,a=i;break}case s.data:{for(var A=a.field.split("."),R=f.data,I=0;I0&&i>0){for(var o={},l=!1,u=0;u0?r.delayAnimation(s).play().promise().then(b):b()}).then(function(){return r.animation({style:o,duration:i,easing:r.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){t.removeBypasses(r,n),r.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(r,n),r.emitAndNotify("style"),a.transitioning=!1)};or.checkTrigger=function(r,e,t,a,n,i){var s=this.properties[e],o=n(s);o!=null&&o(t,a)&&i(s)};or.checkZOrderTrigger=function(r,e,t,a){var n=this;this.checkTrigger(r,e,t,a,function(i){return i.triggersZOrder},function(){n._private.cy.notify("zorder",r)})};or.checkBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBounds},function(n){r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache(),n.triggersBoundsOfParallelBeziers&&e==="curve-style"&&(t==="bezier"||a==="bezier")&&r.parallelEdges().forEach(function(i){i.dirtyBoundingBoxCache()}),n.triggersBoundsOfConnectedEdges&&e==="display"&&(t==="none"||a==="none")&&r.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};or.checkTriggers=function(r,e,t,a){r.dirtyStyleCache(),this.checkZOrderTrigger(r,e,t,a),this.checkBoundsTrigger(r,e,t,a)};var Ta={};Ta.applyBypass=function(r,e,t,a){var n=this,i=[],s=!0;if(e==="*"||e==="**"){if(t!==void 0)for(var o=0;on.length?a=a.substr(n.length):a=""}function l(){i.length>s.length?i=i.substr(s.length):i=""}for(;;){var u=a.match(/^\s*$/);if(u)break;var v=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!v){Me("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}n=v[0];var f=v[1];if(f!=="core"){var c=new rt(f);if(c.invalid){Me("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var h=v[2],d=!1;i=h;for(var y=[];;){var p=i.match(/^\s*$/);if(p)break;var g=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!g){Me("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),d=!0;break}s=g[0];var m=g[1],b=g[2],w=e.properties[m];if(!w){Me("Skipping property: Invalid property name in: "+s),l();continue}var S=t.parse(m,b);if(!S){Me("Skipping property: Invalid property definition in: "+s),l();continue}y.push({name:m,val:b}),l()}if(d){o();break}t.selector(f);for(var E=0;E=7&&e[0]==="d"&&(v=new RegExp(o.data.regex).exec(e))){if(t)return!1;var c=o.data;return{name:r,value:v,strValue:""+e,mapped:c,field:v[1],bypass:t}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(t||u.multiple)return!1;var h=o.mapData;if(!(u.color||u.number))return!1;var d=this.parse(r,f[4]);if(!d||d.mapped)return!1;var y=this.parse(r,f[5]);if(!y||y.mapped)return!1;if(d.pfValue===y.pfValue||d.strValue===y.strValue)return Me("`"+r+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+r+": "+d.strValue+"`"),this.parse(r,d.strValue);if(u.color){var p=d.value,g=y.value,m=p[0]===g[0]&&p[1]===g[1]&&p[2]===g[2]&&(p[3]===g[3]||(p[3]==null||p[3]===1)&&(g[3]==null||g[3]===1));if(m)return!1}return{name:r,value:f,strValue:""+e,mapped:h,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:d.value,valueMax:y.value,bypass:t}}}if(u.multiple&&a!=="multiple"){var b;if(l?b=e.split(/\s+/):Oe(e)?b=e:b=[e],u.evenMultiple&&b.length%2!==0)return null;for(var w=[],S=[],E=[],x="",D=!1,C=0;C0?" ":"")+M.strValue}return u.validate&&!u.validate(w,S)?null:u.singleEnum&&D?w.length===1&&ce(w[0])?{name:r,value:w[0],strValue:w[0],bypass:t}:null:{name:r,value:w,pfValue:E,strValue:x,bypass:t,units:S}}var P=function(){for(var z=0;zu.max||u.strictMax&&e===u.max))return null;var A={name:r,value:e,strValue:""+e+(B||""),units:B,bypass:t};return u.unitless||B!=="px"&&B!=="em"?A.pfValue=e:A.pfValue=B==="px"||!B?e:this.getEmSizeInPixels()*e,(B==="ms"||B==="s")&&(A.pfValue=B==="ms"?e:1e3*e),(B==="deg"||B==="rad")&&(A.pfValue=B==="rad"?e:Mv(e)),B==="%"&&(A.pfValue=e/100),A}else if(u.propList){var R=[],I=""+e;if(I!=="none"){for(var V=I.split(/\s*,\s*|\s+/),G=0;G0&&o>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){l=Math.min((s-2*t)/a.w,(o-2*t)/a.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=a.minZoom&&(a.maxZoom=t),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t=this._private,a=t.pan,n=t.zoom,i,s,o=!1;if(t.zoomingEnabled||(o=!0),ne(e)?s=e:Te(e)&&(s=e.level,e.position!=null?i=hn(e.position,n,a):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!t.panningEnabled&&(o=!0)),s=s>t.maxZoom?t.maxZoom:s,s=st.maxZoom||!t.zoomingEnabled?s=!0:(t.zoom=l,i.push("zoom"))}if(n&&(!s||!e.cancelOnFailedZoom)&&t.panningEnabled){var u=e.pan;ne(u.x)&&(t.pan.x=u.x,o=!1),ne(u.y)&&(t.pan.y=u.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(ce(e)){var a=e;e=this.mutableElements().filter(a)}else yr(e)||(e=this.mutableElements());if(e.length!==0){var n=e.boundingBox(),i=this.width(),s=this.height();t=t===void 0?this._private.zoom:t;var o={x:(i-t*(n.x1+n.x2))/2,y:(s-t*(n.y1+n.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container,a=this;return e.sizeCache=e.sizeCache||(t?function(){var n=a.window().getComputedStyle(t),i=function(o){return parseFloat(n.getPropertyValue(o))};return{width:t.clientWidth-i("padding-left")-i("padding-right"),height:t.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,a=this.renderedExtent(),n={x1:(a.x1-e.x)/t,x2:(a.x2-e.x)/t,y1:(a.y1-e.y)/t,y2:(a.y2-e.y)/t};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};yt.centre=yt.center;yt.autolockNodes=yt.autolock;yt.autoungrabifyNodes=yt.autoungrabify;var ma={data:Be.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Be.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Be.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Be.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};ma.attr=ma.data;ma.removeAttr=ma.removeData;var ba=function(e){var t=this;e=pe({},e);var a=e.container;a&&!_a(a)&&_a(a[0])&&(a=a[0]);var n=a?a._cyreg:null;n=n||{},n&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];a&&(a._cyreg=n),n.cy=t;var s=Ke!==void 0&&a!==void 0&&!e.headless,o=e;o.layout=pe({name:s?"grid":"null"},o.layout),o.renderer=pe({name:s?"canvas":"null"},o.renderer);var l=function(d,y,p){return y!==void 0?y:p!==void 0?p:d},u=this._private={container:a,ready:!1,options:o,elements:new er(this),listeners:[],aniEles:new er(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:ne(o.zoom)?o.zoom:1,pan:{x:Te(o.pan)&&ne(o.pan.x)?o.pan.x:0,y:Te(o.pan)&&ne(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var v=function(d,y){var p=d.some(el);if(p)return qt.all(d).then(y);y(d)};u.styleEnabled&&t.setStyle([]);var f=pe({},o,o.renderer);t.initRenderer(f);var c=function(d,y,p){t.notifications(!1);var g=t.mutableElements();g.length>0&&g.remove(),d!=null&&(Te(d)||Oe(d))&&t.add(d),t.one("layoutready",function(b){t.notifications(!0),t.emit(b),t.one("load",y),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",p),t.emit("done")});var m=pe({},t._private.options.layout);m.eles=t.elements(),t.layout(m).run()};v([o.style,o.elements],function(h){var d=h[0],y=h[1];u.styleEnabled&&t.style().append(d),c(y,function(){t.startAnimationLoop(),u.ready=!0,qe(o.ready)&&t.on("ready",o.ready);for(var p=0;p0,l=hr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),u;if(yr(e.roots))u=e.roots;else if(Oe(e.roots)){for(var v=[],f=0;f0;){var O=k(),A=M(O,B);if(A)O.outgoers().filter(function(te){return te.isNode()&&a.has(te)}).forEach(L);else if(A===null){Me("Detected double maximal shift for node `"+O.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}C();var R=0;if(e.avoidOverlap)for(var I=0;I0&&g[0].length<=3?xe/2:0),Pe=2*Math.PI/g[le].length*oe;return le===0&&g[0].length===1&&(Ee=1),{x:X.x+Ee*Math.cos(Pe),y:X.y+Ee*Math.sin(Pe)}}else{var Ae={x:X.x+(oe+1-(de+1)/2)*Le,y:(le+1)*Ce};return Ae}};return a.nodes().layoutPositions(this,e,he),this};var rg={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function tu(r){this.options=pe({},rg,r)}tu.prototype.run=function(){var r=this.options,e=r,t=r.cy,a=e.eles,n=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=a.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var s=hr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,u=l/Math.max(1,i.length-1),v,f=0,c=0;c1&&e.avoidOverlap){f*=1.75;var g=Math.cos(u)-Math.cos(0),m=Math.sin(u)-Math.sin(0),b=Math.sqrt(f*f/(g*g+m*m));v=Math.max(b,v)}var w=function(E,x){var D=e.startAngle+x*u*(n?1:-1),C=v*Math.cos(D),M=v*Math.sin(D),P={x:o.x+C,y:o.y+M};return P};return a.nodes().layoutPositions(this,e,w),this};var tg={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function au(r){this.options=pe({},tg,r)}au.prototype.run=function(){for(var r=this.options,e=r,t=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=r.cy,n=e.eles,i=n.nodes().not(":parent"),s=hr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,v=0;v0){var S=Math.abs(m[0].value-w.value);S>=p&&(m=[],g.push(m))}m.push(w)}var E=u+e.minNodeSpacing;if(!e.avoidOverlap){var x=g.length>0&&g[0].length>1,D=Math.min(s.w,s.h)/2-E,C=D/(g.length+x?1:0);E=Math.min(E,C)}for(var M=0,P=0;P1&&e.avoidOverlap){var O=Math.cos(k)-Math.cos(0),A=Math.sin(k)-Math.sin(0),R=Math.sqrt(E*E/(O*O+A*A));M=Math.max(R,M)}B.r=M,M+=E}if(e.equidistant){for(var I=0,V=0,G=0;G=r.numIter||(vg(a,r),a.temperature=a.temperature*r.coolingFactor,a.temperature=r.animationThreshold&&i(),ja(f)}};v()}else{for(;u;)u=s(l),l++;Ps(a,r),o()}return this};Tn.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};Tn.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var ng=function(e,t,a){for(var n=a.eles.edges(),i=a.eles.nodes(),s=hr(a.boundingBox?a.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:a.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=a.eles.components(),u={},v=0;v0){o.graphSet.push(D);for(var v=0;vn.count?0:n.graph},sg=function r(e,t,a,n){var i=n.graphSet[a];if(-10)var f=n.nodeOverlap*v,c=Math.sqrt(o*o+l*l),h=f*o/c,d=f*l/c;else var y=on(e,o,l),p=on(t,-1*o,-1*l),g=p.x-y.x,m=p.y-y.y,b=g*g+m*m,c=Math.sqrt(b),f=(e.nodeRepulsion+t.nodeRepulsion)/b,h=f*g/c,d=f*m/c;e.isLocked||(e.offsetX-=h,e.offsetY-=d),t.isLocked||(t.offsetX+=h,t.offsetY+=d)}},dg=function(e,t,a,n){if(a>0)var i=e.maxX-t.minX;else var i=t.maxX-e.minX;if(n>0)var s=e.maxY-t.minY;else var s=t.maxY-e.minY;return i>=0&&s>=0?Math.sqrt(i*i+s*s):0},on=function(e,t,a){var n=e.positionX,i=e.positionY,s=e.height||1,o=e.width||1,l=a/t,u=s/o,v={};return t===0&&0a?(v.x=n,v.y=i+s/2,v):0t&&-1*u<=l&&l<=u?(v.x=n-o/2,v.y=i-o*a/2/t,v):0=u)?(v.x=n+s*t/2/a,v.y=i+s/2,v):(0>a&&(l<=-1*u||l>=u)&&(v.x=n-s*t/2/a,v.y=i-s/2),v)},hg=function(e,t){for(var a=0;aa){var p=t.gravity*h/y,g=t.gravity*d/y;c.offsetX+=p,c.offsetY+=g}}}}},pg=function(e,t){var a=[],n=0,i=-1;for(a.push.apply(a,e.graphSet[0]),i+=e.graphSet[0].length;n<=i;){var s=a[n++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0a)var i={x:a*e/n,y:a*t/n};else var i={x:e,y:t};return i},bg=function r(e,t){var a=e.parentId;if(a!=null){var n=t.layoutNodes[t.idToIndex[a]],i=!1;if((n.maxX==null||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(n.minX==null||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(n.minY==null||e.minY-n.padTopg&&(d+=p+t.componentSpacing,h=0,y=0,p=0)}}},wg={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function iu(r){this.options=pe({},wg,r)}iu.prototype.run=function(){var r=this.options,e=r,t=r.cy,a=e.eles,n=a.nodes().not(":parent");e.sort&&(n=n.sort(e.sort));var i=hr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});if(i.h===0||i.w===0)a.nodes().layoutPositions(this,e,function(Y){return{x:i.x1,y:i.y1}});else{var s=n.size(),o=Math.sqrt(s*i.h/i.w),l=Math.round(o),u=Math.round(i.w/i.h*o),v=function(Q){if(Q==null)return Math.min(l,u);var J=Math.min(l,u);J==l?l=Q:u=Q},f=function(Q){if(Q==null)return Math.max(l,u);var J=Math.max(l,u);J==l?l=Q:u=Q},c=e.rows,h=e.cols!=null?e.cols:e.columns;if(c!=null&&h!=null)l=c,u=h;else if(c!=null&&h==null)l=c,u=Math.ceil(s/l);else if(c==null&&h!=null)u=h,l=Math.ceil(s/u);else if(u*l>s){var d=v(),y=f();(d-1)*y>=s?v(d-1):(y-1)*d>=s&&f(y-1)}else for(;u*l=s?f(g+1):v(p+1)}var m=i.w/u,b=i.h/l;if(e.condense&&(m=0,b=0),e.avoidOverlap)for(var w=0;w=u&&(O=0,k++)},R={},I=0;I(O=Gv(r,e,A[R],A[R+1],A[R+2],A[R+3])))return p(x,O),!0}else if(C.edgeType==="bezier"||C.edgeType==="multibezier"||C.edgeType==="self"||C.edgeType==="compound"){for(var A=C.allpts,R=0;R+5(O=Hv(r,e,A[R],A[R+1],A[R+2],A[R+3],A[R+4],A[R+5])))return p(x,O),!0}for(var I=I||D.source,V=V||D.target,G=n.getArrowWidth(M,P),F=[{name:"source",x:C.arrowStartX,y:C.arrowStartY,angle:C.srcArrowAngle},{name:"target",x:C.arrowEndX,y:C.arrowEndY,angle:C.tgtArrowAngle},{name:"mid-source",x:C.midX,y:C.midY,angle:C.midsrcArrowAngle},{name:"mid-target",x:C.midX,y:C.midY,angle:C.midtgtArrowAngle}],R=0;R0&&(g(I),g(V))}function b(x,D,C){return kr(x,D,C)}function w(x,D){var C=x._private,M=c,P;D?P=D+"-":P="",x.boundingBox();var B=C.labelBounds[D||"main"],L=x.pstyle(P+"label").value,k=x.pstyle("text-events").strValue==="yes";if(!(!k||!L)){var O=b(C.rscratch,"labelX",D),A=b(C.rscratch,"labelY",D),R=b(C.rscratch,"labelAngle",D),I=x.pstyle(P+"text-margin-x").pfValue,V=x.pstyle(P+"text-margin-y").pfValue,G=B.x1-M-I,F=B.x2+M-I,q=B.y1-M-V,Y=B.y2+M-V;if(R){var Q=Math.cos(R),J=Math.sin(R),_=function(he,te){return he=he-O,te=te-A,{x:he*Q-te*J+O,y:he*J+te*Q+A}},j=_(G,q),W=_(G,Y),z=_(F,q),K=_(F,Y),X=[j.x+I,j.y+V,z.x+I,z.y+V,K.x+I,K.y+V,W.x+I,W.y+V];if(dr(r,e,X))return p(x),!0}else if(It(B,r,e))return p(x),!0}}for(var S=s.length-1;S>=0;S--){var E=s[S];E.isNode()?g(E)||w(E):m(E)||w(E)||w(E,"source")||w(E,"target")}return o};bt.getAllInBox=function(r,e,t,a){var n=this.getCachedZSortedEles().interactive,i=[],s=Math.min(r,t),o=Math.max(r,t),l=Math.min(e,a),u=Math.max(e,a);r=s,t=o,e=l,a=u;for(var v=hr({x1:r,y1:e,x2:t,y2:a}),f=0;f0?-(Math.PI-e.ang):Math.PI+e.ang},Dg=function(e,t,a,n,i){if(e!==Rs?Os(t,e,Rr):Tg(wr,Rr),Os(t,a,wr),Ls=Rr.nx*wr.ny-Rr.ny*wr.nx,As=Rr.nx*wr.nx-Rr.ny*-wr.ny,$r=Math.asin(Math.max(-1,Math.min(1,Ls))),Math.abs($r)<1e-6){Jn=t.x,_n=t.y,lt=Tt=0;return}vt=1,Qa=!1,As<0?$r<0?$r=Math.PI+$r:($r=Math.PI-$r,vt=-1,Qa=!0):$r>0&&(vt=-1,Qa=!0),t.radius!==void 0?Tt=t.radius:Tt=n,st=$r/2,$a=Math.min(Rr.len/2,wr.len/2),i?(Ar=Math.abs(Math.cos(st)*Tt/Math.sin(st)),Ar>$a?(Ar=$a,lt=Math.abs(Ar*Math.sin(st)/Math.cos(st))):lt=Tt):(Ar=Math.min($a,Tt),lt=Math.abs(Ar*Math.sin(st)/Math.cos(st))),jn=t.x+wr.nx*Ar,ei=t.y+wr.ny*Ar,Jn=jn-wr.ny*lt*vt,_n=ei+wr.nx*lt*vt,lu=t.x+Rr.nx*Ar,vu=t.y+Rr.ny*Ar,Rs=t};function fu(r,e){e.radius===0?r.lineTo(e.cx,e.cy):r.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function Di(r,e,t,a){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return a===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Dg(r,e,t,a,n),{cx:Jn,cy:_n,radius:lt,startX:lu,startY:vu,stopX:jn,stopY:ei,startAngle:Rr.ang+Math.PI/2*vt,endAngle:wr.ang-Math.PI/2*vt,counterClockwise:Qa})}var ur={};ur.findMidptPtsEtc=function(r,e){var t=e.posPts,a=e.intersectionPts,n=e.vectorNormInverse,i,s=r.pstyle("source-endpoint"),o=r.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(S,E,x,D){var C=D-E,M=x-S,P=Math.sqrt(M*M+C*C);return{x:-C/P,y:M/P}},v=r.pstyle("edge-distances").value;switch(v){case"node-position":i=t;break;case"intersection":i=a;break;case"endpoints":{if(l){var f=this.manualEndptToPx(r.source()[0],s),c=Tr(f,2),h=c[0],d=c[1],y=this.manualEndptToPx(r.target()[0],o),p=Tr(y,2),g=p[0],m=p[1],b={x1:h,y1:d,x2:g,y2:m};n=u(h,d,g,m),i=b}else Me("Edge ".concat(r.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=a;break}}return{midptPts:i,vectorNormInverse:n}};ur.findHaystackPoints=function(r){for(var e=0;e0?Math.max(Z-se,0):Math.min(Z+se,0)},L=B(M,D),k=B(P,C),O=!1;m===u?g=Math.abs(L)>Math.abs(k)?n:a:m===l||m===o?(g=a,O=!0):(m===i||m===s)&&(g=n,O=!0);var A=g===a,R=A?k:L,I=A?P:M,V=go(I),G=!1;!(O&&(w||E))&&(m===o&&I<0||m===l&&I>0||m===i&&I>0||m===s&&I<0)&&(V*=-1,R=V*Math.abs(R),G=!0);var F;if(w){var q=S<0?1+S:S;F=q*R}else{var Y=S<0?R:0;F=Y+S*V}var Q=function(Z){return Math.abs(Z)=Math.abs(R)},J=Q(F),_=Q(Math.abs(R)-Math.abs(F)),j=J||_;if(j&&!G)if(A){var W=Math.abs(I)<=c/2,z=Math.abs(M)<=h/2;if(W){var K=(v.x1+v.x2)/2,X=v.y1,ae=v.y2;t.segpts=[K,X,K,ae]}else if(z){var he=(v.y1+v.y2)/2,te=v.x1,re=v.x2;t.segpts=[te,he,re,he]}else t.segpts=[v.x1,v.y2]}else{var ve=Math.abs(I)<=f/2,le=Math.abs(P)<=d/2;if(ve){var oe=(v.y1+v.y2)/2,de=v.x1,Le=v.x2;t.segpts=[de,oe,Le,oe]}else if(le){var Ce=(v.x1+v.x2)/2,xe=v.y1,Ae=v.y2;t.segpts=[Ce,xe,Ce,Ae]}else t.segpts=[v.x2,v.y1]}else if(A){var Ee=v.y1+F+(p?c/2*V:0),Pe=v.x1,ee=v.x2;t.segpts=[Pe,Ee,ee,Ee]}else{var T=v.x1+F+(p?f/2*V:0),$=v.y1,U=v.y2;t.segpts=[T,$,T,U]}if(t.isRound){var N=r.pstyle("taxi-radius").value,H=r.pstyle("radius-type").value[0]==="arc-radius";t.radii=new Array(t.segpts.length/2).fill(N),t.isArcRadius=new Array(t.segpts.length/2).fill(H)}};ur.tryToCorrectInvalidPoints=function(r,e){var t=r._private.rscratch;if(t.edgeType==="bezier"){var a=e.srcPos,n=e.tgtPos,i=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,v=e.tgtShape,f=e.srcCornerRadius,c=e.tgtCornerRadius,h=e.srcRs,d=e.tgtRs,y=!ne(t.startX)||!ne(t.startY),p=!ne(t.arrowStartX)||!ne(t.arrowStartY),g=!ne(t.endX)||!ne(t.endY),m=!ne(t.arrowEndX)||!ne(t.arrowEndY),b=3,w=this.getArrowWidth(r.pstyle("width").pfValue,r.pstyle("arrow-scale").value)*this.arrowShapeWidth,S=b*w,E=ht({x:t.ctrlpts[0],y:t.ctrlpts[1]},{x:t.startX,y:t.startY}),x=Ek.poolIndex()){var O=L;L=k,k=O}var A=C.srcPos=L.position(),R=C.tgtPos=k.position(),I=C.srcW=L.outerWidth(),V=C.srcH=L.outerHeight(),G=C.tgtW=k.outerWidth(),F=C.tgtH=k.outerHeight(),q=C.srcShape=t.nodeShapes[e.getNodeShape(L)],Y=C.tgtShape=t.nodeShapes[e.getNodeShape(k)],Q=C.srcCornerRadius=L.pstyle("corner-radius").value==="auto"?"auto":L.pstyle("corner-radius").pfValue,J=C.tgtCornerRadius=k.pstyle("corner-radius").value==="auto"?"auto":k.pstyle("corner-radius").pfValue,_=C.tgtRs=k._private.rscratch,j=C.srcRs=L._private.rscratch;C.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var W=0;W0){var ae=i,he=ot(ae,Pt(t)),te=ot(ae,Pt(X)),re=he;if(te2){var ve=ot(ae,{x:X[2],y:X[3]});ve0){var U=s,N=ot(U,Pt(t)),H=ot(U,Pt($)),ie=N;if(H2){var Z=ot(U,{x:$[2],y:$[3]});Z=d||x){p={cp:w,segment:E};break}}if(p)break}var D=p.cp,C=p.segment,M=(d-g)/C.length,P=C.t1-C.t0,B=h?C.t0+P*M:C.t1-P*M;B=da(0,B,1),e=Mt(D.p0,D.p1,D.p2,B),c=Pg(D.p0,D.p1,D.p2,B);break}case"straight":case"segments":case"haystack":{for(var L=0,k,O,A,R,I=a.allpts.length,V=0;V+3=d));V+=2);var G=d-O,F=G/k;F=da(0,F,1),e=Av(A,R,F),c=hu(A,R);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,c)}};u("source"),u("target"),this.applyLabelDimensions(r)}};Nr.applyLabelDimensions=function(r){this.applyPrefixedLabelDimensions(r),r.isEdge()&&(this.applyPrefixedLabelDimensions(r,"source"),this.applyPrefixedLabelDimensions(r,"target"))};Nr.applyPrefixedLabelDimensions=function(r,e){var t=r._private,a=this.getLabelText(r,e),n=this.calculateLabelDimensions(r,a),i=r.pstyle("line-height").pfValue,s=r.pstyle("text-wrap").strValue,o=kr(t.rscratch,"labelWrapCachedLines",e)||[],l=s!=="wrap"?1:Math.max(o.length,1),u=n.height/l,v=u*i,f=n.width,c=n.height+(l-1)*(i-1)*u;Zr(t.rstyle,"labelWidth",e,f),Zr(t.rscratch,"labelWidth",e,f),Zr(t.rstyle,"labelHeight",e,c),Zr(t.rscratch,"labelHeight",e,c),Zr(t.rscratch,"labelLineHeight",e,v)};Nr.getLabelText=function(r,e){var t=r._private,a=e?e+"-":"",n=r.pstyle(a+"label").strValue,i=r.pstyle("text-transform").value,s=function(Y,Q){return Q?(Zr(t.rscratch,Y,e,Q),Q):kr(t.rscratch,Y,e)};if(!n)return"";i=="none"||(i=="uppercase"?n=n.toUpperCase():i=="lowercase"&&(n=n.toLowerCase()));var o=r.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="​",v=n.split(` +`),f=r.pstyle("text-max-width").pfValue,c=r.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],y=/[\s\u200b]+|$/g,p=0;pf){var S=g.matchAll(y),E="",x=0,D=Zs(S),C;try{for(D.s();!(C=D.n()).done;){var M=C.value,P=M[0],B=g.substring(x,M.index);x=M.index+P.length;var L=E.length===0?B:E+B+P,k=this.calculateLabelDimensions(r,L),O=k.width;O<=f?E+=B+P:(E&&d.push(E),E=B+P)}}catch(q){D.e(q)}finally{D.f()}E.match(/^[\s\u200b]+$/)||d.push(E)}else d.push(g)}s("labelWrapCachedLines",d),n=s("labelWrapCachedText",d.join(` +`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var A=r.pstyle("text-max-width").pfValue,R="",I="…",V=!1;if(this.calculateLabelDimensions(r,n).widthA)break;R+=n[G],G===n.length-1&&(V=!0)}return V||(R+=I),R}return n};Nr.getLabelJustification=function(r){var e=r.pstyle("text-justification").strValue,t=r.pstyle("text-halign").strValue;if(e==="auto")if(r.isNode())switch(t){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Nr.calculateLabelDimensions=function(r,e){var t=this,a=t.cy.window(),n=a.document,i=dt(e,r._private.labelDimsKey),s=t.labelDimCache||(t.labelDimCache=[]),o=s[i];if(o!=null)return o;var l=0,u=r.pstyle("font-style").strValue,v=r.pstyle("font-size").pfValue,f=r.pstyle("font-family").strValue,c=r.pstyle("font-weight").strValue,h=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!h){h=this.labelCalcCanvas=n.createElement("canvas"),d=this.labelCalcCanvasContext=h.getContext("2d");var y=h.style;y.position="absolute",y.left="-9999px",y.top="-9999px",y.zIndex="-1",y.visibility="hidden",y.pointerEvents="none"}d.font="".concat(u," ").concat(c," ").concat(v,"px ").concat(f);for(var p=0,g=0,m=e.split(` +`),b=0;b1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l=r.desktopTapThreshold2}var lr=i(T);Ve&&(r.hoverData.tapholdCancelled=!0);var vr=function(){var Lr=r.hoverData.dragDelta=r.hoverData.dragDelta||[];Lr.length===0?(Lr.push(ye[0]),Lr.push(ye[1])):(Lr[0]+=ye[0],Lr[1]+=ye[1])};U=!0,n(fe,["mousemove","vmousemove","tapdrag"],T,{x:Z[0],y:Z[1]});var Br=function(){r.data.bgActivePosistion=void 0,r.hoverData.selecting||N.emit({originalEvent:T,type:"boxstart",position:{x:Z[0],y:Z[1]}}),we[4]=1,r.hoverData.selecting=!0,r.redrawHint("select",!0),r.redraw()};if(r.hoverData.which===3){if(Ve){var br={originalEvent:T,type:"cxtdrag",position:{x:Z[0],y:Z[1]}};be?be.emit(br):N.emit(br),r.hoverData.cxtDragged=!0,(!r.hoverData.cxtOver||fe!==r.hoverData.cxtOver)&&(r.hoverData.cxtOver&&r.hoverData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:Z[0],y:Z[1]}}),r.hoverData.cxtOver=fe,fe&&fe.emit({originalEvent:T,type:"cxtdragover",position:{x:Z[0],y:Z[1]}}))}}else if(r.hoverData.dragging){if(U=!0,N.panningEnabled()&&N.userPanningEnabled()){var Mr;if(r.hoverData.justStartedPan){var Vr=r.hoverData.mdownPos;Mr={x:(Z[0]-Vr[0])*H,y:(Z[1]-Vr[1])*H},r.hoverData.justStartedPan=!1}else Mr={x:ye[0]*H,y:ye[1]*H};N.panBy(Mr),N.emit("dragpan"),r.hoverData.dragged=!0}Z=r.projectIntoViewport(T.clientX,T.clientY)}else if(we[4]==1&&(be==null||be.pannable())){if(Ve){if(!r.hoverData.dragging&&N.boxSelectionEnabled()&&(lr||!N.panningEnabled()||!N.userPanningEnabled()))Br();else if(!r.hoverData.selecting&&N.panningEnabled()&&N.userPanningEnabled()){var qr=s(be,r.hoverData.downs);qr&&(r.hoverData.dragging=!0,r.hoverData.justStartedPan=!0,we[4]=0,r.data.bgActivePosistion=Pt(se),r.redrawHint("select",!0),r.redraw())}be&&be.pannable()&&be.active()&&be.unactivate()}}else{if(be&&be.pannable()&&be.active()&&be.unactivate(),(!be||!be.grabbed())&&fe!=me&&(me&&n(me,["mouseout","tapdragout"],T,{x:Z[0],y:Z[1]}),fe&&n(fe,["mouseover","tapdragover"],T,{x:Z[0],y:Z[1]}),r.hoverData.last=fe),be)if(Ve){if(N.boxSelectionEnabled()&&lr)be&&be.grabbed()&&(g(Ie),be.emit("freeon"),Ie.emit("free"),r.dragData.didDrag&&(be.emit("dragfreeon"),Ie.emit("dragfree"))),Br();else if(be&&be.grabbed()&&r.nodeIsDraggable(be)){var ar=!r.dragData.didDrag;ar&&r.redrawHint("eles",!0),r.dragData.didDrag=!0,r.hoverData.draggingEles||y(Ie,{inDragLayer:!0});var Qe={x:0,y:0};if(ne(ye[0])&&ne(ye[1])&&(Qe.x+=ye[0],Qe.y+=ye[1],ar)){var cr=r.hoverData.dragDelta;cr&&ne(cr[0])&&ne(cr[1])&&(Qe.x+=cr[0],Qe.y+=cr[1])}r.hoverData.draggingEles=!0,Ie.silentShift(Qe).emit("position drag"),r.redrawHint("drag",!0),r.redraw()}}else vr();U=!0}if(we[2]=Z[0],we[3]=Z[1],U)return T.stopPropagation&&T.stopPropagation(),T.preventDefault&&T.preventDefault(),!1}},!1);var B,L,k;r.registerBinding(e,"mouseup",function(T){if(!(r.hoverData.which===1&&T.which!==1&&r.hoverData.capture)){var $=r.hoverData.capture;if($){r.hoverData.capture=!1;var U=r.cy,N=r.projectIntoViewport(T.clientX,T.clientY),H=r.selection,ie=r.findNearestElement(N[0],N[1],!0,!1),Z=r.dragData.possibleDragElements,se=r.hoverData.down,ge=i(T);if(r.data.bgActivePosistion&&(r.redrawHint("select",!0),r.redraw()),r.hoverData.tapholdCancelled=!0,r.data.bgActivePosistion=void 0,se&&se.unactivate(),r.hoverData.which===3){var we={originalEvent:T,type:"cxttapend",position:{x:N[0],y:N[1]}};if(se?se.emit(we):U.emit(we),!r.hoverData.cxtDragged){var fe={originalEvent:T,type:"cxttap",position:{x:N[0],y:N[1]}};se?se.emit(fe):U.emit(fe)}r.hoverData.cxtDragged=!1,r.hoverData.which=null}else if(r.hoverData.which===1){if(n(ie,["mouseup","tapend","vmouseup"],T,{x:N[0],y:N[1]}),!r.dragData.didDrag&&!r.hoverData.dragged&&!r.hoverData.selecting&&!r.hoverData.isOverThresholdDrag&&(n(se,["click","tap","vclick"],T,{x:N[0],y:N[1]}),L=!1,T.timeStamp-k<=U.multiClickDebounceTime()?(B&&clearTimeout(B),L=!0,k=null,n(se,["dblclick","dbltap","vdblclick"],T,{x:N[0],y:N[1]})):(B=setTimeout(function(){L||n(se,["oneclick","onetap","voneclick"],T,{x:N[0],y:N[1]})},U.multiClickDebounceTime()),k=T.timeStamp)),se==null&&!r.dragData.didDrag&&!r.hoverData.selecting&&!r.hoverData.dragged&&!i(T)&&(U.$(t).unselect(["tapunselect"]),Z.length>0&&r.redrawHint("eles",!0),r.dragData.possibleDragElements=Z=U.collection()),ie==se&&!r.dragData.didDrag&&!r.hoverData.selecting&&ie!=null&&ie._private.selectable&&(r.hoverData.dragging||(U.selectionType()==="additive"||ge?ie.selected()?ie.unselect(["tapunselect"]):ie.select(["tapselect"]):ge||(U.$(t).unmerge(ie).unselect(["tapunselect"]),ie.select(["tapselect"]))),r.redrawHint("eles",!0)),r.hoverData.selecting){var me=U.collection(r.getAllInBox(H[0],H[1],H[2],H[3]));r.redrawHint("select",!0),me.length>0&&r.redrawHint("eles",!0),U.emit({type:"boxend",originalEvent:T,position:{x:N[0],y:N[1]}});var be=function(Ve){return Ve.selectable()&&!Ve.selected()};U.selectionType()==="additive"||ge||U.$(t).unmerge(me).unselect(),me.emit("box").stdFilter(be).select().emit("boxselect"),r.redraw()}if(r.hoverData.dragging&&(r.hoverData.dragging=!1,r.redrawHint("select",!0),r.redrawHint("eles",!0),r.redraw()),!H[4]){r.redrawHint("drag",!0),r.redrawHint("eles",!0);var ye=se&&se.grabbed();g(Z),ye&&(se.emit("freeon"),Z.emit("free"),r.dragData.didDrag&&(se.emit("dragfreeon"),Z.emit("dragfree")))}}H[4]=0,r.hoverData.down=null,r.hoverData.cxtStarted=!1,r.hoverData.draggingEles=!1,r.hoverData.selecting=!1,r.hoverData.isOverThresholdDrag=!1,r.dragData.didDrag=!1,r.hoverData.dragged=!1,r.hoverData.dragDelta=[],r.hoverData.mdownPos=null,r.hoverData.mdownGPos=null,r.hoverData.which=null}}},!1);var O=function(T){if(!r.scrollingPage){var $=r.cy,U=$.zoom(),N=$.pan(),H=r.projectIntoViewport(T.clientX,T.clientY),ie=[H[0]*U+N.x,H[1]*U+N.y];if(r.hoverData.draggingEles||r.hoverData.dragging||r.hoverData.cxtStarted||C()){T.preventDefault();return}if($.panningEnabled()&&$.userPanningEnabled()&&$.zoomingEnabled()&&$.userZoomingEnabled()){T.preventDefault(),r.data.wheelZooming=!0,clearTimeout(r.data.wheelTimeout),r.data.wheelTimeout=setTimeout(function(){r.data.wheelZooming=!1,r.redrawHint("eles",!0),r.redraw()},150);var Z;T.deltaY!=null?Z=T.deltaY/-250:T.wheelDeltaY!=null?Z=T.wheelDeltaY/1e3:Z=T.wheelDelta/1e3,Z=Z*r.wheelSensitivity;var se=T.deltaMode===1;se&&(Z*=33);var ge=$.zoom()*Math.pow(10,Z);T.type==="gesturechange"&&(ge=r.gestureStartZoom*T.scale),$.zoom({level:ge,renderedPosition:{x:ie[0],y:ie[1]}}),$.emit(T.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};r.registerBinding(r.container,"wheel",O,!0),r.registerBinding(e,"scroll",function(T){r.scrollingPage=!0,clearTimeout(r.scrollingPageTimeout),r.scrollingPageTimeout=setTimeout(function(){r.scrollingPage=!1},250)},!0),r.registerBinding(r.container,"gesturestart",function(T){r.gestureStartZoom=r.cy.zoom(),r.hasTouchStarted||T.preventDefault()},!0),r.registerBinding(r.container,"gesturechange",function(ee){r.hasTouchStarted||O(ee)},!0),r.registerBinding(r.container,"mouseout",function(T){var $=r.projectIntoViewport(T.clientX,T.clientY);r.cy.emit({originalEvent:T,type:"mouseout",position:{x:$[0],y:$[1]}})},!1),r.registerBinding(r.container,"mouseover",function(T){var $=r.projectIntoViewport(T.clientX,T.clientY);r.cy.emit({originalEvent:T,type:"mouseover",position:{x:$[0],y:$[1]}})},!1);var A,R,I,V,G,F,q,Y,Q,J,_,j,W,z=function(T,$,U,N){return Math.sqrt((U-T)*(U-T)+(N-$)*(N-$))},K=function(T,$,U,N){return(U-T)*(U-T)+(N-$)*(N-$)},X;r.registerBinding(r.container,"touchstart",X=function(T){if(r.hasTouchStarted=!0,!!M(T)){b(),r.touchData.capture=!0,r.data.bgActivePosistion=void 0;var $=r.cy,U=r.touchData.now,N=r.touchData.earlier;if(T.touches[0]){var H=r.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);U[0]=H[0],U[1]=H[1]}if(T.touches[1]){var H=r.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);U[2]=H[0],U[3]=H[1]}if(T.touches[2]){var H=r.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);U[4]=H[0],U[5]=H[1]}if(T.touches[1]){r.touchData.singleTouchMoved=!0,g(r.dragData.touchDragEles);var ie=r.findContainerClientCoords();Q=ie[0],J=ie[1],_=ie[2],j=ie[3],A=T.touches[0].clientX-Q,R=T.touches[0].clientY-J,I=T.touches[1].clientX-Q,V=T.touches[1].clientY-J,W=0<=A&&A<=_&&0<=I&&I<=_&&0<=R&&R<=j&&0<=V&&V<=j;var Z=$.pan(),se=$.zoom();G=z(A,R,I,V),F=K(A,R,I,V),q=[(A+I)/2,(R+V)/2],Y=[(q[0]-Z.x)/se,(q[1]-Z.y)/se];var ge=200,we=ge*ge;if(F=1){for(var pr=r.touchData.startPosition=[null,null,null,null,null,null],Ge=0;Ge=r.touchTapThreshold2}if($&&r.touchData.cxt){T.preventDefault();var pr=T.touches[0].clientX-Q,Ge=T.touches[0].clientY-J,Xe=T.touches[1].clientX-Q,Ze=T.touches[1].clientY-J,lr=K(pr,Ge,Xe,Ze),vr=lr/F,Br=150,br=Br*Br,Mr=1.5,Vr=Mr*Mr;if(vr>=Vr||lr>=br){r.touchData.cxt=!1,r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var qr={originalEvent:T,type:"cxttapend",position:{x:H[0],y:H[1]}};r.touchData.start?(r.touchData.start.unactivate().emit(qr),r.touchData.start=null):N.emit(qr)}}if($&&r.touchData.cxt){var qr={originalEvent:T,type:"cxtdrag",position:{x:H[0],y:H[1]}};r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.touchData.start?r.touchData.start.emit(qr):N.emit(qr),r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxtDragged=!0;var ar=r.findNearestElement(H[0],H[1],!0,!0);(!r.touchData.cxtOver||ar!==r.touchData.cxtOver)&&(r.touchData.cxtOver&&r.touchData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:H[0],y:H[1]}}),r.touchData.cxtOver=ar,ar&&ar.emit({originalEvent:T,type:"cxtdragover",position:{x:H[0],y:H[1]}}))}else if($&&T.touches[2]&&N.boxSelectionEnabled())T.preventDefault(),r.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,r.touchData.selecting||N.emit({originalEvent:T,type:"boxstart",position:{x:H[0],y:H[1]}}),r.touchData.selecting=!0,r.touchData.didSelect=!0,U[4]=1,!U||U.length===0||U[0]===void 0?(U[0]=(H[0]+H[2]+H[4])/3,U[1]=(H[1]+H[3]+H[5])/3,U[2]=(H[0]+H[2]+H[4])/3+1,U[3]=(H[1]+H[3]+H[5])/3+1):(U[2]=(H[0]+H[2]+H[4])/3,U[3]=(H[1]+H[3]+H[5])/3),r.redrawHint("select",!0),r.redraw();else if($&&T.touches[1]&&!r.touchData.didSelect&&N.zoomingEnabled()&&N.panningEnabled()&&N.userZoomingEnabled()&&N.userPanningEnabled()){T.preventDefault(),r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var Qe=r.dragData.touchDragEles;if(Qe){r.redrawHint("drag",!0);for(var cr=0;cr0&&!r.hoverData.draggingEles&&!r.swipePanning&&r.data.bgActivePosistion!=null&&(r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.redraw())}},!1);var he;r.registerBinding(e,"touchcancel",he=function(T){var $=r.touchData.start;r.touchData.capture=!1,$&&$.unactivate()});var te,re,ve,le;if(r.registerBinding(e,"touchend",te=function(T){var $=r.touchData.start,U=r.touchData.capture;if(U)T.touches.length===0&&(r.touchData.capture=!1),T.preventDefault();else return;var N=r.selection;r.swipePanning=!1,r.hoverData.draggingEles=!1;var H=r.cy,ie=H.zoom(),Z=r.touchData.now,se=r.touchData.earlier;if(T.touches[0]){var ge=r.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);Z[0]=ge[0],Z[1]=ge[1]}if(T.touches[1]){var ge=r.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);Z[2]=ge[0],Z[3]=ge[1]}if(T.touches[2]){var ge=r.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);Z[4]=ge[0],Z[5]=ge[1]}$&&$.unactivate();var we;if(r.touchData.cxt){if(we={originalEvent:T,type:"cxttapend",position:{x:Z[0],y:Z[1]}},$?$.emit(we):H.emit(we),!r.touchData.cxtDragged){var fe={originalEvent:T,type:"cxttap",position:{x:Z[0],y:Z[1]}};$?$.emit(fe):H.emit(fe)}r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxt=!1,r.touchData.start=null,r.redraw();return}if(!T.touches[2]&&H.boxSelectionEnabled()&&r.touchData.selecting){r.touchData.selecting=!1;var me=H.collection(r.getAllInBox(N[0],N[1],N[2],N[3]));N[0]=void 0,N[1]=void 0,N[2]=void 0,N[3]=void 0,N[4]=0,r.redrawHint("select",!0),H.emit({type:"boxend",originalEvent:T,position:{x:Z[0],y:Z[1]}});var be=function(br){return br.selectable()&&!br.selected()};me.emit("box").stdFilter(be).select().emit("boxselect"),me.nonempty()&&r.redrawHint("eles",!0),r.redraw()}if($!=null&&$.unactivate(),T.touches[2])r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);else if(!T.touches[1]){if(!T.touches[0]){if(!T.touches[0]){r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var ye=r.dragData.touchDragEles;if($!=null){var Ie=$._private.grabbed;g(ye),r.redrawHint("drag",!0),r.redrawHint("eles",!0),Ie&&($.emit("freeon"),ye.emit("free"),r.dragData.didDrag&&($.emit("dragfreeon"),ye.emit("dragfree"))),n($,["touchend","tapend","vmouseup","tapdragout"],T,{x:Z[0],y:Z[1]}),$.unactivate(),r.touchData.start=null}else{var Ve=r.findNearestElement(Z[0],Z[1],!0,!0);n(Ve,["touchend","tapend","vmouseup","tapdragout"],T,{x:Z[0],y:Z[1]})}var gr=r.touchData.startPosition[0]-Z[0],pr=gr*gr,Ge=r.touchData.startPosition[1]-Z[1],Xe=Ge*Ge,Ze=pr+Xe,lr=Ze*ie*ie;r.touchData.singleTouchMoved||($||H.$(":selected").unselect(["tapunselect"]),n($,["tap","vclick"],T,{x:Z[0],y:Z[1]}),re=!1,T.timeStamp-le<=H.multiClickDebounceTime()?(ve&&clearTimeout(ve),re=!0,le=null,n($,["dbltap","vdblclick"],T,{x:Z[0],y:Z[1]})):(ve=setTimeout(function(){re||n($,["onetap","voneclick"],T,{x:Z[0],y:Z[1]})},H.multiClickDebounceTime()),le=T.timeStamp)),$!=null&&!r.dragData.didDrag&&$._private.selectable&&lr"u"){var oe=[],de=function(T){return{clientX:T.clientX,clientY:T.clientY,force:1,identifier:T.pointerId,pageX:T.pageX,pageY:T.pageY,radiusX:T.width/2,radiusY:T.height/2,screenX:T.screenX,screenY:T.screenY,target:T.target}},Le=function(T){return{event:T,touch:de(T)}},Ce=function(T){oe.push(Le(T))},xe=function(T){for(var $=0;$0)return q[0]}return null},d=Object.keys(c),y=0;y0?h:mo(i,s,e,t,a,n,o,l)},checkPoint:function(e,t,a,n,i,s,o,l){l=l==="auto"?gt(n,i):l;var u=2*l;if(Gr(e,t,this.points,s,o,n,i-u,[0,-1],a)||Gr(e,t,this.points,s,o,n-u,i,[0,-1],a))return!0;var v=n/2+2*a,f=i/2+2*a,c=[s-v,o-f,s-v,o,s+v,o,s+v,o-f];return!!(dr(e,t,c)||ft(e,t,u,u,s+n/2-l,o+i/2-l,a)||ft(e,t,u,u,s-n/2+l,o+i/2-l,a))}}};Wr.registerNodeShapes=function(){var r=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",fr(3,0)),this.generateRoundPolygon("round-triangle",fr(3,0)),this.generatePolygon("rectangle",fr(4,0)),r.square=r.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var t=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t)}this.generatePolygon("pentagon",fr(5,0)),this.generateRoundPolygon("round-pentagon",fr(5,0)),this.generatePolygon("hexagon",fr(6,0)),this.generateRoundPolygon("round-hexagon",fr(6,0)),this.generatePolygon("heptagon",fr(7,0)),this.generateRoundPolygon("round-heptagon",fr(7,0)),this.generatePolygon("octagon",fr(8,0)),this.generateRoundPolygon("round-octagon",fr(8,0));var a=new Array(20);{var n=Gn(5,0),i=Gn(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=e.deqFastCost*w)break}else if(u){if(m>=e.deqCost*h||m>=e.deqAvgCost*c)break}else if(b>=e.deqNoDrawCost*qn)break;var S=e.deq(a,p,y);if(S.length>0)for(var E=0;E0&&(e.onDeqd(a,d),!u&&e.shouldRedraw(a,d,p,y)&&i())},o=e.priority||vi;n.beforeRender(s,o(a))}}}},Mg=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:en;ii(this,r),this.idsByKey=new Ir,this.keyForId=new Ir,this.cachesByLvl=new Ir,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}return si(r,[{key:"getIdsFor",value:function(t){t==null&&$e("Can not get id list for null key");var a=this.idsByKey,n=this.idsByKey.get(t);return n||(n=new Vt,a.set(t,n)),n}},{key:"addIdForKey",value:function(t,a){t!=null&&this.getIdsFor(t).add(a)}},{key:"deleteIdForKey",value:function(t,a){t!=null&&this.getIdsFor(t).delete(a)}},{key:"getNumberOfIdsForKey",value:function(t){return t==null?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var a=t.id(),n=this.keyForId.get(a),i=this.getKey(t);this.deleteIdForKey(n,a),this.addIdForKey(i,a),this.keyForId.set(a,i)}},{key:"deleteKeyMappingFor",value:function(t){var a=t.id(),n=this.keyForId.get(a);this.deleteIdForKey(n,a),this.keyForId.delete(a)}},{key:"keyHasChangedFor",value:function(t){var a=t.id(),n=this.keyForId.get(a),i=this.getKey(t);return n!==i}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var a=this.cachesByLvl,n=this.lvls,i=a.get(t);return i||(i=new Ir,a.set(t,i),n.push(t)),i}},{key:"getCache",value:function(t,a){return this.getCachesAt(a).get(t)}},{key:"get",value:function(t,a){var n=this.getKey(t),i=this.getCache(n,a);return i!=null&&this.updateKeyMappingFor(t),i}},{key:"getForCachedKey",value:function(t,a){var n=this.keyForId.get(t.id()),i=this.getCache(n,a);return i}},{key:"hasCache",value:function(t,a){return this.getCachesAt(a).has(t)}},{key:"has",value:function(t,a){var n=this.getKey(t);return this.hasCache(n,a)}},{key:"setCache",value:function(t,a,n){n.key=t,this.getCachesAt(a).set(t,n)}},{key:"set",value:function(t,a,n){var i=this.getKey(t);this.setCache(i,a,n),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,a){this.getCachesAt(a).delete(t)}},{key:"delete",value:function(t,a){var n=this.getKey(t);this.deleteCache(n,a)}},{key:"invalidateKey",value:function(t){var a=this;this.lvls.forEach(function(n){return a.deleteCache(t,n)})}},{key:"invalidate",value:function(t){var a=t.id(),n=this.keyForId.get(a);this.deleteKeyMappingFor(t);var i=this.doesEleInvalidateKey(t);return i&&this.invalidateKey(n),i||this.getNumberOfIdsForKey(n)===0}}]),r}(),Fs=25,Ha=50,Ja=-4,ri=3,Lg=7.99,Ag=8,Rg=1024,Og=1024,Ig=1024,zg=.2,Ng=.8,Fg=10,Vg=.15,qg=.1,$g=.9,Hg=.9,Gg=100,Kg=1,Bt={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Wg=rr({getKey:null,doesEleInvalidateKey:en,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:lo,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),sa=function(e,t){var a=this;a.renderer=e,a.onDequeues=[];var n=Wg(t);pe(a,n),a.lookup=new Mg(n.getKey,n.doesEleInvalidateKey),a.setupDequeueing()},Ye=sa.prototype;Ye.reasons=Bt;Ye.getTextureQueue=function(r){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[r]=e.eleImgCaches[r]||[]};Ye.getRetiredTextureQueue=function(r){var e=this,t=e.eleImgCaches.retired=e.eleImgCaches.retired||{},a=t[r]=t[r]||[];return a};Ye.getElementQueue=function(){var r=this,e=r.eleCacheQueue=r.eleCacheQueue||new Ca(function(t,a){return a.reqs-t.reqs});return e};Ye.getElementKeyToQueue=function(){var r=this,e=r.eleKeyToCacheQueue=r.eleKeyToCacheQueue||{};return e};Ye.getElement=function(r,e,t,a,n){var i=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!r.visible()||r.removed()||!i.allowEdgeTxrCaching&&r.isEdge()||!i.allowParentTxrCaching&&r.isParent())return null;if(a==null&&(a=Math.ceil(ci(o*t))),a=Lg||a>ri)return null;var u=Math.pow(2,a),v=e.h*u,f=e.w*u,c=s.eleTextBiggerThanMin(r,u);if(!this.isVisible(r,c))return null;var h=l.get(r,a);if(h&&h.invalidated&&(h.invalidated=!1,h.texture.invalidatedWidth-=h.width),h)return h;var d;if(v<=Fs?d=Fs:v<=Ha?d=Ha:d=Math.ceil(v/Ha)*Ha,v>Ig||f>Og)return null;var y=i.getTextureQueue(d),p=y[y.length-2],g=function(){return i.recycleTexture(d,f)||i.addTexture(d,f)};p||(p=y[y.length-1]),p||(p=g()),p.width-p.usedWidtha;P--)C=i.getElement(r,e,t,P,Bt.downscale);M()}else return i.queueElement(r,E.level-1),E;else{var B;if(!b&&!w&&!S)for(var L=a-1;L>=Ja;L--){var k=l.get(r,L);if(k){B=k;break}}if(m(B))return i.queueElement(r,a),B;p.context.translate(p.usedWidth,0),p.context.scale(u,u),this.drawElement(p.context,r,e,c,!1),p.context.scale(1/u,1/u),p.context.translate(-p.usedWidth,0)}return h={x:p.usedWidth,texture:p,level:a,scale:u,width:f,height:v,scaledLabelShown:c},p.usedWidth+=Math.ceil(f+Ag),p.eleCaches.push(h),l.set(r,a,h),i.checkTextureFullness(p),h};Ye.invalidateElements=function(r){for(var e=0;e=zg*r.width&&this.retireTexture(r)};Ye.checkTextureFullness=function(r){var e=this,t=e.getTextureQueue(r.height);r.usedWidth/r.width>Ng&&r.fullnessChecks>=Fg?et(t,r):r.fullnessChecks++};Ye.retireTexture=function(r){var e=this,t=r.height,a=e.getTextureQueue(t),n=this.lookup;et(a,r),r.retired=!0;for(var i=r.eleCaches,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,fi(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),et(n,s),a.push(s),s}};Ye.queueElement=function(r,e){var t=this,a=t.getElementQueue(),n=t.getElementKeyToQueue(),i=this.getKey(r),s=n[i];if(s)s.level=Math.max(s.level,e),s.eles.merge(r),s.reqs++,a.updateItem(s);else{var o={eles:r.spawn().merge(r),level:e,reqs:1,key:i};a.push(o),n[i]=o}};Ye.dequeue=function(r){for(var e=this,t=e.getElementQueue(),a=e.getElementKeyToQueue(),n=[],i=e.lookup,s=0;s0;s++){var o=t.pop(),l=o.key,u=o.eles[0],v=i.hasCache(u,o.level);if(a[l]=null,v)continue;n.push(o);var f=e.getBoundingBox(u);e.getElement(u,f,r,o.level,Bt.dequeue)}return n};Ye.removeFromQueue=function(r){var e=this,t=e.getElementQueue(),a=e.getElementKeyToQueue(),n=this.getKey(r),i=a[n];i!=null&&(i.eles.length===1?(i.reqs=li,t.updateItem(i),t.pop(),a[n]=null):i.eles.unmerge(r))};Ye.onDequeue=function(r){this.onDequeues.push(r)};Ye.offDequeue=function(r){et(this.onDequeues,r)};Ye.setupDequeueing=bu.setupDequeueing({deqRedrawThreshold:Gg,deqCost:Vg,deqAvgCost:qg,deqNoDrawCost:$g,deqFastCost:Hg,deq:function(e,t,a){return e.dequeue(t,a)},onDeqd:function(e,t){for(var a=0;a=Yg||t>ln)return null}a.validateLayersElesOrdering(t,r);var l=a.layersByLevel,u=Math.pow(2,t),v=l[t]=l[t]||[],f,c=a.levelIsComplete(t,r),h,d=function(){var M=function(O){if(a.validateLayersElesOrdering(O,r),a.levelIsComplete(O,r))return h=l[O],!0},P=function(O){if(!h)for(var A=t+O;ua<=A&&A<=ln&&!M(A);A+=O);};P(1),P(-1);for(var B=v.length-1;B>=0;B--){var L=v[B];L.invalid&&et(v,L)}};if(!c)d();else return v;var y=function(){if(!f){f=hr();for(var M=0;Mqs||L>qs)return null;var k=B*L;if(k>rp)return null;var O=a.makeLayer(f,t);if(P!=null){var A=v.indexOf(P)+1;v.splice(A,0,O)}else(M.insert===void 0||M.insert)&&v.unshift(O);return O};if(a.skipping&&!o)return null;for(var g=null,m=r.length/Ug,b=!o,w=0;w=m||!yo(g.bb,S.boundingBox()))&&(g=p({insert:!0,after:g}),!g))return null;h||b?a.queueLayer(g,S):a.drawEleInLayer(g,S,t,e),g.eles.push(S),x[t]=g}return h||(b?null:v)};tr.getEleLevelForLayerLevel=function(r,e){return r};tr.drawEleInLayer=function(r,e,t,a){var n=this,i=this.renderer,s=r.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(t=n.getEleLevelForLayerLevel(t,a),i.setImgSmoothing(s,!1),i.drawCachedElement(s,e,null,null,t,tp),i.setImgSmoothing(s,!0))};tr.levelIsComplete=function(r,e){var t=this,a=t.layersByLevel[r];if(!a||a.length===0)return!1;for(var n=0,i=0;i0||s.invalid)return!1;n+=s.eles.length}return n===e.length};tr.validateLayersElesOrdering=function(r,e){var t=this.layersByLevel[r];if(t)for(var a=0;a0){e=!0;break}}return e};tr.invalidateElements=function(r){var e=this;r.length!==0&&(e.lastInvalidationTime=Hr(),!(r.length===0||!e.haveLayers())&&e.updateElementsInLayers(r,function(a,n,i){e.invalidateLayer(a)}))};tr.invalidateLayer=function(r){if(this.lastInvalidationTime=Hr(),!r.invalid){var e=r.level,t=r.eles,a=this.layersByLevel[e];et(a,r),r.elesQueue=[],r.invalid=!0,r.replacement&&(r.replacement.invalid=!0);for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(i&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;t&&(l=t,r.translate(-l.x1,-l.y1));var u=i?e.pstyle("opacity").value:1,v=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,c=e.pstyle("line-style").value,h=e.pstyle("width").pfValue,d=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,p=e.pstyle("line-outline-color").value,g=u*v,m=u*v,b=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g;f==="straight-triangle"?(s.eleStrokeStyle(r,e,O),s.drawEdgeTrianglePath(e,r,o.allpts)):(r.lineWidth=h,r.lineCap=d,s.eleStrokeStyle(r,e,O),s.drawEdgePath(e,r,o.allpts,c),r.lineCap="butt")},w=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g;if(r.lineWidth=h+y,r.lineCap=d,y>0)s.colorStrokeStyle(r,p[0],p[1],p[2],O);else{r.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,r,o.allpts):(s.drawEdgePath(e,r,o.allpts,c),r.lineCap="butt")},S=function(){n&&s.drawEdgeOverlay(r,e)},E=function(){n&&s.drawEdgeUnderlay(r,e)},x=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;s.drawArrowheads(r,e,O)},D=function(){s.drawElementText(r,e,null,a)};r.lineJoin="round";var C=e.pstyle("ghost").value==="yes";if(C){var M=e.pstyle("ghost-offset-x").pfValue,P=e.pstyle("ghost-offset-y").pfValue,B=e.pstyle("ghost-opacity").value,L=g*B;r.translate(M,P),b(L),x(L),r.translate(-M,-P)}else w();E(),b(),x(),S(),D(),t&&r.translate(l.x1,l.y1)}};var Eu=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,a){if(a.visible()){var n=a.pstyle("".concat(e,"-opacity")).value;if(n!==0){var i=this,s=i.usePaths(),o=a._private.rscratch,l=a.pstyle("".concat(e,"-padding")).pfValue,u=2*l,v=a.pstyle("".concat(e,"-color")).value;t.lineWidth=u,o.edgeType==="self"&&!s?t.lineCap="butt":t.lineCap="round",i.colorStrokeStyle(t,v[0],v[1],v[2],n),i.drawEdgePath(a,t,o.allpts,"solid")}}}};Ur.drawEdgeOverlay=Eu("overlay");Ur.drawEdgeUnderlay=Eu("underlay");Ur.drawEdgePath=function(r,e,t,a){var n=r._private.rscratch,i=e,s,o=!1,l=this.usePaths(),u=r.pstyle("line-dash-pattern").pfValue,v=r.pstyle("line-dash-offset").pfValue;if(l){var f=t.join("$"),c=n.pathCacheKey&&n.pathCacheKey===f;c?(s=e=n.pathCache,o=!0):(s=e=new Path2D,n.pathCacheKey=f,n.pathCache=s)}if(i.setLineDash)switch(a){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(u),i.lineDashOffset=v;break;case"solid":i.setLineDash([]);break}if(!o&&!n.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(t[0],t[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var h=2;h+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(a==null){if(i&&!s.eleTextBiggerThanMin(e))return}else if(a===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);r.textAlign=l,r.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,v=e.pstyle("label"),f=e.pstyle("source-label"),c=e.pstyle("target-label");if(u||(!v||!v.value)&&(!f||!f.value)&&(!c||!c.value))return;r.textAlign="center",r.textBaseline="bottom"}var h=!t,d;t&&(d=t,r.translate(-d.x1,-d.y1)),n==null?(s.drawText(r,e,null,h,i),e.isEdge()&&(s.drawText(r,e,"source",h,i),s.drawText(r,e,"target",h,i))):s.drawText(r,e,n,h,i),t&&r.translate(d.x1,d.y1)};wt.getFontCache=function(r){var e;this.fontCaches=this.fontCaches||[];for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:!0,a=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=t?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,v=e.pstyle("text-outline-color").value;r.font=a+" "+s+" "+n+" "+i,r.lineJoin="round",this.colorFillStyle(r,u[0],u[1],u[2],o),this.colorStrokeStyle(r,v[0],v[1],v[2],l)};function Hn(r,e,t,a,n){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=arguments.length>6?arguments[6]:void 0;r.beginPath(),r.moveTo(e+i,t),r.lineTo(e+a-i,t),r.quadraticCurveTo(e+a,t,e+a,t+i),r.lineTo(e+a,t+n-i),r.quadraticCurveTo(e+a,t+n,e+a-i,t+n),r.lineTo(e+i,t+n),r.quadraticCurveTo(e,t+n,e,t+n-i),r.lineTo(e,t+i),r.quadraticCurveTo(e,t,e+i,t),r.closePath(),s?r.stroke():r.fill()}wt.getTextAngle=function(r,e){var t,a=r._private,n=a.rscratch,i=e?e+"-":"",s=r.pstyle(i+"text-rotation"),o=kr(n,"labelAngle",e);return s.strValue==="autorotate"?t=r.isEdge()?o:0:s.strValue==="none"?t=0:t=s.pfValue,t};wt.drawText=function(r,e,t){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,s=i.rscratch,o=n?e.effectiveOpacity():1;if(!(n&&(o===0||e.pstyle("text-opacity").value===0))){t==="main"&&(t=null);var l=kr(s,"labelX",t),u=kr(s,"labelY",t),v,f,c=this.getLabelText(e,t);if(c!=null&&c!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(r,e,n);var h=t?t+"-":"",d=kr(s,"labelWidth",t),y=kr(s,"labelHeight",t),p=e.pstyle(h+"text-margin-x").pfValue,g=e.pstyle(h+"text-margin-y").pfValue,m=e.isEdge(),b=e.pstyle("text-halign").value,w=e.pstyle("text-valign").value;m&&(b="center",w="center"),l+=p,u+=g;var S;switch(a?S=this.getTextAngle(e,t):S=0,S!==0&&(v=l,f=u,r.translate(v,f),r.rotate(S),l=0,u=0),w){case"top":break;case"center":u+=y/2;break;case"bottom":u+=y;break}var E=e.pstyle("text-background-opacity").value,x=e.pstyle("text-border-opacity").value,D=e.pstyle("text-border-width").pfValue,C=e.pstyle("text-background-padding").pfValue,M=e.pstyle("text-background-shape").strValue,P=M.indexOf("round")===0,B=2;if(E>0||D>0&&x>0){var L=l-C;switch(b){case"left":L-=d;break;case"center":L-=d/2;break}var k=u-y-C,O=d+2*C,A=y+2*C;if(E>0){var R=r.fillStyle,I=e.pstyle("text-background-color").value;r.fillStyle="rgba("+I[0]+","+I[1]+","+I[2]+","+E*o+")",P?Hn(r,L,k,O,A,B):r.fillRect(L,k,O,A),r.fillStyle=R}if(D>0&&x>0){var V=r.strokeStyle,G=r.lineWidth,F=e.pstyle("text-border-color").value,q=e.pstyle("text-border-style").value;if(r.strokeStyle="rgba("+F[0]+","+F[1]+","+F[2]+","+x*o+")",r.lineWidth=D,r.setLineDash)switch(q){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"double":r.lineWidth=D/4,r.setLineDash([]);break;case"solid":r.setLineDash([]);break}if(P?Hn(r,L,k,O,A,B,"stroke"):r.strokeRect(L,k,O,A),q==="double"){var Y=D/2;P?Hn(r,L+Y,k+Y,O-Y*2,A-Y*2,B,"stroke"):r.strokeRect(L+Y,k+Y,O-Y*2,A-Y*2)}r.setLineDash&&r.setLineDash([]),r.lineWidth=G,r.strokeStyle=V}}var Q=2*e.pstyle("text-outline-width").pfValue;if(Q>0&&(r.lineWidth=Q),e.pstyle("text-wrap").value==="wrap"){var J=kr(s,"labelWrapCachedLines",t),_=kr(s,"labelLineHeight",t),j=d/2,W=this.getLabelJustification(e);switch(W==="auto"||(b==="left"?W==="left"?l+=-d:W==="center"&&(l+=-j):b==="center"?W==="left"?l+=-j:W==="right"&&(l+=j):b==="right"&&(W==="center"?l+=j:W==="right"&&(l+=d))),w){case"top":u-=(J.length-1)*_;break;case"center":case"bottom":u-=(J.length-1)*_;break}for(var z=0;z0&&r.strokeText(J[z],l,u),r.fillText(J[z],l,u),u+=_}else Q>0&&r.strokeText(c,l,u),r.fillText(c,l,u);S!==0&&(r.rotate(-S),r.translate(-v,-f))}}};var Xt={};Xt.drawNode=function(r,e,t){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,v=u.rscratch,f=e.position();if(!(!ne(f.x)||!ne(f.y))&&!(i&&!e.visible())){var c=i?e.effectiveOpacity():1,h=s.usePaths(),d,y=!1,p=e.padding();o=e.width()+2*p,l=e.height()+2*p;var g;t&&(g=t,r.translate(-g.x1,-g.y1));for(var m=e.pstyle("background-image"),b=m.value,w=new Array(b.length),S=new Array(b.length),E=0,x=0;x0&&arguments[0]!==void 0?arguments[0]:L;s.eleFillStyle(r,e,N)},z=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:F;s.colorStrokeStyle(r,k[0],k[1],k[2],N)},K=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J;s.colorStrokeStyle(r,Y[0],Y[1],Y[2],N)},X=function(N,H,ie,Z){var se=s.nodePathCache=s.nodePathCache||[],ge=uo(ie==="polygon"?ie+","+Z.join(","):ie,""+H,""+N,""+j),we=se[ge],fe,me=!1;return we!=null?(fe=we,me=!0,v.pathCache=fe):(fe=new Path2D,se[ge]=v.pathCache=fe),{path:fe,cacheHit:me}},ae=e.pstyle("shape").strValue,he=e.pstyle("shape-polygon-points").pfValue;if(h){r.translate(f.x,f.y);var te=X(o,l,ae,he);d=te.path,y=te.cacheHit}var re=function(){if(!y){var N=f;h&&(N={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(d||r,N.x,N.y,o,l,j,v)}h?r.fill(d):r.fill()},ve=function(){for(var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ie=u.backgrounding,Z=0,se=0;se0&&arguments[0]!==void 0?arguments[0]:!1,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;s.hasPie(e)&&(s.drawPie(r,e,H),N&&(h||s.nodeShapes[s.getNodeShape(e)].draw(r,f.x,f.y,o,l,j,v)))},oe=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,H=(P>0?P:-P)*N,ie=P>0?0:255;P!==0&&(s.colorFillStyle(r,ie,ie,ie,H),h?r.fill(d):r.fill())},de=function(){if(B>0){if(r.lineWidth=B,r.lineCap=R,r.lineJoin=A,r.setLineDash)switch(O){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash(V),r.lineDashOffset=G;break;case"solid":case"double":r.setLineDash([]);break}if(I!=="center"){if(r.save(),r.lineWidth*=2,I==="inside")h?r.clip(d):r.clip();else{var N=new Path2D;N.rect(-o/2-B,-l/2-B,o+2*B,l+2*B),N.addPath(d),r.clip(N,"evenodd")}h?r.stroke(d):r.stroke(),r.restore()}else h?r.stroke(d):r.stroke();if(O==="double"){r.lineWidth=B/3;var H=r.globalCompositeOperation;r.globalCompositeOperation="destination-out",h?r.stroke(d):r.stroke(),r.globalCompositeOperation=H}r.setLineDash&&r.setLineDash([])}},Le=function(){if(q>0){if(r.lineWidth=q,r.lineCap="butt",r.setLineDash)switch(Q){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"solid":case"double":r.setLineDash([]);break}var N=f;h&&(N={x:0,y:0});var H=s.getNodeShape(e),ie=B;I==="inside"&&(ie=0),I==="outside"&&(ie*=2);var Z=(o+ie+(q+_))/o,se=(l+ie+(q+_))/l,ge=o*Z,we=l*se,fe=s.nodeShapes[H].points,me;if(h){var be=X(ge,we,H,fe);me=be.path}if(H==="ellipse")s.drawEllipsePath(me||r,N.x,N.y,ge,we);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(H)){var ye=0,Ie=0,Ve=0;H==="round-diamond"?ye=(ie+_+q)*1.4:H==="round-heptagon"?(ye=(ie+_+q)*1.075,Ve=-(ie/2+_+q)/35):H==="round-hexagon"?ye=(ie+_+q)*1.12:H==="round-pentagon"?(ye=(ie+_+q)*1.13,Ve=-(ie/2+_+q)/15):H==="round-tag"?(ye=(ie+_+q)*1.12,Ie=(ie/2+q+_)*.07):H==="round-triangle"&&(ye=(ie+_+q)*(Math.PI/2),Ve=-(ie+_/2+q)/Math.PI),ye!==0&&(Z=(o+ye)/o,ge=o*Z,["round-hexagon","round-tag"].includes(H)||(se=(l+ye)/l,we=l*se)),j=j==="auto"?wo(ge,we):j;for(var gr=ge/2,pr=we/2,Ge=j+(ie+q+_)/2,Xe=new Array(fe.length/2),Ze=new Array(fe.length/2),lr=0;lr0){if(n=n||a.position(),i==null||s==null){var h=a.padding();i=a.width()+2*h,s=a.height()+2*h}o.colorFillStyle(t,v[0],v[1],v[2],u),o.nodeShapes[f].draw(t,n.x,n.y,i+l*2,s+l*2,c),t.fill()}}}};Xt.drawNodeOverlay=Cu("overlay");Xt.drawNodeUnderlay=Cu("underlay");Xt.hasPie=function(r){return r=r[0],r._private.hasPie};Xt.drawPie=function(r,e,t,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=e.pstyle("pie-size"),s=a.x,o=a.y,l=e.width(),u=e.height(),v=Math.min(l,u)/2,f=0,c=this.usePaths();c&&(s=0,o=0),i.units==="%"?v=v*i.pfValue:i.pfValue!==void 0&&(v=i.pfValue/2);for(var h=1;h<=n.pieBackgroundN;h++){var d=e.pstyle("pie-"+h+"-background-size").value,y=e.pstyle("pie-"+h+"-background-color").value,p=e.pstyle("pie-"+h+"-background-opacity").value*t,g=d/100;g+f>1&&(g=1-f);var m=1.5*Math.PI+2*Math.PI*f,b=2*Math.PI*g,w=m+b;d===0||f>=1||f+g>1||(r.beginPath(),r.moveTo(s,o),r.arc(s,o,v,m,w),r.closePath(),this.colorFillStyle(r,y[0],y[1],y[2],p),r.fill(),f+=g)}};var mr={},dp=100;mr.getPixelRatio=function(){var r=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),t=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/t};mr.paintCache=function(r){for(var e=this.paintCaches=this.paintCaches||[],t=!0,a,n=0;ns.minMbLowQualFrames&&(s.motionBlurPxRatio=s.mbPxRBlurry)),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!f&&(v[s.NODE]=!0,v[s.SELECT_BOX]=!0);var m=l.style(),b=l.zoom(),w=n!==void 0?n:b,S=l.pan(),E={x:S.x,y:S.y},x={zoom:b,pan:{x:S.x,y:S.y}},D=s.prevViewport,C=D===void 0||x.zoom!==D.zoom||x.pan.x!==D.pan.x||x.pan.y!==D.pan.y;!C&&!(y&&!d)&&(s.motionBlurPxRatio=1),i&&(E=i),w*=o,E.x*=o,E.y*=o;var M=s.getCachedZSortedEles();function P(te,re,ve,le,oe){var de=te.globalCompositeOperation;te.globalCompositeOperation="destination-out",s.colorFillStyle(te,255,255,255,s.motionBlurTransparency),te.fillRect(re,ve,le,oe),te.globalCompositeOperation=de}function B(te,re){var ve,le,oe,de;!s.clearingMotionBlur&&(te===u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]||te===u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG])?(ve={x:S.x*h,y:S.y*h},le=b*h,oe=s.canvasWidth*h,de=s.canvasHeight*h):(ve=E,le=w,oe=s.canvasWidth,de=s.canvasHeight),te.setTransform(1,0,0,1,0,0),re==="motionBlur"?P(te,0,0,oe,de):!e&&(re===void 0||re)&&te.clearRect(0,0,oe,de),t||(te.translate(ve.x,ve.y),te.scale(le,le)),i&&te.translate(i.x,i.y),n&&te.scale(n,n)}if(f||(s.textureDrawLastFrame=!1),f){if(s.textureDrawLastFrame=!0,!s.textureCache){s.textureCache={},s.textureCache.bb=l.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER];var L=s.data.bufferContexts[s.TEXTURE_BUFFER];L.setTransform(1,0,0,1,0,0),L.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:L,drawOnlyNodeLayer:!0,forcedPxRatio:o*s.textureMult});var x=s.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:s.canvasWidth,height:s.canvasHeight};x.mpan={x:(0-x.pan.x)/x.zoom,y:(0-x.pan.y)/x.zoom}}v[s.DRAG]=!1,v[s.NODE]=!1;var k=u.contexts[s.NODE],O=s.textureCache.texture,x=s.textureCache.viewport;k.setTransform(1,0,0,1,0,0),c?P(k,0,0,x.width,x.height):k.clearRect(0,0,x.width,x.height);var A=m.core("outside-texture-bg-color").value,R=m.core("outside-texture-bg-opacity").value;s.colorFillStyle(k,A[0],A[1],A[2],R),k.fillRect(0,0,x.width,x.height);var b=l.zoom();B(k,!1),k.clearRect(x.mpan.x,x.mpan.y,x.width/x.zoom/o,x.height/x.zoom/o),k.drawImage(O,x.mpan.x,x.mpan.y,x.width/x.zoom/o,x.height/x.zoom/o)}else s.textureOnViewport&&!e&&(s.textureCache=null);var I=l.extent(),V=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),G=s.hideEdgesOnViewport&&V,F=[];if(F[s.NODE]=!v[s.NODE]&&c&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,F[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),F[s.DRAG]=!v[s.DRAG]&&c&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,F[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),v[s.NODE]||t||a||F[s.NODE]){var q=c&&!F[s.NODE]&&h!==1,k=e||(q?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),Y=c&&!q?"motionBlur":void 0;B(k,Y),G?s.drawCachedNodes(k,M.nondrag,o,I):s.drawLayeredElements(k,M.nondrag,o,I),s.debug&&s.drawDebugPoints(k,M.nondrag),!t&&!c&&(v[s.NODE]=!1)}if(!a&&(v[s.DRAG]||t||F[s.DRAG])){var q=c&&!F[s.DRAG]&&h!==1,k=e||(q?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]);B(k,c&&!q?"motionBlur":void 0),G?s.drawCachedNodes(k,M.drag,o,I):s.drawCachedElements(k,M.drag,o,I),s.debug&&s.drawDebugPoints(k,M.drag),!t&&!c&&(v[s.DRAG]=!1)}if(s.showFps||!a&&v[s.SELECT_BOX]&&!t){var k=e||u.contexts[s.SELECT_BOX];if(B(k),s.selection[4]==1&&(s.hoverData.selecting||s.touchData.selecting)){var b=s.cy.zoom(),Q=m.core("selection-box-border-width").value/b;k.lineWidth=Q,k.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",k.fillRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]),Q>0&&(k.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",k.strokeRect(s.selection[0],s.selection[1],s.selection[2]-s.selection[0],s.selection[3]-s.selection[1]))}if(u.bgActivePosistion&&!s.hoverData.selecting){var b=s.cy.zoom(),J=u.bgActivePosistion;k.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",k.beginPath(),k.arc(J.x,J.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),k.fill()}var _=s.lastRedrawTime;if(s.showFps&&_){_=Math.round(_);var j=Math.round(1e3/_);k.setTransform(1,0,0,1,0,0),k.fillStyle="rgba(255, 0, 0, 0.75)",k.strokeStyle="rgba(255, 0, 0, 0.75)",k.lineWidth=1,k.fillText("1 frame = "+_+" ms = "+j+" fps",0,20);var W=60;k.strokeRect(0,30,250,20),k.fillRect(0,30,250*Math.min(j/W,1),20)}t||(v[s.SELECT_BOX]=!1)}if(c&&h!==1){var z=u.contexts[s.NODE],K=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],X=u.contexts[s.DRAG],ae=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],he=function(re,ve,le){re.setTransform(1,0,0,1,0,0),le||!g?re.clearRect(0,0,s.canvasWidth,s.canvasHeight):P(re,0,0,s.canvasWidth,s.canvasHeight);var oe=h;re.drawImage(ve,0,0,s.canvasWidth*oe,s.canvasHeight*oe,0,0,s.canvasWidth,s.canvasHeight)};(v[s.NODE]||F[s.NODE])&&(he(z,K,F[s.NODE]),v[s.NODE]=!1),(v[s.DRAG]||F[s.DRAG])&&(he(X,ae,F[s.DRAG]),v[s.DRAG]=!1)}s.prevViewport=x,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),c&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!f,s.mbFrames=0,v[s.NODE]=!0,v[s.DRAG]=!0,s.redraw()},dp)),e||l.emit("render")};var it={};it.drawPolygonPath=function(r,e,t,a,n,i){var s=a/2,o=n/2;r.beginPath&&r.beginPath(),r.moveTo(e+s*i[0],t+o*i[1]);for(var l=1;l0&&s>0){h.clearRect(0,0,i,s),h.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(r.full)h.translate(-a.x1*u,-a.y1*u),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(a.x1*u,a.y1*u);else{var y=e.pan(),p={x:y.x*u,y:y.y*u};u*=e.zoom(),h.translate(p.x,p.y),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(-p.x,-p.y)}r.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=r.bg,h.rect(0,0,i,s),h.fill())}return c};function hp(r,e){for(var t=atob(r),a=new ArrayBuffer(t.length),n=new Uint8Array(a),i=0;i"u"?"undefined":Ue(OffscreenCanvas))!=="undefined")t=new OffscreenCanvas(r,e);else{var a=this.cy.window(),n=a.document;t=n.createElement("canvas"),t.width=r,t.height=e}return t};[xu,Fr,Ur,Pi,wt,Xt,mr,it,Pa,Du].forEach(function(r){pe(De,r)});var yp=[{name:"null",impl:uu},{name:"base",impl:mu},{name:"canvas",impl:gp}],mp=[{type:"layout",extensions:Sg},{type:"renderer",extensions:yp}],Pu={},Bu={};function Mu(r,e,t){var a=t,n=function(D){Me("Can not register `"+e+"` for `"+r+"` since `"+D+"` already exists in the prototype and can not be overridden")};if(r==="core"){if(ba.prototype[e])return n(e);ba.prototype[e]=t}else if(r==="collection"){if(er.prototype[e])return n(e);er.prototype[e]=t}else if(r==="layout"){for(var i=function(D){this.options=D,t.call(this,D),Te(this._private)||(this._private={}),this._private.cy=D.cy,this._private.listeners=[],this.createEmitter()},s=i.prototype=Object.create(t.prototype),o=[],l=0;l{b.clear(),J.clear(),f.clear()},"clear"),O=X((e,t)=>{const n=b.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=X((e,t)=>{const n=b.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=X((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const r=t.node(a);i.info("cp ",a," to ",o," with parent ",e),n.setNode(a,r),o!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);i.debug("Copying Edges",u),u.forEach(l=>{i.info("Edge",l);const v=t.edge(l.v,l.w,l.name);i.info("Edge data",v,o);try{se(l,o)?(i.info("Copying as ",l.v,l.w,v,l.name),n.setEdge(l.v,l.w,v,l.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",a),t.removeNode(a)})},"copy"),R=X((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)J.set(c,e),o=[...o,...R(c,t)];return o},"extractDescendants"),ie=X((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>r.some(v=>l.v===v.v&&l.w===v.w))},"findCommonEdges"),D=X((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const r=D(a,t,n),u=ie(t,n,r);if(r)if(u.length>0)c=r;else return r}return c},"findNonClusterChild"),k=X(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),re=X((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),b.set(n,R(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(i.debug("Cluster identified",n,b),c.forEach(a=>{const r=O(a.v,n),u=O(a.w,n);r^u&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",b.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,b)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let c=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const r=e.parent(c);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),i.warn("Adjusted Graph",p(e)),T(e,0),i.trace(f)},"adjustClustersAndEdges"),T=X((e,t)=>{var c,a;if(i.warn("extractor - ",t,p(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),o=!1;for(const r of n){const u=e.children(r);o=o||u.length>0}if(!o){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,f,f.has(r)&&!f.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!f.has(r))i.debug("Not a cluster",r,t);else if(!f.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(c=f.get(r))==null?void 0:c.clusterData)!=null&&a.dir&&(l=f.get(r).clusterData.dir,i.warn("Fixing dir",f.get(r).clusterData.dir,l));const v=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",p(e)),G(r,e,v,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:f.get(r).clusterData,label:f.get(r).label,graph:v}),i.warn("New graph after copy node: (",r,")",p(v)),i.debug("Old graph after copy",p(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!f.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const u=e.node(r);i.warn(" Now next level",r,u),u!=null&&u.clusterNode&&T(u.graph,t+1)}},"extractor"),M=X((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const c=e.children(o),a=M(e,c);n=[...n,...a]}),n},"sorter"),oe=X(e=>M(e,e.children()),"sortNodesByHierarchy"),j=X(async(e,t,n,o,c,a)=>{i.warn("Graph in recursive render:XAX",p(t),c);const r=t.graph().rankdir;i.trace("Dir in recursive render - dir:",r);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),v=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),g=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(d){const s=t.node(d);if(c!==void 0){const m=JSON.parse(JSON.stringify(c.clusterData));i.trace(`Setting data for parent cluster XXX + Node.id = `,d,` + data=`,m.height,` +Parent cluster`,c.height),t.setNode(c.id,m),t.parent(d)||(i.trace("Setting parent",d,c.id),t.setParent(d,c.id,m))}if(i.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),s!=null&&s.clusterNode){i.info("Cluster identified XBX",d,s.width,t.node(d));const{ranksep:m,nodesep:h}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:m+25,nodesep:h});const N=await j(g,s.graph,n,o,t.node(d),a),x=N.elem;z(s,x),s.diff=N.diff||0,i.info("New compound node after recursive render XAX",d,"width",s.width,"height",s.height),U(x,s)}else t.children(d).length>0?(i.trace("Cluster - the non recursive path XBX",d,s.id,s,s.width,"Graph:",t),i.trace(D(s.id,t)),f.set(s.id,{id:D(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",d,g,t.node(d),r),await $(g,t.node(d),{config:a,dir:r}))})),await X(async()=>{const d=t.edges().map(async function(s){const m=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",f,"ids:",s.v,s.w,"Translating: ",f.get(s.v),f.get(s.w)),await Z(C,m)});await Promise.all(d)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(p(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(p(t)));let E=0,{subGraphTitleTotalMargin:y}=q(a);return await Promise.all(oe(t).map(async function(d){var m;const s=t.node(d);if(i.info("Position XBX => "+d+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=y,i.info("A tainted cluster node XBX1",d,s.id,s.width,s.height,s.x,s.y,t.parent(d)),f.get(s.id).node=s,P(s);else if(t.children(d).length>0){i.info("A pure cluster node XBX1",d,s.id,s.x,s.y,s.width,s.height,t.parent(d)),s.height+=y,t.node(s.parentId);const h=(s==null?void 0:s.padding)/2||0,N=((m=s==null?void 0:s.labelBBox)==null?void 0:m.height)||0,x=N-h||0;i.debug("OffsetY",x,"labelHeight",N,"halfPadding",h),await K(l,s),f.get(s.id).node=s}else{const h=t.node(s.parentId);s.y+=y/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",h,h==null?void 0:h.offsetY,s),P(s)}})),t.edges().forEach(function(d){const s=t.edge(d);i.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(s),s),s.points.forEach(x=>x.y+=y/2);const m=t.node(d.v);var h=t.node(d.w);const N=Q(v,s,f,n,m,h,o);W(s,N)}),t.nodes().forEach(function(d){const s=t.node(d);i.info(d,s.type,s.diff),s.isGroup&&(E=s.diff)}),i.warn("Returning from recursive render XAX",u,E),{elem:u,diff:E}},"recursiveRender"),me=X(async(e,t)=>{var a,r,u,l,v,C;const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((a=e.config)==null?void 0:a.nodeSpacing)||((u=(r=e.config)==null?void 0:r.flowchart)==null?void 0:u.nodeSpacing)||e.nodeSpacing,ranksep:((l=e.config)==null?void 0:l.rankSpacing)||((C=(v=e.config)==null?void 0:v.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=t.select("g");F(o,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(g=>{n.setNode(g.id,{...g}),g.parentId&&n.setParent(g.id,g.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(g=>{if(g.start===g.end){const w=g.start,E=w+"---"+w+"---1",y=w+"---"+w+"---2",d=n.node(w);n.setNode(E,{domId:E,id:E,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(E,d.parentId),n.setNode(y,{domId:y,id:y,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(y,d.parentId);const s=structuredClone(g),m=structuredClone(g),h=structuredClone(g);s.label="",s.arrowTypeEnd="none",s.id=w+"-cyclic-special-1",m.arrowTypeEnd="none",m.id=w+"-cyclic-special-mid",h.label="",d.isGroup&&(s.fromCluster=w,h.toCluster=w),h.id=w+"-cyclic-special-2",n.setEdge(w,E,s,w+"-cyclic-special-0"),n.setEdge(E,y,m,w+"-cyclic-special-1"),n.setEdge(y,w,h,w+"-cyc{const t=v({...I,...T().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),Y=n(()=>m.packet,"getPacket"),M=n(t=>{t.length>0&&m.packet.push(t)},"pushWord"),O=n(()=>{E(),m=structuredClone(C)},"clear"),h={pushWord:M,getPacket:Y,getConfig:L,clear:O,setAccTitle:S,getAccTitle:F,setDiagramTitle:z,getDiagramTitle:P,getAccDescription:W,setAccDescription:D},q=1e4,G=n(t=>{w(t,h);let e=-1,o=[],s=1;const{bitsPerRow:i}=h.getConfig();for(let{start:a,end:r,label:p}of t.blocks){if(r&&r{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*o?[t,void 0]:[{start:t.start,end:e*o-1,label:t.label},{start:e*o,end:t.end,label:t.label}]},"getNextFittingBlock"),K={parse:n(async t=>{const e=await N("packet",t);x.debug(e),G(e)},"parse")},R=n((t,e,o,s)=>{const i=s.db,a=i.getConfig(),{rowHeight:r,paddingY:p,bitWidth:b,bitsPerRow:c}=a,u=i.getPacket(),l=i.getDiagramTitle(),g=r+p,d=g*(u.length+1)-(l?0:r),k=b*c+2,f=_(e);f.attr("viewbox",`0 0 ${k} ${d}`),A(f,d,k,a.useMaxWidth);for(const[$,y]of u.entries())U(f,y,$,a);f.append("text").text(l).attr("x",k/2).attr("y",d-g/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),U=n((t,e,o,{rowHeight:s,paddingX:i,paddingY:a,bitWidth:r,bitsPerRow:p,showBits:b})=>{const c=t.append("g"),u=o*(s+a)+a;for(const l of e){const g=l.start%p*r+1,d=(l.end-l.start+1)*r-i;if(c.append("rect").attr("x",g).attr("y",u).attr("width",d).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",g+d/2).attr("y",u+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(l.label),!b)continue;const k=l.end===l.start,f=u-2;c.append("text").attr("x",g+(k?d/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(l.start),k||c.append("text").attr("x",g+d).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(l.end)}},"drawWord"),X={draw:R},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},J=n(({packet:t}={})=>{const e=v(j,t);return` + .packetByte { + font-size: ${e.byteFontSize}; + } + .packetByte.start { + fill: ${e.startByteColor}; + } + .packetByte.end { + fill: ${e.endByteColor}; + } + .packetLabel { + fill: ${e.labelColor}; + font-size: ${e.labelFontSize}; + } + .packetTitle { + fill: ${e.titleColor}; + font-size: ${e.titleFontSize}; + } + .packetBlock { + stroke: ${e.blockStrokeColor}; + stroke-width: ${e.blockStrokeWidth}; + fill: ${e.blockFillColor}; + } + `},"styles"),lt={parser:K,db:h,renderer:X,styles:J};export{lt as diagram}; diff --git a/assets/chunks/erDiagram-6RL3IURR.BSCe9PhQ.js b/assets/chunks/erDiagram-6RL3IURR.BSCe9PhQ.js new file mode 100644 index 00000000..5ecd87e7 --- /dev/null +++ b/assets/chunks/erDiagram-6RL3IURR.BSCe9PhQ.js @@ -0,0 +1,51 @@ +import{_ as u,d as U,s as kt,g as xt,c as Rt,b as Ot,q as bt,r as Nt,l as X,x as Tt,j as at,v as At,k as Mt,a1 as vt,a8 as St,a7 as wt}from"../app.CXGmg8Jv.js";import{G as It}from"./graph.B66Ap3eE.js";import{l as Dt}from"./layout.CYDrMIpX.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";import"./baseUniq.DbzeOdwK.js";import"./basePickBy.DBxcSOni.js";const Lt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Bt(t){return typeof t=="string"&&Lt.test(t)}const v=[];for(let t=0;t<256;++t)v.push((t+256).toString(16).slice(1));function Ct(t,e=0){return v[t[e+0]]+v[t[e+1]]+v[t[e+2]]+v[t[e+3]]+"-"+v[t[e+4]]+v[t[e+5]]+"-"+v[t[e+6]]+v[t[e+7]]+"-"+v[t[e+8]]+v[t[e+9]]+"-"+v[t[e+10]]+v[t[e+11]]+v[t[e+12]]+v[t[e+13]]+v[t[e+14]]+v[t[e+15]]}function Pt(t){if(!Bt(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function Yt(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>32-e}function Ht(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const y=unescape(encodeURIComponent(t));t=[];for(let o=0;o>>0;x=k,k=m,m=it(g,30)>>>0,g=h,h=b}r[0]=r[0]+h>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+k>>>0,r[4]=r[4]+x>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const zt=Wt("v5",80,Ht);var nt=function(){var t=u(function(w,i,n,l){for(n=n||{},l=w.length;l--;n[w[l]]=i);return n},"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],f=[1,11],c=[1,12],_=[1,13],y=[1,14],o=[1,15],h=[1,21],g=[1,22],m=[1,23],k=[1,24],x=[1,25],p=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],O=[1,34],b=[27,28,46,47],Y=[41,42,43,44,45],Z=[17,34],F=[1,54],M=[1,53],S=[17,34,36,38],N={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:u(function(i,n,l,d,E,a,V){var s=a.length-1;switch(E){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:d.addEntity(a[s-4]),d.addEntity(a[s-2]),d.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:d.addEntity(a[s-3]),d.addAttributes(a[s-3],a[s-1]);break;case 10:d.addEntity(a[s-2]);break;case 11:d.addEntity(a[s]);break;case 12:d.addEntity(a[s-6],a[s-4]),d.addAttributes(a[s-6],a[s-1]);break;case 13:d.addEntity(a[s-5],a[s-3]);break;case 14:d.addEntity(a[s-3],a[s-1]);break;case 15:case 16:this.$=a[s].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),d.setAccDescription(this.$);break;case 19:case 43:this.$=a[s];break;case 20:case 41:case 42:this.$=a[s].replace(/"/g,"");break;case 21:case 29:this.$=[a[s]];break;case 22:a[s].push(a[s-1]),this.$=a[s];break;case 23:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 24:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyTypeList:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 26:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyTypeList:a[s-1],attributeComment:a[s]};break;case 27:case 28:case 31:this.$=a[s];break;case 30:a[s-2].push(a[s]),this.$=a[s-2];break;case 32:this.$=a[s].replace(/"/g,"");break;case 33:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 34:this.$=d.Cardinality.ZERO_OR_ONE;break;case 35:this.$=d.Cardinality.ZERO_OR_MORE;break;case 36:this.$=d.Cardinality.ONE_OR_MORE;break;case 37:this.$=d.Cardinality.ONLY_ONE;break;case 38:this.$=d.Cardinality.MD_PARENT;break;case 39:this.$=d.Identification.NON_IDENTIFYING;break;case 40:this.$=d.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:f,24:c,26:_,27:y,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:f,24:c,26:_,27:y,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:h,42:g,43:m,44:k,45:x}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(p,[2,19]),t(p,[2,20]),t(e,[2,4]),{11:29,27:y,28:o},{16:30,17:[1,31],29:32,30:33,34:O},{11:35,27:y,28:o},{40:36,46:[1,37],47:[1,38]},t(b,[2,34]),t(b,[2,35]),t(b,[2,36]),t(b,[2,37]),t(b,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:O},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:h,42:g,43:m,44:k,45:x},t(Y,[2,39]),t(Y,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(Z,[2,23],{32:50,33:51,35:52,37:F,38:M}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(Z,[2,24],{33:56,36:[1,57],38:M}),t(Z,[2,25]),t(S,[2,29]),t(Z,[2,32]),t(S,[2,31]),{16:58,17:[1,59],29:32,30:33,34:O},t(Z,[2,26]),{35:60,37:F},{17:[1,61]},t(e,[2,13]),t(S,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:u(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:u(function(i){var n=this,l=[0],d=[],E=[null],a=[],V=this.table,s="",j=0,lt=0,_t=2,ct=1,Et=a.slice.call(arguments,1),A=Object.create(this.lexer),H={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(H.yy[$]=this.yy[$]);A.setInput(i,H.yy),H.yy.lexer=A,H.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var tt=A.yylloc;a.push(tt);var gt=A.options&&A.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function mt(D){l.length=l.length-2*D,E.length=E.length-D,a.length=a.length-D}u(mt,"popStack");function ht(){var D;return D=d.pop()||A.lex()||ct,typeof D!="number"&&(D instanceof Array&&(d=D,D=d.pop()),D=n.symbols_[D]||D),D}u(ht,"lex");for(var I,z,B,et,K={},q,W,dt,J;;){if(z=l[l.length-1],this.defaultActions[z]?B=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=ht()),B=V[z]&&V[z][I]),typeof B>"u"||!B.length||!B[0]){var rt="";J=[];for(q in V[z])this.terminals_[q]&&q>_t&&J.push("'"+this.terminals_[q]+"'");A.showPosition?rt="Parse error on line "+(j+1)+`: +`+A.showPosition()+` +Expecting `+J.join(", ")+", got '"+(this.terminals_[I]||I)+"'":rt="Parse error on line "+(j+1)+": Unexpected "+(I==ct?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(rt,{text:A.match,token:this.terminals_[I]||I,line:A.yylineno,loc:tt,expected:J})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+I);switch(B[0]){case 1:l.push(I),E.push(A.yytext),a.push(A.yylloc),l.push(B[1]),I=null,lt=A.yyleng,s=A.yytext,j=A.yylineno,tt=A.yylloc;break;case 2:if(W=this.productions_[B[1]][1],K.$=E[E.length-W],K._$={first_line:a[a.length-(W||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(W||1)].first_column,last_column:a[a.length-1].last_column},gt&&(K._$.range=[a[a.length-(W||1)].range[0],a[a.length-1].range[1]]),et=this.performAction.apply(K,[s,lt,j,H.yy,B[1],E,a].concat(Et)),typeof et<"u")return et;W&&(l=l.slice(0,-1*W*2),E=E.slice(0,-1*W),a=a.slice(0,-1*W)),l.push(this.productions_[B[1]][0]),E.push(K.$),a.push(K._$),dt=V[l[l.length-2]][l[l.length-1]],l.push(dt);break;case 3:return!0}}return!0},"parse")},T=function(){var w={EOF:1,parseError:u(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:u(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:u(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(i){this.unput(this.match.slice(i))},"less"),pastInput:u(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+n+"^"},"showPosition"),test_match:u(function(i,n){var l,d,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),d=i[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var a in E)this[a]=E[a];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,l,d;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),a=0;an[0].length)){if(n=l,d=a,this.options.backtrack_lexer){if(i=this.test_match(l,E[a]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,E[d]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var n=this.next();return n||this.lex()},"lex"),begin:u(function(n){this.conditionStack.push(n)},"begin"),popState:u(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:u(function(n){this.begin(n)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(n,l,d,E){switch(d){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 15:break;case 16:return 37;case 17:return 34;case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;case 22:return l.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:return 43;case 27:return 43;case 28:return 43;case 29:return 41;case 30:return 41;case 31:return 42;case 32:return 42;case 33:return 42;case 34:return 42;case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:return 44;case 40:return 44;case 41:return 44;case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:return 47;case 49:return 47;case 50:return 46;case 51:return 46;case 52:return 46;case 53:return 27;case 54:return l.yytext[0];case 55:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return w}();N.lexer=T;function L(){this.yy={}}return u(L,"Parser"),L.prototype=N,N.Parser=L,new L}();nt.parser=nt;var Gt=nt,G=new Map,ot=[],Kt={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},Vt={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},ft=u(function(t,e=void 0){return G.has(t)?!G.get(t).alias&&e&&(G.get(t).alias=e,X.info(`Add alias '${e}' to entity '${t}'`)):(G.set(t,{attributes:[],alias:e}),X.info("Added new entity :",t)),G.get(t)},"addEntity"),Xt=u(()=>G,"getEntities"),Qt=u(function(t,e){let r=ft(t),f;for(f=e.length-1;f>=0;f--)r.attributes.push(e[f]),X.debug("Added attribute ",e[f].attributeName)},"addAttributes"),jt=u(function(t,e,r,f){let c={entityA:t,roleA:e,entityB:r,relSpec:f};ot.push(c),X.debug("Added new relationship :",c)},"addRelationship"),qt=u(()=>ot,"getRelationships"),Jt=u(function(){G=new Map,ot=[],Tt()},"clear"),$t={Cardinality:Kt,Identification:Vt,getConfig:u(()=>U().er,"getConfig"),addEntity:ft,addAttributes:Qt,getEntities:Xt,addRelationship:jt,getRelationships:qt,clear:Jt,setAccTitle:kt,getAccTitle:xt,setAccDescription:Rt,getAccDescription:Ot,setDiagramTitle:bt,getDiagramTitle:Nt},C={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},te=u(function(t,e){let r;t.append("defs").append("marker").attr("id",C.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",C.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",C.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",C.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",C.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",C.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"insertMarkers"),P={ERMarkers:C,insertMarkers:te},ee=/[^\dA-Za-z](\W)*/g,R={},Q=new Map,re=u(function(t){const e=Object.keys(t);for(const r of e)R[r]=t[r]},"setConf"),ae=u((t,e,r)=>{const f=R.entityPadding/3,c=R.entityPadding/3,_=R.fontSize*.85,y=e.node().getBBox(),o=[];let h=!1,g=!1,m=0,k=0,x=0,p=0,O=y.height+f*2,b=1;r.forEach(M=>{M.attributeKeyTypeList!==void 0&&M.attributeKeyTypeList.length>0&&(h=!0),M.attributeComment!==void 0&&(g=!0)}),r.forEach(M=>{const S=`${e.node().id}-attr-${b}`;let N=0;const T=wt(M.attributeType),L=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(T),w=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(M.attributeName),i={};i.tn=L,i.nn=w;const n=L.node().getBBox(),l=w.node().getBBox();if(m=Math.max(m,n.width),k=Math.max(k,l.width),N=Math.max(n.height,l.height),h){const d=M.attributeKeyTypeList!==void 0?M.attributeKeyTypeList.join(","):"",E=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(d);i.kn=E;const a=E.node().getBBox();x=Math.max(x,a.width),N=Math.max(N,a.height)}if(g){const d=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(M.attributeComment||"");i.cn=d;const E=d.node().getBBox();p=Math.max(p,E.width),N=Math.max(N,E.height)}i.height=N,o.push(i),O+=N+f*2,b+=1});let Y=4;h&&(Y+=2),g&&(Y+=2);const Z=m+k+x+p,F={width:Math.max(R.minEntityWidth,Math.max(y.width+R.entityPadding*2,Z+c*Y)),height:r.length>0?O:Math.max(R.minEntityHeight,y.height+R.entityPadding*2)};if(r.length>0){const M=Math.max(0,(F.width-Z-c*Y)/(Y/2));e.attr("transform","translate("+F.width/2+","+(f+y.height/2)+")");let S=y.height+f*2,N="attributeBoxOdd";o.forEach(T=>{const L=S+f+T.height/2;T.tn.attr("transform","translate("+c+","+L+")");const w=t.insert("rect","#"+T.tn.node().id).classed(`er ${N}`,!0).attr("x",0).attr("y",S).attr("width",m+c*2+M).attr("height",T.height+f*2),i=parseFloat(w.attr("x"))+parseFloat(w.attr("width"));T.nn.attr("transform","translate("+(i+c)+","+L+")");const n=t.insert("rect","#"+T.nn.node().id).classed(`er ${N}`,!0).attr("x",i).attr("y",S).attr("width",k+c*2+M).attr("height",T.height+f*2);let l=parseFloat(n.attr("x"))+parseFloat(n.attr("width"));if(h){T.kn.attr("transform","translate("+(l+c)+","+L+")");const d=t.insert("rect","#"+T.kn.node().id).classed(`er ${N}`,!0).attr("x",l).attr("y",S).attr("width",x+c*2+M).attr("height",T.height+f*2);l=parseFloat(d.attr("x"))+parseFloat(d.attr("width"))}g&&(T.cn.attr("transform","translate("+(l+c)+","+L+")"),t.insert("rect","#"+T.cn.node().id).classed(`er ${N}`,"true").attr("x",l).attr("y",S).attr("width",p+c*2+M).attr("height",T.height+f*2)),S+=T.height+f*2,N=N==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else F.height=Math.max(R.minEntityHeight,O),e.attr("transform","translate("+F.width/2+","+F.height/2+")");return F},"drawAttributes"),ie=u(function(t,e,r){const f=[...e.keys()];let c;return f.forEach(function(_){const y=pt(_,"entity");Q.set(_,y);const o=t.append("g").attr("id",y);c=c===void 0?y:c;const h="text-"+y,g=o.append("text").classed("er entityLabel",!0).attr("id",h).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",U().fontFamily).style("font-size",R.fontSize+"px").text(e.get(_).alias??_),{width:m,height:k}=ae(o,g,e.get(_).attributes),p=o.insert("rect","#"+h).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",m).attr("height",k).node().getBBox();r.setNode(y,{width:p.width,height:p.height,shape:"rect",id:y})}),c},"drawEntities"),ne=u(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},"adjustEntities"),yt=u(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},"getEdgeName"),se=u(function(t,e){return t.forEach(function(r){e.setEdge(Q.get(r.entityA),Q.get(r.entityB),{relationship:r},yt(r))}),t},"addRelationships"),ut=0,oe=u(function(t,e,r,f,c){ut++;const _=r.edge(Q.get(e.entityA),Q.get(e.entityB),yt(e)),y=vt().x(function(b){return b.x}).y(function(b){return b.y}).curve(St),o=t.insert("path","#"+f).classed("er relationshipLine",!0).attr("d",y(_.points)).style("stroke",R.stroke).style("fill","none");e.relSpec.relType===c.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let h="";switch(R.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),e.relSpec.cardA){case c.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ZERO_OR_ONE_END+")");break;case c.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ZERO_OR_MORE_END+")");break;case c.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ONE_OR_MORE_END+")");break;case c.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ONLY_ONE_END+")");break;case c.db.Cardinality.MD_PARENT:o.attr("marker-end","url("+h+"#"+P.ERMarkers.MD_PARENT_END+")");break}switch(e.relSpec.cardB){case c.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ZERO_OR_ONE_START+")");break;case c.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ZERO_OR_MORE_START+")");break;case c.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ONE_OR_MORE_START+")");break;case c.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ONLY_ONE_START+")");break;case c.db.Cardinality.MD_PARENT:o.attr("marker-start","url("+h+"#"+P.ERMarkers.MD_PARENT_START+")");break}const g=o.node().getTotalLength(),m=o.node().getPointAtLength(g*.5),k="rel"+ut,x=e.roleA.split(/
    /g),p=t.append("text").classed("er relationshipLabel",!0).attr("id",k).attr("x",m.x).attr("y",m.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",U().fontFamily).style("font-size",R.fontSize+"px");if(x.length==1)p.text(e.roleA);else{const b=-(x.length-1)*.5;x.forEach((Y,Z)=>{p.append("tspan").attr("x",m.x).attr("dy",`${Z===0?b:1}em`).text(Y)})}const O=p.node().getBBox();t.insert("rect","#"+k).classed("er relationshipLabelBox",!0).attr("x",m.x-O.width/2).attr("y",m.y-O.height/2).attr("width",O.width).attr("height",O.height)},"drawRelationshipFromLayout"),le=u(function(t,e,r,f){R=U().er,X.info("Drawing ER diagram");const c=U().securityLevel;let _;c==="sandbox"&&(_=at("#i"+e));const o=(c==="sandbox"?at(_.nodes()[0].contentDocument.body):at("body")).select(`[id='${e}']`);P.insertMarkers(o,R);let h;h=new It({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:R.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const g=ie(o,f.db.getEntities(),h),m=se(f.db.getRelationships(),h);Dt(h),ne(o,h),m.forEach(function(b){oe(o,b,h,g,f)});const k=R.diagramPadding;At.insertTitle(o,"entityTitleText",R.titleTopMargin,f.db.getDiagramTitle());const x=o.node().getBBox(),p=x.width+k*2,O=x.height+k*2;Mt(o,O,p,R.useMaxWidth),o.attr("viewBox",`${x.x-k} ${x.y-k} ${p} ${O}`)},"draw"),ce="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function pt(t="",e=""){const r=t.replace(ee,"");return`${st(e)}${st(r)}${zt(t,ce)}`}u(pt,"generateId");function st(t=""){return t.length>0?`${t}-`:""}u(st,"strWithHyphen");var he={setConf:re,draw:le},de=u(t=>` + .entityBox { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + } + + .attributeBoxOdd { + fill: ${t.attributeBackgroundColorOdd}; + stroke: ${t.nodeBorder}; + } + + .attributeBoxEven { + fill: ${t.attributeBackgroundColorEven}; + stroke: ${t.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${t.tertiaryColor}; + opacity: 0.7; + background-color: ${t.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .relationshipLine { + stroke: ${t.lineColor}; + } + + .entityTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } + #MD_PARENT_START { + fill: #f5f5f5 !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; + } + #MD_PARENT_END { + fill: #f5f5f5 !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; + } + +`,"getStyles"),ue=de,ke={parser:Gt,db:$t,renderer:he,styles:ue};export{ke as diagram}; diff --git a/assets/chunks/flowDiagram-7ASYPVHJ.DBrKMec-.js b/assets/chunks/flowDiagram-7ASYPVHJ.DBrKMec-.js new file mode 100644 index 00000000..9fdbcc69 --- /dev/null +++ b/assets/chunks/flowDiagram-7ASYPVHJ.DBrKMec-.js @@ -0,0 +1,160 @@ +import{g as gt,s as At}from"./chunk-5HRBRIJM.CiC8nwb0.js";import{d as U1,_ as l,o as Ze,p as bt,s as kt,g as mt,b as Et,c as St,q as Dt,r as xt,t as Ct,J as Tt,u as yt,l as e1,v as ge,x as Ft,y as vt,j as C1,z as _t,A as Bt,e as Vt,B as Lt}from"../app.CXGmg8Jv.js";import{c as wt}from"./channel.w7CYfGuh.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";var It="flowchart-",$e=0,M1=U1(),b1=new Map,K=[],K1=new Map,p1=[],Ae=new Map,be=new Map,ee=0,pe=!0,J,se,re=[],ie=l(e=>Vt.sanitizeText(e,M1),"sanitizeText"),ae=l(function(e){for(const r of b1.values())if(r.id===e)return r.domId;return e},"lookUpDomId"),Rt=l(function(e,r,i,a,u,d,g={},D){var v,z;if(!e||e.trim().length===0)return;let c,o=b1.get(e);if(o===void 0&&(o={id:e,labelType:"text",domId:It+e+"-"+$e,styles:[],classes:[]},b1.set(e,o)),$e++,r!==void 0?(M1=U1(),c=ie(r.text.trim()),o.labelType=r.type,c.startsWith('"')&&c.endsWith('"')&&(c=c.substring(1,c.length-1)),o.text=c):o.text===void 0&&(o.text=e),i!==void 0&&(o.type=i),a!=null&&a.forEach(function(_){o.styles.push(_)}),u!=null&&u.forEach(function(_){o.classes.push(_)}),d!==void 0&&(o.dir=d),o.props===void 0?o.props=g:g!==void 0&&Object.assign(o.props,g),D!==void 0){let _;D.includes(` +`)?_=D+` +`:_=`{ +`+D+` +}`;const h=Ct(_,{schema:Tt});if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!yt(h.shape))throw new Error(`No such shape: ${h.shape}.`);o.type=h==null?void 0:h.shape}h!=null&&h.label&&(o.text=h==null?void 0:h.label),h!=null&&h.icon&&(o.icon=h==null?void 0:h.icon,!((v=h.label)!=null&&v.trim())&&o.text===e&&(o.text="")),h!=null&&h.form&&(o.form=h==null?void 0:h.form),h!=null&&h.pos&&(o.pos=h==null?void 0:h.pos),h!=null&&h.img&&(o.img=h==null?void 0:h.img,!((z=h.label)!=null&&z.trim())&&o.text===e&&(o.text="")),h!=null&&h.constraint&&(o.constraint=h.constraint),h.w&&(o.assetWidth=Number(h.w)),h.h&&(o.assetHeight=Number(h.h))}},"addVertex"),Nt=l(function(e,r,i){const d={start:e,end:r,type:void 0,text:"",labelType:"text"};e1.info("abc78 Got edge...",d);const g=i.text;if(g!==void 0&&(d.text=ie(g.text.trim()),d.text.startsWith('"')&&d.text.endsWith('"')&&(d.text=d.text.substring(1,d.text.length-1)),d.labelType=g.type),i!==void 0&&(d.type=i.type,d.stroke=i.stroke,d.length=i.length>10?10:i.length),K.length<(M1.maxEdges??500))e1.info("Pushing edge..."),K.push(d);else throw new Error(`Edge limit exceeded. ${K.length} edges found, but the limit is ${M1.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.`)},"addSingleLink"),Pt=l(function(e,r,i){e1.info("addLink",e,r,i);for(const a of e)for(const u of r)Nt(a,u,i)},"addLink"),Ot=l(function(e,r){e.forEach(function(i){i==="default"?K.defaultInterpolate=r:K[i].interpolate=r})},"updateLinkInterpolate"),Gt=l(function(e,r){e.forEach(function(i){var a,u,d,g,D,c;if(typeof i=="number"&&i>=K.length)throw new Error(`The index ${i} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${K.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);i==="default"?K.defaultStyle=r:(K[i].style=r,(((u=(a=K[i])==null?void 0:a.style)==null?void 0:u.length)??0)>0&&!((g=(d=K[i])==null?void 0:d.style)!=null&&g.some(o=>o==null?void 0:o.startsWith("fill")))&&((c=(D=K[i])==null?void 0:D.style)==null||c.push("fill:none")))})},"updateLink"),Mt=l(function(e,r){e.split(",").forEach(function(i){let a=K1.get(i);a===void 0&&(a={id:i,styles:[],textStyles:[]},K1.set(i,a)),r!=null&&r.forEach(function(u){if(/color/.exec(u)){const d=u.replace("fill","bgFill");a.textStyles.push(d)}a.styles.push(u)})})},"addClass"),Ut=l(function(e){J=e,/.*/.exec(J)&&(J="LR"),/.*v/.exec(J)&&(J="TB"),J==="TD"&&(J="TB")},"setDirection"),ke=l(function(e,r){for(const i of e.split(",")){const a=b1.get(i);a&&a.classes.push(r);const u=Ae.get(i);u&&u.classes.push(r)}},"setClass"),Wt=l(function(e,r){if(r!==void 0){r=ie(r);for(const i of e.split(","))be.set(se==="gen-1"?ae(i):i,r)}},"setTooltip"),zt=l(function(e,r,i){const a=ae(e);if(U1().securityLevel!=="loose"||r===void 0)return;let u=[];if(typeof i=="string"){u=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let g=0;g")),u.classed("hover",!0)}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),C1(this).classed("hover",!1)})},"setupToolTips");re.push(it);var Ht=l(function(e="gen-1"){b1=new Map,K1=new Map,K=[],re=[it],p1=[],Ae=new Map,ee=0,be=new Map,pe=!0,se=e,M1=U1(),Ft()},"clear"),Xt=l(e=>{se=e||"gen-2"},"setGen"),Qt=l(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),Jt=l(function(e,r,i){let a=e.text.trim(),u=i.text;e===i&&/\s/.exec(i.text)&&(a=void 0);function d(o){const v={boolean:{},number:{},string:{}},z=[];let _;return{nodeList:o.filter(function(b){const x=typeof b;return b.stmt&&b.stmt==="dir"?(_=b.value,!1):b.trim()===""?!1:x in v?v[x].hasOwnProperty(b)?!1:v[x][b]=!0:z.includes(b)?!1:z.push(b)}),dir:_}}l(d,"uniq");const{nodeList:g,dir:D}=d(r.flat());if(se==="gen-1")for(let o=0;o2e3)return{result:!1,count:0};if(at[j1]=r,p1[r].id===e)return{result:!0,count:0};let a=0,u=1;for(;a=0){const g=nt(e,d);if(g.result)return{result:!0,count:u+g.count};u=u+g.count}a=a+1}return{result:!1,count:u}},"indexNodes2"),$t=l(function(e){return at[e]},"getDepthFirstPos"),es=l(function(){j1=-1,p1.length>0&&nt("none",p1.length-1)},"indexNodes"),ut=l(function(){return p1},"getSubGraphs"),ts=l(()=>pe?(pe=!1,!0):!1,"firstGraph"),ss=l(e=>{let r=e.trim(),i="arrow_open";switch(r[0]){case"<":i="arrow_point",r=r.slice(1);break;case"x":i="arrow_cross",r=r.slice(1);break;case"o":i="arrow_circle",r=r.slice(1);break}let a="normal";return r.includes("=")&&(a="thick"),r.includes(".")&&(a="dotted"),{type:i,stroke:a}},"destructStartLink"),rs=l((e,r)=>{const i=r.length;let a=0;for(let u=0;u{const r=e.trim();let i=r.slice(0,-1),a="arrow_open";switch(r.slice(-1)){case"x":a="arrow_cross",r.startsWith("x")&&(a="double_"+a,i=i.slice(1));break;case">":a="arrow_point",r.startsWith("<")&&(a="double_"+a,i=i.slice(1));break;case"o":a="arrow_circle",r.startsWith("o")&&(a="double_"+a,i=i.slice(1));break}let u="normal",d=i.length-1;i.startsWith("=")&&(u="thick"),i.startsWith("~")&&(u="invisible");const g=rs(".",i);return g&&(u="dotted",d=g),{type:a,stroke:u,length:d}},"destructEndLink"),as=l((e,r)=>{const i=is(e);let a;if(r){if(a=ss(r),a.stroke!==i.stroke)return{type:"INVALID",stroke:"INVALID"};if(a.type==="arrow_open")a.type=i.type;else{if(a.type!==i.type)return{type:"INVALID",stroke:"INVALID"};a.type="double_"+a.type}return a.type==="double_arrow"&&(a.type="double_arrow_point"),a.length=i.length,a}return i},"destructLink"),lt=l((e,r)=>{for(const i of e)if(i.nodes.includes(r))return!0;return!1},"exists"),ot=l((e,r)=>{const i=[];return e.nodes.forEach((a,u)=>{lt(r,a)||i.push(e.nodes[u])}),{nodes:i}},"makeUniq"),ns={firstGraph:ts},us=l(e=>{if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}},"getTypeFromVertex"),ls=l((e,r)=>e.find(i=>i.id===r),"findNode"),os=l(e=>{let r="none",i="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":i=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),i=r;break}return{arrowTypeStart:r,arrowTypeEnd:i}},"destructEdgeType"),cs=l((e,r,i,a,u,d)=>{var o;const g=i.get(e.id),D=a.get(e.id)??!1,c=ls(r,e.id);if(c)c.cssStyles=e.styles,c.cssCompiledStyles=te(e.classes),c.cssClasses=e.classes.join(" ");else{const v={id:e.id,label:e.text,labelStyle:"",parentId:g,padding:((o=u.flowchart)==null?void 0:o.padding)||8,cssStyles:e.styles,cssCompiledStyles:te(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:d,link:e.link,linkTarget:e.linkTarget,tooltip:et(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};D?r.push({...v,isGroup:!0,shape:"rect"}):r.push({...v,isGroup:!1,shape:us(e)})}},"addNodeFromVertex");function te(e){let r=[];for(const i of e){const a=K1.get(i);a!=null&&a.styles&&(r=[...r,...a.styles??[]].map(u=>u.trim())),a!=null&&a.textStyles&&(r=[...r,...a.textStyles??[]].map(u=>u.trim()))}return r}l(te,"getCompiledStyles");var hs=l(()=>{const e=U1(),r=[],i=[],a=ut(),u=new Map,d=new Map;for(let c=a.length-1;c>=0;c--){const o=a[c];o.nodes.length>0&&d.set(o.id,!0);for(const v of o.nodes)u.set(v,o.id)}for(let c=a.length-1;c>=0;c--){const o=a[c];r.push({id:o.id,label:o.title,labelStyle:"",parentId:u.get(o.id),padding:8,cssCompiledStyles:te(o.classes),cssClasses:o.classes.join(" "),shape:"rect",dir:o.dir,isGroup:!0,look:e.look})}st().forEach(c=>{cs(c,r,u,d,e,e.look||"classic")});const D=rt();return D.forEach((c,o)=>{const{arrowTypeStart:v,arrowTypeEnd:z}=os(c.type),_=[...D.defaultStyle??[]];c.style&&_.push(...c.style);const h={id:vt(c.start,c.end,{counter:o,prefix:"L"}),start:c.start,end:c.end,type:c.type??"normal",label:c.text,labelpos:"c",thickness:c.stroke,minlen:c.length,classes:(c==null?void 0:c.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(c==null?void 0:c.stroke)==="invisible"?"none":v,arrowTypeEnd:(c==null?void 0:c.stroke)==="invisible"?"none":z,arrowheadStyle:"fill: #333",labelStyle:_,style:_,pattern:c.stroke,look:e.look};i.push(h)}),{nodes:r,edges:i,other:{},config:e}},"getData"),de={defaultConfig:l(()=>bt.flowchart,"defaultConfig"),setAccTitle:kt,getAccTitle:mt,getAccDescription:Et,getData:hs,setAccDescription:St,addVertex:Rt,lookUpDomId:ae,addLink:Pt,updateLinkInterpolate:Ot,updateLink:Gt,addClass:Mt,setDirection:Ut,setClass:ke,setTooltip:Wt,getTooltip:et,setClickEvent:Kt,setLink:jt,bindFunctions:Yt,getDirection:tt,getVertices:st,getEdges:rt,getClasses:qt,clear:Ht,setGen:Xt,defaultStyle:Qt,addSubGraph:Jt,getDepthFirstPos:$t,indexNodes:es,getSubGraphs:ut,destructLink:as,lex:ns,exists:lt,makeUniq:ot,setDiagramTitle:Dt,getDiagramTitle:xt},ds=l(function(e,r){return r.db.getClasses()},"getClasses"),ps=l(async function(e,r,i,a){var h;e1.info("REF0:"),e1.info("Drawing state diagram (v2)",r);const{securityLevel:u,flowchart:d,layout:g}=U1();let D;u==="sandbox"&&(D=C1("#i"+r));const c=u==="sandbox"?D.nodes()[0].contentDocument:document;e1.debug("Before getData: ");const o=a.db.getData();e1.debug("Data: ",o);const v=gt(r,u),z=tt();o.type=a.type,o.layoutAlgorithm=_t(g),o.layoutAlgorithm==="dagre"&&g==="elk"&&e1.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),o.direction=z,o.nodeSpacing=(d==null?void 0:d.nodeSpacing)||50,o.rankSpacing=(d==null?void 0:d.rankSpacing)||50,o.markers=["point","circle","cross"],o.diagramId=r,e1.debug("REF1:",o),await Bt(o,v);const _=((h=o.config.flowchart)==null?void 0:h.diagramPadding)??8;ge.insertTitle(v,"flowchartTitleText",(d==null?void 0:d.titleTopMargin)||0,a.db.getDiagramTitle()),At(v,_,"flowchart",(d==null?void 0:d.useMaxWidth)||!1);for(const b of o.nodes){const x=C1(`#${r} [id="${b.id}"]`);if(!x||!b.link)continue;const Z=c.createElementNS("http://www.w3.org/2000/svg","a");Z.setAttributeNS("http://www.w3.org/2000/svg","class",b.cssClasses),Z.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),u==="sandbox"?Z.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):b.linkTarget&&Z.setAttributeNS("http://www.w3.org/2000/svg","target",b.linkTarget);const k1=x.insert(function(){return Z},":first-child"),m1=x.select(".label-container");m1&&k1.append(function(){return m1.node()});const E1=x.select(".label");E1&&k1.append(function(){return E1.node()})}},"draw"),fs={getClasses:ds,draw:ps},fe=function(){var e=l(function(A1,p,f,A){for(f=f||{},A=A1.length;A--;f[A1[A]]=p);return f},"o"),r=[1,4],i=[1,3],a=[1,5],u=[1,8,9,10,11,27,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],d=[2,2],g=[1,13],D=[1,14],c=[1,15],o=[1,16],v=[1,23],z=[1,25],_=[1,26],h=[1,27],b=[1,49],x=[1,48],Z=[1,29],k1=[1,30],m1=[1,31],E1=[1,32],Y1=[1,33],B=[1,44],V=[1,46],L=[1,42],w=[1,47],I=[1,43],R=[1,50],N=[1,45],P=[1,51],O=[1,52],q1=[1,34],H1=[1,35],X1=[1,36],Q1=[1,37],f1=[1,57],C=[1,8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],t1=[1,61],s1=[1,60],r1=[1,62],T1=[8,9,11,75,77],me=[1,77],y1=[1,90],F1=[1,95],v1=[1,94],_1=[1,91],B1=[1,87],V1=[1,93],L1=[1,89],w1=[1,96],I1=[1,92],R1=[1,97],N1=[1,88],S1=[8,9,10,11,40,75,77],M=[8,9,10,11,40,46,75,77],Y=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],Ee=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],W1=[44,60,88,101,104,105,108,110,113,114,115],Se=[1,123],De=[1,122],xe=[1,130],Ce=[1,144],Te=[1,145],ye=[1,146],Fe=[1,147],ve=[1,132],_e=[1,134],Be=[1,138],Ve=[1,139],Le=[1,140],we=[1,141],Ie=[1,142],Re=[1,143],Ne=[1,148],Pe=[1,149],Oe=[1,128],Ge=[1,129],Me=[1,136],Ue=[1,131],We=[1,135],ze=[1,133],ne=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],je=[1,151],Ke=[1,153],F=[8,9,11],q=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],k=[1,173],U=[1,169],W=[1,170],m=[1,174],E=[1,171],S=[1,172],P1=[77,115,118],T=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],Ye=[10,105],g1=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],i1=[1,242],a1=[1,240],n1=[1,244],u1=[1,238],l1=[1,239],o1=[1,241],c1=[1,243],h1=[1,245],O1=[1,263],qe=[8,9,11,105],$=[8,9,10,11,60,83,104,105,108,109,110,111],ue={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,edgeTextToken:78,STR:79,MD_STR:80,textToken:81,keywords:82,STYLE:83,LINKSTYLE:84,CLASSDEF:85,CLASS:86,CLICK:87,DOWN:88,UP:89,textNoTagsToken:90,stylesOpt:91,"idString[vertex]":92,"idString[class]":93,CALLBACKNAME:94,CALLBACKARGS:95,HREF:96,LINK_TARGET:97,"STR[link]":98,"STR[tooltip]":99,alphaNum:100,DEFAULT:101,numList:102,INTERPOLATE:103,NUM:104,COMMA:105,style:106,styleComponent:107,NODE_STRING:108,UNIT:109,BRKT:110,PCT:111,idStringToken:112,MINUS:113,MULT:114,UNICODE_TEXT:115,TEXT:116,TAGSTART:117,EDGE_TEXT:118,alphaNumToken:119,direction_tb:120,direction_bt:121,direction_rl:122,direction_lr:123,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",79:"STR",80:"MD_STR",83:"STYLE",84:"LINKSTYLE",85:"CLASSDEF",86:"CLASS",87:"CLICK",88:"DOWN",89:"UP",92:"idString[vertex]",93:"idString[class]",94:"CALLBACKNAME",95:"CALLBACKARGS",96:"HREF",97:"LINK_TARGET",98:"STR[link]",99:"STR[tooltip]",101:"DEFAULT",103:"INTERPOLATE",104:"NUM",105:"COMMA",108:"NODE_STRING",109:"UNIT",110:"BRKT",111:"PCT",113:"MINUS",114:"MULT",115:"UNICODE_TEXT",116:"TEXT",117:"TAGSTART",118:"EDGE_TEXT",120:"direction_tb",121:"direction_bt",122:"direction_rl",123:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,2],[33,1],[33,1],[33,1],[33,1]],performAction:l(function(p,f,A,n,y,t,z1){var s=t.length-1;switch(y){case 2:this.$=[];break;case 3:(!Array.isArray(t[s])||t[s].length>0)&&t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 181:this.$=t[s];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(t[s-1]),this.$=t[s-1];break;case 27:this.$=t[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=n.addSubGraph(t[s-6],t[s-1],t[s-4]);break;case 34:this.$=n.addSubGraph(t[s-3],t[s-1],t[s-3]);break;case 35:this.$=n.addSubGraph(void 0,t[s-1],void 0);break;case 37:this.$=t[s].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=t[s].trim(),n.setAccDescription(this.$);break;case 43:this.$=t[s-1]+t[s];break;case 44:this.$=t[s];break;case 45:n.addVertex(t[s-1][0],void 0,void 0,void 0,void 0,void 0,void 0,t[s]),n.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 46:n.addLink(t[s-2].stmt,t[s],t[s-1]),this.$={stmt:t[s],nodes:t[s].concat(t[s-2].nodes)};break;case 47:n.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 48:this.$={stmt:t[s-1],nodes:t[s-1]};break;case 49:n.addVertex(t[s-1][0],void 0,void 0,void 0,void 0,void 0,void 0,t[s]),this.$={stmt:t[s-1],nodes:t[s-1],shapeData:t[s]};break;case 50:this.$={stmt:t[s],nodes:t[s]};break;case 51:this.$=[t[s]];break;case 52:n.addVertex(t[s-5][0],void 0,void 0,void 0,void 0,void 0,void 0,t[s-4]),this.$=t[s-5].concat(t[s]);break;case 53:this.$=t[s-4].concat(t[s]);break;case 54:this.$=t[s];break;case 55:this.$=t[s-2],n.setClass(t[s-2],t[s]);break;case 56:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"square");break;case 57:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"doublecircle");break;case 58:this.$=t[s-5],n.addVertex(t[s-5],t[s-2],"circle");break;case 59:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"ellipse");break;case 60:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"stadium");break;case 61:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"subroutine");break;case 62:this.$=t[s-7],n.addVertex(t[s-7],t[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[s-5],t[s-3]]]));break;case 63:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"cylinder");break;case 64:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"round");break;case 65:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"diamond");break;case 66:this.$=t[s-5],n.addVertex(t[s-5],t[s-2],"hexagon");break;case 67:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"odd");break;case 68:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"trapezoid");break;case 69:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"inv_trapezoid");break;case 70:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"lean_right");break;case 71:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"lean_left");break;case 72:this.$=t[s],n.addVertex(t[s]);break;case 73:t[s-1].text=t[s],this.$=t[s-1];break;case 74:case 75:t[s-2].text=t[s-1],this.$=t[s-2];break;case 76:this.$=t[s];break;case 77:var X=n.destructLink(t[s],t[s-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:t[s-1]};break;case 78:this.$={text:t[s],type:"text"};break;case 79:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 80:this.$={text:t[s],type:"string"};break;case 81:this.$={text:t[s],type:"markdown"};break;case 82:var X=n.destructLink(t[s]);this.$={type:X.type,stroke:X.stroke,length:X.length};break;case 83:this.$=t[s-1];break;case 84:this.$={text:t[s],type:"text"};break;case 85:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 86:this.$={text:t[s],type:"string"};break;case 87:case 102:this.$={text:t[s],type:"markdown"};break;case 99:this.$={text:t[s],type:"text"};break;case 100:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 101:this.$={text:t[s],type:"text"};break;case 103:this.$=t[s-4],n.addClass(t[s-2],t[s]);break;case 104:this.$=t[s-4],n.setClass(t[s-2],t[s]);break;case 105:case 113:this.$=t[s-1],n.setClickEvent(t[s-1],t[s]);break;case 106:case 114:this.$=t[s-3],n.setClickEvent(t[s-3],t[s-2]),n.setTooltip(t[s-3],t[s]);break;case 107:this.$=t[s-2],n.setClickEvent(t[s-2],t[s-1],t[s]);break;case 108:this.$=t[s-4],n.setClickEvent(t[s-4],t[s-3],t[s-2]),n.setTooltip(t[s-4],t[s]);break;case 109:this.$=t[s-2],n.setLink(t[s-2],t[s]);break;case 110:this.$=t[s-4],n.setLink(t[s-4],t[s-2]),n.setTooltip(t[s-4],t[s]);break;case 111:this.$=t[s-4],n.setLink(t[s-4],t[s-2],t[s]);break;case 112:this.$=t[s-6],n.setLink(t[s-6],t[s-4],t[s]),n.setTooltip(t[s-6],t[s-2]);break;case 115:this.$=t[s-1],n.setLink(t[s-1],t[s]);break;case 116:this.$=t[s-3],n.setLink(t[s-3],t[s-2]),n.setTooltip(t[s-3],t[s]);break;case 117:this.$=t[s-3],n.setLink(t[s-3],t[s-2],t[s]);break;case 118:this.$=t[s-5],n.setLink(t[s-5],t[s-4],t[s]),n.setTooltip(t[s-5],t[s-2]);break;case 119:this.$=t[s-4],n.addVertex(t[s-2],void 0,void 0,t[s]);break;case 120:this.$=t[s-4],n.updateLink([t[s-2]],t[s]);break;case 121:this.$=t[s-4],n.updateLink(t[s-2],t[s]);break;case 122:this.$=t[s-8],n.updateLinkInterpolate([t[s-6]],t[s-2]),n.updateLink([t[s-6]],t[s]);break;case 123:this.$=t[s-8],n.updateLinkInterpolate(t[s-6],t[s-2]),n.updateLink(t[s-6],t[s]);break;case 124:this.$=t[s-6],n.updateLinkInterpolate([t[s-4]],t[s]);break;case 125:this.$=t[s-6],n.updateLinkInterpolate(t[s-4],t[s]);break;case 126:case 128:this.$=[t[s]];break;case 127:case 129:t[s-2].push(t[s]),this.$=t[s-2];break;case 131:this.$=t[s-1]+t[s];break;case 179:this.$=t[s];break;case 180:this.$=t[s-1]+""+t[s];break;case 182:this.$=t[s-1]+""+t[s];break;case 183:this.$={stmt:"dir",value:"TB"};break;case 184:this.$={stmt:"dir",value:"BT"};break;case 185:this.$={stmt:"dir",value:"RL"};break;case 186:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:r,10:i,12:a},{1:[3]},e(u,d,{5:6}),{4:7,9:r,10:i,12:a},{4:8,9:r,10:i,12:a},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:v,33:24,34:z,36:_,38:h,42:28,43:38,44:b,45:39,47:40,60:x,83:Z,84:k1,85:m1,86:E1,87:Y1,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},e(u,[2,9]),e(u,[2,10]),e(u,[2,11]),{8:[1,54],9:[1,55],10:f1,15:53,18:56},e(C,[2,3]),e(C,[2,4]),e(C,[2,5]),e(C,[2,6]),e(C,[2,7]),e(C,[2,8]),{8:t1,9:s1,11:r1,21:58,41:59,72:63,75:[1,64],77:[1,65]},{8:t1,9:s1,11:r1,21:66},{8:t1,9:s1,11:r1,21:67},{8:t1,9:s1,11:r1,21:68},{8:t1,9:s1,11:r1,21:69},{8:t1,9:s1,11:r1,21:70},{8:t1,9:s1,10:[1,71],11:r1,21:72},e(C,[2,36]),{35:[1,73]},{37:[1,74]},e(C,[2,39]),e(T1,[2,50],{18:75,39:76,10:f1,40:me}),{10:[1,78]},{10:[1,79]},{10:[1,80]},{10:[1,81]},{14:y1,44:F1,60:v1,79:[1,85],88:_1,94:[1,82],96:[1,83],100:84,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1,119:86},e(C,[2,183]),e(C,[2,184]),e(C,[2,185]),e(C,[2,186]),e(S1,[2,51]),e(S1,[2,54],{46:[1,98]}),e(M,[2,72],{112:111,29:[1,99],44:b,48:[1,100],50:[1,101],52:[1,102],54:[1,103],56:[1,104],58:[1,105],60:x,63:[1,106],65:[1,107],67:[1,108],68:[1,109],70:[1,110],88:B,101:V,104:L,105:w,108:I,110:R,113:N,114:P,115:O}),e(Y,[2,179]),e(Y,[2,140]),e(Y,[2,141]),e(Y,[2,142]),e(Y,[2,143]),e(Y,[2,144]),e(Y,[2,145]),e(Y,[2,146]),e(Y,[2,147]),e(Y,[2,148]),e(Y,[2,149]),e(Y,[2,150]),e(u,[2,12]),e(u,[2,18]),e(u,[2,19]),{9:[1,112]},e(Ee,[2,26],{18:113,10:f1}),e(C,[2,27]),{42:114,43:38,44:b,45:39,47:40,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(C,[2,40]),e(C,[2,41]),e(C,[2,42]),e(W1,[2,76],{73:115,62:[1,117],74:[1,116]}),{76:118,78:119,79:[1,120],80:[1,121],115:Se,118:De},e([44,60,62,74,88,101,104,105,108,110,113,114,115],[2,82]),e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),e(C,[2,31]),e(C,[2,32]),{10:xe,12:Ce,14:Te,27:ye,28:124,32:Fe,44:ve,60:_e,75:Be,79:[1,126],80:[1,127],82:137,83:Ve,84:Le,85:we,86:Ie,87:Re,88:Ne,89:Pe,90:125,104:Oe,108:Ge,110:Me,113:Ue,114:We,115:ze},e(ne,d,{5:150}),e(C,[2,37]),e(C,[2,38]),e(T1,[2,48],{44:je}),e(T1,[2,49],{18:152,10:f1,40:Ke}),e(S1,[2,44]),{44:b,47:154,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{101:[1,155],102:156,104:[1,157]},{44:b,47:158,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{44:b,47:159,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(F,[2,105],{10:[1,160],95:[1,161]}),{79:[1,162]},e(F,[2,113],{119:164,10:[1,163],14:y1,44:F1,60:v1,88:_1,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1}),e(F,[2,115],{10:[1,165]}),e(q,[2,181]),e(q,[2,168]),e(q,[2,169]),e(q,[2,170]),e(q,[2,171]),e(q,[2,172]),e(q,[2,173]),e(q,[2,174]),e(q,[2,175]),e(q,[2,176]),e(q,[2,177]),e(q,[2,178]),{44:b,47:166,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{30:167,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:175,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:177,50:[1,176],67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:178,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:179,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:180,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{108:[1,181]},{30:182,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:183,65:[1,184],67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:185,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:186,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:187,67:k,79:U,80:W,81:168,115:m,116:E,117:S},e(Y,[2,180]),e(u,[2,20]),e(Ee,[2,25]),e(T1,[2,46],{39:188,18:189,10:f1,40:me}),e(W1,[2,73],{10:[1,190]}),{10:[1,191]},{30:192,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{77:[1,193],78:194,115:Se,118:De},e(P1,[2,78]),e(P1,[2,80]),e(P1,[2,81]),e(P1,[2,166]),e(P1,[2,167]),{8:t1,9:s1,10:xe,11:r1,12:Ce,14:Te,21:196,27:ye,29:[1,195],32:Fe,44:ve,60:_e,75:Be,82:137,83:Ve,84:Le,85:we,86:Ie,87:Re,88:Ne,89:Pe,90:197,104:Oe,108:Ge,110:Me,113:Ue,114:We,115:ze},e(T,[2,99]),e(T,[2,101]),e(T,[2,102]),e(T,[2,155]),e(T,[2,156]),e(T,[2,157]),e(T,[2,158]),e(T,[2,159]),e(T,[2,160]),e(T,[2,161]),e(T,[2,162]),e(T,[2,163]),e(T,[2,164]),e(T,[2,165]),e(T,[2,88]),e(T,[2,89]),e(T,[2,90]),e(T,[2,91]),e(T,[2,92]),e(T,[2,93]),e(T,[2,94]),e(T,[2,95]),e(T,[2,96]),e(T,[2,97]),e(T,[2,98]),{6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:v,32:[1,198],33:24,34:z,36:_,38:h,42:28,43:38,44:b,45:39,47:40,60:x,83:Z,84:k1,85:m1,86:E1,87:Y1,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},{10:f1,18:199},{44:[1,200]},e(S1,[2,43]),{10:[1,201],44:b,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:111,113:N,114:P,115:O},{10:[1,202]},{10:[1,203],105:[1,204]},e(Ye,[2,126]),{10:[1,205],44:b,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:111,113:N,114:P,115:O},{10:[1,206],44:b,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:111,113:N,114:P,115:O},{79:[1,207]},e(F,[2,107],{10:[1,208]}),e(F,[2,109],{10:[1,209]}),{79:[1,210]},e(q,[2,182]),{79:[1,211],97:[1,212]},e(S1,[2,55],{112:111,44:b,60:x,88:B,101:V,104:L,105:w,108:I,110:R,113:N,114:P,115:O}),{31:[1,213],67:k,81:214,115:m,116:E,117:S},e(g1,[2,84]),e(g1,[2,86]),e(g1,[2,87]),e(g1,[2,151]),e(g1,[2,152]),e(g1,[2,153]),e(g1,[2,154]),{49:[1,215],67:k,81:214,115:m,116:E,117:S},{30:216,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{51:[1,217],67:k,81:214,115:m,116:E,117:S},{53:[1,218],67:k,81:214,115:m,116:E,117:S},{55:[1,219],67:k,81:214,115:m,116:E,117:S},{57:[1,220],67:k,81:214,115:m,116:E,117:S},{60:[1,221]},{64:[1,222],67:k,81:214,115:m,116:E,117:S},{66:[1,223],67:k,81:214,115:m,116:E,117:S},{30:224,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{31:[1,225],67:k,81:214,115:m,116:E,117:S},{67:k,69:[1,226],71:[1,227],81:214,115:m,116:E,117:S},{67:k,69:[1,229],71:[1,228],81:214,115:m,116:E,117:S},e(T1,[2,45],{18:152,10:f1,40:Ke}),e(T1,[2,47],{44:je}),e(W1,[2,75]),e(W1,[2,74]),{62:[1,230],67:k,81:214,115:m,116:E,117:S},e(W1,[2,77]),e(P1,[2,79]),{30:231,67:k,79:U,80:W,81:168,115:m,116:E,117:S},e(ne,d,{5:232}),e(T,[2,100]),e(C,[2,35]),{43:233,44:b,45:39,47:40,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{10:f1,18:234},{10:i1,60:a1,83:n1,91:235,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{10:i1,60:a1,83:n1,91:246,103:[1,247],104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{10:i1,60:a1,83:n1,91:248,103:[1,249],104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{104:[1,250]},{10:i1,60:a1,83:n1,91:251,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{44:b,47:252,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(F,[2,106]),{79:[1,253]},{79:[1,254],97:[1,255]},e(F,[2,114]),e(F,[2,116],{10:[1,256]}),e(F,[2,117]),e(M,[2,56]),e(g1,[2,85]),e(M,[2,57]),{51:[1,257],67:k,81:214,115:m,116:E,117:S},e(M,[2,64]),e(M,[2,59]),e(M,[2,60]),e(M,[2,61]),{108:[1,258]},e(M,[2,63]),e(M,[2,65]),{66:[1,259],67:k,81:214,115:m,116:E,117:S},e(M,[2,67]),e(M,[2,68]),e(M,[2,70]),e(M,[2,69]),e(M,[2,71]),e([10,44,60,88,101,104,105,108,110,113,114,115],[2,83]),{31:[1,260],67:k,81:214,115:m,116:E,117:S},{6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:v,32:[1,261],33:24,34:z,36:_,38:h,42:28,43:38,44:b,45:39,47:40,60:x,83:Z,84:k1,85:m1,86:E1,87:Y1,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},e(S1,[2,53]),{43:262,44:b,45:39,47:40,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(F,[2,119],{105:O1}),e(qe,[2,128],{107:264,10:i1,60:a1,83:n1,104:u1,108:l1,109:o1,110:c1,111:h1}),e($,[2,130]),e($,[2,132]),e($,[2,133]),e($,[2,134]),e($,[2,135]),e($,[2,136]),e($,[2,137]),e($,[2,138]),e($,[2,139]),e(F,[2,120],{105:O1}),{10:[1,265]},e(F,[2,121],{105:O1}),{10:[1,266]},e(Ye,[2,127]),e(F,[2,103],{105:O1}),e(F,[2,104],{112:111,44:b,60:x,88:B,101:V,104:L,105:w,108:I,110:R,113:N,114:P,115:O}),e(F,[2,108]),e(F,[2,110],{10:[1,267]}),e(F,[2,111]),{97:[1,268]},{51:[1,269]},{62:[1,270]},{66:[1,271]},{8:t1,9:s1,11:r1,21:272},e(C,[2,34]),e(S1,[2,52]),{10:i1,60:a1,83:n1,104:u1,106:273,107:237,108:l1,109:o1,110:c1,111:h1},e($,[2,131]),{14:y1,44:F1,60:v1,88:_1,100:274,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1,119:86},{14:y1,44:F1,60:v1,88:_1,100:275,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1,119:86},{97:[1,276]},e(F,[2,118]),e(M,[2,58]),{30:277,67:k,79:U,80:W,81:168,115:m,116:E,117:S},e(M,[2,66]),e(ne,d,{5:278}),e(qe,[2,129],{107:264,10:i1,60:a1,83:n1,104:u1,108:l1,109:o1,110:c1,111:h1}),e(F,[2,124],{119:164,10:[1,279],14:y1,44:F1,60:v1,88:_1,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1}),e(F,[2,125],{119:164,10:[1,280],14:y1,44:F1,60:v1,88:_1,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1}),e(F,[2,112]),{31:[1,281],67:k,81:214,115:m,116:E,117:S},{6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:v,32:[1,282],33:24,34:z,36:_,38:h,42:28,43:38,44:b,45:39,47:40,60:x,83:Z,84:k1,85:m1,86:E1,87:Y1,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},{10:i1,60:a1,83:n1,91:283,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{10:i1,60:a1,83:n1,91:284,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},e(M,[2,62]),e(C,[2,33]),e(F,[2,122],{105:O1}),e(F,[2,123],{105:O1})],defaultActions:{},parseError:l(function(p,f){if(f.recoverable)this.trace(p);else{var A=new Error(p);throw A.hash=f,A}},"parseError"),parse:l(function(p){var f=this,A=[0],n=[],y=[null],t=[],z1=this.table,s="",X=0,He=0,ht=2,Xe=1,dt=t.slice.call(arguments,1),G=Object.create(this.lexer),D1={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(D1.yy[le]=this.yy[le]);G.setInput(p,D1.yy),D1.yy.lexer=G,D1.yy.parser=this,typeof G.yylloc>"u"&&(G.yylloc={});var oe=G.yylloc;t.push(oe);var pt=G.options&&G.options.ranges;typeof D1.yy.parseError=="function"?this.parseError=D1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(H){A.length=A.length-2*H,y.length=y.length-H,t.length=t.length-H}l(ft,"popStack");function Qe(){var H;return H=n.pop()||G.lex()||Xe,typeof H!="number"&&(H instanceof Array&&(n=H,H=n.pop()),H=f.symbols_[H]||H),H}l(Qe,"lex");for(var j,x1,Q,ce,G1={},Z1,d1,Je,$1;;){if(x1=A[A.length-1],this.defaultActions[x1]?Q=this.defaultActions[x1]:((j===null||typeof j>"u")&&(j=Qe()),Q=z1[x1]&&z1[x1][j]),typeof Q>"u"||!Q.length||!Q[0]){var he="";$1=[];for(Z1 in z1[x1])this.terminals_[Z1]&&Z1>ht&&$1.push("'"+this.terminals_[Z1]+"'");G.showPosition?he="Parse error on line "+(X+1)+`: +`+G.showPosition()+` +Expecting `+$1.join(", ")+", got '"+(this.terminals_[j]||j)+"'":he="Parse error on line "+(X+1)+": Unexpected "+(j==Xe?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(he,{text:G.match,token:this.terminals_[j]||j,line:G.yylineno,loc:oe,expected:$1})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x1+", token: "+j);switch(Q[0]){case 1:A.push(j),y.push(G.yytext),t.push(G.yylloc),A.push(Q[1]),j=null,He=G.yyleng,s=G.yytext,X=G.yylineno,oe=G.yylloc;break;case 2:if(d1=this.productions_[Q[1]][1],G1.$=y[y.length-d1],G1._$={first_line:t[t.length-(d1||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(d1||1)].first_column,last_column:t[t.length-1].last_column},pt&&(G1._$.range=[t[t.length-(d1||1)].range[0],t[t.length-1].range[1]]),ce=this.performAction.apply(G1,[s,He,X,D1.yy,Q[1],y,t].concat(dt)),typeof ce<"u")return ce;d1&&(A=A.slice(0,-1*d1*2),y=y.slice(0,-1*d1),t=t.slice(0,-1*d1)),A.push(this.productions_[Q[1]][0]),y.push(G1.$),t.push(G1._$),Je=z1[A[A.length-2]][A[A.length-1]],A.push(Je);break;case 3:return!0}}return!0},"parse")},ct=function(){var A1={EOF:1,parseError:l(function(f,A){if(this.yy.parser)this.yy.parser.parseError(f,A);else throw new Error(f)},"parseError"),setInput:l(function(p,f){return this.yy=f||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var f=p.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:l(function(p){var f=p.length,A=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===n.length?this.yylloc.first_column:0)+n[n.length-A.length].length-A[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(p){this.unput(this.match.slice(p))},"less"),pastInput:l(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var p=this.pastInput(),f=new Array(p.length+1).join("-");return p+this.upcomingInput()+` +`+f+"^"},"showPosition"),test_match:l(function(p,f){var A,n,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),n=p[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],A=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var t in y)this[t]=y[t];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,f,A,n;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),t=0;tf[0].length)){if(f=A,n=t,this.options.backtrack_lexer){if(p=this.test_match(A,y[t]),p!==!1)return p;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(p=this.test_match(f,y[n]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var f=this.next();return f||this.lex()},"lex"),begin:l(function(f){this.conditionStack.push(f)},"begin"),popState:l(function(){var f=this.conditionStack.length-1;return f>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:l(function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},"topState"),pushState:l(function(f){this.begin(f)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:l(function(f,A,n,y){switch(n){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),A.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const t=/\n\s*/g;return A.yytext=A.yytext.replace(t,"
    "),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 17:this.popState();break;case 18:return 95;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 87;case 35:return f.lex.firstGraph()&&this.begin("dir"),12;case 36:return f.lex.firstGraph()&&this.begin("dir"),12;case 37:return f.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:return 97;case 41:return 97;case 42:return 97;case 43:return 97;case 44:return this.popState(),13;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:return 110;case 61:return 46;case 62:return 60;case 63:return 44;case 64:return 8;case 65:return 105;case 66:return 114;case 67:return this.popState(),77;case 68:return this.pushState("edgeText"),75;case 69:return 118;case 70:return this.popState(),77;case 71:return this.pushState("thickEdgeText"),75;case 72:return 118;case 73:return this.popState(),77;case 74:return this.pushState("dottedEdgeText"),75;case 75:return 118;case 76:return 77;case 77:return this.popState(),53;case 78:return"TEXT";case 79:return this.pushState("ellipseText"),52;case 80:return this.popState(),55;case 81:return this.pushState("text"),54;case 82:return this.popState(),57;case 83:return this.pushState("text"),56;case 84:return 58;case 85:return this.pushState("text"),67;case 86:return this.popState(),64;case 87:return this.pushState("text"),63;case 88:return this.popState(),49;case 89:return this.pushState("text"),48;case 90:return this.popState(),69;case 91:return this.popState(),71;case 92:return 116;case 93:return this.pushState("trapText"),68;case 94:return this.pushState("trapText"),70;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 100:return 114;case 101:return 110;case 102:return 44;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;case 107:return this.pushState("text"),62;case 108:return this.popState(),51;case 109:return this.pushState("text"),50;case 110:return this.popState(),31;case 111:return this.pushState("text"),29;case 112:return this.popState(),66;case 113:return this.pushState("text"),65;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 9;case 117:return 10;case 118:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},href:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dottedEdgeText:{rules:[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},thickEdgeText:{rules:[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},text:{rules:[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],inclusive:!0}}};return A1}();ue.lexer=ct;function J1(){this.yy={}}return l(J1,"Parser"),J1.prototype=ue,ue.Parser=J1,new J1}();fe.parser=fe;var gs=fe,As=l((e,r)=>{const i=wt,a=i(e,"r"),u=i(e,"g"),d=i(e,"b");return Lt(a,u,d,r)},"fade"),bs=l(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + + .root .anchor path { + fill: ${e.lineColor} !important; + stroke-width: 0; + stroke: ${e.lineColor}; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${As(e.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + padding: 2px; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } +`,"getStyles"),ks=bs,Cs={parser:gs,db:de,renderer:fs,styles:ks,init:l(e=>{e.flowchart||(e.flowchart={}),e.layout&&Ze({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Ze({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}}),de.clear(),de.setGen("gen-2")},"init")};export{Cs as diagram}; diff --git a/assets/chunks/framework.BDUoXecB.js b/assets/chunks/framework.BDUoXecB.js new file mode 100644 index 00000000..6c633edf --- /dev/null +++ b/assets/chunks/framework.BDUoXecB.js @@ -0,0 +1,18 @@ +/** +* @vue/shared v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function Bs(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ee={},xt=[],Ue=()=>{},Zo=()=>!1,sn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ks=e=>e.startsWith("onUpdate:"),ae=Object.assign,Vs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},el=Object.prototype.hasOwnProperty,Q=(e,t)=>el.call(e,t),K=Array.isArray,St=e=>Hn(e)==="[object Map]",ui=e=>Hn(e)==="[object Set]",q=e=>typeof e=="function",ie=e=>typeof e=="string",Je=e=>typeof e=="symbol",re=e=>e!==null&&typeof e=="object",di=e=>(re(e)||q(e))&&q(e.then)&&q(e.catch),hi=Object.prototype.toString,Hn=e=>hi.call(e),tl=e=>Hn(e).slice(8,-1),pi=e=>Hn(e)==="[object Object]",Us=e=>ie(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ct=Bs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Dn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},nl=/-(\w)/g,Le=Dn(e=>e.replace(nl,(t,n)=>n?n.toUpperCase():"")),sl=/\B([A-Z])/g,rt=Dn(e=>e.replace(sl,"-$1").toLowerCase()),$n=Dn(e=>e.charAt(0).toUpperCase()+e.slice(1)),wn=Dn(e=>e?`on${$n(e)}`:""),nt=(e,t)=>!Object.is(e,t),En=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Es=e=>{const t=parseFloat(e);return isNaN(t)?e:t},mi=e=>{const t=ie(e)?Number(e):NaN;return isNaN(t)?e:t};let gr;const jn=()=>gr||(gr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ws(e){if(K(e)){const t={};for(let n=0;n{if(n){const s=n.split(il);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ks(e){let t="";if(ie(e))t=e;else if(K(e))for(let n=0;n!!(e&&e.__v_isRef===!0),fl=e=>ie(e)?e:e==null?"":K(e)||re(e)&&(e.toString===hi||!q(e.toString))?vi(e)?fl(e.value):JSON.stringify(e,bi,2):String(e),bi=(e,t)=>vi(t)?bi(e,t.value):St(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[ts(s,i)+" =>"]=r,n),{})}:ui(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ts(n))}:Je(t)?ts(t):re(t)&&!K(t)&&!pi(t)?String(t):t,ts=(e,t="")=>{var n;return Je(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let we;class ul{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=we,!t&&we&&(this.index=(we.scopes||(we.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(Ut){let t=Ut;for(Ut=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Vt;){let t=Vt;for(Vt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function xi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Si(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Ys(s),hl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Ts(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ci(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ci(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Xt))return;e.globalVersion=Xt;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Ts(e)){e.flags&=-3;return}const n=se,s=Fe;se=e,Fe=!0;try{xi(e);const r=e.fn(e._value);(t.version===0||nt(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{se=n,Fe=s,Si(e),e.flags&=-3}}function Ys(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Ys(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function hl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Fe=!0;const Ai=[];function it(){Ai.push(Fe),Fe=!1}function ot(){const e=Ai.pop();Fe=e===void 0?!0:e}function mr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=se;se=void 0;try{t()}finally{se=n}}}let Xt=0;class pl{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Bn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!se||!Fe||se===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==se)n=this.activeLink=new pl(se,this),se.deps?(n.prevDep=se.depsTail,se.depsTail.nextDep=n,se.depsTail=n):se.deps=se.depsTail=n,Ri(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=se.depsTail,n.nextDep=void 0,se.depsTail.nextDep=n,se.depsTail=n,se.deps===n&&(se.deps=s)}return n}trigger(t){this.version++,Xt++,this.notify(t)}notify(t){qs();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Gs()}}}function Ri(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ri(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Rn=new WeakMap,dt=Symbol(""),xs=Symbol(""),Jt=Symbol("");function ye(e,t,n){if(Fe&&se){let s=Rn.get(e);s||Rn.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Bn),r.map=s,r.key=n),r.track()}}function Ye(e,t,n,s,r,i){const o=Rn.get(e);if(!o){Xt++;return}const l=c=>{c&&c.trigger()};if(qs(),t==="clear")o.forEach(l);else{const c=K(e),f=c&&Us(n);if(c&&n==="length"){const a=Number(s);o.forEach((u,g)=>{(g==="length"||g===Jt||!Je(g)&&g>=a)&&l(u)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),f&&l(o.get(Jt)),t){case"add":c?f&&l(o.get("length")):(l(o.get(dt)),St(e)&&l(o.get(xs)));break;case"delete":c||(l(o.get(dt)),St(e)&&l(o.get(xs)));break;case"set":St(e)&&l(o.get(dt));break}}Gs()}function gl(e,t){const n=Rn.get(e);return n&&n.get(t)}function bt(e){const t=z(e);return t===e?t:(ye(t,"iterate",Jt),Pe(e)?t:t.map(ve))}function kn(e){return ye(e=z(e),"iterate",Jt),e}const ml={__proto__:null,[Symbol.iterator](){return ss(this,Symbol.iterator,ve)},concat(...e){return bt(this).concat(...e.map(t=>K(t)?bt(t):t))},entries(){return ss(this,"entries",e=>(e[1]=ve(e[1]),e))},every(e,t){return Ke(this,"every",e,t,void 0,arguments)},filter(e,t){return Ke(this,"filter",e,t,n=>n.map(ve),arguments)},find(e,t){return Ke(this,"find",e,t,ve,arguments)},findIndex(e,t){return Ke(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ke(this,"findLast",e,t,ve,arguments)},findLastIndex(e,t){return Ke(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ke(this,"forEach",e,t,void 0,arguments)},includes(...e){return rs(this,"includes",e)},indexOf(...e){return rs(this,"indexOf",e)},join(e){return bt(this).join(e)},lastIndexOf(...e){return rs(this,"lastIndexOf",e)},map(e,t){return Ke(this,"map",e,t,void 0,arguments)},pop(){return jt(this,"pop")},push(...e){return jt(this,"push",e)},reduce(e,...t){return yr(this,"reduce",e,t)},reduceRight(e,...t){return yr(this,"reduceRight",e,t)},shift(){return jt(this,"shift")},some(e,t){return Ke(this,"some",e,t,void 0,arguments)},splice(...e){return jt(this,"splice",e)},toReversed(){return bt(this).toReversed()},toSorted(e){return bt(this).toSorted(e)},toSpliced(...e){return bt(this).toSpliced(...e)},unshift(...e){return jt(this,"unshift",e)},values(){return ss(this,"values",ve)}};function ss(e,t,n){const s=kn(e),r=s[t]();return s!==e&&!Pe(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=n(i.value)),i}),r}const yl=Array.prototype;function Ke(e,t,n,s,r,i){const o=kn(e),l=o!==e&&!Pe(e),c=o[t];if(c!==yl[t]){const u=c.apply(e,i);return l?ve(u):u}let f=n;o!==e&&(l?f=function(u,g){return n.call(this,ve(u),g,e)}:n.length>2&&(f=function(u,g){return n.call(this,u,g,e)}));const a=c.call(o,f,s);return l&&r?r(a):a}function yr(e,t,n,s){const r=kn(e);let i=n;return r!==e&&(Pe(e)?n.length>3&&(i=function(o,l,c){return n.call(this,o,l,c,e)}):i=function(o,l,c){return n.call(this,o,ve(l),c,e)}),r[t](i,...s)}function rs(e,t,n){const s=z(e);ye(s,"iterate",Jt);const r=s[t](...n);return(r===-1||r===!1)&&zs(n[0])?(n[0]=z(n[0]),s[t](...n)):r}function jt(e,t,n=[]){it(),qs();const s=z(e)[t].apply(e,n);return Gs(),ot(),s}const vl=Bs("__proto__,__v_isRef,__isVue"),Oi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Je));function bl(e){Je(e)||(e=String(e));const t=z(this);return ye(t,"has",e),t.hasOwnProperty(e)}class Mi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Ol:Fi:i?Ii:Li).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=K(t);if(!r){let c;if(o&&(c=ml[n]))return c;if(n==="hasOwnProperty")return bl}const l=Reflect.get(t,n,fe(t)?t:s);return(Je(n)?Oi.has(n):vl(n))||(r||ye(t,"get",n),i)?l:fe(l)?o&&Us(n)?l:l.value:re(l)?r?Un(l):Vn(l):l}}class Pi extends Mi{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];if(!this._isShallow){const c=yt(i);if(!Pe(s)&&!yt(s)&&(i=z(i),s=z(s)),!K(t)&&fe(i)&&!fe(s))return c?!1:(i.value=s,!0)}const o=K(t)&&Us(n)?Number(n)e,fn=e=>Reflect.getPrototypeOf(e);function xl(e,t,n){return function(...s){const r=this.__v_raw,i=z(r),o=St(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,f=r[e](...s),a=n?Ss:t?Cs:ve;return!t&&ye(i,"iterate",c?xs:dt),{next(){const{value:u,done:g}=f.next();return g?{value:u,done:g}:{value:l?[a(u[0]),a(u[1])]:a(u),done:g}},[Symbol.iterator](){return this}}}}function un(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Sl(e,t){const n={get(r){const i=this.__v_raw,o=z(i),l=z(r);e||(nt(r,l)&&ye(o,"get",r),ye(o,"get",l));const{has:c}=fn(o),f=t?Ss:e?Cs:ve;if(c.call(o,r))return f(i.get(r));if(c.call(o,l))return f(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&ye(z(r),"iterate",dt),Reflect.get(r,"size",r)},has(r){const i=this.__v_raw,o=z(i),l=z(r);return e||(nt(r,l)&&ye(o,"has",r),ye(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,c=z(l),f=t?Ss:e?Cs:ve;return!e&&ye(c,"iterate",dt),l.forEach((a,u)=>r.call(i,f(a),f(u),o))}};return ae(n,e?{add:un("add"),set:un("set"),delete:un("delete"),clear:un("clear")}:{add(r){!t&&!Pe(r)&&!yt(r)&&(r=z(r));const i=z(this);return fn(i).has.call(i,r)||(i.add(r),Ye(i,"add",r,r)),this},set(r,i){!t&&!Pe(i)&&!yt(i)&&(i=z(i));const o=z(this),{has:l,get:c}=fn(o);let f=l.call(o,r);f||(r=z(r),f=l.call(o,r));const a=c.call(o,r);return o.set(r,i),f?nt(i,a)&&Ye(o,"set",r,i):Ye(o,"add",r,i),this},delete(r){const i=z(this),{has:o,get:l}=fn(i);let c=o.call(i,r);c||(r=z(r),c=o.call(i,r)),l&&l.call(i,r);const f=i.delete(r);return c&&Ye(i,"delete",r,void 0),f},clear(){const r=z(this),i=r.size!==0,o=r.clear();return i&&Ye(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=xl(r,e,t)}),n}function Xs(e,t){const n=Sl(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(Q(n,r)&&r in s?n:s,r,i)}const Cl={get:Xs(!1,!1)},Al={get:Xs(!1,!0)},Rl={get:Xs(!0,!1)};const Li=new WeakMap,Ii=new WeakMap,Fi=new WeakMap,Ol=new WeakMap;function Ml(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Pl(e){return e.__v_skip||!Object.isExtensible(e)?0:Ml(tl(e))}function Vn(e){return yt(e)?e:Js(e,!1,wl,Cl,Li)}function Ll(e){return Js(e,!1,Tl,Al,Ii)}function Un(e){return Js(e,!0,El,Rl,Fi)}function Js(e,t,n,s,r){if(!re(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=Pl(e);if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function ht(e){return yt(e)?ht(e.__v_raw):!!(e&&e.__v_isReactive)}function yt(e){return!!(e&&e.__v_isReadonly)}function Pe(e){return!!(e&&e.__v_isShallow)}function zs(e){return e?!!e.__v_raw:!1}function z(e){const t=e&&e.__v_raw;return t?z(t):e}function Tn(e){return!Q(e,"__v_skip")&&Object.isExtensible(e)&&gi(e,"__v_skip",!0),e}const ve=e=>re(e)?Vn(e):e,Cs=e=>re(e)?Un(e):e;function fe(e){return e?e.__v_isRef===!0:!1}function le(e){return Ni(e,!1)}function Qs(e){return Ni(e,!0)}function Ni(e,t){return fe(e)?e:new Il(e,t)}class Il{constructor(t,n){this.dep=new Bn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:z(t),this._value=n?t:ve(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Pe(t)||yt(t);t=s?t:z(t),nt(t,n)&&(this._rawValue=t,this._value=s?t:ve(t),this.dep.trigger())}}function Hi(e){return fe(e)?e.value:e}const Fl={get:(e,t,n)=>t==="__v_raw"?e:Hi(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return fe(r)&&!fe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Di(e){return ht(e)?e:new Proxy(e,Fl)}class Nl{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Bn,{get:s,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Hl(e){return new Nl(e)}class Dl{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return gl(z(this._object),this._key)}}class $l{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function jl(e,t,n){return fe(e)?e:q(e)?new $l(e):re(e)&&arguments.length>1?Bl(e,t,n):le(e)}function Bl(e,t,n){const s=e[t];return fe(s)?s:new Dl(e,t,n)}class kl{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Bn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Xt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&se!==this)return Ti(this,!0),!0}get value(){const t=this.dep.track();return Ci(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Vl(e,t,n=!1){let s,r;return q(e)?s=e:(s=e.get,r=e.set),new kl(s,r,n)}const dn={},On=new WeakMap;let ut;function Ul(e,t=!1,n=ut){if(n){let s=On.get(n);s||On.set(n,s=[]),s.push(e)}}function Wl(e,t,n=ee){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:c}=n,f=m=>r?m:Pe(m)||r===!1||r===0?Xe(m,1):Xe(m);let a,u,g,y,w=!1,b=!1;if(fe(e)?(u=()=>e.value,w=Pe(e)):ht(e)?(u=()=>f(e),w=!0):K(e)?(b=!0,w=e.some(m=>ht(m)||Pe(m)),u=()=>e.map(m=>{if(fe(m))return m.value;if(ht(m))return f(m);if(q(m))return c?c(m,2):m()})):q(e)?t?u=c?()=>c(e,2):e:u=()=>{if(g){it();try{g()}finally{ot()}}const m=ut;ut=a;try{return c?c(e,3,[y]):e(y)}finally{ut=m}}:u=Ue,t&&r){const m=u,E=r===!0?1/0:r;u=()=>Xe(m(),E)}const U=_i(),F=()=>{a.stop(),U&&U.active&&Vs(U.effects,a)};if(i&&t){const m=t;t=(...E)=>{m(...E),F()}}let $=b?new Array(e.length).fill(dn):dn;const p=m=>{if(!(!(a.flags&1)||!a.dirty&&!m))if(t){const E=a.run();if(r||w||(b?E.some((O,H)=>nt(O,$[H])):nt(E,$))){g&&g();const O=ut;ut=a;try{const H=[E,$===dn?void 0:b&&$[0]===dn?[]:$,y];c?c(t,3,H):t(...H),$=E}finally{ut=O}}}else a.run()};return l&&l(p),a=new wi(u),a.scheduler=o?()=>o(p,!1):p,y=m=>Ul(m,!1,a),g=a.onStop=()=>{const m=On.get(a);if(m){if(c)c(m,4);else for(const E of m)E();On.delete(a)}},t?s?p(!0):$=a.run():o?o(p.bind(null,!0),!0):a.run(),F.pause=a.pause.bind(a),F.resume=a.resume.bind(a),F.stop=F,F}function Xe(e,t=1/0,n){if(t<=0||!re(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,fe(e))Xe(e.value,t,n);else if(K(e))for(let s=0;s{Xe(s,t,n)});else if(pi(e)){for(const s in e)Xe(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Xe(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function rn(e,t,n,s){try{return s?e(...s):e()}catch(r){Nt(r,t,n)}}function He(e,t,n,s){if(q(e)){const r=rn(e,t,n,s);return r&&di(r)&&r.catch(i=>{Nt(i,t,n)}),r}if(K(e)){const r=[];for(let i=0;i>>1,r=Ee[s],i=zt(r);i=zt(n)?Ee.push(e):Ee.splice(ql(t),0,e),e.flags|=1,ji()}}function ji(){Mn||(Mn=$i.then(Bi))}function As(e){K(e)?At.push(...e):Ze&&e.id===-1?Ze.splice(wt+1,0,e):e.flags&1||(At.push(e),e.flags|=1),ji()}function vr(e,t,n=Be+1){for(;nzt(n)-zt(s));if(At.length=0,Ze){Ze.push(...t);return}for(Ze=t,wt=0;wte.id==null?e.flags&2?-1:1/0:e.id;function Bi(e){try{for(Be=0;Be{s._d&&Fr(-1);const i=Ln(t);let o;try{o=e(...r)}finally{Ln(i),s._d&&Fr(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function Pf(e,t){if(he===null)return e;const n=zn(he),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Wt=e=>e&&(e.disabled||e.disabled===""),br=e=>e&&(e.defer||e.defer===""),_r=e=>typeof SVGElement<"u"&&e instanceof SVGElement,wr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Rs=(e,t)=>{const n=e&&e.to;return ie(n)?t?t(n):null:n},Wi={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,l,c,f){const{mc:a,pc:u,pbc:g,o:{insert:y,querySelector:w,createText:b,createComment:U}}=f,F=Wt(t.props);let{shapeFlag:$,children:p,dynamicChildren:m}=t;if(e==null){const E=t.el=b(""),O=t.anchor=b("");y(E,n,s),y(O,n,s);const H=(C,_)=>{$&16&&(r&&r.isCE&&(r.ce._teleportTarget=C),a(p,C,_,r,i,o,l,c))},D=()=>{const C=t.target=Rs(t.props,w),_=Ki(C,t,b,y);C&&(o!=="svg"&&_r(C)?o="svg":o!=="mathml"&&wr(C)&&(o="mathml"),F||(H(C,_),xn(t,!1)))};F&&(H(n,O),xn(t,!0)),br(t.props)?_e(()=>{D(),t.el.__isMounted=!0},i):D()}else{if(br(t.props)&&!e.el.__isMounted){_e(()=>{Wi.process(e,t,n,s,r,i,o,l,c,f),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;const E=t.anchor=e.anchor,O=t.target=e.target,H=t.targetAnchor=e.targetAnchor,D=Wt(e.props),C=D?n:O,_=D?E:H;if(o==="svg"||_r(O)?o="svg":(o==="mathml"||wr(O))&&(o="mathml"),m?(g(e.dynamicChildren,m,C,r,i,o,l),rr(e,t,!0)):c||u(e,t,C,_,r,i,o,l,!1),F)D?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):hn(t,n,E,f,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const L=t.target=Rs(t.props,w);L&&hn(t,L,null,f,0)}else D&&hn(t,O,H,f,1);xn(t,F)}},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:c,targetStart:f,targetAnchor:a,target:u,props:g}=e;if(u&&(r(f),r(a)),i&&r(c),o&16){const y=i||!Wt(g);for(let w=0;w{e.isMounted=!0}),Qi(()=>{e.isUnmounting=!0}),e}const Oe=[Function,Array],qi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Oe,onEnter:Oe,onAfterEnter:Oe,onEnterCancelled:Oe,onBeforeLeave:Oe,onLeave:Oe,onAfterLeave:Oe,onLeaveCancelled:Oe,onBeforeAppear:Oe,onAppear:Oe,onAfterAppear:Oe,onAppearCancelled:Oe},Gi=e=>{const t=e.subTree;return t.component?Gi(t.component):t},Jl={name:"BaseTransition",props:qi,setup(e,{slots:t}){const n=Jn(),s=Xl();return()=>{const r=t.default&&Ji(t.default(),!0);if(!r||!r.length)return;const i=Yi(r),o=z(e),{mode:l}=o;if(s.isLeaving)return is(i);const c=Er(i);if(!c)return is(i);let f=Os(c,o,s,n,u=>f=u);c.type!==ue&&Qt(c,f);let a=n.subTree&&Er(n.subTree);if(a&&a.type!==ue&&!Ve(c,a)&&Gi(n).type!==ue){let u=Os(a,o,s,n);if(Qt(a,u),l==="out-in"&&c.type!==ue)return s.isLeaving=!0,u.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete u.afterLeave,a=void 0},is(i);l==="in-out"&&c.type!==ue?u.delayLeave=(g,y,w)=>{const b=Xi(s,a);b[String(a.key)]=a,g[et]=()=>{y(),g[et]=void 0,delete f.delayedLeave,a=void 0},f.delayedLeave=()=>{w(),delete f.delayedLeave,a=void 0}}:a=void 0}else a&&(a=void 0);return i}}};function Yi(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==ue){t=n;break}}return t}const zl=Jl;function Xi(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Os(e,t,n,s,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:c,onEnter:f,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:g,onLeave:y,onAfterLeave:w,onLeaveCancelled:b,onBeforeAppear:U,onAppear:F,onAfterAppear:$,onAppearCancelled:p}=t,m=String(e.key),E=Xi(n,e),O=(C,_)=>{C&&He(C,s,9,_)},H=(C,_)=>{const L=_[1];O(C,_),K(C)?C.every(T=>T.length<=1)&&L():C.length<=1&&L()},D={mode:o,persisted:l,beforeEnter(C){let _=c;if(!n.isMounted)if(i)_=U||c;else return;C[et]&&C[et](!0);const L=E[m];L&&Ve(e,L)&&L.el[et]&&L.el[et](),O(_,[C])},enter(C){let _=f,L=a,T=u;if(!n.isMounted)if(i)_=F||f,L=$||a,T=p||u;else return;let B=!1;const J=C[pn]=te=>{B||(B=!0,te?O(T,[C]):O(L,[C]),D.delayedLeave&&D.delayedLeave(),C[pn]=void 0)};_?H(_,[C,J]):J()},leave(C,_){const L=String(e.key);if(C[pn]&&C[pn](!0),n.isUnmounting)return _();O(g,[C]);let T=!1;const B=C[et]=J=>{T||(T=!0,_(),J?O(b,[C]):O(w,[C]),C[et]=void 0,E[L]===e&&delete E[L])};E[L]=e,y?H(y,[C,B]):B()},clone(C){const _=Os(C,t,n,s,r);return r&&r(_),_}};return D}function is(e){if(on(e))return e=st(e),e.children=null,e}function Er(e){if(!on(e))return Ui(e.type)&&e.children?Yi(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&q(n.default))return n.default()}}function Qt(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Qt(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ji(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;iZt(w,t&&(K(t)?t[b]:t),n,s,r));return}if(pt(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Zt(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?zn(s.component):s.el,o=r?null:i,{i:l,r:c}=e,f=t&&t.r,a=l.refs===ee?l.refs={}:l.refs,u=l.setupState,g=z(u),y=u===ee?()=>!1:w=>Q(g,w);if(f!=null&&f!==c&&(ie(f)?(a[f]=null,y(f)&&(u[f]=null)):fe(f)&&(f.value=null)),q(c))rn(c,l,12,[o,a]);else{const w=ie(c),b=fe(c);if(w||b){const U=()=>{if(e.f){const F=w?y(c)?u[c]:a[c]:c.value;r?K(F)&&Vs(F,i):K(F)?F.includes(i)||F.push(i):w?(a[c]=[i],y(c)&&(u[c]=a[c])):(c.value=[i],e.k&&(a[e.k]=c.value))}else w?(a[c]=o,y(c)&&(u[c]=o)):b&&(c.value=o,e.k&&(a[e.k]=o))};o?(U.id=-1,_e(U,n)):U()}}}let Tr=!1;const _t=()=>{Tr||(console.error("Hydration completed but contains mismatches."),Tr=!0)},Ql=e=>e.namespaceURI.includes("svg")&&e.tagName!=="foreignObject",Zl=e=>e.namespaceURI.includes("MathML"),gn=e=>{if(e.nodeType===1){if(Ql(e))return"svg";if(Zl(e))return"mathml"}},Tt=e=>e.nodeType===8;function ec(e){const{mt:t,p:n,o:{patchProp:s,createText:r,nextSibling:i,parentNode:o,remove:l,insert:c,createComment:f}}=e,a=(p,m)=>{if(!m.hasChildNodes()){n(null,p,m),Pn(),m._vnode=p;return}u(m.firstChild,p,null,null,null),Pn(),m._vnode=p},u=(p,m,E,O,H,D=!1)=>{D=D||!!m.dynamicChildren;const C=Tt(p)&&p.data==="[",_=()=>b(p,m,E,O,H,C),{type:L,ref:T,shapeFlag:B,patchFlag:J}=m;let te=p.nodeType;m.el=p,J===-2&&(D=!1,m.dynamicChildren=null);let j=null;switch(L){case gt:te!==3?m.children===""?(c(m.el=r(""),o(p),p),j=p):j=_():(p.data!==m.children&&(_t(),p.data=m.children),j=i(p));break;case ue:$(p)?(j=i(p),F(m.el=p.content.firstChild,p,E)):te!==8||C?j=_():j=i(p);break;case qt:if(C&&(p=i(p),te=p.nodeType),te===1||te===3){j=p;const Y=!m.children.length;for(let V=0;V{D=D||!!m.dynamicChildren;const{type:C,props:_,patchFlag:L,shapeFlag:T,dirs:B,transition:J}=m,te=C==="input"||C==="option";if(te||L!==-1){B&&ke(m,null,E,"created");let j=!1;if($(p)){j=mo(null,J)&&E&&E.vnode.props&&E.vnode.props.appear;const V=p.content.firstChild;j&&J.beforeEnter(V),F(V,p,E),m.el=p=V}if(T&16&&!(_&&(_.innerHTML||_.textContent))){let V=y(p.firstChild,m,p,E,O,H,D);for(;V;){mn(p,1)||_t();const pe=V;V=V.nextSibling,l(pe)}}else if(T&8){let V=m.children;V[0]===` +`&&(p.tagName==="PRE"||p.tagName==="TEXTAREA")&&(V=V.slice(1)),p.textContent!==V&&(mn(p,0)||_t(),p.textContent=m.children)}if(_){if(te||!D||L&48){const V=p.tagName.includes("-");for(const pe in _)(te&&(pe.endsWith("value")||pe==="indeterminate")||sn(pe)&&!Ct(pe)||pe[0]==="."||V)&&s(p,pe,null,_[pe],void 0,E)}else if(_.onClick)s(p,"onClick",null,_.onClick,void 0,E);else if(L&4&&ht(_.style))for(const V in _.style)_.style[V]}let Y;(Y=_&&_.onVnodeBeforeMount)&&Me(Y,E,m),B&&ke(m,null,E,"beforeMount"),((Y=_&&_.onVnodeMounted)||B||j)&&Eo(()=>{Y&&Me(Y,E,m),j&&J.enter(p),B&&ke(m,null,E,"mounted")},O)}return p.nextSibling},y=(p,m,E,O,H,D,C)=>{C=C||!!m.dynamicChildren;const _=m.children,L=_.length;for(let T=0;T{const{slotScopeIds:C}=m;C&&(H=H?H.concat(C):C);const _=o(p),L=y(i(p),m,_,E,O,H,D);return L&&Tt(L)&&L.data==="]"?i(m.anchor=L):(_t(),c(m.anchor=f("]"),_,L),L)},b=(p,m,E,O,H,D)=>{if(mn(p.parentElement,1)||_t(),m.el=null,D){const L=U(p);for(;;){const T=i(p);if(T&&T!==L)l(T);else break}}const C=i(p),_=o(p);return l(p),n(null,m,_,C,E,O,gn(_),H),E&&(E.vnode.el=m.el,Xn(E,m.el)),C},U=(p,m="[",E="]")=>{let O=0;for(;p;)if(p=i(p),p&&Tt(p)&&(p.data===m&&O++,p.data===E)){if(O===0)return i(p);O--}return p},F=(p,m,E)=>{const O=m.parentNode;O&&O.replaceChild(p,m);let H=E;for(;H;)H.vnode.el===m&&(H.vnode.el=H.subTree.el=p),H=H.parent},$=p=>p.nodeType===1&&p.tagName==="TEMPLATE";return[a,u]}const xr="data-allow-mismatch",tc={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function mn(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(xr);)e=e.parentElement;const n=e&&e.getAttribute(xr);if(n==null)return!1;if(n==="")return!0;{const s=n.split(",");return t===0&&s.includes("children")?!0:n.split(",").includes(tc[t])}}jn().requestIdleCallback;jn().cancelIdleCallback;function nc(e,t){if(Tt(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(Tt(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const pt=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function If(e){q(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:i,timeout:o,suspensible:l=!0,onError:c}=e;let f=null,a,u=0;const g=()=>(u++,f=null,y()),y=()=>{let w;return f||(w=f=t().catch(b=>{if(b=b instanceof Error?b:new Error(String(b)),c)return new Promise((U,F)=>{c(b,()=>U(g()),()=>F(b),u+1)});throw b}).then(b=>w!==f&&f?f:(b&&(b.__esModule||b[Symbol.toStringTag]==="Module")&&(b=b.default),a=b,b)))};return er({name:"AsyncComponentWrapper",__asyncLoader:y,__asyncHydrate(w,b,U){const F=i?()=>{const $=i(U,p=>nc(w,p));$&&(b.bum||(b.bum=[])).push($)}:U;a?F():y().then(()=>!b.isUnmounted&&F())},get __asyncResolved(){return a},setup(){const w=de;if(tr(w),a)return()=>os(a,w);const b=p=>{f=null,Nt(p,w,13,!s)};if(l&&w.suspense||It)return y().then(p=>()=>os(p,w)).catch(p=>(b(p),()=>s?ce(s,{error:p}):null));const U=le(!1),F=le(),$=le(!!r);return r&&setTimeout(()=>{$.value=!1},r),o!=null&&setTimeout(()=>{if(!U.value&&!F.value){const p=new Error(`Async component timed out after ${o}ms.`);b(p),F.value=p}},o),y().then(()=>{U.value=!0,w.parent&&on(w.parent.vnode)&&w.parent.update()}).catch(p=>{b(p),F.value=p}),()=>{if(U.value&&a)return os(a,w);if(F.value&&s)return ce(s,{error:F.value});if(n&&!$.value)return ce(n)}}})}function os(e,t){const{ref:n,props:s,children:r,ce:i}=t.vnode,o=ce(e,s,r);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const on=e=>e.type.__isKeepAlive;function sc(e,t){zi(e,"a",t)}function rc(e,t){zi(e,"da",t)}function zi(e,t,n=de){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Kn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)on(r.parent.vnode)&&ic(s,t,n,r),r=r.parent}}function ic(e,t,n,s){const r=Kn(t,e,s,!0);qn(()=>{Vs(s[t],r)},n)}function Kn(e,t,n=de,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{it();const l=ln(n),c=He(t,n,e,o);return l(),ot(),c});return s?r.unshift(i):r.push(i),i}}const ze=e=>(t,n=de)=>{(!It||e==="sp")&&Kn(e,(...s)=>t(...s),n)},oc=ze("bm"),Ht=ze("m"),lc=ze("bu"),cc=ze("u"),Qi=ze("bum"),qn=ze("um"),ac=ze("sp"),fc=ze("rtg"),uc=ze("rtc");function dc(e,t=de){Kn("ec",e,t)}const Zi="components";function Ff(e,t){return to(Zi,e,!0,t)||e}const eo=Symbol.for("v-ndc");function Nf(e){return ie(e)?to(Zi,e,!1)||e:e||eo}function to(e,t,n=!0,s=!1){const r=he||de;if(r){const i=r.type;{const l=na(i,!1);if(l&&(l===t||l===Le(t)||l===$n(Le(t))))return i}const o=Sr(r[e]||i[e],t)||Sr(r.appContext[e],t);return!o&&s?i:o}}function Sr(e,t){return e&&(e[t]||e[Le(t)]||e[$n(Le(t))])}function Hf(e,t,n,s){let r;const i=n,o=K(e);if(o||ie(e)){const l=o&&ht(e);let c=!1;l&&(c=!Pe(e),e=kn(e)),r=new Array(e.length);for(let f=0,a=e.length;ft(l,c,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,f=l.length;cLt(t)?!(t.type===ue||t.type===Te&&!no(t.children)):!0)?e:null}function $f(e,t){const n={};for(const s in e)n[/[A-Z]/.test(s)?`on:${s}`:wn(s)]=e[s];return n}const Ms=e=>e?Ro(e)?zn(e):Ms(e.parent):null,Kt=ae(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ms(e.parent),$root:e=>Ms(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>nr(e),$forceUpdate:e=>e.f||(e.f=()=>{Zs(e.update)}),$nextTick:e=>e.n||(e.n=Wn.bind(e.proxy)),$watch:e=>Fc.bind(e)}),ls=(e,t)=>e!==ee&&!e.__isScriptSetup&&Q(e,t),hc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;let f;if(t[0]!=="$"){const y=o[t];if(y!==void 0)switch(y){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(ls(s,t))return o[t]=1,s[t];if(r!==ee&&Q(r,t))return o[t]=2,r[t];if((f=e.propsOptions[0])&&Q(f,t))return o[t]=3,i[t];if(n!==ee&&Q(n,t))return o[t]=4,n[t];Ps&&(o[t]=0)}}const a=Kt[t];let u,g;if(a)return t==="$attrs"&&ye(e.attrs,"get",""),a(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==ee&&Q(n,t))return o[t]=4,n[t];if(g=c.config.globalProperties,Q(g,t))return g[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return ls(r,t)?(r[t]=n,!0):s!==ee&&Q(s,t)?(s[t]=n,!0):Q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let l;return!!n[o]||e!==ee&&Q(e,o)||ls(t,o)||(l=i[0])&&Q(l,o)||Q(s,o)||Q(Kt,o)||Q(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Q(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function jf(){return pc().slots}function pc(){const e=Jn();return e.setupContext||(e.setupContext=Mo(e))}function Cr(e){return K(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ps=!0;function gc(e){const t=nr(e),n=e.proxy,s=e.ctx;Ps=!1,t.beforeCreate&&Ar(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:f,created:a,beforeMount:u,mounted:g,beforeUpdate:y,updated:w,activated:b,deactivated:U,beforeDestroy:F,beforeUnmount:$,destroyed:p,unmounted:m,render:E,renderTracked:O,renderTriggered:H,errorCaptured:D,serverPrefetch:C,expose:_,inheritAttrs:L,components:T,directives:B,filters:J}=t;if(f&&mc(f,s,null),o)for(const Y in o){const V=o[Y];q(V)&&(s[Y]=V.bind(n))}if(r){const Y=r.call(n,n);re(Y)&&(e.data=Vn(Y))}if(Ps=!0,i)for(const Y in i){const V=i[Y],pe=q(V)?V.bind(n,n):q(V.get)?V.get.bind(n,n):Ue,cn=!q(V)&&q(V.set)?V.set.bind(n):Ue,lt=oe({get:pe,set:cn});Object.defineProperty(s,Y,{enumerable:!0,configurable:!0,get:()=>lt.value,set:$e=>lt.value=$e})}if(l)for(const Y in l)so(l[Y],s,n,Y);if(c){const Y=q(c)?c.call(n):c;Reflect.ownKeys(Y).forEach(V=>{Ec(V,Y[V])})}a&&Ar(a,e,"c");function j(Y,V){K(V)?V.forEach(pe=>Y(pe.bind(n))):V&&Y(V.bind(n))}if(j(oc,u),j(Ht,g),j(lc,y),j(cc,w),j(sc,b),j(rc,U),j(dc,D),j(uc,O),j(fc,H),j(Qi,$),j(qn,m),j(ac,C),K(_))if(_.length){const Y=e.exposed||(e.exposed={});_.forEach(V=>{Object.defineProperty(Y,V,{get:()=>n[V],set:pe=>n[V]=pe})})}else e.exposed||(e.exposed={});E&&e.render===Ue&&(e.render=E),L!=null&&(e.inheritAttrs=L),T&&(e.components=T),B&&(e.directives=B),C&&tr(e)}function mc(e,t,n=Ue){K(e)&&(e=Ls(e));for(const s in e){const r=e[s];let i;re(r)?"default"in r?i=Ot(r.from||s,r.default,!0):i=Ot(r.from||s):i=Ot(r),fe(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function Ar(e,t,n){He(K(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function so(e,t,n,s){let r=s.includes(".")?vo(n,s):()=>n[s];if(ie(e)){const i=t[e];q(i)&&Ne(r,i)}else if(q(e))Ne(r,e.bind(n));else if(re(e))if(K(e))e.forEach(i=>so(i,t,n,s));else{const i=q(e.handler)?e.handler.bind(n):t[e.handler];q(i)&&Ne(r,i,e)}}function nr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(f=>In(c,f,o,!0)),In(c,t,o)),re(t)&&i.set(t,c),c}function In(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&In(e,i,n,!0),r&&r.forEach(o=>In(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=yc[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const yc={data:Rr,props:Or,emits:Or,methods:kt,computed:kt,beforeCreate:be,created:be,beforeMount:be,mounted:be,beforeUpdate:be,updated:be,beforeDestroy:be,beforeUnmount:be,destroyed:be,unmounted:be,activated:be,deactivated:be,errorCaptured:be,serverPrefetch:be,components:kt,directives:kt,watch:bc,provide:Rr,inject:vc};function Rr(e,t){return t?e?function(){return ae(q(e)?e.call(this,this):e,q(t)?t.call(this,this):t)}:t:e}function vc(e,t){return kt(Ls(e),Ls(t))}function Ls(e){if(K(e)){const t={};for(let n=0;n1)return n&&q(t)?t.call(s&&s.proxy):t}}const io={},oo=()=>Object.create(io),lo=e=>Object.getPrototypeOf(e)===io;function Tc(e,t,n,s=!1){const r={},i=oo();e.propsDefaults=Object.create(null),co(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Ll(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function xc(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=z(r),[c]=e.propsOptions;let f=!1;if((s||o>0)&&!(o&16)){if(o&8){const a=e.vnode.dynamicProps;for(let u=0;u{c=!0;const[g,y]=ao(u,t,!0);ae(o,g),y&&l.push(...y)};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!i&&!c)return re(e)&&s.set(e,xt),xt;if(K(i))for(let a=0;ae[0]==="_"||e==="$stable",sr=e=>K(e)?e.map(Re):[Re(e)],Cc=(e,t,n)=>{if(t._n)return t;const s=Gl((...r)=>sr(t(...r)),n);return s._c=!1,s},uo=(e,t,n)=>{const s=e._ctx;for(const r in e){if(fo(r))continue;const i=e[r];if(q(i))t[r]=Cc(r,i,s);else if(i!=null){const o=sr(i);t[r]=()=>o}}},ho=(e,t)=>{const n=sr(t);e.slots.default=()=>n},po=(e,t,n)=>{for(const s in t)(n||s!=="_")&&(e[s]=t[s])},Ac=(e,t,n)=>{const s=e.slots=oo();if(e.vnode.shapeFlag&32){const r=t._;r?(po(s,t,n),n&&gi(s,"_",r,!0)):uo(t,s)}else t&&ho(e,t)},Rc=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=ee;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:po(r,t,n):(i=!t.$stable,uo(t,r)),o=t}else t&&(ho(e,t),o={default:1});if(i)for(const l in r)!fo(l)&&o[l]==null&&delete r[l]},_e=Eo;function Oc(e){return go(e)}function Mc(e){return go(e,ec)}function go(e,t){const n=jn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:f,setElementText:a,parentNode:u,nextSibling:g,setScopeId:y=Ue,insertStaticContent:w}=e,b=(d,h,v,A=null,x=null,S=null,I=void 0,P=null,M=!!h.dynamicChildren)=>{if(d===h)return;d&&!Ve(d,h)&&(A=an(d),$e(d,x,S,!0),d=null),h.patchFlag===-2&&(M=!1,h.dynamicChildren=null);const{type:R,ref:W,shapeFlag:N}=h;switch(R){case gt:U(d,h,v,A);break;case ue:F(d,h,v,A);break;case qt:d==null&&$(h,v,A,I);break;case Te:T(d,h,v,A,x,S,I,P,M);break;default:N&1?E(d,h,v,A,x,S,I,P,M):N&6?B(d,h,v,A,x,S,I,P,M):(N&64||N&128)&&R.process(d,h,v,A,x,S,I,P,M,vt)}W!=null&&x&&Zt(W,d&&d.ref,S,h||d,!h)},U=(d,h,v,A)=>{if(d==null)s(h.el=l(h.children),v,A);else{const x=h.el=d.el;h.children!==d.children&&f(x,h.children)}},F=(d,h,v,A)=>{d==null?s(h.el=c(h.children||""),v,A):h.el=d.el},$=(d,h,v,A)=>{[d.el,d.anchor]=w(d.children,h,v,A,d.el,d.anchor)},p=({el:d,anchor:h},v,A)=>{let x;for(;d&&d!==h;)x=g(d),s(d,v,A),d=x;s(h,v,A)},m=({el:d,anchor:h})=>{let v;for(;d&&d!==h;)v=g(d),r(d),d=v;r(h)},E=(d,h,v,A,x,S,I,P,M)=>{h.type==="svg"?I="svg":h.type==="math"&&(I="mathml"),d==null?O(h,v,A,x,S,I,P,M):C(d,h,x,S,I,P,M)},O=(d,h,v,A,x,S,I,P)=>{let M,R;const{props:W,shapeFlag:N,transition:k,dirs:G}=d;if(M=d.el=o(d.type,S,W&&W.is,W),N&8?a(M,d.children):N&16&&D(d.children,M,null,A,x,cs(d,S),I,P),G&&ke(d,null,A,"created"),H(M,d,d.scopeId,I,A),W){for(const ne in W)ne!=="value"&&!Ct(ne)&&i(M,ne,null,W[ne],S,A);"value"in W&&i(M,"value",null,W.value,S),(R=W.onVnodeBeforeMount)&&Me(R,A,d)}G&&ke(d,null,A,"beforeMount");const X=mo(x,k);X&&k.beforeEnter(M),s(M,h,v),((R=W&&W.onVnodeMounted)||X||G)&&_e(()=>{R&&Me(R,A,d),X&&k.enter(M),G&&ke(d,null,A,"mounted")},x)},H=(d,h,v,A,x)=>{if(v&&y(d,v),A)for(let S=0;S{for(let R=M;R{const P=h.el=d.el;let{patchFlag:M,dynamicChildren:R,dirs:W}=h;M|=d.patchFlag&16;const N=d.props||ee,k=h.props||ee;let G;if(v&&ct(v,!1),(G=k.onVnodeBeforeUpdate)&&Me(G,v,h,d),W&&ke(h,d,v,"beforeUpdate"),v&&ct(v,!0),(N.innerHTML&&k.innerHTML==null||N.textContent&&k.textContent==null)&&a(P,""),R?_(d.dynamicChildren,R,P,v,A,cs(h,x),S):I||V(d,h,P,null,v,A,cs(h,x),S,!1),M>0){if(M&16)L(P,N,k,v,x);else if(M&2&&N.class!==k.class&&i(P,"class",null,k.class,x),M&4&&i(P,"style",N.style,k.style,x),M&8){const X=h.dynamicProps;for(let ne=0;ne{G&&Me(G,v,h,d),W&&ke(h,d,v,"updated")},A)},_=(d,h,v,A,x,S,I)=>{for(let P=0;P{if(h!==v){if(h!==ee)for(const S in h)!Ct(S)&&!(S in v)&&i(d,S,h[S],null,x,A);for(const S in v){if(Ct(S))continue;const I=v[S],P=h[S];I!==P&&S!=="value"&&i(d,S,P,I,x,A)}"value"in v&&i(d,"value",h.value,v.value,x)}},T=(d,h,v,A,x,S,I,P,M)=>{const R=h.el=d?d.el:l(""),W=h.anchor=d?d.anchor:l("");let{patchFlag:N,dynamicChildren:k,slotScopeIds:G}=h;G&&(P=P?P.concat(G):G),d==null?(s(R,v,A),s(W,v,A),D(h.children||[],v,W,x,S,I,P,M)):N>0&&N&64&&k&&d.dynamicChildren?(_(d.dynamicChildren,k,v,x,S,I,P),(h.key!=null||x&&h===x.subTree)&&rr(d,h,!0)):V(d,h,v,W,x,S,I,P,M)},B=(d,h,v,A,x,S,I,P,M)=>{h.slotScopeIds=P,d==null?h.shapeFlag&512?x.ctx.activate(h,v,A,I,M):J(h,v,A,x,S,I,M):te(d,h,M)},J=(d,h,v,A,x,S,I)=>{const P=d.component=Qc(d,A,x);if(on(d)&&(P.ctx.renderer=vt),Zc(P,!1,I),P.asyncDep){if(x&&x.registerDep(P,j,I),!d.el){const M=P.subTree=ce(ue);F(null,M,h,v)}}else j(P,d,h,v,x,S,I)},te=(d,h,v)=>{const A=h.component=d.component;if(Bc(d,h,v))if(A.asyncDep&&!A.asyncResolved){Y(A,h,v);return}else A.next=h,A.update();else h.el=d.el,A.vnode=h},j=(d,h,v,A,x,S,I)=>{const P=()=>{if(d.isMounted){let{next:N,bu:k,u:G,parent:X,vnode:ne}=d;{const Ce=yo(d);if(Ce){N&&(N.el=ne.el,Y(d,N,I)),Ce.asyncDep.then(()=>{d.isUnmounted||P()});return}}let Z=N,Se;ct(d,!1),N?(N.el=ne.el,Y(d,N,I)):N=ne,k&&En(k),(Se=N.props&&N.props.onVnodeBeforeUpdate)&&Me(Se,X,N,ne),ct(d,!0);const ge=as(d),Ie=d.subTree;d.subTree=ge,b(Ie,ge,u(Ie.el),an(Ie),d,x,S),N.el=ge.el,Z===null&&Xn(d,ge.el),G&&_e(G,x),(Se=N.props&&N.props.onVnodeUpdated)&&_e(()=>Me(Se,X,N,ne),x)}else{let N;const{el:k,props:G}=h,{bm:X,m:ne,parent:Z,root:Se,type:ge}=d,Ie=pt(h);if(ct(d,!1),X&&En(X),!Ie&&(N=G&&G.onVnodeBeforeMount)&&Me(N,Z,h),ct(d,!0),k&&es){const Ce=()=>{d.subTree=as(d),es(k,d.subTree,d,x,null)};Ie&&ge.__asyncHydrate?ge.__asyncHydrate(k,d,Ce):Ce()}else{Se.ce&&Se.ce._injectChildStyle(ge);const Ce=d.subTree=as(d);b(null,Ce,v,A,d,x,S),h.el=Ce.el}if(ne&&_e(ne,x),!Ie&&(N=G&&G.onVnodeMounted)){const Ce=h;_e(()=>Me(N,Z,Ce),x)}(h.shapeFlag&256||Z&&pt(Z.vnode)&&Z.vnode.shapeFlag&256)&&d.a&&_e(d.a,x),d.isMounted=!0,h=v=A=null}};d.scope.on();const M=d.effect=new wi(P);d.scope.off();const R=d.update=M.run.bind(M),W=d.job=M.runIfDirty.bind(M);W.i=d,W.id=d.uid,M.scheduler=()=>Zs(W),ct(d,!0),R()},Y=(d,h,v)=>{h.component=d;const A=d.vnode.props;d.vnode=h,d.next=null,xc(d,h.props,A,v),Rc(d,h.children,v),it(),vr(d),ot()},V=(d,h,v,A,x,S,I,P,M=!1)=>{const R=d&&d.children,W=d?d.shapeFlag:0,N=h.children,{patchFlag:k,shapeFlag:G}=h;if(k>0){if(k&128){cn(R,N,v,A,x,S,I,P,M);return}else if(k&256){pe(R,N,v,A,x,S,I,P,M);return}}G&8?(W&16&&Dt(R,x,S),N!==R&&a(v,N)):W&16?G&16?cn(R,N,v,A,x,S,I,P,M):Dt(R,x,S,!0):(W&8&&a(v,""),G&16&&D(N,v,A,x,S,I,P,M))},pe=(d,h,v,A,x,S,I,P,M)=>{d=d||xt,h=h||xt;const R=d.length,W=h.length,N=Math.min(R,W);let k;for(k=0;kW?Dt(d,x,S,!0,!1,N):D(h,v,A,x,S,I,P,M,N)},cn=(d,h,v,A,x,S,I,P,M)=>{let R=0;const W=h.length;let N=d.length-1,k=W-1;for(;R<=N&&R<=k;){const G=d[R],X=h[R]=M?tt(h[R]):Re(h[R]);if(Ve(G,X))b(G,X,v,null,x,S,I,P,M);else break;R++}for(;R<=N&&R<=k;){const G=d[N],X=h[k]=M?tt(h[k]):Re(h[k]);if(Ve(G,X))b(G,X,v,null,x,S,I,P,M);else break;N--,k--}if(R>N){if(R<=k){const G=k+1,X=Gk)for(;R<=N;)$e(d[R],x,S,!0),R++;else{const G=R,X=R,ne=new Map;for(R=X;R<=k;R++){const Ae=h[R]=M?tt(h[R]):Re(h[R]);Ae.key!=null&&ne.set(Ae.key,R)}let Z,Se=0;const ge=k-X+1;let Ie=!1,Ce=0;const $t=new Array(ge);for(R=0;R=ge){$e(Ae,x,S,!0);continue}let je;if(Ae.key!=null)je=ne.get(Ae.key);else for(Z=X;Z<=k;Z++)if($t[Z-X]===0&&Ve(Ae,h[Z])){je=Z;break}je===void 0?$e(Ae,x,S,!0):($t[je-X]=R+1,je>=Ce?Ce=je:Ie=!0,b(Ae,h[je],v,null,x,S,I,P,M),Se++)}const hr=Ie?Pc($t):xt;for(Z=hr.length-1,R=ge-1;R>=0;R--){const Ae=X+R,je=h[Ae],pr=Ae+1{const{el:S,type:I,transition:P,children:M,shapeFlag:R}=d;if(R&6){lt(d.component.subTree,h,v,A);return}if(R&128){d.suspense.move(h,v,A);return}if(R&64){I.move(d,h,v,vt);return}if(I===Te){s(S,h,v);for(let N=0;NP.enter(S),x);else{const{leave:N,delayLeave:k,afterLeave:G}=P,X=()=>s(S,h,v),ne=()=>{N(S,()=>{X(),G&&G()})};k?k(S,X,ne):ne()}else s(S,h,v)},$e=(d,h,v,A=!1,x=!1)=>{const{type:S,props:I,ref:P,children:M,dynamicChildren:R,shapeFlag:W,patchFlag:N,dirs:k,cacheIndex:G}=d;if(N===-2&&(x=!1),P!=null&&Zt(P,null,v,d,!0),G!=null&&(h.renderCache[G]=void 0),W&256){h.ctx.deactivate(d);return}const X=W&1&&k,ne=!pt(d);let Z;if(ne&&(Z=I&&I.onVnodeBeforeUnmount)&&Me(Z,h,d),W&6)Qo(d.component,v,A);else{if(W&128){d.suspense.unmount(v,A);return}X&&ke(d,null,h,"beforeUnmount"),W&64?d.type.remove(d,h,v,vt,A):R&&!R.hasOnce&&(S!==Te||N>0&&N&64)?Dt(R,h,v,!1,!0):(S===Te&&N&384||!x&&W&16)&&Dt(M,h,v),A&&ur(d)}(ne&&(Z=I&&I.onVnodeUnmounted)||X)&&_e(()=>{Z&&Me(Z,h,d),X&&ke(d,null,h,"unmounted")},v)},ur=d=>{const{type:h,el:v,anchor:A,transition:x}=d;if(h===Te){zo(v,A);return}if(h===qt){m(d);return}const S=()=>{r(v),x&&!x.persisted&&x.afterLeave&&x.afterLeave()};if(d.shapeFlag&1&&x&&!x.persisted){const{leave:I,delayLeave:P}=x,M=()=>I(v,S);P?P(d.el,S,M):M()}else S()},zo=(d,h)=>{let v;for(;d!==h;)v=g(d),r(d),d=v;r(h)},Qo=(d,h,v)=>{const{bum:A,scope:x,job:S,subTree:I,um:P,m:M,a:R}=d;Pr(M),Pr(R),A&&En(A),x.stop(),S&&(S.flags|=8,$e(I,d,h,v)),P&&_e(P,h),_e(()=>{d.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&d.asyncDep&&!d.asyncResolved&&d.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},Dt=(d,h,v,A=!1,x=!1,S=0)=>{for(let I=S;I{if(d.shapeFlag&6)return an(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const h=g(d.anchor||d.el),v=h&&h[Vi];return v?g(v):h};let Qn=!1;const dr=(d,h,v)=>{d==null?h._vnode&&$e(h._vnode,null,null,!0):b(h._vnode||null,d,h,null,null,null,v),h._vnode=d,Qn||(Qn=!0,vr(),Pn(),Qn=!1)},vt={p:b,um:$e,m:lt,r:ur,mt:J,mc:D,pc:V,pbc:_,n:an,o:e};let Zn,es;return t&&([Zn,es]=t(vt)),{render:dr,hydrate:Zn,createApp:wc(dr,Zn)}}function cs({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ct({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function mo(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function rr(e,t,n=!1){const s=e.children,r=t.children;if(K(s)&&K(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function yo(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:yo(t)}function Pr(e){if(e)for(let t=0;tOt(Lc);function ir(e,t){return Gn(e,null,t)}function Bf(e,t){return Gn(e,null,{flush:"post"})}function Ne(e,t,n){return Gn(e,t,n)}function Gn(e,t,n=ee){const{immediate:s,deep:r,flush:i,once:o}=n,l=ae({},n),c=t&&s||!t&&i!=="post";let f;if(It){if(i==="sync"){const y=Ic();f=y.__watcherHandles||(y.__watcherHandles=[])}else if(!c){const y=()=>{};return y.stop=Ue,y.resume=Ue,y.pause=Ue,y}}const a=de;l.call=(y,w,b)=>He(y,a,w,b);let u=!1;i==="post"?l.scheduler=y=>{_e(y,a&&a.suspense)}:i!=="sync"&&(u=!0,l.scheduler=(y,w)=>{w?y():Zs(y)}),l.augmentJob=y=>{t&&(y.flags|=4),u&&(y.flags|=2,a&&(y.id=a.uid,y.i=a))};const g=Wl(e,t,l);return It&&(f?f.push(g):c&&g()),g}function Fc(e,t,n){const s=this.proxy,r=ie(e)?e.includes(".")?vo(s,e):()=>s[e]:e.bind(s,s);let i;q(t)?i=t:(i=t.handler,n=t);const o=ln(this),l=Gn(r,i.bind(s),n);return o(),l}function vo(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Le(t)}Modifiers`]||e[`${rt(t)}Modifiers`];function Hc(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ee;let r=n;const i=t.startsWith("update:"),o=i&&Nc(s,t.slice(7));o&&(o.trim&&(r=n.map(a=>ie(a)?a.trim():a)),o.number&&(r=n.map(Es)));let l,c=s[l=wn(t)]||s[l=wn(Le(t))];!c&&i&&(c=s[l=wn(rt(t))]),c&&He(c,e,6,r);const f=s[l+"Once"];if(f){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,He(f,e,6,r)}}function bo(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!q(e)){const c=f=>{const a=bo(f,t,!0);a&&(l=!0,ae(o,a))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(re(e)&&s.set(e,null),null):(K(i)?i.forEach(c=>o[c]=null):ae(o,i),re(e)&&s.set(e,o),o)}function Yn(e,t){return!e||!sn(t)?!1:(t=t.slice(2).replace(/Once$/,""),Q(e,t[0].toLowerCase()+t.slice(1))||Q(e,rt(t))||Q(e,t))}function as(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:c,render:f,renderCache:a,props:u,data:g,setupState:y,ctx:w,inheritAttrs:b}=e,U=Ln(e);let F,$;try{if(n.shapeFlag&4){const m=r||s,E=m;F=Re(f.call(E,m,a,u,y,g,w)),$=l}else{const m=t;F=Re(m.length>1?m(u,{attrs:l,slots:o,emit:c}):m(u,null)),$=t.props?l:$c(l)}}catch(m){Gt.length=0,Nt(m,e,1),F=ce(ue)}let p=F;if($&&b!==!1){const m=Object.keys($),{shapeFlag:E}=p;m.length&&E&7&&(i&&m.some(ks)&&($=jc($,i)),p=st(p,$,!1,!0))}return n.dirs&&(p=st(p,null,!1,!0),p.dirs=p.dirs?p.dirs.concat(n.dirs):n.dirs),n.transition&&Qt(p,n.transition),F=p,Ln(U),F}function Dc(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||sn(n))&&((t||(t={}))[n]=e[n]);return t},jc=(e,t)=>{const n={};for(const s in e)(!ks(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Bc(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,f=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Lr(s,o,f):!!o;if(c&8){const a=t.dynamicProps;for(let u=0;ue.__isSuspense;let Fs=0;const kc={name:"Suspense",__isSuspense:!0,process(e,t,n,s,r,i,o,l,c,f){if(e==null)Vc(t,n,s,r,i,o,l,c,f);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Uc(e,t,n,s,r,o,l,c,f)}},hydrate:Wc,normalize:Kc},kf=kc;function en(e,t){const n=e.props&&e.props[t];q(n)&&n()}function Vc(e,t,n,s,r,i,o,l,c){const{p:f,o:{createElement:a}}=c,u=a("div"),g=e.suspense=wo(e,r,s,t,u,n,i,o,l,c);f(null,g.pendingBranch=e.ssContent,u,null,s,g,i,o),g.deps>0?(en(e,"onPending"),en(e,"onFallback"),f(null,e.ssFallback,t,n,s,null,i,o),Mt(g,e.ssFallback)):g.resolve(!1,!0)}function Uc(e,t,n,s,r,i,o,l,{p:c,um:f,o:{createElement:a}}){const u=t.suspense=e.suspense;u.vnode=t,t.el=e.el;const g=t.ssContent,y=t.ssFallback,{activeBranch:w,pendingBranch:b,isInFallback:U,isHydrating:F}=u;if(b)u.pendingBranch=g,Ve(g,b)?(c(b,g,u.hiddenContainer,null,r,u,i,o,l),u.deps<=0?u.resolve():U&&(F||(c(w,y,n,s,r,null,i,o,l),Mt(u,y)))):(u.pendingId=Fs++,F?(u.isHydrating=!1,u.activeBranch=b):f(b,r,u),u.deps=0,u.effects.length=0,u.hiddenContainer=a("div"),U?(c(null,g,u.hiddenContainer,null,r,u,i,o,l),u.deps<=0?u.resolve():(c(w,y,n,s,r,null,i,o,l),Mt(u,y))):w&&Ve(g,w)?(c(w,g,n,s,r,u,i,o,l),u.resolve(!0)):(c(null,g,u.hiddenContainer,null,r,u,i,o,l),u.deps<=0&&u.resolve()));else if(w&&Ve(g,w))c(w,g,n,s,r,u,i,o,l),Mt(u,g);else if(en(t,"onPending"),u.pendingBranch=g,g.shapeFlag&512?u.pendingId=g.component.suspenseId:u.pendingId=Fs++,c(null,g,u.hiddenContainer,null,r,u,i,o,l),u.deps<=0)u.resolve();else{const{timeout:$,pendingId:p}=u;$>0?setTimeout(()=>{u.pendingId===p&&u.fallback(y)},$):$===0&&u.fallback(y)}}function wo(e,t,n,s,r,i,o,l,c,f,a=!1){const{p:u,m:g,um:y,n:w,o:{parentNode:b,remove:U}}=f;let F;const $=qc(e);$&&t&&t.pendingBranch&&(F=t.pendingId,t.deps++);const p=e.props?mi(e.props.timeout):void 0,m=i,E={vnode:e,parent:t,parentComponent:n,namespace:o,container:s,hiddenContainer:r,deps:0,pendingId:Fs++,timeout:typeof p=="number"?p:-1,activeBranch:null,pendingBranch:null,isInFallback:!a,isHydrating:a,isUnmounted:!1,effects:[],resolve(O=!1,H=!1){const{vnode:D,activeBranch:C,pendingBranch:_,pendingId:L,effects:T,parentComponent:B,container:J}=E;let te=!1;E.isHydrating?E.isHydrating=!1:O||(te=C&&_.transition&&_.transition.mode==="out-in",te&&(C.transition.afterLeave=()=>{L===E.pendingId&&(g(_,J,i===m?w(C):i,0),As(T))}),C&&(b(C.el)===J&&(i=w(C)),y(C,B,E,!0)),te||g(_,J,i,0)),Mt(E,_),E.pendingBranch=null,E.isInFallback=!1;let j=E.parent,Y=!1;for(;j;){if(j.pendingBranch){j.effects.push(...T),Y=!0;break}j=j.parent}!Y&&!te&&As(T),E.effects=[],$&&t&&t.pendingBranch&&F===t.pendingId&&(t.deps--,t.deps===0&&!H&&t.resolve()),en(D,"onResolve")},fallback(O){if(!E.pendingBranch)return;const{vnode:H,activeBranch:D,parentComponent:C,container:_,namespace:L}=E;en(H,"onFallback");const T=w(D),B=()=>{E.isInFallback&&(u(null,O,_,T,C,null,L,l,c),Mt(E,O))},J=O.transition&&O.transition.mode==="out-in";J&&(D.transition.afterLeave=B),E.isInFallback=!0,y(D,C,null,!0),J||B()},move(O,H,D){E.activeBranch&&g(E.activeBranch,O,H,D),E.container=O},next(){return E.activeBranch&&w(E.activeBranch)},registerDep(O,H,D){const C=!!E.pendingBranch;C&&E.deps++;const _=O.vnode.el;O.asyncDep.catch(L=>{Nt(L,O,0)}).then(L=>{if(O.isUnmounted||E.isUnmounted||E.pendingId!==O.suspenseId)return;O.asyncResolved=!0;const{vnode:T}=O;Ds(O,L,!1),_&&(T.el=_);const B=!_&&O.subTree.el;H(O,T,b(_||O.subTree.el),_?null:w(O.subTree),E,o,D),B&&U(B),Xn(O,T.el),C&&--E.deps===0&&E.resolve()})},unmount(O,H){E.isUnmounted=!0,E.activeBranch&&y(E.activeBranch,n,O,H),E.pendingBranch&&y(E.pendingBranch,n,O,H)}};return E}function Wc(e,t,n,s,r,i,o,l,c){const f=t.suspense=wo(t,s,n,e.parentNode,document.createElement("div"),null,r,i,o,l,!0),a=c(e,f.pendingBranch=t.ssContent,n,f,i,o);return f.deps===0&&f.resolve(!1,!0),a}function Kc(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=Ir(s?n.default:n),e.ssFallback=s?Ir(n.fallback):ce(ue)}function Ir(e){let t;if(q(e)){const n=Pt&&e._c;n&&(e._d=!1,Fn()),e=e(),n&&(e._d=!0,t=xe,To())}return K(e)&&(e=Dc(e)),e=Re(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Eo(e,t){t&&t.pendingBranch?K(e)?t.effects.push(...e):t.effects.push(e):As(e)}function Mt(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;n.el=r,s&&s.subTree===n&&(s.vnode.el=r,Xn(s,r))}function qc(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const Te=Symbol.for("v-fgt"),gt=Symbol.for("v-txt"),ue=Symbol.for("v-cmt"),qt=Symbol.for("v-stc"),Gt=[];let xe=null;function Fn(e=!1){Gt.push(xe=e?null:[])}function To(){Gt.pop(),xe=Gt[Gt.length-1]||null}let Pt=1;function Fr(e,t=!1){Pt+=e,e<0&&xe&&t&&(xe.hasOnce=!0)}function xo(e){return e.dynamicChildren=Pt>0?xe||xt:null,To(),Pt>0&&xe&&xe.push(e),e}function Vf(e,t,n,s,r,i){return xo(Co(e,t,n,s,r,i,!0))}function Ns(e,t,n,s,r){return xo(ce(e,t,n,s,r,!0))}function Lt(e){return e?e.__v_isVNode===!0:!1}function Ve(e,t){return e.type===t.type&&e.key===t.key}const So=({key:e})=>e??null,Sn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ie(e)||fe(e)||q(e)?{i:he,r:e,k:t,f:!!n}:e:null);function Co(e,t=null,n=null,s=0,r=null,i=e===Te?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&So(t),ref:t&&Sn(t),scopeId:ki,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:he};return l?(or(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=ie(n)?8:16),Pt>0&&!o&&xe&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&xe.push(c),c}const ce=Gc;function Gc(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===eo)&&(e=ue),Lt(e)){const l=st(e,t,!0);return n&&or(l,n),Pt>0&&!i&&xe&&(l.shapeFlag&6?xe[xe.indexOf(e)]=l:xe.push(l)),l.patchFlag=-2,l}if(sa(e)&&(e=e.__vccOpts),t){t=Yc(t);let{class:l,style:c}=t;l&&!ie(l)&&(t.class=Ks(l)),re(c)&&(zs(c)&&!K(c)&&(c=ae({},c)),t.style=Ws(c))}const o=ie(e)?1:_o(e)?128:Ui(e)?64:re(e)?4:q(e)?2:0;return Co(e,t,n,s,r,o,i,!0)}function Yc(e){return e?zs(e)||lo(e)?ae({},e):e:null}function st(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:c}=e,f=t?Xc(r||{},t):r,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:f,key:f&&So(f),ref:t&&t.ref?n&&i?K(i)?i.concat(Sn(t)):[i,Sn(t)]:Sn(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Te?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&st(e.ssContent),ssFallback:e.ssFallback&&st(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&Qt(a,c.clone(a)),a}function Ao(e=" ",t=0){return ce(gt,null,e,t)}function Uf(e,t){const n=ce(qt,null,e);return n.staticCount=t,n}function Wf(e="",t=!1){return t?(Fn(),Ns(ue,null,e)):ce(ue,null,e)}function Re(e){return e==null||typeof e=="boolean"?ce(ue):K(e)?ce(Te,null,e.slice()):Lt(e)?tt(e):ce(gt,null,String(e))}function tt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:st(e)}function or(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(K(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),or(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!lo(t)?t._ctx=he:r===3&&he&&(he.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else q(t)?(t={default:t,_ctx:he},n=32):(t=String(t),s&64?(n=16,t=[Ao(t)]):n=8);e.children=t,e.shapeFlag|=n}function Xc(...e){const t={};for(let n=0;nde||he;let Nn,Hs;{const e=jn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Nn=t("__VUE_INSTANCE_SETTERS__",n=>de=n),Hs=t("__VUE_SSR_SETTERS__",n=>It=n)}const ln=e=>{const t=de;return Nn(e),e.scope.on(),()=>{e.scope.off(),Nn(t)}},Nr=()=>{de&&de.scope.off(),Nn(null)};function Ro(e){return e.vnode.shapeFlag&4}let It=!1;function Zc(e,t=!1,n=!1){t&&Hs(t);const{props:s,children:r}=e.vnode,i=Ro(e);Tc(e,s,i,t),Ac(e,r,n);const o=i?ea(e,t):void 0;return t&&Hs(!1),o}function ea(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,hc);const{setup:s}=n;if(s){it();const r=e.setupContext=s.length>1?Mo(e):null,i=ln(e),o=rn(s,e,0,[e.props,r]),l=di(o);if(ot(),i(),(l||e.sp)&&!pt(e)&&tr(e),l){if(o.then(Nr,Nr),t)return o.then(c=>{Ds(e,c,t)}).catch(c=>{Nt(c,e,0)});e.asyncDep=o}else Ds(e,o,t)}else Oo(e,t)}function Ds(e,t,n){q(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:re(t)&&(e.setupState=Di(t)),Oo(e,n)}let Hr;function Oo(e,t,n){const s=e.type;if(!e.render){if(!t&&Hr&&!s.render){const r=s.template||nr(e).template;if(r){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,f=ae(ae({isCustomElement:i,delimiters:l},o),c);s.render=Hr(r,f)}}e.render=s.render||Ue}{const r=ln(e);it();try{gc(e)}finally{ot(),r()}}}const ta={get(e,t){return ye(e,"get",""),e[t]}};function Mo(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ta),slots:e.slots,emit:e.emit,expose:t}}function zn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Di(Tn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Kt)return Kt[n](e)},has(t,n){return n in t||n in Kt}})):e.proxy}function na(e,t=!0){return q(e)?e.displayName||e.name:e.name||t&&e.__name}function sa(e){return q(e)&&"__vccOpts"in e}const oe=(e,t)=>Vl(e,t,It);function $s(e,t,n){const s=arguments.length;return s===2?re(t)&&!K(t)?Lt(t)?ce(e,null,[t]):ce(e,t):ce(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Lt(n)&&(n=[n]),ce(e,t,n))}const ra="3.5.13";/** +* @vue/runtime-dom v3.5.13 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let js;const Dr=typeof window<"u"&&window.trustedTypes;if(Dr)try{js=Dr.createPolicy("vue",{createHTML:e=>e})}catch{}const Po=js?e=>js.createHTML(e):e=>e,ia="http://www.w3.org/2000/svg",oa="http://www.w3.org/1998/Math/MathML",Ge=typeof document<"u"?document:null,$r=Ge&&Ge.createElement("template"),la={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Ge.createElementNS(ia,e):t==="mathml"?Ge.createElementNS(oa,e):n?Ge.createElement(e,{is:n}):Ge.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Ge.createTextNode(e),createComment:e=>Ge.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ge.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{$r.innerHTML=Po(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=$r.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qe="transition",Bt="animation",tn=Symbol("_vtc"),Lo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ca=ae({},qi,Lo),aa=e=>(e.displayName="Transition",e.props=ca,e),Kf=aa((e,{slots:t})=>$s(zl,fa(e),t)),at=(e,t=[])=>{K(e)?e.forEach(n=>n(...t)):e&&e(...t)},jr=e=>e?K(e)?e.some(t=>t.length>1):e.length>1:!1;function fa(e){const t={};for(const T in e)T in Lo||(t[T]=e[T]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:f=o,appearToClass:a=l,leaveFromClass:u=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:y=`${n}-leave-to`}=e,w=ua(r),b=w&&w[0],U=w&&w[1],{onBeforeEnter:F,onEnter:$,onEnterCancelled:p,onLeave:m,onLeaveCancelled:E,onBeforeAppear:O=F,onAppear:H=$,onAppearCancelled:D=p}=t,C=(T,B,J,te)=>{T._enterCancelled=te,ft(T,B?a:l),ft(T,B?f:o),J&&J()},_=(T,B)=>{T._isLeaving=!1,ft(T,u),ft(T,y),ft(T,g),B&&B()},L=T=>(B,J)=>{const te=T?H:$,j=()=>C(B,T,J);at(te,[B,j]),Br(()=>{ft(B,T?c:i),qe(B,T?a:l),jr(te)||kr(B,s,b,j)})};return ae(t,{onBeforeEnter(T){at(F,[T]),qe(T,i),qe(T,o)},onBeforeAppear(T){at(O,[T]),qe(T,c),qe(T,f)},onEnter:L(!1),onAppear:L(!0),onLeave(T,B){T._isLeaving=!0;const J=()=>_(T,B);qe(T,u),T._enterCancelled?(qe(T,g),Wr()):(Wr(),qe(T,g)),Br(()=>{T._isLeaving&&(ft(T,u),qe(T,y),jr(m)||kr(T,s,U,J))}),at(m,[T,J])},onEnterCancelled(T){C(T,!1,void 0,!0),at(p,[T])},onAppearCancelled(T){C(T,!0,void 0,!0),at(D,[T])},onLeaveCancelled(T){_(T),at(E,[T])}})}function ua(e){if(e==null)return null;if(re(e))return[fs(e.enter),fs(e.leave)];{const t=fs(e);return[t,t]}}function fs(e){return mi(e)}function qe(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[tn]||(e[tn]=new Set)).add(t)}function ft(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[tn];n&&(n.delete(t),n.size||(e[tn]=void 0))}function Br(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let da=0;function kr(e,t,n,s){const r=e._endId=++da,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=ha(e,t);if(!o)return s();const f=o+"end";let a=0;const u=()=>{e.removeEventListener(f,g),i()},g=y=>{y.target===e&&++a>=c&&u()};setTimeout(()=>{a(n[w]||"").split(", "),r=s(`${Qe}Delay`),i=s(`${Qe}Duration`),o=Vr(r,i),l=s(`${Bt}Delay`),c=s(`${Bt}Duration`),f=Vr(l,c);let a=null,u=0,g=0;t===Qe?o>0&&(a=Qe,u=o,g=i.length):t===Bt?f>0&&(a=Bt,u=f,g=c.length):(u=Math.max(o,f),a=u>0?o>f?Qe:Bt:null,g=a?a===Qe?i.length:c.length:0);const y=a===Qe&&/\b(transform|all)(,|$)/.test(s(`${Qe}Property`).toString());return{type:a,timeout:u,propCount:g,hasTransform:y}}function Vr(e,t){for(;e.lengthUr(n)+Ur(e[s])))}function Ur(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Wr(){return document.body.offsetHeight}function pa(e,t,n){const s=e[tn];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Kr=Symbol("_vod"),ga=Symbol("_vsh"),ma=Symbol(""),ya=/(^|;)\s*display\s*:/;function va(e,t,n){const s=e.style,r=ie(n);let i=!1;if(n&&!r){if(t)if(ie(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&Cn(s,l,"")}else for(const o in t)n[o]==null&&Cn(s,o,"");for(const o in n)o==="display"&&(i=!0),Cn(s,o,n[o])}else if(r){if(t!==n){const o=s[ma];o&&(n+=";"+o),s.cssText=n,i=ya.test(n)}}else t&&e.removeAttribute("style");Kr in e&&(e[Kr]=i?s.display:"",e[ga]&&(s.display="none"))}const qr=/\s*!important$/;function Cn(e,t,n){if(K(n))n.forEach(s=>Cn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=ba(e,t);qr.test(n)?e.setProperty(rt(s),n.replace(qr,""),"important"):e[s]=n}}const Gr=["Webkit","Moz","ms"],us={};function ba(e,t){const n=us[t];if(n)return n;let s=Le(t);if(s!=="filter"&&s in e)return us[t]=s;s=$n(s);for(let r=0;rds||(Ta.then(()=>ds=0),ds=Date.now());function Sa(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;He(Ca(s,n.value),t,5,[s])};return n.value=e,n.attached=xa(),n}function Ca(e,t){if(K(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const Zr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Aa=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?pa(e,s,o):t==="style"?va(e,n,s):sn(t)?ks(t)||wa(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ra(e,t,s,o))?(Jr(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Xr(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ie(s))?Jr(e,Le(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Xr(e,t,s,o))};function Ra(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Zr(t)&&q(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Zr(t)&&ie(n)?!1:t in e}const ei=e=>{const t=e.props["onUpdate:modelValue"]||!1;return K(t)?n=>En(t,n):t};function Oa(e){e.target.composing=!0}function ti(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const hs=Symbol("_assign"),qf={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[hs]=ei(r);const i=s||r.props&&r.props.type==="number";Et(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Es(l)),e[hs](l)}),n&&Et(e,"change",()=>{e.value=e.value.trim()}),t||(Et(e,"compositionstart",Oa),Et(e,"compositionend",ti),Et(e,"change",ti))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[hs]=ei(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Es(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===c)||(e.value=c))}},Ma=["ctrl","shift","alt","meta"],Pa={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ma.some(n=>e[`${n}Key`]&&!t.includes(n))},Gf=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=rt(r.key);if(t.some(o=>o===i||La[o]===i))return e(r)})},Io=ae({patchProp:Aa},la);let Yt,ni=!1;function Ia(){return Yt||(Yt=Oc(Io))}function Fa(){return Yt=ni?Yt:Mc(Io),ni=!0,Yt}const Xf=(...e)=>{const t=Ia().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=No(s);if(!r)return;const i=t._component;!q(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,Fo(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t},Jf=(...e)=>{const t=Fa().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=No(s);if(r)return n(r,!0,Fo(r))},t};function Fo(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function No(e){return ie(e)?document.querySelector(e):e}const zf=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Na="modulepreload",Ha=function(e){return"/coding-standards/"+e},si={},Qf=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=Ha(c),c in si)return;si[c]=!0;const f=c.endsWith(".css"),a=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${a}`))return;const u=document.createElement("link");if(u.rel=f?"stylesheet":Na,f||(u.as="script"),u.crossOrigin="",u.href=c,l&&u.setAttribute("nonce",l),document.head.appendChild(u),f)return new Promise((g,y)=>{u.addEventListener("load",g),u.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return r.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},Da=window.__VP_SITE_DATA__;function lr(e){return _i()?(dl(e),!0):!1}function We(e){return typeof e=="function"?e():Hi(e)}const Ho=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Zf=e=>e!=null,$a=Object.prototype.toString,ja=e=>$a.call(e)==="[object Object]",nn=()=>{},ri=Ba();function Ba(){var e,t;return Ho&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function ka(e,t){function n(...s){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(r).catch(i)})}return n}const Do=e=>e();function Va(e,t={}){let n,s,r=nn;const i=l=>{clearTimeout(l),r(),r=nn};return l=>{const c=We(e),f=We(t.maxWait);return n&&i(n),c<=0||f!==void 0&&f<=0?(s&&(i(s),s=null),Promise.resolve(l())):new Promise((a,u)=>{r=t.rejectOnCancel?u:a,f&&!s&&(s=setTimeout(()=>{n&&i(n),s=null,a(l())},f)),n=setTimeout(()=>{s&&i(s),s=null,a(l())},c)})}}function Ua(e=Do){const t=le(!0);function n(){t.value=!1}function s(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:Un(t),pause:n,resume:s,eventFilter:r}}function Wa(e){return Jn()}function $o(...e){if(e.length!==1)return jl(...e);const t=e[0];return typeof t=="function"?Un(Hl(()=>({get:t,set:nn}))):le(t)}function jo(e,t,n={}){const{eventFilter:s=Do,...r}=n;return Ne(e,ka(s,t),r)}function Ka(e,t,n={}){const{eventFilter:s,...r}=n,{eventFilter:i,pause:o,resume:l,isActive:c}=Ua(s);return{stop:jo(e,t,{...r,eventFilter:i}),pause:o,resume:l,isActive:c}}function cr(e,t=!0,n){Wa()?Ht(e,n):t?e():Wn(e)}function eu(e,t,n={}){const{debounce:s=0,maxWait:r=void 0,...i}=n;return jo(e,t,{...i,eventFilter:Va(s,{maxWait:r})})}function tu(e,t,n){let s;fe(n)?s={evaluating:n}:s={};const{lazy:r=!1,evaluating:i=void 0,shallow:o=!0,onError:l=nn}=s,c=le(!r),f=o?Qs(t):le(t);let a=0;return ir(async u=>{if(!c.value)return;a++;const g=a;let y=!1;i&&Promise.resolve().then(()=>{i.value=!0});try{const w=await e(b=>{u(()=>{i&&(i.value=!1),y||b()})});g===a&&(f.value=w)}catch(w){l(w)}finally{i&&g===a&&(i.value=!1),y=!0}}),r?oe(()=>(c.value=!0,f.value)):f}const De=Ho?window:void 0;function Bo(e){var t;const n=We(e);return(t=n==null?void 0:n.$el)!=null?t:n}function Ft(...e){let t,n,s,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,s,r]=e,t=De):[t,n,s,r]=e,!t)return nn;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const i=[],o=()=>{i.forEach(a=>a()),i.length=0},l=(a,u,g,y)=>(a.addEventListener(u,g,y),()=>a.removeEventListener(u,g,y)),c=Ne(()=>[Bo(t),We(r)],([a,u])=>{if(o(),!a)return;const g=ja(u)?{...u}:u;i.push(...n.flatMap(y=>s.map(w=>l(a,y,w,g))))},{immediate:!0,flush:"post"}),f=()=>{c(),o()};return lr(f),f}function qa(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function nu(...e){let t,n,s={};e.length===3?(t=e[0],n=e[1],s=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],s=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=De,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=s,c=qa(t);return Ft(r,i,a=>{a.repeat&&We(l)||c(a)&&n(a)},o)}function Ga(){const e=le(!1),t=Jn();return t&&Ht(()=>{e.value=!0},t),e}function Ya(e){const t=Ga();return oe(()=>(t.value,!!e()))}function ko(e,t={}){const{window:n=De}=t,s=Ya(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let r;const i=le(!1),o=f=>{i.value=f.matches},l=()=>{r&&("removeEventListener"in r?r.removeEventListener("change",o):r.removeListener(o))},c=ir(()=>{s.value&&(l(),r=n.matchMedia(We(e)),"addEventListener"in r?r.addEventListener("change",o):r.addListener(o),i.value=r.matches)});return lr(()=>{c(),l(),r=void 0}),i}const yn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vn="__vueuse_ssr_handlers__",Xa=Ja();function Ja(){return vn in yn||(yn[vn]=yn[vn]||{}),yn[vn]}function Vo(e,t){return Xa[e]||t}function ar(e){return ko("(prefers-color-scheme: dark)",e)}function za(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const Qa={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},ii="vueuse-storage";function fr(e,t,n,s={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:f=!1,shallow:a,window:u=De,eventFilter:g,onError:y=_=>{console.error(_)},initOnMounted:w}=s,b=(a?Qs:le)(typeof t=="function"?t():t);if(!n)try{n=Vo("getDefaultStorage",()=>{var _;return(_=De)==null?void 0:_.localStorage})()}catch(_){y(_)}if(!n)return b;const U=We(t),F=za(U),$=(r=s.serializer)!=null?r:Qa[F],{pause:p,resume:m}=Ka(b,()=>O(b.value),{flush:i,deep:o,eventFilter:g});u&&l&&cr(()=>{n instanceof Storage?Ft(u,"storage",D):Ft(u,ii,C),w&&D()}),w||D();function E(_,L){if(u){const T={key:e,oldValue:_,newValue:L,storageArea:n};u.dispatchEvent(n instanceof Storage?new StorageEvent("storage",T):new CustomEvent(ii,{detail:T}))}}function O(_){try{const L=n.getItem(e);if(_==null)E(L,null),n.removeItem(e);else{const T=$.write(_);L!==T&&(n.setItem(e,T),E(L,T))}}catch(L){y(L)}}function H(_){const L=_?_.newValue:n.getItem(e);if(L==null)return c&&U!=null&&n.setItem(e,$.write(U)),U;if(!_&&f){const T=$.read(L);return typeof f=="function"?f(T,U):F==="object"&&!Array.isArray(T)?{...U,...T}:T}else return typeof L!="string"?L:$.read(L)}function D(_){if(!(_&&_.storageArea!==n)){if(_&&_.key==null){b.value=U;return}if(!(_&&_.key!==e)){p();try{(_==null?void 0:_.newValue)!==$.write(b.value)&&(b.value=H(_))}catch(L){y(L)}finally{_?Wn(m):m()}}}}function C(_){D(_.detail)}return b}const Za="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function ef(e={}){const{selector:t="html",attribute:n="class",initialValue:s="auto",window:r=De,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:f,disableTransition:a=!0}=e,u={auto:"",light:"light",dark:"dark",...e.modes||{}},g=ar({window:r}),y=oe(()=>g.value?"dark":"light"),w=c||(o==null?$o(s):fr(o,s,i,{window:r,listenToStorageChanges:l})),b=oe(()=>w.value==="auto"?y.value:w.value),U=Vo("updateHTMLAttrs",(m,E,O)=>{const H=typeof m=="string"?r==null?void 0:r.document.querySelector(m):Bo(m);if(!H)return;const D=new Set,C=new Set;let _=null;if(E==="class"){const T=O.split(/\s/g);Object.values(u).flatMap(B=>(B||"").split(/\s/g)).filter(Boolean).forEach(B=>{T.includes(B)?D.add(B):C.add(B)})}else _={key:E,value:O};if(D.size===0&&C.size===0&&_===null)return;let L;a&&(L=r.document.createElement("style"),L.appendChild(document.createTextNode(Za)),r.document.head.appendChild(L));for(const T of D)H.classList.add(T);for(const T of C)H.classList.remove(T);_&&H.setAttribute(_.key,_.value),a&&(r.getComputedStyle(L).opacity,document.head.removeChild(L))});function F(m){var E;U(t,n,(E=u[m])!=null?E:m)}function $(m){e.onChanged?e.onChanged(m,F):F(m)}Ne(b,$,{flush:"post",immediate:!0}),cr(()=>$(b.value));const p=oe({get(){return f?w.value:b.value},set(m){w.value=m}});try{return Object.assign(p,{store:w,system:y,state:b})}catch{return p}}function tf(e={}){const{valueDark:t="dark",valueLight:n="",window:s=De}=e,r=ef({...e,onChanged:(l,c)=>{var f;e.onChanged?(f=e.onChanged)==null||f.call(e,l==="dark",c,l):c(l)},modes:{dark:t,light:n}}),i=oe(()=>r.system?r.system.value:ar({window:s}).value?"dark":"light");return oe({get(){return r.value==="dark"},set(l){const c=l?"dark":"light";i.value===c?r.value="auto":r.value=c}})}function ps(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function su(e,t,n={}){const{window:s=De}=n;return fr(e,t,s==null?void 0:s.localStorage,n)}function Uo(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const gs=new WeakMap;function ru(e,t=!1){const n=le(t);let s=null,r="";Ne($o(e),l=>{const c=ps(We(l));if(c){const f=c;if(gs.get(f)||gs.set(f,f.style.overflow),f.style.overflow!=="hidden"&&(r=f.style.overflow),f.style.overflow==="hidden")return n.value=!0;if(n.value)return f.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=ps(We(e));!l||n.value||(ri&&(s=Ft(l,"touchmove",c=>{nf(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=ps(We(e));!l||!n.value||(ri&&(s==null||s()),l.style.overflow=r,gs.delete(l),n.value=!1)};return lr(o),oe({get(){return n.value},set(l){l?i():o()}})}function iu(e,t,n={}){const{window:s=De}=n;return fr(e,t,s==null?void 0:s.sessionStorage,n)}function ou(e={}){const{window:t=De,behavior:n="auto"}=e;if(!t)return{x:le(0),y:le(0)};const s=le(t.scrollX),r=le(t.scrollY),i=oe({get(){return s.value},set(l){scrollTo({left:l,behavior:n})}}),o=oe({get(){return r.value},set(l){scrollTo({top:l,behavior:n})}});return Ft(t,"scroll",()=>{s.value=t.scrollX,r.value=t.scrollY},{capture:!1,passive:!0}),{x:i,y:o}}function lu(e={}){const{window:t=De,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:i=!0,type:o="inner"}=e,l=le(n),c=le(s),f=()=>{t&&(o==="outer"?(l.value=t.outerWidth,c.value=t.outerHeight):i?(l.value=t.innerWidth,c.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight))};if(f(),cr(f),Ft("resize",f,{passive:!0}),r){const a=ko("(orientation: portrait)");Ne(a,()=>f())}return{width:l,height:c}}const ms={BASE_URL:"/coding-standards/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};var ys={};const Wo=/^(?:[a-z]+:|\/\/)/i,sf="vitepress-theme-appearance",rf=/#.*$/,of=/[?#].*$/,lf=/(?:(^|\/)index)?\.(?:md|html)$/,me=typeof document<"u",Ko={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function cf(e,t,n=!1){if(t===void 0)return!1;if(e=oi(`/${e}`),n)return new RegExp(t).test(e);if(oi(t)!==e)return!1;const s=t.match(rf);return s?(me?location.hash:"")===s[0]:!0}function oi(e){return decodeURI(e).replace(of,"").replace(lf,"$1")}function af(e){return Wo.test(e)}function ff(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!af(n)&&cf(t,`/${n}/`,!0))||"root"}function uf(e,t){var s,r,i,o,l,c,f;const n=ff(e,t);return Object.assign({},e,{localeIndex:n,lang:((s=e.locales[n])==null?void 0:s.lang)??e.lang,dir:((r=e.locales[n])==null?void 0:r.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:Go(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(f=e.locales[n])==null?void 0:f.themeConfig}})}function qo(e,t){const n=t.title||e.title,s=t.titleTemplate??e.titleTemplate;if(typeof s=="string"&&s.includes(":title"))return s.replace(/:title/g,n);const r=df(e.title,s);return n===r.slice(3)?n:`${n}${r}`}function df(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function hf(e,t){const[n,s]=t;if(n!=="meta")return!1;const r=Object.entries(s)[0];return r==null?!1:e.some(([i,o])=>i===n&&o[r[0]]===r[1])}function Go(e,t){return[...e.filter(n=>!hf(t,n)),...t]}const pf=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,gf=/^[a-z]:/i;function li(e){const t=gf.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(pf,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const vs=new Set;function mf(e){if(vs.size===0){const n=typeof process=="object"&&(ys==null?void 0:ys.VITE_EXTRA_EXTENSIONS)||(ms==null?void 0:ms.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(s=>vs.add(s))}const t=e.split(".").pop();return t==null||!vs.has(t.toLowerCase())}function cu(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const yf=Symbol(),mt=Qs(Da);function au(e){const t=oe(()=>uf(mt.value,e.data.relativePath)),n=t.value.appearance,s=n==="force-dark"?le(!0):n==="force-auto"?ar():n?tf({storageKey:sf,initialValue:()=>n==="dark"?"dark":"auto",...typeof n=="object"?n:{}}):le(!1),r=le(me?location.hash:"");return me&&window.addEventListener("hashchange",()=>{r.value=location.hash}),Ne(()=>e.data,()=>{r.value=me?location.hash:""}),{site:t,theme:oe(()=>t.value.themeConfig),page:oe(()=>e.data),frontmatter:oe(()=>e.data.frontmatter),params:oe(()=>e.data.params),lang:oe(()=>t.value.lang),dir:oe(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:oe(()=>t.value.localeIndex||"root"),title:oe(()=>qo(t.value,e.data)),description:oe(()=>e.data.description||t.value.description),isDark:s,hash:oe(()=>r.value)}}function vf(){const e=Ot(yf);if(!e)throw new Error("vitepress data not properly injected in app");return e}function bf(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function ci(e){return Wo.test(e)||!e.startsWith("/")?e:bf(mt.value.base,e)}function _f(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),me){const n="/coding-standards/";t=li(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let s=__VP_HASH_MAP__[t.toLowerCase()];if(s||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",s=__VP_HASH_MAP__[t.toLowerCase()]),!s)return null;t=`${n}assets/${t}.${s}.js`}else t=`./${li(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let An=[];function fu(e){An.push(e),qn(()=>{An=An.filter(t=>t!==e)})}function wf(){let e=mt.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=ai(e,n);else if(Array.isArray(e))for(const s of e){const r=ai(s,n);if(r){t=r;break}}return t}function ai(e,t){const n=document.querySelector(e);if(!n)return 0;const s=n.getBoundingClientRect().bottom;return s<0?0:s+t}const Ef=Symbol(),Yo="http://a.com",Tf=()=>({path:"/",component:null,data:Ko});function uu(e,t){const n=Vn(Tf()),s={route:n,go:r};async function r(l=me?location.href:"/"){var c,f;l=bs(l),await((c=s.onBeforeRouteChange)==null?void 0:c.call(s,l))!==!1&&(me&&l!==bs(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((f=s.onAfterRouteChanged)==null?void 0:f.call(s,l)))}let i=null;async function o(l,c=0,f=!1){var g,y;if(await((g=s.onBeforePageLoad)==null?void 0:g.call(s,l))===!1)return;const a=new URL(l,Yo),u=i=a.pathname;try{let w=await e(u);if(!w)throw new Error(`Page not found: ${u}`);if(i===u){i=null;const{default:b,__pageData:U}=w;if(!b)throw new Error(`Invalid route component: ${b}`);await((y=s.onAfterPageLoad)==null?void 0:y.call(s,l)),n.path=me?u:ci(u),n.component=Tn(b),n.data=Tn(U),me&&Wn(()=>{let F=mt.value.base+U.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!mt.value.cleanUrls&&!F.endsWith("/")&&(F+=".html"),F!==a.pathname&&(a.pathname=F,l=F+a.search+a.hash,history.replaceState({},"",l)),a.hash&&!c){let $=null;try{$=document.getElementById(decodeURIComponent(a.hash).slice(1))}catch(p){console.warn(p)}if($){fi($,a.hash);return}}window.scrollTo(0,c)})}}catch(w){if(!/fetch|Page not found/.test(w.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(w),!f)try{const b=await fetch(mt.value.base+"hashmap.json");window.__VP_HASH_MAP__=await b.json(),await o(l,c,!0);return}catch{}if(i===u){i=null,n.path=me?u:ci(u),n.component=t?Tn(t):null;const b=me?u.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...Ko,relativePath:b}}}}return me&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.defaultPrevented||!(l.target instanceof Element)||l.target.closest("button")||l.button!==0||l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)return;const c=l.target.closest("a");if(!c||c.closest(".vp-raw")||c.hasAttribute("download")||c.hasAttribute("target"))return;const f=c.getAttribute("href")??(c instanceof SVGAElement?c.getAttribute("xlink:href"):null);if(f==null)return;const{href:a,origin:u,pathname:g,hash:y,search:w}=new URL(f,c.baseURI),b=new URL(location.href);u===b.origin&&mf(g)&&(l.preventDefault(),g===b.pathname&&w===b.search?(y!==b.hash&&(history.pushState({},"",a),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:b.href,newURL:a}))),y?fi(c,y,c.classList.contains("header-anchor")):window.scrollTo(0,0)):r(a))},{capture:!0}),window.addEventListener("popstate",async l=>{var c;l.state!==null&&(await o(bs(location.href),l.state&&l.state.scrollPosition||0),(c=s.onAfterRouteChanged)==null||c.call(s,location.href))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),s}function xf(){const e=Ot(Ef);if(!e)throw new Error("useRouter() is called without provider.");return e}function Xo(){return xf().route}function fi(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(r){console.warn(r)}if(s){let r=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(s).paddingTop,10),o=window.scrollY+s.getBoundingClientRect().top-wf()+i;requestAnimationFrame(r)}}function bs(e){const t=new URL(e,Yo);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),mt.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const bn=()=>An.forEach(e=>e()),du=er({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=Xo(),{frontmatter:n,site:s}=vf();return Ne(n,bn,{deep:!0,flush:"post"}),()=>$s(e.as,s.value.contentProps??{style:{position:"relative"}},[t.component?$s(t.component,{onVnodeMounted:bn,onVnodeUpdated:bn,onVnodeUnmounted:bn}):"404 Page Not Found"])}}),hu=er({setup(e,{slots:t}){const n=le(!1);return Ht(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function pu(){me&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const s=(n=t.parentElement)==null?void 0:n.parentElement;if(!s)return;const r=Array.from(s.querySelectorAll("input")).indexOf(t);if(r<0)return;const i=s.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(f=>f.classList.contains("active"));if(!o)return;const l=i.children[r];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=s==null?void 0:s.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function gu(){if(me){const e=new WeakMap;window.addEventListener("click",t=>{var s;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const r=n.parentElement,i=(s=n.nextElementSibling)==null?void 0:s.nextElementSibling;if(!r||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(r.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(a=>a.remove());let f=c.textContent||"";o&&(f=f.replace(/^ *(\$|>) /gm,"").trim()),Sf(f).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const a=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,a)})}})}}async function Sf(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function mu(e,t){let n=!0,s=[];const r=i=>{if(n){n=!1,i.forEach(l=>{const c=_s(l);for(const f of document.head.children)if(f.isEqualNode(c)){s.push(f);return}});return}const o=i.map(_s);s.forEach((l,c)=>{const f=o.findIndex(a=>a==null?void 0:a.isEqualNode(l??null));f!==-1?delete o[f]:(l==null||l.remove(),delete s[c])}),o.forEach(l=>l&&document.head.appendChild(l)),s=[...s,...o].filter(Boolean)};ir(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],f=qo(o,i);f!==document.title&&(document.title=f);const a=l||o.description;let u=document.querySelector("meta[name=description]");u?u.getAttribute("content")!==a&&u.setAttribute("content",a):_s(["meta",{name:"description",content:a}]),r(Go(o.head,Af(c)))})}function _s([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),e==="script"&&t.async==null&&(s.async=!1),s}function Cf(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function Af(e){return e.filter(t=>!Cf(t))}const ws=new Set,Jo=()=>document.createElement("link"),Rf=e=>{const t=Jo();t.rel="prefetch",t.href=e,document.head.appendChild(t)},Of=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let _n;const Mf=me&&(_n=Jo())&&_n.relList&&_n.relList.supports&&_n.relList.supports("prefetch")?Rf:Of;function yu(){if(!me||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!ws.has(c)){ws.add(c);const f=_f(c);f&&Mf(f)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):ws.add(l))})})};Ht(s);const r=Xo();Ne(()=>r.path,s),qn(()=>{n&&n.disconnect()})}export{Qi as $,wf as A,Ff as B,Hf as C,Qs as D,fu as E,Te as F,ce as G,Nf as H,Wo as I,Xo as J,Xc as K,Ot as L,lu as M,Ws as N,nu as O,Wn as P,ou as Q,me as R,Un as S,Kf as T,If as U,Qf as V,ru as W,Ec as X,$f as Y,Yf as Z,zf as _,Ao as a,Gf as a0,jf as a1,Tn as a2,Uf as a3,kf as a4,rt as a5,$s as a6,Q as a7,We as a8,Bo as a9,gu as aA,pu as aB,Zf as aa,lr as ab,tu as ac,iu as ad,su as ae,eu as af,xf as ag,Ft as ah,Pf as ai,qf as aj,fe as ak,Lf as al,Xf as am,yf as an,_f as ao,cu as ap,z as aq,mu as ar,Ef as as,au as at,du as au,hu as av,mt as aw,Jf as ax,uu as ay,yu as az,Ns as b,Vf as c,er as d,Wf as e,mf as f,ci as g,oe as h,af as i,Co as j,Hi as k,cf as l,ko as m,Ks as n,Fn as o,le as p,Ne as q,Df as r,ir as s,fl as t,vf as u,Ht as v,Gl as w,qn as x,Bf as y,cc as z}; diff --git a/assets/chunks/ganttDiagram-NTVNEXSI.C7LBLS21.js b/assets/chunks/ganttDiagram-NTVNEXSI.C7LBLS21.js new file mode 100644 index 00000000..d0955cad --- /dev/null +++ b/assets/chunks/ganttDiagram-NTVNEXSI.C7LBLS21.js @@ -0,0 +1,257 @@ +import{aU as ir,aV as sr,aW as or,aX as cr,aY as Wr,aZ as ct,a_ as Or,_ as f,a$ as ae,d as Ye,s as Hr,g as Nr,q as Vr,r as Pr,c as zr,b as Rr,x as Br,m as Zr,l as tt,j as je,k as qr,e as Xr,v as Gr}from"../app.CXGmg8Jv.js";import{b as Qr,t as Vt,c as jr,a as Jr,l as $r}from"./linear.BcMShDgX.js";import{i as Kr}from"./init.Gi6I4Gst.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";function en(e,t){let r;if(t===void 0)for(const n of e)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let a of e)(a=t(a,++n,e))!=null&&(r=a)&&(r=a)}return r}function tn(e,t){let r;if(t===void 0)for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of e)(a=t(a,++n,e))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function rn(e){return e}var $e=1,lt=2,bt=3,Je=4,Pt=1e-6;function nn(e){return"translate("+e+",0)"}function an(e){return"translate(0,"+e+")"}function sn(e){return t=>+e(t)}function on(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function cn(){return!this.__axis}function lr(e,t){var r=[],n=null,a=null,i=6,s=6,g=3,k=typeof window<"u"&&window.devicePixelRatio>1?0:.5,v=e===$e||e===Je?-1:1,y=e===Je||e===lt?"x":"y",S=e===$e||e===bt?nn:an;function C(p){var N=n??(t.ticks?t.ticks.apply(t,r):t.domain()),M=a??(t.tickFormat?t.tickFormat.apply(t,r):rn),B=Math.max(i,0)+g,Q=t.range(),K=+Q[0]+k,R=+Q[Q.length-1]+k,Z=(t.bandwidth?on:sn)(t.copy(),k),j=p.selection?p.selection():p,w=j.selectAll(".domain").data([null]),L=j.selectAll(".tick").data(N,t).order(),D=L.exit(),F=L.enter().append("g").attr("class","tick"),_=L.select("line"),Y=L.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),L=L.merge(F),_=_.merge(F.append("line").attr("stroke","currentColor").attr(y+"2",v*i)),Y=Y.merge(F.append("text").attr("fill","currentColor").attr(y,v*B).attr("dy",e===$e?"0em":e===bt?"0.71em":"0.32em")),p!==j&&(w=w.transition(p),L=L.transition(p),_=_.transition(p),Y=Y.transition(p),D=D.transition(p).attr("opacity",Pt).attr("transform",function(x){return isFinite(x=Z(x))?S(x+k):this.getAttribute("transform")}),F.attr("opacity",Pt).attr("transform",function(x){var A=this.parentNode.__axis;return S((A&&isFinite(A=A(x))?A:Z(x))+k)})),D.remove(),w.attr("d",e===Je||e===lt?s?"M"+v*s+","+K+"H"+k+"V"+R+"H"+v*s:"M"+k+","+K+"V"+R:s?"M"+K+","+v*s+"V"+k+"H"+R+"V"+v*s:"M"+K+","+k+"H"+R),L.attr("opacity",1).attr("transform",function(x){return S(Z(x)+k)}),_.attr(y+"2",v*i),Y.attr(y,v*B).text(M),j.filter(cn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===lt?"start":e===Je?"end":"middle"),j.each(function(){this.__axis=Z})}return C.scale=function(p){return arguments.length?(t=p,C):t},C.ticks=function(){return r=Array.from(arguments),C},C.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),C):r.slice()},C.tickValues=function(p){return arguments.length?(n=p==null?null:Array.from(p),C):n&&n.slice()},C.tickFormat=function(p){return arguments.length?(a=p,C):a},C.tickSize=function(p){return arguments.length?(i=s=+p,C):i},C.tickSizeInner=function(p){return arguments.length?(i=+p,C):i},C.tickSizeOuter=function(p){return arguments.length?(s=+p,C):s},C.tickPadding=function(p){return arguments.length?(g=+p,C):g},C.offset=function(p){return arguments.length?(k=+p,C):k},C}function ln(e){return lr($e,e)}function un(e){return lr(bt,e)}const fn=Math.PI/180,hn=180/Math.PI,rt=18,ur=.96422,fr=1,hr=.82521,dr=4/29,Fe=6/29,mr=3*Fe*Fe,dn=Fe*Fe*Fe;function gr(e){if(e instanceof fe)return new fe(e.l,e.a,e.b,e.opacity);if(e instanceof ge)return yr(e);e instanceof or||(e=Wr(e));var t=dt(e.r),r=dt(e.g),n=dt(e.b),a=ut((.2225045*t+.7168786*r+.0606169*n)/fr),i,s;return t===r&&r===n?i=s=a:(i=ut((.4360747*t+.3850649*r+.1430804*n)/ur),s=ut((.0139322*t+.0971045*r+.7141733*n)/hr)),new fe(116*a-16,500*(i-a),200*(a-s),e.opacity)}function mn(e,t,r,n){return arguments.length===1?gr(e):new fe(e,t,r,n??1)}function fe(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}ir(fe,mn,sr(cr,{brighter(e){return new fe(this.l+rt*(e??1),this.a,this.b,this.opacity)},darker(e){return new fe(this.l-rt*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=ur*ft(t),e=fr*ft(e),r=hr*ft(r),new or(ht(3.1338561*t-1.6168667*e-.4906146*r),ht(-.9787684*t+1.9161415*e+.033454*r),ht(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function ut(e){return e>dn?Math.pow(e,1/3):e/mr+dr}function ft(e){return e>Fe?e*e*e:mr*(e-dr)}function ht(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function dt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function gn(e){if(e instanceof ge)return new ge(e.h,e.c,e.l,e.opacity);if(e instanceof fe||(e=gr(e)),e.a===0&&e.b===0)return new ge(NaN,0(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),g=a.ceil(i);return i-s(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,g)=>{const k=[];if(i=a.ceil(i),g=g==null?1:Math.floor(g),!(i0))return k;let v;do k.push(v=new Date(+i)),t(i,g),e(i);while(v$(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,g)=>{if(s>=s)if(g<0)for(;++g<=0;)for(;t(s,-1),!i(s););else for(;--g>=0;)for(;t(s,1),!i(s););}),r&&(a.count=(i,s)=>(mt.setTime(+i),gt.setTime(+s),e(mt),e(gt),Math.floor(r(mt,gt))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?s=>n(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Ee=$(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ee.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?$(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Ee);Ee.range;const ye=1e3,se=ye*60,ke=se*60,ve=ke*24,St=ve*7,zt=ve*30,yt=ve*365,Te=$(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ye)},(e,t)=>(t-e)/ye,e=>e.getUTCSeconds());Te.range;const Ve=$(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ye)},(e,t)=>{e.setTime(+e+t*se)},(e,t)=>(t-e)/se,e=>e.getMinutes());Ve.range;const pn=$(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*se)},(e,t)=>(t-e)/se,e=>e.getUTCMinutes());pn.range;const Pe=$(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ye-e.getMinutes()*se)},(e,t)=>{e.setTime(+e+t*ke)},(e,t)=>(t-e)/ke,e=>e.getHours());Pe.range;const Tn=$(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ke)},(e,t)=>(t-e)/ke,e=>e.getUTCHours());Tn.range;const xe=$(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*se)/ve,e=>e.getDate()-1);xe.range;const _t=$(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ve,e=>e.getUTCDate()-1);_t.range;const bn=$(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ve,e=>Math.floor(e/ve));bn.range;function Ce(e){return $(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*se)/St)}const Be=Ce(0),ze=Ce(1),kr=Ce(2),vr=Ce(3),we=Ce(4),pr=Ce(5),Tr=Ce(6);Be.range;ze.range;kr.range;vr.range;we.range;pr.range;Tr.range;function Me(e){return $(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/St)}const br=Me(0),nt=Me(1),xn=Me(2),wn=Me(3),Ie=Me(4),Dn=Me(5),Cn=Me(6);br.range;nt.range;xn.range;wn.range;Ie.range;Dn.range;Cn.range;const Re=$(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Re.range;const Mn=$(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Mn.range;const pe=$(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());pe.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:$(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});pe.range;const De=$(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());De.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:$(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});De.range;function Sn(e,t,r,n,a,i){const s=[[Te,1,ye],[Te,5,5*ye],[Te,15,15*ye],[Te,30,30*ye],[i,1,se],[i,5,5*se],[i,15,15*se],[i,30,30*se],[a,1,ke],[a,3,3*ke],[a,6,6*ke],[a,12,12*ke],[n,1,ve],[n,2,2*ve],[r,1,St],[t,1,zt],[t,3,3*zt],[e,1,yt]];function g(v,y,S){const C=yB).right(s,C);if(p===s.length)return e.every(Vt(v/yt,y/yt,S));if(p===0)return Ee.every(Math.max(Vt(v,y,S),1));const[N,M]=s[C/s[p-1][2]53)return null;"w"in l||(l.w=1),"Z"in l?(U=vt(Le(l.y,0,1)),G=U.getUTCDay(),U=G>4||G===0?nt.ceil(U):nt(U),U=_t.offset(U,(l.V-1)*7),l.y=U.getUTCFullYear(),l.m=U.getUTCMonth(),l.d=U.getUTCDate()+(l.w+6)%7):(U=kt(Le(l.y,0,1)),G=U.getDay(),U=G>4||G===0?ze.ceil(U):ze(U),U=xe.offset(U,(l.V-1)*7),l.y=U.getFullYear(),l.m=U.getMonth(),l.d=U.getDate()+(l.w+6)%7)}else("W"in l||"U"in l)&&("w"in l||(l.w="u"in l?l.u%7:"W"in l?1:0),G="Z"in l?vt(Le(l.y,0,1)).getUTCDay():kt(Le(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(G+5)%7:l.w+l.U*7-(G+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,vt(l)):kt(l)}}function D(T,I,W,l){for(var re=0,U=I.length,G=W.length,z,ce;re=G)return-1;if(z=I.charCodeAt(re++),z===37){if(z=I.charAt(re++),ce=j[z in Rt?I.charAt(re++):z],!ce||(l=ce(T,W,l))<0)return-1}else if(z!=W.charCodeAt(l++))return-1}return l}function F(T,I,W){var l=v.exec(I.slice(W));return l?(T.p=y.get(l[0].toLowerCase()),W+l[0].length):-1}function _(T,I,W){var l=p.exec(I.slice(W));return l?(T.w=N.get(l[0].toLowerCase()),W+l[0].length):-1}function Y(T,I,W){var l=S.exec(I.slice(W));return l?(T.w=C.get(l[0].toLowerCase()),W+l[0].length):-1}function x(T,I,W){var l=Q.exec(I.slice(W));return l?(T.m=K.get(l[0].toLowerCase()),W+l[0].length):-1}function A(T,I,W){var l=M.exec(I.slice(W));return l?(T.m=B.get(l[0].toLowerCase()),W+l[0].length):-1}function u(T,I,W){return D(T,t,I,W)}function d(T,I,W){return D(T,r,I,W)}function b(T,I,W){return D(T,n,I,W)}function m(T){return s[T.getDay()]}function E(T){return i[T.getDay()]}function c(T){return k[T.getMonth()]}function h(T){return g[T.getMonth()]}function o(T){return a[+(T.getHours()>=12)]}function P(T){return 1+~~(T.getMonth()/3)}function O(T){return s[T.getUTCDay()]}function V(T){return i[T.getUTCDay()]}function ee(T){return k[T.getUTCMonth()]}function q(T){return g[T.getUTCMonth()]}function X(T){return a[+(T.getUTCHours()>=12)]}function oe(T){return 1+~~(T.getUTCMonth()/3)}return{format:function(T){var I=w(T+="",R);return I.toString=function(){return T},I},parse:function(T){var I=L(T+="",!1);return I.toString=function(){return T},I},utcFormat:function(T){var I=w(T+="",Z);return I.toString=function(){return T},I},utcParse:function(T){var I=L(T+="",!0);return I.toString=function(){return T},I}}}var Rt={"-":"",_:" ",0:"0"},te=/^\s*\d+/,Un=/^%/,En=/[\\^$*+?|[\]().{}]/g;function H(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i[t.toLowerCase(),r]))}function An(e,t,r){var n=te.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function Ln(e,t,r){var n=te.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function Wn(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function On(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function Hn(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Bt(e,t,r){var n=te.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Zt(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function Nn(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function Vn(e,t,r){var n=te.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function Pn(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function qt(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function zn(e,t,r){var n=te.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Xt(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function Rn(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function Bn(e,t,r){var n=te.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function Zn(e,t,r){var n=te.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function qn(e,t,r){var n=te.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function Xn(e,t,r){var n=Un.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function Gn(e,t,r){var n=te.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function Qn(e,t,r){var n=te.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Gt(e,t){return H(e.getDate(),t,2)}function jn(e,t){return H(e.getHours(),t,2)}function Jn(e,t){return H(e.getHours()%12||12,t,2)}function $n(e,t){return H(1+xe.count(pe(e),e),t,3)}function xr(e,t){return H(e.getMilliseconds(),t,3)}function Kn(e,t){return xr(e,t)+"000"}function ea(e,t){return H(e.getMonth()+1,t,2)}function ta(e,t){return H(e.getMinutes(),t,2)}function ra(e,t){return H(e.getSeconds(),t,2)}function na(e){var t=e.getDay();return t===0?7:t}function aa(e,t){return H(Be.count(pe(e)-1,e),t,2)}function wr(e){var t=e.getDay();return t>=4||t===0?we(e):we.ceil(e)}function ia(e,t){return e=wr(e),H(we.count(pe(e),e)+(pe(e).getDay()===4),t,2)}function sa(e){return e.getDay()}function oa(e,t){return H(ze.count(pe(e)-1,e),t,2)}function ca(e,t){return H(e.getFullYear()%100,t,2)}function la(e,t){return e=wr(e),H(e.getFullYear()%100,t,2)}function ua(e,t){return H(e.getFullYear()%1e4,t,4)}function fa(e,t){var r=e.getDay();return e=r>=4||r===0?we(e):we.ceil(e),H(e.getFullYear()%1e4,t,4)}function ha(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+H(t/60|0,"0",2)+H(t%60,"0",2)}function Qt(e,t){return H(e.getUTCDate(),t,2)}function da(e,t){return H(e.getUTCHours(),t,2)}function ma(e,t){return H(e.getUTCHours()%12||12,t,2)}function ga(e,t){return H(1+_t.count(De(e),e),t,3)}function Dr(e,t){return H(e.getUTCMilliseconds(),t,3)}function ya(e,t){return Dr(e,t)+"000"}function ka(e,t){return H(e.getUTCMonth()+1,t,2)}function va(e,t){return H(e.getUTCMinutes(),t,2)}function pa(e,t){return H(e.getUTCSeconds(),t,2)}function Ta(e){var t=e.getUTCDay();return t===0?7:t}function ba(e,t){return H(br.count(De(e)-1,e),t,2)}function Cr(e){var t=e.getUTCDay();return t>=4||t===0?Ie(e):Ie.ceil(e)}function xa(e,t){return e=Cr(e),H(Ie.count(De(e),e)+(De(e).getUTCDay()===4),t,2)}function wa(e){return e.getUTCDay()}function Da(e,t){return H(nt.count(De(e)-1,e),t,2)}function Ca(e,t){return H(e.getUTCFullYear()%100,t,2)}function Ma(e,t){return e=Cr(e),H(e.getUTCFullYear()%100,t,2)}function Sa(e,t){return H(e.getUTCFullYear()%1e4,t,4)}function _a(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ie(e):Ie.ceil(e),H(e.getUTCFullYear()%1e4,t,4)}function Ya(){return"+0000"}function jt(){return"%"}function Jt(e){return+e}function $t(e){return Math.floor(+e/1e3)}var _e,at;Fa({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Fa(e){return _e=Fn(e),at=_e.format,_e.parse,_e.utcFormat,_e.utcParse,_e}function Ua(e){return new Date(e)}function Ea(e){return e instanceof Date?+e:+new Date(+e)}function Mr(e,t,r,n,a,i,s,g,k,v){var y=jr(),S=y.invert,C=y.domain,p=v(".%L"),N=v(":%S"),M=v("%I:%M"),B=v("%I %p"),Q=v("%a %d"),K=v("%b %d"),R=v("%B"),Z=v("%Y");function j(w){return(k(w)4&&(S+=7),y.add(S,pt)},a=function(k){return k.add(4-k.isoWeekday(),pt)},i=t.prototype;i.isoWeekYear=function(){var g=a(this);return g.year()},i.isoWeek=function(g){if(!this.$utils().u(g))return this.add((g-this.isoWeek())*7,pt);var k=a(this),v=n(this.isoWeekYear(),this.$u);return k.diff(v,Aa)+1},i.isoWeekday=function(g){return this.$utils().u(g)?this.day()||7:this.day(this.day()%7?g:g-7)};var s=i.startOf;i.startOf=function(g,k){var v=this.$utils(),y=v.u(k)?!0:k,S=v.p(g);return S===Oa?y?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(g,k)}};var Na=function(t){return t.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(r,n,a){return n||a.slice(1)})},Va={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Pa=function(t,r){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(n,a,i){var s=i&&i.toUpperCase();return a||r[i]||Va[i]||Na(r[s])})},za=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,Kt=/\d/,He=/\d\d/,Ra=/\d{3}/,Ba=/\d{4}/,le=/\d\d?/,Za=/[+-]?\d+/,qa=/[+-]\d\d:?(\d\d)?|Z/,Ne=/\d*[^-_:/,()\s\d]+/,be={},Sr=function(t){return t=+t,t+(t>68?1900:2e3)};function Xa(e){if(!e||e==="Z")return 0;var t=e.match(/([+-]|\d\d)/g),r=+(t[1]*60)+(+t[2]||0);return r===0?0:t[0]==="+"?-r:r}var ne=function(t){return function(r){this[t]=+r}},er=[qa,function(e){var t=this.zone||(this.zone={});t.offset=Xa(e)}],Tt=function(t){var r=be[t];return r&&(r.indexOf?r:r.s.concat(r.f))},tr=function(t,r){var n,a=be,i=a.meridiem;if(!i)n=t===(r?"pm":"PM");else for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,r))>-1){n=s>12;break}return n},Ga={A:[Ne,function(e){this.afternoon=tr(e,!1)}],a:[Ne,function(e){this.afternoon=tr(e,!0)}],Q:[Kt,function(e){this.month=(e-1)*3+1}],S:[Kt,function(e){this.milliseconds=+e*100}],SS:[He,function(e){this.milliseconds=+e*10}],SSS:[Ra,function(e){this.milliseconds=+e}],s:[le,ne("seconds")],ss:[le,ne("seconds")],m:[le,ne("minutes")],mm:[le,ne("minutes")],H:[le,ne("hours")],h:[le,ne("hours")],HH:[le,ne("hours")],hh:[le,ne("hours")],D:[le,ne("day")],DD:[He,ne("day")],Do:[Ne,function(e){var t=be,r=t.ordinal,n=e.match(/\d+/);if(this.day=n[0],!!r)for(var a=1;a<=31;a+=1)r(a).replace(/\[|\]/g,"")===e&&(this.day=a)}],w:[le,ne("week")],ww:[He,ne("week")],M:[le,ne("month")],MM:[He,ne("month")],MMM:[Ne,function(e){var t=Tt("months"),r=Tt("monthsShort"),n=(r||t.map(function(a){return a.slice(0,3)})).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[Ne,function(e){var t=Tt("months"),r=t.indexOf(e)+1;if(r<1)throw new Error;this.month=r%12||r}],Y:[Za,ne("year")],YY:[He,function(e){this.year=Sr(e)}],YYYY:[Ba,ne("year")],Z:er,ZZ:er};function Qa(e){var t=e.afternoon;if(t!==void 0){var r=e.hours;t?r<12&&(e.hours+=12):r===12&&(e.hours=0),delete e.afternoon}}function ja(e){e=Pa(e,be&&be.formats);for(var t=e.match(za),r=t.length,n=0;n-1)return new Date((r==="X"?1e3:1)*t);var i=ja(r),s=i(t),g=s.year,k=s.month,v=s.day,y=s.hours,S=s.minutes,C=s.seconds,p=s.milliseconds,N=s.zone,M=s.week,B=new Date,Q=v||(!g&&!k?B.getDate():1),K=g||B.getFullYear(),R=0;g&&!k||(R=k>0?k-1:B.getMonth());var Z=y||0,j=S||0,w=C||0,L=p||0;if(N)return new Date(Date.UTC(K,R,Q,Z,j,w,L+N.offset*60*1e3));if(n)return new Date(Date.UTC(K,R,Q,Z,j,w,L));var D;return D=new Date(K,R,Q,Z,j,w,L),M&&(D=a(D).week(M).toDate()),D}catch{return new Date("")}};const $a=function(e,t,r){r.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(Sr=e.parseTwoDigitYear);var n=t.prototype,a=n.parse;n.parse=function(i){var s=i.date,g=i.utc,k=i.args;this.$u=g;var v=k[1];if(typeof v=="string"){var y=k[2]===!0,S=k[3]===!0,C=y||S,p=k[2];S&&(p=k[2]),be=this.$locale(),!y&&p&&(be=r.Ls[p]),this.$d=Ja(s,v,g,r),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),C&&s!=this.format(v)&&(this.$d=new Date("")),be={}}else if(v instanceof Array)for(var N=v.length,M=1;M<=N;M+=1){k[1]=v[M-1];var B=r.apply(this,k);if(B.isValid()){this.$d=B.$d,this.$L=B.$L,this.init();break}M===N&&(this.$d=new Date(""))}else a.call(this,i)}},Ka=function(e,t){var r=t.prototype,n=r.format;r.format=function(a){var i=this,s=this.$locale();if(!this.isValid())return n.bind(this)(a);var g=this.$utils(),k=a||Wa,v=k.replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(y){switch(y){case"Q":return Math.ceil((i.$M+1)/3);case"Do":return s.ordinal(i.$D);case"gggg":return i.weekYear();case"GGGG":return i.isoWeekYear();case"wo":return s.ordinal(i.week(),"W");case"w":case"ww":return g.s(i.week(),y==="w"?1:2,"0");case"W":case"WW":return g.s(i.isoWeek(),y==="W"?1:2,"0");case"k":case"kk":return g.s(String(i.$H===0?24:i.$H),y==="k"?1:2,"0");case"X":return Math.floor(i.$d.getTime()/1e3);case"x":return i.$d.getTime();case"z":return"["+i.offsetName()+"]";case"zzz":return"["+i.offsetName("long")+"]";default:return y}});return n.bind(this)(v)}};var wt=function(){var e=f(function(A,u,d,b){for(d=d||{},b=A.length;b--;d[A[b]]=u);return d},"o"),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],a=[1,28],i=[1,29],s=[1,30],g=[1,31],k=[1,32],v=[1,33],y=[1,34],S=[1,9],C=[1,10],p=[1,11],N=[1,12],M=[1,13],B=[1,14],Q=[1,15],K=[1,16],R=[1,19],Z=[1,20],j=[1,21],w=[1,22],L=[1,23],D=[1,25],F=[1,35],_={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:f(function(u,d,b,m,E,c,h){var o=c.length-1;switch(E){case 1:return c[o-1];case 2:this.$=[];break;case 3:c[o-1].push(c[o]),this.$=c[o-1];break;case 4:case 5:this.$=c[o];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=c[o].substr(18);break;case 19:m.TopAxis(),this.$=c[o].substr(8);break;case 20:m.setAxisFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 21:m.setTickInterval(c[o].substr(13)),this.$=c[o].substr(13);break;case 22:m.setExcludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 23:m.setIncludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 24:m.setTodayMarker(c[o].substr(12)),this.$=c[o].substr(12);break;case 27:m.setDiagramTitle(c[o].substr(6)),this.$=c[o].substr(6);break;case 28:this.$=c[o].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=c[o].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(c[o].substr(8)),this.$=c[o].substr(8);break;case 33:m.addTask(c[o-1],c[o]),this.$="task";break;case 34:this.$=c[o-1],m.setClickEvent(c[o-1],c[o],null);break;case 35:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],c[o]);break;case 36:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],null),m.setLink(c[o-2],c[o]);break;case 37:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-2],c[o-1]),m.setLink(c[o-3],c[o]);break;case 38:this.$=c[o-2],m.setClickEvent(c[o-2],c[o],null),m.setLink(c[o-2],c[o-1]);break;case 39:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-1],c[o]),m.setLink(c[o-3],c[o-2]);break;case 40:this.$=c[o-1],m.setLink(c[o-1],c[o]);break;case 41:case 47:this.$=c[o-1]+" "+c[o];break;case 42:case 43:case 45:this.$=c[o-2]+" "+c[o-1]+" "+c[o];break;case 44:case 46:this.$=c[o-3]+" "+c[o-2]+" "+c[o-1]+" "+c[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:a,15:i,16:s,17:g,18:k,19:18,20:v,21:y,22:S,23:C,24:p,25:N,26:M,27:B,28:Q,29:K,30:R,31:Z,33:j,35:w,36:L,37:24,38:D,40:F},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:r,13:n,14:a,15:i,16:s,17:g,18:k,19:18,20:v,21:y,22:S,23:C,24:p,25:N,26:M,27:B,28:Q,29:K,30:R,31:Z,33:j,35:w,36:L,37:24,38:D,40:F},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:f(function(u,d){if(d.recoverable)this.trace(u);else{var b=new Error(u);throw b.hash=d,b}},"parseError"),parse:f(function(u){var d=this,b=[0],m=[],E=[null],c=[],h=this.table,o="",P=0,O=0,V=2,ee=1,q=c.slice.call(arguments,1),X=Object.create(this.lexer),oe={yy:{}};for(var T in this.yy)Object.prototype.hasOwnProperty.call(this.yy,T)&&(oe.yy[T]=this.yy[T]);X.setInput(u,oe.yy),oe.yy.lexer=X,oe.yy.parser=this,typeof X.yylloc>"u"&&(X.yylloc={});var I=X.yylloc;c.push(I);var W=X.options&&X.options.ranges;typeof oe.yy.parseError=="function"?this.parseError=oe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function l(ie){b.length=b.length-2*ie,E.length=E.length-ie,c.length=c.length-ie}f(l,"popStack");function re(){var ie;return ie=m.pop()||X.lex()||ee,typeof ie!="number"&&(ie instanceof Array&&(m=ie,ie=m.pop()),ie=d.symbols_[ie]||ie),ie}f(re,"lex");for(var U,G,z,ce,he={},Ge,de,Nt,Qe;;){if(G=b[b.length-1],this.defaultActions[G]?z=this.defaultActions[G]:((U===null||typeof U>"u")&&(U=re()),z=h[G]&&h[G][U]),typeof z>"u"||!z.length||!z[0]){var ot="";Qe=[];for(Ge in h[G])this.terminals_[Ge]&&Ge>V&&Qe.push("'"+this.terminals_[Ge]+"'");X.showPosition?ot="Parse error on line "+(P+1)+`: +`+X.showPosition()+` +Expecting `+Qe.join(", ")+", got '"+(this.terminals_[U]||U)+"'":ot="Parse error on line "+(P+1)+": Unexpected "+(U==ee?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(ot,{text:X.match,token:this.terminals_[U]||U,line:X.yylineno,loc:I,expected:Qe})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+U);switch(z[0]){case 1:b.push(U),E.push(X.yytext),c.push(X.yylloc),b.push(z[1]),U=null,O=X.yyleng,o=X.yytext,P=X.yylineno,I=X.yylloc;break;case 2:if(de=this.productions_[z[1]][1],he.$=E[E.length-de],he._$={first_line:c[c.length-(de||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(de||1)].first_column,last_column:c[c.length-1].last_column},W&&(he._$.range=[c[c.length-(de||1)].range[0],c[c.length-1].range[1]]),ce=this.performAction.apply(he,[o,O,P,oe.yy,z[1],E,c].concat(q)),typeof ce<"u")return ce;de&&(b=b.slice(0,-1*de*2),E=E.slice(0,-1*de),c=c.slice(0,-1*de)),b.push(this.productions_[z[1]][0]),E.push(he.$),c.push(he._$),Nt=h[b[b.length-2]][b[b.length-1]],b.push(Nt);break;case 3:return!0}}return!0},"parse")},Y=function(){var A={EOF:1,parseError:f(function(d,b){if(this.yy.parser)this.yy.parser.parseError(d,b);else throw new Error(d)},"parseError"),setInput:f(function(u,d){return this.yy=d||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var d=u.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:f(function(u){var d=u.length,b=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),b.length-1&&(this.yylineno-=b.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(u){this.unput(this.match.slice(u))},"less"),pastInput:f(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var u=this.pastInput(),d=new Array(u.length+1).join("-");return u+this.upcomingInput()+` +`+d+"^"},"showPosition"),test_match:f(function(u,d){var b,m,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),m=u[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],b=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),b)return b;if(this._backtrack){for(var c in E)this[c]=E[c];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,d,b,m;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),c=0;cd[0].length)){if(d=b,m=c,this.options.backtrack_lexer){if(u=this.test_match(b,E[c]),u!==!1)return u;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(u=this.test_match(d,E[m]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var d=this.next();return d||this.lex()},"lex"),begin:f(function(d){this.conditionStack.push(d)},"begin"),popState:f(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:f(function(d){this.begin(d)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(d,b,m,E){switch(m){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return A}();_.lexer=Y;function x(){this.yy={}}return f(x,"Parser"),x.prototype=_,_.Parser=x,new x}();wt.parser=wt;var ei=wt;ae.extend(Ha);ae.extend($a);ae.extend(Ka);var rr={friday:5,saturday:6},ue="",Yt="",Ft=void 0,Ut="",Ze=[],qe=[],Et=new Map,It=[],it=[],Ae="",At="",_r=["active","done","crit","milestone"],Lt=[],Xe=!1,Wt=!1,Ot="sunday",st="saturday",Dt=0,ti=f(function(){It=[],it=[],Ae="",Lt=[],Ke=0,Mt=void 0,et=void 0,J=[],ue="",Yt="",At="",Ft=void 0,Ut="",Ze=[],qe=[],Xe=!1,Wt=!1,Dt=0,Et=new Map,Br(),Ot="sunday",st="saturday"},"clear"),ri=f(function(e){Yt=e},"setAxisFormat"),ni=f(function(){return Yt},"getAxisFormat"),ai=f(function(e){Ft=e},"setTickInterval"),ii=f(function(){return Ft},"getTickInterval"),si=f(function(e){Ut=e},"setTodayMarker"),oi=f(function(){return Ut},"getTodayMarker"),ci=f(function(e){ue=e},"setDateFormat"),li=f(function(){Xe=!0},"enableInclusiveEndDates"),ui=f(function(){return Xe},"endDatesAreInclusive"),fi=f(function(){Wt=!0},"enableTopAxis"),hi=f(function(){return Wt},"topAxisEnabled"),di=f(function(e){At=e},"setDisplayMode"),mi=f(function(){return At},"getDisplayMode"),gi=f(function(){return ue},"getDateFormat"),yi=f(function(e){Ze=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),ki=f(function(){return Ze},"getIncludes"),vi=f(function(e){qe=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),pi=f(function(){return qe},"getExcludes"),Ti=f(function(){return Et},"getLinks"),bi=f(function(e){Ae=e,It.push(e)},"addSection"),xi=f(function(){return It},"getSections"),wi=f(function(){let e=nr();const t=10;let r=0;for(;!e&&r[\d\w- ]+)/.exec(r);if(a!==null){let s=null;for(const k of a.groups.ids.split(" ")){let v=Se(k);v!==void 0&&(!s||v.endTime>s.endTime)&&(s=v)}if(s)return s.endTime;const g=new Date;return g.setHours(0,0,0,0),g}let i=ae(r,t.trim(),!0);if(i.isValid())return i.toDate();{tt.debug("Invalid date:"+r),tt.debug("With date format:"+t.trim());const s=new Date(r);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+r);return s}},"getStartDate"),Ur=f(function(e){const t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),Er=f(function(e,t,r,n=!1){r=r.trim();const i=/^until\s+(?[\d\w- ]+)/.exec(r);if(i!==null){let y=null;for(const C of i.groups.ids.split(" ")){let p=Se(C);p!==void 0&&(!y||p.startTime{window.open(r,"_self")}),Et.set(n,r))}),Ar(e,"clickable")},"setLink"),Ar=f(function(e,t){e.split(",").forEach(function(r){let n=Se(r);n!==void 0&&n.classes.push(t)})},"setClass"),Ii=f(function(e,t,r){if(Ye().securityLevel!=="loose"||t===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let i=0;i{Gr.runFunc(t,...n)})},"setClickFun"),Lr=f(function(e,t){Lt.push(function(){const r=document.querySelector(`[id="${e}"]`);r!==null&&r.addEventListener("click",function(){t()})},function(){const r=document.querySelector(`[id="${e}-text"]`);r!==null&&r.addEventListener("click",function(){t()})})},"pushFun"),Ai=f(function(e,t,r){e.split(",").forEach(function(n){Ii(n,t,r)}),Ar(e,"clickable")},"setClickEvent"),Li=f(function(e){Lt.forEach(function(t){t(e)})},"bindFunctions"),Wi={getConfig:f(()=>Ye().gantt,"getConfig"),clear:ti,setDateFormat:ci,getDateFormat:gi,enableInclusiveEndDates:li,endDatesAreInclusive:ui,enableTopAxis:fi,topAxisEnabled:hi,setAxisFormat:ri,getAxisFormat:ni,setTickInterval:ai,getTickInterval:ii,setTodayMarker:si,getTodayMarker:oi,setAccTitle:Hr,getAccTitle:Nr,setDiagramTitle:Vr,getDiagramTitle:Pr,setDisplayMode:di,getDisplayMode:mi,setAccDescription:zr,getAccDescription:Rr,addSection:bi,getSections:xi,getTasks:wi,addTask:Fi,findTaskById:Se,addTaskOrg:Ui,setIncludes:yi,getIncludes:ki,setExcludes:vi,getExcludes:pi,setClickEvent:Ai,setLink:Ei,getLinks:Ti,bindFunctions:Li,parseDuration:Ur,isInvalidDate:Yr,setWeekday:Di,getWeekday:Ci,setWeekend:Mi};function Ht(e,t,r){let n=!0;for(;n;)n=!1,r.forEach(function(a){const i="^\\s*"+a+"\\s*$",s=new RegExp(i);e[0].match(s)&&(t[a]=!0,e.shift(1),n=!0)})}f(Ht,"getTaskTags");var Oi=f(function(){tt.debug("Something is calling, setConf, remove the call")},"setConf"),ar={monday:ze,tuesday:kr,wednesday:vr,thursday:we,friday:pr,saturday:Tr,sunday:Be},Hi=f((e,t)=>{let r=[...e].map(()=>-1/0),n=[...e].sort((i,s)=>i.startTime-s.startTime||i.order-s.order),a=0;for(const i of n)for(let s=0;s=r[s]){r[s]=i.endTime,i.order=s+t,s>a&&(a=s);break}return a},"getMaxIntersections"),me,Ni=f(function(e,t,r,n){const a=Ye().gantt,i=Ye().securityLevel;let s;i==="sandbox"&&(s=je("#i"+t));const g=i==="sandbox"?je(s.nodes()[0].contentDocument.body):je("body"),k=i==="sandbox"?s.nodes()[0].contentDocument:document,v=k.getElementById(t);me=v.parentElement.offsetWidth,me===void 0&&(me=1200),a.useWidth!==void 0&&(me=a.useWidth);const y=n.db.getTasks();let S=[];for(const D of y)S.push(D.type);S=L(S);const C={};let p=2*a.topPadding;if(n.db.getDisplayMode()==="compact"||a.displayMode==="compact"){const D={};for(const _ of y)D[_.section]===void 0?D[_.section]=[_]:D[_.section].push(_);let F=0;for(const _ of Object.keys(D)){const Y=Hi(D[_],F)+1;F+=Y,p+=Y*(a.barHeight+a.barGap),C[_]=Y}}else{p+=y.length*(a.barHeight+a.barGap);for(const D of S)C[D]=y.filter(F=>F.type===D).length}v.setAttribute("viewBox","0 0 "+me+" "+p);const N=g.select(`[id="${t}"]`),M=Ia().domain([tn(y,function(D){return D.startTime}),en(y,function(D){return D.endTime})]).rangeRound([0,me-a.leftPadding-a.rightPadding]);function B(D,F){const _=D.startTime,Y=F.startTime;let x=0;return _>Y?x=1:_h.order))].map(h=>D.find(o=>o.order===h));N.append("g").selectAll("rect").data(b).enter().append("rect").attr("x",0).attr("y",function(h,o){return o=h.order,o*F+_-2}).attr("width",function(){return u-a.rightPadding/2}).attr("height",F).attr("class",function(h){for(const[o,P]of S.entries())if(h.type===P)return"section section"+o%a.numberSectionStyles;return"section section0"});const m=N.append("g").selectAll("rect").data(D).enter(),E=n.db.getLinks();if(m.append("rect").attr("id",function(h){return h.id}).attr("rx",3).attr("ry",3).attr("x",function(h){return h.milestone?M(h.startTime)+Y+.5*(M(h.endTime)-M(h.startTime))-.5*x:M(h.startTime)+Y}).attr("y",function(h,o){return o=h.order,o*F+_}).attr("width",function(h){return h.milestone?x:M(h.renderEndTime||h.endTime)-M(h.startTime)}).attr("height",x).attr("transform-origin",function(h,o){return o=h.order,(M(h.startTime)+Y+.5*(M(h.endTime)-M(h.startTime))).toString()+"px "+(o*F+_+.5*x).toString()+"px"}).attr("class",function(h){const o="task";let P="";h.classes.length>0&&(P=h.classes.join(" "));let O=0;for(const[ee,q]of S.entries())h.type===q&&(O=ee%a.numberSectionStyles);let V="";return h.active?h.crit?V+=" activeCrit":V=" active":h.done?h.crit?V=" doneCrit":V=" done":h.crit&&(V+=" crit"),V.length===0&&(V=" task"),h.milestone&&(V=" milestone "+V),V+=O,V+=" "+P,o+V}),m.append("text").attr("id",function(h){return h.id+"-text"}).text(function(h){return h.task}).attr("font-size",a.fontSize).attr("x",function(h){let o=M(h.startTime),P=M(h.renderEndTime||h.endTime);h.milestone&&(o+=.5*(M(h.endTime)-M(h.startTime))-.5*x),h.milestone&&(P=o+x);const O=this.getBBox().width;return O>P-o?P+O+1.5*a.leftPadding>u?o+Y-5:P+Y+5:(P-o)/2+o+Y}).attr("y",function(h,o){return o=h.order,o*F+a.barHeight/2+(a.fontSize/2-2)+_}).attr("text-height",x).attr("class",function(h){const o=M(h.startTime);let P=M(h.endTime);h.milestone&&(P=o+x);const O=this.getBBox().width;let V="";h.classes.length>0&&(V=h.classes.join(" "));let ee=0;for(const[X,oe]of S.entries())h.type===oe&&(ee=X%a.numberSectionStyles);let q="";return h.active&&(h.crit?q="activeCritText"+ee:q="activeText"+ee),h.done?h.crit?q=q+" doneCritText"+ee:q=q+" doneText"+ee:h.crit&&(q=q+" critText"+ee),h.milestone&&(q+=" milestoneText"),O>P-o?P+O+1.5*a.leftPadding>u?V+" taskTextOutsideLeft taskTextOutside"+ee+" "+q:V+" taskTextOutsideRight taskTextOutside"+ee+" "+q+" width-"+O:V+" taskText taskText"+ee+" "+q+" width-"+O}),Ye().securityLevel==="sandbox"){let h;h=je("#i"+t);const o=h.nodes()[0].contentDocument;m.filter(function(P){return E.has(P.id)}).each(function(P){var O=o.querySelector("#"+P.id),V=o.querySelector("#"+P.id+"-text");const ee=O.parentNode;var q=o.createElement("a");q.setAttribute("xlink:href",E.get(P.id)),q.setAttribute("target","_top"),ee.appendChild(q),q.appendChild(O),q.appendChild(V)})}}f(K,"drawRects");function R(D,F,_,Y,x,A,u,d){if(u.length===0&&d.length===0)return;let b,m;for(const{startTime:O,endTime:V}of A)(b===void 0||Om)&&(m=V);if(!b||!m)return;if(ae(m).diff(ae(b),"year")>5){tt.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const E=n.db.getDateFormat(),c=[];let h=null,o=ae(b);for(;o.valueOf()<=m;)n.db.isInvalidDate(o,E,u,d)?h?h.end=o:h={start:o,end:o}:h&&(c.push(h),h=null),o=o.add(1,"d");N.append("g").selectAll("rect").data(c).enter().append("rect").attr("id",function(O){return"exclude-"+O.start.format("YYYY-MM-DD")}).attr("x",function(O){return M(O.start)+_}).attr("y",a.gridLineStartPadding).attr("width",function(O){const V=O.end.add(1,"day");return M(V)-M(O.start)}).attr("height",x-F-a.gridLineStartPadding).attr("transform-origin",function(O,V){return(M(O.start)+_+.5*(M(O.end)-M(O.start))).toString()+"px "+(V*D+.5*x).toString()+"px"}).attr("class","exclude-range")}f(R,"drawExcludeDays");function Z(D,F,_,Y){let x=un(M).tickSize(-Y+F+a.gridLineStartPadding).tickFormat(at(n.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));const u=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||a.tickInterval);if(u!==null){const d=u[1],b=u[2],m=n.db.getWeekday()||a.weekday;switch(b){case"millisecond":x.ticks(Ee.every(d));break;case"second":x.ticks(Te.every(d));break;case"minute":x.ticks(Ve.every(d));break;case"hour":x.ticks(Pe.every(d));break;case"day":x.ticks(xe.every(d));break;case"week":x.ticks(ar[m].every(d));break;case"month":x.ticks(Re.every(d));break}}if(N.append("g").attr("class","grid").attr("transform","translate("+D+", "+(Y-50)+")").call(x).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||a.topAxis){let d=ln(M).tickSize(-Y+F+a.gridLineStartPadding).tickFormat(at(n.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));if(u!==null){const b=u[1],m=u[2],E=n.db.getWeekday()||a.weekday;switch(m){case"millisecond":d.ticks(Ee.every(b));break;case"second":d.ticks(Te.every(b));break;case"minute":d.ticks(Ve.every(b));break;case"hour":d.ticks(Pe.every(b));break;case"day":d.ticks(xe.every(b));break;case"week":d.ticks(ar[E].every(b));break;case"month":d.ticks(Re.every(b));break}}N.append("g").attr("class","grid").attr("transform","translate("+D+", "+F+")").call(d).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}f(Z,"makeGrid");function j(D,F){let _=0;const Y=Object.keys(C).map(x=>[x,C[x]]);N.append("g").selectAll("text").data(Y).enter().append(function(x){const A=x[0].split(Xr.lineBreakRegex),u=-(A.length-1)/2,d=k.createElementNS("http://www.w3.org/2000/svg","text");d.setAttribute("dy",u+"em");for(const[b,m]of A.entries()){const E=k.createElementNS("http://www.w3.org/2000/svg","tspan");E.setAttribute("alignment-baseline","central"),E.setAttribute("x","10"),b>0&&E.setAttribute("dy","1em"),E.textContent=m,d.appendChild(E)}return d}).attr("x",10).attr("y",function(x,A){if(A>0)for(let u=0;u` + .mermaid-main-font { + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .exclude-range { + fill: ${e.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${e.sectionBkgColor}; + } + + .section2 { + fill: ${e.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${e.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${e.titleColor}; + } + + .sectionTitle1 { + fill: ${e.titleColor}; + } + + .sectionTitle2 { + fill: ${e.titleColor}; + } + + .sectionTitle3 { + fill: ${e.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${e.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${e.fontFamily}; + fill: ${e.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${e.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .taskTextOutsideRight { + fill: ${e.taskTextDarkColor}; + text-anchor: start; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .taskTextOutsideLeft { + fill: ${e.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${e.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${e.taskBkgColor}; + stroke: ${e.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${e.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${e.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${e.activeTaskBkgColor}; + stroke: ${e.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${e.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${e.doneTaskBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${e.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${e.critBorderColor}; + fill: ${e.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.titleColor||e.textColor}; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } +`,"getStyles"),zi=Pi,Gi={parser:ei,db:Wi,renderer:Vi,styles:zi};export{Gi as diagram}; diff --git a/assets/chunks/gitGraph-YCYPL57B.CGDMLFt3.js b/assets/chunks/gitGraph-YCYPL57B.CGDMLFt3.js new file mode 100644 index 00000000..6556817f --- /dev/null +++ b/assets/chunks/gitGraph-YCYPL57B.CGDMLFt3.js @@ -0,0 +1,127 @@ +var Fl=Object.defineProperty;var Gl=(n,e,t)=>e in n?Fl(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Je=(n,e,t)=>Gl(n,typeof e!="symbol"?e+"":e,t);import{V as tn}from"./framework.BDUoXecB.js";import{by as Ul,bz as Bl,aP as so,bi as Vl,aT as Wl,aQ as Z,aq as jl,ar as Ji,b8 as Hl,bb as ao,bc as oo,bn as Qi,b9 as Kl,at as mt,au as D,aR as Zi,aL as zl}from"../app.CXGmg8Jv.js";import{k as Mt,j as Ti,g as Kt,S as ql,w as Yl,x as Xl,c as co,v as K,y as lo,l as Jl,z as Ql,A as Zl,B as eu,C as tu,a as uo,d as C,i as ze,r as oe,f as ve,D as q}from"./baseUniq.DbzeOdwK.js";import{j as Ri,m as S,d as nu,f as Ne,g as Dt,i as Ai,h as _,l as Ft,e as ru}from"./basePickBy.DBxcSOni.js";import{c as te}from"./clone.b2N_W2Ea.js";var iu=Object.prototype,su=iu.hasOwnProperty,Ae=Ul(function(n,e){if(Bl(e)||so(e)){Vl(e,Mt(e),n);return}for(var t in e)su.call(e,t)&&Wl(n,t,e[t])});function fo(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(i);++r=lu&&(s=Xl,a=!1,e=new ql(e));e:for(;++i-1:!!i&&lo(n,e,t)>-1}function es(n,e,t){var r=n==null?0:n.length;if(!r)return-1;var i=0;return lo(n,e,i)}var Tu="[object RegExp]";function Ru(n){return ao(n)&&oo(n)==Tu}var ts=Qi&&Qi.isRegExp,qe=ts?Kl(ts):Ru,Au="Expected a function";function vu(n){if(typeof n!="function")throw new TypeError(Au);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function Pe(n,e){if(n==null)return{};var t=Jl(Ql(n),function(r){return[r]});return e=Kt(e),nu(n,t,function(r,i){return e(r,i[0])})}function rr(n,e){var t=Z(n)?Zl:eu;return t(n,vu(Kt(e)))}function Eu(n,e){var t;return Ti(n,function(r,i,s){return t=e(r,i,s),!t}),!!t}function ho(n,e,t){var r=Z(n)?tu:Eu;return r(n,Kt(e))}function vi(n){return n&&n.length?uo(n):[]}function ku(n,e){return n&&n.length?uo(n,Kt(e)):[]}function ae(n){return typeof n=="object"&&n!==null&&typeof n.$type=="string"}function Ge(n){return typeof n=="object"&&n!==null&&typeof n.$refText=="string"}function Su(n){return typeof n=="object"&&n!==null&&typeof n.name=="string"&&typeof n.type=="string"&&typeof n.path=="string"}function xn(n){return typeof n=="object"&&n!==null&&ae(n.container)&&Ge(n.reference)&&typeof n.message=="string"}class po{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,t){return ae(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[t];if(i!==void 0)return i;{const s=this.computeIsSubtype(e,t);return r[t]=s,s}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Gt(n){return typeof n=="object"&&n!==null&&Array.isArray(n.content)}function mo(n){return typeof n=="object"&&n!==null&&typeof n.tokenType=="object"}function go(n){return Gt(n)&&typeof n.fullText=="string"}class ie{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){const e=[],t=this.iterator();let r;do r=t.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,t){const r=this.map(i=>[e?e(i):i,t?t(i):i]);return new Map(r)}toString(){return this.join()}concat(e){const t=e[Symbol.iterator]();return new ie(()=>({first:this.startFn(),firstDone:!1}),r=>{let i;if(!r.firstDone){do if(i=this.nextFn(r.first),!i.done)return i;while(!i.done);r.firstDone=!0}do if(i=t.next(),!i.done)return i;while(!i.done);return xe})}join(e=","){const t=this.iterator();let r="",i,s=!1;do i=t.next(),i.done||(s&&(r+=e),r+=Iu(i.value)),s=!0;while(!i.done);return r}indexOf(e,t=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=t&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(!e(r.value))return!1;r=t.next()}return!0}some(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return!0;r=t.next()}return!1}forEach(e){const t=this.iterator();let r=0,i=t.next();for(;!i.done;)e(i.value,r),i=t.next(),r++}map(e){return new ie(this.startFn,t=>{const{done:r,value:i}=this.nextFn(t);return r?xe:{done:!1,value:e(i)}})}filter(e){return new ie(this.startFn,t=>{let r;do if(r=this.nextFn(t),!r.done&&e(r.value))return r;while(!r.done);return xe})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){const r=this.iterator();let i=t,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,t,r);return s===void 0?i.value:t(s,i.value)}find(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return r.value;r=t.next()}}findIndex(e){const t=this.iterator();let r=0,i=t.next();for(;!i.done;){if(e(i.value))return r;i=t.next(),r++}return-1}includes(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(r.value===e)return!0;r=t.next()}return!1}flatMap(e){return new ie(()=>({this:this.startFn()}),t=>{do{if(t.iterator){const s=t.iterator.next();if(s.done)t.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(t.this);if(!r){const s=e(i);if($n(s))t.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(t.iterator);return xe})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const t=e>1?this.flat(e-1):this;return new ie(()=>({this:t.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=t.nextFn(r.this);if(!i)if($n(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return xe})}head(){const t=this.iterator().next();if(!t.done)return t.value}tail(e=1){return new ie(()=>{const t=this.startFn();for(let r=0;r({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?xe:this.nextFn(t.state)))}distinct(e){const t=new Set;return this.filter(r=>{const i=e?e(r):r;return t.has(i)?!1:(t.add(i),!0)})}exclude(e,t){const r=new Set;for(const i of e){const s=t?t(i):i;r.add(s)}return this.filter(i=>{const s=t?t(i):i;return!r.has(s)})}}function Iu(n){return typeof n=="string"?n:typeof n>"u"?"undefined":typeof n.toString=="function"?n.toString():Object.prototype.toString.call(n)}function $n(n){return!!n&&typeof n[Symbol.iterator]=="function"}const xu=new ie(()=>{},()=>xe),xe=Object.freeze({done:!0,value:void 0});function Q(...n){if(n.length===1){const e=n[0];if(e instanceof ie)return e;if($n(e))return new ie(()=>e[Symbol.iterator](),t=>t.next());if(typeof e.length=="number")return new ie(()=>({index:0}),t=>t.index1?new ie(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}if(e.array){if(e.arrIndex({iterators:r!=null&&r.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(t(a.value)[Symbol.iterator]()),a}return xe})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var br;(function(n){function e(s){return s.reduce((a,o)=>a+o,0)}n.sum=e;function t(s){return s.reduce((a,o)=>a*o,0)}n.product=t;function r(s){return s.reduce((a,o)=>Math.min(a,o))}n.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}n.max=i})(br||(br={}));function Pr(n){return new Ei(n,e=>Gt(e)?e.content:[],{includeRoot:!0})}function Nu(n,e){for(;n.container;)if(n=n.container,n===e)return!0;return!1}function Mr(n){return{start:{character:n.startColumn-1,line:n.startLine-1},end:{character:n.endColumn,line:n.endLine-1}}}function On(n){if(!n)return;const{offset:e,end:t,range:r}=n;return{range:r,offset:e,end:t,length:t-e}}var Ze;(function(n){n[n.Before=0]="Before",n[n.After=1]="After",n[n.OverlapFront=2]="OverlapFront",n[n.OverlapBack=3]="OverlapBack",n[n.Inside=4]="Inside"})(Ze||(Ze={}));function Cu(n,e){if(n.end.linee.end.line||n.start.line===e.end.line&&n.start.character>e.end.character)return Ze.After;const t=n.start.line>e.start.line||n.start.line===e.start.line&&n.start.character>=e.start.character,r=n.end.lineZe.After}const wu=/^[\w\p{L}]$/u;function Lu(n,e){if(n){const t=$u(n,!0);if(t&&ns(t,e))return t;if(go(n)){const r=n.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=n.content[i];if(ns(s,e))return s}}}}function ns(n,e){return mo(n)&&e.includes(n.tokenType.name)}function $u(n,e=!0){for(;n.container;){const t=n.container;let r=t.content.indexOf(n);for(;r>0;){r--;const i=t.content[r];if(e||!i.hidden)return i}n=t}}class yo extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function ir(n){throw new Error("Error! The input value was not handled.")}const Ar="AbstractRule",vr="AbstractType",rs="Condition",Ou="TypeDefinition",is="ValueLiteral",To="AbstractElement";function bu(n){return M.isInstance(n,To)}const Pu="ArrayLiteral",Mu="ArrayType",Ro="BooleanLiteral";function Du(n){return M.isInstance(n,Ro)}const Ao="Conjunction";function Fu(n){return M.isInstance(n,Ao)}const vo="Disjunction";function Gu(n){return M.isInstance(n,vo)}const Uu="Grammar",Eo="InferredType";function ko(n){return M.isInstance(n,Eo)}const So="Interface";function Io(n){return M.isInstance(n,So)}const xo="Negation";function Bu(n){return M.isInstance(n,xo)}const Vu="NumberLiteral",Wu="Parameter",No="ParameterReference";function ju(n){return M.isInstance(n,No)}const Co="ParserRule";function Ce(n){return M.isInstance(n,Co)}const Hu="ReferenceType",Ku="ReturnType";function zu(n){return M.isInstance(n,Ku)}const _o="SimpleType";function qu(n){return M.isInstance(n,_o)}const Yu="StringLiteral",Dr="TerminalRule";function gt(n){return M.isInstance(n,Dr)}const wo="Type";function Lo(n){return M.isInstance(n,wo)}const Xu="UnionType",$o="Action";function sr(n){return M.isInstance(n,$o)}const Oo="Alternatives";function bo(n){return M.isInstance(n,Oo)}const Po="Assignment";function ut(n){return M.isInstance(n,Po)}const Mo="CharacterRange";function Ju(n){return M.isInstance(n,Mo)}const Do="CrossReference";function ki(n){return M.isInstance(n,Do)}const Fo="EndOfFile";function Qu(n){return M.isInstance(n,Fo)}const Go="Group";function Si(n){return M.isInstance(n,Go)}const Uo="Keyword";function dt(n){return M.isInstance(n,Uo)}const Bo="NegatedToken";function Zu(n){return M.isInstance(n,Bo)}const Vo="RegexToken";function ed(n){return M.isInstance(n,Vo)}const Wo="RuleCall";function ft(n){return M.isInstance(n,Wo)}const jo="TerminalAlternatives";function td(n){return M.isInstance(n,jo)}const Ho="TerminalGroup";function nd(n){return M.isInstance(n,Ho)}const Ko="TerminalRuleCall";function rd(n){return M.isInstance(n,Ko)}const zo="UnorderedGroup";function qo(n){return M.isInstance(n,zo)}const Yo="UntilToken";function id(n){return M.isInstance(n,Yo)}const Xo="Wildcard";function sd(n){return M.isInstance(n,Xo)}class Jo extends po{getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,t){switch(e){case $o:case Oo:case Po:case Mo:case Do:case Fo:case Go:case Uo:case Bo:case Vo:case Wo:case jo:case Ho:case Ko:case zo:case Yo:case Xo:return this.isSubtype(To,t);case Pu:case Vu:case Yu:return this.isSubtype(is,t);case Mu:case Hu:case _o:case Xu:return this.isSubtype(Ou,t);case Ro:return this.isSubtype(rs,t)||this.isSubtype(is,t);case Ao:case vo:case xo:case No:return this.isSubtype(rs,t);case Eo:case So:case wo:return this.isSubtype(vr,t);case Co:return this.isSubtype(Ar,t)||this.isSubtype(vr,t);case Dr:return this.isSubtype(Ar,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return vr;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return Ar;case"Grammar:usedGrammars":return Uu;case"NamedArgument:parameter":case"ParameterReference:parameter":return Wu;case"TerminalRuleCall:rule":return Dr;default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}}const M=new Jo;function ad(n){for(const[e,t]of Object.entries(n))e.startsWith("$")||(Array.isArray(t)?t.forEach((r,i)=>{ae(r)&&(r.$container=n,r.$containerProperty=e,r.$containerIndex=i)}):ae(t)&&(t.$container=n,t.$containerProperty=e))}function ar(n,e){let t=n;for(;t;){if(e(t))return t;t=t.$container}}function Ue(n){const t=od(n).$document;if(!t)throw new Error("AST node has no document.");return t}function od(n){for(;n.$container;)n=n.$container;return n}function Ii(n,e){if(!n)throw new Error("Node must be an AstNode.");const t=e==null?void 0:e.range;return new ie(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndexIi(t,e))}function vt(n,e){if(!n)throw new Error("Root node must be an AstNode.");return new Ei(n,t=>Ii(t,e),{includeRoot:!0})}function ss(n,e){var t;if(!e)return!0;const r=(t=n.$cstNode)===null||t===void 0?void 0:t.range;return r?_u(r,e):!1}function Qo(n){return new ie(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class or{visitChildren(e){for(const t in e){const r=e[t];e.hasOwnProperty(t)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}const fd=/\r?\n/gm,hd=new ec;class pd extends or{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(!this.multiline&&t===` +`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=cr(t);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=!!` +`.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}}const kr=new pd;function md(n){try{return typeof n=="string"&&(n=new RegExp(n)),n=n.toString(),kr.reset(n),kr.visit(hd.pattern(n)),kr.multiline}catch{return!1}}function cs(n){return(typeof n=="string"?new RegExp(n):n).test(" ")}function cr(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gd(n){return Array.prototype.map.call(n,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:cr(e)).join("")}function yd(n,e){const t=Td(n),r=e.match(t);return!!r&&r[0].length>0}function Td(n){typeof n=="string"&&(n=new RegExp(n));const e=n,t=n.source;let r=0;function i(){let s="",a;function o(l){s+=t.substr(r,l),r+=l}function c(l){s+="(?:"+t.substr(r,l)+"|$)",r+=l}for(;r",r)-r+1);break;default:c(2);break}break;case"[":a=/\[(?:\\.|.)*?\]/g,a.lastIndex=r,a=a.exec(t)||[],c(a[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":a=/\{\d+,?\d*\}/g,a.lastIndex=r,a=a.exec(t),a?o(a[0].length):c(1);break;case"(":if(t[r+1]==="?")switch(t[r+2]){case":":s+="(?:",r+=3,s+=i()+"|$)";break;case"=":s+="(?=",r+=3,s+=i()+")";break;case"!":a=r,r+=3,i(),s+=t.substr(a,r-a);break;case"<":switch(t[r+3]){case"=":case"!":a=r,r+=4,i(),s+=t.substr(a,r-a);break;default:o(t.indexOf(">",r)-r+1),s+=i()+"|$)";break}break}else o(1),s+=i()+"|$)";break;case")":return++r,s;default:c(1);break}return s}return new RegExp(i(),n.flags)}function Rd(n){return n.rules.find(e=>Ce(e)&&e.entry)}function Ad(n){return n.rules.filter(e=>gt(e)&&e.hidden)}function tc(n,e){const t=new Set,r=Rd(n);if(!r)return new Set(n.rules);const i=[r].concat(Ad(n));for(const a of i)nc(a,t,e);const s=new Set;for(const a of n.rules)(t.has(a.name)||gt(a)&&a.hidden)&&s.add(a);return s}function nc(n,e,t){e.add(n.name),pn(n).forEach(r=>{if(ft(r)||t){const i=r.rule.ref;i&&!e.has(i.name)&&nc(i,e,t)}})}function vd(n){if(n.terminal)return n.terminal;if(n.type.ref){const e=ic(n.type.ref);return e==null?void 0:e.terminal}}function Ed(n){return n.hidden&&!Ci(n).test(" ")}function kd(n,e){return!n||!e?[]:xi(n,e,n.astNode,!0)}function rc(n,e,t){if(!n||!e)return;const r=xi(n,e,n.astNode,!0);if(r.length!==0)return t!==void 0?t=Math.max(0,Math.min(t,r.length-1)):t=0,r[t]}function xi(n,e,t,r){if(!r){const i=ar(n.grammarSource,ut);if(i&&i.feature===e)return[n]}return Gt(n)&&n.astNode===t?n.content.flatMap(i=>xi(i,e,t,!1)):[]}function Sd(n,e,t){if(!n)return;const r=Id(n,e,n==null?void 0:n.astNode);if(r.length!==0)return t!==void 0?t=Math.max(0,Math.min(t,r.length-1)):t=0,r[t]}function Id(n,e,t){if(n.astNode!==t)return[];if(dt(n.grammarSource)&&n.grammarSource.value===e)return[n];const r=Pr(n).iterator();let i;const s=[];do if(i=r.next(),!i.done){const a=i.value;a.astNode===t?dt(a.grammarSource)&&a.grammarSource.value===e&&s.push(a):r.prune()}while(!i.done);return s}function xd(n){var e;const t=n.astNode;for(;t===((e=n.container)===null||e===void 0?void 0:e.astNode);){const r=ar(n.grammarSource,ut);if(r)return r;n=n.container}}function ic(n){let e=n;return ko(e)&&(sr(e.$container)?e=e.$container.$container:Ce(e.$container)?e=e.$container:ir(e.$container)),sc(n,e,new Map)}function sc(n,e,t){var r;function i(s,a){let o;return ar(s,ut)||(o=sc(a,a,t)),t.set(n,o),o}if(t.has(n))return t.get(n);t.set(n,void 0);for(const s of pn(e)){if(ut(s)&&s.feature.toLowerCase()==="name")return t.set(n,s),s;if(ft(s)&&Ce(s.rule.ref))return i(s,s.rule.ref);if(qu(s)&&(!((r=s.typeRef)===null||r===void 0)&&r.ref))return i(s,s.typeRef.ref)}}function Ni(n){return ac(n,new Set)}function ac(n,e){if(e.has(n))return!0;e.add(n);for(const t of pn(n))if(ft(t)){if(!t.rule.ref||Ce(t.rule.ref)&&!ac(t.rule.ref,e))return!1}else{if(ut(t))return!1;if(sr(t))return!1}return!!n.definition}function oc(n){if(n.inferredType)return n.inferredType.name;if(n.dataType)return n.dataType;if(n.returnType){const e=n.returnType.ref;if(e){if(Ce(e))return e.name;if(Io(e)||Lo(e))return e.name}}}function lr(n){var e;if(Ce(n))return Ni(n)?n.name:(e=oc(n))!==null&&e!==void 0?e:n.name;if(Io(n)||Lo(n)||zu(n))return n.name;if(sr(n)){const t=Nd(n);if(t)return t}else if(ko(n))return n.name;throw new Error("Cannot get name of Unknown Type")}function Nd(n){var e;if(n.inferredType)return n.inferredType.name;if(!((e=n.type)===null||e===void 0)&&e.ref)return lr(n.type.ref)}function Cd(n){var e,t,r;return gt(n)?(t=(e=n.type)===null||e===void 0?void 0:e.name)!==null&&t!==void 0?t:"string":Ni(n)?n.name:(r=oc(n))!==null&&r!==void 0?r:n.name}function Ci(n){const e={s:!1,i:!1,u:!1},t=zt(n.definition,e),r=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(t,r)}const _i=/[\s\S]/.source;function zt(n,e){if(td(n))return _d(n);if(nd(n))return wd(n);if(Ju(n))return Od(n);if(rd(n)){const t=n.rule.ref;if(!t)throw new Error("Missing rule reference.");return Ke(zt(t.definition),{cardinality:n.cardinality,lookahead:n.lookahead})}else{if(Zu(n))return $d(n);if(id(n))return Ld(n);if(ed(n)){const t=n.regex.lastIndexOf("/"),r=n.regex.substring(1,t),i=n.regex.substring(t+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),Ke(r,{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1})}else{if(sd(n))return Ke(_i,{cardinality:n.cardinality,lookahead:n.lookahead});throw new Error(`Invalid terminal element: ${n==null?void 0:n.$type}`)}}}function _d(n){return Ke(n.elements.map(e=>zt(e)).join("|"),{cardinality:n.cardinality,lookahead:n.lookahead})}function wd(n){return Ke(n.elements.map(e=>zt(e)).join(""),{cardinality:n.cardinality,lookahead:n.lookahead})}function Ld(n){return Ke(`${_i}*?${zt(n.terminal)}`,{cardinality:n.cardinality,lookahead:n.lookahead})}function $d(n){return Ke(`(?!${zt(n.terminal)})${_i}*?`,{cardinality:n.cardinality,lookahead:n.lookahead})}function Od(n){return n.right?Ke(`[${Sr(n.left)}-${Sr(n.right)}]`,{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1}):Ke(Sr(n.left),{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1})}function Sr(n){return cr(n.value)}function Ke(n,e){var t;return(e.wrap!==!1||e.lookahead)&&(n=`(${(t=e.lookahead)!==null&&t!==void 0?t:""}${n})`),e.cardinality?`${n}${e.cardinality}`:n}function bd(n){const e=[],t=n.Grammar;for(const r of t.rules)gt(r)&&Ed(r)&&md(Ci(r))&&e.push(r.name);return{multilineCommentRules:e,nameRegexp:wu}}function Fr(n){console&&console.error&&console.error(`Error: ${n}`)}function cc(n){console&&console.warn&&console.warn(`Warning: ${n}`)}function lc(n){const e=new Date().getTime(),t=n();return{time:new Date().getTime()-e,value:t}}function uc(n){function e(){}e.prototype=n;const t=new e;function r(){return typeof t.bar}return r(),r(),n}function Pd(n){return Md(n)?n.LABEL:n.name}function Md(n){return fe(n.LABEL)&&n.LABEL!==""}class Be{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),C(this.definition,t=>{t.accept(e)})}}class ce extends Be{constructor(e){super([]),this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class qt extends Be{constructor(e){super(e.definition),this.orgText="",Ae(this,Pe(e,t=>t!==void 0))}}class he extends Be{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Ae(this,Pe(e,t=>t!==void 0))}}class ee extends Be{constructor(e){super(e.definition),this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}}class Ee extends Be{constructor(e){super(e.definition),this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}}class ke extends Be{constructor(e){super(e.definition),this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}}class W extends Be{constructor(e){super(e.definition),this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}}class pe extends Be{constructor(e){super(e.definition),this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}}class me extends Be{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Ae(this,Pe(e,t=>t!==void 0))}}class G{constructor(e){this.idx=1,Ae(this,Pe(e,t=>t!==void 0))}accept(e){e.visit(this)}}function Dd(n){return S(n,Nn)}function Nn(n){function e(t){return S(t,Nn)}if(n instanceof ce){const t={type:"NonTerminal",name:n.nonTerminalName,idx:n.idx};return fe(n.label)&&(t.label=n.label),t}else{if(n instanceof he)return{type:"Alternative",definition:e(n.definition)};if(n instanceof ee)return{type:"Option",idx:n.idx,definition:e(n.definition)};if(n instanceof Ee)return{type:"RepetitionMandatory",idx:n.idx,definition:e(n.definition)};if(n instanceof ke)return{type:"RepetitionMandatoryWithSeparator",idx:n.idx,separator:Nn(new G({terminalType:n.separator})),definition:e(n.definition)};if(n instanceof pe)return{type:"RepetitionWithSeparator",idx:n.idx,separator:Nn(new G({terminalType:n.separator})),definition:e(n.definition)};if(n instanceof W)return{type:"Repetition",idx:n.idx,definition:e(n.definition)};if(n instanceof me)return{type:"Alternation",idx:n.idx,definition:e(n.definition)};if(n instanceof G){const t={type:"Terminal",name:n.terminalType.name,label:Pd(n.terminalType),idx:n.idx};fe(n.label)&&(t.terminalLabel=n.label);const r=n.terminalType.PATTERN;return n.terminalType.PATTERN&&(t.pattern=qe(r)?r.source:r),t}else{if(n instanceof qt)return{type:"Rule",name:n.name,orgText:n.orgText,definition:e(n.definition)};throw Error("non exhaustive match")}}}class Yt{visit(e){const t=e;switch(t.constructor){case ce:return this.visitNonTerminal(t);case he:return this.visitAlternative(t);case ee:return this.visitOption(t);case Ee:return this.visitRepetitionMandatory(t);case ke:return this.visitRepetitionMandatoryWithSeparator(t);case pe:return this.visitRepetitionWithSeparator(t);case W:return this.visitRepetition(t);case me:return this.visitAlternation(t);case G:return this.visitTerminal(t);case qt:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Fd(n){return n instanceof he||n instanceof ee||n instanceof W||n instanceof Ee||n instanceof ke||n instanceof pe||n instanceof G||n instanceof qt}function Mn(n,e=[]){return n instanceof ee||n instanceof W||n instanceof pe?!0:n instanceof me?ho(n.definition,r=>Mn(r,e)):n instanceof ce&&ue(e,n)?!1:n instanceof Be?(n instanceof ce&&e.push(n),$e(n.definition,r=>Mn(r,e))):!1}function Gd(n){return n instanceof me}function Fe(n){if(n instanceof ce)return"SUBRULE";if(n instanceof ee)return"OPTION";if(n instanceof me)return"OR";if(n instanceof Ee)return"AT_LEAST_ONE";if(n instanceof ke)return"AT_LEAST_ONE_SEP";if(n instanceof pe)return"MANY_SEP";if(n instanceof W)return"MANY";if(n instanceof G)return"CONSUME";throw Error("non exhaustive match")}class ur{walk(e,t=[]){C(e.definition,(r,i)=>{const s=J(e.definition,i+1);if(r instanceof ce)this.walkProdRef(r,s,t);else if(r instanceof G)this.walkTerminal(r,s,t);else if(r instanceof he)this.walkFlat(r,s,t);else if(r instanceof ee)this.walkOption(r,s,t);else if(r instanceof Ee)this.walkAtLeastOne(r,s,t);else if(r instanceof ke)this.walkAtLeastOneSep(r,s,t);else if(r instanceof pe)this.walkManySep(r,s,t);else if(r instanceof W)this.walkMany(r,s,t);else if(r instanceof me)this.walkOr(r,s,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){const i=t.concat(r);this.walk(e,i)}walkOption(e,t,r){const i=t.concat(r);this.walk(e,i)}walkAtLeastOne(e,t,r){const i=[new ee({definition:e.definition})].concat(t,r);this.walk(e,i)}walkAtLeastOneSep(e,t,r){const i=ls(e,t,r);this.walk(e,i)}walkMany(e,t,r){const i=[new ee({definition:e.definition})].concat(t,r);this.walk(e,i)}walkManySep(e,t,r){const i=ls(e,t,r);this.walk(e,i)}walkOr(e,t,r){const i=t.concat(r);C(e.definition,s=>{const a=new he({definition:[s]});this.walk(a,i)})}}function ls(n,e,t){return[new ee({definition:[new G({terminalType:n.separator})].concat(n.definition)})].concat(e,t)}function mn(n){if(n instanceof ce)return mn(n.referencedRule);if(n instanceof G)return Vd(n);if(Fd(n))return Ud(n);if(Gd(n))return Bd(n);throw Error("non exhaustive match")}function Ud(n){let e=[];const t=n.definition;let r=0,i=t.length>r,s,a=!0;for(;i&&a;)s=t[r],a=Mn(s),e=e.concat(mn(s)),r=r+1,i=t.length>r;return vi(e)}function Bd(n){const e=S(n.definition,t=>mn(t));return vi(Ne(e))}function Vd(n){return[n.terminalType]}const dc="_~IN~_";class Wd extends ur{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){const i=Hd(e.referencedRule,e.idx)+this.topProd.name,s=t.concat(r),a=new he({definition:s}),o=mn(a);this.follows[i]=o}}function jd(n){const e={};return C(n,t=>{const r=new Wd(t).startWalking();Ae(e,r)}),e}function Hd(n,e){return n.name+e+dc}let Cn={};const Kd=new ec;function dr(n){const e=n.toString();if(Cn.hasOwnProperty(e))return Cn[e];{const t=Kd.pattern(e);return Cn[e]=t,t}}function zd(){Cn={}}const fc="Complement Sets are not supported for first char optimization",Dn=`Unable to use "first char" lexer optimizations: +`;function qd(n,e=!1){try{const t=dr(n);return Gr(t.value,{},t.flags.ignoreCase)}catch(t){if(t.message===fc)e&&cc(`${Dn} Unable to optimize: < ${n.toString()} > + Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let r="";e&&(r=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Fr(`${Dn} + Failed parsing: < ${n.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function Gr(n,e,t){switch(n.type){case"Disjunction":for(let i=0;i{if(typeof c=="number")kn(c,e,t);else{const l=c;if(t===!0)for(let u=l.from;u<=l.to;u++)kn(u,e,t);else{for(let u=l.from;u<=l.to&&u=on){const u=l.from>=on?l.from:on,d=l.to,f=et(u),h=et(d);for(let m=f;m<=h;m++)e[m]=m}}}});break;case"Group":Gr(a.value,e,t);break;default:throw Error("Non Exhaustive Match")}const o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type==="Group"&&Ur(a)===!1||a.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return K(e)}function kn(n,e,t){const r=et(n);e[r]=r,t===!0&&Yd(n,e)}function Yd(n,e){const t=String.fromCharCode(n),r=t.toUpperCase();if(r!==t){const i=et(r.charCodeAt(0));e[i]=i}else{const i=t.toLowerCase();if(i!==t){const s=et(i.charCodeAt(0));e[s]=s}}}function us(n,e){return Dt(n.value,t=>{if(typeof t=="number")return ue(e,t);{const r=t;return Dt(e,i=>r.from<=i&&i<=r.to)!==void 0}})}function Ur(n){const e=n.quantifier;return e&&e.atLeast===0?!0:n.value?Z(n.value)?$e(n.value,Ur):Ur(n.value):!1}class Xd extends or{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){ue(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?us(e,this.targetCharCodes)===void 0&&(this.found=!0):us(e,this.targetCharCodes)!==void 0&&(this.found=!0)}}function wi(n,e){if(e instanceof RegExp){const t=dr(e),r=new Xd(n);return r.visit(t),r.found}else return Dt(e,t=>ue(n,t.charCodeAt(0)))!==void 0}const ht="PATTERN",an="defaultMode",Sn="modes";let hc=typeof new RegExp("(?:)").sticky=="boolean";function Jd(n,e){e=Ai(e,{useSticky:hc,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:(v,R)=>R()});const t=e.tracer;t("initCharCodeToOptimizedIndexMap",()=>{vf()});let r;t("Reject Lexer.NA",()=>{r=rr(n,v=>v[ht]===de.NA)});let i=!1,s;t("Transform Patterns",()=>{i=!1,s=S(r,v=>{const R=v[ht];if(qe(R)){const N=R.source;return N.length===1&&N!=="^"&&N!=="$"&&N!=="."&&!R.ignoreCase?N:N.length===2&&N[0]==="\\"&&!ue(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],N[1])?N[1]:e.useSticky?fs(R):ds(R)}else{if(mt(R))return i=!0,{exec:R};if(typeof R=="object")return i=!0,R;if(typeof R=="string"){if(R.length===1)return R;{const N=R.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),F=new RegExp(N);return e.useSticky?fs(F):ds(F)}}else throw Error("non exhaustive match")}})});let a,o,c,l,u;t("misc mapping",()=>{a=S(r,v=>v.tokenTypeIdx),o=S(r,v=>{const R=v.GROUP;if(R!==de.SKIPPED){if(fe(R))return R;if(ze(R))return!1;throw Error("non exhaustive match")}}),c=S(r,v=>{const R=v.LONGER_ALT;if(R)return Z(R)?S(R,F=>es(r,F)):[es(r,R)]}),l=S(r,v=>v.PUSH_MODE),u=S(r,v=>_(v,"POP_MODE"))});let d;t("Line Terminator Handling",()=>{const v=gc(e.lineTerminatorCharacters);d=S(r,R=>!1),e.positionTracking!=="onlyOffset"&&(d=S(r,R=>_(R,"LINE_BREAKS")?!!R.LINE_BREAKS:mc(R,v)===!1&&wi(v,R.PATTERN)))});let f,h,m,g;t("Misc Mapping #2",()=>{f=S(r,pc),h=S(s,Tf),m=oe(r,(v,R)=>{const N=R.GROUP;return fe(N)&&N!==de.SKIPPED&&(v[N]=[]),v},{}),g=S(s,(v,R)=>({pattern:s[R],longerAlt:c[R],canLineTerminator:d[R],isCustom:f[R],short:h[R],group:o[R],push:l[R],pop:u[R],tokenTypeIdx:a[R],tokenType:r[R]}))});let A=!0,y=[];return e.safeMode||t("First Char Optimization",()=>{y=oe(r,(v,R,N)=>{if(typeof R.PATTERN=="string"){const F=R.PATTERN.charCodeAt(0),ne=et(F);Ir(v,ne,g[N])}else if(Z(R.START_CHARS_HINT)){let F;C(R.START_CHARS_HINT,ne=>{const we=typeof ne=="string"?ne.charCodeAt(0):ne,ge=et(we);F!==ge&&(F=ge,Ir(v,ge,g[N]))})}else if(qe(R.PATTERN))if(R.PATTERN.unicode)A=!1,e.ensureOptimizations&&Fr(`${Dn} Unable to analyze < ${R.PATTERN.toString()} > pattern. + The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const F=qd(R.PATTERN,e.ensureOptimizations);D(F)&&(A=!1),C(F,ne=>{Ir(v,ne,g[N])})}else e.ensureOptimizations&&Fr(`${Dn} TokenType: <${R.name}> is using a custom token pattern without providing parameter. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),A=!1;return v},[])}),{emptyGroups:m,patternIdxToConfig:g,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:A}}function Qd(n,e){let t=[];const r=ef(n);t=t.concat(r.errors);const i=tf(r.valid),s=i.valid;return t=t.concat(i.errors),t=t.concat(Zd(s)),t=t.concat(uf(s)),t=t.concat(df(s,e)),t=t.concat(ff(s)),t}function Zd(n){let e=[];const t=ve(n,r=>qe(r[ht]));return e=e.concat(rf(t)),e=e.concat(of(t)),e=e.concat(cf(t)),e=e.concat(lf(t)),e=e.concat(sf(t)),e}function ef(n){const e=ve(n,i=>!_(i,ht)),t=S(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:j.MISSING_PATTERN,tokenTypes:[i]})),r=nr(n,e);return{errors:t,valid:r}}function tf(n){const e=ve(n,i=>{const s=i[ht];return!qe(s)&&!mt(s)&&!_(s,"exec")&&!fe(s)}),t=S(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:j.INVALID_PATTERN,tokenTypes:[i]})),r=nr(n,e);return{errors:t,valid:r}}const nf=/[^\\][$]/;function rf(n){class e extends or{constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}const t=ve(n,i=>{const s=i.PATTERN;try{const a=dr(s),o=new e;return o.visit(a),o.found}catch{return nf.test(s.source)}});return S(t,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:j.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function sf(n){const e=ve(n,r=>r.PATTERN.test(""));return S(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' must not match an empty string",type:j.EMPTY_MATCH_PATTERN,tokenTypes:[r]}))}const af=/[^\\[][\^]|^\^/;function of(n){class e extends or{constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}const t=ve(n,i=>{const s=i.PATTERN;try{const a=dr(s),o=new e;return o.visit(a),o.found}catch{return af.test(s.source)}});return S(t,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:j.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function cf(n){const e=ve(n,r=>{const i=r[ht];return i instanceof RegExp&&(i.multiline||i.global)});return S(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:j.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[r]}))}function lf(n){const e=[];let t=S(n,s=>oe(n,(a,o)=>(s.PATTERN.source===o.PATTERN.source&&!ue(e,o)&&o.PATTERN!==de.NA&&(e.push(o),a.push(o)),a),[]));t=hn(t);const r=ve(t,s=>s.length>1);return S(r,s=>{const a=S(s,c=>c.name);return{message:`The same RegExp pattern ->${be(s).PATTERN}<-has been used in all of the following Token Types: ${a.join(", ")} <-`,type:j.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}function uf(n){const e=ve(n,r=>{if(!_(r,"GROUP"))return!1;const i=r.GROUP;return i!==de.SKIPPED&&i!==de.NA&&!fe(i)});return S(e,r=>({message:"Token Type: ->"+r.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:j.INVALID_GROUP_TYPE_FOUND,tokenTypes:[r]}))}function df(n,e){const t=ve(n,i=>i.PUSH_MODE!==void 0&&!ue(e,i.PUSH_MODE));return S(t,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:j.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function ff(n){const e=[],t=oe(n,(r,i,s)=>{const a=i.PATTERN;return a===de.NA||(fe(a)?r.push({str:a,idx:s,tokenType:i}):qe(a)&&pf(a)&&r.push({str:a.source,idx:s,tokenType:i})),r},[]);return C(n,(r,i)=>{C(t,({str:s,idx:a,tokenType:o})=>{if(i${o.name}<- can never be matched. +Because it appears AFTER the Token Type ->${r.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:j.UNREACHABLE_PATTERN,tokenTypes:[r,o]})}})}),e}function hf(n,e){if(qe(e)){const t=e.exec(n);return t!==null&&t.index===0}else{if(mt(e))return e(n,0,[],{});if(_(e,"exec"))return e.exec(n,0,[],{});if(typeof e=="string")return e===n;throw Error("non exhaustive match")}}function pf(n){return Dt([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>n.source.indexOf(t)!==-1)===void 0}function ds(n){const e=n.ignoreCase?"i":"";return new RegExp(`^(?:${n.source})`,e)}function fs(n){const e=n.ignoreCase?"iy":"y";return new RegExp(`${n.source}`,e)}function mf(n,e,t){const r=[];return _(n,an)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+an+`> property in its definition +`,type:j.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),_(n,Sn)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Sn+`> property in its definition +`,type:j.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),_(n,Sn)&&_(n,an)&&!_(n.modes,n.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${an}: <${n.defaultMode}>which does not exist +`,type:j.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),_(n,Sn)&&C(n.modes,(i,s)=>{C(i,(a,o)=>{if(ze(a))r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${o}> +`,type:j.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(_(a,"LONGER_ALT")){const c=Z(a.LONGER_ALT)?a.LONGER_ALT:[a.LONGER_ALT];C(c,l=>{!ze(l)&&!ue(i,l)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${l.name}> on token <${a.name}> outside of mode <${s}> +`,type:j.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),r}function gf(n,e,t){const r=[];let i=!1;const s=hn(Ne(K(n.modes))),a=rr(s,c=>c[ht]===de.NA),o=gc(t);return e&&C(a,c=>{const l=mc(c,o);if(l!==!1){const d={message:Af(c,l),type:l.issue,tokenType:c};r.push(d)}else _(c,"LINE_BREAKS")?c.LINE_BREAKS===!0&&(i=!0):wi(o,c.PATTERN)&&(i=!0)}),e&&!i&&r.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:j.NO_LINE_BREAKS_FLAGS}),r}function yf(n){const e={},t=Mt(n);return C(t,r=>{const i=n[r];if(Z(i))e[r]=[];else throw Error("non exhaustive match")}),e}function pc(n){const e=n.PATTERN;if(qe(e))return!1;if(mt(e))return!0;if(_(e,"exec"))return!0;if(fe(e))return!1;throw Error("non exhaustive match")}function Tf(n){return fe(n)&&n.length===1?n.charCodeAt(0):!1}const Rf={test:function(n){const e=n.length;for(let t=this.lastIndex;t Token Type + Root cause: ${e.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===j.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + The problem is in the <${n.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function gc(n){return S(n,t=>fe(t)?t.charCodeAt(0):t)}function Ir(n,e,t){n[e]===void 0?n[e]=[t]:n[e].push(t)}const on=256;let _n=[];function et(n){return n255?255+~~(n/255):n}}function gn(n,e){const t=n.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}function Fn(n,e){return n.tokenTypeIdx===e.tokenTypeIdx}let hs=1;const yc={};function yn(n){const e=Ef(n);kf(e),If(e),Sf(e),C(e,t=>{t.isParent=t.categoryMatches.length>0})}function Ef(n){let e=te(n),t=n,r=!0;for(;r;){t=hn(Ne(S(t,s=>s.CATEGORIES)));const i=nr(t,e);e=e.concat(i),D(i)?r=!1:t=i}return e}function kf(n){C(n,e=>{Rc(e)||(yc[hs]=e,e.tokenTypeIdx=hs++),ps(e)&&!Z(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),ps(e)||(e.CATEGORIES=[]),xf(e)||(e.categoryMatches=[]),Nf(e)||(e.categoryMatchesMap={})})}function Sf(n){C(n,e=>{e.categoryMatches=[],C(e.categoryMatchesMap,(t,r)=>{e.categoryMatches.push(yc[r].tokenTypeIdx)})})}function If(n){C(n,e=>{Tc([],e)})}function Tc(n,e){C(n,t=>{e.categoryMatchesMap[t.tokenTypeIdx]=!0}),C(e.CATEGORIES,t=>{const r=n.concat(e);ue(r,t)||Tc(r,t)})}function Rc(n){return _(n,"tokenTypeIdx")}function ps(n){return _(n,"CATEGORIES")}function xf(n){return _(n,"categoryMatches")}function Nf(n){return _(n,"categoryMatchesMap")}function Cf(n){return _(n,"tokenTypeIdx")}const _f={buildUnableToPopLexerModeMessage(n){return`Unable to pop Lexer Mode after encountering Token ->${n.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(n,e,t,r,i){return`unexpected character: ->${n.charAt(e)}<- at offset: ${e}, skipped ${t} characters.`}};var j;(function(n){n[n.MISSING_PATTERN=0]="MISSING_PATTERN",n[n.INVALID_PATTERN=1]="INVALID_PATTERN",n[n.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",n[n.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",n[n.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",n[n.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",n[n.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",n[n.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",n[n.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",n[n.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",n[n.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",n[n.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",n[n.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",n[n.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",n[n.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",n[n.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",n[n.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",n[n.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(j||(j={}));const cn={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:_f,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(cn);class de{constructor(e,t=cn){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,s)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;const a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);const{time:o,value:c}=lc(s),l=o>10?console.warn:console.log;return this.traceInitIndent time: ${o}ms`),this.traceInitIndent--,c}else return s()},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=Ae({},cn,t);const r=this.config.traceInitPerf;r===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof r=="number"&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,s=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===cn.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Rf;else if(this.config.lineTerminatorCharacters===cn.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Z(e)?i={modes:{defaultMode:te(e)},defaultMode:an}:(s=!1,i=te(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(mf(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(gf(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},C(i.modes,(o,c)=>{i.modes[c]=rr(o,l=>ze(l))});const a=Mt(i.modes);if(C(i.modes,(o,c)=>{this.TRACE_INIT(`Mode: <${c}> processing`,()=>{if(this.modes.push(c),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Qd(o,a))}),D(this.lexerDefinitionErrors)){yn(o);let l;this.TRACE_INIT("analyzeTokenTypes",()=>{l=Jd(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[c]=l.patternIdxToConfig,this.charCodeToPatternIdxToConfig[c]=l.charCodeToPatternIdxToConfig,this.emptyGroups=Ae({},this.emptyGroups,l.emptyGroups),this.hasCustom=l.hasCustom||this.hasCustom,this.canModeBeOptimized[c]=l.canBeOptimized}})}),this.defaultMode=i.defaultMode,!D(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const c=S(this.lexerDefinitionErrors,l=>l.message).join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+c)}C(this.lexerDefinitionWarning,o=>{cc(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(hc?(this.chopInput=Zi,this.match=this.matchWithTest):(this.updateLastIndex=q,this.match=this.matchWithExec),s&&(this.handleModes=q),this.trackStartLines===!1&&(this.computeNewColumn=Zi),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=q),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const o=oe(this.canModeBeOptimized,(c,l,u)=>(l===!1&&c.push(u),c),[]);if(t.ensureOptimizations&&!D(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{zd()}),this.TRACE_INIT("toFastProperties",()=>{uc(this)})})}tokenize(e,t=this.defaultMode){if(!D(this.lexerDefinitionErrors)){const i=S(this.lexerDefinitionErrors,s=>s.message).join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+i)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,i,s,a,o,c,l,u,d,f,h,m,g,A,y;const v=e,R=v.length;let N=0,F=0;const ne=this.hasCustom?0:Math.floor(e.length/10),we=new Array(ne),ge=[];let De=this.trackStartLines?1:void 0,Se=this.trackStartLines?1:void 0;const k=yf(this.emptyGroups),T=this.trackStartLines,E=this.config.lineTerminatorsPattern;let I=0,O=[],$=[];const L=[],ye=[];Object.freeze(ye);let z;function V(){return O}function at(re){const Ie=et(re),Tt=$[Ie];return Tt===void 0?ye:Tt}const Dl=re=>{if(L.length===1&&re.tokenType.PUSH_MODE===void 0){const Ie=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(re);ge.push({offset:re.startOffset,line:re.startLine,column:re.startColumn,length:re.image.length,message:Ie})}else{L.pop();const Ie=Ft(L);O=this.patternIdxToConfig[Ie],$=this.charCodeToPatternIdxToConfig[Ie],I=O.length;const Tt=this.canModeBeOptimized[Ie]&&this.config.safeMode===!1;$&&Tt?z=at:z=V}};function qi(re){L.push(re),$=this.charCodeToPatternIdxToConfig[re],O=this.patternIdxToConfig[re],I=O.length,I=O.length;const Ie=this.canModeBeOptimized[re]&&this.config.safeMode===!1;$&&Ie?z=at:z=V}qi.call(this,t);let Le;const Yi=this.config.recoveryEnabled;for(;Nc.length){c=a,l=u,Le=We;break}}}break}}if(c!==null){if(d=c.length,f=Le.group,f!==void 0&&(h=Le.tokenTypeIdx,m=this.createTokenInstance(c,N,h,Le.tokenType,De,Se,d),this.handlePayload(m,l),f===!1?F=this.addToken(we,F,m):k[f].push(m)),e=this.chopInput(e,d),N=N+d,Se=this.computeNewColumn(Se,d),T===!0&&Le.canLineTerminator===!0){let Te=0,Ve,Xe;E.lastIndex=0;do Ve=E.test(c),Ve===!0&&(Xe=E.lastIndex-1,Te++);while(Ve===!0);Te!==0&&(De=De+Te,Se=d-Xe,this.updateTokenEndLineColumnLocation(m,f,Xe,Te,De,Se,d))}this.handleModes(Le,Dl,qi,m)}else{const Te=N,Ve=De,Xe=Se;let We=Yi===!1;for(;We===!1&&N ${Et(n)} <--`:`token of type --> ${n.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:n,ruleName:e}){return"Redundant input, expecting EOF but found: "+n.image},buildNoViableAltMessage({expectedPathsPerAlt:n,actual:e,previous:t,customUserDescription:r,ruleName:i}){const s="Expecting: ",o=` +but found: '`+be(e).image+"'";if(r)return s+r+o;{const c=oe(n,(f,h)=>f.concat(h),[]),l=S(c,f=>`[${S(f,h=>Et(h)).join(", ")}]`),d=`one of these possible Token sequences: +${S(l,(f,h)=>` ${h+1}. ${f}`).join(` +`)}`;return s+d+o}},buildEarlyExitMessage({expectedIterationPaths:n,actual:e,customUserDescription:t,ruleName:r}){const i="Expecting: ",a=` +but found: '`+be(e).image+"'";if(t)return i+t+a;{const c=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${S(n,l=>`[${S(l,u=>Et(u)).join(",")}]`).join(" ,")}>`;return i+c+a}}};Object.freeze(At);const $f={buildRuleNotFoundError(n,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+n.name+"<-"}},lt={buildDuplicateFoundError(n,e){function t(u){return u instanceof G?u.terminalType.name:u instanceof ce?u.nonTerminalName:""}const r=n.name,i=be(e),s=i.idx,a=Fe(i),o=t(i),c=s>0;let l=`->${a}${c?s:""}<- ${o?`with argument: ->${o}<-`:""} + appears more than once (${e.length} times) in the top level rule: ->${r}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,` +`),l},buildNamespaceConflictError(n){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${n.name}>. +To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(n){const e=S(n.prefixPath,i=>Et(i)).join(", "),t=n.alternation.idx===0?"":n.alternation.idx;return`Ambiguous alternatives: <${n.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in inside <${n.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`},buildAlternationAmbiguityError(n){const e=S(n.prefixPath,i=>Et(i)).join(", "),t=n.alternation.idx===0?"":n.alternation.idx;let r=`Ambiguous Alternatives Detected: <${n.ambiguityIndices.join(" ,")}> in inside <${n.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,r},buildEmptyRepetitionError(n){let e=Fe(n.repetition);return n.repetition.idx!==0&&(e+=n.repetition.idx),`The repetition <${e}> within Rule <${n.topLevelRule.name}> can never consume any tokens. +This could lead to an infinite loop.`},buildTokenNameError(n){return"deprecated"},buildEmptyAlternationError(n){return`Ambiguous empty alternative: <${n.emptyChoiceIdx+1}> in inside <${n.topLevelRule.name}> Rule. +Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(n){return`An Alternation cannot have more than 256 alternatives: + inside <${n.topLevelRule.name}> Rule. + has ${n.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(n){const e=n.topLevelRule.name,t=S(n.leftRecursionPath,s=>s.name),r=`${e} --> ${t.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar. +rule: <${e}> can be invoked from itself (directly or indirectly) +without consuming any Tokens. The grammar path that causes this is: + ${r} + To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(n){return"deprecated"},buildDuplicateRuleNameError(n){let e;return n.topLevelRule instanceof qt?e=n.topLevelRule.name:e=n.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${n.grammarName}<-`}};function Of(n,e){const t=new bf(n,e);return t.resolveRefs(),t.errors}class bf extends Yt{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){C(K(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:le.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class Pf extends ur{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=te(this.path.ruleStack).reverse(),this.occurrenceStack=te(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const i=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){D(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class Mf extends Pf{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const i=t.concat(r),s=new he({definition:i});this.possibleTokTypes=mn(s),this.found=!0}}}class fr extends ur{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class Df extends fr{walkMany(e,t,r){if(e.idx===this.occurrence){const i=be(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,t,r)}}class ks extends fr{walkManySep(e,t,r){if(e.idx===this.occurrence){const i=be(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,t,r)}}class Ff extends fr{walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){const i=be(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,t,r)}}class Ss extends fr{walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){const i=be(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,t,r)}}function Br(n,e,t=[]){t=te(t);let r=[],i=0;function s(o){return o.concat(J(n,i+1))}function a(o){const c=Br(s(o),e,t);return r.concat(c)}for(;t.length{D(c.definition)===!1&&(r=a(c.definition))}),r;if(o instanceof G)t.push(o.terminalType);else throw Error("non exhaustive match")}i++}return r.push({partialPath:t,suffixDef:J(n,i)}),r}function kc(n,e,t,r){const i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE";let o=!1;const c=e.length,l=c-r-1,u=[],d=[];for(d.push({idx:-1,def:n,ruleStack:[],occurrenceStack:[]});!D(d);){const f=d.pop();if(f===a){o&&Ft(d).idx<=l&&d.pop();continue}const h=f.def,m=f.idx,g=f.ruleStack,A=f.occurrenceStack;if(D(h))continue;const y=h[0];if(y===i){const v={idx:m,def:J(h),ruleStack:ln(g),occurrenceStack:ln(A)};d.push(v)}else if(y instanceof G)if(m=0;v--){const R=y.definition[v],N={idx:m,def:R.definition.concat(J(h)),ruleStack:g,occurrenceStack:A};d.push(N),d.push(a)}else if(y instanceof he)d.push({idx:m,def:y.definition.concat(J(h)),ruleStack:g,occurrenceStack:A});else if(y instanceof qt)d.push(Gf(y,m,g,A));else throw Error("non exhaustive match")}return u}function Gf(n,e,t,r){const i=te(t);i.push(n.name);const s=te(r);return s.push(1),{idx:e,def:n.definition,ruleStack:i,occurrenceStack:s}}var B;(function(n){n[n.OPTION=0]="OPTION",n[n.REPETITION=1]="REPETITION",n[n.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",n[n.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",n[n.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",n[n.ALTERNATION=5]="ALTERNATION"})(B||(B={}));function $i(n){if(n instanceof ee||n==="Option")return B.OPTION;if(n instanceof W||n==="Repetition")return B.REPETITION;if(n instanceof Ee||n==="RepetitionMandatory")return B.REPETITION_MANDATORY;if(n instanceof ke||n==="RepetitionMandatoryWithSeparator")return B.REPETITION_MANDATORY_WITH_SEPARATOR;if(n instanceof pe||n==="RepetitionWithSeparator")return B.REPETITION_WITH_SEPARATOR;if(n instanceof me||n==="Alternation")return B.ALTERNATION;throw Error("non exhaustive match")}function Is(n){const{occurrence:e,rule:t,prodType:r,maxLookahead:i}=n,s=$i(r);return s===B.ALTERNATION?hr(e,t,i):pr(e,t,s,i)}function Uf(n,e,t,r,i,s){const a=hr(n,e,t),o=xc(a)?Fn:gn;return s(a,r,o,i)}function Bf(n,e,t,r,i,s){const a=pr(n,e,i,t),o=xc(a)?Fn:gn;return s(a[0],o,r)}function Vf(n,e,t,r){const i=n.length,s=$e(n,a=>$e(a,o=>o.length===1));if(e)return function(a){const o=S(a,c=>c.GATE);for(let c=0;cNe(c)),o=oe(a,(c,l,u)=>(C(l,d=>{_(c,d.tokenTypeIdx)||(c[d.tokenTypeIdx]=u),C(d.categoryMatches,f=>{_(c,f)||(c[f]=u)})}),c),{});return function(){const c=this.LA(1);return o[c.tokenTypeIdx]}}else return function(){for(let a=0;as.length===1),i=n.length;if(r&&!t){const s=Ne(n);if(s.length===1&&D(s[0].categoryMatches)){const o=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{const a=oe(s,(o,c,l)=>(o[c.tokenTypeIdx]=!0,C(c.categoryMatches,u=>{o[u]=!0}),o),[]);return function(){const o=this.LA(1);return a[o.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;sBr([a],1)),r=xs(t.length),i=S(t,a=>{const o={};return C(a,c=>{const l=xr(c.partialPath);C(l,u=>{o[u]=!0})}),o});let s=t;for(let a=1;a<=e;a++){const o=s;s=xs(o.length);for(let c=0;c{const y=xr(A.partialPath);C(y,v=>{i[c][v]=!0})})}}}}return r}function hr(n,e,t,r){const i=new Sc(n,B.ALTERNATION,r);return e.accept(i),Ic(i.result,t)}function pr(n,e,t,r){const i=new Sc(n,t);e.accept(i);const s=i.result,o=new jf(e,n,t).startWalking(),c=new he({definition:s}),l=new he({definition:o});return Ic([c,l],r)}function Vr(n,e){e:for(let t=0;t{const i=e[r];return t===i||i.categoryMatchesMap[t.tokenTypeIdx]})}function xc(n){return $e(n,e=>$e(e,t=>$e(t,r=>D(r.categoryMatches))))}function zf(n){const e=n.lookaheadStrategy.validate({rules:n.rules,tokenTypes:n.tokenTypes,grammarName:n.grammarName});return S(e,t=>Object.assign({type:le.CUSTOM_LOOKAHEAD_VALIDATION},t))}function qf(n,e,t,r){const i=Re(n,c=>Yf(c,t)),s=oh(n,e,t),a=Re(n,c=>rh(c,t)),o=Re(n,c=>Qf(c,n,r,t));return i.concat(s,a,o)}function Yf(n,e){const t=new Jf;n.accept(t);const r=t.allProductions,i=mu(r,Xf),s=Pe(i,o=>o.length>1);return S(K(s),o=>{const c=be(o),l=e.buildDuplicateFoundError(n,o),u=Fe(c),d={message:l,type:le.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:u,occurrence:c.idx},f=Nc(c);return f&&(d.parameter=f),d})}function Xf(n){return`${Fe(n)}_#_${n.idx}_#_${Nc(n)}`}function Nc(n){return n instanceof G?n.terminalType.name:n instanceof ce?n.nonTerminalName:""}class Jf extends Yt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function Qf(n,e,t,r){const i=[];if(oe(e,(a,o)=>o.name===n.name?a+1:a,0)>1){const a=r.buildDuplicateRuleNameError({topLevelRule:n,grammarName:t});i.push({message:a,type:le.DUPLICATE_RULE_NAME,ruleName:n.name})}return i}function Zf(n,e,t){const r=[];let i;return ue(e,n)||(i=`Invalid rule override, rule: ->${n}<- cannot be overridden in the grammar: ->${t}<-as it is not defined in any of the super grammars `,r.push({message:i,type:le.INVALID_RULE_OVERRIDE,ruleName:n})),r}function Cc(n,e,t,r=[]){const i=[],s=wn(e.definition);if(D(s))return[];{const a=n.name;ue(s,n)&&i.push({message:t.buildLeftRecursionError({topLevelRule:n,leftRecursionPath:r}),type:le.LEFT_RECURSION,ruleName:a});const c=nr(s,r.concat([n])),l=Re(c,u=>{const d=te(r);return d.push(u),Cc(n,u,t,d)});return i.concat(l)}}function wn(n){let e=[];if(D(n))return e;const t=be(n);if(t instanceof ce)e.push(t.referencedRule);else if(t instanceof he||t instanceof ee||t instanceof Ee||t instanceof ke||t instanceof pe||t instanceof W)e=e.concat(wn(t.definition));else if(t instanceof me)e=Ne(S(t.definition,s=>wn(s.definition)));else if(!(t instanceof G))throw Error("non exhaustive match");const r=Mn(t),i=n.length>1;if(r&&i){const s=J(n);return e.concat(wn(s))}else return e}class Oi extends Yt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function eh(n,e){const t=new Oi;n.accept(t);const r=t.alternations;return Re(r,s=>{const a=ln(s.definition);return Re(a,(o,c)=>{const l=kc([o],[],gn,1);return D(l)?[{message:e.buildEmptyAlternationError({topLevelRule:n,alternation:s,emptyChoiceIdx:c}),type:le.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:s.idx,alternative:c+1}]:[]})})}function th(n,e,t){const r=new Oi;n.accept(r);let i=r.alternations;return i=rr(i,a=>a.ignoreAmbiguities===!0),Re(i,a=>{const o=a.idx,c=a.maxLookahead||e,l=hr(o,n,c,a),u=sh(l,a,n,t),d=ah(l,a,n,t);return u.concat(d)})}class nh extends Yt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function rh(n,e){const t=new Oi;n.accept(t);const r=t.alternations;return Re(r,s=>s.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:n,alternation:s}),type:le.TOO_MANY_ALTS,ruleName:n.name,occurrence:s.idx}]:[])}function ih(n,e,t){const r=[];return C(n,i=>{const s=new nh;i.accept(s);const a=s.allProductions;C(a,o=>{const c=$i(o),l=o.maxLookahead||e,u=o.idx,f=pr(u,i,c,l)[0];if(D(Ne(f))){const h=t.buildEmptyRepetitionError({topLevelRule:i,repetition:o});r.push({message:h,type:le.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),r}function sh(n,e,t,r){const i=[],s=oe(n,(o,c,l)=>(e.definition[l].ignoreAmbiguities===!0||C(c,u=>{const d=[l];C(n,(f,h)=>{l!==h&&Vr(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&d.push(h)}),d.length>1&&!Vr(i,u)&&(i.push(u),o.push({alts:d,path:u}))}),o),[]);return S(s,o=>{const c=S(o.alts,u=>u+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:c,prefixPath:o.path}),type:le.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:o.alts}})}function ah(n,e,t,r){const i=oe(n,(a,o,c)=>{const l=S(o,u=>({idx:c,path:u}));return a.concat(l)},[]);return hn(Re(i,a=>{if(e.definition[a.idx].ignoreAmbiguities===!0)return[];const c=a.idx,l=a.path,u=ve(i,f=>e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{const h=[f.idx+1,c+1],m=e.idx===0?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:h,prefixPath:f.path}),type:le.AMBIGUOUS_PREFIX_ALTS,ruleName:t.name,occurrence:m,alternatives:h}})}))}function oh(n,e,t){const r=[],i=S(e,s=>s.name);return C(n,s=>{const a=s.name;if(ue(i,a)){const o=t.buildNamespaceConflictError(s);r.push({message:o,type:le.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),r}function ch(n){const e=Ai(n,{errMsgProvider:$f}),t={};return C(n.rules,r=>{t[r.name]=r}),Of(t,e.errMsgProvider)}function lh(n){return n=Ai(n,{errMsgProvider:lt}),qf(n.rules,n.tokenTypes,n.errMsgProvider,n.grammarName)}const _c="MismatchedTokenException",wc="NoViableAltException",Lc="EarlyExitException",$c="NotAllInputParsedException",Oc=[_c,wc,Lc,$c];Object.freeze(Oc);function Gn(n){return ue(Oc,n.name)}class mr extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class bc extends mr{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=_c}}class uh extends mr{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=wc}}class dh extends mr{constructor(e,t){super(e,t),this.name=$c}}class fh extends mr{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Lc}}const Nr={},Pc="InRuleRecoveryException";class hh extends Error{constructor(e){super(e),this.name=Pc}}class ph{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=_(e,"recoveryEnabled")?e.recoveryEnabled:Ye.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=mh)}getTokenToInsert(e){const t=Li(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,i){const s=this.findReSyncTokenType(),a=this.exportLexerState(),o=[];let c=!1;const l=this.LA(1);let u=this.LA(1);const d=()=>{const f=this.LA(0),h=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:f,ruleName:this.getCurrRuleFullName()}),m=new bc(h,l,this.LA(0));m.resyncedTokens=ln(o),this.SAVE_ERROR(m)};for(;!c;)if(this.tokenMatcher(u,i)){d();return}else if(r.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(u,s)?c=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,o));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){const r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new hh("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||D(t))return!1;const r=this.LA(1);return Dt(t,s=>this.tokenMatcher(r,s))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return ue(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),r=2;for(;;){const i=Dt(e,s=>Ec(t,s));if(i!==void 0)return i;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Nr;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return S(e,(r,i)=>i===0?Nr:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){const e=S(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return Ne(e)}getFollowSetFromFollowKey(e){if(e===Nr)return[tt];const t=e.ruleName+e.idxInCallingRule+dc+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,tt)||t.push(e),t}reSyncTo(e){const t=[];let r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return ln(t)}attemptInRepetitionRecovery(e,t,r,i,s,a,o){}getCurrentGrammarPath(e,t){const r=this.getHumanReadableRuleStack(),i=te(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:i,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return S(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}function mh(n,e,t,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[o];if(c===void 0){const f=this.getCurrRuleFullName(),h=this.getGAstProductions()[f];c=new s(h,i).startWalking(),this.firstAfterRepMap[o]=c}let l=c.token,u=c.occurrence;const d=c.isEndOfRule;this.RULE_STACK.length===1&&d&&l===void 0&&(l=tt,u=1),!(l===void 0||u===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,u,a)&&this.tryInRepetitionRecovery(n,e,t,l)}const gh=4,it=8,Mc=1<Cc(t,t,lt))}validateEmptyOrAlternatives(e){return Re(e,t=>eh(t,lt))}validateAmbiguousAlternationAlternatives(e,t){return Re(e,r=>th(r,t,lt))}validateSomeNonEmptyLookaheadPath(e,t){return ih(e,t,lt)}buildLookaheadForAlternation(e){return Uf(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Vf)}buildLookaheadForOptional(e){return Bf(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,$i(e.prodType),Wf)}}class yh{initLooksAhead(e){this.dynamicTokensEnabled=_(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Ye.dynamicTokensEnabled,this.maxLookahead=_(e,"maxLookahead")?e.maxLookahead:Ye.maxLookahead,this.lookaheadStrategy=_(e,"lookaheadStrategy")?e.lookaheadStrategy:new bi({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){C(e,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{const{alternation:r,repetition:i,option:s,repetitionMandatory:a,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:c}=Rh(t);C(r,l=>{const u=l.idx===0?"":l.idx;this.TRACE_INIT(`${Fe(l)}${u}`,()=>{const d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:l.idx,rule:t,maxLookahead:l.maxLookahead||this.maxLookahead,hasPredicates:l.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),f=Cr(this.fullRuleNameToShort[t.name],Mc,l.idx);this.setLaFuncCache(f,d)})}),C(i,l=>{this.computeLookaheadFunc(t,l.idx,Wr,"Repetition",l.maxLookahead,Fe(l))}),C(s,l=>{this.computeLookaheadFunc(t,l.idx,Dc,"Option",l.maxLookahead,Fe(l))}),C(a,l=>{this.computeLookaheadFunc(t,l.idx,jr,"RepetitionMandatory",l.maxLookahead,Fe(l))}),C(o,l=>{this.computeLookaheadFunc(t,l.idx,Ln,"RepetitionMandatoryWithSeparator",l.maxLookahead,Fe(l))}),C(c,l=>{this.computeLookaheadFunc(t,l.idx,Hr,"RepetitionWithSeparator",l.maxLookahead,Fe(l))})})})}computeLookaheadFunc(e,t,r,i,s,a){this.TRACE_INIT(`${a}${t===0?"":t}`,()=>{const o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),c=Cr(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(c,o)})}getKeyForAutomaticLookahead(e,t){const r=this.getLastExplicitRuleShortName();return Cr(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}}class Th extends Yt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}}const In=new Th;function Rh(n){In.reset(),n.accept(In);const e=In.dslMethods;return In.reset(),e}function Ns(n,e){isNaN(n.startOffset)===!0?(n.startOffset=e.startOffset,n.endOffset=e.endOffset):n.endOffseta.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${s.join(` + +`).replace(/\n/g,` + `)}`)}}};return t.prototype=r,t.prototype.constructor=t,t._RULE_NAMES=e,t}function Ih(n,e,t){const r=function(){};Fc(r,n+"BaseSemanticsWithDefaults");const i=Object.create(t.prototype);return C(e,s=>{i[s]=kh}),r.prototype=i,r.prototype.constructor=r,r}var Kr;(function(n){n[n.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",n[n.MISSING_METHOD=1]="MISSING_METHOD"})(Kr||(Kr={}));function xh(n,e){return Nh(n,e)}function Nh(n,e){const t=ve(e,i=>mt(n[i])===!1),r=S(t,i=>({msg:`Missing visitor method: <${i}> on ${n.constructor.name} CST Visitor.`,type:Kr.MISSING_METHOD,methodName:i}));return hn(r)}class Ch{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=_(e,"nodeLocationTracking")?e.nodeLocationTracking:Ye.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=q,this.cstFinallyStateUpdate=q,this.cstPostTerminal=q,this.cstPostNonTerminal=q,this.cstPostRule=q;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Cs,this.setNodeLocationFromNode=Cs,this.cstPostRule=q,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ns,this.setNodeLocationFromNode=Ns,this.cstPostRule=q,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=q,this.setInitialNodeLocation=q;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];Ah(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];vh(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(ze(this.baseCstVisitorConstructor)){const e=Sh(this.className,Mt(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(ze(this.baseCstVisitorWithDefaultsConstructor)){const e=Ih(this.className,Mt(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}class _h{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Bn}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Bn:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}class wh{ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=Vn){if(ue(this.definedRulesNames,e)){const a={message:lt.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:le.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(a)}this.definedRulesNames.push(e);const i=this.defineRule(e,t,r);return this[e]=i,i}OVERRIDE_RULE(e,t,r=Vn){const i=Zf(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);const s=this.defineRule(e,t,r);return this[e]=s,s}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return e.apply(this,t),!0}catch(i){if(Gn(i))return!1;throw i}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Dd(K(this.gastProductionsCache))}}class Lh{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Fn,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},_(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if(Z(e)){if(D(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if(Z(e))this.tokensMap=oe(e,(s,a)=>(s[a.name]=a,s),{});else if(_(e,"modes")&&$e(Ne(K(e.modes)),Cf)){const s=Ne(K(e.modes)),a=vi(s);this.tokensMap=oe(a,(o,c)=>(o[c.name]=c,o),{})}else if(zl(e))this.tokensMap=te(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=tt;const r=_(e,"modes")?Ne(K(e.modes)):K(e),i=$e(r,s=>D(s.categoryMatches));this.tokenMatcher=i?Fn:gn,yn(K(this.tokensMap))}defineRule(e,t,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const i=_(r,"resyncEnabled")?r.resyncEnabled:Vn.resyncEnabled,s=_(r,"recoveryValueFunc")?r.recoveryValueFunc:Vn.recoveryValueFunc,a=this.ruleShortNameIdx<a.call(this)&&o.call(this)}}else s=e;if(i.call(this)===!0)return s.call(this)}atLeastOneInternal(e,t){const r=this.getKeyForAutomaticLookahead(jr,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),s;if(typeof t!="function"){s=t.DEF;const a=t.GATE;if(a!==void 0){const o=i;i=()=>a.call(this)&&o.call(this)}}else s=t;if(i.call(this)===!0){let a=this.doSingleRepetition(s);for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(s)}else throw this.raiseEarlyExitException(e,B.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,jr,e,Ff)}atLeastOneSepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(Ln,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){const i=t.DEF,s=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const o=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,o,i,Ss],o,Ln,e,Ss)}else throw this.raiseEarlyExitException(e,B.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){const r=this.getKeyForAutomaticLookahead(Wr,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),s;if(typeof t!="function"){s=t.DEF;const o=t.GATE;if(o!==void 0){const c=i;i=()=>o.call(this)&&c.call(this)}}else s=t;let a=!0;for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(s);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,Wr,e,Df,a)}manySepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(Hr,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){const i=t.DEF,s=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const o=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,o,i,ks],o,Hr,e,ks)}}repetitionSepSecondInternal(e,t,r,i,s){for(;r();)this.CONSUME(t),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,i,s],r,Ln,e,s)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const r=this.getKeyForAutomaticLookahead(Mc,t),i=Z(e)?e:e.DEF,a=this.getLaFuncFromCache(r).call(this,i);if(a!==void 0)return i[a].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new dh(t,e))}}subruleInternal(e,t,r){let i;try{const s=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,i=e.apply(this,s),this.cstPostNonTerminal(i,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),i}catch(s){throw this.subruleInternalError(s,r,e.ruleName)}}subruleInternalError(e,t,r){throw Gn(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let i;try{const s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),i=s):this.consumeInternalError(e,s,r)}catch(s){i=this.consumeInternalRecovery(e,t,s)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,i),i}consumeInternalError(e,t,r){let i;const s=this.LA(0);throw r!==void 0&&r.ERR_MSG?i=r.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new bc(i,t,s))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){const i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(s){throw s.name===Pc?r:s}}else throw r}saveRecogState(){const e=this.errors,t=te(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),tt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}class $h{initErrorHandler(e){this._errors=[],this.errorMessageProvider=_(e,"errorMessageProvider")?e.errorMessageProvider:Ye.errorMessageProvider}SAVE_ERROR(e){if(Gn(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:te(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return te(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){const i=this.getCurrRuleFullName(),s=this.getGAstProductions()[i],o=pr(e,s,t,this.maxLookahead)[0],c=[];for(let u=1;u<=this.maxLookahead;u++)c.push(this.LA(u));const l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:c,previous:this.LA(0),customUserDescription:r,ruleName:i});throw this.SAVE_ERROR(new fh(l,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=hr(e,i,this.maxLookahead),a=[];for(let l=1;l<=this.maxLookahead;l++)a.push(this.LA(l));const o=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:a,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new uh(c,this.LA(1),o))}}class Oh{initContentAssist(){}computeContentAssist(e,t){const r=this.gastProductionsCache[e];if(ze(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return kc([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=be(e.ruleStack),i=this.getGAstProductions()[t];return new Mf(i,e).startWalking()}}const gr={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(gr);const _s=!0,ws=Math.pow(2,it)-1,Gc=vc({name:"RECORDING_PHASE_TOKEN",pattern:de.NA});yn([Gc]);const Uc=Li(Gc,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(Uc);const bh={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};class Ph{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(r,i){return this.consumeInternalRecord(r,e,i)},this[`SUBRULE${t}`]=function(r,i){return this.subruleInternalRecord(r,e,i)},this[`OPTION${t}`]=function(r){return this.optionInternalRecord(r,e)},this[`OR${t}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${t}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${t}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${t}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${t}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let t=0;t<10;t++){const r=t>0?t:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Bn}topLevelRuleRecord(e,t){try{const r=new qt({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,t){return rn.call(this,ee,e,t)}atLeastOneInternalRecord(e,t){rn.call(this,Ee,t,e)}atLeastOneSepFirstInternalRecord(e,t){rn.call(this,ke,t,e,_s)}manyInternalRecord(e,t){rn.call(this,W,t,e)}manySepFirstInternalRecord(e,t){rn.call(this,pe,t,e,_s)}orInternalRecord(e,t){return Mh.call(this,e,t)}subruleInternalRecord(e,t,r){if(Un(t),!e||_(e,"ruleName")===!1){const o=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const i=Ft(this.recordingProdStack),s=e.ruleName,a=new ce({idx:t,nonTerminalName:s,label:r==null?void 0:r.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?bh:gr}consumeInternalRecord(e,t,r){if(Un(t),!Rc(e)){const a=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}const i=Ft(this.recordingProdStack),s=new G({idx:t,terminalType:e,label:r==null?void 0:r.LABEL});return i.definition.push(s),Uc}}function rn(n,e,t,r=!1){Un(t);const i=Ft(this.recordingProdStack),s=mt(e)?e:e.DEF,a=new n({definition:[],idx:t});return r&&(a.separator=e.SEP),_(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),i.definition.push(a),this.recordingProdStack.pop(),gr}function Mh(n,e){Un(e);const t=Ft(this.recordingProdStack),r=Z(n)===!1,i=r===!1?n:n.DEF,s=new me({definition:[],idx:e,ignoreAmbiguities:r&&n.IGNORE_AMBIGUITIES===!0});_(n,"MAX_LOOKAHEAD")&&(s.maxLookahead=n.MAX_LOOKAHEAD);const a=ho(i,o=>mt(o.GATE));return s.hasPredicates=a,t.definition.push(s),C(i,o=>{const c=new he({definition:[]});s.definition.push(c),_(o,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:_(o,"GATE")&&(c.ignoreAmbiguities=!0),this.recordingProdStack.push(c),o.ALT.call(this),this.recordingProdStack.pop()}),gr}function Ls(n){return n===0?"":`${n}`}function Un(n){if(n<0||n>ws){const e=new Error(`Invalid DSL Method idx value: <${n}> + Idx value must be a none negative value smaller than ${ws+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}class Dh{initPerformanceTracer(e){if(_(e,"traceInitPerf")){const t=e.traceInitPerf,r=typeof t=="number";this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Ye.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);const{time:i,value:s}=lc(t),a=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,s}else return t()}}function Fh(n,e){e.forEach(t=>{const r=t.prototype;Object.getOwnPropertyNames(r).forEach(i=>{if(i==="constructor")return;const s=Object.getOwnPropertyDescriptor(r,i);s&&(s.get||s.set)?Object.defineProperty(n.prototype,i,s):n.prototype[i]=t.prototype[i]})})}const Bn=Li(tt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Bn);const Ye=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:At,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Vn=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var le;(function(n){n[n.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",n[n.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",n[n.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",n[n.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",n[n.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",n[n.LEFT_RECURSION=5]="LEFT_RECURSION",n[n.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",n[n.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",n[n.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",n[n.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",n[n.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",n[n.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",n[n.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",n[n.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(le||(le={}));function $s(n=void 0){return function(){return n}}class Tn{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",()=>{uc(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),C(this.definedRulesNames,i=>{const a=this[i].originalGrammarAction;let o;this.TRACE_INIT(`${i} Rule`,()=>{o=this.topLevelRuleRecord(i,a)}),this.gastProductionsCache[i]=o})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT("Grammar Resolving",()=>{r=ch({rules:K(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(D(r)&&this.skipValidations===!1){const i=lh({rules:K(this.gastProductionsCache),tokenTypes:K(this.tokensMap),errMsgProvider:lt,grammarName:t}),s=zf({lookaheadStrategy:this.lookaheadStrategy,rules:K(this.gastProductionsCache),tokenTypes:K(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(i,s)}}),D(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const i=jd(K(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,s;(s=(i=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(i,{rules:K(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(K(this.gastProductionsCache))})),!Tn.DEFER_DEFINITION_ERRORS_HANDLING&&!D(this.definitionErrors))throw e=S(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected: + ${e.join(` +------------------------------- +`)}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const r=this;if(r.initErrorHandler(t),r.initLexerAdapter(),r.initLooksAhead(t),r.initRecognizerEngine(e,t),r.initRecoverable(t),r.initTreeBuilder(t),r.initContentAssist(),r.initGastRecorder(t),r.initPerformanceTracer(t),_(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=_(t,"skipValidations")?t.skipValidations:Ye.skipValidations}}Tn.DEFER_DEFINITION_ERRORS_HANDLING=!1;Fh(Tn,[ph,yh,Ch,_h,Lh,wh,$h,Oh,Ph,Dh]);class Gh extends Tn{constructor(e,t=Ye){const r=te(t);r.outputCst=!1,super(e,r)}}function Ut(n,e,t){return`${n.name}_${e}_${t}`}const nt=1,Uh=2,Bc=4,Vc=5,Rn=7,Bh=8,Vh=9,Wh=10,jh=11,Wc=12;class Pi{constructor(e){this.target=e}isEpsilon(){return!1}}class Mi extends Pi{constructor(e,t){super(e),this.tokenType=t}}class jc extends Pi{constructor(e){super(e)}isEpsilon(){return!0}}class Di extends Pi{constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}}function Hh(n){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};Kh(e,n);const t=n.length;for(let r=0;rHc(n,e,a));return Xt(n,e,r,t,...i)}function Qh(n,e,t){const r=Y(n,e,t,{type:nt});st(n,r);const i=Xt(n,e,r,t,yt(n,e,t));return Zh(n,e,t,i)}function yt(n,e,t){const r=ve(S(t.definition,i=>Hc(n,e,i)),i=>i!==void 0);return r.length===1?r[0]:r.length===0?void 0:tp(n,r)}function Kc(n,e,t,r,i){const s=r.left,a=r.right,o=Y(n,e,t,{type:jh});st(n,o);const c=Y(n,e,t,{type:Wc});return s.loopback=o,c.loopback=o,n.decisionMap[Ut(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",t.idx)]=o,H(a,o),i===void 0?(H(o,s),H(o,c)):(H(o,c),H(o,i.left),H(i.right,s)),{left:s,right:c}}function zc(n,e,t,r,i){const s=r.left,a=r.right,o=Y(n,e,t,{type:Wh});st(n,o);const c=Y(n,e,t,{type:Wc}),l=Y(n,e,t,{type:Vh});return o.loopback=l,c.loopback=l,H(o,s),H(o,c),H(a,l),i!==void 0?(H(l,c),H(l,i.left),H(i.right,s)):H(l,o),n.decisionMap[Ut(e,i?"RepetitionWithSeparator":"Repetition",t.idx)]=o,{left:o,right:c}}function Zh(n,e,t,r){const i=r.left,s=r.right;return H(i,s),n.decisionMap[Ut(e,"Option",t.idx)]=i,r}function st(n,e){return n.decisionStates.push(e),e.decision=n.decisionStates.length-1,e.decision}function Xt(n,e,t,r,...i){const s=Y(n,e,r,{type:Bh,start:t});t.end=s;for(const o of i)o!==void 0?(H(t,o.left),H(o.right,s)):H(t,s);const a={left:t,right:s};return n.decisionMap[Ut(e,ep(r),r.idx)]=t,a}function ep(n){if(n instanceof me)return"Alternation";if(n instanceof ee)return"Option";if(n instanceof W)return"Repetition";if(n instanceof pe)return"RepetitionWithSeparator";if(n instanceof Ee)return"RepetitionMandatory";if(n instanceof ke)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function tp(n,e){const t=e.length;for(let s=0;se.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}}function qc(n,e=!0){return`${e?`a${n.alt}`:""}s${n.state.stateNumber}:${n.stack.map(t=>t.stateNumber.toString()).join("_")}`}function sp(n,e){const t={};return r=>{const i=r.toString();let s=t[i];return s!==void 0||(s={atnStartState:n,decision:e,states:{}},t[i]=s),s}}class Yc{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let r=0;rconsole.log(r)}initialize(e){this.atn=Hh(e.rules),this.dfas=op(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:r,hasPredicates:i,dynamicTokensEnabled:s}=e,a=this.dfas,o=this.logging,c=Ut(r,"Alternation",t),u=this.atn.decisionMap[c].decision,d=S(Is({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),f=>S(f,h=>h[0]));if(bs(d,!1)&&!s){const f=oe(d,(h,m,g)=>(C(m,A=>{A&&(h[A.tokenTypeIdx]=g,C(A.categoryMatches,y=>{h[y]=g}))}),h),{});return i?function(h){var m;const g=this.LA(1),A=f[g.tokenTypeIdx];if(h!==void 0&&A!==void 0){const y=(m=h[A])===null||m===void 0?void 0:m.GATE;if(y!==void 0&&y.call(this)===!1)return}return A}:function(){const h=this.LA(1);return f[h.tokenTypeIdx]}}else return i?function(f){const h=new Yc,m=f===void 0?0:f.length;for(let A=0;AS(f,h=>h[0]));if(bs(d)&&d[0][0]&&!s){const f=d[0],h=Ne(f);if(h.length===1&&D(h[0].categoryMatches)){const g=h[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===g}}else{const m=oe(h,(g,A)=>(A!==void 0&&(g[A.tokenTypeIdx]=!0,C(A.categoryMatches,y=>{g[y]=!0})),g),{});return function(){const g=this.LA(1);return m[g.tokenTypeIdx]===!0}}}return function(){const f=_r.call(this,a,u,Os,o);return typeof f=="object"?!1:f===0}}}function bs(n,e=!0){const t=new Set;for(const r of n){const i=new Set;for(const s of r){if(s===void 0){if(e)break;return!1}const a=[s.tokenTypeIdx].concat(s.categoryMatches);for(const o of a)if(t.has(o)){if(!i.has(o))return!1}else t.add(o),i.add(o)}}return!0}function op(n){const e=n.decisionStates.length,t=Array(e);for(let r=0;rEt(i)).join(", "),t=n.production.idx===0?"":n.production.idx;let r=`Ambiguous Alternatives Detected: <${n.ambiguityIndices.join(", ")}> in <${fp(n.production)}${t}> inside <${n.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,r}function fp(n){if(n instanceof ce)return"SUBRULE";if(n instanceof ee)return"OPTION";if(n instanceof me)return"OR";if(n instanceof Ee)return"AT_LEAST_ONE";if(n instanceof ke)return"AT_LEAST_ONE_SEP";if(n instanceof pe)return"MANY_SEP";if(n instanceof W)return"MANY";if(n instanceof G)return"CONSUME";throw Error("non exhaustive match")}function hp(n,e,t){const r=Re(e.configs.elements,s=>s.state.transitions),i=ku(r.filter(s=>s instanceof Mi).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:t,possibleTokenTypes:i,tokenPath:n}}function pp(n,e){return n.edges[e.tokenTypeIdx]}function mp(n,e,t){const r=new zr,i=[];for(const a of n.elements){if(t.is(a.alt)===!1)continue;if(a.state.type===Rn){i.push(a);continue}const o=a.state.transitions.length;for(let c=0;c0&&!Ap(s))for(const a of i)s.add(a);return s}function gp(n,e){if(n instanceof Mi&&Ec(e,n.tokenType))return n.target}function yp(n,e){let t;for(const r of n.elements)if(e.is(r.alt)===!0){if(t===void 0)t=r.alt;else if(t!==r.alt)return}return t}function Xc(n){return{configs:n,edges:{},isAcceptState:!1,prediction:-1}}function Ps(n,e,t,r){return r=Jc(n,r),e.edges[t.tokenTypeIdx]=r,r}function Jc(n,e){if(e===Wn)return e;const t=e.configs.key,r=n.states[t];return r!==void 0?r:(e.configs.finalize(),n.states[t]=e,e)}function Tp(n){const e=new zr,t=n.transitions.length;for(let r=0;r0){const i=[...n.stack],a={state:i.pop(),alt:n.alt,stack:i};jn(a,e)}else e.add(n);return}t.epsilonOnlyTransitions||e.add(n);const r=t.transitions.length;for(let i=0;i1)return!0;return!1}function Ip(n){for(const e of Array.from(n.values()))if(Object.keys(e).length===1)return!0;return!1}var Ms;(function(n){function e(t){return typeof t=="string"}n.is=e})(Ms||(Ms={}));var qr;(function(n){function e(t){return typeof t=="string"}n.is=e})(qr||(qr={}));var Ds;(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Ds||(Ds={}));var Hn;(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Hn||(Hn={}));var P;(function(n){function e(r,i){return r===Number.MAX_VALUE&&(r=Hn.MAX_VALUE),i===Number.MAX_VALUE&&(i=Hn.MAX_VALUE),{line:r,character:i}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&p.uinteger(i.line)&&p.uinteger(i.character)}n.is=t})(P||(P={}));var b;(function(n){function e(r,i,s,a){if(p.uinteger(r)&&p.uinteger(i)&&p.uinteger(s)&&p.uinteger(a))return{start:P.create(r,i),end:P.create(s,a)};if(P.is(r)&&P.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&P.is(i.start)&&P.is(i.end)}n.is=t})(b||(b={}));var Kn;(function(n){function e(r,i){return{uri:r,range:i}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&b.is(i.range)&&(p.string(i.uri)||p.undefined(i.uri))}n.is=t})(Kn||(Kn={}));var Fs;(function(n){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&b.is(i.targetRange)&&p.string(i.targetUri)&&b.is(i.targetSelectionRange)&&(b.is(i.originSelectionRange)||p.undefined(i.originSelectionRange))}n.is=t})(Fs||(Fs={}));var Yr;(function(n){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.numberRange(i.red,0,1)&&p.numberRange(i.green,0,1)&&p.numberRange(i.blue,0,1)&&p.numberRange(i.alpha,0,1)}n.is=t})(Yr||(Yr={}));var Gs;(function(n){function e(r,i){return{range:r,color:i}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&b.is(i.range)&&Yr.is(i.color)}n.is=t})(Gs||(Gs={}));var Us;(function(n){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.string(i.label)&&(p.undefined(i.textEdit)||Vt.is(i))&&(p.undefined(i.additionalTextEdits)||p.typedArray(i.additionalTextEdits,Vt.is))}n.is=t})(Us||(Us={}));var Bs;(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(Bs||(Bs={}));var Vs;(function(n){function e(r,i,s,a,o,c){const l={startLine:r,endLine:i};return p.defined(s)&&(l.startCharacter=s),p.defined(a)&&(l.endCharacter=a),p.defined(o)&&(l.kind=o),p.defined(c)&&(l.collapsedText=c),l}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.uinteger(i.startLine)&&p.uinteger(i.startLine)&&(p.undefined(i.startCharacter)||p.uinteger(i.startCharacter))&&(p.undefined(i.endCharacter)||p.uinteger(i.endCharacter))&&(p.undefined(i.kind)||p.string(i.kind))}n.is=t})(Vs||(Vs={}));var Xr;(function(n){function e(r,i){return{location:r,message:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&Kn.is(i.location)&&p.string(i.message)}n.is=t})(Xr||(Xr={}));var Ws;(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(Ws||(Ws={}));var js;(function(n){n.Unnecessary=1,n.Deprecated=2})(js||(js={}));var Hs;(function(n){function e(t){const r=t;return p.objectLiteral(r)&&p.string(r.href)}n.is=e})(Hs||(Hs={}));var zn;(function(n){function e(r,i,s,a,o,c){let l={range:r,message:i};return p.defined(s)&&(l.severity=s),p.defined(a)&&(l.code=a),p.defined(o)&&(l.source=o),p.defined(c)&&(l.relatedInformation=c),l}n.create=e;function t(r){var i;let s=r;return p.defined(s)&&b.is(s.range)&&p.string(s.message)&&(p.number(s.severity)||p.undefined(s.severity))&&(p.integer(s.code)||p.string(s.code)||p.undefined(s.code))&&(p.undefined(s.codeDescription)||p.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(p.string(s.source)||p.undefined(s.source))&&(p.undefined(s.relatedInformation)||p.typedArray(s.relatedInformation,Xr.is))}n.is=t})(zn||(zn={}));var Bt;(function(n){function e(r,i,...s){let a={title:r,command:i};return p.defined(s)&&s.length>0&&(a.arguments=s),a}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.title)&&p.string(i.command)}n.is=t})(Bt||(Bt={}));var Vt;(function(n){function e(s,a){return{range:s,newText:a}}n.replace=e;function t(s,a){return{range:{start:s,end:s},newText:a}}n.insert=t;function r(s){return{range:s,newText:""}}n.del=r;function i(s){const a=s;return p.objectLiteral(a)&&p.string(a.newText)&&b.is(a.range)}n.is=i})(Vt||(Vt={}));var Jr;(function(n){function e(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.string(i.label)&&(p.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(p.string(i.description)||i.description===void 0)}n.is=t})(Jr||(Jr={}));var Wt;(function(n){function e(t){const r=t;return p.string(r)}n.is=e})(Wt||(Wt={}));var Ks;(function(n){function e(s,a,o){return{range:s,newText:a,annotationId:o}}n.replace=e;function t(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}n.insert=t;function r(s,a){return{range:s,newText:"",annotationId:a}}n.del=r;function i(s){const a=s;return Vt.is(a)&&(Jr.is(a.annotationId)||Wt.is(a.annotationId))}n.is=i})(Ks||(Ks={}));var Qr;(function(n){function e(r,i){return{textDocument:r,edits:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&ri.is(i.textDocument)&&Array.isArray(i.edits)}n.is=t})(Qr||(Qr={}));var Zr;(function(n){function e(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(r){let i=r;return i&&i.kind==="create"&&p.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||p.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||p.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Wt.is(i.annotationId))}n.is=t})(Zr||(Zr={}));var ei;(function(n){function e(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}n.create=e;function t(r){let i=r;return i&&i.kind==="rename"&&p.string(i.oldUri)&&p.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||p.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||p.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Wt.is(i.annotationId))}n.is=t})(ei||(ei={}));var ti;(function(n){function e(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(r){let i=r;return i&&i.kind==="delete"&&p.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||p.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||p.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Wt.is(i.annotationId))}n.is=t})(ti||(ti={}));var ni;(function(n){function e(t){let r=t;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>p.string(i.kind)?Zr.is(i)||ei.is(i)||ti.is(i):Qr.is(i)))}n.is=e})(ni||(ni={}));var zs;(function(n){function e(r){return{uri:r}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)}n.is=t})(zs||(zs={}));var qs;(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)&&p.integer(i.version)}n.is=t})(qs||(qs={}));var ri;(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)&&(i.version===null||p.integer(i.version))}n.is=t})(ri||(ri={}));var Ys;(function(n){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)&&p.string(i.languageId)&&p.integer(i.version)&&p.string(i.text)}n.is=t})(Ys||(Ys={}));var ii;(function(n){n.PlainText="plaintext",n.Markdown="markdown";function e(t){const r=t;return r===n.PlainText||r===n.Markdown}n.is=e})(ii||(ii={}));var un;(function(n){function e(t){const r=t;return p.objectLiteral(t)&&ii.is(r.kind)&&p.string(r.value)}n.is=e})(un||(un={}));var Xs;(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(Xs||(Xs={}));var Js;(function(n){n.PlainText=1,n.Snippet=2})(Js||(Js={}));var Qs;(function(n){n.Deprecated=1})(Qs||(Qs={}));var Zs;(function(n){function e(r,i,s){return{newText:r,insert:i,replace:s}}n.create=e;function t(r){const i=r;return i&&p.string(i.newText)&&b.is(i.insert)&&b.is(i.replace)}n.is=t})(Zs||(Zs={}));var ea;(function(n){n.asIs=1,n.adjustIndentation=2})(ea||(ea={}));var ta;(function(n){function e(t){const r=t;return r&&(p.string(r.detail)||r.detail===void 0)&&(p.string(r.description)||r.description===void 0)}n.is=e})(ta||(ta={}));var na;(function(n){function e(t){return{label:t}}n.create=e})(na||(na={}));var ra;(function(n){function e(t,r){return{items:t||[],isIncomplete:!!r}}n.create=e})(ra||(ra={}));var qn;(function(n){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(r){const i=r;return p.string(i)||p.objectLiteral(i)&&p.string(i.language)&&p.string(i.value)}n.is=t})(qn||(qn={}));var ia;(function(n){function e(t){let r=t;return!!r&&p.objectLiteral(r)&&(un.is(r.contents)||qn.is(r.contents)||p.typedArray(r.contents,qn.is))&&(t.range===void 0||b.is(t.range))}n.is=e})(ia||(ia={}));var sa;(function(n){function e(t,r){return r?{label:t,documentation:r}:{label:t}}n.create=e})(sa||(sa={}));var aa;(function(n){function e(t,r,...i){let s={label:t};return p.defined(r)&&(s.documentation=r),p.defined(i)?s.parameters=i:s.parameters=[],s}n.create=e})(aa||(aa={}));var oa;(function(n){n.Text=1,n.Read=2,n.Write=3})(oa||(oa={}));var ca;(function(n){function e(t,r){let i={range:t};return p.number(r)&&(i.kind=r),i}n.create=e})(ca||(ca={}));var la;(function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26})(la||(la={}));var ua;(function(n){n.Deprecated=1})(ua||(ua={}));var da;(function(n){function e(t,r,i,s,a){let o={name:t,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}n.create=e})(da||(da={}));var fa;(function(n){function e(t,r,i,s){return s!==void 0?{name:t,kind:r,location:{uri:i,range:s}}:{name:t,kind:r,location:{uri:i}}}n.create=e})(fa||(fa={}));var ha;(function(n){function e(r,i,s,a,o,c){let l={name:r,detail:i,kind:s,range:a,selectionRange:o};return c!==void 0&&(l.children=c),l}n.create=e;function t(r){let i=r;return i&&p.string(i.name)&&p.number(i.kind)&&b.is(i.range)&&b.is(i.selectionRange)&&(i.detail===void 0||p.string(i.detail))&&(i.deprecated===void 0||p.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}n.is=t})(ha||(ha={}));var pa;(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll"})(pa||(pa={}));var Yn;(function(n){n.Invoked=1,n.Automatic=2})(Yn||(Yn={}));var ma;(function(n){function e(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}n.create=e;function t(r){let i=r;return p.defined(i)&&p.typedArray(i.diagnostics,zn.is)&&(i.only===void 0||p.typedArray(i.only,p.string))&&(i.triggerKind===void 0||i.triggerKind===Yn.Invoked||i.triggerKind===Yn.Automatic)}n.is=t})(ma||(ma={}));var ga;(function(n){function e(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):Bt.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}n.create=e;function t(r){let i=r;return i&&p.string(i.title)&&(i.diagnostics===void 0||p.typedArray(i.diagnostics,zn.is))&&(i.kind===void 0||p.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Bt.is(i.command))&&(i.isPreferred===void 0||p.boolean(i.isPreferred))&&(i.edit===void 0||ni.is(i.edit))}n.is=t})(ga||(ga={}));var ya;(function(n){function e(r,i){let s={range:r};return p.defined(i)&&(s.data=i),s}n.create=e;function t(r){let i=r;return p.defined(i)&&b.is(i.range)&&(p.undefined(i.command)||Bt.is(i.command))}n.is=t})(ya||(ya={}));var Ta;(function(n){function e(r,i){return{tabSize:r,insertSpaces:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.uinteger(i.tabSize)&&p.boolean(i.insertSpaces)}n.is=t})(Ta||(Ta={}));var Ra;(function(n){function e(r,i,s){return{range:r,target:i,data:s}}n.create=e;function t(r){let i=r;return p.defined(i)&&b.is(i.range)&&(p.undefined(i.target)||p.string(i.target))}n.is=t})(Ra||(Ra={}));var Aa;(function(n){function e(r,i){return{range:r,parent:i}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&b.is(i.range)&&(i.parent===void 0||n.is(i.parent))}n.is=t})(Aa||(Aa={}));var va;(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",n.decorator="decorator"})(va||(va={}));var Ea;(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(Ea||(Ea={}));var ka;(function(n){function e(t){const r=t;return p.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}n.is=e})(ka||(ka={}));var Sa;(function(n){function e(r,i){return{range:r,text:i}}n.create=e;function t(r){const i=r;return i!=null&&b.is(i.range)&&p.string(i.text)}n.is=t})(Sa||(Sa={}));var Ia;(function(n){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}n.create=e;function t(r){const i=r;return i!=null&&b.is(i.range)&&p.boolean(i.caseSensitiveLookup)&&(p.string(i.variableName)||i.variableName===void 0)}n.is=t})(Ia||(Ia={}));var xa;(function(n){function e(r,i){return{range:r,expression:i}}n.create=e;function t(r){const i=r;return i!=null&&b.is(i.range)&&(p.string(i.expression)||i.expression===void 0)}n.is=t})(xa||(xa={}));var Na;(function(n){function e(r,i){return{frameId:r,stoppedLocation:i}}n.create=e;function t(r){const i=r;return p.defined(i)&&b.is(r.stoppedLocation)}n.is=t})(Na||(Na={}));var si;(function(n){n.Type=1,n.Parameter=2;function e(t){return t===1||t===2}n.is=e})(si||(si={}));var ai;(function(n){function e(r){return{value:r}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&(i.tooltip===void 0||p.string(i.tooltip)||un.is(i.tooltip))&&(i.location===void 0||Kn.is(i.location))&&(i.command===void 0||Bt.is(i.command))}n.is=t})(ai||(ai={}));var Ca;(function(n){function e(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&P.is(i.position)&&(p.string(i.label)||p.typedArray(i.label,ai.is))&&(i.kind===void 0||si.is(i.kind))&&i.textEdits===void 0||p.typedArray(i.textEdits,Vt.is)&&(i.tooltip===void 0||p.string(i.tooltip)||un.is(i.tooltip))&&(i.paddingLeft===void 0||p.boolean(i.paddingLeft))&&(i.paddingRight===void 0||p.boolean(i.paddingRight))}n.is=t})(Ca||(Ca={}));var _a;(function(n){function e(t){return{kind:"snippet",value:t}}n.createSnippet=e})(_a||(_a={}));var wa;(function(n){function e(t,r,i,s){return{insertText:t,filterText:r,range:i,command:s}}n.create=e})(wa||(wa={}));var La;(function(n){function e(t){return{items:t}}n.create=e})(La||(La={}));var $a;(function(n){n.Invoked=0,n.Automatic=1})($a||($a={}));var Oa;(function(n){function e(t,r){return{range:t,text:r}}n.create=e})(Oa||(Oa={}));var ba;(function(n){function e(t,r){return{triggerKind:t,selectedCompletionInfo:r}}n.create=e})(ba||(ba={}));var Pa;(function(n){function e(t){const r=t;return p.objectLiteral(r)&&qr.is(r.uri)&&p.string(r.name)}n.is=e})(Pa||(Pa={}));var Ma;(function(n){function e(s,a,o,c){return new xp(s,a,o,c)}n.create=e;function t(s){let a=s;return!!(p.defined(a)&&p.string(a.uri)&&(p.undefined(a.languageId)||p.string(a.languageId))&&p.uinteger(a.lineCount)&&p.func(a.getText)&&p.func(a.positionAt)&&p.func(a.offsetAt))}n.is=t;function r(s,a){let o=s.getText(),c=i(a,(u,d)=>{let f=u.range.start.line-d.range.start.line;return f===0?u.range.start.character-d.range.start.character:f}),l=o.length;for(let u=c.length-1;u>=0;u--){let d=c[u],f=s.offsetAt(d.range.start),h=s.offsetAt(d.range.end);if(h<=l)o=o.substring(0,f)+d.newText+o.substring(h,o.length);else throw new Error("Overlapping edit");l=f}return o}n.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,c=s.slice(0,o),l=s.slice(o);i(c,a),i(l,a);let u=0,d=0,f=0;for(;u0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(i===0)return P.create(0,e);for(;re?i=a:r=a+1}let s=r-1;return P.create(s,e-t[s])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1"u"}n.undefined=r;function i(h){return h===!0||h===!1}n.boolean=i;function s(h){return e.call(h)==="[object String]"}n.string=s;function a(h){return e.call(h)==="[object Number]"}n.number=a;function o(h,m,g){return e.call(h)==="[object Number]"&&m<=h&&h<=g}n.numberRange=o;function c(h){return e.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}n.integer=c;function l(h){return e.call(h)==="[object Number]"&&0<=h&&h<=2147483647}n.uinteger=l;function u(h){return e.call(h)==="[object Function]"}n.func=u;function d(h){return h!==null&&typeof h=="object"}n.objectLiteral=d;function f(h,m){return Array.isArray(h)&&h.every(m)}n.typedArray=f})(p||(p={}));class Np{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(e){return this.rootNode=new Zc(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const t=new Ui;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){const r=new oi(e.startOffset,e.image.length,Mr(e),e.tokenType,!1);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){const t=e.container;if(t){const r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}construct(e){const t=this.current;typeof e.$type=="string"&&(this.current.astNode=e),e.$cstNode=t;const r=this.nodeStack.pop();(r==null?void 0:r.content.length)===0&&this.removeNode(r)}addHiddenTokens(e){for(const t of e){const r=new oi(t.startOffset,t.image.length,Mr(t),t.tokenType,!0);r.root=this.rootNode,this.addHiddenToken(this.rootNode,r)}}addHiddenToken(e,t){const{offset:r,end:i}=t;for(let s=0;so&&i=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}}class Bi extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,Bi.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...r){return this.addParents(r),super.splice(e,t,...r)}addParents(e){for(const t of e)t.container=this.parent}}class Zc extends Ui{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const ci=Symbol("Datatype");function wr(n){return n.$type===ci}const Da="​",el=n=>n.endsWith(Da)?n:n+Da;class tl{constructor(e){this._unorderedGroups=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition;this.wrapper=new $p(t,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class Cp extends tl{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Np,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const r=e.fragment?void 0:Ni(e)?ci:lr(e),i=this.wrapper.DEFINE_RULE(el(e.name),this.startImplementation(r,t).bind(this));return e.entry&&(this.mainRule=i),i}parse(e){this.nodeBuilder.buildRootNode(e);const t=this.lexer.tokenize(e);this.wrapper.input=t.tokens;const r=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(t.hidden),this.unorderedGroups.clear(),{value:r,lexerErrors:t.errors,parserErrors:this.wrapper.errors}}startImplementation(e,t){return r=>{if(!this.isRecording()){const s={$type:e};this.stack.push(s),e===ci&&(s.value="")}let i;try{i=t(r)}catch{i=void 0}return!this.isRecording()&&i===void 0&&(i=this.construct()),i}}consume(e,t,r){const i=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(i)){const s=this.nodeBuilder.buildLeafNode(i,r),{assignment:a,isCrossRef:o}=this.getAssignment(r),c=this.current;if(a){const l=dt(r)?i.image:this.converter.convert(i.image,s);this.assign(a.operator,a.feature,l,s,o)}else if(wr(c)){let l=i.image;dt(r)||(l=this.converter.convert(l,s).toString()),c.value+=l}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,t,r,i){let s;this.isRecording()||(s=this.nodeBuilder.buildCompositeNode(r));const a=this.wrapper.wrapSubrule(e,t,i);!this.isRecording()&&s&&s.length>0&&this.performSubruleAssignment(a,r,s)}performSubruleAssignment(e,t,r){const{assignment:i,isCrossRef:s}=this.getAssignment(t);if(i)this.assign(i.operator,i.feature,e,r,s);else if(!i){const a=this.current;if(wr(a))a.value+=e.toString();else if(typeof e=="object"&&e){const o=e.$type,c=this.assignWithoutOverride(e,a);o&&(c.$type=o);const l=c;this.stack.pop(),this.stack.push(l)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(!r.$cstNode&&t.feature&&t.operator){r=this.construct(!1);const s=r.$cstNode.feature;this.nodeBuilder.buildCompositeNode(s)}const i={$type:e};this.stack.pop(),this.stack.push(i),t.feature&&t.operator&&this.assign(t.operator,t.feature,r,r.$cstNode,!1)}}construct(e=!0){if(this.isRecording())return;const t=this.current;return ad(t),this.nodeBuilder.construct(t),e&&this.stack.pop(),wr(t)?this.converter.convert(t.value,t.$cstNode):(cd(this.astReflection,t),t)}getAssignment(e){if(!this.assignmentMap.has(e)){const t=ar(e,ut);this.assignmentMap.set(e,{assignment:t,isCrossRef:t?ki(t.terminal):!1})}return this.assignmentMap.get(e)}assign(e,t,r,i,s){const a=this.current;let o;switch(s&&typeof r=="string"?o=this.linker.buildReference(a,t,i,r):o=r,e){case"=":{a[t]=o;break}case"?=":{a[t]=!0;break}case"+=":Array.isArray(a[t])||(a[t]=[]),a[t].push(o)}}assignWithoutOverride(e,t){for(const[r,i]of Object.entries(t)){const s=e[r];s===void 0?e[r]=i:Array.isArray(s)&&Array.isArray(i)&&(i.push(...s),e[r]=i)}return e}get definitionErrors(){return this.wrapper.definitionErrors}}class _p{buildMismatchTokenMessage(e){return At.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return At.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return At.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return At.buildEarlyExitMessage(e)}}class nl extends _p{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class wp extends tl{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e);return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const r=this.wrapper.DEFINE_RULE(el(e.name),this.startImplementation(t).bind(this));return e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}}const Lp={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new nl};class $p extends Gh{constructor(e,t){const r=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},Lp),{lookaheadStrategy:r?new bi({maxLookahead:t.maxLookahead}):new ap}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}}function rl(n,e,t){return Op({parser:e,tokens:t,rules:new Map,ruleNames:new Map},n),e}function Op(n,e){const t=tc(e,!1),r=Q(e.rules).filter(Ce).filter(i=>t.has(i));for(const i of r){const s=Object.assign(Object.assign({},n),{consume:1,optional:1,subrule:1,many:1,or:1});s.rules.set(i.name,n.parser.rule(i,pt(s,i.definition)))}}function pt(n,e,t=!1){let r;if(dt(e))r=Up(n,e);else if(sr(e))r=bp(n,e);else if(ut(e))r=pt(n,e.terminal);else if(ki(e))r=il(n,e);else if(ft(e))r=Pp(n,e);else if(bo(e))r=Dp(n,e);else if(qo(e))r=Fp(n,e);else if(Si(e))r=Gp(n,e);else if(Qu(e)){const i=n.consume++;r=()=>n.parser.consume(i,tt,e)}else throw new yo(e.$cstNode,`Unexpected element type: ${e.$type}`);return sl(n,t?void 0:Xn(e),r,e.cardinality)}function bp(n,e){const t=lr(e);return()=>n.parser.action(t,e)}function Pp(n,e){const t=e.rule.ref;if(Ce(t)){const r=n.subrule++,i=e.arguments.length>0?Mp(t,e.arguments):()=>({});return s=>n.parser.subrule(r,al(n,t),e,i(s))}else if(gt(t)){const r=n.consume++,i=li(n,t.name);return()=>n.parser.consume(r,i,e)}else if(t)ir();else throw new yo(e.$cstNode,`Undefined rule type: ${e.$type}`)}function Mp(n,e){const t=e.map(r=>He(r.value));return r=>{const i={};for(let s=0;se(r)||t(r)}else if(Fu(n)){const e=He(n.left),t=He(n.right);return r=>e(r)&&t(r)}else if(Bu(n)){const e=He(n.value);return t=>!e(t)}else if(ju(n)){const e=n.parameter.ref.name;return t=>t!==void 0&&t[e]===!0}else if(Du(n)){const e=!!n.true;return()=>e}ir()}function Dp(n,e){if(e.elements.length===1)return pt(n,e.elements[0]);{const t=[];for(const i of e.elements){const s={ALT:pt(n,i,!0)},a=Xn(i);a&&(s.GATE=He(a)),t.push(s)}const r=n.or++;return i=>n.parser.alternatives(r,t.map(s=>{const a={ALT:()=>s.ALT(i)},o=s.GATE;return o&&(a.GATE=()=>o(i)),a}))}}function Fp(n,e){if(e.elements.length===1)return pt(n,e.elements[0]);const t=[];for(const o of e.elements){const c={ALT:pt(n,o,!0)},l=Xn(o);l&&(c.GATE=He(l)),t.push(c)}const r=n.or++,i=(o,c)=>{const l=c.getRuleStack().join("-");return`uGroup_${o}_${l}`},s=o=>n.parser.alternatives(r,t.map((c,l)=>{const u={ALT:()=>!0},d=n.parser;u.ALT=()=>{if(c.ALT(o),!d.isRecording()){const h=i(r,d);d.unorderedGroups.get(h)||d.unorderedGroups.set(h,[]);const m=d.unorderedGroups.get(h);typeof(m==null?void 0:m[l])>"u"&&(m[l]=!0)}};const f=c.GATE;return f?u.GATE=()=>f(o):u.GATE=()=>{const h=d.unorderedGroups.get(i(r,d));return!(h!=null&&h[l])},u})),a=sl(n,Xn(e),s,"*");return o=>{a(o),n.parser.isRecording()||n.parser.unorderedGroups.delete(i(r,n.parser))}}function Gp(n,e){const t=e.elements.map(r=>pt(n,r));return r=>t.forEach(i=>i(r))}function Xn(n){if(Si(n))return n.guardCondition}function il(n,e,t=e.terminal){if(t)if(ft(t)&&Ce(t.rule.ref)){const r=n.subrule++;return i=>n.parser.subrule(r,al(n,t.rule.ref),e,i)}else if(ft(t)&>(t.rule.ref)){const r=n.consume++,i=li(n,t.rule.ref.name);return()=>n.parser.consume(r,i,e)}else if(dt(t)){const r=n.consume++,i=li(n,t.value);return()=>n.parser.consume(r,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const r=ic(e.type.ref),i=r==null?void 0:r.terminal;if(!i)throw new Error("Could not find name assignment for type: "+lr(e.type.ref));return il(n,e,i)}}function Up(n,e){const t=n.consume++,r=n.tokens[e.value];if(!r)throw new Error("Could not find token for keyword: "+e.value);return()=>n.parser.consume(t,r,e)}function sl(n,e,t,r){const i=e&&He(e);if(!r)if(i){const s=n.or++;return a=>n.parser.alternatives(s,[{ALT:()=>t(a),GATE:()=>i(a)},{ALT:$s(),GATE:()=>!i(a)}])}else return t;if(r==="*"){const s=n.many++;return a=>n.parser.many(s,{DEF:()=>t(a),GATE:i?()=>i(a):void 0})}else if(r==="+"){const s=n.many++;if(i){const a=n.or++;return o=>n.parser.alternatives(a,[{ALT:()=>n.parser.atLeastOne(s,{DEF:()=>t(o)}),GATE:()=>i(o)},{ALT:$s(),GATE:()=>!i(o)}])}else return a=>n.parser.atLeastOne(s,{DEF:()=>t(a)})}else if(r==="?"){const s=n.optional++;return a=>n.parser.optional(s,{DEF:()=>t(a),GATE:i?()=>i(a):void 0})}else ir()}function al(n,e){const t=Bp(n,e),r=n.rules.get(t);if(!r)throw new Error(`Rule "${t}" not found."`);return r}function Bp(n,e){if(Ce(e))return e.name;if(n.ruleNames.has(e))return n.ruleNames.get(e);{let t=e,r=t.$container,i=e.$type;for(;!Ce(r);)(Si(r)||bo(r)||qo(r))&&(i=r.elements.indexOf(t).toString()+":"+i),t=r,r=r.$container;return i=r.name+":"+i,n.ruleNames.set(e,i),i}}function li(n,e){const t=n.tokens[e];if(!t)throw new Error(`Token "${e}" not found."`);return t}function Vp(n){const e=n.Grammar,t=n.parser.Lexer,r=new wp(n);return rl(e,r,t.definition),r.finalize(),r}function Wp(n){const e=jp(n);return e.finalize(),e}function jp(n){const e=n.Grammar,t=n.parser.Lexer,r=new Cp(n);return rl(e,r,t.definition)}class ol{buildTokens(e,t){const r=Q(tc(e,!1)),i=this.buildTerminalTokens(r),s=this.buildKeywordTokens(r,i,t);return i.forEach(a=>{const o=a.PATTERN;typeof o=="object"&&o&&"test"in o&&cs(o)?s.unshift(a):s.push(a)}),s}buildTerminalTokens(e){return e.filter(gt).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){const t=Ci(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:r,LINE_BREAKS:!0};return e.hidden&&(i.GROUP=cs(t)?de.SKIPPED:"hidden"),i}requiresCustomPattern(e){return e.flags.includes("u")?!0:!!(e.source.includes("?<=")||e.source.includes("?(t.lastIndex=i,t.exec(r))}buildKeywordTokens(e,t,r){return e.filter(Ce).flatMap(i=>pn(i).filter(dt)).distinct(i=>i.value).toArray().sort((i,s)=>s.value.length-i.value.length).map(i=>this.buildKeywordToken(i,t,!!(r!=null&&r.caseInsensitive)))}buildKeywordToken(e,t,r){return{name:e.value,PATTERN:this.buildKeywordPattern(e,r),LONGER_ALT:this.findLongerAlt(e,t)}}buildKeywordPattern(e,t){return t?new RegExp(gd(e.value)):e.value}findLongerAlt(e,t){return t.reduce((r,i)=>{const s=i==null?void 0:i.PATTERN;return s!=null&&s.source&&yd("^"+s.source+"$",e.value)&&r.push(i),r},[])}}class cl{convert(e,t){let r=t.grammarSource;if(ki(r)&&(r=vd(r)),ft(r)){const i=r.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,t)}return e}runConverter(e,t,r){var i;switch(e.name.toUpperCase()){case"INT":return je.convertInt(t);case"STRING":return je.convertString(t);case"ID":return je.convertID(t)}switch((i=Cd(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return je.convertNumber(t);case"boolean":return je.convertBoolean(t);case"bigint":return je.convertBigint(t);case"date":return je.convertDate(t);default:return t}}}var je;(function(n){function e(l){let u="";for(let d=1;dll(e))}se.stringArray=Yp;var jt={};Object.defineProperty(jt,"__esModule",{value:!0});jt.Emitter=jt.Event=void 0;const Xp=yr;var Fa;(function(n){const e={dispose(){}};n.None=function(){return e}})(Fa||(jt.Event=Fa={}));class Jp{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i{this._callbacks||(this._callbacks=new Jp),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=Tr._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}jt.Emitter=Tr;Tr._noop=function(){};var X;Object.defineProperty(dn,"__esModule",{value:!0});var fi=dn.CancellationTokenSource=X=dn.CancellationToken=void 0;const Qp=yr,Zp=se,hi=jt;var Jn;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:hi.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:hi.Event.None});function e(t){const r=t;return r&&(r===n.None||r===n.Cancelled||Zp.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(Jn||(X=dn.CancellationToken=Jn={}));const em=Object.freeze(function(n,e){const t=(0,Qp.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}});class Ga{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?em:(this._emitter||(this._emitter=new hi.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}class tm{get token(){return this._token||(this._token=new Ga),this._token}cancel(){this._token?this._token.cancel():this._token=Jn.Cancelled}dispose(){this._token?this._token instanceof Ga&&this._token.dispose():this._token=Jn.None}}fi=dn.CancellationTokenSource=tm;function nm(){return new Promise(n=>{typeof setImmediate>"u"?setTimeout(n,0):setImmediate(n)})}let Ua=0,rm=10;const Qn=Symbol("OperationCancelled");function Vi(n){return n===Qn}async function Oe(n){if(n===X.None)return;const e=Date.now();if(e-Ua>=rm&&(Ua=e,await nm()),n.isCancellationRequested)throw Qn}class Wi{constructor(){this.promise=new Promise((e,t)=>{this.resolve=r=>(e(r),this),this.reject=r=>(t(r),this)})}}class fn{constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(const r of e)if(fn.isIncremental(r)){const i=fl(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),c=Math.max(i.end.line,0);let l=this._lineOffsets;const u=Ba(r.text,!1,s);if(c-o===u.length)for(let f=0,h=u.length;fe?i=a:r=a+1}const s=r-1;return e=this.ensureBeforeEOL(e,t[s]),{line:s,character:e-t[s]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const r=t[e.line];if(e.character<=0)return r;const i=e.line+1t&&dl(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return t!=null&&typeof t.text=="string"&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength=="number")}static isFull(e){const t=e;return t!=null&&typeof t.text=="string"&&t.range===void 0&&t.rangeLength===void 0}}var pi;(function(n){function e(i,s,a,o){return new fn(i,s,a,o)}n.create=e;function t(i,s,a){if(i instanceof fn)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}n.update=t;function r(i,s){const a=i.getText(),o=mi(s.map(im),(u,d)=>{const f=u.range.start.line-d.range.start.line;return f===0?u.range.start.character-d.range.start.character:f});let c=0;const l=[];for(const u of o){const d=i.offsetAt(u.range.start);if(dc&&l.push(a.substring(c,d)),u.newText.length&&l.push(u.newText),c=i.offsetAt(u.range.end)}return l.push(a.substr(c)),l.join("")}n.applyEdits=r})(pi||(pi={}));function mi(n,e){if(n.length<=1)return n;const t=n.length/2|0,r=n.slice(0,t),i=n.slice(t);mi(r,e),mi(i,e);let s=0,a=0,o=0;for(;st.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function im(n){const e=fl(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var hl;(()=>{var n={470:i=>{function s(c){if(typeof c!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(c))}function a(c,l){for(var u,d="",f=0,h=-1,m=0,g=0;g<=c.length;++g){if(g2){var A=d.lastIndexOf("/");if(A!==d.length-1){A===-1?(d="",f=0):f=(d=d.slice(0,A)).length-1-d.lastIndexOf("/"),h=g,m=0;continue}}else if(d.length===2||d.length===1){d="",f=0,h=g,m=0;continue}}l&&(d.length>0?d+="/..":d="..",f=2)}else d.length>0?d+="/"+c.slice(h+1,g):d=c.slice(h+1,g),f=g-h-1;h=g,m=0}else u===46&&m!==-1?++m:m=-1}return d}var o={resolve:function(){for(var c,l="",u=!1,d=arguments.length-1;d>=-1&&!u;d--){var f;d>=0?f=arguments[d]:(c===void 0&&(c=process.cwd()),f=c),s(f),f.length!==0&&(l=f+"/"+l,u=f.charCodeAt(0)===47)}return l=a(l,!u),u?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(c){if(s(c),c.length===0)return".";var l=c.charCodeAt(0)===47,u=c.charCodeAt(c.length-1)===47;return(c=a(c,!l)).length!==0||l||(c="."),c.length>0&&u&&(c+="/"),l?"/"+c:c},isAbsolute:function(c){return s(c),c.length>0&&c.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var c,l=0;l0&&(c===void 0?c=u:c+="/"+u)}return c===void 0?".":o.normalize(c)},relative:function(c,l){if(s(c),s(l),c===l||(c=o.resolve(c))===(l=o.resolve(l)))return"";for(var u=1;ug){if(l.charCodeAt(h+y)===47)return l.slice(h+y+1);if(y===0)return l.slice(h+y)}else f>g&&(c.charCodeAt(u+y)===47?A=y:y===0&&(A=0));break}var v=c.charCodeAt(u+y);if(v!==l.charCodeAt(h+y))break;v===47&&(A=y)}var R="";for(y=u+A+1;y<=d;++y)y!==d&&c.charCodeAt(y)!==47||(R.length===0?R+="..":R+="/..");return R.length>0?R+l.slice(h+A):(h+=A,l.charCodeAt(h)===47&&++h,l.slice(h))},_makeLong:function(c){return c},dirname:function(c){if(s(c),c.length===0)return".";for(var l=c.charCodeAt(0),u=l===47,d=-1,f=!0,h=c.length-1;h>=1;--h)if((l=c.charCodeAt(h))===47){if(!f){d=h;break}}else f=!1;return d===-1?u?"/":".":u&&d===1?"//":c.slice(0,d)},basename:function(c,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');s(c);var u,d=0,f=-1,h=!0;if(l!==void 0&&l.length>0&&l.length<=c.length){if(l.length===c.length&&l===c)return"";var m=l.length-1,g=-1;for(u=c.length-1;u>=0;--u){var A=c.charCodeAt(u);if(A===47){if(!h){d=u+1;break}}else g===-1&&(h=!1,g=u+1),m>=0&&(A===l.charCodeAt(m)?--m==-1&&(f=u):(m=-1,f=g))}return d===f?f=g:f===-1&&(f=c.length),c.slice(d,f)}for(u=c.length-1;u>=0;--u)if(c.charCodeAt(u)===47){if(!h){d=u+1;break}}else f===-1&&(h=!1,f=u+1);return f===-1?"":c.slice(d,f)},extname:function(c){s(c);for(var l=-1,u=0,d=-1,f=!0,h=0,m=c.length-1;m>=0;--m){var g=c.charCodeAt(m);if(g!==47)d===-1&&(f=!1,d=m+1),g===46?l===-1?l=m:h!==1&&(h=1):l!==-1&&(h=-1);else if(!f){u=m+1;break}}return l===-1||d===-1||h===0||h===1&&l===d-1&&l===u+1?"":c.slice(l,d)},format:function(c){if(c===null||typeof c!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof c);return function(l,u){var d=u.dir||u.root,f=u.base||(u.name||"")+(u.ext||"");return d?d===u.root?d+f:d+"/"+f:f}(0,c)},parse:function(c){s(c);var l={root:"",dir:"",base:"",ext:"",name:""};if(c.length===0)return l;var u,d=c.charCodeAt(0),f=d===47;f?(l.root="/",u=1):u=0;for(var h=-1,m=0,g=-1,A=!0,y=c.length-1,v=0;y>=u;--y)if((d=c.charCodeAt(y))!==47)g===-1&&(A=!1,g=y+1),d===46?h===-1?h=y:v!==1&&(v=1):h!==-1&&(v=-1);else if(!A){m=y+1;break}return h===-1||g===-1||v===0||v===1&&h===g-1&&h===m+1?g!==-1&&(l.base=l.name=m===0&&f?c.slice(1,g):c.slice(m,g)):(m===0&&f?(l.name=c.slice(1,h),l.base=c.slice(1,g)):(l.name=c.slice(m,h),l.base=c.slice(m,g)),l.ext=c.slice(h,g)),m>0?l.dir=c.slice(0,m-1):f&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},e={};function t(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return n[i](a,a.exports,t),a.exports}t.d=(i,s)=>{for(var a in s)t.o(s,a)&&!t.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},t.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),t.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;t.r(r),t.d(r,{URI:()=>f,Utils:()=>Se}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function c(k,T){if(!k.scheme&&T)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${k.authority}", path: "${k.path}", query: "${k.query}", fragment: "${k.fragment}"}`);if(k.scheme&&!s.test(k.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(k.path){if(k.authority){if(!a.test(k.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(k.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const l="",u="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{constructor(T,E,I,O,$,L=!1){Je(this,"scheme");Je(this,"authority");Je(this,"path");Je(this,"query");Je(this,"fragment");typeof T=="object"?(this.scheme=T.scheme||l,this.authority=T.authority||l,this.path=T.path||l,this.query=T.query||l,this.fragment=T.fragment||l):(this.scheme=function(ye,z){return ye||z?ye:"file"}(T,L),this.authority=E||l,this.path=function(ye,z){switch(ye){case"https":case"http":case"file":z?z[0]!==u&&(z=u+z):z=u}return z}(this.scheme,I||l),this.query=O||l,this.fragment=$||l,c(this,L))}static isUri(T){return T instanceof f||!!T&&typeof T.authority=="string"&&typeof T.fragment=="string"&&typeof T.path=="string"&&typeof T.query=="string"&&typeof T.scheme=="string"&&typeof T.fsPath=="string"&&typeof T.with=="function"&&typeof T.toString=="function"}get fsPath(){return v(this)}with(T){if(!T)return this;let{scheme:E,authority:I,path:O,query:$,fragment:L}=T;return E===void 0?E=this.scheme:E===null&&(E=l),I===void 0?I=this.authority:I===null&&(I=l),O===void 0?O=this.path:O===null&&(O=l),$===void 0?$=this.query:$===null&&($=l),L===void 0?L=this.fragment:L===null&&(L=l),E===this.scheme&&I===this.authority&&O===this.path&&$===this.query&&L===this.fragment?this:new m(E,I,O,$,L)}static parse(T,E=!1){const I=d.exec(T);return I?new m(I[2]||l,ne(I[4]||l),ne(I[5]||l),ne(I[7]||l),ne(I[9]||l),E):new m(l,l,l,l,l)}static file(T){let E=l;if(i&&(T=T.replace(/\\/g,u)),T[0]===u&&T[1]===u){const I=T.indexOf(u,2);I===-1?(E=T.substring(2),T=u):(E=T.substring(2,I),T=T.substring(I)||u)}return new m("file",E,T,l,l)}static from(T){const E=new m(T.scheme,T.authority,T.path,T.query,T.fragment);return c(E,!0),E}toString(T=!1){return R(this,T)}toJSON(){return this}static revive(T){if(T){if(T instanceof f)return T;{const E=new m(T);return E._formatted=T.external,E._fsPath=T._sep===h?T.fsPath:null,E}}return T}}const h=i?1:void 0;class m extends f{constructor(){super(...arguments);Je(this,"_formatted",null);Je(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=v(this)),this._fsPath}toString(E=!1){return E?R(this,!0):(this._formatted||(this._formatted=R(this,!1)),this._formatted)}toJSON(){const E={$mid:1};return this._fsPath&&(E.fsPath=this._fsPath,E._sep=h),this._formatted&&(E.external=this._formatted),this.path&&(E.path=this.path),this.scheme&&(E.scheme=this.scheme),this.authority&&(E.authority=this.authority),this.query&&(E.query=this.query),this.fragment&&(E.fragment=this.fragment),E}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function A(k,T,E){let I,O=-1;for(let $=0;$=97&&L<=122||L>=65&&L<=90||L>=48&&L<=57||L===45||L===46||L===95||L===126||T&&L===47||E&&L===91||E&&L===93||E&&L===58)O!==-1&&(I+=encodeURIComponent(k.substring(O,$)),O=-1),I!==void 0&&(I+=k.charAt($));else{I===void 0&&(I=k.substr(0,$));const ye=g[L];ye!==void 0?(O!==-1&&(I+=encodeURIComponent(k.substring(O,$)),O=-1),I+=ye):O===-1&&(O=$)}}return O!==-1&&(I+=encodeURIComponent(k.substring(O))),I!==void 0?I:k}function y(k){let T;for(let E=0;E1&&k.scheme==="file"?`//${k.authority}${k.path}`:k.path.charCodeAt(0)===47&&(k.path.charCodeAt(1)>=65&&k.path.charCodeAt(1)<=90||k.path.charCodeAt(1)>=97&&k.path.charCodeAt(1)<=122)&&k.path.charCodeAt(2)===58?k.path[1].toLowerCase()+k.path.substr(2):k.path,i&&(E=E.replace(/\//g,"\\")),E}function R(k,T){const E=T?y:A;let I="",{scheme:O,authority:$,path:L,query:ye,fragment:z}=k;if(O&&(I+=O,I+=":"),($||O==="file")&&(I+=u,I+=u),$){let V=$.indexOf("@");if(V!==-1){const at=$.substr(0,V);$=$.substr(V+1),V=at.lastIndexOf(":"),V===-1?I+=E(at,!1,!1):(I+=E(at.substr(0,V),!1,!1),I+=":",I+=E(at.substr(V+1),!1,!0)),I+="@"}$=$.toLowerCase(),V=$.lastIndexOf(":"),V===-1?I+=E($,!1,!0):(I+=E($.substr(0,V),!1,!0),I+=$.substr(V))}if(L){if(L.length>=3&&L.charCodeAt(0)===47&&L.charCodeAt(2)===58){const V=L.charCodeAt(1);V>=65&&V<=90&&(L=`/${String.fromCharCode(V+32)}:${L.substr(3)}`)}else if(L.length>=2&&L.charCodeAt(1)===58){const V=L.charCodeAt(0);V>=65&&V<=90&&(L=`${String.fromCharCode(V+32)}:${L.substr(2)}`)}I+=E(L,!0,!1)}return ye&&(I+="?",I+=E(ye,!1,!1)),z&&(I+="#",I+=T?z:A(z,!1,!1)),I}function N(k){try{return decodeURIComponent(k)}catch{return k.length>3?k.substr(0,3)+N(k.substr(3)):k}}const F=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ne(k){return k.match(F)?k.replace(F,T=>N(T)):k}var we=t(470);const ge=we.posix||we,De="/";var Se;(function(k){k.joinPath=function(T,...E){return T.with({path:ge.join(T.path,...E)})},k.resolvePath=function(T,...E){let I=T.path,O=!1;I[0]!==De&&(I=De+I,O=!0);let $=ge.resolve(I,...E);return O&&$[0]===De&&!T.authority&&($=$.substring(1)),T.with({path:$})},k.dirname=function(T){if(T.path.length===0||T.path===De)return T;let E=ge.dirname(T.path);return E.length===1&&E.charCodeAt(0)===46&&(E=""),T.with({path:E})},k.basename=function(T){return ge.basename(T.path)},k.extname=function(T){return ge.extname(T.path)}})(Se||(Se={}))})(),hl=r})();const{URI:Ht,Utils:sn}=hl;var rt;(function(n){n.basename=sn.basename,n.dirname=sn.dirname,n.extname=sn.extname,n.joinPath=sn.joinPath,n.resolvePath=sn.resolvePath;function e(r,i){return(r==null?void 0:r.toString())===(i==null?void 0:i.toString())}n.equals=e;function t(r,i){const s=typeof r=="string"?r:r.path,a=typeof i=="string"?i:i.path,o=s.split("/").filter(f=>f.length>0),c=a.split("/").filter(f=>f.length>0);let l=0;for(;li??(i=pi.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}}class am{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return Q(this.documentMap.values())}addDocument(e){const t=e.uri.toString();if(this.documentMap.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentMap.set(t,e)}getDocument(e){const t=e.toString();return this.documentMap.get(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(r),r)}createDocument(e,t,r){if(r)return this.langiumDocumentFactory.fromString(t,e,r).then(i=>(this.addDocument(i),i));{const i=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(i),i}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){const t=e.toString(),r=this.documentMap.get(t);return r&&(r.state=U.Changed,r.precomputedScopes=void 0,r.references=[],r.diagnostics=void 0),r}deleteDocument(e){const t=e.toString(),r=this.documentMap.get(t);return r&&(r.state=U.Changed,this.documentMap.delete(t)),r}}class om{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,t=X.None){for(const r of vt(e.parseResult.value))await Oe(t),Qo(r).forEach(i=>this.doLink(i,e))}doLink(e,t){const r=e.reference;if(r._ref===void 0)try{const i=this.getCandidate(e);if(xn(i))r._ref=i;else if(r._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)){const s=this.loadAstNode(i);r._ref=s??this.createLinkingError(e,i)}}catch(i){r._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${r.$refText}': ${i}`})}t.references.push(r)}unlink(e){for(const t of e.references)delete t._ref,delete t._nodeDescription;e.references=[]}getCandidate(e){const r=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return r??this.createLinkingError(e)}buildReference(e,t,r,i){const s=this,a={$refNode:r,$refText:i,get ref(){var o;if(ae(this._ref))return this._ref;if(Su(this._nodeDescription)){const c=s.loadAstNode(this._nodeDescription);this._ref=c??s.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){const c=s.getLinkedNode({reference:a,container:e,property:t});if(c.error&&Ue(e).state=e.end)return s.ref}}if(r){const i=this.nameProvider.getNameNode(r);if(i&&(i===e||Nu(e,i)))return r}}}findDeclarationNode(e){const t=this.findDeclaration(e);if(t!=null&&t.$cstNode){const r=this.nameProvider.getNameNode(t);return r??t.$cstNode}}findReferences(e,t){const r=[];if(t.includeDeclaration){const s=this.getReferenceToSelf(e);s&&r.push(s)}let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(i=i.filter(s=>rt.equals(s.sourceUri,t.documentUri))),r.push(...i),Q(r)}getReferenceToSelf(e){const t=this.nameProvider.getNameNode(e);if(t){const r=Ue(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:On(t),local:!0}}}}class ji{constructor(e){if(this.map=new Map,e)for(const[t,r]of e)this.add(t,r)}get size(){return br.sum(Q(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{const r=this.map.get(e);if(r){const i=r.indexOf(t);if(i>=0)return r.length===1?this.map.delete(e):r.splice(i,1),!0}return!1}}get(e){var t;return(t=this.map.get(e))!==null&&t!==void 0?t:[]}has(e,t){if(t===void 0)return this.map.has(e);{const r=this.map.get(e);return r?r.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,r)=>t.forEach(i=>e(i,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Q(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return Q(this.map.keys())}values(){return Q(this.map.values()).flat()}entriesGroupedByKey(){return Q(this.map.entries())}}class Va{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return t!==void 0?(this.map.delete(e),this.inverse.delete(t),!0):!1}}class dm{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=X.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,t)}async computeExportsForNode(e,t,r=Ii,i=X.None){const s=[];this.exportNode(e,s,t);for(const a of r(e))await Oe(i),this.exportNode(a,s,t);return s}exportNode(e,t,r){const i=this.nameProvider.getName(e);i&&t.push(this.descriptions.createDescription(e,i,r))}async computeLocalScopes(e,t=X.None){const r=e.parseResult.value,i=new ji;for(const s of pn(r))await Oe(t),this.processNode(s,e,i);return i}processNode(e,t,r){const i=e.$container;if(i){const s=this.nameProvider.getName(e);s&&r.add(i,this.descriptions.createDescription(e,s,t))}}}class Wa{constructor(e,t,r){var i;this.elements=e,this.outerScope=t,this.caseInsensitive=(i=r==null?void 0:r.caseInsensitive)!==null&&i!==void 0?i:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?this.elements.find(r=>r.name.toLowerCase()===e.toLowerCase()):this.elements.find(r=>r.name===e);if(t)return t;if(this.outerScope)return this.outerScope.getElement(e)}}class fm{constructor(e,t,r){var i;this.elements=new Map,this.caseInsensitive=(i=r==null?void 0:r.caseInsensitive)!==null&&i!==void 0?i:!1;for(const s of e){const a=this.caseInsensitive?s.name.toLowerCase():s.name;this.elements.set(a,s)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getAllElements(){let e=Q(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class pl{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class hm extends pl{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const r=t();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class pm extends pl{constructor(e){super(),this.cache=new Map,this.converter=e??(t=>t)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){this.throwIfDisposed();const i=this.cacheForContext(e);if(i.has(t))return i.get(t);if(r){const s=r();return i.set(t,s),s}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}}class mm extends hm{constructor(e){super(),this.onDispose(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class gm{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new mm(e.shared)}getScope(e){const t=[],r=this.reflection.getReferenceType(e),i=Ue(e.container).precomputedScopes;if(i){let a=e.container;do{const o=i.get(a);o.length>0&&t.push(Q(o).filter(c=>this.reflection.isSubtype(c.type,r))),a=a.$container}while(a)}let s=this.getGlobalScope(r,e);for(let a=t.length-1;a>=0;a--)s=this.createScope(t[a],s);return s}createScope(e,t,r){return new Wa(Q(e),t,r)}createScopeForNodes(e,t,r){const i=Q(e).map(s=>{const a=this.nameProvider.getName(s);if(a)return this.descriptions.createDescription(s,a)}).nonNullable();return new Wa(i,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new fm(this.indexManager.allElements(e)))}}function ym(n){return typeof n.$comment=="string"}function ja(n){return typeof n=="object"&&!!n&&("$ref"in n||"$error"in n)}class Tm{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t={}){const r=t==null?void 0:t.replacer,i=(a,o)=>this.replacer(a,o,t),s=r?(a,o)=>r(a,o,i):i;try{return this.currentDocument=Ue(e),JSON.stringify(e,s,t==null?void 0:t.space)}finally{this.currentDocument=void 0}}deserialize(e,t={}){const r=JSON.parse(e);return this.linkNode(r,r,t),r}replacer(e,t,{refText:r,sourceText:i,textRegions:s,comments:a,uriConverter:o}){var c,l,u,d;if(!this.ignoreProperties.has(e))if(Ge(t)){const f=t.ref,h=r?t.$refText:void 0;if(f){const m=Ue(f);let g="";this.currentDocument&&this.currentDocument!==m&&(o?g=o(m.uri,t):g=m.uri.toString());const A=this.astNodeLocator.getAstNodePath(f);return{$ref:`${g}#${A}`,$refText:h}}else return{$error:(l=(c=t.error)===null||c===void 0?void 0:c.message)!==null&&l!==void 0?l:"Could not resolve reference",$refText:h}}else if(ae(t)){let f;if(s&&(f=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},t)),(!e||t.$document)&&(f!=null&&f.$textRegion)&&(f.$textRegion.documentURI=(u=this.currentDocument)===null||u===void 0?void 0:u.uri.toString())),i&&!e&&(f??(f=Object.assign({},t)),f.$sourceText=(d=t.$cstNode)===null||d===void 0?void 0:d.text),a){f??(f=Object.assign({},t));const h=this.commentProvider.getComment(t);h&&(f.$comment=h.replace(/\r/g,""))}return f??t}else return t}addAstNodeRegionWithAssignmentsTo(e){const t=r=>({offset:r.offset,end:r.end,length:r.length,range:r.range});if(e.$cstNode){const r=e.$textRegion=t(e.$cstNode),i=r.assignments={};return Object.keys(e).filter(s=>!s.startsWith("$")).forEach(s=>{const a=kd(e.$cstNode,s).map(t);a.length!==0&&(i[s]=a)}),e}}linkNode(e,t,r,i,s,a){for(const[c,l]of Object.entries(e))if(Array.isArray(l))for(let u=0;u{try{await e.call(t,r,i,s)}catch(a){if(Vi(a))throw a;console.error("An error occurred during validation:",a);const o=a instanceof Error?a.message:String(a);a instanceof Error&&a.stack&&console.error(a.stack),i("error","An error occurred during validation: "+o,{node:r})}}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(const r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=Q(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(i=>t.includes(i.category))),r.map(i=>i.check)}}class vm{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,t={},r=X.None){const i=e.parseResult,s=[];if(await Oe(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(i,s,t),t.stopAfterLexingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Qe.LexingError})||(this.processParsingErrors(i,s,t),t.stopAfterParsingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Qe.ParsingError}))||(this.processLinkingErrors(e,s,t),t.stopAfterLinkingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Qe.LinkingError}))))return s;try{s.push(...await this.validateAst(i.value,t,r))}catch(a){if(Vi(a))throw a;console.error("An error occurred during validation:",a)}return await Oe(r),s}processLexingErrors(e,t,r){for(const i of e.lexerErrors){const s={severity:Lr("error"),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:Ha(Qe.LexingError),source:this.getSource()};t.push(s)}}processParsingErrors(e,t,r){for(const i of e.parserErrors){let s;if(isNaN(i.token.startOffset)){if("previousToken"in i){const a=i.previousToken;if(isNaN(a.startOffset)){const o={line:0,character:0};s={start:o,end:o}}else{const o={line:a.endLine-1,character:a.endColumn};s={start:o,end:o}}}}else s=Mr(i.token);if(s){const a={severity:Lr("error"),range:s,message:i.message,data:Ha(Qe.ParsingError),source:this.getSource()};t.push(a)}}}processLinkingErrors(e,t,r){for(const i of e.references){const s=i.error;if(s){const a={node:s.container,property:s.property,index:s.index,data:{code:Qe.LinkingError,containerType:s.container.$type,property:s.property,refText:s.reference.$refText}};t.push(this.toDiagnostic("error",s.message,a))}}}async validateAst(e,t,r=X.None){const i=[],s=(a,o,c)=>{i.push(this.toDiagnostic(a,o,c))};return await Promise.all(vt(e).map(async a=>{await Oe(r);const o=this.validationRegistry.getChecks(a.$type,t.categories);for(const c of o)await c(a,s,r)})),i}toDiagnostic(e,t,r){return{message:t,range:Em(r),severity:Lr(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function Em(n){if(n.range)return n.range;let e;return typeof n.property=="string"?e=rc(n.node.$cstNode,n.property,n.index):typeof n.keyword=="string"&&(e=Sd(n.node.$cstNode,n.keyword,n.index)),e??(e=n.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Lr(n){switch(n){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+n)}}var Qe;(function(n){n.LexingError="lexing-error",n.ParsingError="parsing-error",n.LinkingError="linking-error"})(Qe||(Qe={}));class km{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r=Ue(e)){t??(t=this.nameProvider.getName(e));const i=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${i} has no name.`);let s;const a=()=>{var o;return s??(s=On((o=this.nameProvider.getNameNode(e))!==null&&o!==void 0?o:e.$cstNode))};return{node:e,name:t,get nameSegment(){return a()},selectionSegment:On(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}}class Sm{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=X.None){const r=[],i=e.parseResult.value;for(const s of vt(i))await Oe(t),Qo(s).filter(a=>!xn(a)).forEach(a=>{const o=this.createDescription(a);o&&r.push(o)});return r}createDescription(e){const t=e.reference.$nodeDescription,r=e.reference.$refNode;if(!t||!r)return;const i=Ue(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:t.documentUri,targetPath:t.path,segment:On(r),local:rt.equals(t.documentUri,i)}}}class Im{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return t!==void 0?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((i,s)=>{if(!i||s.length===0)return i;const a=s.indexOf(this.indexSeparator);if(a>0){const o=s.substring(0,a),c=parseInt(s.substring(a+1)),l=i[o];return l==null?void 0:l[c]}return i[s]},e)}}class xm{constructor(e){this._ready=new Wi,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t,r;this.workspaceConfig=(r=(t=e.capabilities.workspace)===null||t===void 0?void 0:t.configuration)!==null&&r!==void 0?r:!1}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map(r=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((i,s)=>{this.updateSectionConfiguration(i.section,r[s])})}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(t=>{this.updateSectionConfiguration(t,e.settings[t])})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}}var er;(function(n){function e(t){return{dispose:async()=>await t()}}n.create=e})(er||(er={}));class Nm{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new ji,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=U.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=X.None){var i,s;for(const a of e){const o=a.uri.toString();if(a.state===U.Validated){if(typeof t.validation=="boolean"&&t.validation)a.state=U.IndexedReferences,a.diagnostics=void 0,this.buildState.delete(o);else if(typeof t.validation=="object"){const c=this.buildState.get(o),l=(i=c==null?void 0:c.result)===null||i===void 0?void 0:i.validationChecks;if(l){const d=((s=t.validation.categories)!==null&&s!==void 0?s:Zn.all).filter(f=>!l.includes(f));d.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:Object.assign(Object.assign({},t.validation),{categories:d})},result:c.result}),a.state=U.IndexedReferences)}}}else this.buildState.delete(o)}this.currentState=U.Changed,await this.emitUpdate(e.map(a=>a.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=X.None){this.currentState=U.Changed;for(const a of t)this.langiumDocuments.deleteDocument(a),this.buildState.delete(a.toString()),this.indexManager.remove(a);for(const a of e){if(!this.langiumDocuments.invalidateDocument(a)){const c=this.langiumDocumentFactory.fromModel({$type:"INVALID"},a);c.state=U.Changed,this.langiumDocuments.addDocument(c)}this.buildState.delete(a.toString())}const i=Q(e).concat(t).map(a=>a.toString()).toSet();this.langiumDocuments.all.filter(a=>!i.has(a.uri.toString())&&this.shouldRelink(a,i)).forEach(a=>{this.serviceRegistry.getServices(a.uri).references.Linker.unlink(a),a.state=Math.min(a.state,U.ComputedScopes),a.diagnostics=void 0}),await this.emitUpdate(e,t),await Oe(r);const s=this.langiumDocuments.all.filter(a=>{var o;return a.stater(e,t)))}shouldRelink(e,t){return e.references.some(r=>r.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),er.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,U.Parsed,r,s=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,U.IndexedContent,r,s=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,U.ComputedScopes,r,async s=>{const a=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.precomputedScopes=await a.computeLocalScopes(s,r)}),await this.runCancelable(e,U.Linked,r,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(e,U.IndexedReferences,r,s=>this.indexManager.updateReferences(s,r));const i=e.filter(s=>this.shouldValidate(s));await this.runCancelable(i,U.Validated,r,s=>this.validate(s,r));for(const s of e){const a=this.buildState.get(s.uri.toString());a&&(a.completed=!0)}}prepareBuild(e,t){for(const r of e){const i=r.uri.toString(),s=this.buildState.get(i);(!s||s.completed)&&this.buildState.set(i,{completed:!1,options:t,result:s==null?void 0:s.result})}}async runCancelable(e,t,r,i){const s=e.filter(a=>a.state{this.buildPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let i;if(t&&"path"in t?i=t:r=t,r??(r=X.None),i){const s=this.langiumDocuments.getDocument(i);if(s&&s.state>e)return Promise.resolve(i)}return this.currentState>=e?Promise.resolve(void 0):r.isCancellationRequested?Promise.reject(Qn):new Promise((s,a)=>{const o=this.onBuildPhase(e,()=>{if(o.dispose(),c.dispose(),i){const l=this.langiumDocuments.getDocument(i);s(l==null?void 0:l.uri)}else s(void 0)}),c=r.onCancellationRequested(()=>{o.dispose(),c.dispose(),a(Qn)})})}async notifyBuildPhase(e,t,r){if(e.length===0)return;const i=this.buildPhaseListeners.get(t);for(const s of i)await Oe(r),await s(e,r)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){var r,i;const s=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,a=this.getBuildOptions(e).validation,o=typeof a=="object"?a:void 0,c=await s.validateDocument(e,o,t);e.diagnostics?e.diagnostics.push(...c):e.diagnostics=c;const l=this.buildState.get(e.uri.toString());if(l){(r=l.result)!==null&&r!==void 0||(l.result={});const u=(i=o==null?void 0:o.categories)!==null&&i!==void 0?i:Zn.all;l.result.validationChecks?l.result.validationChecks.push(...u):l.result.validationChecks=[...u]}}getBuildOptions(e){var t,r;return(r=(t=this.buildState.get(e.uri.toString()))===null||t===void 0?void 0:t.options)!==null&&r!==void 0?r:{}}}class Cm{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new pm,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const r=Ue(e).uri,i=[];return this.referenceIndex.forEach(s=>{s.forEach(a=>{rt.equals(a.targetUri,r)&&a.targetPath===t&&i.push(a)})}),Q(i)}allElements(e,t){let r=Q(this.symbolIndex.keys());return t&&(r=r.filter(i=>!t||t.has(i))),r.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,t){var r;return t?this.symbolByTypeIndex.get(e,t,()=>{var s;return((s=this.symbolIndex.get(e))!==null&&s!==void 0?s:[]).filter(o=>this.astReflection.isSubtype(o.type,t))}):(r=this.symbolIndex.get(e))!==null&&r!==void 0?r:[]}remove(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(e,t=X.None){const i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,t),s=e.uri.toString();this.symbolIndex.set(s,i),this.symbolByTypeIndex.clear(s)}async updateReferences(e,t=X.None){const i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,t){const r=this.referenceIndex.get(e.uri.toString());return r?r.some(i=>!i.local&&t.has(i.targetUri.toString())):!1}}class _m{constructor(e){this.initialBuildOptions={},this._ready=new Wi,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var t;this.folders=(t=e.workspaceFolders)!==null&&t!==void 0?t:void 0}initialized(e){return this.mutex.write(t=>{var r;return this.initializeWorkspace((r=this.folders)!==null&&r!==void 0?r:[],t)})}async initializeWorkspace(e,t=X.None){const r=await this.performStartup(e);await Oe(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){const t=this.serviceRegistry.all.flatMap(s=>s.LanguageMetaData.fileExtensions),r=[],i=s=>{r.push(s),this.langiumDocuments.hasDocument(s.uri)||this.langiumDocuments.addDocument(s)};return await this.loadAdditionalDocuments(e,i),await Promise.all(e.map(s=>[s,this.getRootFolder(s)]).map(async s=>this.traverseFolder(...s,t,i))),this._ready.resolve(),r}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Ht.parse(e.uri)}async traverseFolder(e,t,r,i){const s=await this.fileSystemProvider.readDirectory(t);await Promise.all(s.map(async a=>{if(this.includeEntry(e,a,r)){if(a.isDirectory)await this.traverseFolder(e,a.uri,r,i);else if(a.isFile){const o=await this.langiumDocuments.getOrCreateDocument(a.uri);i(o)}}}))}includeEntry(e,t,r){const i=rt.basename(t.uri);if(i.startsWith("."))return!1;if(t.isDirectory)return i!=="node_modules"&&i!=="out";if(t.isFile){const s=rt.extname(t.uri);return r.includes(s)}return!1}}class wm{constructor(e){const t=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const r=Ka(t)?Object.values(t):t;this.chevrotainLexer=new de(r,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var t;const r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:(t=r.groups.hidden)!==null&&t!==void 0?t:[]}}toTokenTypeDictionary(e){if(Ka(e))return e;const t=ml(e)?Object.values(e.modes).flat():e,r={};return t.forEach(i=>r[i.name]=i),r}}function Lm(n){return Array.isArray(n)&&(n.length===0||"name"in n[0])}function ml(n){return n&&"modes"in n&&"defaultMode"in n}function Ka(n){return!Lm(n)&&!ml(n)}function $m(n,e,t){let r,i;typeof n=="string"?(i=e,r=t):(i=n.range.start,r=e),i||(i=P.create(0,0));const s=gl(n),a=Hi(r),o=Pm({lines:s,position:i,options:a});return Um({index:0,tokens:o,position:i})}function Om(n,e){const t=Hi(e),r=gl(n);if(r.length===0)return!1;const i=r[0],s=r[r.length-1],a=t.start,o=t.end;return!!(a!=null&&a.exec(i))&&!!(o!=null&&o.exec(s))}function gl(n){let e="";return typeof n=="string"?e=n:e=n.text,e.split(fd)}const za=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,bm=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Pm(n){var e,t,r;const i=[];let s=n.position.line,a=n.position.character;for(let o=0;o=u.length){if(i.length>0){const h=P.create(s,a);i.push({type:"break",content:"",range:b.create(h,h)})}}else{za.lastIndex=d;const h=za.exec(u);if(h){const m=h[0],g=h[1],A=P.create(s,a+d),y=P.create(s,a+d+m.length);i.push({type:"tag",content:g,range:b.create(A,y)}),d+=m.length,d=gi(u,d)}if(d0&&i[i.length-1].type==="break"?i.slice(0,-1):i}function Mm(n,e,t,r){const i=[];if(n.length===0){const s=P.create(t,r),a=P.create(t,r+e.length);i.push({type:"text",content:e,range:b.create(s,a)})}else{let s=0;for(const o of n){const c=o.index,l=e.substring(s,c);l.length>0&&i.push({type:"text",content:e.substring(s,c),range:b.create(P.create(t,s+r),P.create(t,c+r))});let u=l.length+1;const d=o[1];if(i.push({type:"inline-tag",content:d,range:b.create(P.create(t,s+u+r),P.create(t,s+u+d.length+r))}),u+=d.length,o.length===4){u+=o[2].length;const f=o[3];i.push({type:"text",content:f,range:b.create(P.create(t,s+u+r),P.create(t,s+u+f.length+r))})}else i.push({type:"text",content:"",range:b.create(P.create(t,s+u+r),P.create(t,s+u+r))});s=c+o[0].length}const a=e.substring(s);a.length>0&&i.push({type:"text",content:a,range:b.create(P.create(t,s+r),P.create(t,s+r+a.length))})}return i}const Dm=/\S/,Fm=/\s*$/;function gi(n,e){const t=n.substring(e).match(Dm);return t?e+t.index:n.length}function Gm(n){const e=n.match(Fm);if(e&&typeof e.index=="number")return e.index}function Um(n){var e,t,r,i;const s=P.create(n.position.line,n.position.character);if(n.tokens.length===0)return new qa([],b.create(s,s));const a=[];for(;n.indext.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const t of this.elements)if(e.length===0)e=t.toString();else{const r=t.toString();e+=Ya(e)+r}return e.trim()}toMarkdown(e){let t="";for(const r of this.elements)if(t.length===0)t=r.toMarkdown(e);else{const i=r.toMarkdown(e);t+=Ya(t)+i}return t.trim()}}class Or{constructor(e,t,r,i){this.name=e,this.content=t,this.inline=r,this.range=i}toString(){let e=`@${this.name}`;const t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e} +${t}`),this.inline?`{${e}}`:e}toMarkdown(e){var t,r;return(r=(t=e==null?void 0:e.renderTag)===null||t===void 0?void 0:t.call(e,this))!==null&&r!==void 0?r:this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const s=jm(this.name,t,e??{});if(typeof s=="string")return s}let r="";(e==null?void 0:e.tag)==="italic"||(e==null?void 0:e.tag)===void 0?r="*":(e==null?void 0:e.tag)==="bold"?r="**":(e==null?void 0:e.tag)==="bold-italic"&&(r="***");let i=`${r}@${this.name}${r}`;return this.content.inlines.length===1?i=`${i} — ${t}`:this.content.inlines.length>1&&(i=`${i} +${t}`),this.inline?`{${i}}`:i}}function jm(n,e,t){var r,i;if(n==="linkplain"||n==="linkcode"||n==="link"){const s=e.indexOf(" ");let a=e;if(s>0){const c=gi(e,s);a=e.substring(c),e=e.substring(0,s)}return(n==="linkcode"||n==="link"&&t.link==="code")&&(a=`\`${a}\``),(i=(r=t.renderLink)===null||r===void 0?void 0:r.call(t,e,a))!==null&&i!==void 0?i:Hm(e,a)}}function Hm(n,e){try{return Ht.parse(n,!0),`[${e}](${n})`}catch{return n}}class yi{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tr.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let t="";for(let r=0;ri.range.start.line&&(t+=` +`)}return t}}class Al{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function Ya(n){return n.endsWith(` +`)?` +`:` + +`}class Km{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&Om(t))return $m(t).toMarkdown({renderLink:(i,s)=>this.documentationLinkRenderer(e,i,s),renderTag:i=>this.documentationTagRenderer(e,i)})}documentationLinkRenderer(e,t,r){var i;const s=(i=this.findNameInPrecomputedScopes(e,t))!==null&&i!==void 0?i:this.findNameInGlobalScope(e,t);if(s&&s.nameSegment){const a=s.nameSegment.range.start.line+1,o=s.nameSegment.range.start.character+1,c=s.documentUri.with({fragment:`L${a},${o}`});return`[${r}](${c.toString()})`}else return}documentationTagRenderer(e,t){}findNameInPrecomputedScopes(e,t){const i=Ue(e).precomputedScopes;if(!i)return;let s=e;do{const o=i.get(s).find(c=>c.name===t);if(o)return o;s=s.$container}while(s)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(i=>i.name===t)}}class zm{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;return ym(e)?e.$comment:(t=Lu(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||t===void 0?void 0:t.text}}class qm{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}}class Ym{constructor(){this.previousTokenSource=new fi,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=new fi;return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r){const i=new Wi,s={action:t,deferred:i,cancellationToken:r??X.None};return e.push(s),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:t,deferred:r,cancellationToken:i})=>{try{const s=await Promise.resolve().then(()=>t(i));r.resolve(s)}catch(s){Vi(s)?r.resolve(void 0):r.reject(s)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Xm{constructor(e){this.grammarElementIdMap=new Va,this.tokenTypeIdMap=new Va,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map(t=>Object.assign({},t)),parserErrors:e.parserErrors.map(t=>Object.assign({},t)),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){const t=new Map,r=new Map;for(const i of vt(e))t.set(i,{});if(e.$cstNode)for(const i of Pr(e.$cstNode))r.set(i,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const a=[];r[i]=a;for(const o of s)ae(o)?a.push(this.dehydrateAstNode(o,t)):Ge(o)?a.push(this.dehydrateReference(o,t)):a.push(o)}else ae(s)?r[i]=this.dehydrateAstNode(s,t):Ge(s)?r[i]=this.dehydrateReference(s,t):s!==void 0&&(r[i]=s);return r}dehydrateReference(e,t){const r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){const r=t.cstNodes.get(e);return go(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Gt(e)?r.content=e.content.map(i=>this.dehydrateCstNode(i,t)):mo(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){const t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){const t=new Map,r=new Map;for(const s of vt(e))t.set(s,{});let i;if(e.$cstNode)for(const s of Pr(e.$cstNode)){let a;"fullText"in s?(a=new Zc(s.fullText),i=a):"content"in s?a=new Ui:"tokenType"in s&&(a=this.hydrateCstLeafNode(s)),a&&(r.set(s,a),a.root=i)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=t.cstNodes.get(e.$cstNode));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const a=[];r[i]=a;for(const o of s)ae(o)?a.push(this.setParent(this.hydrateAstNode(o,t),r)):Ge(o)?a.push(this.hydrateReference(o,r,i,t)):a.push(o)}else ae(s)?r[i]=this.setParent(this.hydrateAstNode(s,t),r):Ge(s)?r[i]=this.hydrateReference(s,r,i,t):s!==void 0&&(r[i]=s);return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,i){return this.linker.buildReference(t,r,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){const i=t.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=t.astNodes.get(e.astNode),Gt(i))for(const s of e.content){const a=this.hydrateCstNode(s,t,r++);i.content.push(a)}return i}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),r=e.offset,i=e.length,s=e.startLine,a=e.startColumn,o=e.endLine,c=e.endColumn,l=e.hidden;return new oi(r,i,{start:{line:s,character:a},end:{line:o,character:c}},t,l)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap();const t=this.grammarElementIdMap.getKey(e);if(t)return t;throw new Error("Invalid grammar element id: "+e)}createGrammarElementIdMap(){let e=0;for(const t of vt(this.grammar))bu(t)&&this.grammarElementIdMap.set(t,e++)}}function Jt(n){return{documentation:{CommentProvider:e=>new zm(e),DocumentationProvider:e=>new Km(e)},parser:{AsyncParser:e=>new qm(e),GrammarConfig:e=>bd(e),LangiumParser:e=>Wp(e),CompletionParser:e=>Vp(e),ValueConverter:()=>new cl,TokenBuilder:()=>new ol,Lexer:e=>new wm(e),ParserErrorMessageProvider:()=>new nl},workspace:{AstNodeLocator:()=>new Im,AstNodeDescriptionProvider:e=>new km(e),ReferenceDescriptionProvider:e=>new Sm(e)},references:{Linker:e=>new om(e),NameProvider:()=>new lm,ScopeProvider:e=>new gm(e),ScopeComputation:e=>new dm(e),References:e=>new um(e)},serializer:{Hydrator:e=>new Xm(e),JsonSerializer:e=>new Tm(e)},validation:{DocumentValidator:e=>new vm(e),ValidationRegistry:e=>new Am(e)},shared:()=>n.shared}}function Qt(n){return{ServiceRegistry:()=>new Rm,workspace:{LangiumDocuments:e=>new am(e),LangiumDocumentFactory:e=>new sm(e),DocumentBuilder:e=>new Nm(e),IndexManager:e=>new Cm(e),WorkspaceManager:e=>new _m(e),FileSystemProvider:e=>n.fileSystemProvider(e),WorkspaceLock:()=>new Ym,ConfigurationProvider:e=>new xm(e)}}}var Xa;(function(n){n.merge=(e,t)=>tr(tr({},e),t)})(Xa||(Xa={}));function _e(n,e,t,r,i,s,a,o,c){const l=[n,e,t,r,i,s,a,o,c].reduce(tr,{});return vl(l)}const Ja=Symbol("isProxy");function vl(n,e){const t=new Proxy({},{deleteProperty:()=>!1,get:(r,i)=>Za(r,i,n,e||t),getOwnPropertyDescriptor:(r,i)=>(Za(r,i,n,e||t),Object.getOwnPropertyDescriptor(r,i)),has:(r,i)=>i in n,ownKeys:()=>[...Reflect.ownKeys(n),Ja]});return t[Ja]=!0,t}const Qa=Symbol();function Za(n,e,t,r){if(e in n){if(n[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:n[e]});if(n[e]===Qa)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return n[e]}else if(e in t){const i=t[e];n[e]=Qa;try{n[e]=typeof i=="function"?i(r):vl(i,r)}catch(s){throw n[e]=s instanceof Error?s:void 0,s}return n[e]}else return}function tr(n,e){if(e){for(const[t,r]of Object.entries(e))if(r!==void 0){const i=n[t];i!==null&&r!==null&&typeof i=="object"&&typeof r=="object"?n[t]=tr(i,r):n[t]=r}}return n}class Jm{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}}const Zt={fileSystemProvider:()=>new Jm},Qm={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},Zm={AstReflection:()=>new Jo};function eg(){const n=_e(Qt(Zt),Zm),e=_e(Jt({shared:n}),Qm);return n.ServiceRegistry.register(e),e}function An(n){var e;const t=eg(),r=t.serializer.JsonSerializer.deserialize(n);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,Ht.parse(`memory://${(e=r.name)!==null&&e!==void 0?e:"grammar"}.langium`)),r}var tg=Object.defineProperty,x=(n,e)=>tg(n,"name",{value:e,configurable:!0}),ng="Statement",rg="Architecture";function ig(n){return Me.isInstance(n,rg)}x(ig,"isArchitecture");var El="Branch";function sg(n){return Me.isInstance(n,El)}x(sg,"isBranch");var ag="Checkout",og="CherryPicking",kl="Commit";function cg(n){return Me.isInstance(n,kl)}x(cg,"isCommit");var lg="Common";function ug(n){return Me.isInstance(n,lg)}x(ug,"isCommon");var Sl="GitGraph";function dg(n){return Me.isInstance(n,Sl)}x(dg,"isGitGraph");var fg="Info";function hg(n){return Me.isInstance(n,fg)}x(hg,"isInfo");var Il="Merge";function pg(n){return Me.isInstance(n,Il)}x(pg,"isMerge");var mg="Packet";function gg(n){return Me.isInstance(n,mg)}x(gg,"isPacket");var yg="PacketBlock";function Tg(n){return Me.isInstance(n,yg)}x(Tg,"isPacketBlock");var Rg="Pie";function Ag(n){return Me.isInstance(n,Rg)}x(Ag,"isPie");var vg="PieSection";function Eg(n){return Me.isInstance(n,vg)}x(Eg,"isPieSection");var kg="Direction",kt,xl=(kt=class extends po{getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(e,t){switch(e){case El:case ag:case og:case kl:case Il:return this.isSubtype(ng,t);case kg:return this.isSubtype(Sl,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"Architecture":return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Junction":return{name:"Junction",properties:[{name:"id"},{name:"in"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Service":return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},x(kt,"MermaidAstReflection"),kt),Me=new xl,eo,Sg=x(()=>eo??(eo=An('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"InfoGrammar"),to,Ig=x(()=>to??(to=An(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),no,xg=x(()=>no??(no=An('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"PieGrammar"),ro,Ng=x(()=>ro??(ro=An('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","fragment":true,"definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LeftPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RightPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Arrow","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"ArchitectureGrammar"),io,Cg=x(()=>io??(io=An(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`)),"GitGraphGrammar"),_g={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},wg={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Lg={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},$g={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Og={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},vn={AstReflection:x(()=>new xl,"AstReflection")},bg={Grammar:x(()=>Sg(),"Grammar"),LanguageMetaData:x(()=>_g,"LanguageMetaData"),parser:{}},Pg={Grammar:x(()=>Ig(),"Grammar"),LanguageMetaData:x(()=>wg,"LanguageMetaData"),parser:{}},Mg={Grammar:x(()=>xg(),"Grammar"),LanguageMetaData:x(()=>Lg,"LanguageMetaData"),parser:{}},Dg={Grammar:x(()=>Ng(),"Grammar"),LanguageMetaData:x(()=>$g,"LanguageMetaData"),parser:{}},Fg={Grammar:x(()=>Cg(),"Grammar"),LanguageMetaData:x(()=>Og,"LanguageMetaData"),parser:{}},Gg=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,Ug=/accTitle[\t ]*:([^\n\r]*)/,Bg=/title([\t ][^\n\r]*|)/,Vg={ACC_DESCR:Gg,ACC_TITLE:Ug,TITLE:Bg},St,Ki=(St=class extends cl{runConverter(e,t,r){let i=this.runCommonConverter(e,t,r);return i===void 0&&(i=this.runCustomConverter(e,t,r)),i===void 0?super.runConverter(e,t,r):i}runCommonConverter(e,t,r){const i=Vg[e.name];if(i===void 0)return;const s=i.exec(t);if(s!==null){if(s[1]!==void 0)return s[1].trim().replace(/[\t ]{2,}/gm," ");if(s[2]!==void 0)return s[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},x(St,"AbstractMermaidValueConverter"),St),It,zi=(It=class extends Ki{runCustomConverter(e,t,r){}},x(It,"CommonValueConverter"),It),xt,en=(xt=class extends ol{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){const i=super.buildKeywordTokens(e,t,r);return i.forEach(s=>{this.keywords.has(s.name)&&s.PATTERN!==void 0&&(s.PATTERN=new RegExp(s.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),i}},x(xt,"AbstractMermaidTokenBuilder"),xt),Nt;Nt=class extends en{},x(Nt,"CommonTokenBuilder");var Ct,Wg=(Ct=class extends en{constructor(){super(["gitGraph"])}},x(Ct,"GitGraphTokenBuilder"),Ct),Nl={parser:{TokenBuilder:x(()=>new Wg,"TokenBuilder"),ValueConverter:x(()=>new zi,"ValueConverter")}};function Cl(n=Zt){const e=_e(Qt(n),vn),t=_e(Jt({shared:e}),Fg,Nl);return e.ServiceRegistry.register(t),{shared:e,GitGraph:t}}x(Cl,"createGitGraphServices");var _t,jg=(_t=class extends en{constructor(){super(["info","showInfo"])}},x(_t,"InfoTokenBuilder"),_t),_l={parser:{TokenBuilder:x(()=>new jg,"TokenBuilder"),ValueConverter:x(()=>new zi,"ValueConverter")}};function wl(n=Zt){const e=_e(Qt(n),vn),t=_e(Jt({shared:e}),bg,_l);return e.ServiceRegistry.register(t),{shared:e,Info:t}}x(wl,"createInfoServices");var wt,Hg=(wt=class extends en{constructor(){super(["packet-beta"])}},x(wt,"PacketTokenBuilder"),wt),Ll={parser:{TokenBuilder:x(()=>new Hg,"TokenBuilder"),ValueConverter:x(()=>new zi,"ValueConverter")}};function $l(n=Zt){const e=_e(Qt(n),vn),t=_e(Jt({shared:e}),Pg,Ll);return e.ServiceRegistry.register(t),{shared:e,Packet:t}}x($l,"createPacketServices");var Lt,Kg=(Lt=class extends en{constructor(){super(["pie","showData"])}},x(Lt,"PieTokenBuilder"),Lt),$t,zg=($t=class extends Ki{runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},x($t,"PieValueConverter"),$t),Ol={parser:{TokenBuilder:x(()=>new Kg,"TokenBuilder"),ValueConverter:x(()=>new zg,"ValueConverter")}};function bl(n=Zt){const e=_e(Qt(n),vn),t=_e(Jt({shared:e}),Mg,Ol);return e.ServiceRegistry.register(t),{shared:e,Pie:t}}x(bl,"createPieServices");var Ot,qg=(Ot=class extends en{constructor(){super(["architecture"])}},x(Ot,"ArchitectureTokenBuilder"),Ot),bt,Yg=(bt=class extends Ki{runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");if(e.name==="ARCH_TITLE")return t.replace(/[[\]]/g,"").trim()}},x(bt,"ArchitectureValueConverter"),bt),Pl={parser:{TokenBuilder:x(()=>new qg,"TokenBuilder"),ValueConverter:x(()=>new Yg,"ValueConverter")}};function Ml(n=Zt){const e=_e(Qt(n),vn),t=_e(Jt({shared:e}),Dg,Pl);return e.ServiceRegistry.register(t),{shared:e,Architecture:t}}x(Ml,"createArchitectureServices");var ct={},Xg={info:x(async()=>{const{createInfoServices:n}=await tn(async()=>{const{createInfoServices:t}=await Promise.resolve().then(()=>Zg);return{createInfoServices:t}},void 0),e=n().Info.parser.LangiumParser;ct.info=e},"info"),packet:x(async()=>{const{createPacketServices:n}=await tn(async()=>{const{createPacketServices:t}=await Promise.resolve().then(()=>ey);return{createPacketServices:t}},void 0),e=n().Packet.parser.LangiumParser;ct.packet=e},"packet"),pie:x(async()=>{const{createPieServices:n}=await tn(async()=>{const{createPieServices:t}=await Promise.resolve().then(()=>ty);return{createPieServices:t}},void 0),e=n().Pie.parser.LangiumParser;ct.pie=e},"pie"),architecture:x(async()=>{const{createArchitectureServices:n}=await tn(async()=>{const{createArchitectureServices:t}=await Promise.resolve().then(()=>ny);return{createArchitectureServices:t}},void 0),e=n().Architecture.parser.LangiumParser;ct.architecture=e},"architecture"),gitGraph:x(async()=>{const{createGitGraphServices:n}=await tn(async()=>{const{createGitGraphServices:t}=await Promise.resolve().then(()=>ry);return{createGitGraphServices:t}},void 0),e=n().GitGraph.parser.LangiumParser;ct.gitGraph=e},"gitGraph")};async function Jg(n,e){const t=Xg[n];if(!t)throw new Error(`Unknown diagram type: ${n}`);ct[n]||await t();const i=ct[n].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new Qg(i);return i.value}x(Jg,"parse");var Pt,Qg=(Pt=class extends Error{constructor(e){const t=e.lexerErrors.map(i=>i.message).join(` +`),r=e.parserErrors.map(i=>i.message).join(` +`);super(`Parsing failed: ${t} ${r}`),this.result=e}},x(Pt,"MermaidParseError"),Pt);const Zg=Object.freeze(Object.defineProperty({__proto__:null,InfoModule:_l,createInfoServices:wl},Symbol.toStringTag,{value:"Module"})),ey=Object.freeze(Object.defineProperty({__proto__:null,PacketModule:Ll,createPacketServices:$l},Symbol.toStringTag,{value:"Module"})),ty=Object.freeze(Object.defineProperty({__proto__:null,PieModule:Ol,createPieServices:bl},Symbol.toStringTag,{value:"Module"})),ny=Object.freeze(Object.defineProperty({__proto__:null,ArchitectureModule:Pl,createArchitectureServices:Ml},Symbol.toStringTag,{value:"Module"})),ry=Object.freeze(Object.defineProperty({__proto__:null,GitGraphModule:Nl,createGitGraphServices:Cl},Symbol.toStringTag,{value:"Module"}));export{Jg as p}; diff --git a/assets/chunks/gitGraphDiagram-NRZ2UAAF.DYBJyTXa.js b/assets/chunks/gitGraphDiagram-NRZ2UAAF.DYBJyTXa.js new file mode 100644 index 00000000..93f2e29e --- /dev/null +++ b/assets/chunks/gitGraphDiagram-NRZ2UAAF.DYBJyTXa.js @@ -0,0 +1,65 @@ +import{p as Z}from"./chunk-TMUBEWPD.DdUvJo-R.js";import{I as F}from"./chunk-KFBOBJHC.DtEDTmGR.js";import{D as U,_ as h,d as rr,E as er,F as tr,G as ar,l as w,s as nr,g as sr,b as or,c as cr,q as ir,r as dr,e as B,x as hr,j as lr,v as $r,H as fr}from"../app.CXGmg8Jv.js";import{p as gr}from"./gitGraph-YCYPL57B.CGDMLFt3.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";import"./baseUniq.DbzeOdwK.js";import"./basePickBy.DBxcSOni.js";import"./clone.b2N_W2Ea.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},yr=U.gitGraph,z=h(()=>er({...yr,...tr().gitGraph}),"getConfig"),i=new F(()=>{const t=z(),r=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function j(){return ar({length:7})}h(j,"getID");function N(t,r){const a=Object.create(null);return t.reduce((s,e)=>{const n=r(e);return a[n]||(a[n]=!0,s.push(e)),s},[])}h(N,"uniqBy");var xr=h(function(t){i.records.direction=t},"setDirection"),pr=h(function(t){w.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),ur=h(function(){return i.records.options},"getOptions"),br=h(function(t){let r=t.msg,a=t.id;const s=t.type;let e=t.tags;w.info("commit",r,a,s,e),w.debug("Entering commit:",r,a,s,e);const n=z();a=B.sanitizeText(a,n),r=B.sanitizeText(r,n),e=e==null?void 0:e.map(o=>B.sanitizeText(o,n));const c={id:a||i.records.seq+"-"+j(),message:r,seq:i.records.seq++,type:s??p.NORMAL,tags:e??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=c,w.info("main branch",n.mainBranchName),i.records.commits.set(c.id,c),i.records.branches.set(i.records.currBranch,c.id),w.debug("in pushCommit "+c.id)},"commit"),mr=h(function(t){let r=t.name;const a=t.order;if(r=B.sanitizeText(r,z()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:a}),_(r),w.debug("in createBranch")},"branch"),wr=h(t=>{let r=t.branch,a=t.id;const s=t.type,e=t.tags,n=z();r=B.sanitizeText(r,n),a&&(a=B.sanitizeText(a,n));const c=i.records.branches.get(i.records.currBranch),o=i.records.branches.get(r),$=c?i.records.commits.get(c):void 0,l=o?i.records.commits.get(o):void 0;if($&&l&&$.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if($===void 0||!$){const d=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},d}if(!i.records.branches.has(r)){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},d}if(l===void 0||!l){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},d}if($===l){const d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(a&&i.records.commits.has(a)){const d=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw d.hash={text:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,token:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${s} ${e==null?void 0:e.join(" ")}`]},d}const f=o||"",g={id:a||`${i.records.seq}-${j()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:p.MERGE,customType:s,customId:!!a,tags:e??[]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),w.debug(i.records.branches),w.debug("in mergeBranch")},"merge"),vr=h(function(t){let r=t.id,a=t.targetId,s=t.tags,e=t.parent;w.debug("Entering cherryPick:",r,a,s);const n=z();if(r=B.sanitizeText(r,n),a=B.sanitizeText(a,n),s=s==null?void 0:s.map($=>B.sanitizeText($,n)),e=B.sanitizeText(e,n),!r||!i.records.commits.has(r)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},$}const c=i.records.commits.get(r);if(c===void 0||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const o=c.branch;if(c.type===p.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(o===i.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const $=i.records.branches.get(i.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const l=i.records.commits.get($);if(l===void 0||!l){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const f={id:i.records.seq+"-"+j(),message:`cherry-picked ${c==null?void 0:c.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,c.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${c.id}${c.type===p.MERGE?`|parent:${e}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),w.debug(i.records.branches),w.debug("in cherryPick")}},"cherryPick"),_=h(function(t){if(t=B.sanitizeText(t,z()),i.records.branches.has(t)){i.records.currBranch=t;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function A(t,r,a){const s=t.indexOf(r);s===-1?t.push(a):t.splice(s,1,a)}h(A,"upsert");function D(t){const r=t.reduce((e,n)=>e.seq>n.seq?e:n,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const s=[a,r.id,r.seq];for(const e in i.records.branches)i.records.branches.get(e)===r.id&&s.push(e);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=i.records.commits.get(r.parents[0]);A(t,r,e),r.parents[1]&&t.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=i.records.commits.get(r.parents[0]);A(t,r,e)}}t=N(t,e=>e.id),D(t)}h(D,"prettyPrintCommitHistory");var Cr=h(function(){w.debug(i.records.commits);const t=V()[0];D([t])},"prettyPrint"),Er=h(function(){i.reset(),hr()},"clear"),Br=h(function(){return[...i.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),kr=h(function(){return i.records.branches},"getBranches"),Lr=h(function(){return i.records.commits},"getCommits"),V=h(function(){const t=[...i.records.commits.values()];return t.forEach(function(r){w.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),Tr=h(function(){return i.records.currBranch},"getCurrentBranch"),Mr=h(function(){return i.records.direction},"getDirection"),Rr=h(function(){return i.records.head},"getHead"),X={commitType:p,getConfig:z,setDirection:xr,setOptions:pr,getOptions:ur,commit:br,branch:mr,merge:wr,cherryPick:vr,checkout:_,prettyPrint:Cr,clear:Er,getBranchesAsObjArray:Br,getBranches:kr,getCommits:Lr,getCommitsArray:V,getCurrentBranch:Tr,getDirection:Mr,getHead:Rr,setAccTitle:nr,getAccTitle:sr,getAccDescription:or,setAccDescription:cr,setDiagramTitle:ir,getDiagramTitle:dr},Ir=h((t,r)=>{Z(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)qr(a,r)},"populate"),qr=h((t,r)=>{const s={Commit:h(e=>r.commit(Or(e)),"Commit"),Branch:h(e=>r.branch(zr(e)),"Branch"),Merge:h(e=>r.merge(Gr(e)),"Merge"),Checkout:h(e=>r.checkout(Hr(e)),"Checkout"),CherryPicking:h(e=>r.cherryPick(Pr(e)),"CherryPicking")}[t.$type];s?s(t):w.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Or=h(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?p[t.type]:p.NORMAL,tags:t.tags??void 0}),"parseCommit"),zr=h(t=>({name:t.name,order:t.order??0}),"parseBranch"),Gr=h(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?p[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Hr=h(t=>t.branch,"parseCheckout"),Pr=h(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),Wr={parse:h(async t=>{const r=await gr("gitGraph",t);w.debug(r),Ir(r,X)},"parse")},S=rr(),b=S==null?void 0:S.gitGraph,R=10,I=40,k=4,L=2,O=8,C=new Map,E=new Map,P=30,G=new Map,W=[],M=0,x="LR",jr=h(()=>{C.clear(),E.clear(),G.clear(),M=0,W=[],x="LR"},"clear"),J=h(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(s=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=s.trim(),r.appendChild(e)}),r},"drawText"),Q=h(t=>{let r,a,s;return x==="BT"?(a=h((e,n)=>e<=n,"comparisonFunc"),s=1/0):(a=h((e,n)=>e>=n,"comparisonFunc"),s=0),t.forEach(e=>{var c,o;const n=x==="TB"||x=="BT"?(c=E.get(e))==null?void 0:c.y:(o=E.get(e))==null?void 0:o.x;n!==void 0&&a(n,s)&&(r=e,s=n)}),r},"findClosestParent"),Sr=h(t=>{let r="",a=1/0;return t.forEach(s=>{const e=E.get(s).y;e<=a&&(r=s,a=e)}),r||void 0},"findClosestParentBT"),Ar=h((t,r,a)=>{let s=a,e=a;const n=[];t.forEach(c=>{const o=r.get(c);if(!o)throw new Error(`Commit not found for key ${c}`);o.parents.length?(s=Yr(o),e=Math.max(s,e)):n.push(o),Kr(o,s)}),s=e,n.forEach(c=>{Nr(c,s,a)}),t.forEach(c=>{const o=r.get(c);if(o!=null&&o.parents.length){const $=Sr(o.parents);s=E.get($).y-I,s<=e&&(e=s);const l=C.get(o.branch).pos,f=s-R;E.set(o.id,{x:l,y:f})}})},"setParallelBTPos"),Dr=h(t=>{var s;const r=Q(t.parents.filter(e=>e!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(s=E.get(r))==null?void 0:s.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Yr=h(t=>Dr(t)+I,"calculateCommitPosition"),Kr=h((t,r)=>{const a=C.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const s=a.pos,e=r+R;return E.set(t.id,{x:s,y:e}),{x:s,y:e}},"setCommitPosition"),Nr=h((t,r,a)=>{const s=C.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,n=s.pos;E.set(t.id,{x:n,y:e})},"setRootPosition"),_r=h((t,r,a,s,e,n)=>{if(n===p.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%O} ${s}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%O} ${s}-inner`);else if(n===p.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`);else{const c=t.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",r.type===p.MERGE?9:10),c.attr("class",`commit ${r.id} commit${e%O}`),n===p.MERGE){const o=t.append("circle");o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",6),o.attr("class",`commit ${s} ${r.id} commit${e%O}`)}n===p.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${s} ${r.id} commit${e%O}`)}},"drawCommitBullet"),Vr=h((t,r,a,s)=>{var e;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&(b!=null&&b.showCommitLabel)){const n=t.append("g"),c=n.insert("rect").attr("class","commit-label-bkg"),o=n.append("text").attr("x",s).attr("y",a.y+25).attr("class","commit-label").text(r.id),$=(e=o.node())==null?void 0:e.getBBox();if($&&(c.attr("x",a.posWithOffset-$.width/2-L).attr("y",a.y+13.5).attr("width",$.width+2*L).attr("height",$.height+2*L),x==="TB"||x==="BT"?(c.attr("x",a.x-($.width+4*k+5)).attr("y",a.y-12),o.attr("x",a.x-($.width+4*k)).attr("y",a.y+$.height-12)):o.attr("x",a.posWithOffset-$.width/2),b.rotateCommitLabel))if(x==="TB"||x==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const l=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+l+", "+f+") rotate(-45, "+s+", "+a.y+")")}}},"drawCommitLabel"),Xr=h((t,r,a,s)=>{var e;if(r.tags.length>0){let n=0,c=0,o=0;const $=[];for(const l of r.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),d=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(l),y=(e=d.node())==null?void 0:e.getBBox();if(!y)throw new Error("Tag bbox not found");c=Math.max(c,y.width),o=Math.max(o,y.height),d.attr("x",a.posWithOffset-y.width/2),$.push({tag:d,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:l,hole:f,rect:g,yOffset:d}of $){const y=o/2,u=a.y-19.2-d;if(g.attr("class","tag-label-bkg").attr("points",` + ${s-c/2-k/2},${u+L} + ${s-c/2-k/2},${u-L} + ${a.posWithOffset-c/2-k},${u-y-L} + ${a.posWithOffset+c/2+k},${u-y-L} + ${a.posWithOffset+c/2+k},${u+y+L} + ${a.posWithOffset-c/2-k},${u+y+L}`),f.attr("cy",u).attr("cx",s-c/2+k/2).attr("r",1.5).attr("class","tag-hole"),x==="TB"||x==="BT"){const m=s+d;g.attr("class","tag-label-bkg").attr("points",` + ${a.x},${m+2} + ${a.x},${m-2} + ${a.x+R},${m-y-2} + ${a.x+R+c+4},${m-y-2} + ${a.x+R+c+4},${m+y+2} + ${a.x+R},${m+y+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),f.attr("cx",a.x+k/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),l.attr("x",a.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+s+")")}}}},"drawCommitTags"),Jr=h(t=>{switch(t.customType??t.type){case p.NORMAL:return"commit-normal";case p.REVERSE:return"commit-reverse";case p.HIGHLIGHT:return"commit-highlight";case p.MERGE:return"commit-merge";case p.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Qr=h((t,r,a,s)=>{const e={x:0,y:0};if(t.parents.length>0){const n=Q(t.parents);if(n){const c=s.get(n)??e;return r==="TB"?c.y+I:r==="BT"?(s.get(t.id)??e).y-I:c.x+I}}else return r==="TB"?P:r==="BT"?(s.get(t.id)??e).y-I:0;return 0},"calculatePosition"),Zr=h((t,r,a)=>{var c,o;const s=x==="BT"&&a?r:r+R,e=x==="TB"||x==="BT"?s:(c=C.get(t.branch))==null?void 0:c.pos,n=x==="TB"||x==="BT"?(o=C.get(t.branch))==null?void 0:o.pos:s;if(n===void 0||e===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:n,y:e,posWithOffset:s}},"getCommitPosition"),K=h((t,r,a)=>{if(!b)throw new Error("GitGraph config not found");const s=t.append("g").attr("class","commit-bullets"),e=t.append("g").attr("class","commit-labels");let n=x==="TB"||x==="BT"?P:0;const c=[...r.keys()],o=(b==null?void 0:b.parallelCommits)??!1,$=h((f,g)=>{var u,m;const d=(u=r.get(f))==null?void 0:u.seq,y=(m=r.get(g))==null?void 0:m.seq;return d!==void 0&&y!==void 0?d-y:0},"sortKeys");let l=c.sort($);x==="BT"&&(o&&Ar(l,r,n),l=l.reverse()),l.forEach(f=>{var y;const g=r.get(f);if(!g)throw new Error(`Commit not found for key ${f}`);o&&(n=Qr(g,x,n,E));const d=Zr(g,n,o);if(a){const u=Jr(g),m=g.customType??g.type,q=((y=C.get(g.branch))==null?void 0:y.index)??0;_r(s,g,d,u,q,m),Vr(e,g,d,n),Xr(e,g,d,n)}x==="TB"||x==="BT"?E.set(g.id,{x:d.x,y:d.posWithOffset}):E.set(g.id,{x:d.posWithOffset,y:d.y}),n=x==="BT"&&o?n+I:n+I+R,n>M&&(M=n)})},"drawCommits"),Fr=h((t,r,a,s,e)=>{const c=(x==="TB"||x==="BT"?a.xl.branch===c,"isOnBranchToGetCurve"),$=h(l=>l.seq>t.seq&&l.seq$(l)&&o(l))},"shouldRerouteArrow"),H=h((t,r,a=0)=>{const s=t+Math.abs(t-r)/2;if(a>5)return s;if(W.every(c=>Math.abs(c-s)>=10))return W.push(s),s;const n=Math.abs(t-r);return H(t,r-n/5,a+1)},"findLane"),Ur=h((t,r,a,s)=>{var y,u,m,q,Y;const e=E.get(r.id),n=E.get(a.id);if(e===void 0||n===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${a.id}`);const c=Fr(r,a,e,n,s);let o="",$="",l=0,f=0,g=(y=C.get(a.branch))==null?void 0:y.index;a.type===p.MERGE&&r.id!==a.parents[0]&&(g=(u=C.get(r.branch))==null?void 0:u.index);let d;if(c){o="A 10 10, 0, 0, 0,",$="A 10 10, 0, 0, 1,",l=10,f=10;const T=e.yn.x&&(o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===p.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y-l} ${$} ${e.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x+l} ${e.y} ${o} ${n.x} ${e.y+f} L ${n.x} ${n.y}`),e.x===n.x&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`)):x==="BT"?(e.xn.x&&(o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===p.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${o} ${e.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`),e.x===n.x&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`)):(e.yn.y&&(a.type===p.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${$} ${e.x+f} ${n.y} L ${n.x} ${n.y}`),e.y===n.y&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+g%O)},"drawArrow"),re=h((t,r)=>{const a=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(s=>{const e=r.get(s);e.parents&&e.parents.length>0&&e.parents.forEach(n=>{Ur(a,r.get(n),e,r)})})},"drawArrows"),ee=h((t,r)=>{const a=t.append("g");r.forEach((s,e)=>{var u;const n=e%O,c=(u=C.get(s.name))==null?void 0:u.pos;if(c===void 0)throw new Error(`Position not found for branch ${s.name}`);const o=a.append("line");o.attr("x1",0),o.attr("y1",c),o.attr("x2",M),o.attr("y2",c),o.attr("class","branch branch"+n),x==="TB"?(o.attr("y1",P),o.attr("x1",c),o.attr("y2",M),o.attr("x2",c)):x==="BT"&&(o.attr("y1",M),o.attr("x1",c),o.attr("y2",P),o.attr("x2",c)),W.push(c);const $=s.name,l=J($),f=a.insert("rect"),d=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);d.node().appendChild(l);const y=l.getBBox();f.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-y.width-4-((b==null?void 0:b.rotateCommitLabel)===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),d.attr("transform","translate("+(-y.width-14-((b==null?void 0:b.rotateCommitLabel)===!0?30:0))+", "+(c-y.height/2-1)+")"),x==="TB"?(f.attr("x",c-y.width/2-10).attr("y",0),d.attr("transform","translate("+(c-y.width/2-5)+", 0)")):x==="BT"?(f.attr("x",c-y.width/2-10).attr("y",M),d.attr("transform","translate("+(c-y.width/2-5)+", "+M+")")):f.attr("transform","translate(-19, "+(c-y.height/2)+")")})},"drawBranches"),te=h(function(t,r,a,s,e){return C.set(t,{pos:r,index:a}),r+=50+(e?40:0)+(x==="TB"||x==="BT"?s.width/2:0),r},"setBranchPosition"),ae=h(function(t,r,a,s){if(jr(),w.debug("in gitgraph renderer",t+` +`,"id:",r,a),!b)throw new Error("GitGraph config not found");const e=b.rotateCommitLabel??!1,n=s.db;G=n.getCommits();const c=n.getBranchesAsObjArray();x=n.getDirection();const o=lr(`[id="${r}"]`);let $=0;c.forEach((l,f)=>{var q;const g=J(l.name),d=o.append("g"),y=d.insert("g").attr("class","branchLabel"),u=y.insert("g").attr("class","label branch-label");(q=u.node())==null||q.appendChild(g);const m=g.getBBox();$=te(l.name,$,f,m,e),u.remove(),y.remove(),d.remove()}),K(o,G,!1),b.showBranches&&ee(o,c),re(o,G),K(o,G,!0),$r.insertTitle(o,"gitTitleText",b.titleTopMargin??0,n.getDiagramTitle()),fr(void 0,o,b.diagramPadding,b.useMaxWidth)},"draw"),ne={draw:ae},se=h(t=>` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0,1,2,3,4,5,6,7].map(r=>` + .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; } + .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; } + .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; } + .label${r} { fill: ${t["git"+r]}; } + .arrow${r} { stroke: ${t["git"+r]}; } + `).join(` +`)} + + .branch { + stroke-width: 1; + stroke: ${t.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} + .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} + .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } + .tag-hole { fill: ${t.textColor}; } + + .commit-merge { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + .commit-reverse { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } +`,"getStyles"),oe=se,xe={parser:Wr,db:X,renderer:ne,styles:oe};export{xe as diagram}; diff --git a/assets/chunks/graph.B66Ap3eE.js b/assets/chunks/graph.B66Ap3eE.js new file mode 100644 index 00000000..7dc785af --- /dev/null +++ b/assets/chunks/graph.B66Ap3eE.js @@ -0,0 +1 @@ +import{aq as N,ar as j,as as f,at as b,au as E}from"../app.CXGmg8Jv.js";import{a as v,c as P,k as _,f as g,d,i as l,v as p,r as D}from"./baseUniq.DbzeOdwK.js";var w=N(function(o){return v(P(o,1,j,!0))}),F="\0",a="\0",O="";class L{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=f(void 0),this._defaultEdgeLabelFn=f(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return b(e)||(e=f(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var e=this;return g(this.nodes(),function(t){return E(e._in[t])})}sinks(){var e=this;return g(this.nodes(),function(t){return E(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return d(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),d(_(this._in[e]),t),delete this._in[e],delete this._preds[e],d(_(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(t))t=a;else{t+="";for(var s=t;!l(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(l(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return _(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return _(t)}successors(e){var t=this._sucs[e];if(t)return _(t)}neighbors(e){var t=this.predecessors(e);if(t)return w(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),d(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&d(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return b(e)||(e=f(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return D(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,l(s)||(s=""+s);var h=c(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var u=M(this._isDirected,e,t,s);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[h]=u,y(this._preds[t],e),y(this._sucs[e],t),this._in[t][h]=u,this._out[e][h]=u,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],C(this._preds[t],e),C(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?g(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?g(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function y(o,e){o[e]?o[e]++:o[e]=1}function C(o,e){--o[e]||delete o[e]}function c(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}return i+O+r+O+(l(s)?F:s)}function M(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function m(o,e){return c(o,e.v,e.w,e.name)}export{L as G}; diff --git a/assets/chunks/index.CRBiAhYs.js b/assets/chunks/index.CRBiAhYs.js new file mode 100644 index 00000000..fc2d9dd9 --- /dev/null +++ b/assets/chunks/index.CRBiAhYs.js @@ -0,0 +1 @@ +import{d as r,a5 as a,a6 as n,a7 as o,V as h}from"./framework.BDUoXecB.js";const l=r({name:"github-button",props:{href:String,ariaLabel:String,title:String,dataIcon:String,dataColorScheme:String,dataSize:String,dataShowCount:String,dataText:String},render:function(){const t={ref:"_"};for(const e in this.$props)t[a(e)]=this.$props[e];return n("span",[o(this.$slots,"default")?n("a",t,this.$slots.default()):n("a",t)])},mounted:function(){this.paint()},beforeUpdate:function(){this.reset()},updated:function(){this.paint()},beforeUnmount:function(){this.reset()},methods:{paint:function(){if(this.$el.lastChild!==this.$refs._)return;const t=this.$el.appendChild(document.createElement("span")),e=this;h(()=>import("./buttons.esm.DK2fWHEW.js"),[]).then(function(i){e.$el.lastChild===t&&i.render(t.appendChild(e.$refs._),function(s){e.$el.lastChild===t&&t.parentNode.replaceChild(s,t)})})},reset:function(){this.$refs._!=null&&this.$el.replaceChild(this.$refs._,this.$el.lastChild)}}});export{l as default}; diff --git a/assets/chunks/infoDiagram-A4XQUW5V.q7RyalY3.js b/assets/chunks/infoDiagram-A4XQUW5V.q7RyalY3.js new file mode 100644 index 00000000..a378f80f --- /dev/null +++ b/assets/chunks/infoDiagram-A4XQUW5V.q7RyalY3.js @@ -0,0 +1,2 @@ +import{_ as e,l as o,I as i,k as n,K as p}from"../app.CXGmg8Jv.js";import{p as g}from"./gitGraph-YCYPL57B.CGDMLFt3.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";import"./baseUniq.DbzeOdwK.js";import"./basePickBy.DBxcSOni.js";import"./clone.b2N_W2Ea.js";var m={parse:e(async r=>{const a=await g("info",r);o.debug(a)},"parse")},v={version:p},d=e(()=>v.version,"getVersion"),c={getVersion:d},l=e((r,a,s)=>{o.debug(`rendering info diagram +`+r);const t=i(a);n(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${s}`)},"draw"),f={draw:l},D={parser:m,db:c,renderer:f};export{D as diagram}; diff --git a/assets/chunks/init.Gi6I4Gst.js b/assets/chunks/init.Gi6I4Gst.js new file mode 100644 index 00000000..d44de941 --- /dev/null +++ b/assets/chunks/init.Gi6I4Gst.js @@ -0,0 +1 @@ +function t(e,a){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(a).domain(e);break}return this}export{t as i}; diff --git a/assets/chunks/journeyDiagram-G5WM74LC.D8z_SedJ.js b/assets/chunks/journeyDiagram-G5WM74LC.D8z_SedJ.js new file mode 100644 index 00000000..16b2fbc2 --- /dev/null +++ b/assets/chunks/journeyDiagram-G5WM74LC.D8z_SedJ.js @@ -0,0 +1,139 @@ +import{d as ft,f as gt,g as at,b as mt}from"./chunk-ASOPGD6M.9xhfAZUp.js";import{_ as i,d as A,q as xt,r as kt,s as _t,g as vt,c as bt,b as wt,x as Tt,j as W,k as St}from"../app.CXGmg8Jv.js";import{d as tt}from"./arc.w3rEdi5q.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";var H=function(){var t=i(function(g,r,a,l){for(a=a||{},l=g.length;l--;a[g[l]]=r);return a},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],c=[1,10],s=[1,11],u=[1,12],h=[1,13],p=[1,14],d={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:i(function(r,a,l,y,f,o,S){var _=o.length-1;switch(f){case 1:return o[_-1];case 2:this.$=[];break;case 3:o[_-1].push(o[_]),this.$=o[_-1];break;case 4:case 5:this.$=o[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(o[_].substr(6)),this.$=o[_].substr(6);break;case 9:this.$=o[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=o[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(o[_].substr(8)),this.$=o[_].substr(8);break;case 13:y.addTask(o[_-1],o[_]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:c,14:s,16:u,17:h,18:p},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:c,14:s,16:u,17:h,18:p},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:i(function(r,a){if(a.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=a,l}},"parseError"),parse:i(function(r){var a=this,l=[0],y=[],f=[null],o=[],S=this.table,_="",B=0,J=0,ut=2,K=1,yt=o.slice.call(arguments,1),k=Object.create(this.lexer),E={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(E.yy[O]=this.yy[O]);k.setInput(r,E.yy),E.yy.lexer=k,E.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Y=k.yylloc;o.push(Y);var dt=k.options&&k.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(b){l.length=l.length-2*b,f.length=f.length-b,o.length=o.length-b}i(pt,"popStack");function Q(){var b;return b=y.pop()||k.lex()||K,typeof b!="number"&&(b instanceof Array&&(y=b,b=y.pop()),b=a.symbols_[b]||b),b}i(Q,"lex");for(var v,P,w,q,C={},j,M,D,N;;){if(P=l[l.length-1],this.defaultActions[P]?w=this.defaultActions[P]:((v===null||typeof v>"u")&&(v=Q()),w=S[P]&&S[P][v]),typeof w>"u"||!w.length||!w[0]){var G="";N=[];for(j in S[P])this.terminals_[j]&&j>ut&&N.push("'"+this.terminals_[j]+"'");k.showPosition?G="Parse error on line "+(B+1)+`: +`+k.showPosition()+` +Expecting `+N.join(", ")+", got '"+(this.terminals_[v]||v)+"'":G="Parse error on line "+(B+1)+": Unexpected "+(v==K?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(G,{text:k.match,token:this.terminals_[v]||v,line:k.yylineno,loc:Y,expected:N})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+v);switch(w[0]){case 1:l.push(v),f.push(k.yytext),o.push(k.yylloc),l.push(w[1]),v=null,J=k.yyleng,_=k.yytext,B=k.yylineno,Y=k.yylloc;break;case 2:if(M=this.productions_[w[1]][1],C.$=f[f.length-M],C._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},dt&&(C._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),q=this.performAction.apply(C,[_,J,B,E.yy,w[1],f,o].concat(yt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),f=f.slice(0,-1*M),o=o.slice(0,-1*M)),l.push(this.productions_[w[1]][0]),f.push(C.$),o.push(C._$),D=S[l[l.length-2]][l[l.length-1]],l.push(D);break;case 3:return!0}}return!0},"parse")},x=function(){var g={EOF:1,parseError:i(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:i(function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:i(function(r){var a=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:i(function(r){this.unput(this.match.slice(r))},"less"),pastInput:i(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:i(function(r,a){var l,y,f;if(this.options.backtrack_lexer&&(f={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(f.yylloc.range=this.yylloc.range.slice(0))),y=r[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var o in f)this[o]=f[o];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,a,l,y;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),o=0;oa[0].length)){if(a=l,y=o,this.options.backtrack_lexer){if(r=this.test_match(l,f[o]),r!==!1)return r;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(r=this.test_match(a,f[y]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var a=this.next();return a||this.lex()},"lex"),begin:i(function(a){this.conditionStack.push(a)},"begin"),popState:i(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:i(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:i(function(a){this.begin(a)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i(function(a,l,y,f){switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return g}();d.lexer=x;function m(){this.yy={}}return i(m,"Parser"),m.prototype=d,d.Parser=m,new m}();H.parser=H;var Mt=H,V="",U=[],R=[],F=[],$t=i(function(){U.length=0,R.length=0,V="",F.length=0,Tt()},"clear"),Et=i(function(t){V=t,U.push(t)},"addSection"),Pt=i(function(){return U},"getSections"),It=i(function(){let t=et();const e=100;let n=0;for(;!t&&n{n.people&&t.push(...n.people)}),[...new Set(t)].sort()},"updateActors"),Ct=i(function(t,e){const n=e.substr(1).split(":");let c=0,s=[];n.length===1?(c=Number(n[0]),s=[]):(c=Number(n[0]),s=n[1].split(","));const u=s.map(p=>p.trim()),h={section:V,type:V,people:u,task:t,score:c};F.push(h)},"addTask"),Vt=i(function(t){const e={section:V,type:V,description:t,task:t,classes:[]};R.push(e)},"addTaskOrg"),et=i(function(){const t=i(function(n){return F[n].processed},"compileTask");let e=!0;for(const[n,c]of F.entries())t(n),e=e&&c.processed;return e},"compileTasks"),Rt=i(function(){return At()},"getActors"),rt={getConfig:i(()=>A().journey,"getConfig"),clear:$t,setDiagramTitle:xt,getDiagramTitle:kt,setAccTitle:_t,getAccTitle:vt,setAccDescription:bt,getAccDescription:wt,addSection:Et,getSections:Pt,getTasks:It,addTask:Ct,addTaskOrg:Vt,getActors:Rt},Ft=i(t=>`.label { + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + color: ${t.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${t.textColor} + } + + .legend { + fill: ${t.textColor}; + } + + .label text { + fill: #333; + } + .label { + color: ${t.textColor} + } + + .face { + ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${t.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${t.fillType0?`fill: ${t.fillType0}`:""}; + } + .task-type-1, .section-type-1 { + ${t.fillType0?`fill: ${t.fillType1}`:""}; + } + .task-type-2, .section-type-2 { + ${t.fillType0?`fill: ${t.fillType2}`:""}; + } + .task-type-3, .section-type-3 { + ${t.fillType0?`fill: ${t.fillType3}`:""}; + } + .task-type-4, .section-type-4 { + ${t.fillType0?`fill: ${t.fillType4}`:""}; + } + .task-type-5, .section-type-5 { + ${t.fillType0?`fill: ${t.fillType5}`:""}; + } + .task-type-6, .section-type-6 { + ${t.fillType0?`fill: ${t.fillType6}`:""}; + } + .task-type-7, .section-type-7 { + ${t.fillType0?`fill: ${t.fillType7}`:""}; + } + + .actor-0 { + ${t.actor0?`fill: ${t.actor0}`:""}; + } + .actor-1 { + ${t.actor1?`fill: ${t.actor1}`:""}; + } + .actor-2 { + ${t.actor2?`fill: ${t.actor2}`:""}; + } + .actor-3 { + ${t.actor3?`fill: ${t.actor3}`:""}; + } + .actor-4 { + ${t.actor4?`fill: ${t.actor4}`:""}; + } + .actor-5 { + ${t.actor5?`fill: ${t.actor5}`:""}; + } +`,"getStyles"),Lt=Ft,Z=i(function(t,e){return ft(t,e)},"drawRect"),Bt=i(function(t,e){const c=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");s.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(d){const x=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}i(u,"smile");function h(d){const x=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}i(h,"sad");function p(d){d.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i(p,"ambivalent"),e.score>3?u(s):e.score<3?h(s):p(s),c},"drawFace"),lt=i(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),n.class!==void 0&&n.attr("class",n.class),e.title!==void 0&&n.append("title").text(e.title),n},"drawCircle"),ot=i(function(t,e){return gt(t,e)},"drawText"),jt=i(function(t,e){function n(s,u,h,p,d){return s+","+u+" "+(s+h)+","+u+" "+(s+h)+","+(u+p-d)+" "+(s+h-d*1.2)+","+(u+p)+" "+s+","+(u+p)}i(n,"genPoints");const c=t.append("polygon");c.attr("points",n(e.x,e.y,50,20,7)),c.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ot(t,e)},"drawLabel"),Nt=i(function(t,e,n){const c=t.append("g"),s=at();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,Z(c,s),ct(n)(e.text,c,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),st=-1,zt=i(function(t,e,n){const c=e.x+n.width/2,s=t.append("g");st++;const u=300+5*30;s.append("line").attr("id","task"+st).attr("x1",c).attr("y1",e.y).attr("x2",c).attr("y2",u).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Bt(s,{cx:c,cy:300+(5-e.score)*30,score:e.score});const h=at();h.x=e.x,h.y=e.y,h.fill=e.fill,h.width=n.width,h.height=n.height,h.class="task task-type-"+e.num,h.rx=3,h.ry=3,Z(s,h);let p=e.x+14;e.people.forEach(d=>{const x=e.actors[d].color,m={cx:p,cy:e.y,r:7,fill:x,stroke:"#000",title:d,pos:e.actors[d].position};lt(s,m),p+=10}),ct(n)(e.task,s,h.x,h.y,h.width,h.height,{class:"task"},n,e.colour)},"drawTask"),Ot=i(function(t,e){mt(t,e)},"drawBackgroundRect"),ct=function(){function t(s,u,h,p,d,x,m,g){const r=u.append("text").attr("x",h+d/2).attr("y",p+x/2+5).style("font-color",g).style("text-anchor","middle").text(s);c(r,m)}i(t,"byText");function e(s,u,h,p,d,x,m,g,r){const{taskFontSize:a,taskFontFamily:l}=g,y=s.split(//gi);for(let f=0;f{const s=$[c].color,u={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:$[c].position};L.drawCircle(t,u);const h={x:40,y:n+7,fill:"#666",text:c,textMargin:e.boxTextMargin|5};L.drawText(t,h),n+=20})}i(ht,"drawActorLegend");var z=A().journey,I=z.leftMargin,Gt=i(function(t,e,n,c){const s=A().journey,u=A().securityLevel;let h;u==="sandbox"&&(h=W("#i"+e));const p=u==="sandbox"?W(h.nodes()[0].contentDocument.body):W("body");T.init();const d=p.select("#"+e);L.initGraphics(d);const x=c.db.getTasks(),m=c.db.getDiagramTitle(),g=c.db.getActors();for(const o in $)delete $[o];let r=0;g.forEach(o=>{$[o]={color:s.actorColours[r%s.actorColours.length],position:r},r++}),ht(d),T.insert(0,0,I,Object.keys($).length*50),Wt(d,x,0);const a=T.getBounds();m&&d.append("text").text(m).attr("x",I).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const l=a.stopy-a.starty+2*s.diagramMarginY,y=I+a.stopx+2*s.diagramMarginX;St(d,l,y,s.useMaxWidth),d.append("line").attr("x1",I).attr("y1",s.height*4).attr("x2",y-I-4).attr("y2",s.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const f=m?70:0;d.attr("viewBox",`${a.startx} -25 ${y} ${l+f}`),d.attr("preserveAspectRatio","xMinYMin meet"),d.attr("height",l+f+25)},"draw"),T={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:i(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:i(function(t,e,n,c){t[e]===void 0?t[e]=n:t[e]=c(n,t[e])},"updateVal"),updateBounds:i(function(t,e,n,c){const s=A().journey,u=this;let h=0;function p(d){return i(function(m){h++;const g=u.sequenceItems.length-h+1;u.updateVal(m,"starty",e-g*s.boxMargin,Math.min),u.updateVal(m,"stopy",c+g*s.boxMargin,Math.max),u.updateVal(T.data,"startx",t-g*s.boxMargin,Math.min),u.updateVal(T.data,"stopx",n+g*s.boxMargin,Math.max),d!=="activation"&&(u.updateVal(m,"startx",t-g*s.boxMargin,Math.min),u.updateVal(m,"stopx",n+g*s.boxMargin,Math.max),u.updateVal(T.data,"starty",e-g*s.boxMargin,Math.min),u.updateVal(T.data,"stopy",c+g*s.boxMargin,Math.max))},"updateItemBounds")}i(p,"updateFn"),this.sequenceItems.forEach(p())},"updateBounds"),insert:i(function(t,e,n,c){const s=Math.min(t,n),u=Math.max(t,n),h=Math.min(e,c),p=Math.max(e,c);this.updateVal(T.data,"startx",s,Math.min),this.updateVal(T.data,"starty",h,Math.min),this.updateVal(T.data,"stopx",u,Math.max),this.updateVal(T.data,"stopy",p,Math.max),this.updateBounds(s,h,u,p)},"insert"),bumpVerticalPos:i(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:i(function(){return this.verticalPos},"getVerticalPos"),getBounds:i(function(){return this.data},"getBounds")},X=z.sectionFills,it=z.sectionColours,Wt=i(function(t,e,n){const c=A().journey;let s="";const u=c.height*2+c.diagramMarginY,h=n+u;let p=0,d="#CCC",x="black",m=0;for(const[g,r]of e.entries()){if(s!==r.section){d=X[p%X.length],m=p%X.length,x=it[p%it.length];let l=0;const y=r.section;for(let o=g;o($[y]&&(l[y]=$[y]),l),{});r.x=g*c.taskMargin+g*c.width+I,r.y=h,r.width=c.diagramMarginX,r.height=c.diagramMarginY,r.colour=x,r.fill=d,r.num=m,r.actors=a,L.drawTask(t,r,c),T.insert(r.x,r.y,r.x+r.width+c.taskMargin,300+5*30)}},"drawTasks"),nt={setConf:qt,draw:Gt},Kt={parser:Mt,db:rt,renderer:nt,styles:Lt,init:i(t=>{nt.setConf(t.journey),rt.clear()},"init")};export{Kt as diagram}; diff --git a/assets/chunks/kanban-definition-QRCXZQQD.DPLJJDkx.js b/assets/chunks/kanban-definition-QRCXZQQD.DPLJJDkx.js new file mode 100644 index 00000000..54335e4c --- /dev/null +++ b/assets/chunks/kanban-definition-QRCXZQQD.DPLJJDkx.js @@ -0,0 +1,88 @@ +import{_ as c,l as te,d as W,I as fe,ag as ye,ah as be,ai as me,ac as _e,D as Y,i as G,t as Ee,J as ke,ad as Se,ae as le,af as ce}from"../app.CXGmg8Jv.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";var $=function(){var t=c(function(_,s,n,a){for(n=n||{},a=_.length;a--;n[_[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],E=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],M=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],U=[1,35],j=[1,36],A=[1,6,7,11,13,16,17,20,23],H=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:M}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(P,[2,14],{7:U,11:j}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:M}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:H}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:U,11:j}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:H}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);b.setInput(s,T.yy),T.yy.lexer=b,T.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;e.push(q);var de=b.options&&b.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var k,R,v,Q,F={},X,I,oe,K;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((k===null||typeof k>"u")&&(k=ae()),v=B[R]&&B[R][k]),typeof v>"u"||!v.length||!v[0]){var Z="";K=[];for(X in B[R])this.terminals_[X]&&X>ue&&K.push("'"+this.terminals_[X]+"'");b.showPosition?Z="Parse error on line "+(z+1)+`: +`+b.showPosition()+` +Expecting `+K.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(k==re?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[k]||k,line:b.yylineno,loc:q,expected:K})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+k);switch(v[0]){case 1:a.push(k),u.push(b.yytext),e.push(b.yylloc),a.push(v[1]),k=null,ie=b.yyleng,l=b.yytext,z=b.yylineno,q=b.yylloc;break;case 2:if(I=this.productions_[v[1]][1],F.$=u[u.length-I],F._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(F._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Q=this.performAction.apply(F,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Q<"u")return Q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(F.$),e.push(F._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},m=function(){var _={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+` +`+n+"^"},"showPosition"),test_match:c(function(s,n){var a,o,u;if(this.options.backtrack_lexer&&(u={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(u.yylloc.range=this.yylloc.range.slice(0))),o=s[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],a=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var e in u)this[e]=u[e];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,a,o;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),e=0;en[0].length)){if(n=a,o=e,this.options.backtrack_lexer){if(s=this.test_match(a,u[e]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,u[o]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:c(function(){var n=this.next();return n||this.lex()},"lex"),begin:c(function(n){this.conditionStack.push(n)},"begin"),popState:c(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:c(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:c(function(n){this.begin(n)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(n,a,o,u){switch(o){case 0:return this.pushState("shapeData"),a.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const e=/\n\s*/g;return a.yytext=a.yytext.replace(e,"
    "),24;case 4:return 24;case 5:this.popState();break;case 6:return n.getLogger().trace("Found comment",a.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return n.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:n.getLogger().trace("end icon"),this.popState();break;case 16:return n.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return n.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return n.getLogger().trace("description:",a.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),n.getLogger().trace("node end ...",a.yytext),"NODE_DEND";case 36:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 41:return n.getLogger().trace("Long description:",a.yytext),21;case 42:return n.getLogger().trace("Long description:",a.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return _}();V.lexer=m;function O(){this.yy={}}return c(O,"Parser"),O.prototype=V,V.Parser=O,new O}();$.parser=$;var Ne=$,D=[],ne=[],ee=0,se={},xe=c(()=>{D=[],ne=[],ee=0,se={}},"clear"),ve=c(t=>{if(D.length===0)return null;const g=D[0].level;let d=null;for(let r=D.length-1;r>=0;r--)if(D[r].level===g&&!d&&(d=D[r]),D[r].levelh.parentId===p.id);for(const h of f){const L={id:h.id,parentId:p.id,label:G(h.label??"",r),isGroup:!1,ticket:h==null?void 0:h.ticket,priority:h==null?void 0:h.priority,assigned:h==null?void 0:h.assigned,icon:h==null?void 0:h.icon,shape:"kanbanItem",level:h.level,rx:5,ry:5,cssStyles:["text-align: left"]};g.push(L)}}return{nodes:g,edges:t,other:{},config:W()}},"getData"),Le=c((t,g,d,r,p)=>{var C,w;const E=W();let f=((C=E.mindmap)==null?void 0:C.padding)??Y.mindmap.padding;switch(r){case y.ROUNDED_RECT:case y.RECT:case y.HEXAGON:f*=2}const h={id:G(g,E)||"kbn"+ee++,level:t,label:G(d,E),width:((w=E.mindmap)==null?void 0:w.maxNodeWidth)??Y.mindmap.maxNodeWidth,padding:f,isGroup:!1};if(p!==void 0){let N;p.includes(` +`)?N=p+` +`:N=`{ +`+p+` +}`;const i=Ee(N,{schema:ke});if(i.shape&&(i.shape!==i.shape.toLowerCase()||i.shape.includes("_")))throw new Error(`No such shape: ${i.shape}. Shape names should be lowercase.`);i!=null&&i.shape&&i.shape==="kanbanItem"&&(h.shape=i==null?void 0:i.shape),i!=null&&i.label&&(h.label=i==null?void 0:i.label),i!=null&&i.icon&&(h.icon=i==null?void 0:i.icon.toString()),i!=null&&i.assigned&&(h.assigned=i==null?void 0:i.assigned.toString()),i!=null&&i.ticket&&(h.ticket=i==null?void 0:i.ticket.toString()),i!=null&&i.priority&&(h.priority=i==null?void 0:i.priority)}const L=ve(t);L?h.parentId=L.id||"kbn"+ee++:ne.push(h),D.push(h)},"addNode"),y={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Oe=c((t,g)=>{switch(te.debug("In get type",t,g),t){case"[":return y.RECT;case"(":return g===")"?y.ROUNDED_RECT:y.CLOUD;case"((":return y.CIRCLE;case")":return y.CLOUD;case"))":return y.BANG;case"{{":return y.HEXAGON;default:return y.DEFAULT}},"getType"),Ie=c((t,g)=>{se[t]=g},"setElementForId"),Ce=c(t=>{if(!t)return;const g=W(),d=D[D.length-1];t.icon&&(d.icon=G(t.icon,g)),t.class&&(d.cssClasses=G(t.class,g))},"decorateNode"),we=c(t=>{switch(t){case y.DEFAULT:return"no-border";case y.RECT:return"rect";case y.ROUNDED_RECT:return"rounded-rect";case y.CIRCLE:return"circle";case y.CLOUD:return"cloud";case y.BANG:return"bang";case y.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Ae=c(()=>te,"getLogger"),Te=c(t=>se[t],"getElementById"),Re={clear:xe,addNode:Le,getSections:he,getData:De,nodeType:y,getType:Oe,setElementForId:Ie,decorateNode:Ce,type2Str:we,getLogger:Ae,getElementById:Te},Pe=Re,Ve=c(async(t,g,d,r)=>{var U,j,A,H,V;te.debug(`Rendering kanban diagram +`+t);const E=r.db.getData(),f=W();f.htmlLabels=!1;const h=fe(g),L=h.append("g");L.attr("class","sections");const C=h.append("g");C.attr("class","items");const w=E.nodes.filter(m=>m.isGroup);let N=0;const i=10,M=[];let x=25;for(const m of w){const O=((U=f==null?void 0:f.kanban)==null?void 0:U.sectionWidth)||200;N=N+1,m.x=O*N+(N-1)*i/2,m.width=O,m.y=0,m.height=O*3,m.rx=5,m.ry=5,m.cssClasses=m.cssClasses+" section-"+N;const _=await ye(L,m);x=Math.max(x,(j=_==null?void 0:_.labelBBox)==null?void 0:j.height),M.push(_)}let P=0;for(const m of w){const O=M[P];P=P+1;const _=((A=f==null?void 0:f.kanban)==null?void 0:A.sectionWidth)||200,s=-_*3/2+x;let n=s;const a=E.nodes.filter(e=>e.parentId===m.id);for(const e of a){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=m.x,e.width=_-1.5*i;const l=(await be(C,e,{config:f})).node().getBBox();e.y=n+l.height/2,await me(e),n=e.y+l.height/2+i/2}const o=O.cluster.select("rect"),u=Math.max(n-s+3*i,50)+(x-25);o.attr("height",u)}_e(void 0,h,((H=f.mindmap)==null?void 0:H.padding)??Y.kanban.padding,((V=f.mindmap)==null?void 0:V.useMaxWidth)??Y.kanban.useMaxWidth)},"draw"),Be={draw:Ve},Fe=c(t=>{let g="";for(let r=0;rt.darkMode?ce(r,p):le(r,p),"adjuster");for(let r=0;r` + .edge { + stroke-width: 3; + } + ${Fe(t)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${t.git0}; + } + .section-root text { + fill: ${t.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .cluster-label, .label { + color: ${t.textColor}; + fill: ${t.textColor}; + } + .kanban-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`,"getStyles"),Me=Ge,We={db:Pe,renderer:Be,parser:Ne,styles:Me};export{We as diagram}; diff --git a/assets/chunks/katex.cqFQqex1.js b/assets/chunks/katex.cqFQqex1.js new file mode 100644 index 00000000..6e8f38ce --- /dev/null +++ b/assets/chunks/katex.cqFQqex1.js @@ -0,0 +1,261 @@ +class u0{constructor(e,t,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=a}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new u0(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class f0{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new f0(t,u0.range(this,e))}}class M{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var a="KaTeX parse error: "+e,n,s,o=t&&t.loc;if(o&&o.start<=o.end){var h=o.lexer.input;n=o.start,s=o.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var c=h.slice(n,s).replace(/[^]/g,"$&̲"),p;n>15?p="…"+h.slice(n-15,n):p=h.slice(0,n);var g;s+15":">","<":"<",'"':""","'":"'"},ya=/[&><"']/g;function xa(r){return String(r).replace(ya,e=>ba[e])}var vr=function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},wa=function(e){var t=vr(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},ka=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Sa=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},q={contains:fa,deflt:pa,escape:xa,hyphenate:ga,getBaseElem:vr,isCharacterBox:wa,protocolFromUrl:Sa},ze={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand ",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function Ma(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class dt{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in ze)if(ze.hasOwnProperty(t)){var a=ze[t];this[t]=e[t]!==void 0?a.processor?a.processor(e[t]):e[t]:Ma(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new M("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=q.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class O0{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return y0[za[this.id]]}sub(){return y0[Aa[this.id]]}fracNum(){return y0[Ta[this.id]]}fracDen(){return y0[Ba[this.id]]}cramp(){return y0[Da[this.id]]}text(){return y0[Ca[this.id]]}isTight(){return this.size>=2}}var ft=0,Te=1,ee=2,B0=3,le=4,d0=5,te=6,n0=7,y0=[new O0(ft,0,!1),new O0(Te,0,!0),new O0(ee,1,!1),new O0(B0,1,!0),new O0(le,2,!1),new O0(d0,2,!0),new O0(te,3,!1),new O0(n0,3,!0)],za=[le,d0,le,d0,te,n0,te,n0],Aa=[d0,d0,d0,d0,n0,n0,n0,n0],Ta=[ee,B0,le,d0,te,n0,te,n0],Ba=[B0,B0,d0,d0,n0,n0,n0,n0],Da=[Te,Te,B0,B0,d0,d0,n0,n0],Ca=[ft,Te,ee,B0,ee,B0,ee,B0],R={DISPLAY:y0[ft],TEXT:y0[ee],SCRIPT:y0[le],SCRIPTSCRIPT:y0[te]},nt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Na(r){for(var e=0;e=n[0]&&r<=n[1])return t.name}return null}var Ae=[];nt.forEach(r=>r.blocks.forEach(e=>Ae.push(...e)));function gr(r){for(var e=0;e=Ae[e]&&r<=Ae[e+1])return!0;return!1}var _0=80,qa=function(e,t){return"M95,"+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+" -"+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Ea=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+" -"+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Ra=function(e,t){return"M983 "+(10+e+t)+` +l`+e/3.13+" -"+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Ia=function(e,t){return"M424,"+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+` +h400000v`+(40+e)+"h-400000z"},Fa=function(e,t){return"M473,"+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},Oa=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},Ha=function(e,t,a){var n=a-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+` +H742v`+n+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},La=function(e,t,a){t=1e3*t;var n="";switch(e){case"sqrtMain":n=qa(t,_0);break;case"sqrtSize1":n=Ea(t,_0);break;case"sqrtSize2":n=Ra(t,_0);break;case"sqrtSize3":n=Ia(t,_0);break;case"sqrtSize4":n=Fa(t,_0);break;case"sqrtTall":n=Ha(t,_0,a)}return n},Pa=function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z"+("M367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z");case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z");default:return""}},Ft={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Ga=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class ue{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return q.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;tt.toText();return this.children.map(e).join("")}}var x0={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},ve={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ot={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Va(r,e){x0[r]=e}function pt(r,e,t){if(!x0[e])throw new Error("Font metrics not found for font: "+e+".");var a=r.charCodeAt(0),n=x0[e][a];if(!n&&r[0]in Ot&&(a=Ot[r[0]].charCodeAt(0),n=x0[e][a]),!n&&t==="text"&&gr(a)&&(n=x0[e][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var Ue={};function Ua(r){var e;if(r>=5?e=0:r>=3?e=1:e=2,!Ue[e]){var t=Ue[e]={cssEmPerMu:ve.quad[e]/18};for(var a in ve)ve.hasOwnProperty(a)&&(t[a]=ve[a][e])}return Ue[e]}var Ya=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Ht=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Lt=function(e,t){return t.size<2?e:Ya[e-1][t.size-1]};class T0{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||T0.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Ht[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return new T0(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Lt(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Ht[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Lt(T0.BASESIZE,e);return this.size===t&&this.textSize===T0.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==T0.BASESIZE?["sizing","reset-size"+this.size,"size"+T0.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Ua(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}T0.BASESIZE=6;var it={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Xa={ex:!0,em:!0,mu:!0},br=function(e){return typeof e!="string"&&(e=e.unit),e in it||e in Xa||e==="ex"},K=function(e,t){var a;if(e.unit in it)a=it[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")a=t.fontMetrics().cssEmPerMu;else{var n;if(t.style.isTight()?n=t.havingStyle(t.style.text()):n=t,e.unit==="ex")a=n.fontMetrics().xHeight;else if(e.unit==="em")a=n.fontMetrics().quad;else throw new M("Invalid unit: '"+e.unit+"'");n!==t&&(a*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*a,t.maxSize)},A=function(e){return+e.toFixed(4)+"em"},P0=function(e){return e.filter(t=>t).join(" ")},yr=function(e,t,a){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},xr=function(e){var t=document.createElement(e);t.className=P0(this.classes);for(var a in this.style)this.style.hasOwnProperty(a)&&(t.style[a]=this.style[a]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var s=0;s",t};class he{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,yr.call(this,e,a,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return q.contains(this.classes,e)}toNode(){return xr.call(this,"span")}toMarkup(){return wr.call(this,"span")}}class vt{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,yr.call(this,t,n),this.children=a||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return q.contains(this.classes,e)}toNode(){return xr.call(this,"a")}toMarkup(){return wr.call(this,"a")}}class $a{constructor(e,t,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=a}hasClass(e){return q.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=''+q.escape(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=A(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=P0(this.classes));for(var a in this.style)this.style.hasOwnProperty(a)&&(t=t||document.createElement("span"),t.style[a]=this.style[a]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(a+="margin-right:"+this.italic+"em;");for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=q.hyphenate(n)+":"+this.style[n]+";");a&&(e=!0,t+=' style="'+q.escape(a)+'"');var s=q.escape(this.text);return e?(t+=">",t+=s,t+="",t):s}}class C0{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n':''}}class st{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);return t}toMarkup(){var e=" but got "+String(r)+".")}var Za={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ka={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},$={math:{},text:{}};function i(r,e,t,a,n,s){$[r][n]={font:e,group:t,replace:a},s&&a&&($[r][a]=$[r][n])}var l="math",k="text",u="main",d="ams",W="accent-token",D="bin",i0="close",re="inner",E="mathord",_="op-token",m0="open",qe="punct",f="rel",E0="spacing",v="textord";i(l,u,f,"≡","\\equiv",!0);i(l,u,f,"≺","\\prec",!0);i(l,u,f,"≻","\\succ",!0);i(l,u,f,"∼","\\sim",!0);i(l,u,f,"⊥","\\perp");i(l,u,f,"⪯","\\preceq",!0);i(l,u,f,"⪰","\\succeq",!0);i(l,u,f,"≃","\\simeq",!0);i(l,u,f,"∣","\\mid",!0);i(l,u,f,"≪","\\ll",!0);i(l,u,f,"≫","\\gg",!0);i(l,u,f,"≍","\\asymp",!0);i(l,u,f,"∥","\\parallel");i(l,u,f,"⋈","\\bowtie",!0);i(l,u,f,"⌣","\\smile",!0);i(l,u,f,"⊑","\\sqsubseteq",!0);i(l,u,f,"⊒","\\sqsupseteq",!0);i(l,u,f,"≐","\\doteq",!0);i(l,u,f,"⌢","\\frown",!0);i(l,u,f,"∋","\\ni",!0);i(l,u,f,"∝","\\propto",!0);i(l,u,f,"⊢","\\vdash",!0);i(l,u,f,"⊣","\\dashv",!0);i(l,u,f,"∋","\\owns");i(l,u,qe,".","\\ldotp");i(l,u,qe,"⋅","\\cdotp");i(l,u,v,"#","\\#");i(k,u,v,"#","\\#");i(l,u,v,"&","\\&");i(k,u,v,"&","\\&");i(l,u,v,"ℵ","\\aleph",!0);i(l,u,v,"∀","\\forall",!0);i(l,u,v,"ℏ","\\hbar",!0);i(l,u,v,"∃","\\exists",!0);i(l,u,v,"∇","\\nabla",!0);i(l,u,v,"♭","\\flat",!0);i(l,u,v,"ℓ","\\ell",!0);i(l,u,v,"♮","\\natural",!0);i(l,u,v,"♣","\\clubsuit",!0);i(l,u,v,"℘","\\wp",!0);i(l,u,v,"♯","\\sharp",!0);i(l,u,v,"♢","\\diamondsuit",!0);i(l,u,v,"ℜ","\\Re",!0);i(l,u,v,"♡","\\heartsuit",!0);i(l,u,v,"ℑ","\\Im",!0);i(l,u,v,"♠","\\spadesuit",!0);i(l,u,v,"§","\\S",!0);i(k,u,v,"§","\\S");i(l,u,v,"¶","\\P",!0);i(k,u,v,"¶","\\P");i(l,u,v,"†","\\dag");i(k,u,v,"†","\\dag");i(k,u,v,"†","\\textdagger");i(l,u,v,"‡","\\ddag");i(k,u,v,"‡","\\ddag");i(k,u,v,"‡","\\textdaggerdbl");i(l,u,i0,"⎱","\\rmoustache",!0);i(l,u,m0,"⎰","\\lmoustache",!0);i(l,u,i0,"⟯","\\rgroup",!0);i(l,u,m0,"⟮","\\lgroup",!0);i(l,u,D,"∓","\\mp",!0);i(l,u,D,"⊖","\\ominus",!0);i(l,u,D,"⊎","\\uplus",!0);i(l,u,D,"⊓","\\sqcap",!0);i(l,u,D,"∗","\\ast");i(l,u,D,"⊔","\\sqcup",!0);i(l,u,D,"◯","\\bigcirc",!0);i(l,u,D,"∙","\\bullet",!0);i(l,u,D,"‡","\\ddagger");i(l,u,D,"≀","\\wr",!0);i(l,u,D,"⨿","\\amalg");i(l,u,D,"&","\\And");i(l,u,f,"⟵","\\longleftarrow",!0);i(l,u,f,"⇐","\\Leftarrow",!0);i(l,u,f,"⟸","\\Longleftarrow",!0);i(l,u,f,"⟶","\\longrightarrow",!0);i(l,u,f,"⇒","\\Rightarrow",!0);i(l,u,f,"⟹","\\Longrightarrow",!0);i(l,u,f,"↔","\\leftrightarrow",!0);i(l,u,f,"⟷","\\longleftrightarrow",!0);i(l,u,f,"⇔","\\Leftrightarrow",!0);i(l,u,f,"⟺","\\Longleftrightarrow",!0);i(l,u,f,"↦","\\mapsto",!0);i(l,u,f,"⟼","\\longmapsto",!0);i(l,u,f,"↗","\\nearrow",!0);i(l,u,f,"↩","\\hookleftarrow",!0);i(l,u,f,"↪","\\hookrightarrow",!0);i(l,u,f,"↘","\\searrow",!0);i(l,u,f,"↼","\\leftharpoonup",!0);i(l,u,f,"⇀","\\rightharpoonup",!0);i(l,u,f,"↙","\\swarrow",!0);i(l,u,f,"↽","\\leftharpoondown",!0);i(l,u,f,"⇁","\\rightharpoondown",!0);i(l,u,f,"↖","\\nwarrow",!0);i(l,u,f,"⇌","\\rightleftharpoons",!0);i(l,d,f,"≮","\\nless",!0);i(l,d,f,"","\\@nleqslant");i(l,d,f,"","\\@nleqq");i(l,d,f,"⪇","\\lneq",!0);i(l,d,f,"≨","\\lneqq",!0);i(l,d,f,"","\\@lvertneqq");i(l,d,f,"⋦","\\lnsim",!0);i(l,d,f,"⪉","\\lnapprox",!0);i(l,d,f,"⊀","\\nprec",!0);i(l,d,f,"⋠","\\npreceq",!0);i(l,d,f,"⋨","\\precnsim",!0);i(l,d,f,"⪹","\\precnapprox",!0);i(l,d,f,"≁","\\nsim",!0);i(l,d,f,"","\\@nshortmid");i(l,d,f,"∤","\\nmid",!0);i(l,d,f,"⊬","\\nvdash",!0);i(l,d,f,"⊭","\\nvDash",!0);i(l,d,f,"⋪","\\ntriangleleft");i(l,d,f,"⋬","\\ntrianglelefteq",!0);i(l,d,f,"⊊","\\subsetneq",!0);i(l,d,f,"","\\@varsubsetneq");i(l,d,f,"⫋","\\subsetneqq",!0);i(l,d,f,"","\\@varsubsetneqq");i(l,d,f,"≯","\\ngtr",!0);i(l,d,f,"","\\@ngeqslant");i(l,d,f,"","\\@ngeqq");i(l,d,f,"⪈","\\gneq",!0);i(l,d,f,"≩","\\gneqq",!0);i(l,d,f,"","\\@gvertneqq");i(l,d,f,"⋧","\\gnsim",!0);i(l,d,f,"⪊","\\gnapprox",!0);i(l,d,f,"⊁","\\nsucc",!0);i(l,d,f,"⋡","\\nsucceq",!0);i(l,d,f,"⋩","\\succnsim",!0);i(l,d,f,"⪺","\\succnapprox",!0);i(l,d,f,"≆","\\ncong",!0);i(l,d,f,"","\\@nshortparallel");i(l,d,f,"∦","\\nparallel",!0);i(l,d,f,"⊯","\\nVDash",!0);i(l,d,f,"⋫","\\ntriangleright");i(l,d,f,"⋭","\\ntrianglerighteq",!0);i(l,d,f,"","\\@nsupseteqq");i(l,d,f,"⊋","\\supsetneq",!0);i(l,d,f,"","\\@varsupsetneq");i(l,d,f,"⫌","\\supsetneqq",!0);i(l,d,f,"","\\@varsupsetneqq");i(l,d,f,"⊮","\\nVdash",!0);i(l,d,f,"⪵","\\precneqq",!0);i(l,d,f,"⪶","\\succneqq",!0);i(l,d,f,"","\\@nsubseteqq");i(l,d,D,"⊴","\\unlhd");i(l,d,D,"⊵","\\unrhd");i(l,d,f,"↚","\\nleftarrow",!0);i(l,d,f,"↛","\\nrightarrow",!0);i(l,d,f,"⇍","\\nLeftarrow",!0);i(l,d,f,"⇏","\\nRightarrow",!0);i(l,d,f,"↮","\\nleftrightarrow",!0);i(l,d,f,"⇎","\\nLeftrightarrow",!0);i(l,d,f,"△","\\vartriangle");i(l,d,v,"ℏ","\\hslash");i(l,d,v,"▽","\\triangledown");i(l,d,v,"◊","\\lozenge");i(l,d,v,"Ⓢ","\\circledS");i(l,d,v,"®","\\circledR");i(k,d,v,"®","\\circledR");i(l,d,v,"∡","\\measuredangle",!0);i(l,d,v,"∄","\\nexists");i(l,d,v,"℧","\\mho");i(l,d,v,"Ⅎ","\\Finv",!0);i(l,d,v,"⅁","\\Game",!0);i(l,d,v,"‵","\\backprime");i(l,d,v,"▲","\\blacktriangle");i(l,d,v,"▼","\\blacktriangledown");i(l,d,v,"■","\\blacksquare");i(l,d,v,"⧫","\\blacklozenge");i(l,d,v,"★","\\bigstar");i(l,d,v,"∢","\\sphericalangle",!0);i(l,d,v,"∁","\\complement",!0);i(l,d,v,"ð","\\eth",!0);i(k,u,v,"ð","ð");i(l,d,v,"╱","\\diagup");i(l,d,v,"╲","\\diagdown");i(l,d,v,"□","\\square");i(l,d,v,"□","\\Box");i(l,d,v,"◊","\\Diamond");i(l,d,v,"¥","\\yen",!0);i(k,d,v,"¥","\\yen",!0);i(l,d,v,"✓","\\checkmark",!0);i(k,d,v,"✓","\\checkmark");i(l,d,v,"ℶ","\\beth",!0);i(l,d,v,"ℸ","\\daleth",!0);i(l,d,v,"ℷ","\\gimel",!0);i(l,d,v,"ϝ","\\digamma",!0);i(l,d,v,"ϰ","\\varkappa");i(l,d,m0,"┌","\\@ulcorner",!0);i(l,d,i0,"┐","\\@urcorner",!0);i(l,d,m0,"└","\\@llcorner",!0);i(l,d,i0,"┘","\\@lrcorner",!0);i(l,d,f,"≦","\\leqq",!0);i(l,d,f,"⩽","\\leqslant",!0);i(l,d,f,"⪕","\\eqslantless",!0);i(l,d,f,"≲","\\lesssim",!0);i(l,d,f,"⪅","\\lessapprox",!0);i(l,d,f,"≊","\\approxeq",!0);i(l,d,D,"⋖","\\lessdot");i(l,d,f,"⋘","\\lll",!0);i(l,d,f,"≶","\\lessgtr",!0);i(l,d,f,"⋚","\\lesseqgtr",!0);i(l,d,f,"⪋","\\lesseqqgtr",!0);i(l,d,f,"≑","\\doteqdot");i(l,d,f,"≓","\\risingdotseq",!0);i(l,d,f,"≒","\\fallingdotseq",!0);i(l,d,f,"∽","\\backsim",!0);i(l,d,f,"⋍","\\backsimeq",!0);i(l,d,f,"⫅","\\subseteqq",!0);i(l,d,f,"⋐","\\Subset",!0);i(l,d,f,"⊏","\\sqsubset",!0);i(l,d,f,"≼","\\preccurlyeq",!0);i(l,d,f,"⋞","\\curlyeqprec",!0);i(l,d,f,"≾","\\precsim",!0);i(l,d,f,"⪷","\\precapprox",!0);i(l,d,f,"⊲","\\vartriangleleft");i(l,d,f,"⊴","\\trianglelefteq");i(l,d,f,"⊨","\\vDash",!0);i(l,d,f,"⊪","\\Vvdash",!0);i(l,d,f,"⌣","\\smallsmile");i(l,d,f,"⌢","\\smallfrown");i(l,d,f,"≏","\\bumpeq",!0);i(l,d,f,"≎","\\Bumpeq",!0);i(l,d,f,"≧","\\geqq",!0);i(l,d,f,"⩾","\\geqslant",!0);i(l,d,f,"⪖","\\eqslantgtr",!0);i(l,d,f,"≳","\\gtrsim",!0);i(l,d,f,"⪆","\\gtrapprox",!0);i(l,d,D,"⋗","\\gtrdot");i(l,d,f,"⋙","\\ggg",!0);i(l,d,f,"≷","\\gtrless",!0);i(l,d,f,"⋛","\\gtreqless",!0);i(l,d,f,"⪌","\\gtreqqless",!0);i(l,d,f,"≖","\\eqcirc",!0);i(l,d,f,"≗","\\circeq",!0);i(l,d,f,"≜","\\triangleq",!0);i(l,d,f,"∼","\\thicksim");i(l,d,f,"≈","\\thickapprox");i(l,d,f,"⫆","\\supseteqq",!0);i(l,d,f,"⋑","\\Supset",!0);i(l,d,f,"⊐","\\sqsupset",!0);i(l,d,f,"≽","\\succcurlyeq",!0);i(l,d,f,"⋟","\\curlyeqsucc",!0);i(l,d,f,"≿","\\succsim",!0);i(l,d,f,"⪸","\\succapprox",!0);i(l,d,f,"⊳","\\vartriangleright");i(l,d,f,"⊵","\\trianglerighteq");i(l,d,f,"⊩","\\Vdash",!0);i(l,d,f,"∣","\\shortmid");i(l,d,f,"∥","\\shortparallel");i(l,d,f,"≬","\\between",!0);i(l,d,f,"⋔","\\pitchfork",!0);i(l,d,f,"∝","\\varpropto");i(l,d,f,"◀","\\blacktriangleleft");i(l,d,f,"∴","\\therefore",!0);i(l,d,f,"∍","\\backepsilon");i(l,d,f,"▶","\\blacktriangleright");i(l,d,f,"∵","\\because",!0);i(l,d,f,"⋘","\\llless");i(l,d,f,"⋙","\\gggtr");i(l,d,D,"⊲","\\lhd");i(l,d,D,"⊳","\\rhd");i(l,d,f,"≂","\\eqsim",!0);i(l,u,f,"⋈","\\Join");i(l,d,f,"≑","\\Doteq",!0);i(l,d,D,"∔","\\dotplus",!0);i(l,d,D,"∖","\\smallsetminus");i(l,d,D,"⋒","\\Cap",!0);i(l,d,D,"⋓","\\Cup",!0);i(l,d,D,"⩞","\\doublebarwedge",!0);i(l,d,D,"⊟","\\boxminus",!0);i(l,d,D,"⊞","\\boxplus",!0);i(l,d,D,"⋇","\\divideontimes",!0);i(l,d,D,"⋉","\\ltimes",!0);i(l,d,D,"⋊","\\rtimes",!0);i(l,d,D,"⋋","\\leftthreetimes",!0);i(l,d,D,"⋌","\\rightthreetimes",!0);i(l,d,D,"⋏","\\curlywedge",!0);i(l,d,D,"⋎","\\curlyvee",!0);i(l,d,D,"⊝","\\circleddash",!0);i(l,d,D,"⊛","\\circledast",!0);i(l,d,D,"⋅","\\centerdot");i(l,d,D,"⊺","\\intercal",!0);i(l,d,D,"⋒","\\doublecap");i(l,d,D,"⋓","\\doublecup");i(l,d,D,"⊠","\\boxtimes",!0);i(l,d,f,"⇢","\\dashrightarrow",!0);i(l,d,f,"⇠","\\dashleftarrow",!0);i(l,d,f,"⇇","\\leftleftarrows",!0);i(l,d,f,"⇆","\\leftrightarrows",!0);i(l,d,f,"⇚","\\Lleftarrow",!0);i(l,d,f,"↞","\\twoheadleftarrow",!0);i(l,d,f,"↢","\\leftarrowtail",!0);i(l,d,f,"↫","\\looparrowleft",!0);i(l,d,f,"⇋","\\leftrightharpoons",!0);i(l,d,f,"↶","\\curvearrowleft",!0);i(l,d,f,"↺","\\circlearrowleft",!0);i(l,d,f,"↰","\\Lsh",!0);i(l,d,f,"⇈","\\upuparrows",!0);i(l,d,f,"↿","\\upharpoonleft",!0);i(l,d,f,"⇃","\\downharpoonleft",!0);i(l,u,f,"⊶","\\origof",!0);i(l,u,f,"⊷","\\imageof",!0);i(l,d,f,"⊸","\\multimap",!0);i(l,d,f,"↭","\\leftrightsquigarrow",!0);i(l,d,f,"⇉","\\rightrightarrows",!0);i(l,d,f,"⇄","\\rightleftarrows",!0);i(l,d,f,"↠","\\twoheadrightarrow",!0);i(l,d,f,"↣","\\rightarrowtail",!0);i(l,d,f,"↬","\\looparrowright",!0);i(l,d,f,"↷","\\curvearrowright",!0);i(l,d,f,"↻","\\circlearrowright",!0);i(l,d,f,"↱","\\Rsh",!0);i(l,d,f,"⇊","\\downdownarrows",!0);i(l,d,f,"↾","\\upharpoonright",!0);i(l,d,f,"⇂","\\downharpoonright",!0);i(l,d,f,"⇝","\\rightsquigarrow",!0);i(l,d,f,"⇝","\\leadsto");i(l,d,f,"⇛","\\Rrightarrow",!0);i(l,d,f,"↾","\\restriction");i(l,u,v,"‘","`");i(l,u,v,"$","\\$");i(k,u,v,"$","\\$");i(k,u,v,"$","\\textdollar");i(l,u,v,"%","\\%");i(k,u,v,"%","\\%");i(l,u,v,"_","\\_");i(k,u,v,"_","\\_");i(k,u,v,"_","\\textunderscore");i(l,u,v,"∠","\\angle",!0);i(l,u,v,"∞","\\infty",!0);i(l,u,v,"′","\\prime");i(l,u,v,"△","\\triangle");i(l,u,v,"Γ","\\Gamma",!0);i(l,u,v,"Δ","\\Delta",!0);i(l,u,v,"Θ","\\Theta",!0);i(l,u,v,"Λ","\\Lambda",!0);i(l,u,v,"Ξ","\\Xi",!0);i(l,u,v,"Π","\\Pi",!0);i(l,u,v,"Σ","\\Sigma",!0);i(l,u,v,"Υ","\\Upsilon",!0);i(l,u,v,"Φ","\\Phi",!0);i(l,u,v,"Ψ","\\Psi",!0);i(l,u,v,"Ω","\\Omega",!0);i(l,u,v,"A","Α");i(l,u,v,"B","Β");i(l,u,v,"E","Ε");i(l,u,v,"Z","Ζ");i(l,u,v,"H","Η");i(l,u,v,"I","Ι");i(l,u,v,"K","Κ");i(l,u,v,"M","Μ");i(l,u,v,"N","Ν");i(l,u,v,"O","Ο");i(l,u,v,"P","Ρ");i(l,u,v,"T","Τ");i(l,u,v,"X","Χ");i(l,u,v,"¬","\\neg",!0);i(l,u,v,"¬","\\lnot");i(l,u,v,"⊤","\\top");i(l,u,v,"⊥","\\bot");i(l,u,v,"∅","\\emptyset");i(l,d,v,"∅","\\varnothing");i(l,u,E,"α","\\alpha",!0);i(l,u,E,"β","\\beta",!0);i(l,u,E,"γ","\\gamma",!0);i(l,u,E,"δ","\\delta",!0);i(l,u,E,"ϵ","\\epsilon",!0);i(l,u,E,"ζ","\\zeta",!0);i(l,u,E,"η","\\eta",!0);i(l,u,E,"θ","\\theta",!0);i(l,u,E,"ι","\\iota",!0);i(l,u,E,"κ","\\kappa",!0);i(l,u,E,"λ","\\lambda",!0);i(l,u,E,"μ","\\mu",!0);i(l,u,E,"ν","\\nu",!0);i(l,u,E,"ξ","\\xi",!0);i(l,u,E,"ο","\\omicron",!0);i(l,u,E,"π","\\pi",!0);i(l,u,E,"ρ","\\rho",!0);i(l,u,E,"σ","\\sigma",!0);i(l,u,E,"τ","\\tau",!0);i(l,u,E,"υ","\\upsilon",!0);i(l,u,E,"ϕ","\\phi",!0);i(l,u,E,"χ","\\chi",!0);i(l,u,E,"ψ","\\psi",!0);i(l,u,E,"ω","\\omega",!0);i(l,u,E,"ε","\\varepsilon",!0);i(l,u,E,"ϑ","\\vartheta",!0);i(l,u,E,"ϖ","\\varpi",!0);i(l,u,E,"ϱ","\\varrho",!0);i(l,u,E,"ς","\\varsigma",!0);i(l,u,E,"φ","\\varphi",!0);i(l,u,D,"∗","*",!0);i(l,u,D,"+","+");i(l,u,D,"−","-",!0);i(l,u,D,"⋅","\\cdot",!0);i(l,u,D,"∘","\\circ",!0);i(l,u,D,"÷","\\div",!0);i(l,u,D,"±","\\pm",!0);i(l,u,D,"×","\\times",!0);i(l,u,D,"∩","\\cap",!0);i(l,u,D,"∪","\\cup",!0);i(l,u,D,"∖","\\setminus",!0);i(l,u,D,"∧","\\land");i(l,u,D,"∨","\\lor");i(l,u,D,"∧","\\wedge",!0);i(l,u,D,"∨","\\vee",!0);i(l,u,v,"√","\\surd");i(l,u,m0,"⟨","\\langle",!0);i(l,u,m0,"∣","\\lvert");i(l,u,m0,"∥","\\lVert");i(l,u,i0,"?","?");i(l,u,i0,"!","!");i(l,u,i0,"⟩","\\rangle",!0);i(l,u,i0,"∣","\\rvert");i(l,u,i0,"∥","\\rVert");i(l,u,f,"=","=");i(l,u,f,":",":");i(l,u,f,"≈","\\approx",!0);i(l,u,f,"≅","\\cong",!0);i(l,u,f,"≥","\\ge");i(l,u,f,"≥","\\geq",!0);i(l,u,f,"←","\\gets");i(l,u,f,">","\\gt",!0);i(l,u,f,"∈","\\in",!0);i(l,u,f,"","\\@not");i(l,u,f,"⊂","\\subset",!0);i(l,u,f,"⊃","\\supset",!0);i(l,u,f,"⊆","\\subseteq",!0);i(l,u,f,"⊇","\\supseteq",!0);i(l,d,f,"⊈","\\nsubseteq",!0);i(l,d,f,"⊉","\\nsupseteq",!0);i(l,u,f,"⊨","\\models");i(l,u,f,"←","\\leftarrow",!0);i(l,u,f,"≤","\\le");i(l,u,f,"≤","\\leq",!0);i(l,u,f,"<","\\lt",!0);i(l,u,f,"→","\\rightarrow",!0);i(l,u,f,"→","\\to");i(l,d,f,"≱","\\ngeq",!0);i(l,d,f,"≰","\\nleq",!0);i(l,u,E0," ","\\ ");i(l,u,E0," ","\\space");i(l,u,E0," ","\\nobreakspace");i(k,u,E0," ","\\ ");i(k,u,E0," "," ");i(k,u,E0," ","\\space");i(k,u,E0," ","\\nobreakspace");i(l,u,E0,null,"\\nobreak");i(l,u,E0,null,"\\allowbreak");i(l,u,qe,",",",");i(l,u,qe,";",";");i(l,d,D,"⊼","\\barwedge",!0);i(l,d,D,"⊻","\\veebar",!0);i(l,u,D,"⊙","\\odot",!0);i(l,u,D,"⊕","\\oplus",!0);i(l,u,D,"⊗","\\otimes",!0);i(l,u,v,"∂","\\partial",!0);i(l,u,D,"⊘","\\oslash",!0);i(l,d,D,"⊚","\\circledcirc",!0);i(l,d,D,"⊡","\\boxdot",!0);i(l,u,D,"△","\\bigtriangleup");i(l,u,D,"▽","\\bigtriangledown");i(l,u,D,"†","\\dagger");i(l,u,D,"⋄","\\diamond");i(l,u,D,"⋆","\\star");i(l,u,D,"◃","\\triangleleft");i(l,u,D,"▹","\\triangleright");i(l,u,m0,"{","\\{");i(k,u,v,"{","\\{");i(k,u,v,"{","\\textbraceleft");i(l,u,i0,"}","\\}");i(k,u,v,"}","\\}");i(k,u,v,"}","\\textbraceright");i(l,u,m0,"{","\\lbrace");i(l,u,i0,"}","\\rbrace");i(l,u,m0,"[","\\lbrack",!0);i(k,u,v,"[","\\lbrack",!0);i(l,u,i0,"]","\\rbrack",!0);i(k,u,v,"]","\\rbrack",!0);i(l,u,m0,"(","\\lparen",!0);i(l,u,i0,")","\\rparen",!0);i(k,u,v,"<","\\textless",!0);i(k,u,v,">","\\textgreater",!0);i(l,u,m0,"⌊","\\lfloor",!0);i(l,u,i0,"⌋","\\rfloor",!0);i(l,u,m0,"⌈","\\lceil",!0);i(l,u,i0,"⌉","\\rceil",!0);i(l,u,v,"\\","\\backslash");i(l,u,v,"∣","|");i(l,u,v,"∣","\\vert");i(k,u,v,"|","\\textbar",!0);i(l,u,v,"∥","\\|");i(l,u,v,"∥","\\Vert");i(k,u,v,"∥","\\textbardbl");i(k,u,v,"~","\\textasciitilde");i(k,u,v,"\\","\\textbackslash");i(k,u,v,"^","\\textasciicircum");i(l,u,f,"↑","\\uparrow",!0);i(l,u,f,"⇑","\\Uparrow",!0);i(l,u,f,"↓","\\downarrow",!0);i(l,u,f,"⇓","\\Downarrow",!0);i(l,u,f,"↕","\\updownarrow",!0);i(l,u,f,"⇕","\\Updownarrow",!0);i(l,u,_,"∐","\\coprod");i(l,u,_,"⋁","\\bigvee");i(l,u,_,"⋀","\\bigwedge");i(l,u,_,"⨄","\\biguplus");i(l,u,_,"⋂","\\bigcap");i(l,u,_,"⋃","\\bigcup");i(l,u,_,"∫","\\int");i(l,u,_,"∫","\\intop");i(l,u,_,"∬","\\iint");i(l,u,_,"∭","\\iiint");i(l,u,_,"∏","\\prod");i(l,u,_,"∑","\\sum");i(l,u,_,"⨂","\\bigotimes");i(l,u,_,"⨁","\\bigoplus");i(l,u,_,"⨀","\\bigodot");i(l,u,_,"∮","\\oint");i(l,u,_,"∯","\\oiint");i(l,u,_,"∰","\\oiiint");i(l,u,_,"⨆","\\bigsqcup");i(l,u,_,"∫","\\smallint");i(k,u,re,"…","\\textellipsis");i(l,u,re,"…","\\mathellipsis");i(k,u,re,"…","\\ldots",!0);i(l,u,re,"…","\\ldots",!0);i(l,u,re,"⋯","\\@cdots",!0);i(l,u,re,"⋱","\\ddots",!0);i(l,u,v,"⋮","\\varvdots");i(k,u,v,"⋮","\\varvdots");i(l,u,W,"ˊ","\\acute");i(l,u,W,"ˋ","\\grave");i(l,u,W,"¨","\\ddot");i(l,u,W,"~","\\tilde");i(l,u,W,"ˉ","\\bar");i(l,u,W,"˘","\\breve");i(l,u,W,"ˇ","\\check");i(l,u,W,"^","\\hat");i(l,u,W,"⃗","\\vec");i(l,u,W,"˙","\\dot");i(l,u,W,"˚","\\mathring");i(l,u,E,"","\\@imath");i(l,u,E,"","\\@jmath");i(l,u,v,"ı","ı");i(l,u,v,"ȷ","ȷ");i(k,u,v,"ı","\\i",!0);i(k,u,v,"ȷ","\\j",!0);i(k,u,v,"ß","\\ss",!0);i(k,u,v,"æ","\\ae",!0);i(k,u,v,"œ","\\oe",!0);i(k,u,v,"ø","\\o",!0);i(k,u,v,"Æ","\\AE",!0);i(k,u,v,"Œ","\\OE",!0);i(k,u,v,"Ø","\\O",!0);i(k,u,W,"ˊ","\\'");i(k,u,W,"ˋ","\\`");i(k,u,W,"ˆ","\\^");i(k,u,W,"˜","\\~");i(k,u,W,"ˉ","\\=");i(k,u,W,"˘","\\u");i(k,u,W,"˙","\\.");i(k,u,W,"¸","\\c");i(k,u,W,"˚","\\r");i(k,u,W,"ˇ","\\v");i(k,u,W,"¨",'\\"');i(k,u,W,"˝","\\H");i(k,u,W,"◯","\\textcircled");var kr={"--":!0,"---":!0,"``":!0,"''":!0};i(k,u,v,"–","--",!0);i(k,u,v,"–","\\textendash");i(k,u,v,"—","---",!0);i(k,u,v,"—","\\textemdash");i(k,u,v,"‘","`",!0);i(k,u,v,"‘","\\textquoteleft");i(k,u,v,"’","'",!0);i(k,u,v,"’","\\textquoteright");i(k,u,v,"“","``",!0);i(k,u,v,"“","\\textquotedblleft");i(k,u,v,"”","''",!0);i(k,u,v,"”","\\textquotedblright");i(l,u,v,"°","\\degree",!0);i(k,u,v,"°","\\degree");i(k,u,v,"°","\\textdegree",!0);i(l,u,v,"£","\\pounds");i(l,u,v,"£","\\mathsterling",!0);i(k,u,v,"£","\\pounds");i(k,u,v,"£","\\textsterling",!0);i(l,d,v,"✠","\\maltese");i(k,d,v,"✠","\\maltese");var Gt='0123456789/@."';for(var Ye=0;Ye0)return b0(s,p,n,t,o.concat(g));if(c){var y,w;if(c==="boldsymbol"){var x=_a(s,n,t,o,a);y=x.fontName,w=[x.fontClass]}else h?(y=zr[c].fontName,w=[c]):(y=xe(c,t.fontWeight,t.fontShape),w=[c,t.fontWeight,t.fontShape]);if(Ee(s,y,n).metrics)return b0(s,y,n,t,o.concat(w));if(kr.hasOwnProperty(s)&&y.slice(0,10)==="Typewriter"){for(var z=[],T=0;T{if(P0(r.classes)!==P0(e.classes)||r.skew!==e.skew||r.maxFontSize!==e.maxFontSize)return!1;if(r.classes.length===1){var t=r.classes[0];if(t==="mbin"||t==="mord")return!1}for(var a in r.style)if(r.style.hasOwnProperty(a)&&r.style[a]!==e.style[a])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&r.style[n]!==e.style[n])return!1;return!0},r1=r=>{for(var e=0;et&&(t=o.height),o.depth>a&&(a=o.depth),o.maxFontSize>n&&(n=o.maxFontSize)}e.height=t,e.depth=a,e.maxFontSize=n},l0=function(e,t,a,n){var s=new he(e,t,a,n);return gt(s),s},Sr=(r,e,t,a)=>new he(r,e,t,a),a1=function(e,t,a){var n=l0([e],[],t);return n.height=Math.max(a||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=A(n.height),n.maxFontSize=1,n},n1=function(e,t,a,n){var s=new vt(e,t,a,n);return gt(s),s},Mr=function(e){var t=new ue(e);return gt(t),t},i1=function(e,t){return e instanceof ue?l0([],[e],t):e},s1=function(e){if(e.positionType==="individualShift"){for(var t=e.children,a=[t[0]],n=-t[0].shift-t[0].elem.depth,s=n,o=1;o{var t=l0(["mspace"],[],e),a=K(r,e);return t.style.marginRight=A(a),t},xe=function(e,t,a){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}var s;return t==="textbf"&&a==="textit"?s="BoldItalic":t==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",n+"-"+s},zr={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ar={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},u1=function(e,t){var[a,n,s]=Ar[e],o=new G0(a),h=new C0([o],{width:A(n),height:A(s),style:"width:"+A(n),viewBox:"0 0 "+1e3*n+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),c=Sr(["overlay"],[h],t);return c.height=s,c.style.height=A(s),c.style.width=A(n),c},b={fontMap:zr,makeSymbol:b0,mathsym:Qa,makeSpan:l0,makeSvgSpan:Sr,makeLineSpan:a1,makeAnchor:n1,makeFragment:Mr,wrapFragment:i1,makeVList:l1,makeOrd:e1,makeGlue:o1,staticSvg:u1,svgData:Ar,tryCombineChars:r1},Z={number:3,unit:"mu"},$0={number:4,unit:"mu"},A0={number:5,unit:"mu"},h1={mord:{mop:Z,mbin:$0,mrel:A0,minner:Z},mop:{mord:Z,mop:Z,mrel:A0,minner:Z},mbin:{mord:$0,mop:$0,mopen:$0,minner:$0},mrel:{mord:A0,mop:A0,mopen:A0,minner:A0},mopen:{},mclose:{mop:Z,mbin:$0,mrel:A0,minner:Z},mpunct:{mord:Z,mop:Z,mrel:A0,mopen:Z,mclose:Z,mpunct:Z,minner:Z},minner:{mord:Z,mop:Z,mbin:$0,mrel:A0,mopen:Z,mpunct:Z,minner:Z}},m1={mord:{mop:Z},mop:{mord:Z,mop:Z},mbin:{},mrel:{},mopen:{},mclose:{mop:Z},mpunct:{},minner:{mop:Z}},Tr={},De={},Ce={};function B(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:o}=r,h={type:e,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},c=0;c{var C=T.classes[0],N=z.classes[0];C==="mbin"&&q.contains(d1,N)?T.classes[0]="mord":N==="mbin"&&q.contains(c1,C)&&(z.classes[0]="mord")},{node:y},w,x),$t(s,(z,T)=>{var C=ot(T),N=ot(z),F=C&&N?z.hasClass("mtight")?m1[C][N]:h1[C][N]:null;if(F)return b.makeGlue(F,p)},{node:y},w,x),s},$t=function r(e,t,a,n,s){n&&e.push(n);for(var o=0;ow=>{e.splice(y+1,0,w),o++})(o)}n&&e.pop()},Br=function(e){return e instanceof ue||e instanceof vt||e instanceof he&&e.hasClass("enclosing")?e:null},v1=function r(e,t){var a=Br(e);if(a){var n=a.children;if(n.length){if(t==="right")return r(n[n.length-1],"right");if(t==="left")return r(n[0],"left")}}return e},ot=function(e,t){return e?(t&&(e=v1(e,t)),p1[e.classes[0]]||null):null},oe=function(e,t){var a=["nulldelimiter"].concat(e.baseSizingClasses());return N0(t.concat(a))},P=function(e,t,a){if(!e)return N0();if(De[e.type]){var n=De[e.type](e,t);if(a&&t.size!==a.size){n=N0(t.sizingClasses(a),[n],t);var s=t.sizeMultiplier/a.sizeMultiplier;n.height*=s,n.depth*=s}return n}else throw new M("Got group of unknown type: '"+e.type+"'")};function we(r,e){var t=N0(["base"],r,e),a=N0(["strut"]);return a.style.height=A(t.height+t.depth),t.depth&&(a.style.verticalAlign=A(-t.depth)),t.children.unshift(a),t}function ut(r,e){var t=null;r.length===1&&r[0].type==="tag"&&(t=r[0].tag,r=r[0].body);var a=t0(r,e,"root"),n;a.length===2&&a[1].hasClass("tag")&&(n=a.pop());for(var s=[],o=[],h=0;h0&&(s.push(we(o,e)),o=[]),s.push(a[h]));o.length>0&&s.push(we(o,e));var p;t?(p=we(t0(t,e,!0)),p.classes=["tag"],s.push(p)):n&&s.push(n);var g=N0(["katex-html"],s);if(g.setAttribute("aria-hidden","true"),p){var y=p.children[0];y.style.height=A(g.height+g.depth),g.depth&&(y.style.verticalAlign=A(-g.depth))}return g}function Dr(r){return new ue(r)}class h0{constructor(e,t,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=a||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=P0(this.classes));for(var a=0;a0&&(e+=' class ="'+q.escape(P0(this.classes))+'"'),e+=">";for(var a=0;a",e}toText(){return this.children.map(e=>e.toText()).join("")}}class w0{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return q.escape(this.toText())}toText(){return this.text}}class g1{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",A(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var S={MathNode:h0,TextNode:w0,SpaceNode:g1,newDocumentFragment:Dr},v0=function(e,t,a){return $[t][e]&&$[t][e].replace&&e.charCodeAt(0)!==55349&&!(kr.hasOwnProperty(e)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(e=$[t][e].replace),new S.TextNode(e)},bt=function(e){return e.length===1?e[0]:new S.MathNode("mrow",e)},yt=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var a=t.font;if(!a||a==="mathnormal")return null;var n=e.mode;if(a==="mathit")return"italic";if(a==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(a==="mathbf")return"bold";if(a==="mathbb")return"double-struck";if(a==="mathsfit")return"sans-serif-italic";if(a==="mathfrak")return"fraktur";if(a==="mathscr"||a==="mathcal")return"script";if(a==="mathsf")return"sans-serif";if(a==="mathtt")return"monospace";var s=e.text;if(q.contains(["\\imath","\\jmath"],s))return null;$[n][s]&&$[n][s].replace&&(s=$[n][s].replace);var o=b.fontMap[a].fontName;return pt(s,o,n)?b.fontMap[a].variant:null};function je(r){if(!r)return!1;if(r.type==="mi"&&r.children.length===1){var e=r.children[0];return e instanceof w0&&e.text==="."}else if(r.type==="mo"&&r.children.length===1&&r.getAttribute("separator")==="true"&&r.getAttribute("lspace")==="0em"&&r.getAttribute("rspace")==="0em"){var t=r.children[0];return t instanceof w0&&t.text===","}else return!1}var o0=function(e,t,a){if(e.length===1){var n=X(e[0],t);return a&&n instanceof h0&&n.type==="mo"&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var s=[],o,h=0;h=1&&(o.type==="mn"||je(o))){var p=c.children[0];p instanceof h0&&p.type==="mn"&&(p.children=[...o.children,...p.children],s.pop())}else if(o.type==="mi"&&o.children.length===1){var g=o.children[0];if(g instanceof w0&&g.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var y=c.children[0];y instanceof w0&&y.text.length>0&&(y.text=y.text.slice(0,1)+"̸"+y.text.slice(1),s.pop())}}}s.push(c),o=c}return s},V0=function(e,t,a){return bt(o0(e,t,a))},X=function(e,t){if(!e)return new S.MathNode("mrow");if(Ce[e.type]){var a=Ce[e.type](e,t);return a}else throw new M("Got group of unknown type: '"+e.type+"'")};function Wt(r,e,t,a,n){var s=o0(r,t),o;s.length===1&&s[0]instanceof h0&&q.contains(["mrow","mtable"],s[0].type)?o=s[0]:o=new S.MathNode("mrow",s);var h=new S.MathNode("annotation",[new S.TextNode(e)]);h.setAttribute("encoding","application/x-tex");var c=new S.MathNode("semantics",[o,h]),p=new S.MathNode("math",[c]);p.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&p.setAttribute("display","block");var g=n?"katex":"katex-mathml";return b.makeSpan([g],[p])}var Cr=function(e){return new T0({style:e.displayMode?R.DISPLAY:R.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Nr=function(e,t){if(t.displayMode){var a=["katex-display"];t.leqno&&a.push("leqno"),t.fleqn&&a.push("fleqn"),e=b.makeSpan(a,[e])}return e},b1=function(e,t,a){var n=Cr(a),s;if(a.output==="mathml")return Wt(e,t,n,a.displayMode,!0);if(a.output==="html"){var o=ut(e,n);s=b.makeSpan(["katex"],[o])}else{var h=Wt(e,t,n,a.displayMode,!1),c=ut(e,n);s=b.makeSpan(["katex"],[h,c])}return Nr(s,a)},y1=function(e,t,a){var n=Cr(a),s=ut(e,n),o=b.makeSpan(["katex"],[s]);return Nr(o,a)},x1={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},w1=function(e){var t=new S.MathNode("mo",[new S.TextNode(x1[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},k1={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},S1=function(e){return e.type==="ordgroup"?e.body.length:1},M1=function(e,t){function a(){var h=4e5,c=e.label.slice(1);if(q.contains(["widehat","widecheck","widetilde","utilde"],c)){var p=e,g=S1(p.base),y,w,x;if(g>5)c==="widehat"||c==="widecheck"?(y=420,h=2364,x=.42,w=c+"4"):(y=312,h=2340,x=.34,w="tilde4");else{var z=[1,1,2,2,3,3][g];c==="widehat"||c==="widecheck"?(h=[0,1062,2364,2364,2364][z],y=[0,239,300,360,420][z],x=[0,.24,.3,.3,.36,.42][z],w=c+z):(h=[0,600,1033,2339,2340][z],y=[0,260,286,306,312][z],x=[0,.26,.286,.3,.306,.34][z],w="tilde"+z)}var T=new G0(w),C=new C0([T],{width:"100%",height:A(x),viewBox:"0 0 "+h+" "+y,preserveAspectRatio:"none"});return{span:b.makeSvgSpan([],[C],t),minWidth:0,height:x}}else{var N=[],F=k1[c],[O,V,L]=F,U=L/1e3,G=O.length,j,Y;if(G===1){var z0=F[3];j=["hide-tail"],Y=[z0]}else if(G===2)j=["halfarrow-left","halfarrow-right"],Y=["xMinYMin","xMaxYMin"];else if(G===3)j=["brace-left","brace-center","brace-right"],Y=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+G+" children.");for(var r0=0;r00&&(n.style.minWidth=A(s)),n},z1=function(e,t,a,n,s){var o,h=e.height+e.depth+a+n;if(/fbox|color|angl/.test(t)){if(o=b.makeSpan(["stretchy",t],[],s),t==="fbox"){var c=s.color&&s.getColor();c&&(o.style.borderColor=c)}}else{var p=[];/^[bx]cancel$/.test(t)&&p.push(new st({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&p.push(new st({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var g=new C0(p,{width:"100%",height:A(h)});o=b.makeSvgSpan([],[g],s)}return o.height=h,o.style.height=A(h),o},q0={encloseSpan:z1,mathMLnode:w1,svgSpan:M1};function H(r,e){if(!r||r.type!==e)throw new Error("Expected node of type "+e+", but got "+(r?"node of type "+r.type:String(r)));return r}function xt(r){var e=Re(r);if(!e)throw new Error("Expected node of symbol group type, but got "+(r?"node of type "+r.type:String(r)));return e}function Re(r){return r&&(r.type==="atom"||Ka.hasOwnProperty(r.type))?r:null}var wt=(r,e)=>{var t,a,n;r&&r.type==="supsub"?(a=H(r.base,"accent"),t=a.base,r.base=t,n=ja(P(r,e)),r.base=a):(a=H(r,"accent"),t=a.base);var s=P(t,e.havingCrampedStyle()),o=a.isShifty&&q.isCharacterBox(t),h=0;if(o){var c=q.getBaseElem(t),p=P(c,e.havingCrampedStyle());h=Pt(p).skew}var g=a.label==="\\c",y=g?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),w;if(a.isStretchy)w=q0.svgSpan(a,e),w=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:w,wrapperClasses:["svg-align"],wrapperStyle:h>0?{width:"calc(100% - "+A(2*h)+")",marginLeft:A(2*h)}:void 0}]},e);else{var x,z;a.label==="\\vec"?(x=b.staticSvg("vec",e),z=b.svgData.vec[1]):(x=b.makeOrd({mode:a.mode,text:a.label},e,"textord"),x=Pt(x),x.italic=0,z=x.width,g&&(y+=x.depth)),w=b.makeSpan(["accent-body"],[x]);var T=a.label==="\\textcircled";T&&(w.classes.push("accent-full"),y=s.height);var C=h;T||(C-=z/2),w.style.left=A(C),a.label==="\\textcircled"&&(w.style.top=".2em"),w=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-y},{type:"elem",elem:w}]},e)}var N=b.makeSpan(["mord","accent"],[w],e);return n?(n.children[0]=N,n.height=Math.max(N.height,n.height),n.classes[0]="mord",n):N},qr=(r,e)=>{var t=r.isStretchy?q0.mathMLnode(r.label):new S.MathNode("mo",[v0(r.label,r.mode)]),a=new S.MathNode("mover",[X(r.base,e),t]);return a.setAttribute("accent","true"),a},A1=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(r=>"\\"+r).join("|"));B({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(r,e)=>{var t=Ne(e[0]),a=!A1.test(r.funcName),n=!a||r.funcName==="\\widehat"||r.funcName==="\\widetilde"||r.funcName==="\\widecheck";return{type:"accent",mode:r.parser.mode,label:r.funcName,isStretchy:a,isShifty:n,base:t}},htmlBuilder:wt,mathmlBuilder:qr});B({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(r,e)=>{var t=e[0],a=r.parser.mode;return a==="math"&&(r.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+r.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:r.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:wt,mathmlBuilder:qr});B({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"accentUnder",mode:t.mode,label:a,base:n}},htmlBuilder:(r,e)=>{var t=P(r.base,e),a=q0.svgSpan(r,e),n=r.label==="\\utilde"?.12:0,s=b.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:t}]},e);return b.makeSpan(["mord","accentunder"],[s],e)},mathmlBuilder:(r,e)=>{var t=q0.mathMLnode(r.label),a=new S.MathNode("munder",[X(r.base,e),t]);return a.setAttribute("accentunder","true"),a}});var ke=r=>{var e=new S.MathNode("mpadded",r?[r]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};B({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a,funcName:n}=r;return{type:"xArrow",mode:a.mode,label:n,body:e[0],below:t[0]}},htmlBuilder(r,e){var t=e.style,a=e.havingStyle(t.sup()),n=b.wrapFragment(P(r.body,a,e),e),s=r.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(s+"-arrow-pad");var o;r.below&&(a=e.havingStyle(t.sub()),o=b.wrapFragment(P(r.below,a,e),e),o.classes.push(s+"-arrow-pad"));var h=q0.svgSpan(r,e),c=-e.fontMetrics().axisHeight+.5*h.height,p=-e.fontMetrics().axisHeight-.5*h.height-.111;(n.depth>.25||r.label==="\\xleftequilibrium")&&(p-=n.depth);var g;if(o){var y=-e.fontMetrics().axisHeight+o.height+.5*h.height+.111;g=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p},{type:"elem",elem:h,shift:c},{type:"elem",elem:o,shift:y}]},e)}else g=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p},{type:"elem",elem:h,shift:c}]},e);return g.children[0].children[0].children[1].classes.push("svg-align"),b.makeSpan(["mrel","x-arrow"],[g],e)},mathmlBuilder(r,e){var t=q0.mathMLnode(r.label);t.setAttribute("minsize",r.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(r.body){var n=ke(X(r.body,e));if(r.below){var s=ke(X(r.below,e));a=new S.MathNode("munderover",[t,s,n])}else a=new S.MathNode("mover",[t,n])}else if(r.below){var o=ke(X(r.below,e));a=new S.MathNode("munder",[t,o])}else a=ke(),a=new S.MathNode("mover",[t,a]);return a}});var T1=b.makeSpan;function Er(r,e){var t=t0(r.body,e,!0);return T1([r.mclass],t,e)}function Rr(r,e){var t,a=o0(r.body,e);return r.mclass==="minner"?t=new S.MathNode("mpadded",a):r.mclass==="mord"?r.isCharacterBox?(t=a[0],t.type="mi"):t=new S.MathNode("mi",a):(r.isCharacterBox?(t=a[0],t.type="mo"):t=new S.MathNode("mo",a),r.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):r.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):r.mclass==="mopen"||r.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):r.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}B({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+a.slice(5),body:Q(n),isCharacterBox:q.isCharacterBox(n)}},htmlBuilder:Er,mathmlBuilder:Rr});var Ie=r=>{var e=r.type==="ordgroup"&&r.body.length?r.body[0]:r;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};B({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(r,e){var{parser:t}=r;return{type:"mclass",mode:t.mode,mclass:Ie(e[0]),body:Q(e[1]),isCharacterBox:q.isCharacterBox(e[1])}}});B({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(r,e){var{parser:t,funcName:a}=r,n=e[1],s=e[0],o;a!=="\\stackrel"?o=Ie(n):o="mrel";var h={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:Q(n)},c={type:"supsub",mode:s.mode,base:h,sup:a==="\\underset"?null:s,sub:a==="\\underset"?s:null};return{type:"mclass",mode:t.mode,mclass:o,body:[c],isCharacterBox:q.isCharacterBox(c)}},htmlBuilder:Er,mathmlBuilder:Rr});B({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"pmb",mode:t.mode,mclass:Ie(e[0]),body:Q(e[0])}},htmlBuilder(r,e){var t=t0(r.body,e,!0),a=b.makeSpan([r.mclass],t,e);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(r,e){var t=o0(r.body,e),a=new S.MathNode("mstyle",t);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var B1={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},jt=()=>({type:"styling",body:[],mode:"math",style:"display"}),Zt=r=>r.type==="textord"&&r.text==="@",D1=(r,e)=>(r.type==="mathord"||r.type==="atom")&&r.text===e;function C1(r,e,t){var a=B1[r];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(a,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var n=t.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:a,mode:"math",family:"rel"},o=t.callFunction("\\Big",[s],[]),h=t.callFunction("\\\\cdright",[e[1]],[]),c={type:"ordgroup",mode:"math",body:[n,o,h]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var p={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[p],[])}default:return{type:"textord",text:" ",mode:"math"}}}function N1(r){var e=[];for(r.gullet.beginGroup(),r.gullet.macros.set("\\cr","\\\\\\relax"),r.gullet.beginGroup();;){e.push(r.parseExpression(!1,"\\\\")),r.gullet.endGroup(),r.gullet.beginGroup();var t=r.fetch().text;if(t==="&"||t==="\\\\")r.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new M("Expected \\\\ or \\cr or \\end",r.nextToken)}for(var a=[],n=[a],s=0;s-1))if("<>AV".indexOf(p)>-1)for(var y=0;y<2;y++){for(var w=!0,x=c+1;xAV=|." after @',o[c]);var z=C1(p,g,r),T={type:"styling",body:[z],mode:"math",style:"display"};a.push(T),h=jt()}s%2===0?a.push(h):a.shift(),a=[],n.push(a)}r.gullet.endGroup(),r.gullet.endGroup();var C=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:C,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}B({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"cdlabel",mode:t.mode,side:a.slice(4),label:e[0]}},htmlBuilder(r,e){var t=e.havingStyle(e.style.sup()),a=b.wrapFragment(P(r.label,t,e),e);return a.classes.push("cd-label-"+r.side),a.style.bottom=A(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(r,e){var t=new S.MathNode("mrow",[X(r.label,e)]);return t=new S.MathNode("mpadded",[t]),t.setAttribute("width","0"),r.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new S.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});B({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(r,e){var{parser:t}=r;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(r,e){var t=b.wrapFragment(P(r.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(r,e){return new S.MathNode("mrow",[X(r.fragment,e)])}});B({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(r,e){for(var{parser:t}=r,a=H(e[0],"ordgroup"),n=a.body,s="",o=0;o=1114111)throw new M("\\@char with invalid code point "+s);return c<=65535?p=String.fromCharCode(c):(c-=65536,p=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:p}}});var Ir=(r,e)=>{var t=t0(r.body,e.withColor(r.color),!1);return b.makeFragment(t)},Fr=(r,e)=>{var t=o0(r.body,e.withColor(r.color)),a=new S.MathNode("mstyle",t);return a.setAttribute("mathcolor",r.color),a};B({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(r,e){var{parser:t}=r,a=H(e[0],"color-token").color,n=e[1];return{type:"color",mode:t.mode,color:a,body:Q(n)}},htmlBuilder:Ir,mathmlBuilder:Fr});B({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(r,e){var{parser:t,breakOnTokenText:a}=r,n=H(e[0],"color-token").color;t.gullet.macros.set("\\current@color",n);var s=t.parseExpression(!0,a);return{type:"color",mode:t.mode,color:n,body:s}},htmlBuilder:Ir,mathmlBuilder:Fr});B({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(r,e,t){var{parser:a}=r,n=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,s=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:s,size:n&&H(n,"size").value}},htmlBuilder(r,e){var t=b.makeSpan(["mspace"],[],e);return r.newLine&&(t.classes.push("newline"),r.size&&(t.style.marginTop=A(K(r.size,e)))),t},mathmlBuilder(r,e){var t=new S.MathNode("mspace");return r.newLine&&(t.setAttribute("linebreak","newline"),r.size&&t.setAttribute("height",A(K(r.size,e)))),t}});var ht={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Or=r=>{var e=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new M("Expected a control sequence",r);return e},q1=r=>{var e=r.gullet.popToken();return e.text==="="&&(e=r.gullet.popToken(),e.text===" "&&(e=r.gullet.popToken())),e},Hr=(r,e,t,a)=>{var n=r.gullet.macros.get(t.text);n==null&&(t.noexpand=!0,n={tokens:[t],numArgs:0,unexpandable:!r.gullet.isExpandable(t.text)}),r.gullet.macros.set(e,n,a)};B({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e,funcName:t}=r;e.consumeSpaces();var a=e.fetch();if(ht[a.text])return(t==="\\global"||t==="\\\\globallong")&&(a.text=ht[a.text]),H(e.parseFunction(),"internal");throw new M("Invalid token after macro prefix",a)}});B({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=e.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new M("Expected a control sequence",a);for(var s=0,o,h=[[]];e.gullet.future().text!=="{";)if(a=e.gullet.popToken(),a.text==="#"){if(e.gullet.future().text==="{"){o=e.gullet.future(),h[s].push("{");break}if(a=e.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new M('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new M('Argument number "'+a.text+'" out of order');s++,h.push([])}else{if(a.text==="EOF")throw new M("Expected a macro definition");h[s].push(a.text)}var{tokens:c}=e.gullet.consumeArg();return o&&c.unshift(o),(t==="\\edef"||t==="\\xdef")&&(c=e.gullet.expandTokens(c),c.reverse()),e.gullet.macros.set(n,{tokens:c,numArgs:s,delimiters:h},t===ht[t]),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Or(e.gullet.popToken());e.gullet.consumeSpaces();var n=q1(e);return Hr(e,a,n,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Or(e.gullet.popToken()),n=e.gullet.popToken(),s=e.gullet.popToken();return Hr(e,a,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}});var ie=function(e,t,a){var n=$.math[e]&&$.math[e].replace,s=pt(n||e,t,a);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},kt=function(e,t,a,n){var s=a.havingBaseStyle(t),o=b.makeSpan(n.concat(s.sizingClasses(a)),[e],a),h=s.sizeMultiplier/a.sizeMultiplier;return o.height*=h,o.depth*=h,o.maxFontSize=s.sizeMultiplier,o},Lr=function(e,t,a){var n=t.havingBaseStyle(a),s=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=A(s),e.height-=s,e.depth+=s},E1=function(e,t,a,n,s,o){var h=b.makeSymbol(e,"Main-Regular",s,n),c=kt(h,t,n,o);return a&&Lr(c,n,t),c},R1=function(e,t,a,n){return b.makeSymbol(e,"Size"+t+"-Regular",a,n)},Pr=function(e,t,a,n,s,o){var h=R1(e,t,s,n),c=kt(b.makeSpan(["delimsizing","size"+t],[h],n),R.TEXT,n,o);return a&&Lr(c,n,R.TEXT),c},Ze=function(e,t,a){var n;t==="Size1-Regular"?n="delim-size1":n="delim-size4";var s=b.makeSpan(["delimsizinginner",n],[b.makeSpan([],[b.makeSymbol(e,t,a)])]);return{type:"elem",elem:s}},Ke=function(e,t,a){var n=x0["Size4-Regular"][e.charCodeAt(0)]?x0["Size4-Regular"][e.charCodeAt(0)][4]:x0["Size1-Regular"][e.charCodeAt(0)][4],s=new G0("inner",Pa(e,Math.round(1e3*t))),o=new C0([s],{width:A(n),height:A(t),style:"width:"+A(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),h=b.makeSvgSpan([],[o],a);return h.height=t,h.style.height=A(t),h.style.width=A(n),{type:"elem",elem:h}},mt=.008,Se={type:"kern",size:-1*mt},I1=["|","\\lvert","\\rvert","\\vert"],F1=["\\|","\\lVert","\\rVert","\\Vert"],Gr=function(e,t,a,n,s,o){var h,c,p,g,y="",w=0;h=p=g=e,c=null;var x="Size1-Regular";e==="\\uparrow"?p=g="⏐":e==="\\Uparrow"?p=g="‖":e==="\\downarrow"?h=p="⏐":e==="\\Downarrow"?h=p="‖":e==="\\updownarrow"?(h="\\uparrow",p="⏐",g="\\downarrow"):e==="\\Updownarrow"?(h="\\Uparrow",p="‖",g="\\Downarrow"):q.contains(I1,e)?(p="∣",y="vert",w=333):q.contains(F1,e)?(p="∥",y="doublevert",w=556):e==="["||e==="\\lbrack"?(h="⎡",p="⎢",g="⎣",x="Size4-Regular",y="lbrack",w=667):e==="]"||e==="\\rbrack"?(h="⎤",p="⎥",g="⎦",x="Size4-Regular",y="rbrack",w=667):e==="\\lfloor"||e==="⌊"?(p=h="⎢",g="⎣",x="Size4-Regular",y="lfloor",w=667):e==="\\lceil"||e==="⌈"?(h="⎡",p=g="⎢",x="Size4-Regular",y="lceil",w=667):e==="\\rfloor"||e==="⌋"?(p=h="⎥",g="⎦",x="Size4-Regular",y="rfloor",w=667):e==="\\rceil"||e==="⌉"?(h="⎤",p=g="⎥",x="Size4-Regular",y="rceil",w=667):e==="("||e==="\\lparen"?(h="⎛",p="⎜",g="⎝",x="Size4-Regular",y="lparen",w=875):e===")"||e==="\\rparen"?(h="⎞",p="⎟",g="⎠",x="Size4-Regular",y="rparen",w=875):e==="\\{"||e==="\\lbrace"?(h="⎧",c="⎨",g="⎩",p="⎪",x="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(h="⎫",c="⎬",g="⎭",p="⎪",x="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(h="⎧",g="⎩",p="⎪",x="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(h="⎫",g="⎭",p="⎪",x="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(h="⎧",g="⎭",p="⎪",x="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(h="⎫",g="⎩",p="⎪",x="Size4-Regular");var z=ie(h,x,s),T=z.height+z.depth,C=ie(p,x,s),N=C.height+C.depth,F=ie(g,x,s),O=F.height+F.depth,V=0,L=1;if(c!==null){var U=ie(c,x,s);V=U.height+U.depth,L=2}var G=T+O+V,j=Math.max(0,Math.ceil((t-G)/(L*N))),Y=G+j*L*N,z0=n.fontMetrics().axisHeight;a&&(z0*=n.sizeMultiplier);var r0=Y/2-z0,e0=[];if(y.length>0){var Y0=Y-T-O,s0=Math.round(Y*1e3),g0=Ga(y,Math.round(Y0*1e3)),R0=new G0(y,g0),j0=(w/1e3).toFixed(3)+"em",Z0=(s0/1e3).toFixed(3)+"em",Le=new C0([R0],{width:j0,height:Z0,viewBox:"0 0 "+w+" "+s0}),I0=b.makeSvgSpan([],[Le],n);I0.height=s0/1e3,I0.style.width=j0,I0.style.height=Z0,e0.push({type:"elem",elem:I0})}else{if(e0.push(Ze(g,x,s)),e0.push(Se),c===null){var F0=Y-T-O+2*mt;e0.push(Ke(p,F0,n))}else{var c0=(Y-T-O-V)/2+2*mt;e0.push(Ke(p,c0,n)),e0.push(Se),e0.push(Ze(c,x,s)),e0.push(Se),e0.push(Ke(p,c0,n))}e0.push(Se),e0.push(Ze(h,x,s))}var ne=n.havingBaseStyle(R.TEXT),Pe=b.makeVList({positionType:"bottom",positionData:r0,children:e0},ne);return kt(b.makeSpan(["delimsizing","mult"],[Pe],ne),R.TEXT,n,o)},Je=80,Qe=.08,_e=function(e,t,a,n,s){var o=La(e,n,a),h=new G0(e,o),c=new C0([h],{width:"400em",height:A(t),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return b.makeSvgSpan(["hide-tail"],[c],s)},O1=function(e,t){var a=t.havingBaseSizing(),n=Xr("\\surd",e*a.sizeMultiplier,Yr,a),s=a.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),h,c=0,p=0,g=0,y;return n.type==="small"?(g=1e3+1e3*o+Je,e<1?s=1:e<1.4&&(s=.7),c=(1+o+Qe)/s,p=(1+o)/s,h=_e("sqrtMain",c,g,o,t),h.style.minWidth="0.853em",y=.833/s):n.type==="large"?(g=(1e3+Je)*se[n.size],p=(se[n.size]+o)/s,c=(se[n.size]+o+Qe)/s,h=_e("sqrtSize"+n.size,c,g,o,t),h.style.minWidth="1.02em",y=1/s):(c=e+o+Qe,p=e+o,g=Math.floor(1e3*e+o)+Je,h=_e("sqrtTall",c,g,o,t),h.style.minWidth="0.742em",y=1.056),h.height=p,h.style.height=A(c),{span:h,advanceWidth:y,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*s}},Vr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],H1=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Ur=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],se=[0,1.2,1.8,2.4,3],L1=function(e,t,a,n,s){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),q.contains(Vr,e)||q.contains(Ur,e))return Pr(e,t,!1,a,n,s);if(q.contains(H1,e))return Gr(e,se[t],!1,a,n,s);throw new M("Illegal delimiter: '"+e+"'")},P1=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],G1=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"stack"}],Yr=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],V1=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Xr=function(e,t,a,n){for(var s=Math.min(2,3-n.style.size),o=s;ot)return a[o]}return a[a.length-1]},$r=function(e,t,a,n,s,o){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var h;q.contains(Ur,e)?h=P1:q.contains(Vr,e)?h=Yr:h=G1;var c=Xr(e,t,h,n);return c.type==="small"?E1(e,c.style,a,n,s,o):c.type==="large"?Pr(e,c.size,a,n,s,o):Gr(e,t,a,n,s,o)},U1=function(e,t,a,n,s,o){var h=n.fontMetrics().axisHeight*n.sizeMultiplier,c=901,p=5/n.fontMetrics().ptPerEm,g=Math.max(t-h,a+h),y=Math.max(g/500*c,2*g-p);return $r(e,y,!0,n,s,o)},D0={sqrtImage:O1,sizedDelim:L1,sizeToMaxHeight:se,customSizedDelim:$r,leftRightDelim:U1},Kt={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Y1=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Fe(r,e){var t=Re(r);if(t&&q.contains(Y1,t.text))return t;throw t?new M("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",r):new M("Invalid delimiter type '"+r.type+"'",r)}B({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(r,e)=>{var t=Fe(e[0],r);return{type:"delimsizing",mode:r.parser.mode,size:Kt[r.funcName].size,mclass:Kt[r.funcName].mclass,delim:t.text}},htmlBuilder:(r,e)=>r.delim==="."?b.makeSpan([r.mclass]):D0.sizedDelim(r.delim,r.size,e,r.mode,[r.mclass]),mathmlBuilder:r=>{var e=[];r.delim!=="."&&e.push(v0(r.delim,r.mode));var t=new S.MathNode("mo",e);r.mclass==="mopen"||r.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var a=A(D0.sizeToMaxHeight[r.size]);return t.setAttribute("minsize",a),t.setAttribute("maxsize",a),t}});function Jt(r){if(!r.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}B({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=r.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new M("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:r.parser.mode,delim:Fe(e[0],r).text,color:t}}});B({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=Fe(e[0],r),a=r.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var s=H(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:t.text,right:s.delim,rightColor:s.color}},htmlBuilder:(r,e)=>{Jt(r);for(var t=t0(r.body,e,!0,["mopen","mclose"]),a=0,n=0,s=!1,o=0;o{Jt(r);var t=o0(r.body,e);if(r.left!=="."){var a=new S.MathNode("mo",[v0(r.left,r.mode)]);a.setAttribute("fence","true"),t.unshift(a)}if(r.right!=="."){var n=new S.MathNode("mo",[v0(r.right,r.mode)]);n.setAttribute("fence","true"),r.rightColor&&n.setAttribute("mathcolor",r.rightColor),t.push(n)}return bt(t)}});B({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=Fe(e[0],r);if(!r.parser.leftrightDepth)throw new M("\\middle without preceding \\left",t);return{type:"middle",mode:r.parser.mode,delim:t.text}},htmlBuilder:(r,e)=>{var t;if(r.delim===".")t=oe(e,[]);else{t=D0.sizedDelim(r.delim,1,e,r.mode,[]);var a={delim:r.delim,options:e};t.isMiddle=a}return t},mathmlBuilder:(r,e)=>{var t=r.delim==="\\vert"||r.delim==="|"?v0("|","text"):v0(r.delim,r.mode),a=new S.MathNode("mo",[t]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var St=(r,e)=>{var t=b.wrapFragment(P(r.body,e),e),a=r.label.slice(1),n=e.sizeMultiplier,s,o=0,h=q.isCharacterBox(r.body);if(a==="sout")s=b.makeSpan(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/n,o=-.5*e.fontMetrics().xHeight;else if(a==="phase"){var c=K({number:.6,unit:"pt"},e),p=K({number:.35,unit:"ex"},e),g=e.havingBaseSizing();n=n/g.sizeMultiplier;var y=t.height+t.depth+c+p;t.style.paddingLeft=A(y/2+c);var w=Math.floor(1e3*y*n),x=Oa(w),z=new C0([new G0("phase",x)],{width:"400em",height:A(w/1e3),viewBox:"0 0 400000 "+w,preserveAspectRatio:"xMinYMin slice"});s=b.makeSvgSpan(["hide-tail"],[z],e),s.style.height=A(y),o=t.depth+c+p}else{/cancel/.test(a)?h||t.classes.push("cancel-pad"):a==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var T=0,C=0,N=0;/box/.test(a)?(N=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),T=e.fontMetrics().fboxsep+(a==="colorbox"?0:N),C=T):a==="angl"?(N=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),T=4*N,C=Math.max(0,.25-t.depth)):(T=h?.2:0,C=T),s=q0.encloseSpan(t,a,T,C,e),/fbox|boxed|fcolorbox/.test(a)?(s.style.borderStyle="solid",s.style.borderWidth=A(N)):a==="angl"&&N!==.049&&(s.style.borderTopWidth=A(N),s.style.borderRightWidth=A(N)),o=t.depth+C,r.backgroundColor&&(s.style.backgroundColor=r.backgroundColor,r.borderColor&&(s.style.borderColor=r.borderColor))}var F;if(r.backgroundColor)F=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:o},{type:"elem",elem:t,shift:0}]},e);else{var O=/cancel|phase/.test(a)?["svg-align"]:[];F=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:s,shift:o,wrapperClasses:O}]},e)}return/cancel/.test(a)&&(F.height=t.height,F.depth=t.depth),/cancel/.test(a)&&!h?b.makeSpan(["mord","cancel-lap"],[F],e):b.makeSpan(["mord"],[F],e)},Mt=(r,e)=>{var t=0,a=new S.MathNode(r.label.indexOf("colorbox")>-1?"mpadded":"menclose",[X(r.body,e)]);switch(r.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*t+"pt"),a.setAttribute("height","+"+2*t+"pt"),a.setAttribute("lspace",t+"pt"),a.setAttribute("voffset",t+"pt"),r.label==="\\fcolorbox"){var n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(r.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return r.backgroundColor&&a.setAttribute("mathbackground",r.backgroundColor),a};B({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=H(e[0],"color-token").color,o=e[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:s,body:o}},htmlBuilder:St,mathmlBuilder:Mt});B({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=H(e[0],"color-token").color,o=H(e[1],"color-token").color,h=e[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:s,body:h}},htmlBuilder:St,mathmlBuilder:Mt});B({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});B({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"enclose",mode:t.mode,label:a,body:n}},htmlBuilder:St,mathmlBuilder:Mt});B({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var Wr={};function k0(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:o}=r,h={type:e,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},c=0;c{var e=r.parser.settings;if(!e.displayMode)throw new M("{"+r.envName+"} can be used only in display mode.")};function zt(r){if(r.indexOf("ed")===-1)return r.indexOf("*")===-1}function U0(r,e,t){var{hskipBeforeAndAfter:a,addJot:n,cols:s,arraystretch:o,colSeparationType:h,autoTag:c,singleRow:p,emptySingleRow:g,maxNumCols:y,leqno:w}=e;if(r.gullet.beginGroup(),p||r.gullet.macros.set("\\cr","\\\\\\relax"),!o){var x=r.gullet.expandMacroAsText("\\arraystretch");if(x==null)o=1;else if(o=parseFloat(x),!o||o<0)throw new M("Invalid \\arraystretch: "+x)}r.gullet.beginGroup();var z=[],T=[z],C=[],N=[],F=c!=null?[]:void 0;function O(){c&&r.gullet.macros.set("\\@eqnsw","1",!0)}function V(){F&&(r.gullet.macros.get("\\df@tag")?(F.push(r.subparse([new f0("\\df@tag")])),r.gullet.macros.set("\\df@tag",void 0,!0)):F.push(!!c&&r.gullet.macros.get("\\@eqnsw")==="1"))}for(O(),N.push(Qt(r));;){var L=r.parseExpression(!1,p?"\\end":"\\\\");r.gullet.endGroup(),r.gullet.beginGroup(),L={type:"ordgroup",mode:r.mode,body:L},t&&(L={type:"styling",mode:r.mode,style:t,body:[L]}),z.push(L);var U=r.fetch().text;if(U==="&"){if(y&&z.length===y){if(p||h)throw new M("Too many tab characters: &",r.nextToken);r.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}r.consume()}else if(U==="\\end"){V(),z.length===1&&L.type==="styling"&&L.body[0].body.length===0&&(T.length>1||!g)&&T.pop(),N.length0&&(O+=.25),p.push({pos:O,isDashed:fe[pe]})}for(V(o[0]),a=0;a0&&(r0+=F,Gfe))for(a=0;a=h)){var J0=void 0;(n>0||e.hskipBeforeAndAfter)&&(J0=q.deflt(c0.pregap,w),J0!==0&&(g0=b.makeSpan(["arraycolsep"],[]),g0.style.width=A(J0),s0.push(g0)));var Q0=[];for(a=0;a0){for(var ca=b.makeLineSpan("hline",t,g),da=b.makeLineSpan("hdashline",t,g),Ge=[{type:"elem",elem:c,shift:0}];p.length>0;){var Rt=p.pop(),It=Rt.pos-e0;Rt.isDashed?Ge.push({type:"elem",elem:da,shift:It}):Ge.push({type:"elem",elem:ca,shift:It})}c=b.makeVList({positionType:"individualShift",children:Ge},t)}if(j0.length===0)return b.makeSpan(["mord"],[c],t);var Ve=b.makeVList({positionType:"individualShift",children:j0},t);return Ve=b.makeSpan(["tag"],[Ve],t),b.makeFragment([c,Ve])},X1={c:"center ",l:"left ",r:"right "},M0=function(e,t){for(var a=[],n=new S.MathNode("mtd",[],["mtr-glue"]),s=new S.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var z=e.cols,T="",C=!1,N=0,F=z.length;z[0].type==="separator"&&(w+="top ",N=1),z[z.length-1].type==="separator"&&(w+="bottom ",F-=1);for(var O=N;O0?"left ":"",w+=j[j.length-1].length>0?"right ":"";for(var Y=1;Y-1?"alignat":"align",s=e.envName==="split",o=U0(e.parser,{cols:a,addJot:!0,autoTag:s?void 0:zt(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),h,c=0,p={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var g="",y=0;y0&&x&&(C=1),a[z]={type:"align",align:T,pregap:C,postgap:0}}return o.colSeparationType=x?"align":"alignat",o};k0({type:"array",names:["array","darray"],props:{numArgs:1},handler(r,e){var t=Re(e[0]),a=t?[e[0]]:H(e[0],"ordgroup").body,n=a.map(function(o){var h=xt(o),c=h.text;if("lcr".indexOf(c)!==-1)return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new M("Unknown column alignment: "+c,o)}),s={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return U0(r.parser,s,At(r.envName))},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(r){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[r.envName.replace("*","")],t="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(r.envName.charAt(r.envName.length-1)==="*"){var n=r.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),t=n.fetch().text,"lcr".indexOf(t)===-1)throw new M("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:t}]}}var s=U0(r.parser,a,At(r.envName)),o=Math.max(0,...s.body.map(h=>h.length));return s.cols=new Array(o).fill({type:"align",align:t}),e?{type:"leftright",mode:r.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(r){var e={arraystretch:.5},t=U0(r.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["subarray"],props:{numArgs:1},handler(r,e){var t=Re(e[0]),a=t?[e[0]]:H(e[0],"ordgroup").body,n=a.map(function(o){var h=xt(o),c=h.text;if("lc".indexOf(c)!==-1)return{type:"align",align:c};throw new M("Unknown column alignment: "+c,o)});if(n.length>1)throw new M("{subarray} can contain only one column");var s={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=U0(r.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new M("{subarray} can contain only one column");return s},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(r){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=U0(r.parser,e,At(r.envName));return{type:"leftright",mode:r.mode,body:[t],left:r.envName.indexOf("r")>-1?".":"\\{",right:r.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Zr,htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(r){q.contains(["gather","gather*"],r.envName)&&Oe(r);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:zt(r.envName),emptySingleRow:!0,leqno:r.parser.settings.leqno};return U0(r.parser,e,"display")},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Zr,htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(r){Oe(r);var e={autoTag:zt(r.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:r.parser.settings.leqno};return U0(r.parser,e,"display")},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["CD"],props:{numArgs:0},handler(r){return Oe(r),N1(r.parser)},htmlBuilder:S0,mathmlBuilder:M0});m("\\nonumber","\\gdef\\@eqnsw{0}");m("\\notag","\\nonumber");B({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(r,e){throw new M(r.funcName+" valid only within array environment")}});var _t=Wr;B({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];if(n.type!=="ordgroup")throw new M("Invalid environment name",n);for(var s="",o=0;o{var t=r.font,a=e.withFont(t);return P(r.body,a)},Jr=(r,e)=>{var t=r.font,a=e.withFont(t);return X(r.body,a)},er={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};B({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=Ne(e[0]),s=a;return s in er&&(s=er[s]),{type:"font",mode:t.mode,font:s.slice(1),body:n}},htmlBuilder:Kr,mathmlBuilder:Jr});B({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(r,e)=>{var{parser:t}=r,a=e[0],n=q.isCharacterBox(a);return{type:"mclass",mode:t.mode,mclass:Ie(a),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}});B({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a,breakOnTokenText:n}=r,{mode:s}=t,o=t.parseExpression(!0,n),h="math"+a.slice(1);return{type:"font",mode:s,font:h,body:{type:"ordgroup",mode:t.mode,body:o}}},htmlBuilder:Kr,mathmlBuilder:Jr});var Qr=(r,e)=>{var t=e;return r==="display"?t=t.id>=R.SCRIPT.id?t.text():R.DISPLAY:r==="text"&&t.size===R.DISPLAY.size?t=R.TEXT:r==="script"?t=R.SCRIPT:r==="scriptscript"&&(t=R.SCRIPTSCRIPT),t},Tt=(r,e)=>{var t=Qr(r.size,e.style),a=t.fracNum(),n=t.fracDen(),s;s=e.havingStyle(a);var o=P(r.numer,s,e);if(r.continued){var h=8.5/e.fontMetrics().ptPerEm,c=3.5/e.fontMetrics().ptPerEm;o.height=o.height0?z=3*w:z=7*w,T=e.fontMetrics().denom1):(y>0?(x=e.fontMetrics().num2,z=w):(x=e.fontMetrics().num3,z=3*w),T=e.fontMetrics().denom2);var C;if(g){var F=e.fontMetrics().axisHeight;x-o.depth-(F+.5*y){var t=new S.MathNode("mfrac",[X(r.numer,e),X(r.denom,e)]);if(!r.hasBarLine)t.setAttribute("linethickness","0px");else if(r.barSize){var a=K(r.barSize,e);t.setAttribute("linethickness",A(a))}var n=Qr(r.size,e.style);if(n.size!==e.style.size){t=new S.MathNode("mstyle",[t]);var s=n.size===R.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",s),t.setAttribute("scriptlevel","0")}if(r.leftDelim!=null||r.rightDelim!=null){var o=[];if(r.leftDelim!=null){var h=new S.MathNode("mo",[new S.TextNode(r.leftDelim.replace("\\",""))]);h.setAttribute("fence","true"),o.push(h)}if(o.push(t),r.rightDelim!=null){var c=new S.MathNode("mo",[new S.TextNode(r.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),o.push(c)}return bt(o)}return t};B({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1],o,h=null,c=null,p="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,h="(",c=")";break;case"\\\\bracefrac":o=!1,h="\\{",c="\\}";break;case"\\\\brackfrac":o=!1,h="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":p="display";break;case"\\tfrac":case"\\tbinom":p="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:n,denom:s,hasBarLine:o,leftDelim:h,rightDelim:c,size:p,barSize:null}},htmlBuilder:Tt,mathmlBuilder:Bt});B({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:n,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});B({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(r){var{parser:e,funcName:t,token:a}=r,n;switch(t){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:n,token:a}}});var tr=["display","text","script","scriptscript"],rr=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};B({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(r,e){var{parser:t}=r,a=e[4],n=e[5],s=Ne(e[0]),o=s.type==="atom"&&s.family==="open"?rr(s.text):null,h=Ne(e[1]),c=h.type==="atom"&&h.family==="close"?rr(h.text):null,p=H(e[2],"size"),g,y=null;p.isBlank?g=!0:(y=p.value,g=y.number>0);var w="auto",x=e[3];if(x.type==="ordgroup"){if(x.body.length>0){var z=H(x.body[0],"textord");w=tr[Number(z.text)]}}else x=H(x,"textord"),w=tr[Number(x.text)];return{type:"genfrac",mode:t.mode,numer:a,denom:n,continued:!1,hasBarLine:g,barSize:y,leftDelim:o,rightDelim:c,size:w}},htmlBuilder:Tt,mathmlBuilder:Bt});B({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(r,e){var{parser:t,funcName:a,token:n}=r;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:H(e[0],"size").value,token:n}}});B({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=ka(H(e[1],"infix").size),o=e[2],h=s.number>0;return{type:"genfrac",mode:t.mode,numer:n,denom:o,continued:!1,hasBarLine:h,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Tt,mathmlBuilder:Bt});var _r=(r,e)=>{var t=e.style,a,n;r.type==="supsub"?(a=r.sup?P(r.sup,e.havingStyle(t.sup()),e):P(r.sub,e.havingStyle(t.sub()),e),n=H(r.base,"horizBrace")):n=H(r,"horizBrace");var s=P(n.base,e.havingBaseStyle(R.DISPLAY)),o=q0.svgSpan(n,e),h;if(n.isOver?(h=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},e),h.children[0].children[0].children[1].classes.push("svg-align")):(h=b.makeVList({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},e),h.children[0].children[0].children[0].classes.push("svg-align")),a){var c=b.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e);n.isOver?h=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:a}]},e):h=b.makeVList({positionType:"bottom",positionData:c.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:c}]},e)}return b.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e)},$1=(r,e)=>{var t=q0.mathMLnode(r.label);return new S.MathNode(r.isOver?"mover":"munder",[X(r.base,e),t])};B({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"horizBrace",mode:t.mode,label:a,isOver:/^\\over/.test(a),base:e[0]}},htmlBuilder:_r,mathmlBuilder:$1});B({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[1],n=H(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:t.mode,href:n,body:Q(a)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(r,e)=>{var t=t0(r.body,e,!1);return b.makeAnchor(r.href,[],t,e)},mathmlBuilder:(r,e)=>{var t=V0(r.body,e);return t instanceof h0||(t=new h0("mrow",[t])),t.setAttribute("href",r.href),t}});B({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=H(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:a}))return t.formatUnsupportedCmd("\\url");for(var n=[],s=0;s{var{parser:t,funcName:a,token:n}=r,s=H(e[0],"raw").string,o=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h,c={};switch(a){case"\\htmlClass":c.class=s,h={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,h={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,h={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var p=s.split(","),g=0;g{var t=t0(r.body,e,!1),a=["enclosing"];r.attributes.class&&a.push(...r.attributes.class.trim().split(/\s+/));var n=b.makeSpan(a,t,e);for(var s in r.attributes)s!=="class"&&r.attributes.hasOwnProperty(s)&&n.setAttribute(s,r.attributes[s]);return n},mathmlBuilder:(r,e)=>V0(r.body,e)});B({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"htmlmathml",mode:t.mode,html:Q(e[0]),mathml:Q(e[1])}},htmlBuilder:(r,e)=>{var t=t0(r.html,e,!1);return b.makeFragment(t)},mathmlBuilder:(r,e)=>V0(r.mathml,e)});var et=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new M("Invalid size: '"+e+"' in \\includegraphics");var a={number:+(t[1]+t[2]),unit:t[3]};if(!br(a))throw new M("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};B({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(r,e,t)=>{var{parser:a}=r,n={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},h="";if(t[0])for(var c=H(t[0],"raw").string,p=c.split(","),g=0;g{var t=K(r.height,e),a=0;r.totalheight.number>0&&(a=K(r.totalheight,e)-t);var n=0;r.width.number>0&&(n=K(r.width,e));var s={height:A(t+a)};n>0&&(s.width=A(n)),a>0&&(s.verticalAlign=A(-a));var o=new $a(r.src,r.alt,s);return o.height=t,o.depth=a,o},mathmlBuilder:(r,e)=>{var t=new S.MathNode("mglyph",[]);t.setAttribute("alt",r.alt);var a=K(r.height,e),n=0;if(r.totalheight.number>0&&(n=K(r.totalheight,e)-a,t.setAttribute("valign",A(-n))),t.setAttribute("height",A(a+n)),r.width.number>0){var s=K(r.width,e);t.setAttribute("width",A(s))}return t.setAttribute("src",r.src),t}});B({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=H(e[0],"size");if(t.settings.strict){var s=a[1]==="m",o=n.value.unit==="mu";s?(o||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+n.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:n.value}},htmlBuilder(r,e){return b.makeGlue(r.dimension,e)},mathmlBuilder(r,e){var t=K(r.dimension,e);return new S.SpaceNode(t)}});B({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"lap",mode:t.mode,alignment:a.slice(5),body:n}},htmlBuilder:(r,e)=>{var t;r.alignment==="clap"?(t=b.makeSpan([],[P(r.body,e)]),t=b.makeSpan(["inner"],[t],e)):t=b.makeSpan(["inner"],[P(r.body,e)]);var a=b.makeSpan(["fix"],[]),n=b.makeSpan([r.alignment],[t,a],e),s=b.makeSpan(["strut"]);return s.style.height=A(n.height+n.depth),n.depth&&(s.style.verticalAlign=A(-n.depth)),n.children.unshift(s),n=b.makeSpan(["thinbox"],[n],e),b.makeSpan(["mord","vbox"],[n],e)},mathmlBuilder:(r,e)=>{var t=new S.MathNode("mpadded",[X(r.body,e)]);if(r.alignment!=="rlap"){var a=r.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",a+"width")}return t.setAttribute("width","0px"),t}});B({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){var{funcName:t,parser:a}=r,n=a.mode;a.switchMode("math");var s=t==="\\("?"\\)":"$",o=a.parseExpression(!1,s);return a.expect(s),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}});B({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){throw new M("Mismatched "+r.funcName)}});var ar=(r,e)=>{switch(e.style.size){case R.DISPLAY.size:return r.display;case R.TEXT.size:return r.text;case R.SCRIPT.size:return r.script;case R.SCRIPTSCRIPT.size:return r.scriptscript;default:return r.text}};B({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"mathchoice",mode:t.mode,display:Q(e[0]),text:Q(e[1]),script:Q(e[2]),scriptscript:Q(e[3])}},htmlBuilder:(r,e)=>{var t=ar(r,e),a=t0(t,e,!1);return b.makeFragment(a)},mathmlBuilder:(r,e)=>{var t=ar(r,e);return V0(t,e)}});var ea=(r,e,t,a,n,s,o)=>{r=b.makeSpan([],[r]);var h=t&&q.isCharacterBox(t),c,p;if(e){var g=P(e,a.havingStyle(n.sup()),a);p={elem:g,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-g.depth)}}if(t){var y=P(t,a.havingStyle(n.sub()),a);c={elem:y,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-y.height)}}var w;if(p&&c){var x=a.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+r.depth+o;w=b.makeVList({positionType:"bottom",positionData:x,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:A(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:A(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(c){var z=r.height-o;w=b.makeVList({positionType:"top",positionData:z,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:A(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r}]},a)}else if(p){var T=r.depth+o;w=b.makeVList({positionType:"bottom",positionData:T,children:[{type:"elem",elem:r},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:A(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else return r;var C=[w];if(c&&s!==0&&!h){var N=b.makeSpan(["mspace"],[],a);N.style.marginRight=A(s),C.unshift(N)}return b.makeSpan(["mop","op-limits"],C,a)},ta=["\\smallint"],ae=(r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=H(r.base,"op"),n=!0):s=H(r,"op");var o=e.style,h=!1;o.size===R.DISPLAY.size&&s.symbol&&!q.contains(ta,s.name)&&(h=!0);var c;if(s.symbol){var p=h?"Size2-Regular":"Size1-Regular",g="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(g=s.name.slice(1),s.name=g==="oiint"?"\\iint":"\\iiint"),c=b.makeSymbol(s.name,p,"math",e,["mop","op-symbol",h?"large-op":"small-op"]),g.length>0){var y=c.italic,w=b.staticSvg(g+"Size"+(h?"2":"1"),e);c=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:w,shift:h?.08:0}]},e),s.name="\\"+g,c.classes.unshift("mop"),c.italic=y}}else if(s.body){var x=t0(s.body,e,!0);x.length===1&&x[0]instanceof p0?(c=x[0],c.classes[0]="mop"):c=b.makeSpan(["mop"],x,e)}else{for(var z=[],T=1;T{var t;if(r.symbol)t=new h0("mo",[v0(r.name,r.mode)]),q.contains(ta,r.name)&&t.setAttribute("largeop","false");else if(r.body)t=new h0("mo",o0(r.body,e));else{t=new h0("mi",[new w0(r.name.slice(1))]);var a=new h0("mo",[v0("⁡","text")]);r.parentIsSupSub?t=new h0("mrow",[t,a]):t=Dr([t,a])}return t},W1={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};B({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=a;return n.length===1&&(n=W1[n]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:ae,mathmlBuilder:me});B({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Q(a)}},htmlBuilder:ae,mathmlBuilder:me});var j1={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};B({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:ae,mathmlBuilder:me});B({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:ae,mathmlBuilder:me});B({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r,a=t;return a.length===1&&(a=j1[a]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:ae,mathmlBuilder:me});var ra=(r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=H(r.base,"operatorname"),n=!0):s=H(r,"operatorname");var o;if(s.body.length>0){for(var h=s.body.map(y=>{var w=y.text;return typeof w=="string"?{type:"textord",mode:y.mode,text:w}:y}),c=t0(h,e.withFont("mathrm"),!0),p=0;p{for(var t=o0(r.body,e.withFont("mathrm")),a=!0,n=0;ng.toText()).join("");t=[new S.TextNode(h)]}var c=new S.MathNode("mi",t);c.setAttribute("mathvariant","normal");var p=new S.MathNode("mo",[v0("⁡","text")]);return r.parentIsSupSub?new S.MathNode("mrow",[c,p]):S.newDocumentFragment([c,p])};B({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"operatorname",mode:t.mode,body:Q(n),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:ra,mathmlBuilder:Z1});m("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");W0({type:"ordgroup",htmlBuilder(r,e){return r.semisimple?b.makeFragment(t0(r.body,e,!1)):b.makeSpan(["mord"],t0(r.body,e,!0),e)},mathmlBuilder(r,e){return V0(r.body,e,!0)}});B({type:"overline",names:["\\overline"],props:{numArgs:1},handler(r,e){var{parser:t}=r,a=e[0];return{type:"overline",mode:t.mode,body:a}},htmlBuilder(r,e){var t=P(r.body,e.havingCrampedStyle()),a=b.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,s=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},e);return b.makeSpan(["mord","overline"],[s],e)},mathmlBuilder(r,e){var t=new S.MathNode("mo",[new S.TextNode("‾")]);t.setAttribute("stretchy","true");var a=new S.MathNode("mover",[X(r.body,e),t]);return a.setAttribute("accent","true"),a}});B({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"phantom",mode:t.mode,body:Q(a)}},htmlBuilder:(r,e)=>{var t=t0(r.body,e.withPhantom(),!1);return b.makeFragment(t)},mathmlBuilder:(r,e)=>{var t=o0(r.body,e);return new S.MathNode("mphantom",t)}});B({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"hphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=b.makeSpan([],[P(r.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var a=0;a{var t=o0(Q(r.body),e),a=new S.MathNode("mphantom",t),n=new S.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}});B({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"vphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=b.makeSpan(["inner"],[P(r.body,e.withPhantom())]),a=b.makeSpan(["fix"],[]);return b.makeSpan(["mord","rlap"],[t,a],e)},mathmlBuilder:(r,e)=>{var t=o0(Q(r.body),e),a=new S.MathNode("mphantom",t),n=new S.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}});B({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r,a=H(e[0],"size").value,n=e[1];return{type:"raisebox",mode:t.mode,dy:a,body:n}},htmlBuilder(r,e){var t=P(r.body,e),a=K(r.dy,e);return b.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){var t=new S.MathNode("mpadded",[X(r.body,e)]),a=r.dy.number+r.dy.unit;return t.setAttribute("voffset",a),t}});B({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e}=r;return{type:"internal",mode:e.mode}}});B({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(r,e,t){var{parser:a}=r,n=t[0],s=H(e[0],"size"),o=H(e[1],"size");return{type:"rule",mode:a.mode,shift:n&&H(n,"size").value,width:s.value,height:o.value}},htmlBuilder(r,e){var t=b.makeSpan(["mord","rule"],[],e),a=K(r.width,e),n=K(r.height,e),s=r.shift?K(r.shift,e):0;return t.style.borderRightWidth=A(a),t.style.borderTopWidth=A(n),t.style.bottom=A(s),t.width=a,t.height=n+s,t.depth=-s,t.maxFontSize=n*1.125*e.sizeMultiplier,t},mathmlBuilder(r,e){var t=K(r.width,e),a=K(r.height,e),n=r.shift?K(r.shift,e):0,s=e.color&&e.getColor()||"black",o=new S.MathNode("mspace");o.setAttribute("mathbackground",s),o.setAttribute("width",A(t)),o.setAttribute("height",A(a));var h=new S.MathNode("mpadded",[o]);return n>=0?h.setAttribute("height",A(n)):(h.setAttribute("height",A(n)),h.setAttribute("depth",A(-n))),h.setAttribute("voffset",A(n)),h}});function aa(r,e,t){for(var a=t0(r,e,!1),n=e.sizeMultiplier/t.sizeMultiplier,s=0;s{var t=e.havingSize(r.size);return aa(r.body,t,e)};B({type:"sizing",names:nr,props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:nr.indexOf(a)+1,body:s}},htmlBuilder:K1,mathmlBuilder:(r,e)=>{var t=e.havingSize(r.size),a=o0(r.body,t),n=new S.MathNode("mstyle",a);return n.setAttribute("mathsize",A(t.sizeMultiplier)),n}});B({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(r,e,t)=>{var{parser:a}=r,n=!1,s=!1,o=t[0]&&H(t[0],"ordgroup");if(o)for(var h="",c=0;c{var t=b.makeSpan([],[P(r.body,e)]);if(!r.smashHeight&&!r.smashDepth)return t;if(r.smashHeight&&(t.height=0,t.children))for(var a=0;a{var t=new S.MathNode("mpadded",[X(r.body,e)]);return r.smashHeight&&t.setAttribute("height","0px"),r.smashDepth&&t.setAttribute("depth","0px"),t}});B({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a}=r,n=t[0],s=e[0];return{type:"sqrt",mode:a.mode,body:s,index:n}},htmlBuilder(r,e){var t=P(r.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=b.wrapFragment(t,e);var a=e.fontMetrics(),n=a.defaultRuleThickness,s=n;e.style.idt.height+t.depth+o&&(o=(o+y-t.height-t.depth)/2);var w=c.height-t.height-o-p;t.style.paddingLeft=A(g);var x=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+w)},{type:"elem",elem:c},{type:"kern",size:p}]},e);if(r.index){var z=e.havingStyle(R.SCRIPTSCRIPT),T=P(r.index,z,e),C=.6*(x.height-x.depth),N=b.makeVList({positionType:"shift",positionData:-C,children:[{type:"elem",elem:T}]},e),F=b.makeSpan(["root"],[N]);return b.makeSpan(["mord","sqrt"],[F,x],e)}else return b.makeSpan(["mord","sqrt"],[x],e)},mathmlBuilder(r,e){var{body:t,index:a}=r;return a?new S.MathNode("mroot",[X(t,e),X(a,e)]):new S.MathNode("msqrt",[X(t,e)])}});var ir={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT};B({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r,e){var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!0,t),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:s}},htmlBuilder(r,e){var t=ir[r.style],a=e.havingStyle(t).withFont("");return aa(r.body,a,e)},mathmlBuilder(r,e){var t=ir[r.style],a=e.havingStyle(t),n=o0(r.body,a),s=new S.MathNode("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},h=o[r.style];return s.setAttribute("scriptlevel",h[0]),s.setAttribute("displaystyle",h[1]),s}});var J1=function(e,t){var a=e.base;if(a)if(a.type==="op"){var n=a.limits&&(t.style.size===R.DISPLAY.size||a.alwaysHandleSupSub);return n?ae:null}else if(a.type==="operatorname"){var s=a.alwaysHandleSupSub&&(t.style.size===R.DISPLAY.size||a.limits);return s?ra:null}else{if(a.type==="accent")return q.isCharacterBox(a.base)?wt:null;if(a.type==="horizBrace"){var o=!e.sub;return o===a.isOver?_r:null}else return null}else return null};W0({type:"supsub",htmlBuilder(r,e){var t=J1(r,e);if(t)return t(r,e);var{base:a,sup:n,sub:s}=r,o=P(a,e),h,c,p=e.fontMetrics(),g=0,y=0,w=a&&q.isCharacterBox(a);if(n){var x=e.havingStyle(e.style.sup());h=P(n,x,e),w||(g=o.height-x.fontMetrics().supDrop*x.sizeMultiplier/e.sizeMultiplier)}if(s){var z=e.havingStyle(e.style.sub());c=P(s,z,e),w||(y=o.depth+z.fontMetrics().subDrop*z.sizeMultiplier/e.sizeMultiplier)}var T;e.style===R.DISPLAY?T=p.sup1:e.style.cramped?T=p.sup3:T=p.sup2;var C=e.sizeMultiplier,N=A(.5/p.ptPerEm/C),F=null;if(c){var O=r.base&&r.base.type==="op"&&r.base.name&&(r.base.name==="\\oiint"||r.base.name==="\\oiiint");(o instanceof p0||O)&&(F=A(-o.italic))}var V;if(h&&c){g=Math.max(g,T,h.depth+.25*p.xHeight),y=Math.max(y,p.sub2);var L=p.defaultRuleThickness,U=4*L;if(g-h.depth-(c.height-y)0&&(g+=G,y-=G)}var j=[{type:"elem",elem:c,shift:y,marginRight:N,marginLeft:F},{type:"elem",elem:h,shift:-g,marginRight:N}];V=b.makeVList({positionType:"individualShift",children:j},e)}else if(c){y=Math.max(y,p.sub1,c.height-.8*p.xHeight);var Y=[{type:"elem",elem:c,marginLeft:F,marginRight:N}];V=b.makeVList({positionType:"shift",positionData:y,children:Y},e)}else if(h)g=Math.max(g,T,h.depth+.25*p.xHeight),V=b.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:h,marginRight:N}]},e);else throw new Error("supsub must have either sup or sub.");var z0=ot(o,"right")||"mord";return b.makeSpan([z0],[o,b.makeSpan(["msupsub"],[V])],e)},mathmlBuilder(r,e){var t=!1,a,n;r.base&&r.base.type==="horizBrace"&&(n=!!r.sup,n===r.base.isOver&&(t=!0,a=r.base.isOver)),r.base&&(r.base.type==="op"||r.base.type==="operatorname")&&(r.base.parentIsSupSub=!0);var s=[X(r.base,e)];r.sub&&s.push(X(r.sub,e)),r.sup&&s.push(X(r.sup,e));var o;if(t)o=a?"mover":"munder";else if(r.sub)if(r.sup){var p=r.base;p&&p.type==="op"&&p.limits&&e.style===R.DISPLAY||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(e.style===R.DISPLAY||p.limits)?o="munderover":o="msubsup"}else{var c=r.base;c&&c.type==="op"&&c.limits&&(e.style===R.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||e.style===R.DISPLAY)?o="munder":o="msub"}else{var h=r.base;h&&h.type==="op"&&h.limits&&(e.style===R.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||e.style===R.DISPLAY)?o="mover":o="msup"}return new S.MathNode(o,s)}});W0({type:"atom",htmlBuilder(r,e){return b.mathsym(r.text,r.mode,e,["m"+r.family])},mathmlBuilder(r,e){var t=new S.MathNode("mo",[v0(r.text,r.mode)]);if(r.family==="bin"){var a=yt(r,e);a==="bold-italic"&&t.setAttribute("mathvariant",a)}else r.family==="punct"?t.setAttribute("separator","true"):(r.family==="open"||r.family==="close")&&t.setAttribute("stretchy","false");return t}});var na={mi:"italic",mn:"normal",mtext:"normal"};W0({type:"mathord",htmlBuilder(r,e){return b.makeOrd(r,e,"mathord")},mathmlBuilder(r,e){var t=new S.MathNode("mi",[v0(r.text,r.mode,e)]),a=yt(r,e)||"italic";return a!==na[t.type]&&t.setAttribute("mathvariant",a),t}});W0({type:"textord",htmlBuilder(r,e){return b.makeOrd(r,e,"textord")},mathmlBuilder(r,e){var t=v0(r.text,r.mode,e),a=yt(r,e)||"normal",n;return r.mode==="text"?n=new S.MathNode("mtext",[t]):/[0-9]/.test(r.text)?n=new S.MathNode("mn",[t]):r.text==="\\prime"?n=new S.MathNode("mo",[t]):n=new S.MathNode("mi",[t]),a!==na[n.type]&&n.setAttribute("mathvariant",a),n}});var tt={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},rt={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};W0({type:"spacing",htmlBuilder(r,e){if(rt.hasOwnProperty(r.text)){var t=rt[r.text].className||"";if(r.mode==="text"){var a=b.makeOrd(r,e,"textord");return a.classes.push(t),a}else return b.makeSpan(["mspace",t],[b.mathsym(r.text,r.mode,e)],e)}else{if(tt.hasOwnProperty(r.text))return b.makeSpan(["mspace",tt[r.text]],[],e);throw new M('Unknown type of space "'+r.text+'"')}},mathmlBuilder(r,e){var t;if(rt.hasOwnProperty(r.text))t=new S.MathNode("mtext",[new S.TextNode(" ")]);else{if(tt.hasOwnProperty(r.text))return new S.MathNode("mspace");throw new M('Unknown type of space "'+r.text+'"')}return t}});var sr=()=>{var r=new S.MathNode("mtd",[]);return r.setAttribute("width","50%"),r};W0({type:"tag",mathmlBuilder(r,e){var t=new S.MathNode("mtable",[new S.MathNode("mtr",[sr(),new S.MathNode("mtd",[V0(r.body,e)]),sr(),new S.MathNode("mtd",[V0(r.tag,e)])])]);return t.setAttribute("width","100%"),t}});var lr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},or={"\\textbf":"textbf","\\textmd":"textmd"},Q1={"\\textit":"textit","\\textup":"textup"},ur=(r,e)=>{var t=r.font;if(t){if(lr[t])return e.withTextFontFamily(lr[t]);if(or[t])return e.withTextFontWeight(or[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(Q1[t])};B({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"text",mode:t.mode,body:Q(n),font:a}},htmlBuilder(r,e){var t=ur(r,e),a=t0(r.body,t,!0);return b.makeSpan(["mord","text"],a,t)},mathmlBuilder(r,e){var t=ur(r,e);return V0(r.body,t)}});B({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=P(r.body,e),a=b.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,s=b.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return b.makeSpan(["mord","underline"],[s],e)},mathmlBuilder(r,e){var t=new S.MathNode("mo",[new S.TextNode("‾")]);t.setAttribute("stretchy","true");var a=new S.MathNode("munder",[X(r.body,e),t]);return a.setAttribute("accentunder","true"),a}});B({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=P(r.body,e),a=e.fontMetrics().axisHeight,n=.5*(t.height-a-(t.depth+a));return b.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){return new S.MathNode("mpadded",[X(r.body,e)],["vcenter"])}});B({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(r,e,t){throw new M("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){for(var t=hr(r),a=[],n=e.havingStyle(e.style.text()),s=0;sr.body.replace(/ /g,r.star?"␣":" "),L0=Tr,ia=`[ \r + ]`,_1="\\\\[a-zA-Z@]+",e4="\\\\[^\uD800-\uDFFF]",t4="("+_1+")"+ia+"*",r4=`\\\\( +|[ \r ]+ +?)[ \r ]*`,ct="[̀-ͯ]",a4=new RegExp(ct+"+$"),n4="("+ia+"+)|"+(r4+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(ct+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ct+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+t4)+("|"+e4+")");class mr{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(n4,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new f0("EOF",new u0(this,t,t));var a=this.tokenRegex.exec(e);if(a===null||a.index!==t)throw new M("Unexpected character: '"+e[t]+"'",new f0(e[t],new u0(this,t,t+1)));var n=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[n]===14){var s=e.indexOf(` +`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new f0(n,new u0(this,t,this.tokenRegex.lastIndex))}}class i4{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new M("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,a){if(a===void 0&&(a=!1),a){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var s4=jr;m("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});m("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});m("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});m("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});m("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});m("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");m("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var cr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};m("\\char",function(r){var e=r.popToken(),t,a="";if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new M("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=cr[e.text],a==null||a>=t)throw new M("Invalid base-"+t+" digit "+e.text);for(var n;(n=cr[r.future().text])!=null&&n{var a=r.consumeArg().tokens;if(a.length!==1)throw new M("\\newcommand's first argument must be a macro name");var n=a[0].text,s=r.isDefined(n);if(s&&!e)throw new M("\\newcommand{"+n+"} attempting to redefine "+(n+"; use \\renewcommand"));if(!s&&!t)throw new M("\\renewcommand{"+n+"} when command "+n+" does not yet exist; use \\newcommand");var o=0;if(a=r.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var h="",c=r.expandNextToken();c.text!=="]"&&c.text!=="EOF";)h+=c.text,c=r.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new M("Invalid number of arguments: "+h);o=parseInt(h),a=r.consumeArg().tokens}return r.macros.set(n,{tokens:a,numArgs:o}),""};m("\\newcommand",r=>Dt(r,!1,!0));m("\\renewcommand",r=>Dt(r,!0,!1));m("\\providecommand",r=>Dt(r,!0,!0));m("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});m("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});m("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),L0[t],$.math[t],$.text[t]),""});m("\\bgroup","{");m("\\egroup","}");m("~","\\nobreakspace");m("\\lq","`");m("\\rq","'");m("\\aa","\\r a");m("\\AA","\\r A");m("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");m("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");m("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");m("ℬ","\\mathscr{B}");m("ℰ","\\mathscr{E}");m("ℱ","\\mathscr{F}");m("ℋ","\\mathscr{H}");m("ℐ","\\mathscr{I}");m("ℒ","\\mathscr{L}");m("ℳ","\\mathscr{M}");m("ℛ","\\mathscr{R}");m("ℭ","\\mathfrak{C}");m("ℌ","\\mathfrak{H}");m("ℨ","\\mathfrak{Z}");m("\\Bbbk","\\Bbb{k}");m("·","\\cdotp");m("\\llap","\\mathllap{\\textrm{#1}}");m("\\rlap","\\mathrlap{\\textrm{#1}}");m("\\clap","\\mathclap{\\textrm{#1}}");m("\\mathstrut","\\vphantom{(}");m("\\underbar","\\underline{\\text{#1}}");m("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');m("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");m("\\ne","\\neq");m("≠","\\neq");m("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");m("∉","\\notin");m("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");m("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");m("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");m("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");m("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");m("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");m("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");m("⟂","\\perp");m("‼","\\mathclose{!\\mkern-0.8mu!}");m("∌","\\notni");m("⌜","\\ulcorner");m("⌝","\\urcorner");m("⌞","\\llcorner");m("⌟","\\lrcorner");m("©","\\copyright");m("®","\\textregistered");m("️","\\textregistered");m("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');m("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');m("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');m("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');m("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");m("⋮","\\vdots");m("\\varGamma","\\mathit{\\Gamma}");m("\\varDelta","\\mathit{\\Delta}");m("\\varTheta","\\mathit{\\Theta}");m("\\varLambda","\\mathit{\\Lambda}");m("\\varXi","\\mathit{\\Xi}");m("\\varPi","\\mathit{\\Pi}");m("\\varSigma","\\mathit{\\Sigma}");m("\\varUpsilon","\\mathit{\\Upsilon}");m("\\varPhi","\\mathit{\\Phi}");m("\\varPsi","\\mathit{\\Psi}");m("\\varOmega","\\mathit{\\Omega}");m("\\substack","\\begin{subarray}{c}#1\\end{subarray}");m("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");m("\\boxed","\\fbox{$\\displaystyle{#1}$}");m("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");m("\\implies","\\DOTSB\\;\\Longrightarrow\\;");m("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");m("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");m("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var dr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};m("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in dr?e=dr[t]:(t.slice(0,4)==="\\not"||t in $.math&&q.contains(["bin","rel"],$.math[t].group))&&(e="\\dotsb"),e});var Ct={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};m("\\dotso",function(r){var e=r.future().text;return e in Ct?"\\ldots\\,":"\\ldots"});m("\\dotsc",function(r){var e=r.future().text;return e in Ct&&e!==","?"\\ldots\\,":"\\ldots"});m("\\cdots",function(r){var e=r.future().text;return e in Ct?"\\@cdots\\,":"\\@cdots"});m("\\dotsb","\\cdots");m("\\dotsm","\\cdots");m("\\dotsi","\\!\\cdots");m("\\dotsx","\\ldots\\,");m("\\DOTSI","\\relax");m("\\DOTSB","\\relax");m("\\DOTSX","\\relax");m("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");m("\\,","\\tmspace+{3mu}{.1667em}");m("\\thinspace","\\,");m("\\>","\\mskip{4mu}");m("\\:","\\tmspace+{4mu}{.2222em}");m("\\medspace","\\:");m("\\;","\\tmspace+{5mu}{.2777em}");m("\\thickspace","\\;");m("\\!","\\tmspace-{3mu}{.1667em}");m("\\negthinspace","\\!");m("\\negmedspace","\\tmspace-{4mu}{.2222em}");m("\\negthickspace","\\tmspace-{5mu}{.277em}");m("\\enspace","\\kern.5em ");m("\\enskip","\\hskip.5em\\relax");m("\\quad","\\hskip1em\\relax");m("\\qquad","\\hskip2em\\relax");m("\\tag","\\@ifstar\\tag@literal\\tag@paren");m("\\tag@paren","\\tag@literal{({#1})}");m("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new M("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});m("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");m("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");m("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");m("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");m("\\newline","\\\\\\relax");m("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var sa=A(x0["Main-Regular"][84][1]-.7*x0["Main-Regular"][65][1]);m("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+sa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");m("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+sa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");m("\\hspace","\\@ifstar\\@hspacer\\@hspace");m("\\@hspace","\\hskip #1\\relax");m("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");m("\\ordinarycolon",":");m("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");m("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');m("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');m("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');m("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');m("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');m("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');m("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');m("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');m("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');m("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');m("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');m("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');m("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');m("∷","\\dblcolon");m("∹","\\eqcolon");m("≔","\\coloneqq");m("≕","\\eqqcolon");m("⩴","\\Coloneqq");m("\\ratio","\\vcentcolon");m("\\coloncolon","\\dblcolon");m("\\colonequals","\\coloneqq");m("\\coloncolonequals","\\Coloneqq");m("\\equalscolon","\\eqqcolon");m("\\equalscoloncolon","\\Eqqcolon");m("\\colonminus","\\coloneq");m("\\coloncolonminus","\\Coloneq");m("\\minuscolon","\\eqcolon");m("\\minuscoloncolon","\\Eqcolon");m("\\coloncolonapprox","\\Colonapprox");m("\\coloncolonsim","\\Colonsim");m("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");m("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");m("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");m("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");m("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");m("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");m("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");m("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");m("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");m("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");m("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");m("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");m("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");m("\\nleqq","\\html@mathml{\\@nleqq}{≰}");m("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");m("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");m("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");m("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");m("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");m("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");m("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");m("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");m("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");m("\\imath","\\html@mathml{\\@imath}{ı}");m("\\jmath","\\html@mathml{\\@jmath}{ȷ}");m("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");m("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");m("⟦","\\llbracket");m("⟧","\\rrbracket");m("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");m("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");m("⦃","\\lBrace");m("⦄","\\rBrace");m("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");m("⦵","\\minuso");m("\\darr","\\downarrow");m("\\dArr","\\Downarrow");m("\\Darr","\\Downarrow");m("\\lang","\\langle");m("\\rang","\\rangle");m("\\uarr","\\uparrow");m("\\uArr","\\Uparrow");m("\\Uarr","\\Uparrow");m("\\N","\\mathbb{N}");m("\\R","\\mathbb{R}");m("\\Z","\\mathbb{Z}");m("\\alef","\\aleph");m("\\alefsym","\\aleph");m("\\Alpha","\\mathrm{A}");m("\\Beta","\\mathrm{B}");m("\\bull","\\bullet");m("\\Chi","\\mathrm{X}");m("\\clubs","\\clubsuit");m("\\cnums","\\mathbb{C}");m("\\Complex","\\mathbb{C}");m("\\Dagger","\\ddagger");m("\\diamonds","\\diamondsuit");m("\\empty","\\emptyset");m("\\Epsilon","\\mathrm{E}");m("\\Eta","\\mathrm{H}");m("\\exist","\\exists");m("\\harr","\\leftrightarrow");m("\\hArr","\\Leftrightarrow");m("\\Harr","\\Leftrightarrow");m("\\hearts","\\heartsuit");m("\\image","\\Im");m("\\infin","\\infty");m("\\Iota","\\mathrm{I}");m("\\isin","\\in");m("\\Kappa","\\mathrm{K}");m("\\larr","\\leftarrow");m("\\lArr","\\Leftarrow");m("\\Larr","\\Leftarrow");m("\\lrarr","\\leftrightarrow");m("\\lrArr","\\Leftrightarrow");m("\\Lrarr","\\Leftrightarrow");m("\\Mu","\\mathrm{M}");m("\\natnums","\\mathbb{N}");m("\\Nu","\\mathrm{N}");m("\\Omicron","\\mathrm{O}");m("\\plusmn","\\pm");m("\\rarr","\\rightarrow");m("\\rArr","\\Rightarrow");m("\\Rarr","\\Rightarrow");m("\\real","\\Re");m("\\reals","\\mathbb{R}");m("\\Reals","\\mathbb{R}");m("\\Rho","\\mathrm{P}");m("\\sdot","\\cdot");m("\\sect","\\S");m("\\spades","\\spadesuit");m("\\sub","\\subset");m("\\sube","\\subseteq");m("\\supe","\\supseteq");m("\\Tau","\\mathrm{T}");m("\\thetasym","\\vartheta");m("\\weierp","\\wp");m("\\Zeta","\\mathrm{Z}");m("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");m("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");m("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");m("\\bra","\\mathinner{\\langle{#1}|}");m("\\ket","\\mathinner{|{#1}\\rangle}");m("\\braket","\\mathinner{\\langle{#1}\\rangle}");m("\\Bra","\\left\\langle#1\\right|");m("\\Ket","\\left|#1\\right\\rangle");var la=r=>e=>{var t=e.consumeArg().tokens,a=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.consumeArg().tokens,o=e.macros.get("|"),h=e.macros.get("\\|");e.macros.beginGroup();var c=y=>w=>{r&&(w.macros.set("|",o),n.length&&w.macros.set("\\|",h));var x=y;if(!y&&n.length){var z=w.future();z.text==="|"&&(w.popToken(),x=!0)}return{tokens:x?n:a,numArgs:0}};e.macros.set("|",c(!1)),n.length&&e.macros.set("\\|",c(!0));var p=e.consumeArg().tokens,g=e.expandTokens([...s,...p,...t]);return e.macros.endGroup(),{tokens:g.reverse(),numArgs:0}};m("\\bra@ket",la(!1));m("\\bra@set",la(!0));m("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");m("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");m("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");m("\\angln","{\\angl n}");m("\\blue","\\textcolor{##6495ed}{#1}");m("\\orange","\\textcolor{##ffa500}{#1}");m("\\pink","\\textcolor{##ff00af}{#1}");m("\\red","\\textcolor{##df0030}{#1}");m("\\green","\\textcolor{##28ae7b}{#1}");m("\\gray","\\textcolor{gray}{#1}");m("\\purple","\\textcolor{##9d38bd}{#1}");m("\\blueA","\\textcolor{##ccfaff}{#1}");m("\\blueB","\\textcolor{##80f6ff}{#1}");m("\\blueC","\\textcolor{##63d9ea}{#1}");m("\\blueD","\\textcolor{##11accd}{#1}");m("\\blueE","\\textcolor{##0c7f99}{#1}");m("\\tealA","\\textcolor{##94fff5}{#1}");m("\\tealB","\\textcolor{##26edd5}{#1}");m("\\tealC","\\textcolor{##01d1c1}{#1}");m("\\tealD","\\textcolor{##01a995}{#1}");m("\\tealE","\\textcolor{##208170}{#1}");m("\\greenA","\\textcolor{##b6ffb0}{#1}");m("\\greenB","\\textcolor{##8af281}{#1}");m("\\greenC","\\textcolor{##74cf70}{#1}");m("\\greenD","\\textcolor{##1fab54}{#1}");m("\\greenE","\\textcolor{##0d923f}{#1}");m("\\goldA","\\textcolor{##ffd0a9}{#1}");m("\\goldB","\\textcolor{##ffbb71}{#1}");m("\\goldC","\\textcolor{##ff9c39}{#1}");m("\\goldD","\\textcolor{##e07d10}{#1}");m("\\goldE","\\textcolor{##a75a05}{#1}");m("\\redA","\\textcolor{##fca9a9}{#1}");m("\\redB","\\textcolor{##ff8482}{#1}");m("\\redC","\\textcolor{##f9685d}{#1}");m("\\redD","\\textcolor{##e84d39}{#1}");m("\\redE","\\textcolor{##bc2612}{#1}");m("\\maroonA","\\textcolor{##ffbde0}{#1}");m("\\maroonB","\\textcolor{##ff92c6}{#1}");m("\\maroonC","\\textcolor{##ed5fa6}{#1}");m("\\maroonD","\\textcolor{##ca337c}{#1}");m("\\maroonE","\\textcolor{##9e034e}{#1}");m("\\purpleA","\\textcolor{##ddd7ff}{#1}");m("\\purpleB","\\textcolor{##c6b9fc}{#1}");m("\\purpleC","\\textcolor{##aa87ff}{#1}");m("\\purpleD","\\textcolor{##7854ab}{#1}");m("\\purpleE","\\textcolor{##543b78}{#1}");m("\\mintA","\\textcolor{##f5f9e8}{#1}");m("\\mintB","\\textcolor{##edf2df}{#1}");m("\\mintC","\\textcolor{##e0e5cc}{#1}");m("\\grayA","\\textcolor{##f6f7f7}{#1}");m("\\grayB","\\textcolor{##f0f1f2}{#1}");m("\\grayC","\\textcolor{##e3e5e6}{#1}");m("\\grayD","\\textcolor{##d6d8da}{#1}");m("\\grayE","\\textcolor{##babec2}{#1}");m("\\grayF","\\textcolor{##888d93}{#1}");m("\\grayG","\\textcolor{##626569}{#1}");m("\\grayH","\\textcolor{##3b3e40}{#1}");m("\\grayI","\\textcolor{##21242c}{#1}");m("\\kaBlue","\\textcolor{##314453}{#1}");m("\\kaGreen","\\textcolor{##71B307}{#1}");var oa={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class l4{constructor(e,t,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new i4(s4,t.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new mr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,a,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:a}=this.consumeArg(["]"])}else({tokens:n,start:t,end:a}=this.consumeArg());return this.pushToken(new f0("EOF",a.loc)),this.pushTokens(n),t.range(a,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],a=e&&e.length>0;a||this.consumeSpaces();var n=this.future(),s,o=0,h=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++o;else if(s.text==="}"){if(--o,o===-1)throw new M("Extra }",s)}else if(s.text==="EOF")throw new M("Unexpected end of input in a macro argument, expected '"+(e&&a?e[h]:"}")+"'",s);if(e&&a)if((o===0||o===1&&e[h]==="{")&&s.text===e[h]){if(++h,h===e.length){t.splice(-h,h);break}}else h=0}while(o!==0||a);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new M("The length of delimiters doesn't match the number of args!");for(var a=t[0],n=0;nthis.settings.maxExpand)throw new M("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),a=t.text,n=t.noexpand?null:this._getExpansion(a);if(n==null||e&&n.unexpandable){if(e&&n==null&&a[0]==="\\"&&!this.isDefined(a))throw new M("Undefined control sequence: "+a);return this.pushToken(t),!1}this.countExpansion(1);var s=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){s=s.slice();for(var h=s.length-1;h>=0;--h){var c=s[h];if(c.text==="#"){if(h===0)throw new M("Incomplete placeholder at end of macro body",c);if(c=s[--h],c.text==="#")s.splice(h+1,1);else if(/^[1-9]$/.test(c.text))s.splice(h,2,...o[+c.text-1]);else throw new M("Not a valid argument number",c)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new f0(e)]):void 0}expandTokens(e){var t=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(a=>a.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var s=0;if(n.indexOf("#")!==-1)for(var o=n.replace(/##/g,"");o.indexOf("#"+(s+1))!==-1;)++s;for(var h=new mr(n,this.settings),c=[],p=h.lex();p.text!=="EOF";)c.push(p),p=h.lex();c.reverse();var g={tokens:c,numArgs:s};return g}return n}isDefined(e){return this.macros.has(e)||L0.hasOwnProperty(e)||$.math.hasOwnProperty(e)||$.text.hasOwnProperty(e)||oa.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:L0.hasOwnProperty(e)&&!L0[e].primitive}}var fr=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Me=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),at={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},pr={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class He{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new l4(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new M("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new f0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(He.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&L0[n.text]&&L0[n.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;a.push(s)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var t=-1,a,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var h=$[this.mode][t].group,c=u0.range(e),p;if(Za.hasOwnProperty(h)){var g=h;p={type:"atom",mode:this.mode,family:g,loc:c,text:t}}else p={type:h,mode:this.mode,loc:c,text:t};o=p}else if(t.charCodeAt(0)>=128)this.settings.strict&&(gr(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:u0.range(e),text:t};else return null;if(this.consume(),s)for(var y=0;yn}function S(e,n){var r={};return n=z(n),le(e,function(t,a,i){$e(r,a,n(t,a,i))}),r}function y(e){return e&&e.length?he(e,pe,nn):void 0}function U(e,n){return e&&e.length?he(e,z(n),je):void 0}function rn(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function tn(e,n){if(e!==n){var r=e!==void 0,t=e===null,a=e===e,i=ee(e),o=n!==void 0,u=n===null,d=n===n,s=ee(n);if(!u&&!s&&!i&&e>n||i&&o&&d&&!u&&!s||t&&o&&d||!r&&d||!a)return 1;if(!t&&!i&&!s&&e=u)return d;var s=r[t];return d*(s=="desc"?-1:1)}}return e.index-n.index}function on(e,n,r){n.length?n=j(n,function(i){return we(i)?function(o){return Me(o,i.length===1?i[0]:i)}:i}):n=[pe];var t=-1;n=j(n,We(z));var a=Ve(e,function(i,o,u){var d=j(n,function(s){return s(i)});return{criteria:d,index:++t,value:i}});return rn(a,function(i,o){return an(i,o,r)})}function un(e,n){return Ae(e,n,function(r,t){return Ie(e,t)})}var M=He(function(e,n){return e==null?{}:un(e,n)}),dn=Math.ceil,sn=Math.max;function fn(e,n,r,t){for(var a=-1,i=sn(dn((n-e)/(r||1)),0),o=Array(i);i--;)o[++a]=e,e+=r;return o}function cn(e){return function(n,r,t){return t&&typeof t!="number"&&q(n,r,t)&&(r=t=void 0),n=V(n),r===void 0?(r=n,n=0):r=V(r),t=t===void 0?n1&&q(e,n[0],n[1])?n=[]:r>2&&q(n[0],n[1],n[2])&&(n=[n[0]]),on(e,Se(n),[])}),ln=0;function H(e){var n=++ln;return Fe(e)+n}function hn(e,n,r){for(var t=-1,a=e.length,i=n.length,o={};++t0;--u)if(o=n[u].dequeue(),o){t=t.concat(A(e,n,r,o,!0));break}}}return t}function A(e,n,r,t,a){var i=a?[]:void 0;return f(e.inEdges(t.v),function(o){var u=e.edge(o),d=e.node(o.v);a&&i.push({v:o.v,w:o.w}),d.out-=u,W(n,r,d)}),f(e.outEdges(t.v),function(o){var u=e.edge(o),d=o.w,s=e.node(d);s.in-=u,W(n,r,s)}),e.removeNode(t.v),i}function yn(e,n){var r=new g,t=0,a=0;f(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),f(e.edges(),function(u){var d=r.edge(u.v,u.w)||0,s=n(u),c=d+s;r.setEdge(u.v,u.w,c),a=Math.max(a,r.node(u.v).out+=s),t=Math.max(t,r.node(u.w).in+=s)});var i=E(a+t+3).map(function(){return new pn}),o=t+1;return f(r.nodes(),function(u){W(i,o,r.node(u))}),{graph:r,buckets:i,zeroIdx:o}}function W(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function kn(e){var n=e.graph().acyclicer==="greedy"?mn(e,r(e)):xn(e);f(n,function(t){var a=e.edge(t);e.removeEdge(t),a.forwardName=t.name,a.reversed=!0,e.setEdge(t.w,t.v,a,H("rev"))});function r(t){return function(a){return t.edge(a).weight}}}function xn(e){var n=[],r={},t={};function a(i){Object.prototype.hasOwnProperty.call(t,i)||(t[i]=!0,r[i]=!0,f(e.outEdges(i),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?n.push(o):a(o.w)}),delete r[i])}return f(e.nodes(),a),n}function En(e){f(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function L(e,n,r,t){var a;do a=H(t);while(e.hasNode(a));return r.dummy=n,e.setNode(a,r),a}function On(e){var n=new g().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+a.weight,minlen:Math.max(t.minlen,a.minlen)})}),n}function be(e){var n=new g({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function re(e,n){var r=e.x,t=e.y,a=n.x-r,i=n.y-t,o=e.width/2,u=e.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var d,s;return Math.abs(i)*o>Math.abs(a)*u?(i<0&&(u=-u),d=u*a/i,s=u):(a<0&&(o=-o),d=o,s=o*i/a),{x:r+d,y:t+s}}function F(e){var n=w(E(me(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),a=t.rank;m(a)||(n[a][t.order]=r)}),n}function Ln(e){var n=P(w(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);ve(t,"rank")&&(t.rank-=n)})}function Nn(e){var n=P(w(e.nodes(),function(i){return e.node(i).rank})),r=[];f(e.nodes(),function(i){var o=e.node(i).rank-n;r[o]||(r[o]=[]),r[o].push(i)});var t=0,a=e.graph().nodeRankFactor;f(r,function(i,o){m(i)&&o%a!==0?--t:t&&f(i,function(u){e.node(u).rank+=t})})}function te(e,n,r,t){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=t),L(e,"border",a,n)}function me(e){return y(w(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function Pn(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Cn(e,n){return n()}function _n(e){function n(r){var t=e.children(r),a=e.node(r);if(t.length&&f(t,n),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var i=a.minRank,o=a.maxRank+1;io.lim&&(u=o,d=!0);var s=_(n.edges(),function(c){return d===oe(e,e.node(c.v),u)&&d!==oe(e,e.node(c.w),u)});return U(s,function(c){return C(n,c)})}function Pe(e,n,r,t){var a=r.v,i=r.w;e.removeEdge(a,i),e.setEdge(t.v,t.w,{}),Z(e),Q(e,n),$n(e,n)}function $n(e,n){var r=X(e.nodes(),function(a){return!n.node(a).parent}),t=Dn(e,r);t=t.slice(1),f(t,function(a){var i=e.node(a).parent,o=n.edge(a,i),u=!1;o||(o=n.edge(i,a),u=!0),n.node(a).rank=n.node(i).rank+(u?o.minlen:-o.minlen)})}function Wn(e,n,r){return e.hasEdge(n,r)}function oe(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function zn(e){switch(e.graph().ranker){case"network-simplex":ue(e);break;case"tight-tree":Un(e);break;case"longest-path":Xn(e);break;default:ue(e)}}var Xn=J;function Un(e){J(e),ye(e)}function ue(e){k(e)}function Hn(e){var n=L(e,"root",{},"_root"),r=Jn(e),t=y(x(r))-1,a=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(o){e.edge(o).minlen*=a});var i=Qn(e)+1;f(e.children(),function(o){Ce(e,n,a,i,t,r,o)}),e.graph().nodeRankFactor=a}function Ce(e,n,r,t,a,i,o){var u=e.children(o);if(!u.length){o!==n&&e.setEdge(n,o,{weight:0,minlen:r});return}var d=te(e,"_bt"),s=te(e,"_bb"),c=e.node(o);e.setParent(d,o),c.borderTop=d,e.setParent(s,o),c.borderBottom=s,f(u,function(l){Ce(e,n,r,t,a,i,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,b=h.borderTop?t:2*t,N=v!==p?1:a-i[o]+1;e.setEdge(d,v,{weight:b,minlen:N,nestingEdge:!0}),e.setEdge(p,s,{weight:b,minlen:N,nestingEdge:!0})}),e.parent(o)||e.setEdge(n,d,{weight:0,minlen:a+i[o]})}function Jn(e){var n={};function r(t,a){var i=e.children(t);i&&i.length&&f(i,function(o){r(o,a+1)}),n[t]=a}return f(e.children(),function(t){r(t,1)}),n}function Qn(e){return I(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Zn(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Kn(e,n,r){var t={},a;f(r,function(i){for(var o=e.parent(i),u,d;o;){if(u=e.parent(o),u?(d=t[u],t[u]=o):(d=a,a=o),d&&d!==o){n.setEdge(d,o);return}o=u}})}function er(e,n,r){var t=nr(e),a=new g({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(i){return e.node(i)});return f(e.nodes(),function(i){var o=e.node(i),u=e.parent(i);(o.rank===n||o.minRank<=n&&n<=o.maxRank)&&(a.setNode(i),a.setParent(i,u||t),f(e[r](i),function(d){var s=d.v===i?d.w:d.v,c=a.edge(s,i),l=m(c)?0:c.weight;a.setEdge(s,i,{weight:e.edge(d).weight+l})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&a.setNode(i,{borderLeft:o.borderLeft[n],borderRight:o.borderRight[n]}))}),a}function nr(e){for(var n;e.hasNode(n=H("_root")););return n}function rr(e,n){for(var r=0,t=1;t0;)c%2&&(l+=u[c+1]),c=c-1>>1,u[c]+=s.weight;d+=s.weight*l})),d}function ar(e){var n={},r=_(e.nodes(),function(u){return!e.children(u).length}),t=y(w(r,function(u){return e.node(u).rank})),a=w(E(t+1),function(){return[]});function i(u){if(!ve(n,u)){n[u]=!0;var d=e.node(u);a[d.rank].push(u),f(e.successors(u),i)}}var o=R(r,function(u){return e.node(u).rank});return f(o,i),a}function ir(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var a=I(t,function(i,o){var u=e.edge(o),d=e.node(o.v);return{sum:i.sum+u.weight*d.order,weight:i.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}function or(e,n){var r={};f(e,function(a,i){var o=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};m(a.barycenter)||(o.barycenter=a.barycenter,o.weight=a.weight)}),f(n.edges(),function(a){var i=r[a.v],o=r[a.w];!m(i)&&!m(o)&&(o.indegree++,i.out.push(r[a.w]))});var t=_(r,function(a){return!a.indegree});return ur(t)}function ur(e){var n=[];function r(i){return function(o){o.merged||(m(o.barycenter)||m(i.barycenter)||o.barycenter>=i.barycenter)&&dr(i,o)}}function t(i){return function(o){o.in.push(i),--o.indegree===0&&e.push(o)}}for(;e.length;){var a=e.pop();n.push(a),f(a.in.reverse(),r(a)),f(a.out,t(a))}return w(_(n,function(i){return!i.merged}),function(i){return M(i,["vs","i","barycenter","weight"])})}function dr(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function sr(e,n){var r=Pn(e,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=r.lhs,a=R(r.rhs,function(c){return-c.i}),i=[],o=0,u=0,d=0;t.sort(fr(!!n)),d=de(i,a,d),f(t,function(c){d+=c.vs.length,i.push(c.vs),o+=c.barycenter*c.weight,u+=c.weight,d=de(i,a,d)});var s={vs:O(i)};return u&&(s.barycenter=o/u,s.weight=u),s}function de(e,n,r){for(var t;n.length&&(t=T(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function fr(e){return function(n,r){return n.barycenterr.barycenter?1:e?r.i-n.i:n.i-r.i}}function _e(e,n,r,t){var a=e.children(n),i=e.node(n),o=i?i.borderLeft:void 0,u=i?i.borderRight:void 0,d={};o&&(a=_(a,function(p){return p!==o&&p!==u}));var s=ir(e,a);f(s,function(p){if(e.children(p.v).length){var b=_e(e,p.v,r,t);d[p.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter")&&lr(p,b)}});var c=or(s,r);cr(c,d);var l=sr(c,t);if(o&&(l.vs=O([o,l.vs,u]),e.predecessors(o).length)){var h=e.node(e.predecessors(o)[0]),v=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function cr(e,n){f(e,function(r){r.vs=O(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function lr(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function hr(e){var n=me(e),r=se(e,E(1,n+1),"inEdges"),t=se(e,E(n-1,-1,-1),"outEdges"),a=ar(e);fe(e,a);for(var i=Number.POSITIVE_INFINITY,o,u=0,d=0;d<4;++u,++d){vr(u%2?r:t,u%4>=2),a=F(e);var s=rr(e,a);so||u>n[d].lim));for(s=d,d=t;(d=e.parent(d))!==s;)i.push(d);return{path:a.concat(i.reverse()),lca:s}}function br(e){var n={},r=0;function t(a){var i=r;f(e.children(a),t),n[a]={low:i,lim:r++}}return f(e.children(),t),n}function mr(e,n){var r={};function t(a,i){var o=0,u=0,d=a.length,s=T(i);return f(i,function(c,l){var h=yr(e,c),v=h?e.node(h).order:d;(h||c===s)&&(f(i.slice(u,l+1),function(p){f(e.predecessors(p),function(b){var N=e.node(b),K=N.order;(Ks)&&Re(r,h,c)})})}function a(i,o){var u=-1,d,s=0;return f(o,function(c,l){if(e.node(c).dummy==="border"){var h=e.predecessors(c);h.length&&(d=e.node(h[0]).order,t(o,s,l,u,d),s=l,u=d)}t(o,s,o.length,d,i.length)}),o}return I(n,a),r}function yr(e,n){if(e.node(n).dummy)return X(e.predecessors(n),function(r){return e.node(r).dummy})}function Re(e,n,r){if(n>r){var t=n;n=r,r=t}var a=e[n];a||(e[n]=a={}),a[r]=!0}function kr(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function xr(e,n,r,t){var a={},i={},o={};return f(n,function(u){f(u,function(d,s){a[d]=d,i[d]=d,o[d]=s})}),f(n,function(u){var d=-1;f(u,function(s){var c=t(s);if(c.length){c=R(c,function(b){return o[b]});for(var l=(c.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=c[h];i[s]===s&&d{var t=r(" buildLayoutGraph",()=>qr(e));r(" runLayout",()=>Ir(t,r)),r(" updateInputGraph",()=>Sr(e,t))})}function Ir(e,n){n(" makeSpaceForEdgeLabels",()=>$r(e)),n(" removeSelfEdges",()=>Kr(e)),n(" acyclic",()=>kn(e)),n(" nestingGraph.run",()=>Hn(e)),n(" rank",()=>zn(be(e))),n(" injectEdgeLabelProxies",()=>Wr(e)),n(" removeEmptyRanks",()=>Nn(e)),n(" nestingGraph.cleanup",()=>Zn(e)),n(" normalizeRanks",()=>Ln(e)),n(" assignRankMinMax",()=>zr(e)),n(" removeEdgeLabelProxies",()=>Xr(e)),n(" normalize.run",()=>Sn(e)),n(" parentDummyChains",()=>pr(e)),n(" addBorderSegments",()=>_n(e)),n(" order",()=>hr(e)),n(" insertSelfEdges",()=>et(e)),n(" adjustCoordinateSystem",()=>Rn(e)),n(" position",()=>Tr(e)),n(" positionSelfEdges",()=>nt(e)),n(" removeBorderNodes",()=>Zr(e)),n(" normalize.undo",()=>jn(e)),n(" fixupEdgeLabelCoords",()=>Jr(e)),n(" undoCoordinateSystem",()=>Tn(e)),n(" translateGraph",()=>Ur(e)),n(" assignNodeIntersects",()=>Hr(e)),n(" reversePoints",()=>Qr(e)),n(" acyclic.undo",()=>En(e))}function Sr(e,n){f(e.nodes(),function(r){var t=e.node(r),a=n.node(r);t&&(t.x=a.x,t.y=a.y,n.children(r).length&&(t.width=a.width,t.height=a.height))}),f(e.edges(),function(r){var t=e.edge(r),a=n.edge(r);t.points=a.points,Object.prototype.hasOwnProperty.call(a,"x")&&(t.x=a.x,t.y=a.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Fr=["nodesep","edgesep","ranksep","marginx","marginy"],jr={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Vr=["acyclicer","ranker","rankdir","align"],Ar=["width","height"],Br={width:0,height:0},Gr=["minlen","weight","width","height","labeloffset"],Yr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Dr=["labelpos"];function qr(e){var n=new g({multigraph:!0,compound:!0}),r=D(e.graph());return n.setGraph($({},jr,Y(r,Fr),M(r,Vr))),f(e.nodes(),function(t){var a=D(e.node(t));n.setNode(t,Be(Y(a,Ar),Br)),n.setParent(t,e.parent(t))}),f(e.edges(),function(t){var a=D(e.edge(t));n.setEdge(t,$({},Yr,Y(a,Gr),M(a,Dr)))}),n}function $r(e){var n=e.graph();n.ranksep/=2,f(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Wr(e){f(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),a=e.node(n.w),i={rank:(a.rank-t.rank)/2+t.rank,e:n};L(e,"edge-proxy",i,"_ep")}})}function zr(e){var n=0;f(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=y(n,t.maxRank))}),e.graph().maxRank=n}function Xr(e){f(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Ur(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,a=0,i=e.graph(),o=i.marginx||0,u=i.marginy||0;function d(s){var c=s.x,l=s.y,h=s.width,v=s.height;n=Math.min(n,c-h/2),r=Math.max(r,c+h/2),t=Math.min(t,l-v/2),a=Math.max(a,l+v/2)}f(e.nodes(),function(s){d(e.node(s))}),f(e.edges(),function(s){var c=e.edge(s);Object.prototype.hasOwnProperty.call(c,"x")&&d(c)}),n-=o,t-=u,f(e.nodes(),function(s){var c=e.node(s);c.x-=n,c.y-=t}),f(e.edges(),function(s){var c=e.edge(s);f(c.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(c,"x")&&(c.x-=n),Object.prototype.hasOwnProperty.call(c,"y")&&(c.y-=t)}),i.width=r-n+o,i.height=a-t+u}function Hr(e){f(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),a=e.node(n.w),i,o;r.points?(i=r.points[0],o=r.points[r.points.length-1]):(r.points=[],i=a,o=t),r.points.unshift(re(t,i)),r.points.push(re(a,o))})}function Jr(e){f(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Qr(e){f(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Zr(e){f(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),a=e.node(r.borderBottom),i=e.node(T(r.borderLeft)),o=e.node(T(r.borderRight));r.width=Math.abs(o.x-i.x),r.height=Math.abs(a.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),f(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Kr(e){f(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function et(e){var n=F(e);f(n,function(r){var t=0;f(r,function(a,i){var o=e.node(a);o.order=i+t,f(o.selfEdges,function(u){L(e,"selfedge",{width:u.label.width,height:u.label.height,rank:o.rank,order:i+ ++t,e:u.e,label:u.label},"_se")}),delete o.selfEdges})})}function nt(e){f(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),a=t.x+t.width/2,i=t.y,o=r.x-a,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:a+2*o/3,y:i-u},{x:a+5*o/6,y:i-u},{x:a+o,y:i},{x:a+5*o/6,y:i+u},{x:a+2*o/3,y:i+u}],r.label.x=r.x,r.label.y=r.y}})}function Y(e,n){return S(M(e,n),Number)}function D(e){var n={};return f(e,function(r,t){n[t.toLowerCase()]=r}),n}export{ot as l}; diff --git a/assets/chunks/linear.BcMShDgX.js b/assets/chunks/linear.BcMShDgX.js new file mode 100644 index 00000000..cd91ef4b --- /dev/null +++ b/assets/chunks/linear.BcMShDgX.js @@ -0,0 +1 @@ +import{b0 as un,b1 as I,b2 as U,b3 as Y,b4 as fn}from"../app.CXGmg8Jv.js";import{i as cn}from"./init.Gi6I4Gst.js";function F(n,t){return n==null||t==null?NaN:nt?1:n>=t?0:NaN}function hn(n,t){return n==null||t==null?NaN:tn?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(u,c)=>F(n(u),c),r=(u,c)=>n(u)-c):(t=n===F||n===hn?n:mn,e=n,r=n);function i(u,c,o=0,s=u.length){if(o>>1;e(u[h],c)<0?o=h+1:s=h}while(o>>1;e(u[h],c)<=0?o=h+1:s=h}while(oo&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:f}}function mn(){return 0}function ln(n){return n===null?NaN:+n}const sn=_(F),dn=sn.right;_(ln).center;const gn=Math.sqrt(50),yn=Math.sqrt(10),Mn=Math.sqrt(2);function R(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),f=r/Math.pow(10,i),a=f>=gn?10:f>=yn?5:f>=Mn?2:1;let u,c,o;return i<0?(o=Math.pow(10,-i)/a,u=Math.round(n*o),c=Math.round(t*o),u/ot&&--c,o=-o):(o=Math.pow(10,i)*a,u=Math.round(n/o),c=Math.round(t/o),u*ot&&--c),c0))return[];if(n===t)return[n];const r=t=i))return[];const u=f-i+1,c=new Array(u);if(r)if(a<0)for(let o=0;o=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=E(Math.abs(n)),n?n[1]:NaN}function jn(n,t){return function(e,r){for(var i=e.length,f=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),f.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return f.reverse().join(t)}}function Pn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var zn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=zn.exec(n)))throw new Error("invalid format: "+n);var t;return new B({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}D.prototype=B.prototype;function B(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}B.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $n(n){n:for(var t=n.length,e=1,r=-1,i;e0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var nn;function Fn(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(nn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return f===a?r:f>a?r+new Array(f-a+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,t+f-1))[0]}function Z(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const H={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:Sn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>Z(n*100,t),r:Z,s:Fn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function J(n){return n}var K=Array.prototype.map,Q=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Rn(n){var t=n.grouping===void 0||n.thousands===void 0?J:jn(K.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?J:Pn(K.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function o(h){h=D(h);var l=h.fill,p=h.align,y=h.sign,b=h.symbol,k=h.zero,S=h.width,T=h.comma,w=h.precision,G=h.trim,d=h.type;d==="n"?(T=!0,d="g"):H[d]||(w===void 0&&(w=12),G=!0,d="g"),(k||l==="0"&&p==="=")&&(k=!0,l="0",p="=");var en=b==="$"?e:b==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",on=b==="$"?r:/[%p]/.test(d)?a:"",O=H[d],an=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function V(m){var N=en,g=on,x,X,j;if(d==="c")g=O(m)+g,m="";else{m=+m;var P=m<0||1/m<0;if(m=isNaN(m)?c:O(Math.abs(m),w),G&&(m=$n(m)),P&&+m==0&&y!=="+"&&(P=!1),N=(P?y==="("?y:u:y==="-"||y==="("?"":y)+N,g=(d==="s"?Q[8+nn/3]:"")+g+(P&&y==="("?")":""),an){for(x=-1,X=m.length;++xj||j>57){g=(j===46?i+m.slice(x+1):m.slice(x))+g,m=m.slice(0,x);break}}}T&&!k&&(m=t(m,1/0));var z=N.length+m.length+g.length,M=z>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return V.toString=function(){return h+""},V}function s(h,l){var p=o((h=D(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(v(l)/3)))*3,b=Math.pow(10,-y),k=Q[8+y/3];return function(S){return p(b*S)+k}}return{format:o,formatPrefix:s}}var $,tn,rn;En({thousands:",",grouping:[3],currency:["$",""]});function En(n){return $=Rn(n),tn=$.format,rn=$.formatPrefix,$}function Dn(n){return Math.max(0,-v(Math.abs(n)))}function Tn(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function In(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function Ln(n){return function(){return n}}function qn(n){return+n}var W=[0,1];function A(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:Ln(isNaN(t)?NaN:.5)}function Cn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Bn(n,t,e){var r=n[0],i=n[1],f=t[0],a=t[1];return i2?Gn:Bn,c=o=null,h}function h(l){return l==null||isNaN(l=+l)?f:(c||(c=u(n.map(r),t,e)))(r(a(l)))}return h.invert=function(l){return a(i((o||(o=u(t,n.map(r),I)))(l)))},h.domain=function(l){return arguments.length?(n=Array.from(l,qn),s()):n.slice()},h.range=function(l){return arguments.length?(t=Array.from(l),s()):t.slice()},h.rangeRound=function(l){return t=Array.from(l),e=bn,s()},h.clamp=function(l){return arguments.length?(a=l?!0:A,s()):a!==A},h.interpolate=function(l){return arguments.length?(e=l,s()):e},h.unknown=function(l){return arguments.length?(f=l,h):f},function(l,p){return r=l,i=p,s()}}function Xn(){return Vn()(A,A)}function Un(n,t,e,r){var i=wn(n,t,e),f;switch(r=D(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=Tn(i,a))&&(r.precision=f),rn(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=In(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=Dn(i))&&(r.precision=f-(r.type==="%")*2);break}}return tn(r)}function Yn(n){var t=n.domain;return n.ticks=function(e){var r=t();return pn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var i=t();return Un(i[0],i[i.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,a=r[i],u=r[f],c,o,s=10;for(u0;){if(o=L(a,u,e),o===c)return r[i]=a,r[f]=u,t(r);if(o>0)a=Math.floor(a/o)*o,u=Math.ceil(u/o)*o;else if(o<0)a=Math.ceil(a*o)/o,u=Math.floor(u*o)/o;else break;c=o}return n},n}function Zn(){var n=Xn();return n.copy=function(){return On(n,Zn())},cn.apply(n,arguments),Yn(n)}export{On as a,_ as b,Xn as c,Zn as l,wn as t}; diff --git a/assets/chunks/merge_strategy_develop_to_feature_rebase.drawio.Z3kz7T7n.js b/assets/chunks/merge_strategy_develop_to_feature_rebase.drawio.Z3kz7T7n.js new file mode 100644 index 00000000..6616c622 --- /dev/null +++ b/assets/chunks/merge_strategy_develop_to_feature_rebase.drawio.Z3kz7T7n.js @@ -0,0 +1 @@ +const e="/coding-standards/assets/merge_strategy_develop_to_feature_rebase.drawio.Db0KPnu1.png";export{e as _}; diff --git a/assets/chunks/merge_strategy_feature_to_develop_squash_and_merge.drawio.BAaxnYY7.js b/assets/chunks/merge_strategy_feature_to_develop_squash_and_merge.drawio.BAaxnYY7.js new file mode 100644 index 00000000..a284fbda --- /dev/null +++ b/assets/chunks/merge_strategy_feature_to_develop_squash_and_merge.drawio.BAaxnYY7.js @@ -0,0 +1 @@ +const e="/coding-standards/assets/merge_strategy_feature_to_develop_squash_and_merge.drawio.DNfqg4i8.png";export{e as _}; diff --git a/assets/chunks/mindmap-definition-GWI6TPTV.D8wY2Trv.js b/assets/chunks/mindmap-definition-GWI6TPTV.D8wY2Trv.js new file mode 100644 index 00000000..a9deef15 --- /dev/null +++ b/assets/chunks/mindmap-definition-GWI6TPTV.D8wY2Trv.js @@ -0,0 +1,95 @@ +import{aG as at,aH as Nt,_ as S,l as z,j as Dt,al as mt,a5 as Ot,d as ot,I as At,ac as It,D as tt,i as et,ad as Ct,ae as Rt,af as xt}from"../app.CXGmg8Jv.js";import{c as pt}from"./cytoscape.esm.FpOb6hff.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";var dt={exports:{}},it={exports:{}},nt={exports:{}},ut;function Mt(){return ut||(ut=1,function(I,w){(function(m,y){I.exports=y()})(at,function(){return function(f){var m={};function y(r){if(m[r])return m[r].exports;var t=m[r]={i:r,l:!1,exports:{}};return f[r].call(t.exports,t,t.exports,y),t.l=!0,t.exports}return y.m=f,y.c=m,y.i=function(r){return r},y.d=function(r,t,e){y.o(r,t)||Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:e})},y.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return y.d(t,"a",t),t},y.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},y.p="",y(y.s=26)}([function(f,m,y){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,f.exports=r},function(f,m,y){var r=y(2),t=y(8),e=y(9);function i(g,a,v){r.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=g,this.target=a}i.prototype=Object.create(r.prototype);for(var o in r)i[o]=r[o];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,a){for(var v=this.getOtherEnd(g),n=a.getGraphManager().getRoot();;){if(v.getOwner()==a)return v;if(v.getOwner()==n)break;v=v.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=t.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},f.exports=i},function(f,m,y){function r(t){this.vGraphObject=t}f.exports=r},function(f,m,y){var r=y(2),t=y(10),e=y(13),i=y(0),o=y(16),g=y(4);function a(n,c,l,E){l==null&&E==null&&(E=c),r.call(this,E),n.graphManager!=null&&(n=n.graphManager),this.estimatedSize=t.MIN_VALUE,this.inclusionTreeDepth=t.MAX_VALUE,this.vGraphObject=E,this.edges=[],this.graphManager=n,l!=null&&c!=null?this.rect=new e(c.x,c.y,l.width,l.height):this.rect=new e}a.prototype=Object.create(r.prototype);for(var v in r)a[v]=r[v];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(n){this.rect.width=n},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(n){this.rect.height=n},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(n,c){this.rect.x=n.x,this.rect.y=n.y,this.rect.width=c.width,this.rect.height=c.height},a.prototype.setCenter=function(n,c){this.rect.x=n-this.rect.width/2,this.rect.y=c-this.rect.height/2},a.prototype.setLocation=function(n,c){this.rect.x=n,this.rect.y=c},a.prototype.moveBy=function(n,c){this.rect.x+=n,this.rect.y+=c},a.prototype.getEdgeListToNode=function(n){var c=[],l=this;return l.edges.forEach(function(E){if(E.target==n){if(E.source!=l)throw"Incorrect edge source!";c.push(E)}}),c},a.prototype.getEdgesBetween=function(n){var c=[],l=this;return l.edges.forEach(function(E){if(!(E.source==l||E.target==l))throw"Incorrect edge source and/or target";(E.target==n||E.source==n)&&c.push(E)}),c},a.prototype.getNeighborsList=function(){var n=new Set,c=this;return c.edges.forEach(function(l){if(l.source==c)n.add(l.target);else{if(l.target!=c)throw"Incorrect incidency!";n.add(l.source)}}),n},a.prototype.withChildren=function(){var n=new Set,c,l;if(n.add(this),this.child!=null)for(var E=this.child.getNodes(),T=0;Tc&&(this.rect.x-=(this.labelWidth-c)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==t.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(n){var c=this.rect.x;c>i.WORLD_BOUNDARY?c=i.WORLD_BOUNDARY:c<-i.WORLD_BOUNDARY&&(c=-i.WORLD_BOUNDARY);var l=this.rect.y;l>i.WORLD_BOUNDARY?l=i.WORLD_BOUNDARY:l<-i.WORLD_BOUNDARY&&(l=-i.WORLD_BOUNDARY);var E=new g(c,l),T=n.inverseTransformPoint(E);this.setLocation(T.x,T.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},f.exports=a},function(f,m,y){function r(t,e){t==null&&e==null?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},f.exports=r},function(f,m,y){var r=y(2),t=y(10),e=y(0),i=y(6),o=y(3),g=y(1),a=y(13),v=y(12),n=y(11);function c(E,T,D){r.call(this,D),this.estimatedSize=t.MIN_VALUE,this.margin=e.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=E,T!=null&&T instanceof i?this.graphManager=T:T!=null&&T instanceof Layout&&(this.graphManager=T.graphManager)}c.prototype=Object.create(r.prototype);for(var l in r)c[l]=r[l];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(E,T,D){if(T==null&&D==null){var L=E;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(L)>-1)throw"Node already in graph!";return L.owner=this,this.getNodes().push(L),L}else{var O=E;if(!(this.getNodes().indexOf(T)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(T.owner==D.owner&&T.owner==this))throw"Both owners must be this graph!";return T.owner!=D.owner?null:(O.source=T,O.target=D,O.isInterGraph=!1,this.getEdges().push(O),T.edges.push(O),D!=T&&D.edges.push(O),O)}},c.prototype.remove=function(E){var T=E;if(E instanceof o){if(T==null)throw"Node is null!";if(!(T.owner!=null&&T.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=T.edges.slice(),L,O=D.length,d=0;d-1&&h>-1))throw"Source and/or target doesn't know this edge!";L.source.edges.splice(s,1),L.target!=L.source&&L.target.edges.splice(h,1);var N=L.source.owner.getEdges().indexOf(L);if(N==-1)throw"Not in owner's edge list!";L.source.owner.getEdges().splice(N,1)}},c.prototype.updateLeftTop=function(){for(var E=t.MAX_VALUE,T=t.MAX_VALUE,D,L,O,d=this.getNodes(),N=d.length,s=0;sD&&(E=D),T>L&&(T=L)}return E==t.MAX_VALUE?null:(d[0].getParent().paddingLeft!=null?O=d[0].getParent().paddingLeft:O=this.margin,this.left=T-O,this.top=E-O,new v(this.left,this.top))},c.prototype.updateBounds=function(E){for(var T=t.MAX_VALUE,D=-t.MAX_VALUE,L=t.MAX_VALUE,O=-t.MAX_VALUE,d,N,s,h,u,p=this.nodes,A=p.length,C=0;Cd&&(T=d),Ds&&(L=s),Od&&(T=d),Ds&&(L=s),O=this.nodes.length){var A=0;D.forEach(function(C){C.owner==E&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},f.exports=c},function(f,m,y){var r,t=y(1);function e(i){r=y(5),this.layout=i,this.graphs=[],this.edges=[]}e.prototype.addRoot=function(){var i=this.layout.newGraph(),o=this.layout.newNode(null),g=this.add(i,o);return this.setRootGraph(g),this.rootGraph},e.prototype.add=function(i,o,g,a,v){if(g==null&&a==null&&v==null){if(i==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return i.parent=o,o.child=i,i}else{v=g,a=o,g=i;var n=a.getOwner(),c=v.getOwner();if(!(n!=null&&n.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(c!=null&&c.getGraphManager()==this))throw"Target not in this graph mgr!";if(n==c)return g.isInterGraph=!1,n.add(g,a,v);if(g.isInterGraph=!0,g.source=a,g.target=v,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},e.prototype.remove=function(i){if(i instanceof r){var o=i;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(o.getEdges());for(var a,v=g.length,n=0;n=i.getRight()?o[0]+=Math.min(i.getX()-e.getX(),e.getRight()-i.getRight()):i.getX()<=e.getX()&&i.getRight()>=e.getRight()&&(o[0]+=Math.min(e.getX()-i.getX(),i.getRight()-e.getRight())),e.getY()<=i.getY()&&e.getBottom()>=i.getBottom()?o[1]+=Math.min(i.getY()-e.getY(),e.getBottom()-i.getBottom()):i.getY()<=e.getY()&&i.getBottom()>=e.getBottom()&&(o[1]+=Math.min(e.getY()-i.getY(),i.getBottom()-e.getBottom()));var v=Math.abs((i.getCenterY()-e.getCenterY())/(i.getCenterX()-e.getCenterX()));i.getCenterY()===e.getCenterY()&&i.getCenterX()===e.getCenterX()&&(v=1);var n=v*o[0],c=o[1]/v;o[0]n)return o[0]=g,o[1]=l,o[2]=v,o[3]=p,!1;if(av)return o[0]=c,o[1]=a,o[2]=h,o[3]=n,!1;if(gv?(o[0]=T,o[1]=D,x=!0):(o[0]=E,o[1]=l,x=!0):U===M&&(g>v?(o[0]=c,o[1]=l,x=!0):(o[0]=L,o[1]=D,x=!0)),-X===M?v>g?(o[2]=u,o[3]=p,_=!0):(o[2]=h,o[3]=s,_=!0):X===M&&(v>g?(o[2]=N,o[3]=s,_=!0):(o[2]=A,o[3]=p,_=!0)),x&&_)return!1;if(g>v?a>n?(G=this.getCardinalDirection(U,M,4),F=this.getCardinalDirection(X,M,2)):(G=this.getCardinalDirection(-U,M,3),F=this.getCardinalDirection(-X,M,1)):a>n?(G=this.getCardinalDirection(-U,M,1),F=this.getCardinalDirection(-X,M,3)):(G=this.getCardinalDirection(U,M,2),F=this.getCardinalDirection(X,M,4)),!x)switch(G){case 1:Y=l,b=g+-d/M,o[0]=b,o[1]=Y;break;case 2:b=L,Y=a+O*M,o[0]=b,o[1]=Y;break;case 3:Y=D,b=g+d/M,o[0]=b,o[1]=Y;break;case 4:b=T,Y=a+-O*M,o[0]=b,o[1]=Y;break}if(!_)switch(F){case 1:H=s,k=v+-R/M,o[2]=k,o[3]=H;break;case 2:k=A,H=n+C*M,o[2]=k,o[3]=H;break;case 3:H=p,k=v+R/M,o[2]=k,o[3]=H;break;case 4:k=u,H=n+-C*M,o[2]=k,o[3]=H;break}}return!1},t.getCardinalDirection=function(e,i,o){return e>i?o:1+o%4},t.getIntersection=function(e,i,o,g){if(g==null)return this.getIntersection2(e,i,o);var a=e.x,v=e.y,n=i.x,c=i.y,l=o.x,E=o.y,T=g.x,D=g.y,L=void 0,O=void 0,d=void 0,N=void 0,s=void 0,h=void 0,u=void 0,p=void 0,A=void 0;return d=c-v,s=a-n,u=n*v-a*c,N=D-E,h=l-T,p=T*E-l*D,A=d*h-N*s,A===0?null:(L=(s*p-h*u)/A,O=(N*u-d*p)/A,new r(L,O))},t.angleOfVector=function(e,i,o,g){var a=void 0;return e!==o?(a=Math.atan((g-i)/(o-e)),o0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},f.exports=r},function(f,m,y){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,f.exports=r},function(f,m,y){var r=function(){function a(v,n){for(var c=0;c"u"?"undefined":r(e);return e==null||i!="object"&&i!="function"},f.exports=t},function(f,m,y){function r(l){if(Array.isArray(l)){for(var E=0,T=Array(l.length);E0&&E;){for(d.push(s[0]);d.length>0&&E;){var h=d[0];d.splice(0,1),O.add(h);for(var u=h.getEdges(),L=0;L-1&&s.splice(R,1)}O=new Set,N=new Map}}return l},c.prototype.createDummyNodesForBendpoints=function(l){for(var E=[],T=l.source,D=this.graphManager.calcLowestCommonAncestor(l.source,l.target),L=0;L0){for(var D=this.edgeToDummyNodes.get(T),L=0;L=0&&E.splice(p,1);var A=N.getNeighborsList();A.forEach(function(x){if(T.indexOf(x)<0){var _=D.get(x),U=_-1;U==1&&h.push(x),D.set(x,U)}})}T=T.concat(h),(E.length==1||E.length==2)&&(L=!0,O=E[0])}return O},c.prototype.setGraphManager=function(l){this.graphManager=l},f.exports=c},function(f,m,y){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},f.exports=r},function(f,m,y){var r=y(4);function t(e,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t.prototype.getWorldOrgX=function(){return this.lworldOrgX},t.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},t.prototype.getWorldOrgY=function(){return this.lworldOrgY},t.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},t.prototype.getWorldExtX=function(){return this.lworldExtX},t.prototype.setWorldExtX=function(e){this.lworldExtX=e},t.prototype.getWorldExtY=function(){return this.lworldExtY},t.prototype.setWorldExtY=function(e){this.lworldExtY=e},t.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},t.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},t.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},t.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},t.prototype.getDeviceExtX=function(){return this.ldeviceExtX},t.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},t.prototype.getDeviceExtY=function(){return this.ldeviceExtY},t.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},t.prototype.transformX=function(e){var i=0,o=this.lworldExtX;return o!=0&&(i=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/o),i},t.prototype.transformY=function(e){var i=0,o=this.lworldExtY;return o!=0&&(i=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/o),i},t.prototype.inverseTransformX=function(e){var i=0,o=this.ldeviceExtX;return o!=0&&(i=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/o),i},t.prototype.inverseTransformY=function(e){var i=0,o=this.ldeviceExtY;return o!=0&&(i=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/o),i},t.prototype.inverseTransformPoint=function(e){var i=new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y));return i},f.exports=t},function(f,m,y){function r(n){if(Array.isArray(n)){for(var c=0,l=Array(n.length);ce.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*e.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-e.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT_INCREMENTAL):(n>e.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(e.COOLING_ADAPTATION_FACTOR,1-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*(1-e.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var n=this.getAllEdges(),c,l=0;l0&&arguments[0]!==void 0?arguments[0]:!0,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,E,T,D,L=this.getAllNodes(),O;if(this.useFRGridVariant)for(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&n&&this.updateGrid(),O=new Set,l=0;ld||O>d)&&(n.gravitationForceX=-this.gravityConstant*T,n.gravitationForceY=-this.gravityConstant*D)):(d=c.getEstimatedSize()*this.compoundGravityRangeFactor,(L>d||O>d)&&(n.gravitationForceX=-this.gravityConstant*T*this.compoundGravityConstant,n.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},a.prototype.isConverged=function(){var n,c=!1;return this.totalIterations>this.maxIterations/3&&(c=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),n=this.totalDisplacement=L.length||d>=L[0].length)){for(var N=0;Na}}]),o}();f.exports=i},function(f,m,y){var r=function(){function i(o,g){for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;t(this,i),this.sequence1=o,this.sequence2=g,this.match_score=a,this.mismatch_penalty=v,this.gap_penalty=n,this.iMax=o.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var c=0;c=0;o--){var g=this.listeners[o];g.event===e&&g.callback===i&&this.listeners.splice(o,1)}},t.emit=function(e,i){for(var o=0;og.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*e.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,a){for(var v=this.getChild().getNodes(),n,c=0;c0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(p){return h.has(p)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},d.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%v.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),h=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(h),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},d.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),h={},u=0;u1){var x;for(x=0;xp&&(p=Math.floor(R.y)),C=Math.floor(R.x+a.DEFAULT_COMPONENT_SEPERATION)}this.transform(new l(n.WORLD_CENTER_X-R.x/2,n.WORLD_CENTER_Y-R.y/2))},d.radialLayout=function(s,h,u){var p=Math.max(this.maxDiagonalInTree(s),a.DEFAULT_RADIAL_SEPARATION);d.branchRadialLayout(h,null,0,359,0,p);var A=L.calculateBounds(s),C=new O;C.setDeviceOrgX(A.getMinX()),C.setDeviceOrgY(A.getMinY()),C.setWorldOrgX(u.x),C.setWorldOrgY(u.y);for(var R=0;R1;){var H=k[0];k.splice(0,1);var P=M.indexOf(H);P>=0&&M.splice(P,1),b--,G--}h!=null?Y=(M.indexOf(k[0])+1)%b:Y=0;for(var B=Math.abs(p-u)/G,$=Y;F!=G;$=++$%b){var K=M[$].getOtherEnd(s);if(K!=h){var Q=(u+F*B)%360,J=(Q+B)%360;d.branchRadialLayout(K,s,Q,J,A+C,C),F++}}},d.maxDiagonalInTree=function(s){for(var h=T.MIN_VALUE,u=0;uh&&(h=A)}return h},d.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},d.prototype.groupZeroDegreeMembers=function(){var s=this,h={};this.memberGroups={},this.idToDummyNode={};for(var u=[],p=this.graphManager.getAllNodes(),A=0;A"u"&&(h[x]=[]),h[x]=h[x].concat(C)}Object.keys(h).forEach(function(_){if(h[_].length>1){var U="DummyCompound_"+_;s.memberGroups[U]=h[_];var X=h[_][0].getParent(),M=new o(s.graphManager);M.id=U,M.paddingLeft=X.paddingLeft||0,M.paddingRight=X.paddingRight||0,M.paddingBottom=X.paddingBottom||0,M.paddingTop=X.paddingTop||0,s.idToDummyNode[U]=M;var G=s.getGraphManager().add(s.newGraph(),M),F=X.getChild();F.add(M);for(var b=0;b=0;s--){var h=this.compoundOrder[s],u=h.id,p=h.paddingLeft,A=h.paddingTop;this.adjustLocations(this.tiledMemberPack[u],h.rect.x,h.rect.y,p,A)}},d.prototype.repopulateZeroDegreeMembers=function(){var s=this,h=this.tiledZeroDegreePack;Object.keys(h).forEach(function(u){var p=s.idToDummyNode[u],A=p.paddingLeft,C=p.paddingTop;s.adjustLocations(h[u],p.rect.x,p.rect.y,A,C)})},d.prototype.getToBeTiled=function(s){var h=s.id;if(this.toBeTiled[h]!=null)return this.toBeTiled[h];var u=s.getChild();if(u==null)return this.toBeTiled[h]=!1,!1;for(var p=u.getNodes(),A=0;A0)return this.toBeTiled[h]=!1,!1;if(C.getChild()==null){this.toBeTiled[C.id]=!1;continue}if(!this.getToBeTiled(C))return this.toBeTiled[h]=!1,!1}return this.toBeTiled[h]=!0,!0},d.prototype.getNodeDegree=function(s){s.id;for(var h=s.getEdges(),u=0,p=0;p_&&(_=X.rect.height)}u+=_+s.verticalPadding}},d.prototype.tileCompoundMembers=function(s,h){var u=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(p){var A=h[p];u.tiledMemberPack[p]=u.tileNodes(s[p],A.paddingLeft+A.paddingRight),A.rect.width=u.tiledMemberPack[p].width,A.rect.height=u.tiledMemberPack[p].height})},d.prototype.tileNodes=function(s,h){var u=a.TILING_PADDING_VERTICAL,p=a.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:h,verticalPadding:u,horizontalPadding:p};s.sort(function(x,_){return x.rect.width*x.rect.height>_.rect.width*_.rect.height?-1:x.rect.width*x.rect.height<_.rect.width*_.rect.height?1:0});for(var C=0;C0&&(R+=s.horizontalPadding),s.rowWidth[u]=R,s.width0&&(x+=s.verticalPadding);var _=0;x>s.rowHeight[u]&&(_=s.rowHeight[u],s.rowHeight[u]=x,_=s.rowHeight[u]-_),s.height+=_,s.rows[u].push(h)},d.prototype.getShortestRowIndex=function(s){for(var h=-1,u=Number.MAX_VALUE,p=0;pu&&(h=p,u=s.rowWidth[p]);return h},d.prototype.canAddHorizontal=function(s,h,u){var p=this.getShortestRowIndex(s);if(p<0)return!0;var A=s.rowWidth[p];if(A+s.horizontalPadding+h<=s.width)return!0;var C=0;s.rowHeight[p]0&&(C=u+s.verticalPadding-s.rowHeight[p]);var R;s.width-A>=h+s.horizontalPadding?R=(s.height+C)/(A+h+s.horizontalPadding):R=(s.height+C)/s.width,C=u+s.verticalPadding;var x;return s.widthC&&h!=u){p.splice(-1,1),s.rows[u].push(A),s.rowWidth[h]=s.rowWidth[h]-C,s.rowWidth[u]=s.rowWidth[u]+C,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var R=Number.MIN_VALUE,x=0;xR&&(R=p[x].height);h>0&&(R+=s.verticalPadding);var _=s.rowHeight[h]+s.rowHeight[u];s.rowHeight[h]=R,s.rowHeight[u]0)for(var F=A;F<=C;F++)G[0]+=this.grid[F][R-1].length+this.grid[F][R].length-1;if(C0)for(var F=R;F<=x;F++)G[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var b=T.MAX_VALUE,Y,k,H=0;H0){var x;x=O.getGraphManager().add(O.newGraph(),u),this.processChildrenList(x,h,O)}}},l.prototype.stop=function(){return this.stopped=!0,this};var T=function(L){L("layout","cose-bilkent",l)};typeof cytoscape<"u"&&T(cytoscape),m.exports=T}])})})(dt);var St=dt.exports;const Gt=Nt(St);var st=function(){var I=S(function(O,d,N,s){for(N=N||{},s=O.length;s--;N[O[s]]=d);return N},"o"),w=[1,4],f=[1,13],m=[1,12],y=[1,15],r=[1,16],t=[1,20],e=[1,19],i=[6,7,8],o=[1,26],g=[1,24],a=[1,25],v=[6,7,11],n=[1,6,13,15,16,19,22],c=[1,33],l=[1,34],E=[1,6,7,11,13,15,16,19,22],T={trace:S(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:S(function(d,N,s,h,u,p,A){var C=p.length-1;switch(u){case 6:case 7:return h;case 8:h.getLogger().trace("Stop NL ");break;case 9:h.getLogger().trace("Stop EOF ");break;case 11:h.getLogger().trace("Stop NL2 ");break;case 12:h.getLogger().trace("Stop EOF2 ");break;case 15:h.getLogger().info("Node: ",p[C].id),h.addNode(p[C-1].length,p[C].id,p[C].descr,p[C].type);break;case 16:h.getLogger().trace("Icon: ",p[C]),h.decorateNode({icon:p[C]});break;case 17:case 21:h.decorateNode({class:p[C]});break;case 18:h.getLogger().trace("SPACELIST");break;case 19:h.getLogger().trace("Node: ",p[C].id),h.addNode(0,p[C].id,p[C].descr,p[C].type);break;case 20:h.decorateNode({icon:p[C]});break;case 25:h.getLogger().trace("node found ..",p[C-2]),this.$={id:p[C-1],descr:p[C-1],type:h.getType(p[C-2],p[C])};break;case 26:this.$={id:p[C],descr:p[C],type:h.nodeType.DEFAULT};break;case 27:h.getLogger().trace("node found ..",p[C-3]),this.$={id:p[C-3],descr:p[C-1],type:h.getType(p[C-2],p[C])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:w},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:w},{6:f,7:[1,10],9:9,12:11,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},I(i,[2,3]),{1:[2,2]},I(i,[2,4]),I(i,[2,5]),{1:[2,6],6:f,12:21,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},{6:f,9:22,12:11,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},{6:o,7:g,10:23,11:a},I(v,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:t,22:e}),I(v,[2,18]),I(v,[2,19]),I(v,[2,20]),I(v,[2,21]),I(v,[2,23]),I(v,[2,24]),I(v,[2,26],{19:[1,30]}),{20:[1,31]},{6:o,7:g,10:32,11:a},{1:[2,7],6:f,12:21,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},I(n,[2,14],{7:c,11:l}),I(E,[2,8]),I(E,[2,9]),I(E,[2,10]),I(v,[2,15]),I(v,[2,16]),I(v,[2,17]),{20:[1,35]},{21:[1,36]},I(n,[2,13],{7:c,11:l}),I(E,[2,11]),I(E,[2,12]),{21:[1,37]},I(v,[2,25]),I(v,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:S(function(d,N){if(N.recoverable)this.trace(d);else{var s=new Error(d);throw s.hash=N,s}},"parseError"),parse:S(function(d){var N=this,s=[0],h=[],u=[null],p=[],A=this.table,C="",R=0,x=0,_=2,U=1,X=p.slice.call(arguments,1),M=Object.create(this.lexer),G={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(G.yy[F]=this.yy[F]);M.setInput(d,G.yy),G.yy.lexer=M,G.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var b=M.yylloc;p.push(b);var Y=M.options&&M.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function k(V){s.length=s.length-2*V,u.length=u.length-V,p.length=p.length-V}S(k,"popStack");function H(){var V;return V=h.pop()||M.lex()||U,typeof V!="number"&&(V instanceof Array&&(h=V,V=h.pop()),V=N.symbols_[V]||V),V}S(H,"lex");for(var P,B,$,K,Q={},J,j,gt,q;;){if(B=s[s.length-1],this.defaultActions[B]?$=this.defaultActions[B]:((P===null||typeof P>"u")&&(P=H()),$=A[B]&&A[B][P]),typeof $>"u"||!$.length||!$[0]){var rt="";q=[];for(J in A[B])this.terminals_[J]&&J>_&&q.push("'"+this.terminals_[J]+"'");M.showPosition?rt="Parse error on line "+(R+1)+`: +`+M.showPosition()+` +Expecting `+q.join(", ")+", got '"+(this.terminals_[P]||P)+"'":rt="Parse error on line "+(R+1)+": Unexpected "+(P==U?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(rt,{text:M.match,token:this.terminals_[P]||P,line:M.yylineno,loc:b,expected:q})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+P);switch($[0]){case 1:s.push(P),u.push(M.yytext),p.push(M.yylloc),s.push($[1]),P=null,x=M.yyleng,C=M.yytext,R=M.yylineno,b=M.yylloc;break;case 2:if(j=this.productions_[$[1]][1],Q.$=u[u.length-j],Q._$={first_line:p[p.length-(j||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(j||1)].first_column,last_column:p[p.length-1].last_column},Y&&(Q._$.range=[p[p.length-(j||1)].range[0],p[p.length-1].range[1]]),K=this.performAction.apply(Q,[C,x,R,G.yy,$[1],u,p].concat(X)),typeof K<"u")return K;j&&(s=s.slice(0,-1*j*2),u=u.slice(0,-1*j),p=p.slice(0,-1*j)),s.push(this.productions_[$[1]][0]),u.push(Q.$),p.push(Q._$),gt=A[s[s.length-2]][s[s.length-1]],s.push(gt);break;case 3:return!0}}return!0},"parse")},D=function(){var O={EOF:1,parseError:S(function(N,s){if(this.yy.parser)this.yy.parser.parseError(N,s);else throw new Error(N)},"parseError"),setInput:S(function(d,N){return this.yy=N||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:S(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var N=d.match(/(?:\r\n?|\n).*/g);return N?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:S(function(d){var N=d.length,s=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-N),this.offset-=N;var h=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===h.length?this.yylloc.first_column:0)+h[h.length-s.length].length-s[0].length:this.yylloc.first_column-N},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-N]),this.yyleng=this.yytext.length,this},"unput"),more:S(function(){return this._more=!0,this},"more"),reject:S(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:S(function(d){this.unput(this.match.slice(d))},"less"),pastInput:S(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:S(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:S(function(){var d=this.pastInput(),N=new Array(d.length+1).join("-");return d+this.upcomingInput()+` +`+N+"^"},"showPosition"),test_match:S(function(d,N){var s,h,u;if(this.options.backtrack_lexer&&(u={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(u.yylloc.range=this.yylloc.range.slice(0))),h=d[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+d[0].length},this.yytext+=d[0],this.match+=d[0],this.matches=d,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(d[0].length),this.matched+=d[0],s=this.performAction.call(this,this.yy,this,N,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var p in u)this[p]=u[p];return!1}return!1},"test_match"),next:S(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var d,N,s,h;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),p=0;pN[0].length)){if(N=s,h=p,this.options.backtrack_lexer){if(d=this.test_match(s,u[p]),d!==!1)return d;if(this._backtrack){N=!1;continue}else return!1}else if(!this.options.flex)break}return N?(d=this.test_match(N,u[h]),d!==!1?d:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:S(function(){var N=this.next();return N||this.lex()},"lex"),begin:S(function(N){this.conditionStack.push(N)},"begin"),popState:S(function(){var N=this.conditionStack.length-1;return N>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:S(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:S(function(N){return N=this.conditionStack.length-1-Math.abs(N||0),N>=0?this.conditionStack[N]:"INITIAL"},"topState"),pushState:S(function(N){this.begin(N)},"pushState"),stateStackSize:S(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:S(function(N,s,h,u){switch(h){case 0:return N.getLogger().trace("Found comment",s.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:N.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return N.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:N.getLogger().trace("end icon"),this.popState();break;case 10:return N.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return N.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return N.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return N.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:N.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return N.getLogger().trace("description:",s.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),N.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),N.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),N.getLogger().trace("node end ...",s.yytext),"NODE_DEND";case 30:return this.popState(),N.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),N.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),N.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),N.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),N.getLogger().trace("node end (("),"NODE_DEND";case 35:return N.getLogger().trace("Long description:",s.yytext),20;case 36:return N.getLogger().trace("Long description:",s.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return O}();T.lexer=D;function L(){this.yy={}}return S(L,"Parser"),L.prototype=T,T.Parser=L,new L}();st.parser=st;var _t=st,Z=[],vt=0,ht={},Ft=S(()=>{Z=[],vt=0,ht={}},"clear"),bt=S(function(I){for(let w=Z.length-1;w>=0;w--)if(Z[w].levelZ.length>0?Z[0]:null,"getMindmap"),Pt=S((I,w,f,m)=>{var i,o;z.info("addNode",I,w,f,m);const y=ot();let r=((i=y.mindmap)==null?void 0:i.padding)??tt.mindmap.padding;switch(m){case W.ROUNDED_RECT:case W.RECT:case W.HEXAGON:r*=2}const t={id:vt++,nodeId:et(w,y),level:I,descr:et(f,y),type:m,children:[],width:((o=y.mindmap)==null?void 0:o.maxNodeWidth)??tt.mindmap.maxNodeWidth,padding:r},e=bt(I);if(e)e.children.push(t),Z.push(t);else if(Z.length===0)Z.push(t);else throw new Error('There can be only one root. No parent could be found for ("'+t.descr+'")')},"addNode"),W={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Yt=S((I,w)=>{switch(z.debug("In get type",I,w),I){case"[":return W.RECT;case"(":return w===")"?W.ROUNDED_RECT:W.CLOUD;case"((":return W.CIRCLE;case")":return W.CLOUD;case"))":return W.BANG;case"{{":return W.HEXAGON;default:return W.DEFAULT}},"getType"),Xt=S((I,w)=>{ht[I]=w},"setElementForId"),kt=S(I=>{if(!I)return;const w=ot(),f=Z[Z.length-1];I.icon&&(f.icon=et(I.icon,w)),I.class&&(f.class=et(I.class,w))},"decorateNode"),Ht=S(I=>{switch(I){case W.DEFAULT:return"no-border";case W.RECT:return"rect";case W.ROUNDED_RECT:return"rounded-rect";case W.CIRCLE:return"circle";case W.CLOUD:return"cloud";case W.BANG:return"bang";case W.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),$t=S(()=>z,"getLogger"),Wt=S(I=>ht[I],"getElementById"),Bt={clear:Ft,addNode:Pt,getMindmap:Ut,nodeType:W,getType:Yt,setElementForId:Xt,decorateNode:kt,type2Str:Ht,getLogger:$t,getElementById:Wt},Vt=Bt,Zt=12,Qt=S(function(I,w,f,m){w.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("d",`M0 ${f.height-5} v${-f.height+2*5} q0,-5 5,-5 h${f.width-2*5} q5,0 5,5 v${f.height-5} H0 Z`),w.append("line").attr("class","node-line-"+m).attr("x1",0).attr("y1",f.height).attr("x2",f.width).attr("y2",f.height)},"defaultBkg"),jt=S(function(I,w,f){w.append("rect").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("height",f.height).attr("width",f.width)},"rectBkg"),zt=S(function(I,w,f){const m=f.width,y=f.height,r=.15*m,t=.25*m,e=.35*m,i=.2*m;w.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("d",`M0 0 a${r},${r} 0 0,1 ${m*.25},${-1*m*.1} + a${e},${e} 1 0,1 ${m*.4},${-1*m*.1} + a${t},${t} 1 0,1 ${m*.35},${1*m*.2} + + a${r},${r} 1 0,1 ${m*.15},${1*y*.35} + a${i},${i} 1 0,1 ${-1*m*.15},${1*y*.65} + + a${t},${r} 1 0,1 ${-1*m*.25},${m*.15} + a${e},${e} 1 0,1 ${-1*m*.5},0 + a${r},${r} 1 0,1 ${-1*m*.25},${-1*m*.15} + + a${r},${r} 1 0,1 ${-1*m*.1},${-1*y*.35} + a${i},${i} 1 0,1 ${m*.1},${-1*y*.65} + + H0 V0 Z`)},"cloudBkg"),Kt=S(function(I,w,f){const m=f.width,y=f.height,r=.15*m;w.append("path").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("d",`M0 0 a${r},${r} 1 0,0 ${m*.25},${-1*y*.1} + a${r},${r} 1 0,0 ${m*.25},0 + a${r},${r} 1 0,0 ${m*.25},0 + a${r},${r} 1 0,0 ${m*.25},${1*y*.1} + + a${r},${r} 1 0,0 ${m*.15},${1*y*.33} + a${r*.8},${r*.8} 1 0,0 0,${1*y*.34} + a${r},${r} 1 0,0 ${-1*m*.15},${1*y*.33} + + a${r},${r} 1 0,0 ${-1*m*.25},${y*.15} + a${r},${r} 1 0,0 ${-1*m*.25},0 + a${r},${r} 1 0,0 ${-1*m*.25},0 + a${r},${r} 1 0,0 ${-1*m*.25},${-1*y*.15} + + a${r},${r} 1 0,0 ${-1*m*.1},${-1*y*.33} + a${r*.8},${r*.8} 1 0,0 0,${-1*y*.34} + a${r},${r} 1 0,0 ${m*.1},${-1*y*.33} + + H0 V0 Z`)},"bangBkg"),Jt=S(function(I,w,f){w.append("circle").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("r",f.width/2)},"circleBkg");function yt(I,w,f,m,y){return I.insert("polygon",":first-child").attr("points",m.map(function(r){return r.x+","+r.y}).join(" ")).attr("transform","translate("+(y.width-w)/2+", "+f+")")}S(yt,"insertPolygonShape");var qt=S(function(I,w,f){const m=f.height,r=m/4,t=f.width-f.padding+2*r,e=[{x:r,y:0},{x:t-r,y:0},{x:t,y:-m/2},{x:t-r,y:-m},{x:r,y:-m},{x:0,y:-m/2}];yt(w,t,m,e,f)},"hexagonBkg"),te=S(function(I,w,f){w.append("rect").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("height",f.height).attr("rx",f.padding).attr("ry",f.padding).attr("width",f.width)},"roundedRectBkg"),ee=S(async function(I,w,f,m,y){const r=y.htmlLabels,t=m%(Zt-1),e=w.append("g");f.section=t;let i="section-"+t;t<0&&(i+=" section-root"),e.attr("class",(f.class?f.class+" ":"")+"mindmap-node "+i);const o=e.append("g"),g=e.append("g"),a=f.descr.replace(/()/g,` +`);await mt(g,a,{useHtmlLabels:r,width:f.width,classes:"mindmap-node-label"},y),r||g.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const v=g.node().getBBox(),[n]=Ot(y.fontSize);if(f.height=v.height+n*1.1*.5+f.padding,f.width=v.width+2*f.padding,f.icon)if(f.type===I.nodeType.CIRCLE)f.height+=50,f.width+=50,e.append("foreignObject").attr("height","50px").attr("width",f.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+t+" "+f.icon),g.attr("transform","translate("+f.width/2+", "+(f.height/2-1.5*f.padding)+")");else{f.width+=50;const c=f.height;f.height=Math.max(c,60);const l=Math.abs(f.height-c);e.append("foreignObject").attr("width","60px").attr("height",f.height).attr("style","text-align: center;margin-top:"+l/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+t+" "+f.icon),g.attr("transform","translate("+(25+f.width/2)+", "+(l/2+f.padding/2)+")")}else if(r){const c=(f.width-v.width)/2,l=(f.height-v.height)/2;g.attr("transform","translate("+c+", "+l+")")}else{const c=f.width/2,l=f.padding/2;g.attr("transform","translate("+c+", "+l+")")}switch(f.type){case I.nodeType.DEFAULT:Qt(I,o,f,t);break;case I.nodeType.ROUNDED_RECT:te(I,o,f,t);break;case I.nodeType.RECT:jt(I,o,f,t);break;case I.nodeType.CIRCLE:o.attr("transform","translate("+f.width/2+", "+ +f.height/2+")"),Jt(I,o,f,t);break;case I.nodeType.CLOUD:zt(I,o,f,t);break;case I.nodeType.BANG:Kt(I,o,f,t);break;case I.nodeType.HEXAGON:qt(I,o,f,t);break}return I.setElementForId(f.id,e),f.height},"drawNode"),re=S(function(I,w){const f=I.getElementById(w.id),m=w.x||0,y=w.y||0;f.attr("transform","translate("+m+","+y+")")},"positionNode");pt.use(Gt);async function lt(I,w,f,m,y){await ee(I,w,f,m,y),f.children&&await Promise.all(f.children.map((r,t)=>lt(I,w,r,m<0?t:m,y)))}S(lt,"drawNodes");function Et(I,w){w.edges().map((f,m)=>{const y=f.data();if(f[0]._private.bodyBounds){const r=f[0]._private.rscratch;z.trace("Edge: ",m,y),I.insert("path").attr("d",`M ${r.startX},${r.startY} L ${r.midX},${r.midY} L${r.endX},${r.endY} `).attr("class","edge section-edge-"+y.section+" edge-depth-"+y.depth)}})}S(Et,"drawEdges");function ct(I,w,f,m){w.add({group:"nodes",data:{id:I.id.toString(),labelText:I.descr,height:I.height,width:I.width,level:m,nodeId:I.id,padding:I.padding,type:I.type},position:{x:I.x,y:I.y}}),I.children&&I.children.forEach(y=>{ct(y,w,f,m+1),w.add({group:"edges",data:{id:`${I.id}_${y.id}`,source:I.id,target:y.id,depth:m,section:y.section}})})}S(ct,"addNodes");function Lt(I,w){return new Promise(f=>{const m=Dt("body").append("div").attr("id","cy").attr("style","display:none"),y=pt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});m.remove(),ct(I,y,w,0),y.nodes().forEach(function(r){r.layoutDimensions=()=>{const t=r.data();return{w:t.width,h:t.height}}}),y.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),y.ready(r=>{z.info("Ready",r),f(y)})})}S(Lt,"layoutMindmap");function Tt(I,w){w.nodes().map((f,m)=>{const y=f.data();y.x=f.position().x,y.y=f.position().y,re(I,y);const r=I.getElementById(y.nodeId);z.info("Id:",m,"Position: (",f.position().x,", ",f.position().y,")",y),r.attr("transform",`translate(${f.position().x-y.width/2}, ${f.position().y-y.height/2})`),r.attr("attr",`apa-${m})`)})}S(Tt,"positionNodes");var ie=S(async(I,w,f,m)=>{var a,v;z.debug(`Rendering mindmap diagram +`+I);const y=m.db,r=y.getMindmap();if(!r)return;const t=ot();t.htmlLabels=!1;const e=At(w),i=e.append("g");i.attr("class","mindmap-edges");const o=e.append("g");o.attr("class","mindmap-nodes"),await lt(y,o,r,-1,t);const g=await Lt(r,t);Et(i,g),Tt(y,g),It(void 0,e,((a=t.mindmap)==null?void 0:a.padding)??tt.mindmap.padding,((v=t.mindmap)==null?void 0:v.useMaxWidth)??tt.mindmap.useMaxWidth)},"draw"),ne={draw:ie},se=S(I=>{let w="";for(let f=0;f` + .edge { + stroke-width: 3; + } + ${se(I)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${I.git0}; + } + .section-root text { + fill: ${I.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`,"getStyles"),oe=ae,ue={db:Vt,renderer:ne,parser:_t,styles:oe};export{ue as diagram}; diff --git a/assets/chunks/ordinal.BYWQX77i.js b/assets/chunks/ordinal.BYWQX77i.js new file mode 100644 index 00000000..1f7977b7 --- /dev/null +++ b/assets/chunks/ordinal.BYWQX77i.js @@ -0,0 +1 @@ +import{i as a}from"./init.Gi6I4Gst.js";class o extends Map{constructor(n,t=g){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(l(this,n),t)}delete(n){return super.delete(p(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function l({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function p({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(r),e.delete(r)),t}function g(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function h(){var e=new o,n=[],t=[],r=f;function s(u){let i=e.get(u);if(i===void 0){if(r!==f)return r;e.set(u,i=n.push(u)-1)}return t[i%t.length]}return s.domain=function(u){if(!arguments.length)return n.slice();n=[],e=new o;for(const i of u)e.has(i)||e.set(i,n.push(i)-1);return s},s.range=function(u){return arguments.length?(t=Array.from(u),s):t.slice()},s.unknown=function(u){return arguments.length?(r=u,s):r},s.copy=function(){return h(n,t).unknown(r)},a.apply(s,arguments),s}export{h as o}; diff --git a/assets/chunks/pieDiagram-YF2LJOPJ.CGhsgUnJ.js b/assets/chunks/pieDiagram-YF2LJOPJ.CGhsgUnJ.js new file mode 100644 index 00000000..d2ba413d --- /dev/null +++ b/assets/chunks/pieDiagram-YF2LJOPJ.CGhsgUnJ.js @@ -0,0 +1,30 @@ +import{p as U}from"./chunk-TMUBEWPD.DdUvJo-R.js";import{X as x,O as z,aF as j,D as q,q as X,r as Z,s as H,g as J,c as K,b as Q,_ as p,l as F,x as Y,d as tt,E as et,I as at,a5 as rt,k as nt}from"../app.CXGmg8Jv.js";import{p as it}from"./gitGraph-YCYPL57B.CGDMLFt3.js";import{d as N}from"./arc.w3rEdi5q.js";import{o as st}from"./ordinal.BYWQX77i.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";import"./baseUniq.DbzeOdwK.js";import"./basePickBy.DBxcSOni.js";import"./clone.b2N_W2Ea.js";import"./init.Gi6I4Gst.js";function ot(t,a){return at?1:a>=t?0:NaN}function lt(t){return t}function ct(){var t=lt,a=ot,m=null,o=x(0),g=x(z),y=x(0);function i(e){var r,l=(e=j(e)).length,c,A,h=0,u=new Array(l),n=new Array(l),v=+o.apply(this,arguments),w=Math.min(z,Math.max(-z,g.apply(this,arguments)-v)),f,T=Math.min(Math.abs(w)/l,y.apply(this,arguments)),$=T*(w<0?-1:1),d;for(r=0;r0&&(h+=d);for(a!=null?u.sort(function(S,D){return a(n[S],n[D])}):m!=null&&u.sort(function(S,D){return m(e[S],e[D])}),r=0,A=h?(w-l*$)/h:0;r0?d*A:0)+$,n[c]={data:e[c],index:r,value:d,startAngle:v,endAngle:f,padAngle:T};return n}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:x(+e),i):t},i.sortValues=function(e){return arguments.length?(a=e,m=null,i):a},i.sort=function(e){return arguments.length?(m=e,a=null,i):m},i.startAngle=function(e){return arguments.length?(o=typeof e=="function"?e:x(+e),i):o},i.endAngle=function(e){return arguments.length?(g=typeof e=="function"?e:x(+e),i):g},i.padAngle=function(e){return arguments.length?(y=typeof e=="function"?e:x(+e),i):y},i}var P=q.pie,G={sections:new Map,showData:!1,config:P},b=G.sections,O=G.showData,ut=structuredClone(P),pt=p(()=>structuredClone(ut),"getConfig"),gt=p(()=>{b=new Map,O=G.showData,Y()},"clear"),dt=p(({label:t,value:a})=>{b.has(t)||(b.set(t,a),F.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),ft=p(()=>b,"getSections"),mt=p(t=>{O=t},"setShowData"),ht=p(()=>O,"getShowData"),R={getConfig:pt,clear:gt,setDiagramTitle:X,getDiagramTitle:Z,setAccTitle:H,getAccTitle:J,setAccDescription:K,getAccDescription:Q,addSection:dt,getSections:ft,setShowData:mt,getShowData:ht},vt=p((t,a)=>{U(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),St={parse:p(async t=>{const a=await it("pie",t);F.debug(a),vt(a,R)},"parse")},xt=p(t=>` + .pieCircle{ + stroke: ${t.pieStrokeColor}; + stroke-width : ${t.pieStrokeWidth}; + opacity : ${t.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${t.pieOuterStrokeColor}; + stroke-width: ${t.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${t.pieTitleTextSize}; + fill: ${t.pieTitleTextColor}; + font-family: ${t.fontFamily}; + } + .slice { + font-family: ${t.fontFamily}; + fill: ${t.pieSectionTextColor}; + font-size:${t.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${t.pieLegendTextColor}; + font-family: ${t.fontFamily}; + font-size: ${t.pieLegendTextSize}; + } +`,"getStyles"),yt=xt,At=p(t=>{const a=[...t.entries()].map(o=>({label:o[0],value:o[1]})).sort((o,g)=>g.value-o.value);return ct().value(o=>o.value)(a)},"createPieArcs"),wt=p((t,a,m,o)=>{F.debug(`rendering pie chart +`+t);const g=o.db,y=tt(),i=et(g.getConfig(),y.pie),e=40,r=18,l=4,c=450,A=c,h=at(a),u=h.append("g");u.attr("transform","translate("+A/2+","+c/2+")");const{themeVariables:n}=y;let[v]=rt(n.pieOuterStrokeWidth);v??(v=2);const w=i.textPosition,f=Math.min(A,c)/2-e,T=N().innerRadius(0).outerRadius(f),$=N().innerRadius(f*w).outerRadius(f*w);u.append("circle").attr("cx",0).attr("cy",0).attr("r",f+v/2).attr("class","pieOuterCircle");const d=g.getSections(),S=At(d),D=[n.pie1,n.pie2,n.pie3,n.pie4,n.pie5,n.pie6,n.pie7,n.pie8,n.pie9,n.pie10,n.pie11,n.pie12],C=st(D);u.selectAll("mySlices").data(S).enter().append("path").attr("d",T).attr("fill",s=>C(s.data.label)).attr("class","pieCircle");let W=0;d.forEach(s=>{W+=s}),u.selectAll("mySlices").data(S).enter().append("text").text(s=>(s.data.value/W*100).toFixed(0)+"%").attr("transform",s=>"translate("+$.centroid(s)+")").style("text-anchor","middle").attr("class","slice"),u.append("text").text(g.getDiagramTitle()).attr("x",0).attr("y",-(c-50)/2).attr("class","pieTitleText");const M=u.selectAll(".legend").data(C.domain()).enter().append("g").attr("class","legend").attr("transform",(s,k)=>{const E=r+l,_=E*C.domain().length/2,B=12*r,V=k*E-_;return"translate("+B+","+V+")"});M.append("rect").attr("width",r).attr("height",r).style("fill",C).style("stroke",C),M.data(S).append("text").attr("x",r+l).attr("y",r-l).text(s=>{const{label:k,value:E}=s.data;return g.getShowData()?`${k} [${E}]`:k});const L=Math.max(...M.selectAll("text").nodes().map(s=>(s==null?void 0:s.getBoundingClientRect().width)??0)),I=A+e+r+l+L;h.attr("viewBox",`0 0 ${I} ${c}`),nt(h,c,I,i.useMaxWidth)},"draw"),Dt={draw:wt},Wt={parser:St,db:R,renderer:Dt,styles:yt};export{Wt as diagram}; diff --git a/assets/chunks/quadrantDiagram-OS5C2QUG.DzULb5bu.js b/assets/chunks/quadrantDiagram-OS5C2QUG.DzULb5bu.js new file mode 100644 index 00000000..471094f3 --- /dev/null +++ b/assets/chunks/quadrantDiagram-OS5C2QUG.DzULb5bu.js @@ -0,0 +1,7 @@ +import{_ as o,a0 as _e,D,l as At,d as wt,i as Ae,r as ie,s as ke,g as Fe,q as Pe,b as ve,c as Ce,x as Le,j as zt,k as Ee}from"../app.CXGmg8Jv.js";import{l as ee}from"./linear.BcMShDgX.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";import"./init.Gi6I4Gst.js";var Vt=function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],A=[2,36],d=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],x=[1,41],O=[1,14],Y=[1,23],G=[1,18],yt=[1,19],Tt=[1,20],dt=[1,21],Ft=[1,22],ut=[1,24],xt=[1,25],ft=[1,26],gt=[1,27],i=[1,28],Bt=[1,29],W=[1,32],U=[1,33],k=[1,34],F=[1,39],P=[1,40],v=[1,42],C=[1,44],H=[1,62],X=[1,61],L=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Rt=[1,65],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],I=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],$=[1,91],tt=[1,92],et=[1,99],it=[1,93],at=[1,96],nt=[1,94],st=[1,95],rt=[1,97],ot=[1,98],Pt=[1,102],Kt=[10,55,56,57],R=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,g,f,_,e,pt){var s=e.length-1;switch(_){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,A,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:q,12:m,13:b,14:x,18:O,25:Y,35:G,37:yt,39:Tt,41:dt,42:Ft,48:ut,50:xt,51:ft,52:gt,53:i,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(y,[2,34]),{27:45,55:c,56:h,57:p},t(a,[2,37]),t(a,A,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:T,10:q,12:m,13:b,14:x,18:O,25:Y,35:G,37:yt,39:Tt,41:dt,42:Ft,48:ut,50:xt,51:ft,52:gt,53:i,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(a,[2,45]),t(a,[2,46]),{18:[1,50]},{4:d,5:T,10:q,12:m,13:b,14:x,43:51,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:52,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:53,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:54,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:55,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:56,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,44:[1,57],47:[1,58],58:60,59:59,63:k,64:F,65:P,66:v,67:C},t(L,[2,64]),t(L,[2,66]),t(L,[2,67]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(L,[2,80]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:64,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,21:63},t(a,[2,53],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,49:[1,77],63:k,64:F,65:P,66:v,67:C}),t(a,[2,56],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,49:[1,78],63:k,64:F,65:P,66:v,67:C}),t(a,[2,57],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,58],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,59],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,60],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),{45:[1,79]},{44:[1,80]},t(L,[2,65]),t(L,[2,81]),t(L,[2,82]),t(L,[2,83]),{3:82,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,18:[1,81]},t(I,[2,23]),t(I,[2,1]),t(I,[2,2]),t(I,[2,3]),t(I,[2,4]),t(I,[2,5]),t(I,[2,6]),t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12]),t(a,[2,52],{58:31,43:83,4:d,5:T,10:q,12:m,13:b,14:x,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,55],{58:31,43:84,4:d,5:T,10:q,12:m,13:b,14:x,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),{46:[1,85]},{45:[1,86]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:89,17:nt,18:st,19:rt,20:ot,22:88,23:87},t(I,[2,24]),t(a,[2,51],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,54],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,47],{22:88,16:89,23:100,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,101]},t(a,[2,29],{10:Pt}),t(Kt,[2,27],{16:103,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(R,[2,25]),t(R,[2,13]),t(R,[2,14]),t(R,[2,15]),t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,21]),t(R,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:88,16:89,23:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:89,17:nt,18:st,19:rt,20:ot,22:105},t(R,[2,26]),t(a,[2,50],{10:Pt}),t(Kt,[2,28],{16:103,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],_=[null],e=[],pt=this.table,s="",mt=0,Zt=0,qe=2,Jt=1,me=e.slice.call(arguments,1),E=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);E.setInput(r,K.yy),K.yy.lexer=E,K.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var Lt=E.yylloc;e.push(Lt);var be=E.options&&E.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(B){g.length=g.length-2*B,_.length=_.length-B,e.length=e.length-B}o(Se,"popStack");function $t(){var B;return B=f.pop()||E.lex()||Jt,typeof B!="number"&&(B instanceof Array&&(f=B,B=f.pop()),B=l.symbols_[B]||B),B}o($t,"lex");for(var w,Z,N,Et,lt={},bt,M,te,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?N=this.defaultActions[Z]:((w===null||typeof w>"u")&&(w=$t()),N=pt[Z]&&pt[Z][w]),typeof N>"u"||!N.length||!N[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>qe&&St.push("'"+this.terminals_[bt]+"'");E.showPosition?Dt="Parse error on line "+(mt+1)+`: +`+E.showPosition()+` +Expecting `+St.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Dt="Parse error on line "+(mt+1)+": Unexpected "+(w==Jt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Dt,{text:E.match,token:this.terminals_[w]||w,line:E.yylineno,loc:Lt,expected:St})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+w);switch(N[0]){case 1:g.push(w),_.push(E.yytext),e.push(E.yylloc),g.push(N[1]),w=null,Zt=E.yyleng,s=E.yytext,mt=E.yylineno,Lt=E.yylloc;break;case 2:if(M=this.productions_[N[1]][1],lt.$=_[_.length-M],lt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},be&&(lt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Et=this.performAction.apply(lt,[s,Zt,mt,K.yy,N[1],_,e].concat(me)),typeof Et<"u")return Et;M&&(g=g.slice(0,-1*M*2),_=_.slice(0,-1*M),e=e.slice(0,-1*M)),g.push(this.productions_[N[1]][0]),_.push(lt.$),e.push(lt._$),te=pt[g[g.length-2]][g[g.length-1]],g.push(te);break;case 3:return!0}}return!0},"parse")},Te=function(){var j={EOF:1,parseError:o(function(l,g){if(this.yy.parser)this.yy.parser.parseError(l,g);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:o(function(r){var l=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===f.length?this.yylloc.first_column:0)+f[f.length-g.length].length-g[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+` +`+l+"^"},"showPosition"),test_match:o(function(r,l){var g,f,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),f=r[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],g=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var e in _)this[e]=_[e];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,l,g,f;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),e=0;e<_.length;e++)if(g=this._input.match(this.rules[_[e]]),g&&(!l||g[0].length>l[0].length)){if(l=g,f=e,this.options.backtrack_lexer){if(r=this.test_match(g,_[e]),r!==!1)return r;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(r=this.test_match(l,_[f]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var l=this.next();return l||this.lex()},"lex"),begin:o(function(l){this.conditionStack.push(l)},"begin"),popState:o(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:o(function(l){this.begin(l)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(l,g,f,_){switch(f){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return j}();vt.lexer=Te;function qt(){this.yy={}}return o(qt,"Parser"),qt.prototype=vt,vt.Parser=qt,new qt}();Vt.parser=Vt;var De=Vt,V=_e(),ht,ze=(ht=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var n,u,c,h,p,y,S,a,A,d,T,q,m,b,x,O,Y,G;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((n=D.quadrantChart)==null?void 0:n.chartWidth)||500,chartWidth:((u=D.quadrantChart)==null?void 0:u.chartHeight)||500,titlePadding:((c=D.quadrantChart)==null?void 0:c.titlePadding)||10,titleFontSize:((h=D.quadrantChart)==null?void 0:h.titleFontSize)||20,quadrantPadding:((p=D.quadrantChart)==null?void 0:p.quadrantPadding)||5,xAxisLabelPadding:((y=D.quadrantChart)==null?void 0:y.xAxisLabelPadding)||5,yAxisLabelPadding:((S=D.quadrantChart)==null?void 0:S.yAxisLabelPadding)||5,xAxisLabelFontSize:((a=D.quadrantChart)==null?void 0:a.xAxisLabelFontSize)||16,yAxisLabelFontSize:((A=D.quadrantChart)==null?void 0:A.yAxisLabelFontSize)||16,quadrantLabelFontSize:((d=D.quadrantChart)==null?void 0:d.quadrantLabelFontSize)||16,quadrantTextTopPadding:((T=D.quadrantChart)==null?void 0:T.quadrantTextTopPadding)||5,pointTextPadding:((q=D.quadrantChart)==null?void 0:q.pointTextPadding)||5,pointLabelFontSize:((m=D.quadrantChart)==null?void 0:m.pointLabelFontSize)||12,pointRadius:((b=D.quadrantChart)==null?void 0:b.pointRadius)||5,xAxisPosition:((x=D.quadrantChart)==null?void 0:x.xAxisPosition)||"top",yAxisPosition:((O=D.quadrantChart)==null?void 0:O.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((Y=D.quadrantChart)==null?void 0:Y.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((G=D.quadrantChart)==null?void 0:G.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:V.quadrant1Fill,quadrant2Fill:V.quadrant2Fill,quadrant3Fill:V.quadrant3Fill,quadrant4Fill:V.quadrant4Fill,quadrant1TextFill:V.quadrant1TextFill,quadrant2TextFill:V.quadrant2TextFill,quadrant3TextFill:V.quadrant3TextFill,quadrant4TextFill:V.quadrant4TextFill,quadrantPointFill:V.quadrantPointFill,quadrantPointTextFill:V.quadrantPointTextFill,quadrantXAxisTextFill:V.quadrantXAxisTextFill,quadrantYAxisTextFill:V.quadrantYAxisTextFill,quadrantTitleFill:V.quadrantTitleFill,quadrantInternalBorderStrokeFill:V.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:V.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,At.info("clear called")}setData(n){this.data={...this.data,...n}}addPoints(n){this.data.points=[...n,...this.data.points]}addClass(n,u){this.classes.set(n,u)}setConfig(n){At.trace("setConfig called with: ",n),this.config={...this.config,...n}}setThemeConfig(n){At.trace("setThemeConfig called with: ",n),this.themeConfig={...this.themeConfig,...n}}calculateSpace(n,u,c,h){const p=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,y={top:n==="top"&&u?p:0,bottom:n==="bottom"&&u?p:0},S=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,a={left:this.config.yAxisPosition==="left"&&c?S:0,right:this.config.yAxisPosition==="right"&&c?S:0},A=this.config.titleFontSize+this.config.titlePadding*2,d={top:h?A:0},T=this.config.quadrantPadding+a.left,q=this.config.quadrantPadding+y.top+d.top,m=this.config.chartWidth-this.config.quadrantPadding*2-a.left-a.right,b=this.config.chartHeight-this.config.quadrantPadding*2-y.top-y.bottom-d.top,x=m/2,O=b/2;return{xAxisSpace:y,yAxisSpace:a,titleSpace:d,quadrantSpace:{quadrantLeft:T,quadrantTop:q,quadrantWidth:m,quadrantHalfWidth:x,quadrantHeight:b,quadrantHalfHeight:O}}}getAxisLabels(n,u,c,h){const{quadrantSpace:p,titleSpace:y}=h,{quadrantHalfHeight:S,quadrantHeight:a,quadrantLeft:A,quadrantHalfWidth:d,quadrantTop:T,quadrantWidth:q}=p,m=!!this.data.xAxisRightText,b=!!this.data.yAxisTopText,x=[];return this.data.xAxisLeftText&&u&&x.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:A+(m?d/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&u&&x.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:A+d+(m?d/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&c&&x.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+A+q+this.config.quadrantPadding,y:T+a-(b?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&c&&x.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+A+q+this.config.quadrantPadding,y:T+S-(b?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),x}getQuadrants(n){const{quadrantSpace:u}=n,{quadrantHalfHeight:c,quadrantLeft:h,quadrantHalfWidth:p,quadrantTop:y}=u,S=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y,width:p,height:c,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y,width:p,height:c,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y:y+c,width:p,height:c,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y:y+c,width:p,height:c,fill:this.themeConfig.quadrant4Fill}];for(const a of S)a.text.x=a.x+a.width/2,this.data.points.length===0?(a.text.y=a.y+a.height/2,a.text.horizontalPos="middle"):(a.text.y=a.y+this.config.quadrantTextTopPadding,a.text.horizontalPos="top");return S}getQuadrantPoints(n){const{quadrantSpace:u}=n,{quadrantHeight:c,quadrantLeft:h,quadrantTop:p,quadrantWidth:y}=u,S=ee().domain([0,1]).range([h,y+h]),a=ee().domain([0,1]).range([c+p,p]);return this.data.points.map(d=>{const T=this.classes.get(d.className);return T&&(d={...T,...d}),{x:S(d.x),y:a(d.y),fill:d.color??this.themeConfig.quadrantPointFill,radius:d.radius??this.config.pointRadius,text:{text:d.text,fill:this.themeConfig.quadrantPointTextFill,x:S(d.x),y:a(d.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:d.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:d.strokeWidth??"0px"}})}getBorders(n){const u=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:c}=n,{quadrantHalfHeight:h,quadrantHeight:p,quadrantLeft:y,quadrantHalfWidth:S,quadrantTop:a,quadrantWidth:A}=c;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-u,y1:a,x2:y+A+u,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y+A,y1:a+u,x2:y+A,y2:a+p-u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-u,y1:a+p,x2:y+A+u,y2:a+p},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y,y1:a+u,x2:y,y2:a+p-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+S,y1:a+u,x2:y+S,y2:a+p-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+u,y1:a+h,x2:y+A-u,y2:a+h}]}getTitle(n){if(n)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const n=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),u=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),c=this.config.showTitle&&!!this.data.titleText,h=this.data.points.length>0?"bottom":this.config.xAxisPosition,p=this.calculateSpace(h,n,u,c);return{points:this.getQuadrantPoints(p),quadrants:this.getQuadrants(p),axisLabels:this.getAxisLabels(h,n,u,p),borderLines:this.getBorders(p),title:this.getTitle(c)}}},o(ht,"QuadrantBuilder"),ht),ct,_t=(ct=class extends Error{constructor(n,u,c){super(`value for ${n} ${u} is invalid, please use a valid ${c}`),this.name="InvalidStyleError"}},o(ct,"InvalidStyleError"),ct);function It(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}o(It,"validateHexCode");function ae(t){return!/^\d+$/.test(t)}o(ae,"validateNumber");function ne(t){return!/^\d+px$/.test(t)}o(ne,"validateSizeInPixels");var Ve=wt();function Q(t){return Ae(t.trim(),Ve)}o(Q,"textSanitizer");var z=new ze;function se(t){z.setData({quadrant1Text:Q(t.text)})}o(se,"setQuadrant1Text");function re(t){z.setData({quadrant2Text:Q(t.text)})}o(re,"setQuadrant2Text");function oe(t){z.setData({quadrant3Text:Q(t.text)})}o(oe,"setQuadrant3Text");function le(t){z.setData({quadrant4Text:Q(t.text)})}o(le,"setQuadrant4Text");function he(t){z.setData({xAxisLeftText:Q(t.text)})}o(he,"setXAxisLeftText");function ce(t){z.setData({xAxisRightText:Q(t.text)})}o(ce,"setXAxisRightText");function de(t){z.setData({yAxisTopText:Q(t.text)})}o(de,"setYAxisTopText");function ue(t){z.setData({yAxisBottomText:Q(t.text)})}o(ue,"setYAxisBottomText");function kt(t){const n={};for(const u of t){const[c,h]=u.trim().split(/\s*:\s*/);if(c==="radius"){if(ae(h))throw new _t(c,h,"number");n.radius=parseInt(h)}else if(c==="color"){if(It(h))throw new _t(c,h,"hex code");n.color=h}else if(c==="stroke-color"){if(It(h))throw new _t(c,h,"hex code");n.strokeColor=h}else if(c==="stroke-width"){if(ne(h))throw new _t(c,h,"number of pixels (eg. 10px)");n.strokeWidth=h}else throw new Error(`style named ${c} is not supported.`)}return n}o(kt,"parseStyles");function xe(t,n,u,c,h){const p=kt(h);z.addPoints([{x:u,y:c,text:Q(t.text),className:n,...p}])}o(xe,"addPoint");function fe(t,n){z.addClass(t,kt(n))}o(fe,"addClass");function ge(t){z.setConfig({chartWidth:t})}o(ge,"setWidth");function pe(t){z.setConfig({chartHeight:t})}o(pe,"setHeight");function ye(){const t=wt(),{themeVariables:n,quadrantChart:u}=t;return u&&z.setConfig(u),z.setThemeConfig({quadrant1Fill:n.quadrant1Fill,quadrant2Fill:n.quadrant2Fill,quadrant3Fill:n.quadrant3Fill,quadrant4Fill:n.quadrant4Fill,quadrant1TextFill:n.quadrant1TextFill,quadrant2TextFill:n.quadrant2TextFill,quadrant3TextFill:n.quadrant3TextFill,quadrant4TextFill:n.quadrant4TextFill,quadrantPointFill:n.quadrantPointFill,quadrantPointTextFill:n.quadrantPointTextFill,quadrantXAxisTextFill:n.quadrantXAxisTextFill,quadrantYAxisTextFill:n.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:n.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:n.quadrantInternalBorderStrokeFill,quadrantTitleFill:n.quadrantTitleFill}),z.setData({titleText:ie()}),z.build()}o(ye,"getQuadrantData");var Ie=o(function(){z.clear(),Le()},"clear"),we={setWidth:ge,setHeight:pe,setQuadrant1Text:se,setQuadrant2Text:re,setQuadrant3Text:oe,setQuadrant4Text:le,setXAxisLeftText:he,setXAxisRightText:ce,setYAxisTopText:de,setYAxisBottomText:ue,parseStyles:kt,addPoint:xe,addClass:fe,getQuadrantData:ye,clear:Ie,setAccTitle:ke,getAccTitle:Fe,setDiagramTitle:Pe,getDiagramTitle:ie,getAccDescription:ve,setAccDescription:Ce},Be=o((t,n,u,c)=>{var xt,ft,gt;function h(i){return i==="top"?"hanging":"middle"}o(h,"getDominantBaseLine");function p(i){return i==="left"?"start":"middle"}o(p,"getTextAnchor");function y(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}o(y,"getTransformation");const S=wt();At.debug(`Rendering quadrant chart +`+t);const a=S.securityLevel;let A;a==="sandbox"&&(A=zt("#i"+n));const T=(a==="sandbox"?zt(A.nodes()[0].contentDocument.body):zt("body")).select(`[id="${n}"]`),q=T.append("g").attr("class","main"),m=((xt=S.quadrantChart)==null?void 0:xt.chartWidth)??500,b=((ft=S.quadrantChart)==null?void 0:ft.chartHeight)??500;Ee(T,b,m,((gt=S.quadrantChart)==null?void 0:gt.useMaxWidth)??!0),T.attr("viewBox","0 0 "+m+" "+b),c.db.setHeight(b),c.db.setWidth(m);const x=c.db.getQuadrantData(),O=q.append("g").attr("class","quadrants"),Y=q.append("g").attr("class","border"),G=q.append("g").attr("class","data-points"),yt=q.append("g").attr("class","labels"),Tt=q.append("g").attr("class","title");x.title&&Tt.append("text").attr("x",0).attr("y",0).attr("fill",x.title.fill).attr("font-size",x.title.fontSize).attr("dominant-baseline",h(x.title.horizontalPos)).attr("text-anchor",p(x.title.verticalPos)).attr("transform",y(x.title)).text(x.title.text),x.borderLines&&Y.selectAll("line").data(x.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);const dt=O.selectAll("g.quadrant").data(x.quadrants).enter().append("g").attr("class","quadrant");dt.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),dt.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text)).text(i=>i.text.text),yt.selectAll("g.label").data(x.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>h(i.horizontalPos)).attr("text-anchor",i=>p(i.verticalPos)).attr("transform",i=>y(i));const ut=G.selectAll("g.data-point").data(x.points).enter().append("g").attr("class","data-point");ut.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),ut.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text))},"draw"),Re={draw:Be},He={parser:De,db:we,renderer:Re,styles:o(()=>"","styles")};export{He as diagram}; diff --git a/assets/chunks/requirementDiagram-MIRIMTAZ.DZI_fJYT.js b/assets/chunks/requirementDiagram-MIRIMTAZ.DZI_fJYT.js new file mode 100644 index 00000000..e996f971 --- /dev/null +++ b/assets/chunks/requirementDiagram-MIRIMTAZ.DZI_fJYT.js @@ -0,0 +1,52 @@ +import{_ as r,d as ve,s as Fe,g as De,c as Pe,b as Ye,l as xe,x as Ue,j as ce,k as Be,a1 as Qe,e as Te}from"../app.CXGmg8Jv.js";import{G as He}from"./graph.B66Ap3eE.js";import{l as We}from"./layout.CYDrMIpX.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";import"./baseUniq.DbzeOdwK.js";import"./basePickBy.DBxcSOni.js";var he=function(){var e=r(function($,i,a,l){for(a=a||{},l=$.length;l--;a[$[l]]=i);return a},"o"),t=[1,3],c=[1,4],d=[1,5],u=[1,6],p=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],y=[1,18],h=[2,7],o=[1,22],g=[1,23],R=[1,24],I=[1,25],b=[1,26],w=[1,27],q=[1,20],v=[1,28],A=[1,29],F=[62,63],pe=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],fe=[1,47],ye=[1,48],_e=[1,49],ge=[1,50],Ee=[1,51],Re=[1,52],me=[1,53],O=[53,54],D=[1,64],P=[1,60],Y=[1,61],U=[1,62],B=[1,63],Q=[1,65],j=[1,69],X=[1,70],J=[1,67],Z=[1,68],S=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],ne={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:r(function(i,a,l,n,f,s,K){var E=s.length-1;switch(f){case 4:this.$=s[E].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[E].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[E-3],s[E-4]);break;case 14:n.setNewReqId(s[E-2]);break;case 15:n.setNewReqText(s[E-2]);break;case 16:n.setNewReqRisk(s[E-2]);break;case 17:n.setNewReqVerifyMethod(s[E-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[E-3]);break;case 34:n.setNewElementType(s[E-2]);break;case 35:n.setNewElementDocRef(s[E-2]);break;case 38:n.addRelationship(s[E-2],s[E],s[E-4]);break;case 39:n.addRelationship(s[E-2],s[E-4],s[E]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES;break}},"anonymous"),table:[{3:1,4:2,6:t,9:c,11:d,13:u},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:c,11:d,13:u},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(p,[2,6]),{3:12,4:2,6:t,9:c,11:d,13:u},{1:[2,2]},{4:17,5:y,7:13,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},e(p,[2,4]),e(p,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:y,7:31,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:32,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:33,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:34,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:35,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(F,[2,20]),e(F,[2,21]),e(F,[2,22]),e(F,[2,23]),e(F,[2,24]),e(F,[2,25]),e(pe,[2,49]),e(pe,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:fe,56:ye,57:_e,58:ge,59:Ee,60:Re,61:me},{52:54,55:fe,56:ye,57:_e,58:ge,59:Ee,60:Re,61:me},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(O,[2,40]),e(O,[2,41]),e(O,[2,42]),e(O,[2,43]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),{54:[1,58]},{5:D,20:59,21:P,24:Y,26:U,28:B,30:Q},{5:j,30:X,46:66,47:J,49:Z},{23:71,62:v,63:A},{23:72,62:v,63:A},e(S,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:D,20:77,21:P,24:Y,26:U,28:B,30:Q},e(S,[2,19]),e(S,[2,33]),{22:[1,78]},{22:[1,79]},{5:j,30:X,46:80,47:J,49:Z},e(S,[2,37]),e(S,[2,38]),e(S,[2,39]),{23:81,62:v,63:A},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(S,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(S,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:D,20:106,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:107,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:108,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:109,21:P,24:Y,26:U,28:B,30:Q},{5:j,30:X,46:110,47:J,49:Z},{5:j,30:X,46:111,47:J,49:Z},e(S,[2,14]),e(S,[2,15]),e(S,[2,16]),e(S,[2,17]),e(S,[2,34]),e(S,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:r(function(i,a){if(a.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=a,l}},"parseError"),parse:r(function(i){var a=this,l=[0],n=[],f=[null],s=[],K=this.table,E="",te=0,Ie=0,Le=2,be=1,Oe=s.slice.call(arguments,1),m=Object.create(this.lexer),C={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(C.yy[se]=this.yy[se]);m.setInput(i,C.yy),C.yy.lexer=m,C.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var ae=m.yylloc;s.push(ae);var Ce=m.options&&m.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Me(N){l.length=l.length-2*N,f.length=f.length-N,s.length=s.length-N}r(Me,"popStack");function Se(){var N;return N=n.pop()||m.lex()||be,typeof N!="number"&&(N instanceof Array&&(n=N,N=n.pop()),N=a.symbols_[N]||N),N}r(Se,"lex");for(var k,M,x,le,H={},ie,V,ke,re;;){if(M=l[l.length-1],this.defaultActions[M]?x=this.defaultActions[M]:((k===null||typeof k>"u")&&(k=Se()),x=K[M]&&K[M][k]),typeof x>"u"||!x.length||!x[0]){var oe="";re=[];for(ie in K[M])this.terminals_[ie]&&ie>Le&&re.push("'"+this.terminals_[ie]+"'");m.showPosition?oe="Parse error on line "+(te+1)+`: +`+m.showPosition()+` +Expecting `+re.join(", ")+", got '"+(this.terminals_[k]||k)+"'":oe="Parse error on line "+(te+1)+": Unexpected "+(k==be?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(oe,{text:m.match,token:this.terminals_[k]||k,line:m.yylineno,loc:ae,expected:re})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+k);switch(x[0]){case 1:l.push(k),f.push(m.yytext),s.push(m.yylloc),l.push(x[1]),k=null,Ie=m.yyleng,E=m.yytext,te=m.yylineno,ae=m.yylloc;break;case 2:if(V=this.productions_[x[1]][1],H.$=f[f.length-V],H._$={first_line:s[s.length-(V||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(V||1)].first_column,last_column:s[s.length-1].last_column},Ce&&(H._$.range=[s[s.length-(V||1)].range[0],s[s.length-1].range[1]]),le=this.performAction.apply(H,[E,Ie,te,C.yy,x[1],f,s].concat(Oe)),typeof le<"u")return le;V&&(l=l.slice(0,-1*V*2),f=f.slice(0,-1*V),s=s.slice(0,-1*V)),l.push(this.productions_[x[1]][0]),f.push(H.$),s.push(H._$),ke=K[l[l.length-2]][l[l.length-1]],l.push(ke);break;case 3:return!0}}return!0},"parse")},$e=function(){var $={EOF:1,parseError:r(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:r(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:r(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:r(function(i){var a=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===n.length?this.yylloc.first_column:0)+n[n.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r(function(i){this.unput(this.match.slice(i))},"less"),pastInput:r(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:r(function(i,a){var l,n,f;if(this.options.backtrack_lexer&&(f={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(f.yylloc.range=this.yylloc.range.slice(0))),n=i[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var s in f)this[s]=f[s];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,l,n;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),s=0;sa[0].length)){if(a=l,n=s,this.options.backtrack_lexer){if(i=this.test_match(l,f[s]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,f[n]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r(function(){var a=this.next();return a||this.lex()},"lex"),begin:r(function(a){this.conditionStack.push(a)},"begin"),popState:r(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:r(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:r(function(a){this.begin(a)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(a,l,n,f){switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return l.yytext=l.yytext.trim(),62}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};return $}();ne.lexer=$e;function ee(){this.yy={}}return r(ee,"Parser"),ee.prototype=ne,ne.Parser=ee,new ee}();he.parser=he;var Ke=he,de=[],T={},G=new Map,L={},z=new Map,Ge={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},ze={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},je={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Xe={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},Je=r((e,t)=>(G.has(e)||G.set(e,{name:e,type:t,id:T.id,text:T.text,risk:T.risk,verifyMethod:T.verifyMethod}),T={},G.get(e)),"addRequirement"),Ze=r(()=>G,"getRequirements"),et=r(e=>{T!==void 0&&(T.id=e)},"setNewReqId"),tt=r(e=>{T!==void 0&&(T.text=e)},"setNewReqText"),it=r(e=>{T!==void 0&&(T.risk=e)},"setNewReqRisk"),rt=r(e=>{T!==void 0&&(T.verifyMethod=e)},"setNewReqVerifyMethod"),nt=r(e=>(z.has(e)||(z.set(e,{name:e,type:L.type,docRef:L.docRef}),xe.info("Added new requirement: ",e)),L={},z.get(e)),"addElement"),st=r(()=>z,"getElements"),at=r(e=>{L!==void 0&&(L.type=e)},"setNewElementType"),lt=r(e=>{L!==void 0&&(L.docRef=e)},"setNewElementDocRef"),ot=r((e,t,c)=>{de.push({type:e,src:t,dst:c})},"addRelationship"),ct=r(()=>de,"getRelationships"),ht=r(()=>{de=[],T={},G=new Map,L={},z=new Map,Ue()},"clear"),ut={RequirementType:Ge,RiskLevel:ze,VerifyType:je,Relationships:Xe,getConfig:r(()=>ve().req,"getConfig"),addRequirement:Je,getRequirements:Ze,setNewReqId:et,setNewReqText:tt,setNewReqRisk:it,setNewReqVerifyMethod:rt,setAccTitle:Fe,getAccTitle:De,setAccDescription:Pe,getAccDescription:Ye,addElement:nt,getElements:st,setNewElementType:at,setNewElementDocRef:lt,addRelationship:ot,getRelationships:ct,clear:ht},dt=r(e=>` + + marker { + fill: ${e.relationColor}; + stroke: ${e.relationColor}; + } + + marker.cross { + stroke: ${e.lineColor}; + } + + svg { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + } + + .reqBox { + fill: ${e.requirementBackground}; + fill-opacity: 1.0; + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${e.requirementTextColor}; + } + .reqLabelBox { + fill: ${e.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + .relationshipLine { + stroke: ${e.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${e.relationLabelColor}; + } + +`,"getStyles"),pt=dt,ue={CONTAINS:"contains",ARROW:"arrow"},ft=r((e,t)=>{let c=e.append("defs").append("marker").attr("id",ue.CONTAINS+"_line_ending").attr("refX",0).attr("refY",t.line_height/2).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("g");c.append("circle").attr("cx",t.line_height/2).attr("cy",t.line_height/2).attr("r",t.line_height/2).attr("fill","none"),c.append("line").attr("x1",0).attr("x2",t.line_height).attr("y1",t.line_height/2).attr("y2",t.line_height/2).attr("stroke-width",1),c.append("line").attr("y1",0).attr("y2",t.line_height).attr("x1",t.line_height/2).attr("x2",t.line_height/2).attr("stroke-width",1),e.append("defs").append("marker").attr("id",ue.ARROW+"_line_ending").attr("refX",t.line_height).attr("refY",.5*t.line_height).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("path").attr("d",`M0,0 + L${t.line_height},${t.line_height/2} + M${t.line_height},${t.line_height/2} + L0,${t.line_height}`).attr("stroke-width",1)},"insertLineEndings"),we={ReqMarkers:ue,insertLineEndings:ft},_={},Ne=0,Ae=r((e,t)=>e.insert("rect","#"+t).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",_.rect_min_width+"px").attr("height",_.rect_min_height+"px"),"newRectNode"),qe=r((e,t,c)=>{let d=_.rect_min_width/2,u=e.append("text").attr("class","req reqLabel reqTitle").attr("id",t).attr("x",d).attr("y",_.rect_padding).attr("dominant-baseline","hanging"),p=0;c.forEach(g=>{p==0?u.append("tspan").attr("text-anchor","middle").attr("x",_.rect_min_width/2).attr("dy",0).text(g):u.append("tspan").attr("text-anchor","middle").attr("x",_.rect_min_width/2).attr("dy",_.line_height*.75).text(g),p++});let y=1.5*_.rect_padding,h=p*_.line_height*.75,o=y+h;return e.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",_.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:u,y:o}},"newTitleNode"),Ve=r((e,t,c,d)=>{let u=e.append("text").attr("class","req reqLabel").attr("id",t).attr("x",_.rect_padding).attr("y",d).attr("dominant-baseline","hanging"),p=0;const y=30;let h=[];return c.forEach(o=>{let g=o.length;for(;g>y&&p<3;){let R=o.substring(0,y);o=o.substring(y,o.length),g=o.length,h[h.length]=R,p++}if(p==3){let R=h[h.length-1];h[h.length-1]=R.substring(0,R.length-4)+"..."}else h[h.length]=o;p=0}),h.forEach(o=>{u.append("tspan").attr("x",_.rect_padding).attr("dy",_.line_height).text(o)}),u},"newBodyNode"),yt=r((e,t,c,d)=>{const u=t.node().getTotalLength(),p=t.node().getPointAtLength(u*.5),y="rel"+Ne;Ne++;const o=e.append("text").attr("class","req relationshipLabel").attr("id",y).attr("x",p.x).attr("y",p.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d).node().getBBox();e.insert("rect","#"+y).attr("class","req reqLabelBox").attr("x",p.x-o.width/2).attr("y",p.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")},"addEdgeLabel"),_t=r(function(e,t,c,d,u){const p=c.edge(W(t.src),W(t.dst)),y=Qe().x(function(o){return o.x}).y(function(o){return o.y}),h=e.insert("path","#"+d).attr("class","er relationshipLine").attr("d",y(p.points)).attr("fill","none");t.type==u.db.Relationships.CONTAINS?h.attr("marker-start","url("+Te.getUrl(_.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(h.attr("stroke-dasharray","10,7"),h.attr("marker-end","url("+Te.getUrl(_.arrowMarkerAbsolute)+"#"+we.ReqMarkers.ARROW+"_line_ending)")),yt(e,h,_,`<<${t.type}>>`)},"drawRelationshipFromLayout"),gt=r((e,t,c)=>{e.forEach((d,u)=>{u=W(u),xe.info("Added new requirement: ",u);const p=c.append("g").attr("id",u),y="req-"+u,h=Ae(p,y);let o=[],g=qe(p,u+"_title",[`<<${d.type}>>`,`${d.name}`]);o.push(g.titleNode);let R=Ve(p,u+"_body",[`Id: ${d.id}`,`Text: ${d.text}`,`Risk: ${d.risk}`,`Verification: ${d.verifyMethod}`],g.y);o.push(R);const I=h.node().getBBox();t.setNode(u,{width:I.width,height:I.height,shape:"rect",id:u})})},"drawReqs"),Et=r((e,t,c)=>{e.forEach((d,u)=>{const p=W(u),y=c.append("g").attr("id",p),h="element-"+p,o=Ae(y,h);let g=[],R=qe(y,h+"_title",["<>",`${u}`]);g.push(R.titleNode);let I=Ve(y,h+"_body",[`Type: ${d.type||"Not Specified"}`,`Doc Ref: ${d.docRef||"None"}`],R.y);g.push(I);const b=o.node().getBBox();t.setNode(p,{width:b.width,height:b.height,shape:"rect",id:p})})},"drawElements"),Rt=r((e,t)=>(e.forEach(function(c){let d=W(c.src),u=W(c.dst);t.setEdge(d,u,{relationship:c})}),e),"addRelationships"),mt=r(function(e,t){t.nodes().forEach(function(c){c!==void 0&&t.node(c)!==void 0&&(e.select("#"+c),e.select("#"+c).attr("transform","translate("+(t.node(c).x-t.node(c).width/2)+","+(t.node(c).y-t.node(c).height/2)+" )"))})},"adjustEntities"),W=r(e=>e.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),It=r((e,t,c,d)=>{_=ve().requirement;const u=_.securityLevel;let p;u==="sandbox"&&(p=ce("#i"+t));const h=(u==="sandbox"?ce(p.nodes()[0].contentDocument.body):ce("body")).select(`[id='${t}']`);we.insertLineEndings(h,_);const o=new He({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:_.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let g=d.db.getRequirements(),R=d.db.getElements(),I=d.db.getRelationships();gt(g,o,h),Et(R,o,h),Rt(I,o),We(o),mt(h,o),I.forEach(function(A){_t(h,A,o,t,d)});const b=_.rect_padding,w=h.node().getBBox(),q=w.width+b*2,v=w.height+b*2;Be(h,v,q,_.useMaxWidth),h.attr("viewBox",`${w.x-b} ${w.y-b} ${q} ${v}`)},"draw"),bt={draw:It},At={parser:Ke,db:ut,renderer:bt,styles:pt};export{At as diagram}; diff --git a/assets/chunks/sankeyDiagram-Y46BX6SQ.Dd6zI_qa.js b/assets/chunks/sankeyDiagram-Y46BX6SQ.Dd6zI_qa.js new file mode 100644 index 00000000..249fa268 --- /dev/null +++ b/assets/chunks/sankeyDiagram-Y46BX6SQ.Dd6zI_qa.js @@ -0,0 +1,8 @@ +import{_ as m,d as lt,g as _t,s as xt,b as vt,c as bt,r as wt,q as St,x as Lt,e as Et,p as At,j as H,ac as Tt}from"../app.CXGmg8Jv.js";import{o as Mt}from"./ordinal.BYWQX77i.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";import"./init.Gi6I4Gst.js";function Nt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i=h)&&(i=h)}return i}function pt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function nt(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function Pt(t){return t.target.depth}function Ct(t){return t.depth}function Ot(t,e){return e-1-t.height}function mt(t,e){return t.sourceLinks.length?t.depth:e-1}function Dt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,e){return Q(t.source,e.source)||t.index-e.index}function ht(t,e){return Q(t.target,e.target)||t.index-e.index}function Q(t,e){return t.y0-e.y0}function it(t){return t.value}function jt(t){return t.index}function zt(t){return t.nodes}function $t(t){return t.links}function ft(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function yt({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function Bt(){let t=0,e=0,i=1,a=1,h=24,d=8,p,_=jt,s=mt,o,l,x=zt,v=$t,y=6;function b(){const n={nodes:x.apply(null,arguments),links:v.apply(null,arguments)};return M(n),T(n),N(n),C(n),S(n),yt(n),n}b.update=function(n){return yt(n),n},b.nodeId=function(n){return arguments.length?(_=typeof n=="function"?n:X(n),b):_},b.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:X(n),b):s},b.nodeSort=function(n){return arguments.length?(o=n,b):o},b.nodeWidth=function(n){return arguments.length?(h=+n,b):h},b.nodePadding=function(n){return arguments.length?(d=p=+n,b):d},b.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:X(n),b):x},b.links=function(n){return arguments.length?(v=typeof n=="function"?n:X(n),b):v},b.linkSort=function(n){return arguments.length?(l=n,b):l},b.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],b):[i-t,a-e]},b.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],b):[[t,e],[i,a]]},b.iterations=function(n){return arguments.length?(y=+n,b):y};function M({nodes:n,links:f}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[_(c,r,n),c]));for(const[c,r]of f.entries()){r.index=c;let{source:k,target:w}=r;typeof k!="object"&&(k=r.source=ft(u,k)),typeof w!="object"&&(w=r.target=ft(u,w)),k.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function N({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.depth=r;for(const{target:w}of k.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.height=r;for(const{source:w}of k.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function j({nodes:n}){const f=ct(n,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of n){const k=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=k,r.x0=t+k*u,r.x1=r.x0+h,c[k]?c[k].push(r):c[k]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const f=pt(n,u=>(a-e-(u.length-1)*p)/nt(u,it));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}c=(a-c+p)/(u.length+1);for(let r=0;ru.length)-1)),R(f);for(let u=0;u0))continue;let G=(L/V-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function B(n,f,u){for(let c=n.length,r=c-2;r>=0;--r){const k=n[r];for(const w of k){let L=0,V=0;for(const{target:Y,value:et}of w.sourceLinks){let q=et*(Y.layer-w.layer);L+=I(w,Y)*q,V+=q}if(!(V>0))continue;let G=(L/V-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function O(n,f){const u=n.length>>1,c=n[u];g(n,c.y0-p,u-1,f),D(n,c.y1+p,u+1,f),g(n,a,n.length-1,f),D(n,e,0,f)}function D(n,f,u,c){for(;u1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function g(n,f,u,c){for(;u>=0;--u){const r=n[u],k=(r.y1-f)*c;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function E({sourceLinks:n,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ht);for(const{target:{targetLinks:u}}of n)u.sort(ut)}}function A(n){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of n)f.sort(ht),u.sort(ut)}function z(n,f){let u=n.y0-(n.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u+=r+p}for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u-=r}return u}function I(n,f){let u=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u+=r+p}for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u-=r}return u}return b}var st=Math.PI,rt=2*st,F=1e-6,Rt=rt-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,d){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+d)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var d=this._x1,p=this._y1,_=i-t,s=a-e,o=d-t,l=p-e,x=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(x>F)if(!(Math.abs(l*_-s*o)>F)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var v=i-d,y=a-p,b=_*_+s*s,M=v*v+y*y,T=Math.sqrt(b),N=Math.sqrt(x),C=h*Math.tan((st-Math.acos((b+x-M)/(2*T*N)))/2),j=C/N,R=C/T;Math.abs(j-1)>F&&(this._+="L"+(t+j*o)+","+(e+j*l)),this._+="A"+h+","+h+",0,0,"+ +(l*v>o*y)+","+(this._x1=t+R*_)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,d){t=+t,e=+e,i=+i,d=!!d;var p=i*Math.cos(a),_=i*Math.sin(a),s=t+p,o=e+_,l=1^d,x=d?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>F||Math.abs(this._y1-o)>F)&&(this._+="L"+s+","+o),i&&(x<0&&(x=x%rt+rt),x>Rt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(e-_)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):x>F&&(this._+="A"+i+","+i+",0,"+ +(x>=st)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Vt(t){return t[0]}function Ft(t){return t[1]}var Wt=Array.prototype.slice;function Ut(t){return t.source}function Gt(t){return t.target}function Yt(t){var e=Ut,i=Gt,a=Vt,h=Ft,d=null;function p(){var _,s=Wt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(d||(d=_=kt()),t(d,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),_)return d=null,_+""||null}return p.source=function(_){return arguments.length?(e=_,p):e},p.target=function(_){return arguments.length?(i=_,p):i},p.x=function(_){return arguments.length?(a=typeof _=="function"?_:dt(+_),p):a},p.y=function(_){return arguments.length?(h=typeof _=="function"?_:dt(+_),p):h},p.context=function(_){return arguments.length?(d=_??null,p):d},p}function qt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=function(){var t=m(function(_,s,o,l){for(o=o||{},l=_.length;l--;o[_[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:m(function(s,o,l,x,v,y,b){var M=y.length-1;switch(v){case 7:const T=x.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=x.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());x.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:m(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:m(function(s){var o=this,l=[0],x=[],v=[null],y=[],b=this.table,M="",T=0,N=0,C=2,j=1,R=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(P.yy[B]=this.yy[B]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var D=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function g(L){l.length=l.length-2*L,v.length=v.length-L,y.length=y.length-L}m(g,"popStack");function E(){var L;return L=x.pop()||S.lex()||j,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=o.symbols_[L]||L),L}m(E,"lex");for(var A,z,I,n,f={},u,c,r,k;;){if(z=l[l.length-1],this.defaultActions[z]?I=this.defaultActions[z]:((A===null||typeof A>"u")&&(A=E()),I=b[z]&&b[z][A]),typeof I>"u"||!I.length||!I[0]){var w="";k=[];for(u in b[z])this.terminals_[u]&&u>C&&k.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`: +`+S.showPosition()+` +Expecting `+k.join(", ")+", got '"+(this.terminals_[A]||A)+"'":w="Parse error on line "+(T+1)+": Unexpected "+(A==j?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(w,{text:S.match,token:this.terminals_[A]||A,line:S.yylineno,loc:O,expected:k})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+A);switch(I[0]){case 1:l.push(A),v.push(S.yytext),y.push(S.yylloc),l.push(I[1]),A=null,N=S.yyleng,M=S.yytext,T=S.yylineno,O=S.yylloc;break;case 2:if(c=this.productions_[I[1]][1],f.$=v[v.length-c],f._$={first_line:y[y.length-(c||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(c||1)].first_column,last_column:y[y.length-1].last_column},D&&(f._$.range=[y[y.length-(c||1)].range[0],y[y.length-1].range[1]]),n=this.performAction.apply(f,[M,N,T,P.yy,I[1],v,y].concat(R)),typeof n<"u")return n;c&&(l=l.slice(0,-1*c*2),v=v.slice(0,-1*c),y=y.slice(0,-1*c)),l.push(this.productions_[I[1]][0]),v.push(f.$),y.push(f._$),r=b[l[l.length-2]][l[l.length-1]],l.push(r);break;case 3:return!0}}return!0},"parse")},d=function(){var _={EOF:1,parseError:m(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:m(function(s,o){return this.yy=o||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:m(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:m(function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===x.length?this.yylloc.first_column:0)+x[x.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(s){this.unput(this.match.slice(s))},"less"),pastInput:m(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+` +`+o+"^"},"showPosition"),test_match:m(function(s,o){var l,x,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),x=s[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var y in v)this[y]=v[y];return!1}return!1},"test_match"),next:m(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,l,x;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),y=0;yo[0].length)){if(o=l,x=y,this.options.backtrack_lexer){if(s=this.test_match(l,v[y]),s!==!1)return s;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(s=this.test_match(o,v[x]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:m(function(){var o=this.next();return o||this.lex()},"lex"),begin:m(function(o){this.conditionStack.push(o)},"begin"),popState:m(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:m(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:m(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:m(function(o){this.begin(o)},"pushState"),stateStackSize:m(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:m(function(o,l,x,v){switch(x){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return _}();h.lexer=d;function p(){this.yy={}}return m(p,"Parser"),p.prototype=h,h.Parser=p,new p}();at.parser=at;var K=at,J=[],tt=[],Z=new Map,Zt=m(()=>{J=[],tt=[],Z=new Map,Lt()},"clear"),W,Jt=(W=class{constructor(e,i,a=0){this.source=e,this.target=i,this.value=a}},m(W,"SankeyLink"),W),te=m((t,e,i)=>{J.push(new Jt(t,e,i))},"addLink"),U,ee=(U=class{constructor(e){this.ID=e}},m(U,"SankeyNode"),U),ne=m(t=>{t=Et.sanitizeText(t,lt());let e=Z.get(t);return e===void 0&&(e=new ee(t),Z.set(t,e),tt.push(e)),e},"findOrCreateNode"),ie=m(()=>tt,"getNodes"),se=m(()=>J,"getLinks"),re=m(()=>({nodes:tt.map(t=>({id:t.ID})),links:J.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),oe={nodesMap:Z,getConfig:m(()=>lt().sankey,"getConfig"),getNodes:ie,getLinks:se,getGraph:re,addLink:te,findOrCreateNode:ne,getAccTitle:_t,setAccTitle:xt,getAccDescription:vt,setAccDescription:bt,getDiagramTitle:wt,setDiagramTitle:St,clear:Zt},$,gt=($=class{static next(e){return new $(e+ ++$.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},m($,"Uid"),$.count=0,$),ae={left:Ct,right:Ot,center:Dt,justify:mt},le=m(function(t,e,i,a){const{securityLevel:h,sankey:d}=lt(),p=At.sankey;let _;h==="sandbox"&&(_=H("#i"+e));const s=h==="sandbox"?H(_.nodes()[0].contentDocument.body):H("body"),o=h==="sandbox"?s.select(`[id="${e}"]`):H(`[id="${e}"]`),l=(d==null?void 0:d.width)??p.width,x=(d==null?void 0:d.height)??p.width,v=(d==null?void 0:d.useMaxWidth)??p.useMaxWidth,y=(d==null?void 0:d.nodeAlignment)??p.nodeAlignment,b=(d==null?void 0:d.prefix)??p.prefix,M=(d==null?void 0:d.suffix)??p.suffix,T=(d==null?void 0:d.showValues)??p.showValues,N=a.db.getGraph(),C=ae[y];Bt().nodeId(g=>g.id).nodeWidth(10).nodePadding(10+(T?15:0)).nodeAlign(C).extent([[0,0],[l,x]])(N);const S=Mt(It);o.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",g=>(g.uid=gt.next("node-")).id).attr("transform",function(g){return"translate("+g.x0+","+g.y0+")"}).attr("x",g=>g.x0).attr("y",g=>g.y0).append("rect").attr("height",g=>g.y1-g.y0).attr("width",g=>g.x1-g.x0).attr("fill",g=>S(g.id));const P=m(({id:g,value:E})=>T?`${g} +${b}${Math.round(E*100)/100}${M}`:g,"getText");o.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",g=>g.x0(g.y1+g.y0)/2).attr("dy",`${T?"0":"0.35"}em`).attr("text-anchor",g=>g.x0(E.uid=gt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",E=>E.source.x1).attr("x2",E=>E.target.x0);g.append("stop").attr("offset","0%").attr("stop-color",E=>S(E.source.id)),g.append("stop").attr("offset","100%").attr("stop-color",E=>S(E.target.id))}let D;switch(O){case"gradient":D=m(g=>g.uid,"coloring");break;case"source":D=m(g=>S(g.source.id),"coloring");break;case"target":D=m(g=>S(g.target.id),"coloring");break;default:D=O}B.append("path").attr("d",Kt()).attr("stroke",D).attr("stroke-width",g=>Math.max(1,g.width)),Tt(void 0,o,0,v)},"draw"),ce={draw:le},ue=m(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing"),he=K.parse.bind(K);K.parse=t=>he(ue(t));var me={parser:K,db:oe,renderer:ce};export{me as diagram}; diff --git a/assets/chunks/sequenceDiagram-G6AWOVSC.BR6TLOJa.js b/assets/chunks/sequenceDiagram-G6AWOVSC.BR6TLOJa.js new file mode 100644 index 00000000..91e9a1fc --- /dev/null +++ b/assets/chunks/sequenceDiagram-G6AWOVSC.BR6TLOJa.js @@ -0,0 +1,122 @@ +import{g as St,a as Kt,d as Se,b as Me,c as Re,e as De}from"./chunk-ASOPGD6M.9xhfAZUp.js";import{I as Ce}from"./chunk-KFBOBJHC.DtEDTmGR.js";import{_ as d,g as Oe,r as Be,q as Ve,d as at,s as se,c as Ye,b as Fe,e as _,a2 as lt,a3 as wt,v as F,l as J,x as We,i as Mt,a as qe,j as kt,k as ze,m as ae,a4 as ie,F as Ft,a5 as ne,a6 as He}from"../app.CXGmg8Jv.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";var Wt=function(){var t=d(function(pt,I,L,A){for(L=L||{},A=pt.length;A--;L[pt[A]]=I);return L},"o"),e=[1,2],o=[1,3],r=[1,4],a=[2,4],i=[1,9],c=[1,11],h=[1,13],p=[1,14],s=[1,16],f=[1,17],E=[1,18],g=[1,24],T=[1,25],m=[1,26],w=[1,27],k=[1,28],V=[1,29],M=[1,30],Y=[1,31],C=[1,32],z=[1,33],H=[1,34],Z=[1,35],et=[1,36],K=[1,37],U=[1,38],q=[1,39],R=[1,41],Q=[1,42],G=[1,43],j=[1,44],rt=[1,45],S=[1,46],y=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],P=[4,5,16,50,52,53],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],it=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],N=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],Jt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],ot=[68,69,70],dt=[1,122],Ct={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:d(function(I,L,A,b,D,l,mt){var u=l.length-1;switch(D){case 3:return b.apply(l[u]),l[u];case 4:case 9:this.$=[];break;case 5:case 10:l[u-1].push(l[u]),this.$=l[u-1];break;case 6:case 7:case 11:case 12:this.$=l[u];break;case 8:case 13:this.$=[];break;case 15:l[u].type="createParticipant",this.$=l[u];break;case 16:l[u-1].unshift({type:"boxStart",boxData:b.parseBoxData(l[u-2])}),l[u-1].push({type:"boxEnd",boxText:l[u-2]}),this.$=l[u-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(l[u-2]),sequenceIndexStep:Number(l[u-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(l[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[u-1].actor};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[u-1].actor};break;case 29:b.setDiagramTitle(l[u].substring(6)),this.$=l[u].substring(6);break;case 30:b.setDiagramTitle(l[u].substring(7)),this.$=l[u].substring(7);break;case 31:this.$=l[u].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=l[u].trim(),b.setAccDescription(this.$);break;case 34:l[u-1].unshift({type:"loopStart",loopText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.LOOP_START}),l[u-1].push({type:"loopEnd",loopText:l[u-2],signalType:b.LINETYPE.LOOP_END}),this.$=l[u-1];break;case 35:l[u-1].unshift({type:"rectStart",color:b.parseMessage(l[u-2]),signalType:b.LINETYPE.RECT_START}),l[u-1].push({type:"rectEnd",color:b.parseMessage(l[u-2]),signalType:b.LINETYPE.RECT_END}),this.$=l[u-1];break;case 36:l[u-1].unshift({type:"optStart",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.OPT_START}),l[u-1].push({type:"optEnd",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.OPT_END}),this.$=l[u-1];break;case 37:l[u-1].unshift({type:"altStart",altText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.ALT_START}),l[u-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=l[u-1];break;case 38:l[u-1].unshift({type:"parStart",parText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.PAR_START}),l[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[u-1];break;case 39:l[u-1].unshift({type:"parStart",parText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.PAR_OVER_START}),l[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[u-1];break;case 40:l[u-1].unshift({type:"criticalStart",criticalText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.CRITICAL_START}),l[u-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=l[u-1];break;case 41:l[u-1].unshift({type:"breakStart",breakText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.BREAK_START}),l[u-1].push({type:"breakEnd",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.BREAK_END}),this.$=l[u-1];break;case 43:this.$=l[u-3].concat([{type:"option",optionText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.CRITICAL_OPTION},l[u]]);break;case 45:this.$=l[u-3].concat([{type:"and",parText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.PAR_AND},l[u]]);break;case 47:this.$=l[u-3].concat([{type:"else",altText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.ALT_ELSE},l[u]]);break;case 48:l[u-3].draw="participant",l[u-3].type="addParticipant",l[u-3].description=b.parseMessage(l[u-1]),this.$=l[u-3];break;case 49:l[u-1].draw="participant",l[u-1].type="addParticipant",this.$=l[u-1];break;case 50:l[u-3].draw="actor",l[u-3].type="addParticipant",l[u-3].description=b.parseMessage(l[u-1]),this.$=l[u-3];break;case 51:l[u-1].draw="actor",l[u-1].type="addParticipant",this.$=l[u-1];break;case 52:l[u-1].type="destroyParticipant",this.$=l[u-1];break;case 53:this.$=[l[u-1],{type:"addNote",placement:l[u-2],actor:l[u-1].actor,text:l[u]}];break;case 54:l[u-2]=[].concat(l[u-1],l[u-1]).slice(0,2),l[u-2][0]=l[u-2][0].actor,l[u-2][1]=l[u-2][1].actor,this.$=[l[u-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:l[u-2].slice(0,2),text:l[u]}];break;case 55:this.$=[l[u-1],{type:"addLinks",actor:l[u-1].actor,text:l[u]}];break;case 56:this.$=[l[u-1],{type:"addALink",actor:l[u-1].actor,text:l[u]}];break;case 57:this.$=[l[u-1],{type:"addProperties",actor:l[u-1].actor,text:l[u]}];break;case 58:this.$=[l[u-1],{type:"addDetails",actor:l[u-1].actor,text:l[u]}];break;case 61:this.$=[l[u-2],l[u]];break;case 62:this.$=l[u];break;case 63:this.$=b.PLACEMENT.LEFTOF;break;case 64:this.$=b.PLACEMENT.RIGHTOF;break;case 65:this.$=[l[u-4],l[u-1],{type:"addMessage",from:l[u-4].actor,to:l[u-1].actor,signalType:l[u-3],msg:l[u],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[u-1].actor}];break;case 66:this.$=[l[u-4],l[u-1],{type:"addMessage",from:l[u-4].actor,to:l[u-1].actor,signalType:l[u-3],msg:l[u]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[u-4].actor}];break;case 67:this.$=[l[u-3],l[u-1],{type:"addMessage",from:l[u-3].actor,to:l[u-1].actor,signalType:l[u-2],msg:l[u]}];break;case 68:this.$={type:"addParticipant",actor:l[u]};break;case 69:this.$=b.LINETYPE.SOLID_OPEN;break;case 70:this.$=b.LINETYPE.DOTTED_OPEN;break;case 71:this.$=b.LINETYPE.SOLID;break;case 72:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=b.LINETYPE.DOTTED;break;case 74:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=b.LINETYPE.SOLID_CROSS;break;case 76:this.$=b.LINETYPE.DOTTED_CROSS;break;case 77:this.$=b.LINETYPE.SOLID_POINT;break;case 78:this.$=b.LINETYPE.DOTTED_POINT;break;case 79:this.$=b.parseMessage(l[u].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:o,6:r},{1:[3]},{3:5,4:e,5:o,6:r},{3:6,4:e,5:o,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:c,8:8,9:10,12:12,13:h,14:p,17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},t(y,[2,5]),{9:47,12:12,13:h,14:p,17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},t(y,[2,7]),t(y,[2,8]),t(y,[2,14]),{12:48,50:K,52:U,53:q},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(y,[2,29]),t(y,[2,30]),{32:[1,61]},{34:[1,62]},t(y,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:S},{22:90,70:S},{22:91,70:S},{22:92,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(y,[2,6]),t(y,[2,15]),t(P,[2,9],{10:93}),t(y,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(y,[2,21]),{5:[1,97]},{5:[1,98]},t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(y,[2,31]),t(y,[2,32]),t($,a,{7:99}),t($,a,{7:100}),t($,a,{7:101}),t(it,a,{40:102,7:103}),t(N,a,{42:104,7:105}),t(N,a,{7:105,42:106}),t(Jt,a,{45:107,7:108}),t($,a,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:S},t(ot,[2,69]),t(ot,[2,70]),t(ot,[2,71]),t(ot,[2,72]),t(ot,[2,73]),t(ot,[2,74]),t(ot,[2,75]),t(ot,[2,76]),t(ot,[2,77]),t(ot,[2,78]),{22:118,70:S},{22:120,58:119,70:S},{70:[2,63]},{70:[2,64]},{56:121,81:dt},{56:123,81:dt},{56:124,81:dt},{56:125,81:dt},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:K,52:U,53:q},{5:[1,131]},t(y,[2,19]),t(y,[2,20]),t(y,[2,22]),t(y,[2,23]),{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,132],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,133],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,134],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,135]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,46],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,49:[1,136],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,137]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,44],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,48:[1,138],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,139]},{16:[1,140]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,42],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,47:[1,141],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,142],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{15:[1,143]},t(y,[2,49]),{15:[1,144]},t(y,[2,51]),t(y,[2,52]),{22:145,70:S},{22:146,70:S},{56:147,81:dt},{56:148,81:dt},{56:149,81:dt},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(y,[2,16]),t(P,[2,10]),{12:151,50:K,52:U,53:q},t(P,[2,12]),t(P,[2,13]),t(y,[2,18]),t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),{15:[1,152]},t(y,[2,38]),{15:[1,153]},t(y,[2,39]),t(y,[2,40]),{15:[1,154]},t(y,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:dt},{56:158,81:dt},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:S},t(P,[2,11]),t(it,a,{7:103,40:160}),t(N,a,{7:105,42:161}),t(Jt,a,{7:108,45:162}),t(y,[2,48]),t(y,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:d(function(I,L){if(L.recoverable)this.trace(I);else{var A=new Error(I);throw A.hash=L,A}},"parseError"),parse:d(function(I){var L=this,A=[0],b=[],D=[null],l=[],mt=this.table,u="",Lt=0,Zt=0,Pe=2,Qt=1,Ae=l.slice.call(arguments,1),W=Object.create(this.lexer),ut={yy:{}};for(var Ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ot)&&(ut.yy[Ot]=this.yy[Ot]);W.setInput(I,ut.yy),ut.yy.lexer=W,ut.yy.parser=this,typeof W.yylloc>"u"&&(W.yylloc={});var Bt=W.yylloc;l.push(Bt);var ke=W.options&&W.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ne(tt){A.length=A.length-2*tt,D.length=D.length-tt,l.length=l.length-tt}d(Ne,"popStack");function jt(){var tt;return tt=b.pop()||W.lex()||Qt,typeof tt!="number"&&(tt instanceof Array&&(b=tt,tt=b.pop()),tt=L.symbols_[tt]||tt),tt}d(jt,"lex");for(var X,gt,st,Vt,yt={},Pt,ht,$t,At;;){if(gt=A[A.length-1],this.defaultActions[gt]?st=this.defaultActions[gt]:((X===null||typeof X>"u")&&(X=jt()),st=mt[gt]&&mt[gt][X]),typeof st>"u"||!st.length||!st[0]){var Yt="";At=[];for(Pt in mt[gt])this.terminals_[Pt]&&Pt>Pe&&At.push("'"+this.terminals_[Pt]+"'");W.showPosition?Yt="Parse error on line "+(Lt+1)+`: +`+W.showPosition()+` +Expecting `+At.join(", ")+", got '"+(this.terminals_[X]||X)+"'":Yt="Parse error on line "+(Lt+1)+": Unexpected "+(X==Qt?"end of input":"'"+(this.terminals_[X]||X)+"'"),this.parseError(Yt,{text:W.match,token:this.terminals_[X]||X,line:W.yylineno,loc:Bt,expected:At})}if(st[0]instanceof Array&&st.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+X);switch(st[0]){case 1:A.push(X),D.push(W.yytext),l.push(W.yylloc),A.push(st[1]),X=null,Zt=W.yyleng,u=W.yytext,Lt=W.yylineno,Bt=W.yylloc;break;case 2:if(ht=this.productions_[st[1]][1],yt.$=D[D.length-ht],yt._$={first_line:l[l.length-(ht||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(ht||1)].first_column,last_column:l[l.length-1].last_column},ke&&(yt._$.range=[l[l.length-(ht||1)].range[0],l[l.length-1].range[1]]),Vt=this.performAction.apply(yt,[u,Zt,Lt,ut.yy,st[1],D,l].concat(Ae)),typeof Vt<"u")return Vt;ht&&(A=A.slice(0,-1*ht*2),D=D.slice(0,-1*ht),l=l.slice(0,-1*ht)),A.push(this.productions_[st[1]][0]),D.push(yt.$),l.push(yt._$),$t=mt[A[A.length-2]][A[A.length-1]],A.push($t);break;case 3:return!0}}return!0},"parse")},Le=function(){var pt={EOF:1,parseError:d(function(L,A){if(this.yy.parser)this.yy.parser.parseError(L,A);else throw new Error(L)},"parseError"),setInput:d(function(I,L){return this.yy=L||this.yy||{},this._input=I,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var I=this._input[0];this.yytext+=I,this.yyleng++,this.offset++,this.match+=I,this.matched+=I;var L=I.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),I},"input"),unput:d(function(I){var L=I.length,A=I.split(/(?:\r\n?|\n)/g);this._input=I+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===b.length?this.yylloc.first_column:0)+b[b.length-A.length].length-A[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(I){this.unput(this.match.slice(I))},"less"),pastInput:d(function(){var I=this.matched.substr(0,this.matched.length-this.match.length);return(I.length>20?"...":"")+I.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var I=this.match;return I.length<20&&(I+=this._input.substr(0,20-I.length)),(I.substr(0,20)+(I.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var I=this.pastInput(),L=new Array(I.length+1).join("-");return I+this.upcomingInput()+` +`+L+"^"},"showPosition"),test_match:d(function(I,L){var A,b,D;if(this.options.backtrack_lexer&&(D={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(D.yylloc.range=this.yylloc.range.slice(0))),b=I[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+I[0].length},this.yytext+=I[0],this.match+=I[0],this.matches=I,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(I[0].length),this.matched+=I[0],A=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var l in D)this[l]=D[l];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var I,L,A,b;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),l=0;lL[0].length)){if(L=A,b=l,this.options.backtrack_lexer){if(I=this.test_match(A,D[l]),I!==!1)return I;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(I=this.test_match(L,D[b]),I!==!1?I:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var L=this.next();return L||this.lex()},"lex"),begin:d(function(L){this.conditionStack.push(L)},"begin"),popState:d(function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},"topState"),pushState:d(function(L){this.begin(L)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(L,A,b,D){switch(b){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return A.yytext=A.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return A.yytext=A.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return pt}();Ct.lexer=Le;function _t(){this.yy={}}return d(_t,"Parser"),_t.prototype=Ct,Ct.Parser=_t,new _t}();Wt.parser=Wt;var Ke=Wt,v=new Ce(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),Ue=d(function(t){v.records.boxes.push({name:t.text,wrap:t.wrap??xt(),fill:t.color,actorKeys:[]}),v.records.currentBox=v.records.boxes.slice(-1)[0]},"addBox"),qt=d(function(t,e,o,r){let a=v.records.currentBox;const i=v.records.actors.get(t);if(i){if(v.records.currentBox&&i.box&&v.records.currentBox!==i.box)throw new Error(`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${v.records.currentBox.name}' at the same time.`);if(a=i.box?i.box:v.records.currentBox,i.box=a,i&&e===i.name&&o==null)return}if((o==null?void 0:o.text)==null&&(o={text:e,type:r}),(r==null||o.text==null)&&(o={text:e,type:r}),v.records.actors.set(t,{box:a,name:e,description:o.text,wrap:o.wrap??xt(),prevActor:v.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),v.records.prevActor){const c=v.records.actors.get(v.records.prevActor);c&&(c.nextActor=t)}v.records.currentBox&&v.records.currentBox.actorKeys.push(t),v.records.prevActor=t},"addActor"),Ge=d(t=>{let e,o=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},c}return v.records.messages.push({from:t,to:e,message:(o==null?void 0:o.text)??"",wrap:(o==null?void 0:o.wrap)??xt(),type:r,activate:a}),!0},"addSignal"),Je=d(function(){return v.records.boxes.length>0},"hasAtLeastOneBox"),Ze=d(function(){return v.records.boxes.some(t=>t.name)},"hasAtLeastOneBoxWithTitle"),Qe=d(function(){return v.records.messages},"getMessages"),je=d(function(){return v.records.boxes},"getBoxes"),$e=d(function(){return v.records.actors},"getActors"),t0=d(function(){return v.records.createdActors},"getCreatedActors"),e0=d(function(){return v.records.destroyedActors},"getDestroyedActors"),It=d(function(t){return v.records.actors.get(t)},"getActor"),r0=d(function(){return[...v.records.actors.keys()]},"getActorKeys"),s0=d(function(){v.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),a0=d(function(){v.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),i0=d(()=>v.records.sequenceNumbersEnabled,"showSequenceNumbers"),n0=d(function(t){v.records.wrapEnabled=t},"setWrap"),oe=d(t=>{if(t===void 0)return{};t=t.trim();const e=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(e===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}},"extractWrap"),xt=d(()=>{var t;return v.records.wrapEnabled!==void 0?v.records.wrapEnabled:((t=at().sequence)==null?void 0:t.wrap)??!1},"autoWrap"),o0=d(function(){v.reset(),We()},"clear"),c0=d(function(t){const e=t.trim(),{wrap:o,cleanedText:r}=oe(e),a={text:r,wrap:o};return J.debug(`parseMessage: ${JSON.stringify(a)}`),a},"parseMessage"),l0=d(function(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let o=e!=null&&e[1]?e[1].trim():"transparent",r=e!=null&&e[2]?e[2].trim():void 0;if(window!=null&&window.CSS)window.CSS.supports("color",o)||(o="transparent",r=t.trim());else{const c=new Option().style;c.color=o,c.color!==o&&(o="transparent",r=t.trim())}const{wrap:a,cleanedText:i}=oe(r);return{text:i?Mt(i,at()):void 0,color:o,wrap:a}},"parseBoxData"),vt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},d0={FILLED:0,OPEN:1},h0={LEFTOF:0,RIGHTOF:1,OVER:2},ce=d(function(t,e,o){const r={actor:t,placement:e,message:o.text,wrap:o.wrap??xt()},a=[].concat(t,t);v.records.notes.push(r),v.records.messages.push({from:a[0],to:a[1],message:o.text,wrap:o.wrap??xt(),type:vt.NOTE,placement:e})},"addNote"),le=d(function(t,e){const o=It(t);try{let r=Mt(e.text,at());r=r.replace(/&/g,"&"),r=r.replace(/=/g,"=");const a=JSON.parse(r);Rt(o,a)}catch(r){J.error("error while parsing actor link text",r)}},"addLinks"),p0=d(function(t,e){const o=It(t);try{const r={};let a=Mt(e.text,at());const i=a.indexOf("@");a=a.replace(/&/g,"&"),a=a.replace(/=/g,"=");const c=a.slice(0,i-1).trim(),h=a.slice(i+1).trim();r[c]=h,Rt(o,r)}catch(r){J.error("error while parsing actor link text",r)}},"addALink");function Rt(t,e){if(t.links==null)t.links=e;else for(const o in e)t.links[o]=e[o]}d(Rt,"insertLinks");var de=d(function(t,e){const o=It(t);try{const r=Mt(e.text,at()),a=JSON.parse(r);Ut(o,a)}catch(r){J.error("error while parsing actor properties text",r)}},"addProperties");function Ut(t,e){if(t.properties==null)t.properties=e;else for(const o in e)t.properties[o]=e[o]}d(Ut,"insertProperties");function he(){v.records.currentBox=void 0}d(he,"boxEnd");var pe=d(function(t,e){const o=It(t),r=document.getElementById(e.text);try{const a=r.innerHTML,i=JSON.parse(a);i.properties&&Ut(o,i.properties),i.links&&Rt(o,i.links)}catch(a){J.error("error while parsing actor details text",a)}},"addDetails"),u0=d(function(t,e){if((t==null?void 0:t.properties)!==void 0)return t.properties[e]},"getActorProperty"),ue=d(function(t){if(Array.isArray(t))t.forEach(function(e){ue(e)});else switch(t.type){case"sequenceIndex":v.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":qt(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(v.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");v.records.lastCreated=t.actor,qt(t.actor,t.actor,t.description,t.draw),v.records.createdActors.set(t.actor,v.records.messages.length);break;case"destroyParticipant":v.records.lastDestroyed=t.actor,v.records.destroyedActors.set(t.actor,v.records.messages.length);break;case"activeStart":O(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":O(t.actor,void 0,void 0,t.signalType);break;case"addNote":ce(t.actor,t.placement,t.text);break;case"addLinks":le(t.actor,t.text);break;case"addALink":p0(t.actor,t.text);break;case"addProperties":de(t.actor,t.text);break;case"addDetails":pe(t.actor,t.text);break;case"addMessage":if(v.records.lastCreated){if(t.to!==v.records.lastCreated)throw new Error("The created participant "+v.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");v.records.lastCreated=void 0}else if(v.records.lastDestroyed){if(t.to!==v.records.lastDestroyed&&t.from!==v.records.lastDestroyed)throw new Error("The destroyed participant "+v.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");v.records.lastDestroyed=void 0}O(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":Ue(t.boxData);break;case"boxEnd":he();break;case"loopStart":O(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":O(void 0,void 0,void 0,t.signalType);break;case"rectStart":O(void 0,void 0,t.color,t.signalType);break;case"rectEnd":O(void 0,void 0,void 0,t.signalType);break;case"optStart":O(void 0,void 0,t.optText,t.signalType);break;case"optEnd":O(void 0,void 0,void 0,t.signalType);break;case"altStart":O(void 0,void 0,t.altText,t.signalType);break;case"else":O(void 0,void 0,t.altText,t.signalType);break;case"altEnd":O(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":se(t.text);break;case"parStart":O(void 0,void 0,t.parText,t.signalType);break;case"and":O(void 0,void 0,t.parText,t.signalType);break;case"parEnd":O(void 0,void 0,void 0,t.signalType);break;case"criticalStart":O(void 0,void 0,t.criticalText,t.signalType);break;case"option":O(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":O(void 0,void 0,void 0,t.signalType);break;case"breakStart":O(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":O(void 0,void 0,void 0,t.signalType);break}},"apply"),te={addActor:qt,addMessage:Xe,addSignal:O,addLinks:le,addDetails:pe,addProperties:de,autoWrap:xt,setWrap:n0,enableSequenceNumbers:s0,disableSequenceNumbers:a0,showSequenceNumbers:i0,getMessages:Qe,getActors:$e,getCreatedActors:t0,getDestroyedActors:e0,getActor:It,getActorKeys:r0,getActorProperty:u0,getAccTitle:Oe,getBoxes:je,getDiagramTitle:Be,setDiagramTitle:Ve,getConfig:d(()=>at().sequence,"getConfig"),clear:o0,parseMessage:c0,parseBoxData:l0,LINETYPE:vt,ARROWTYPE:d0,PLACEMENT:h0,addNote:ce,setAccTitle:se,apply:ue,setAccDescription:Ye,getAccDescription:Fe,hasAtLeastOneBox:Je,hasAtLeastOneBoxWithTitle:Ze},g0=d(t=>`.actor { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + } + + text.actor > tspan { + fill: ${t.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${t.actorLineColor}; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${t.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${t.signalColor}; + } + + #arrowhead path { + fill: ${t.signalColor}; + stroke: ${t.signalColor}; + } + + .sequenceNumber { + fill: ${t.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${t.signalColor}; + } + + #crosshead path { + fill: ${t.signalColor}; + stroke: ${t.signalColor}; + } + + .messageText { + fill: ${t.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${t.labelBoxBorderColor}; + fill: ${t.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${t.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${t.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${t.labelBoxBorderColor}; + fill: ${t.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${t.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .activation1 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .activation2 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${t.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + } + .actor-man circle, line { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + stroke-width: 2px; + } +`,"getStyles"),f0=g0,ft=18*2,ge="actor-top",fe="actor-bottom",x0="actor-box",ee="actor-man",Gt=d(function(t,e){return Se(t,e)},"drawRect"),T0=d(function(t,e,o,r,a){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const i=e.links,c=e.actorCnt,h=e.rectData;var p="none";a&&(p="block !important");const s=t.append("g");s.attr("id","actor"+c+"_popup"),s.attr("class","actorPopupMenu"),s.attr("display",p);var f="";h.class!==void 0&&(f=" "+h.class);let E=h.width>o?h.width:o;const g=s.append("rect");if(g.attr("class","actorPopupMenuPanel"+f),g.attr("x",h.x),g.attr("y",h.height),g.attr("fill",h.fill),g.attr("stroke",h.stroke),g.attr("width",E),g.attr("height",h.height),g.attr("rx",h.rx),g.attr("ry",h.ry),i!=null){var T=20;for(let k in i){var m=s.append("a"),w=ae(i[k]);m.attr("xlink:href",w),m.attr("target","_blank"),D0(r)(k,m,h.x+10,h.height+T,E,20,{class:"actor"},r),T+=30}}return g.attr("height",T),{height:h.height+T,width:E}},"drawPopup"),y0=d(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Nt=d(async function(t,e,o=null){let r=t.append("foreignObject");const a=await ie(e.text,Ft()),c=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(a).node().getBoundingClientRect();if(r.attr("height",Math.round(c.height)).attr("width",Math.round(c.width)),e.class==="noteText"){const h=t.node().firstChild;h.setAttribute("height",c.height+2*e.textMargin);const p=h.getBBox();r.attr("x",Math.round(p.x+p.width/2-c.width/2)).attr("y",Math.round(p.y+p.height/2-c.height/2))}else if(o){let{startx:h,stopx:p,starty:s}=o;if(h>p){const f=h;h=p,p=f}r.attr("x",Math.round(h+Math.abs(h-p)/2-c.width/2)),e.class==="loopText"?r.attr("y",Math.round(s)):r.attr("y",Math.round(s-c.height))}return[r]},"drawKatex"),bt=d(function(t,e){let o=0,r=0;const a=e.text.split(_.lineBreakRegex),[i,c]=ne(e.fontSize);let h=[],p=0,s=d(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":s=d(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":s=d(()=>Math.round(e.y+(o+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":s=d(()=>Math.round(e.y+(o+r+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[f,E]of a.entries()){e.textMargin!==void 0&&e.textMargin===0&&i!==void 0&&(p=f*i);const g=t.append("text");g.attr("x",e.x),g.attr("y",s()),e.anchor!==void 0&&g.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&g.style("font-family",e.fontFamily),c!==void 0&&g.style("font-size",c),e.fontWeight!==void 0&&g.style("font-weight",e.fontWeight),e.fill!==void 0&&g.attr("fill",e.fill),e.class!==void 0&&g.attr("class",e.class),e.dy!==void 0?g.attr("dy",e.dy):p!==0&&g.attr("dy",p);const T=E||He;if(e.tspan){const m=g.append("tspan");m.attr("x",e.x),e.fill!==void 0&&m.attr("fill",e.fill),m.text(T)}else g.text(T);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(r+=(g._groups||g)[0][0].getBBox().height,o=r),h.push(g)}return h},"drawText"),xe=d(function(t,e){function o(a,i,c,h,p){return a+","+i+" "+(a+c)+","+i+" "+(a+c)+","+(i+h-p)+" "+(a+c-p*1.2)+","+(i+h)+" "+a+","+(i+h)}d(o,"genPoints");const r=t.append("polygon");return r.attr("points",o(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,bt(t,e),r},"drawLabel"),ct=-1,Te=d((t,e,o,r)=>{t.select&&o.forEach(a=>{const i=e.get(a),c=t.select("#actor"+i.actorCnt);!r.mirrorActors&&i.stopy?c.attr("y2",i.stopy+i.height/2):r.mirrorActors&&c.attr("y2",i.stopy)})},"fixLifeLineHeights"),E0=d(function(t,e,o,r){var T,m;const a=r?e.stopy:e.starty,i=e.x+e.width/2,c=a+e.height,h=t.append("g").lower();var p=h;r||(ct++,Object.keys(e.links||{}).length&&!o.forceMenus&&p.attr("onclick",y0(`actor${ct}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+ct).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),p=h.append("g"),e.actorCnt=ct,e.links!=null&&p.attr("id","root-"+ct));const s=St();var f="actor";(T=e.properties)!=null&&T.class?f=e.properties.class:s.fill="#eaeaea",r?f+=` ${fe}`:f+=` ${ge}`,s.x=e.x,s.y=a,s.width=e.width,s.height=e.height,s.class=f,s.rx=3,s.ry=3,s.name=e.name;const E=Gt(p,s);if(e.rectData=s,(m=e.properties)!=null&&m.icon){const w=e.properties.icon.trim();w.charAt(0)==="@"?Re(p,s.x+s.width-20,s.y+10,w.substr(1)):De(p,s.x+s.width-20,s.y+10,w)}Xt(o,lt(e.description))(e.description,p,s.x,s.y,s.width,s.height,{class:`actor ${x0}`},o);let g=e.height;if(E.node){const w=E.node().getBBox();e.height=w.height,g=w.height}return g},"drawActorTypeParticipant"),b0=d(function(t,e,o,r){const a=r?e.stopy:e.starty,i=e.x+e.width/2,c=a+80,h=t.append("g").lower();r||(ct++,h.append("line").attr("id","actor"+ct).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=ct);const p=t.append("g");let s=ee;r?s+=` ${fe}`:s+=` ${ge}`,p.attr("class",s),p.attr("name",e.name);const f=St();f.x=e.x,f.y=a,f.fill="#eaeaea",f.width=e.width,f.height=e.height,f.class="actor",f.rx=3,f.ry=3,p.append("line").attr("id","actor-man-torso"+ct).attr("x1",i).attr("y1",a+25).attr("x2",i).attr("y2",a+45),p.append("line").attr("id","actor-man-arms"+ct).attr("x1",i-ft/2).attr("y1",a+33).attr("x2",i+ft/2).attr("y2",a+33),p.append("line").attr("x1",i-ft/2).attr("y1",a+60).attr("x2",i).attr("y2",a+45),p.append("line").attr("x1",i).attr("y1",a+45).attr("x2",i+ft/2-2).attr("y2",a+60);const E=p.append("circle");E.attr("cx",e.x+e.width/2),E.attr("cy",a+10),E.attr("r",15),E.attr("width",e.width),E.attr("height",e.height);const g=p.node().getBBox();return e.height=g.height,Xt(o,lt(e.description))(e.description,p,f.x,f.y+35,f.width,f.height,{class:`actor ${ee}`},o),e.height},"drawActorTypeActor"),m0=d(async function(t,e,o,r){switch(e.type){case"actor":return await b0(t,e,o,r);case"participant":return await E0(t,e,o,r)}},"drawActor"),v0=d(function(t,e,o){const a=t.append("g");ye(a,e),e.name&&Xt(o)(e.name,a,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},o),a.lower()},"drawBox"),w0=d(function(t){return t.append("g")},"anchorElement"),I0=d(function(t,e,o,r,a){const i=St(),c=e.anchored;i.x=e.startx,i.y=e.starty,i.class="activation"+a%3,i.width=e.stopx-e.startx,i.height=o-e.starty,Gt(c,i)},"drawActivation"),_0=d(async function(t,e,o,r){const{boxMargin:a,boxTextMargin:i,labelBoxHeight:c,labelBoxWidth:h,messageFontFamily:p,messageFontSize:s,messageFontWeight:f}=r,E=t.append("g"),g=d(function(w,k,V,M){return E.append("line").attr("x1",w).attr("y1",k).attr("x2",V).attr("y2",M).attr("class","loopLine")},"drawLoopLine");g(e.startx,e.starty,e.stopx,e.starty),g(e.stopx,e.starty,e.stopx,e.stopy),g(e.startx,e.stopy,e.stopx,e.stopy),g(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(w){g(e.startx,w.y,e.stopx,w.y).style("stroke-dasharray","3, 3")});let T=Kt();T.text=o,T.x=e.startx,T.y=e.starty,T.fontFamily=p,T.fontSize=s,T.fontWeight=f,T.anchor="middle",T.valign="middle",T.tspan=!1,T.width=h||50,T.height=c||20,T.textMargin=i,T.class="labelText",xe(E,T),T=Ee(),T.text=e.title,T.x=e.startx+h/2+(e.stopx-e.startx)/2,T.y=e.starty+a+i,T.anchor="middle",T.valign="middle",T.textMargin=i,T.class="loopText",T.fontFamily=p,T.fontSize=s,T.fontWeight=f,T.wrap=!0;let m=lt(T.text)?await Nt(E,T,e):bt(E,T);if(e.sectionTitles!==void 0){for(const[w,k]of Object.entries(e.sectionTitles))if(k.message){T.text=k.message,T.x=e.startx+(e.stopx-e.startx)/2,T.y=e.sections[w].y+a+i,T.class="loopText",T.anchor="middle",T.valign="middle",T.tspan=!1,T.fontFamily=p,T.fontSize=s,T.fontWeight=f,T.wrap=e.wrap,lt(T.text)?(e.starty=e.sections[w].y,await Nt(E,T,e)):bt(E,T);let V=Math.round(m.map(M=>(M._groups||M)[0][0].getBBox().height).reduce((M,Y)=>M+Y));e.sections[w].height+=V-(a+i)}}return e.height=Math.round(e.stopy-e.starty),E},"drawLoop"),ye=d(function(t,e){Me(t,e)},"drawBackgroundRect"),L0=d(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),P0=d(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),A0=d(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),k0=d(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),N0=d(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),S0=d(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),M0=d(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Ee=d(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),R0=d(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Xt=function(){function t(i,c,h,p,s,f,E){const g=c.append("text").attr("x",h+s/2).attr("y",p+f/2+5).style("text-anchor","middle").text(i);a(g,E)}d(t,"byText");function e(i,c,h,p,s,f,E,g){const{actorFontSize:T,actorFontFamily:m,actorFontWeight:w}=g,[k,V]=ne(T),M=i.split(_.lineBreakRegex);for(let Y=0;Yt.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:d(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:d(function(t){this.boxes.push(t)},"addBox"),addActor:d(function(t){this.actors.push(t)},"addActor"),addLoop:d(function(t){this.loops.push(t)},"addLoop"),addMessage:d(function(t){this.messages.push(t)},"addMessage"),addNote:d(function(t){this.notes.push(t)},"addNote"),lastActor:d(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:d(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:d(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:d(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:d(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,ve(at())},"init"),updateVal:d(function(t,e,o,r){t[e]===void 0?t[e]=o:t[e]=r(o,t[e])},"updateVal"),updateBounds:d(function(t,e,o,r){const a=this;let i=0;function c(h){return d(function(s){i++;const f=a.sequenceItems.length-i+1;a.updateVal(s,"starty",e-f*n.boxMargin,Math.min),a.updateVal(s,"stopy",r+f*n.boxMargin,Math.max),a.updateVal(x.data,"startx",t-f*n.boxMargin,Math.min),a.updateVal(x.data,"stopx",o+f*n.boxMargin,Math.max),h!=="activation"&&(a.updateVal(s,"startx",t-f*n.boxMargin,Math.min),a.updateVal(s,"stopx",o+f*n.boxMargin,Math.max),a.updateVal(x.data,"starty",e-f*n.boxMargin,Math.min),a.updateVal(x.data,"stopy",r+f*n.boxMargin,Math.max))},"updateItemBounds")}d(c,"updateFn"),this.sequenceItems.forEach(c()),this.activations.forEach(c("activation"))},"updateBounds"),insert:d(function(t,e,o,r){const a=_.getMin(t,o),i=_.getMax(t,o),c=_.getMin(e,r),h=_.getMax(e,r);this.updateVal(x.data,"startx",a,Math.min),this.updateVal(x.data,"starty",c,Math.min),this.updateVal(x.data,"stopx",i,Math.max),this.updateVal(x.data,"stopy",h,Math.max),this.updateBounds(a,c,i,h)},"insert"),newActivation:d(function(t,e,o){const r=o.get(t.from),a=Dt(t.from).length||0,i=r.x+r.width/2+(a-1)*n.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+n.activationWidth,stopy:void 0,actor:t.from,anchored:B.anchorElement(e)})},"newActivation"),endActivation:d(function(t){const e=this.activations.map(function(o){return o.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:d(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:d(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:d(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:d(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:d(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:x.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:d(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:d(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:d(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=_.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:d(function(){return this.verticalPos},"getVerticalPos"),getBounds:d(function(){return{bounds:this.data,models:this.models}},"getBounds")},C0=d(async function(t,e){x.bumpVerticalPos(n.boxMargin),e.height=n.boxMargin,e.starty=x.getVerticalPos();const o=St();o.x=e.startx,o.y=e.starty,o.width=e.width||n.width,o.class="note";const r=t.append("g"),a=B.drawRect(r,o),i=Kt();i.x=e.startx,i.y=e.starty,i.width=o.width,i.dy="1em",i.text=e.message,i.class="noteText",i.fontFamily=n.noteFontFamily,i.fontSize=n.noteFontSize,i.fontWeight=n.noteFontWeight,i.anchor=n.noteAlign,i.textMargin=n.noteMargin,i.valign="center";const c=lt(i.text)?await Nt(r,i):bt(r,i),h=Math.round(c.map(p=>(p._groups||p)[0][0].getBBox().height).reduce((p,s)=>p+s));a.attr("height",h+2*n.noteMargin),e.height+=h+2*n.noteMargin,x.bumpVerticalPos(h+2*n.noteMargin),e.stopy=e.starty+h+2*n.noteMargin,e.stopx=e.startx+o.width,x.insert(e.startx,e.starty,e.stopx,e.stopy),x.models.addNote(e)},"drawNote"),Tt=d(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Et=d(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),zt=d(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function be(t,e){x.bumpVerticalPos(10);const{startx:o,stopx:r,message:a}=e,i=_.splitBreaks(a).length,c=lt(a),h=c?await wt(a,at()):F.calculateTextDimensions(a,Tt(n));if(!c){const E=h.height/i;e.height+=E,x.bumpVerticalPos(E)}let p,s=h.height-10;const f=h.width;if(o===r){p=x.getVerticalPos()+s,n.rightAngles||(s+=n.boxMargin,p=x.getVerticalPos()+s),s+=30;const E=_.getMax(f/2,n.width/2);x.insert(o-E,x.getVerticalPos()-10+s,r+E,x.getVerticalPos()+30+s)}else s+=n.boxMargin,p=x.getVerticalPos()+s,x.insert(o,p-10,r,p);return x.bumpVerticalPos(s),e.height+=s,e.stopy=e.starty+e.height,x.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),p}d(be,"boundMessage");var O0=d(async function(t,e,o,r){const{startx:a,stopx:i,starty:c,message:h,type:p,sequenceIndex:s,sequenceVisible:f}=e,E=F.calculateTextDimensions(h,Tt(n)),g=Kt();g.x=a,g.y=c+10,g.width=i-a,g.class="messageText",g.dy="1em",g.text=h,g.fontFamily=n.messageFontFamily,g.fontSize=n.messageFontSize,g.fontWeight=n.messageFontWeight,g.anchor=n.messageAlign,g.valign="center",g.textMargin=n.wrapPadding,g.tspan=!1,lt(g.text)?await Nt(t,g,{startx:a,stopx:i,starty:o}):bt(t,g);const T=E.width;let m;a===i?n.rightAngles?m=t.append("path").attr("d",`M ${a},${o} H ${a+_.getMax(n.width/2,T/2)} V ${o+25} H ${a}`):m=t.append("path").attr("d","M "+a+","+o+" C "+(a+60)+","+(o-10)+" "+(a+60)+","+(o+30)+" "+a+","+(o+20)):(m=t.append("line"),m.attr("x1",a),m.attr("y1",o),m.attr("x2",i),m.attr("y2",o)),p===r.db.LINETYPE.DOTTED||p===r.db.LINETYPE.DOTTED_CROSS||p===r.db.LINETYPE.DOTTED_POINT||p===r.db.LINETYPE.DOTTED_OPEN||p===r.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let w="";n.arrowMarkerAbsolute&&(w=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,w=w.replace(/\(/g,"\\("),w=w.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),(p===r.db.LINETYPE.SOLID||p===r.db.LINETYPE.DOTTED)&&m.attr("marker-end","url("+w+"#arrowhead)"),(p===r.db.LINETYPE.BIDIRECTIONAL_SOLID||p===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(m.attr("marker-start","url("+w+"#arrowhead)"),m.attr("marker-end","url("+w+"#arrowhead)")),(p===r.db.LINETYPE.SOLID_POINT||p===r.db.LINETYPE.DOTTED_POINT)&&m.attr("marker-end","url("+w+"#filled-head)"),(p===r.db.LINETYPE.SOLID_CROSS||p===r.db.LINETYPE.DOTTED_CROSS)&&m.attr("marker-end","url("+w+"#crosshead)"),(f||n.showSequenceNumbers)&&(m.attr("marker-start","url("+w+"#sequencenumber)"),t.append("text").attr("x",a).attr("y",o+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(s))},"drawMessage"),B0=d(function(t,e,o,r,a,i,c){let h=0,p=0,s,f=0;for(const E of r){const g=e.get(E),T=g.box;s&&s!=T&&(c||x.models.addBox(s),p+=n.boxMargin+s.margin),T&&T!=s&&(c||(T.x=h+p,T.y=a),p+=T.margin),g.width=g.width||n.width,g.height=_.getMax(g.height||n.height,n.height),g.margin=g.margin||n.actorMargin,f=_.getMax(f,g.height),o.get(g.name)&&(p+=g.width/2),g.x=h+p,g.starty=x.getVerticalPos(),x.insert(g.x,a,g.x+g.width,g.height),h+=g.width+p,g.box&&(g.box.width=h+T.margin-g.box.x),p=g.margin,s=g.box,x.models.addActor(g)}s&&!c&&x.models.addBox(s),x.bumpVerticalPos(f)},"addActorRenderingData"),Ht=d(async function(t,e,o,r){if(r){let a=0;x.bumpVerticalPos(n.boxMargin*2);for(const i of o){const c=e.get(i);c.stopy||(c.stopy=x.getVerticalPos());const h=await B.drawActor(t,c,n,!0);a=_.getMax(a,h)}x.bumpVerticalPos(a+n.boxMargin)}else for(const a of o){const i=e.get(a);await B.drawActor(t,i,n,!1)}},"drawActors"),me=d(function(t,e,o,r){let a=0,i=0;for(const c of o){const h=e.get(c),p=Y0(h),s=B.drawPopup(t,h,p,n,n.forceMenus,r);s.height>a&&(a=s.height),s.width+h.x>i&&(i=s.width+h.x)}return{maxHeight:a,maxWidth:i}},"drawActorsPopup"),ve=d(function(t){qe(n,t),t.fontFamily&&(n.actorFontFamily=n.noteFontFamily=n.messageFontFamily=t.fontFamily),t.fontSize&&(n.actorFontSize=n.noteFontSize=n.messageFontSize=t.fontSize),t.fontWeight&&(n.actorFontWeight=n.noteFontWeight=n.messageFontWeight=t.fontWeight)},"setConf"),Dt=d(function(t){return x.activations.filter(function(e){return e.actor===t})},"actorActivations"),re=d(function(t,e){const o=e.get(t),r=Dt(t),a=r.reduce(function(c,h){return _.getMin(c,h.startx)},o.x+o.width/2-1),i=r.reduce(function(c,h){return _.getMax(c,h.stopx)},o.x+o.width/2+1);return[a,i]},"activationBounds");function nt(t,e,o,r,a){x.bumpVerticalPos(o);let i=r;if(e.id&&e.message&&t[e.id]){const c=t[e.id].width,h=Tt(n);e.message=F.wrapLabel(`[${e.message}]`,c-2*n.wrapPadding,h),e.width=c,e.wrap=!0;const p=F.calculateTextDimensions(e.message,h),s=_.getMax(p.height,n.labelBoxHeight);i=r+s,J.debug(`${s} - ${e.message}`)}a(e),x.bumpVerticalPos(i)}d(nt,"adjustLoopHeightForWrap");function we(t,e,o,r,a,i,c){function h(s,f){s.x{y.add(P.from),y.add(P.to)}),m=m.filter(P=>y.has(P))}B0(s,f,E,m,0,w,!1);const C=await q0(w,f,Y,r);B.insertArrowHead(s),B.insertArrowCrossHead(s),B.insertArrowFilledHead(s),B.insertSequenceNumber(s);function z(y,P){const $=x.endActivation(y);$.starty+18>P&&($.starty=P-6,P+=12),B.drawActivation(s,$,P,n,Dt(y.from).length),x.insert($.startx,P-10,$.stopx,P)}d(z,"activeEnd");let H=1,Z=1;const et=[],K=[];let U=0;for(const y of w){let P,$,it;switch(y.type){case r.db.LINETYPE.NOTE:x.resetVerticalPos(),$=y.noteModel,await C0(s,$);break;case r.db.LINETYPE.ACTIVE_START:x.newActivation(y,s,f);break;case r.db.LINETYPE.ACTIVE_END:z(y,x.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.LOOP_END:P=x.endLoop(),await B.drawLoop(s,P,"loop",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.RECT_START:nt(C,y,n.boxMargin,n.boxMargin,N=>x.newLoop(void 0,N.message));break;case r.db.LINETYPE.RECT_END:P=x.endLoop(),K.push(P),x.models.addLoop(P),x.bumpVerticalPos(P.stopy-x.getVerticalPos());break;case r.db.LINETYPE.OPT_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.OPT_END:P=x.endLoop(),await B.drawLoop(s,P,"opt",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.ALT_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.ALT_ELSE:nt(C,y,n.boxMargin+n.boxTextMargin,n.boxMargin,N=>x.addSectionToLoop(N));break;case r.db.LINETYPE.ALT_END:P=x.endLoop(),await B.drawLoop(s,P,"alt",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N)),x.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:nt(C,y,n.boxMargin+n.boxTextMargin,n.boxMargin,N=>x.addSectionToLoop(N));break;case r.db.LINETYPE.PAR_END:P=x.endLoop(),await B.drawLoop(s,P,"par",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.AUTONUMBER:H=y.message.start||H,Z=y.message.step||Z,y.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.CRITICAL_OPTION:nt(C,y,n.boxMargin+n.boxTextMargin,n.boxMargin,N=>x.addSectionToLoop(N));break;case r.db.LINETYPE.CRITICAL_END:P=x.endLoop(),await B.drawLoop(s,P,"critical",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.BREAK_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.BREAK_END:P=x.endLoop(),await B.drawLoop(s,P,"break",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;default:try{it=y.msgModel,it.starty=x.getVerticalPos(),it.sequenceIndex=H,it.sequenceVisible=r.db.showSequenceNumbers();const N=await be(s,it);we(y,it,N,U,f,E,g),et.push({messageModel:it,lineStartY:N}),x.models.addMessage(it)}catch(N){J.error("error while drawing message",N)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(y.type)&&(H=H+Z),U++}J.debug("createdActors",E),J.debug("destroyedActors",g),await Ht(s,f,m,!1);for(const y of et)await O0(s,y.messageModel,y.lineStartY,r);n.mirrorActors&&await Ht(s,f,m,!0),K.forEach(y=>B.drawBackgroundRect(s,y)),Te(s,f,m,n);for(const y of x.models.boxes)y.height=x.getVerticalPos()-y.y,x.insert(y.x,y.y,y.x+y.width,y.height),y.startx=y.x,y.starty=y.y,y.stopx=y.startx+y.width,y.stopy=y.starty+y.height,y.stroke="rgb(0,0,0, 0.5)",B.drawBox(s,y,n);V&&x.bumpVerticalPos(n.boxMargin);const q=me(s,f,m,p),{bounds:R}=x.getBounds();R.startx===void 0&&(R.startx=0),R.starty===void 0&&(R.starty=0),R.stopx===void 0&&(R.stopx=0),R.stopy===void 0&&(R.stopy=0);let Q=R.stopy-R.starty;Q{const c=Tt(n);let h=i.actorKeys.reduce((f,E)=>f+=t.get(E).width+(t.get(E).margin||0),0);h-=2*n.boxTextMargin,i.wrap&&(i.name=F.wrapLabel(i.name,h-2*n.wrapPadding,c));const p=F.calculateTextDimensions(i.name,c);a=_.getMax(p.height,a);const s=_.getMax(h,p.width+2*n.wrapPadding);if(i.margin=n.boxTextMargin,hi.textMaxHeight=a),_.getMax(r,n.height)}d(_e,"calculateActorMargins");var F0=d(async function(t,e,o){const r=e.get(t.from),a=e.get(t.to),i=r.x,c=a.x,h=t.wrap&&t.message;let p=lt(t.message)?await wt(t.message,at()):F.calculateTextDimensions(h?F.wrapLabel(t.message,n.width,Et(n)):t.message,Et(n));const s={width:h?n.width:_.getMax(n.width,p.width+2*n.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===o.db.PLACEMENT.RIGHTOF?(s.width=h?_.getMax(n.width,p.width):_.getMax(r.width/2+a.width/2,p.width+2*n.noteMargin),s.startx=i+(r.width+n.actorMargin)/2):t.placement===o.db.PLACEMENT.LEFTOF?(s.width=h?_.getMax(n.width,p.width+2*n.noteMargin):_.getMax(r.width/2+a.width/2,p.width+2*n.noteMargin),s.startx=i-s.width+(r.width-n.actorMargin)/2):t.to===t.from?(p=F.calculateTextDimensions(h?F.wrapLabel(t.message,_.getMax(n.width,r.width),Et(n)):t.message,Et(n)),s.width=h?_.getMax(n.width,r.width):_.getMax(r.width,n.width,p.width+2*n.noteMargin),s.startx=i+(r.width-s.width)/2):(s.width=Math.abs(i+r.width/2-(c+a.width/2))+n.actorMargin,s.startx=i2,E=d(w=>h?-w:w,"adjustValue");t.from===t.to?s=p:(t.activate&&!f&&(s+=E(n.activationWidth/2-1)),[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(s+=E(3)),[o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(p-=E(3)));const g=[r,a,i,c],T=Math.abs(p-s);t.wrap&&t.message&&(t.message=F.wrapLabel(t.message,_.getMax(T+2*n.wrapPadding,n.width),Tt(n)));const m=F.calculateTextDimensions(t.message,Tt(n));return{width:_.getMax(t.wrap?0:m.width+2*n.wrapPadding,T+2*n.wrapPadding,n.width),height:0,startx:p,stopx:s,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},"buildMessageModel"),q0=d(async function(t,e,o,r){const a={},i=[];let c,h,p;for(const s of t){switch(s.id=F.random({length:10}),s.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:i.push({id:s.id,msg:s.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:s.message&&(c=i.pop(),a[c.id]=c,a[s.id]=c,i.push(c));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:c=i.pop(),a[c.id]=c;break;case r.db.LINETYPE.ACTIVE_START:{const E=e.get(s.from?s.from:s.to.actor),g=Dt(s.from?s.from:s.to.actor).length,T=E.x+E.width/2+(g-1)*n.activationWidth/2,m={startx:T,stopx:T+n.activationWidth,actor:s.from,enabled:!0};x.activations.push(m)}break;case r.db.LINETYPE.ACTIVE_END:{const E=x.activations.map(g=>g.actor).lastIndexOf(s.from);x.activations.splice(E,1).splice(0,1)}break}s.placement!==void 0?(h=await F0(s,e,r),s.noteModel=h,i.forEach(E=>{c=E,c.from=_.getMin(c.from,h.startx),c.to=_.getMax(c.to,h.startx+h.width),c.width=_.getMax(c.width,Math.abs(c.from-c.to))-n.labelBoxWidth})):(p=W0(s,e,r),s.msgModel=p,p.startx&&p.stopx&&i.length>0&&i.forEach(E=>{if(c=E,p.startx===p.stopx){const g=e.get(s.from),T=e.get(s.to);c.from=_.getMin(g.x-p.width/2,g.x-g.width/2,c.from),c.to=_.getMax(T.x+p.width/2,T.x+g.width/2,c.to),c.width=_.getMax(c.width,Math.abs(c.to-c.from))-n.labelBoxWidth}else c.from=_.getMin(p.startx,c.from),c.to=_.getMax(p.stopx,c.to),c.width=_.getMax(c.width,p.width)-n.labelBoxWidth}))}return x.activations=[],J.debug("Loop type widths:",a),a},"calculateLoopBounds"),z0={bounds:x,drawActors:Ht,drawActorsPopup:me,setConf:ve,draw:V0},J0={parser:Ke,db:te,renderer:z0,styles:f0,init:d(({wrap:t})=>{te.setWrap(t)},"init")};export{J0 as diagram}; diff --git a/assets/chunks/stateDiagram-MAYHULR4.ClYhRmpy.js b/assets/chunks/stateDiagram-MAYHULR4.ClYhRmpy.js new file mode 100644 index 00000000..ab6738ac --- /dev/null +++ b/assets/chunks/stateDiagram-MAYHULR4.ClYhRmpy.js @@ -0,0 +1 @@ +import{s as W,a as N,b as P}from"./chunk-7U56Z5CX.BNSSxKI9.js";import{_ as u,d as t,j as H,l as S,k as C,e as z,a1 as U,a8 as F,v as O}from"../app.CXGmg8Jv.js";import{G as J}from"./graph.B66Ap3eE.js";import{l as X}from"./layout.CYDrMIpX.js";import"./chunk-5HRBRIJM.CiC8nwb0.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";import"./baseUniq.DbzeOdwK.js";import"./basePickBy.DBxcSOni.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,size:I},j=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),q=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Z=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),K=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(p,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),c=Math.max(x.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",x.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Q=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),p=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let c=Math.max(x,p);c===p&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,x>p&&(l=(p-c)/2+o),Math.abs(a-B.x)p&&(l=a-(x-p)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),x<=p&&s.attr("x",a+(c-n)/2-x/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let p=e.replace(/\r\n/g,"
    ");p=p.replace(/\n/g,"
    ");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const x=y.trim();if(x.length>0){const c=g.append("tspan");if(c.text(x),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),_=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&j(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&q(n),i.type==="default"&&i.descriptions.length===0&&Z(n,i),i.type==="default"&&i.descriptions.length>0&&K(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),A=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(F),p=e.append("path").attr("d",g(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),p.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:x}=O.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",x+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,x+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,x)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",x+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",x-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const p=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,p,a,o);const x=b.padding,c=s.node().getBBox(),l=c.width+x*2,B=c.height+x*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,p)=>{const a=new J({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},yt={parser:W,db:N,renderer:ot,styles:P,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,N.clear()},"init")};export{yt as diagram}; diff --git a/assets/chunks/stateDiagram-v2-4JROLMXI.B4BlUuF9.js b/assets/chunks/stateDiagram-v2-4JROLMXI.B4BlUuF9.js new file mode 100644 index 00000000..08cc258e --- /dev/null +++ b/assets/chunks/stateDiagram-v2-4JROLMXI.B4BlUuF9.js @@ -0,0 +1 @@ +import{s as e,a as t,c as r,b as s}from"./chunk-7U56Z5CX.BNSSxKI9.js";import{_ as i}from"../app.CXGmg8Jv.js";import"./chunk-5HRBRIJM.CiC8nwb0.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";var p={parser:e,db:t,renderer:r,styles:s,init:i(a=>{a.state||(a.state={}),a.state.arrowMarkerAbsolute=a.arrowMarkerAbsolute,t.clear()},"init")};export{p as diagram}; diff --git a/assets/chunks/theme.C7mmewBt.js b/assets/chunks/theme.C7mmewBt.js new file mode 100644 index 00000000..0914a343 --- /dev/null +++ b/assets/chunks/theme.C7mmewBt.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/VPLocalSearchBox.7XG85Pby.js","assets/chunks/framework.BDUoXecB.js","assets/chunks/index.CRBiAhYs.js"])))=>i.map(i=>d[i]); +import{d as m,o as a,c as u,r as c,n as I,a as U,t as N,b as k,w as p,e as h,T as ue,_ as g,u as De,i as Oe,f as je,g as de,h as y,j as d,k as i,l as q,m as ae,p as T,q as D,s as Q,v as z,x as pe,y as ve,z as Ge,A as Ue,B as K,F as M,C as H,D as ye,E as Z,G as _,H as E,I as Pe,J as W,K as G,L as x,M as ze,N as Le,O as re,P as Ve,Q as Se,R as ee,S as qe,U as Ke,V as Te,W as we,X as Ne,Y as Re,Z as We,$ as Je,a0 as Xe,a1 as Ye,a2 as Qe}from"./framework.BDUoXecB.js";const Ze=m({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(s){return(e,t)=>(a(),u("span",{class:I(["VPBadge",e.type])},[c(e.$slots,"default",{},()=>[U(N(e.text),1)])],2))}}),xe={key:0,class:"VPBackdrop"},et=m({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(s){return(e,t)=>(a(),k(ue,{name:"fade"},{default:p(()=>[e.show?(a(),u("div",xe)):h("",!0)]),_:1}))}}),tt=g(et,[["__scopeId","data-v-54a304ca"]]),L=De;function nt(s,e){let t,o=!1;return()=>{t&&clearTimeout(t),o?t=setTimeout(s,e):(s(),(o=!0)&&setTimeout(()=>o=!1,e))}}function ie(s){return/^\//.test(s)?s:`/${s}`}function fe(s){const{pathname:e,search:t,hash:o,protocol:n}=new URL(s,"http://a.com");if(Oe(s)||s.startsWith("#")||!n.startsWith("http")||!je(e))return s;const{site:r}=L(),l=e.endsWith("/")||e.endsWith(".html")?s:s.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,r.value.cleanUrls?"":".html")}${t}${o}`);return de(l)}function J({correspondingLink:s=!1}={}){const{site:e,localeIndex:t,page:o,theme:n,hash:r}=L(),l=y(()=>{var v,$;return{label:(v=e.value.locales[t.value])==null?void 0:v.label,link:(($=e.value.locales[t.value])==null?void 0:$.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:y(()=>Object.entries(e.value.locales).flatMap(([v,$])=>l.value.label===$.label?[]:{text:$.label,link:ot($.link||(v==="root"?"/":`/${v}/`),n.value.i18nRouting!==!1&&s,o.value.relativePath.slice(l.value.link.length-1),!e.value.cleanUrls)+r.value})),currentLang:l}}function ot(s,e,t,o){return e?s.replace(/\/$/,"")+ie(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,o?".html":"")):s}const st={class:"NotFound"},at={class:"code"},rt={class:"title"},it={class:"quote"},lt={class:"action"},ct=["href","aria-label"],ut=m({__name:"NotFound",setup(s){const{theme:e}=L(),{currentLang:t}=J();return(o,n)=>{var r,l,f,v,$;return a(),u("div",st,[d("p",at,N(((r=i(e).notFound)==null?void 0:r.code)??"404"),1),d("h1",rt,N(((l=i(e).notFound)==null?void 0:l.title)??"PAGE NOT FOUND"),1),n[0]||(n[0]=d("div",{class:"divider"},null,-1)),d("blockquote",it,N(((f=i(e).notFound)==null?void 0:f.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),d("div",lt,[d("a",{class:"link",href:i(de)(i(t).link),"aria-label":((v=i(e).notFound)==null?void 0:v.linkLabel)??"go to home"},N((($=i(e).notFound)==null?void 0:$.linkText)??"Take me home"),9,ct)])])}}}),dt=g(ut,[["__scopeId","data-v-6ff51ddd"]]);function Ie(s,e){if(Array.isArray(s))return X(s);if(s==null)return[];e=ie(e);const t=Object.keys(s).sort((n,r)=>r.split("/").length-n.split("/").length).find(n=>e.startsWith(ie(n))),o=t?s[t]:[];return Array.isArray(o)?X(o):X(o.items,o.base)}function pt(s){const e=[];let t=0;for(const o in s){const n=s[o];if(n.items){t=e.push(n);continue}e[t]||e.push({items:[]}),e[t].items.push(n)}return e}function vt(s){const e=[];function t(o){for(const n of o)n.text&&n.link&&e.push({text:n.text,link:n.link,docFooterText:n.docFooterText}),n.items&&t(n.items)}return t(s),e}function le(s,e){return Array.isArray(e)?e.some(t=>le(s,t)):q(s,e.link)?!0:e.items?le(s,e.items):!1}function X(s,e){return[...s].map(t=>{const o={...t},n=o.base||e;return n&&o.link&&(o.link=n+o.link),o.items&&(o.items=X(o.items,n)),o})}function O(){const{frontmatter:s,page:e,theme:t}=L(),o=ae("(min-width: 960px)"),n=T(!1),r=y(()=>{const A=t.value.sidebar,S=e.value.relativePath;return A?Ie(A,S):[]}),l=T(r.value);D(r,(A,S)=>{JSON.stringify(A)!==JSON.stringify(S)&&(l.value=r.value)});const f=y(()=>s.value.sidebar!==!1&&l.value.length>0&&s.value.layout!=="home"),v=y(()=>$?s.value.aside==null?t.value.aside==="left":s.value.aside==="left":!1),$=y(()=>s.value.layout==="home"?!1:s.value.aside!=null?!!s.value.aside:t.value.aside!==!1),V=y(()=>f.value&&o.value),b=y(()=>f.value?pt(l.value):[]);function P(){n.value=!0}function w(){n.value=!1}function B(){n.value?w():P()}return{isOpen:n,sidebar:l,sidebarGroups:b,hasSidebar:f,hasAside:$,leftAside:v,isSidebarEnabled:V,open:P,close:w,toggle:B}}function ft(s,e){let t;Q(()=>{t=s.value?document.activeElement:void 0}),z(()=>{window.addEventListener("keyup",o)}),pe(()=>{window.removeEventListener("keyup",o)});function o(n){n.key==="Escape"&&s.value&&(e(),t==null||t.focus())}}function ht(s){const{page:e,hash:t}=L(),o=T(!1),n=y(()=>s.value.collapsed!=null),r=y(()=>!!s.value.link),l=T(!1),f=()=>{l.value=q(e.value.relativePath,s.value.link)};D([e,s,t],f),z(f);const v=y(()=>l.value?!0:s.value.items?le(e.value.relativePath,s.value.items):!1),$=y(()=>!!(s.value.items&&s.value.items.length));Q(()=>{o.value=!!(n.value&&s.value.collapsed)}),ve(()=>{(l.value||v.value)&&(o.value=!1)});function V(){n.value&&(o.value=!o.value)}return{collapsed:o,collapsible:n,isLink:r,isActiveLink:l,hasActiveLink:v,hasChildren:$,toggle:V}}function mt(){const{hasSidebar:s}=O(),e=ae("(min-width: 960px)"),t=ae("(min-width: 1280px)");return{isAsideEnabled:y(()=>!t.value&&!e.value?!1:s.value?t.value:e.value)}}const ce=[];function Me(s){return typeof s.outline=="object"&&!Array.isArray(s.outline)&&s.outline.label||s.outlineTitle||"On this page"}function he(s){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const o=Number(t.tagName[1]);return{element:t,title:_t(t),link:"#"+t.id,level:o}});return kt(e,s)}function _t(s){let e="";for(const t of s.childNodes)if(t.nodeType===1){if(t.classList.contains("VPBadge")||t.classList.contains("header-anchor")||t.classList.contains("ignore-header"))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function kt(s,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[o,n]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;return $t(s,o,n)}function bt(s,e){const{isAsideEnabled:t}=mt(),o=nt(r,100);let n=null;z(()=>{requestAnimationFrame(r),window.addEventListener("scroll",o)}),Ge(()=>{l(location.hash)}),pe(()=>{window.removeEventListener("scroll",o)});function r(){if(!t.value)return;const f=window.scrollY,v=window.innerHeight,$=document.body.offsetHeight,V=Math.abs(f+v-$)<1,b=ce.map(({element:w,link:B})=>({link:B,top:gt(w)})).filter(({top:w})=>!Number.isNaN(w)).sort((w,B)=>w.top-B.top);if(!b.length){l(null);return}if(f<1){l(null);return}if(V){l(b[b.length-1].link);return}let P=null;for(const{link:w,top:B}of b){if(B>f+Ue()+4)break;P=w}l(P)}function l(f){n&&n.classList.remove("active"),f==null?n=null:n=s.value.querySelector(`a[href="${decodeURIComponent(f)}"]`);const v=n;v?(v.classList.add("active"),e.value.style.top=v.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function gt(s){let e=0;for(;s!==document.body;){if(s===null)return NaN;e+=s.offsetTop,s=s.offsetParent}return e}function $t(s,e,t){ce.length=0;const o=[],n=[];return s.forEach(r=>{const l={...r,children:[]};let f=n[n.length-1];for(;f&&f.level>=l.level;)n.pop(),f=n[n.length-1];if(l.element.classList.contains("ignore-header")||f&&"shouldIgnore"in f){n.push({level:l.level,shouldIgnore:!0});return}l.level>t||l.level{const n=K("VPDocOutlineItem",!0);return a(),u("ul",{class:I(["VPDocOutlineItem",t.root?"root":"nested"])},[(a(!0),u(M,null,H(t.headers,({children:r,link:l,title:f})=>(a(),u("li",null,[d("a",{class:"outline-link",href:l,onClick:e,title:f},N(f),9,yt),r!=null&&r.length?(a(),k(n,{key:0,headers:r},null,8,["headers"])):h("",!0)]))),256))],2)}}}),Be=g(Pt,[["__scopeId","data-v-53c99d69"]]),Lt={class:"content"},Vt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},St=m({__name:"VPDocAsideOutline",setup(s){const{frontmatter:e,theme:t}=L(),o=ye([]);Z(()=>{o.value=he(e.value.outline??t.value.outline)});const n=T(),r=T();return bt(n,r),(l,f)=>(a(),u("nav",{"aria-labelledby":"doc-outline-aria-label",class:I(["VPDocAsideOutline",{"has-outline":o.value.length>0}]),ref_key:"container",ref:n},[d("div",Lt,[d("div",{class:"outline-marker",ref_key:"marker",ref:r},null,512),d("div",Vt,N(i(Me)(i(t))),1),_(Be,{headers:o.value,root:!0},null,8,["headers"])])],2))}}),Tt=g(St,[["__scopeId","data-v-f610f197"]]),wt={class:"VPDocAsideCarbonAds"},Nt=m({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(s){const e=()=>null;return(t,o)=>(a(),u("div",wt,[_(i(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),It={class:"VPDocAside"},Mt=m({__name:"VPDocAside",setup(s){const{theme:e}=L();return(t,o)=>(a(),u("div",It,[c(t.$slots,"aside-top",{},void 0,!0),c(t.$slots,"aside-outline-before",{},void 0,!0),_(Tt),c(t.$slots,"aside-outline-after",{},void 0,!0),o[0]||(o[0]=d("div",{class:"spacer"},null,-1)),c(t.$slots,"aside-ads-before",{},void 0,!0),i(e).carbonAds?(a(),k(Nt,{key:0,"carbon-ads":i(e).carbonAds},null,8,["carbon-ads"])):h("",!0),c(t.$slots,"aside-ads-after",{},void 0,!0),c(t.$slots,"aside-bottom",{},void 0,!0)]))}}),Bt=g(Mt,[["__scopeId","data-v-cb998dce"]]);function At(){const{theme:s,page:e}=L();return y(()=>{const{text:t="Edit this page",pattern:o=""}=s.value.editLink||{};let n;return typeof o=="function"?n=o(e.value):n=o.replace(/:path/g,e.value.filePath),{url:n,text:t}})}function Ht(){const{page:s,theme:e,frontmatter:t}=L();return y(()=>{var $,V,b,P,w,B,A,S;const o=Ie(e.value.sidebar,s.value.relativePath),n=vt(o),r=Ct(n,C=>C.link.replace(/[?#].*$/,"")),l=r.findIndex(C=>q(s.value.relativePath,C.link)),f=(($=e.value.docFooter)==null?void 0:$.prev)===!1&&!t.value.prev||t.value.prev===!1,v=((V=e.value.docFooter)==null?void 0:V.next)===!1&&!t.value.next||t.value.next===!1;return{prev:f?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((b=r[l-1])==null?void 0:b.docFooterText)??((P=r[l-1])==null?void 0:P.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((w=r[l-1])==null?void 0:w.link)},next:v?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??((B=r[l+1])==null?void 0:B.docFooterText)??((A=r[l+1])==null?void 0:A.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((S=r[l+1])==null?void 0:S.link)}}})}function Ct(s,e){const t=new Set;return s.filter(o=>{const n=e(o);return t.has(n)?!1:t.add(n)})}const F=m({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(s){const e=s,t=y(()=>e.tag??(e.href?"a":"span")),o=y(()=>e.href&&Pe.test(e.href)||e.target==="_blank");return(n,r)=>(a(),k(E(t.value),{class:I(["VPLink",{link:n.href,"vp-external-link-icon":o.value,"no-icon":n.noIcon}]),href:n.href?i(fe)(n.href):void 0,target:n.target??(o.value?"_blank":void 0),rel:n.rel??(o.value?"noreferrer":void 0)},{default:p(()=>[c(n.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),Et={class:"VPLastUpdated"},Ft=["datetime"],Dt=m({__name:"VPDocFooterLastUpdated",setup(s){const{theme:e,page:t,lang:o}=L(),n=y(()=>new Date(t.value.lastUpdated)),r=y(()=>n.value.toISOString()),l=T("");return z(()=>{Q(()=>{var f,v,$;l.value=new Intl.DateTimeFormat((v=(f=e.value.lastUpdated)==null?void 0:f.formatOptions)!=null&&v.forceLocale?o.value:void 0,(($=e.value.lastUpdated)==null?void 0:$.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(n.value)})}),(f,v)=>{var $;return a(),u("p",Et,[U(N((($=i(e).lastUpdated)==null?void 0:$.text)||i(e).lastUpdatedText||"Last updated")+": ",1),d("time",{datetime:r.value},N(l.value),9,Ft)])}}}),Ot=g(Dt,[["__scopeId","data-v-1bb0c8a8"]]),jt={key:0,class:"VPDocFooter"},Gt={key:0,class:"edit-info"},Ut={key:0,class:"edit-link"},zt={key:1,class:"last-updated"},qt={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},Kt={class:"pager"},Rt=["innerHTML"],Wt=["innerHTML"],Jt={class:"pager"},Xt=["innerHTML"],Yt=["innerHTML"],Qt=m({__name:"VPDocFooter",setup(s){const{theme:e,page:t,frontmatter:o}=L(),n=At(),r=Ht(),l=y(()=>e.value.editLink&&o.value.editLink!==!1),f=y(()=>t.value.lastUpdated),v=y(()=>l.value||f.value||r.value.prev||r.value.next);return($,V)=>{var b,P,w,B;return v.value?(a(),u("footer",jt,[c($.$slots,"doc-footer-before",{},void 0,!0),l.value||f.value?(a(),u("div",Gt,[l.value?(a(),u("div",Ut,[_(F,{class:"edit-link-button",href:i(n).url,"no-icon":!0},{default:p(()=>[V[0]||(V[0]=d("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),U(" "+N(i(n).text),1)]),_:1},8,["href"])])):h("",!0),f.value?(a(),u("div",zt,[_(Ot)])):h("",!0)])):h("",!0),(b=i(r).prev)!=null&&b.link||(P=i(r).next)!=null&&P.link?(a(),u("nav",qt,[V[1]||(V[1]=d("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),d("div",Kt,[(w=i(r).prev)!=null&&w.link?(a(),k(F,{key:0,class:"pager-link prev",href:i(r).prev.link},{default:p(()=>{var A;return[d("span",{class:"desc",innerHTML:((A=i(e).docFooter)==null?void 0:A.prev)||"Previous page"},null,8,Rt),d("span",{class:"title",innerHTML:i(r).prev.text},null,8,Wt)]}),_:1},8,["href"])):h("",!0)]),d("div",Jt,[(B=i(r).next)!=null&&B.link?(a(),k(F,{key:0,class:"pager-link next",href:i(r).next.link},{default:p(()=>{var A;return[d("span",{class:"desc",innerHTML:((A=i(e).docFooter)==null?void 0:A.next)||"Next page"},null,8,Xt),d("span",{class:"title",innerHTML:i(r).next.text},null,8,Yt)]}),_:1},8,["href"])):h("",!0)])])):h("",!0)])):h("",!0)}}}),Zt=g(Qt,[["__scopeId","data-v-1bcd8184"]]),xt={class:"container"},en={class:"aside-container"},tn={class:"aside-content"},nn={class:"content"},on={class:"content-container"},sn={class:"main"},an=m({__name:"VPDoc",setup(s){const{theme:e}=L(),t=W(),{hasSidebar:o,hasAside:n,leftAside:r}=O(),l=y(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(f,v)=>{const $=K("Content");return a(),u("div",{class:I(["VPDoc",{"has-sidebar":i(o),"has-aside":i(n)}])},[c(f.$slots,"doc-top",{},void 0,!0),d("div",xt,[i(n)?(a(),u("div",{key:0,class:I(["aside",{"left-aside":i(r)}])},[v[0]||(v[0]=d("div",{class:"aside-curtain"},null,-1)),d("div",en,[d("div",tn,[_(Bt,null,{"aside-top":p(()=>[c(f.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":p(()=>[c(f.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":p(()=>[c(f.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":p(()=>[c(f.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":p(()=>[c(f.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":p(()=>[c(f.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):h("",!0),d("div",nn,[d("div",on,[c(f.$slots,"doc-before",{},void 0,!0),d("main",sn,[_($,{class:I(["vp-doc",[l.value,i(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),_(Zt,null,{"doc-footer-before":p(()=>[c(f.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),c(f.$slots,"doc-after",{},void 0,!0)])])]),c(f.$slots,"doc-bottom",{},void 0,!0)],2)}}}),rn=g(an,[["__scopeId","data-v-e6f2a212"]]),ln=m({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(s){const e=s,t=y(()=>e.href&&Pe.test(e.href)),o=y(()=>e.tag||(e.href?"a":"button"));return(n,r)=>(a(),k(E(o.value),{class:I(["VPButton",[n.size,n.theme]]),href:n.href?i(fe)(n.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:p(()=>[U(N(n.text),1)]),_:1},8,["class","href","target","rel"]))}}),cn=g(ln,[["__scopeId","data-v-93dc4167"]]),un=["src","alt"],dn=m({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(s){return(e,t)=>{const o=K("VPImage",!0);return e.image?(a(),u(M,{key:0},[typeof e.image=="string"||"src"in e.image?(a(),u("img",G({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:i(de)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,un)):(a(),u(M,{key:1},[_(o,G({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),_(o,G({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):h("",!0)}}}),Y=g(dn,[["__scopeId","data-v-ab19afbb"]]),pn={class:"container"},vn={class:"main"},fn={key:0,class:"name"},hn=["innerHTML"],mn=["innerHTML"],_n=["innerHTML"],kn={key:0,class:"actions"},bn={key:0,class:"image"},gn={class:"image-container"},$n=m({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(s){const e=x("hero-image-slot-exists");return(t,o)=>(a(),u("div",{class:I(["VPHero",{"has-image":t.image||i(e)}])},[d("div",pn,[d("div",vn,[c(t.$slots,"home-hero-info-before",{},void 0,!0),c(t.$slots,"home-hero-info",{},()=>[t.name?(a(),u("h1",fn,[d("span",{innerHTML:t.name,class:"clip"},null,8,hn)])):h("",!0),t.text?(a(),u("p",{key:1,innerHTML:t.text,class:"text"},null,8,mn)):h("",!0),t.tagline?(a(),u("p",{key:2,innerHTML:t.tagline,class:"tagline"},null,8,_n)):h("",!0)],!0),c(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(a(),u("div",kn,[(a(!0),u(M,null,H(t.actions,n=>(a(),u("div",{key:n.link,class:"action"},[_(cn,{tag:"a",size:"medium",theme:n.theme,text:n.text,href:n.link,target:n.target,rel:n.rel},null,8,["theme","text","href","target","rel"])]))),128))])):h("",!0),c(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||i(e)?(a(),u("div",bn,[d("div",gn,[o[0]||(o[0]=d("div",{class:"image-bg"},null,-1)),c(t.$slots,"home-hero-image",{},()=>[t.image?(a(),k(Y,{key:0,class:"image-src",image:t.image},null,8,["image"])):h("",!0)],!0)])])):h("",!0)])],2))}}),yn=g($n,[["__scopeId","data-v-b10c5094"]]),Pn=m({__name:"VPHomeHero",setup(s){const{frontmatter:e}=L();return(t,o)=>i(e).hero?(a(),k(yn,{key:0,class:"VPHomeHero",name:i(e).hero.name,text:i(e).hero.text,tagline:i(e).hero.tagline,image:i(e).hero.image,actions:i(e).hero.actions},{"home-hero-info-before":p(()=>[c(t.$slots,"home-hero-info-before")]),"home-hero-info":p(()=>[c(t.$slots,"home-hero-info")]),"home-hero-info-after":p(()=>[c(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":p(()=>[c(t.$slots,"home-hero-actions-after")]),"home-hero-image":p(()=>[c(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):h("",!0)}}),Ln={class:"box"},Vn={key:0,class:"icon"},Sn=["innerHTML"],Tn=["innerHTML"],wn=["innerHTML"],Nn={key:4,class:"link-text"},In={class:"link-text-value"},Mn=m({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(s){return(e,t)=>(a(),k(F,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:p(()=>[d("article",Ln,[typeof e.icon=="object"&&e.icon.wrap?(a(),u("div",Vn,[_(Y,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(a(),k(Y,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(a(),u("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Sn)):h("",!0),d("h2",{class:"title",innerHTML:e.title},null,8,Tn),e.details?(a(),u("p",{key:3,class:"details",innerHTML:e.details},null,8,wn)):h("",!0),e.linkText?(a(),u("div",Nn,[d("p",In,[U(N(e.linkText)+" ",1),t[0]||(t[0]=d("span",{class:"vpi-arrow-right link-text-icon"},null,-1))])])):h("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),Bn=g(Mn,[["__scopeId","data-v-bd37d1a2"]]),An={key:0,class:"VPFeatures"},Hn={class:"container"},Cn={class:"items"},En=m({__name:"VPFeatures",props:{features:{}},setup(s){const e=s,t=y(()=>{const o=e.features.length;if(o){if(o===2)return"grid-2";if(o===3)return"grid-3";if(o%3===0)return"grid-6";if(o>3)return"grid-4"}else return});return(o,n)=>o.features?(a(),u("div",An,[d("div",Hn,[d("div",Cn,[(a(!0),u(M,null,H(o.features,r=>(a(),u("div",{key:r.title,class:I(["item",[t.value]])},[_(Bn,{icon:r.icon,title:r.title,details:r.details,link:r.link,"link-text":r.linkText,rel:r.rel,target:r.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):h("",!0)}}),Fn=g(En,[["__scopeId","data-v-b1eea84a"]]),Dn=m({__name:"VPHomeFeatures",setup(s){const{frontmatter:e}=L();return(t,o)=>i(e).features?(a(),k(Fn,{key:0,class:"VPHomeFeatures",features:i(e).features},null,8,["features"])):h("",!0)}}),On=m({__name:"VPHomeContent",setup(s){const{width:e}=ze({initialWidth:0,includeScrollbar:!1});return(t,o)=>(a(),u("div",{class:"vp-doc container",style:Le(i(e)?{"--vp-offset":`calc(50% - ${i(e)/2}px)`}:{})},[c(t.$slots,"default",{},void 0,!0)],4))}}),jn=g(On,[["__scopeId","data-v-c141a4bd"]]),Gn={class:"VPHome"},Un=m({__name:"VPHome",setup(s){const{frontmatter:e}=L();return(t,o)=>{const n=K("Content");return a(),u("div",Gn,[c(t.$slots,"home-hero-before",{},void 0,!0),_(Pn,null,{"home-hero-info-before":p(()=>[c(t.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":p(()=>[c(t.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":p(()=>[c(t.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":p(()=>[c(t.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":p(()=>[c(t.$slots,"home-hero-image",{},void 0,!0)]),_:3}),c(t.$slots,"home-hero-after",{},void 0,!0),c(t.$slots,"home-features-before",{},void 0,!0),_(Dn),c(t.$slots,"home-features-after",{},void 0,!0),i(e).markdownStyles!==!1?(a(),k(jn,{key:0},{default:p(()=>[_(n)]),_:1})):(a(),k(n,{key:1}))])}}}),zn=g(Un,[["__scopeId","data-v-07b1ad08"]]),qn={},Kn={class:"VPPage"};function Rn(s,e){const t=K("Content");return a(),u("div",Kn,[c(s.$slots,"page-top"),_(t),c(s.$slots,"page-bottom")])}const Wn=g(qn,[["render",Rn]]),Jn=m({__name:"VPContent",setup(s){const{page:e,frontmatter:t}=L(),{hasSidebar:o}=O();return(n,r)=>(a(),u("div",{class:I(["VPContent",{"has-sidebar":i(o),"is-home":i(t).layout==="home"}]),id:"VPContent"},[i(e).isNotFound?c(n.$slots,"not-found",{key:0},()=>[_(dt)],!0):i(t).layout==="page"?(a(),k(Wn,{key:1},{"page-top":p(()=>[c(n.$slots,"page-top",{},void 0,!0)]),"page-bottom":p(()=>[c(n.$slots,"page-bottom",{},void 0,!0)]),_:3})):i(t).layout==="home"?(a(),k(zn,{key:2},{"home-hero-before":p(()=>[c(n.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":p(()=>[c(n.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":p(()=>[c(n.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":p(()=>[c(n.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":p(()=>[c(n.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":p(()=>[c(n.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":p(()=>[c(n.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":p(()=>[c(n.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":p(()=>[c(n.$slots,"home-features-after",{},void 0,!0)]),_:3})):i(t).layout&&i(t).layout!=="doc"?(a(),k(E(i(t).layout),{key:3})):(a(),k(rn,{key:4},{"doc-top":p(()=>[c(n.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":p(()=>[c(n.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":p(()=>[c(n.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":p(()=>[c(n.$slots,"doc-before",{},void 0,!0)]),"doc-after":p(()=>[c(n.$slots,"doc-after",{},void 0,!0)]),"aside-top":p(()=>[c(n.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":p(()=>[c(n.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":p(()=>[c(n.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":p(()=>[c(n.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":p(()=>[c(n.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":p(()=>[c(n.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),Xn=g(Jn,[["__scopeId","data-v-9a6c75ad"]]),Yn={class:"container"},Qn=["innerHTML"],Zn=["innerHTML"],xn=m({__name:"VPFooter",setup(s){const{theme:e,frontmatter:t}=L(),{hasSidebar:o}=O();return(n,r)=>i(e).footer&&i(t).footer!==!1?(a(),u("footer",{key:0,class:I(["VPFooter",{"has-sidebar":i(o)}])},[d("div",Yn,[i(e).footer.message?(a(),u("p",{key:0,class:"message",innerHTML:i(e).footer.message},null,8,Qn)):h("",!0),i(e).footer.copyright?(a(),u("p",{key:1,class:"copyright",innerHTML:i(e).footer.copyright},null,8,Zn)):h("",!0)])],2)):h("",!0)}}),eo=g(xn,[["__scopeId","data-v-566314d4"]]);function to(){const{theme:s,frontmatter:e}=L(),t=ye([]),o=y(()=>t.value.length>0);return Z(()=>{t.value=he(e.value.outline??s.value.outline)}),{headers:t,hasLocalNav:o}}const no={class:"menu-text"},oo={class:"header"},so={class:"outline"},ao=m({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(s){const e=s,{theme:t}=L(),o=T(!1),n=T(0),r=T(),l=T();function f(b){var P;(P=r.value)!=null&&P.contains(b.target)||(o.value=!1)}D(o,b=>{if(b){document.addEventListener("click",f);return}document.removeEventListener("click",f)}),re("Escape",()=>{o.value=!1}),Z(()=>{o.value=!1});function v(){o.value=!o.value,n.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function $(b){b.target.classList.contains("outline-link")&&(l.value&&(l.value.style.transition="none"),Ve(()=>{o.value=!1}))}function V(){o.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(b,P)=>(a(),u("div",{class:"VPLocalNavOutlineDropdown",style:Le({"--vp-vh":n.value+"px"}),ref_key:"main",ref:r},[b.headers.length>0?(a(),u("button",{key:0,onClick:v,class:I({open:o.value})},[d("span",no,N(i(Me)(i(t))),1),P[0]||(P[0]=d("span",{class:"vpi-chevron-right icon"},null,-1))],2)):(a(),u("button",{key:1,onClick:V},N(i(t).returnToTopLabel||"Return to top"),1)),_(ue,{name:"flyout"},{default:p(()=>[o.value?(a(),u("div",{key:0,ref_key:"items",ref:l,class:"items",onClick:$},[d("div",oo,[d("a",{class:"top-link",href:"#",onClick:V},N(i(t).returnToTopLabel||"Return to top"),1)]),d("div",so,[_(Be,{headers:b.headers},null,8,["headers"])])],512)):h("",!0)]),_:1})],4))}}),ro=g(ao,[["__scopeId","data-v-883964e0"]]),io={class:"container"},lo=["aria-expanded"],co={class:"menu-text"},uo=m({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(s){const{theme:e,frontmatter:t}=L(),{hasSidebar:o}=O(),{headers:n}=to(),{y:r}=Se(),l=T(0);z(()=>{l.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),Z(()=>{n.value=he(t.value.outline??e.value.outline)});const f=y(()=>n.value.length===0),v=y(()=>f.value&&!o.value),$=y(()=>({VPLocalNav:!0,"has-sidebar":o.value,empty:f.value,fixed:v.value}));return(V,b)=>i(t).layout!=="home"&&(!v.value||i(r)>=l.value)?(a(),u("div",{key:0,class:I($.value)},[d("div",io,[i(o)?(a(),u("button",{key:0,class:"menu","aria-expanded":V.open,"aria-controls":"VPSidebarNav",onClick:b[0]||(b[0]=P=>V.$emit("open-menu"))},[b[1]||(b[1]=d("span",{class:"vpi-align-left menu-icon"},null,-1)),d("span",co,N(i(e).sidebarMenuLabel||"Menu"),1)],8,lo)):h("",!0),_(ro,{headers:i(n),navHeight:l.value},null,8,["headers","navHeight"])])],2)):h("",!0)}}),po=g(uo,[["__scopeId","data-v-2488c25a"]]);function vo(){const s=T(!1);function e(){s.value=!0,window.addEventListener("resize",n)}function t(){s.value=!1,window.removeEventListener("resize",n)}function o(){s.value?t():e()}function n(){window.outerWidth>=768&&t()}const r=W();return D(()=>r.path,t),{isScreenOpen:s,openScreen:e,closeScreen:t,toggleScreen:o}}const fo={},ho={class:"VPSwitch",type:"button",role:"switch"},mo={class:"check"},_o={key:0,class:"icon"};function ko(s,e){return a(),u("button",ho,[d("span",mo,[s.$slots.default?(a(),u("span",_o,[c(s.$slots,"default",{},void 0,!0)])):h("",!0)])])}const bo=g(fo,[["render",ko],["__scopeId","data-v-b4ccac88"]]),go=m({__name:"VPSwitchAppearance",setup(s){const{isDark:e,theme:t}=L(),o=x("toggle-appearance",()=>{e.value=!e.value}),n=T("");return ve(()=>{n.value=e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme"}),(r,l)=>(a(),k(bo,{title:n.value,class:"VPSwitchAppearance","aria-checked":i(e),onClick:i(o)},{default:p(()=>l[0]||(l[0]=[d("span",{class:"vpi-sun sun"},null,-1),d("span",{class:"vpi-moon moon"},null,-1)])),_:1},8,["title","aria-checked","onClick"]))}}),me=g(go,[["__scopeId","data-v-be9742d9"]]),$o={key:0,class:"VPNavBarAppearance"},yo=m({__name:"VPNavBarAppearance",setup(s){const{site:e}=L();return(t,o)=>i(e).appearance&&i(e).appearance!=="force-dark"&&i(e).appearance!=="force-auto"?(a(),u("div",$o,[_(me)])):h("",!0)}}),Po=g(yo,[["__scopeId","data-v-3f90c1a5"]]),_e=T();let Ae=!1,se=0;function Lo(s){const e=T(!1);if(ee){!Ae&&Vo(),se++;const t=D(_e,o=>{var n,r,l;o===s.el.value||(n=s.el.value)!=null&&n.contains(o)?(e.value=!0,(r=s.onFocus)==null||r.call(s)):(e.value=!1,(l=s.onBlur)==null||l.call(s))});pe(()=>{t(),se--,se||So()})}return qe(e)}function Vo(){document.addEventListener("focusin",He),Ae=!0,_e.value=document.activeElement}function So(){document.removeEventListener("focusin",He)}function He(){_e.value=document.activeElement}const To={class:"VPMenuLink"},wo=["innerHTML"],No=m({__name:"VPMenuLink",props:{item:{}},setup(s){const{page:e}=L();return(t,o)=>(a(),u("div",To,[_(F,{class:I({active:i(q)(i(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon},{default:p(()=>[d("span",{innerHTML:t.item.text},null,8,wo)]),_:1},8,["class","href","target","rel","no-icon"])]))}}),te=g(No,[["__scopeId","data-v-7eeeb2dc"]]),Io={class:"VPMenuGroup"},Mo={key:0,class:"title"},Bo=m({__name:"VPMenuGroup",props:{text:{},items:{}},setup(s){return(e,t)=>(a(),u("div",Io,[e.text?(a(),u("p",Mo,N(e.text),1)):h("",!0),(a(!0),u(M,null,H(e.items,o=>(a(),u(M,null,["link"in o?(a(),k(te,{key:0,item:o},null,8,["item"])):h("",!0)],64))),256))]))}}),Ao=g(Bo,[["__scopeId","data-v-a6b0397c"]]),Ho={class:"VPMenu"},Co={key:0,class:"items"},Eo=m({__name:"VPMenu",props:{items:{}},setup(s){return(e,t)=>(a(),u("div",Ho,[e.items?(a(),u("div",Co,[(a(!0),u(M,null,H(e.items,o=>(a(),u(M,{key:JSON.stringify(o)},["link"in o?(a(),k(te,{key:0,item:o},null,8,["item"])):"component"in o?(a(),k(E(o.component),G({key:1,ref_for:!0},o.props),null,16)):(a(),k(Ao,{key:2,text:o.text,items:o.items},null,8,["text","items"]))],64))),128))])):h("",!0),c(e.$slots,"default",{},void 0,!0)]))}}),Fo=g(Eo,[["__scopeId","data-v-20ed86d6"]]),Do=["aria-expanded","aria-label"],Oo={key:0,class:"text"},jo=["innerHTML"],Go={key:1,class:"vpi-more-horizontal icon"},Uo={class:"menu"},zo=m({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(s){const e=T(!1),t=T();Lo({el:t,onBlur:o});function o(){e.value=!1}return(n,r)=>(a(),u("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:r[1]||(r[1]=l=>e.value=!0),onMouseleave:r[2]||(r[2]=l=>e.value=!1)},[d("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":n.label,onClick:r[0]||(r[0]=l=>e.value=!e.value)},[n.button||n.icon?(a(),u("span",Oo,[n.icon?(a(),u("span",{key:0,class:I([n.icon,"option-icon"])},null,2)):h("",!0),n.button?(a(),u("span",{key:1,innerHTML:n.button},null,8,jo)):h("",!0),r[3]||(r[3]=d("span",{class:"vpi-chevron-down text-icon"},null,-1))])):(a(),u("span",Go))],8,Do),d("div",Uo,[_(Fo,{items:n.items},{default:p(()=>[c(n.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),ke=g(zo,[["__scopeId","data-v-bfe7971f"]]),qo=["href","aria-label","innerHTML"],Ko=m({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(s){const e=s,t=T();z(async()=>{var r;await Ve();const n=(r=t.value)==null?void 0:r.children[0];n instanceof HTMLElement&&n.className.startsWith("vpi-social-")&&(getComputedStyle(n).maskImage||getComputedStyle(n).webkitMaskImage)==="none"&&n.style.setProperty("--icon",`url('https://api.iconify.design/simple-icons/${e.icon}.svg')`)});const o=y(()=>typeof e.icon=="object"?e.icon.svg:``);return(n,r)=>(a(),u("a",{ref_key:"el",ref:t,class:"VPSocialLink no-icon",href:n.link,"aria-label":n.ariaLabel??(typeof n.icon=="string"?n.icon:""),target:"_blank",rel:"noopener",innerHTML:o.value},null,8,qo))}}),Ro=g(Ko,[["__scopeId","data-v-60a9a2d3"]]),Wo={class:"VPSocialLinks"},Jo=m({__name:"VPSocialLinks",props:{links:{}},setup(s){return(e,t)=>(a(),u("div",Wo,[(a(!0),u(M,null,H(e.links,({link:o,icon:n,ariaLabel:r})=>(a(),k(Ro,{key:o,icon:n,link:o,ariaLabel:r},null,8,["icon","link","ariaLabel"]))),128))]))}}),be=g(Jo,[["__scopeId","data-v-e71e869c"]]),Xo={key:0,class:"group translations"},Yo={class:"trans-title"},Qo={key:1,class:"group"},Zo={class:"item appearance"},xo={class:"label"},es={class:"appearance-action"},ts={key:2,class:"group"},ns={class:"item social-links"},os=m({__name:"VPNavBarExtra",setup(s){const{site:e,theme:t}=L(),{localeLinks:o,currentLang:n}=J({correspondingLink:!0}),r=y(()=>o.value.length&&n.value.label||e.value.appearance||t.value.socialLinks);return(l,f)=>r.value?(a(),k(ke,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:p(()=>[i(o).length&&i(n).label?(a(),u("div",Xo,[d("p",Yo,N(i(n).label),1),(a(!0),u(M,null,H(i(o),v=>(a(),k(te,{key:v.link,item:v},null,8,["item"]))),128))])):h("",!0),i(e).appearance&&i(e).appearance!=="force-dark"&&i(e).appearance!=="force-auto"?(a(),u("div",Qo,[d("div",Zo,[d("p",xo,N(i(t).darkModeSwitchLabel||"Appearance"),1),d("div",es,[_(me)])])])):h("",!0),i(t).socialLinks?(a(),u("div",ts,[d("div",ns,[_(be,{class:"social-links-list",links:i(t).socialLinks},null,8,["links"])])])):h("",!0)]),_:1})):h("",!0)}}),ss=g(os,[["__scopeId","data-v-f953d92f"]]),as=["aria-expanded"],rs=m({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(s){return(e,t)=>(a(),u("button",{type:"button",class:I(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=o=>e.$emit("click"))},t[1]||(t[1]=[d("span",{class:"container"},[d("span",{class:"top"}),d("span",{class:"middle"}),d("span",{class:"bottom"})],-1)]),10,as))}}),is=g(rs,[["__scopeId","data-v-6bee1efd"]]),ls=["innerHTML"],cs=m({__name:"VPNavBarMenuLink",props:{item:{}},setup(s){const{page:e}=L();return(t,o)=>(a(),k(F,{class:I({VPNavBarMenuLink:!0,active:i(q)(i(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,tabindex:"0"},{default:p(()=>[d("span",{innerHTML:t.item.text},null,8,ls)]),_:1},8,["class","href","target","rel","no-icon"]))}}),us=g(cs,[["__scopeId","data-v-815115f5"]]),ds=m({__name:"VPNavBarMenuGroup",props:{item:{}},setup(s){const e=s,{page:t}=L(),o=r=>"component"in r?!1:"link"in r?q(t.value.relativePath,r.link,!!e.item.activeMatch):r.items.some(o),n=y(()=>o(e.item));return(r,l)=>(a(),k(ke,{class:I({VPNavBarMenuGroup:!0,active:i(q)(i(t).relativePath,r.item.activeMatch,!!r.item.activeMatch)||n.value}),button:r.item.text,items:r.item.items},null,8,["class","button","items"]))}}),ps={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},vs=m({__name:"VPNavBarMenu",setup(s){const{theme:e}=L();return(t,o)=>i(e).nav?(a(),u("nav",ps,[o[0]||(o[0]=d("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),(a(!0),u(M,null,H(i(e).nav,n=>(a(),u(M,{key:JSON.stringify(n)},["link"in n?(a(),k(us,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(E(n.component),G({key:1,ref_for:!0},n.props),null,16)):(a(),k(ds,{key:2,item:n},null,8,["item"]))],64))),128))])):h("",!0)}}),fs=g(vs,[["__scopeId","data-v-afb2845e"]]);function hs(s){const{localeIndex:e,theme:t}=L();function o(n){var B,A,S;const r=n.split("."),l=(B=t.value.search)==null?void 0:B.options,f=l&&typeof l=="object",v=f&&((S=(A=l.locales)==null?void 0:A[e.value])==null?void 0:S.translations)||null,$=f&&l.translations||null;let V=v,b=$,P=s;const w=r.pop();for(const C of r){let j=null;const R=P==null?void 0:P[C];R&&(j=P=R);const ne=b==null?void 0:b[C];ne&&(j=b=ne);const oe=V==null?void 0:V[C];oe&&(j=V=oe),R||(P=j),ne||(b=j),oe||(V=j)}return(V==null?void 0:V[w])??(b==null?void 0:b[w])??(P==null?void 0:P[w])??""}return o}const ms=["aria-label"],_s={class:"DocSearch-Button-Container"},ks={class:"DocSearch-Button-Placeholder"},ge=m({__name:"VPNavBarSearchButton",setup(s){const t=hs({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(o,n)=>(a(),u("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":i(t)("button.buttonAriaLabel")},[d("span",_s,[n[0]||(n[0]=d("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1)),d("span",ks,N(i(t)("button.buttonText")),1)]),n[1]||(n[1]=d("span",{class:"DocSearch-Button-Keys"},[d("kbd",{class:"DocSearch-Button-Key"}),d("kbd",{class:"DocSearch-Button-Key"},"K")],-1))],8,ms))}}),bs={class:"VPNavBarSearch"},gs={id:"local-search"},$s={key:1,id:"docsearch"},ys=m({__name:"VPNavBarSearch",setup(s){const e=Ke(()=>Te(()=>import("./VPLocalSearchBox.7XG85Pby.js"),__vite__mapDeps([0,1]))),t=()=>null,{theme:o}=L(),n=T(!1),r=T(!1);z(()=>{});function l(){n.value||(n.value=!0,setTimeout(f,16))}function f(){const b=new Event("keydown");b.key="k",b.metaKey=!0,window.dispatchEvent(b),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||f()},16)}function v(b){const P=b.target,w=P.tagName;return P.isContentEditable||w==="INPUT"||w==="SELECT"||w==="TEXTAREA"}const $=T(!1);re("k",b=>{(b.ctrlKey||b.metaKey)&&(b.preventDefault(),$.value=!0)}),re("/",b=>{v(b)||(b.preventDefault(),$.value=!0)});const V="local";return(b,P)=>{var w;return a(),u("div",bs,[i(V)==="local"?(a(),u(M,{key:0},[$.value?(a(),k(i(e),{key:0,onClose:P[0]||(P[0]=B=>$.value=!1)})):h("",!0),d("div",gs,[_(ge,{onClick:P[1]||(P[1]=B=>$.value=!0)})])],64)):i(V)==="algolia"?(a(),u(M,{key:1},[n.value?(a(),k(i(t),{key:0,algolia:((w=i(o).search)==null?void 0:w.options)??i(o).algolia,onVnodeBeforeMount:P[2]||(P[2]=B=>r.value=!0)},null,8,["algolia"])):h("",!0),r.value?h("",!0):(a(),u("div",$s,[_(ge,{onClick:l})]))],64)):h("",!0)])}}}),Ps=m({__name:"VPNavBarSocialLinks",setup(s){const{theme:e}=L();return(t,o)=>i(e).socialLinks?(a(),k(be,{key:0,class:"VPNavBarSocialLinks",links:i(e).socialLinks},null,8,["links"])):h("",!0)}}),Ls=g(Ps,[["__scopeId","data-v-ef6192dc"]]),Vs=["href","rel","target"],Ss=["innerHTML"],Ts={key:2},ws=m({__name:"VPNavBarTitle",setup(s){const{site:e,theme:t}=L(),{hasSidebar:o}=O(),{currentLang:n}=J(),r=y(()=>{var v;return typeof t.value.logoLink=="string"?t.value.logoLink:(v=t.value.logoLink)==null?void 0:v.link}),l=y(()=>{var v;return typeof t.value.logoLink=="string"||(v=t.value.logoLink)==null?void 0:v.rel}),f=y(()=>{var v;return typeof t.value.logoLink=="string"||(v=t.value.logoLink)==null?void 0:v.target});return(v,$)=>(a(),u("div",{class:I(["VPNavBarTitle",{"has-sidebar":i(o)}])},[d("a",{class:"title",href:r.value??i(fe)(i(n).link),rel:l.value,target:f.value},[c(v.$slots,"nav-bar-title-before",{},void 0,!0),i(t).logo?(a(),k(Y,{key:0,class:"logo",image:i(t).logo},null,8,["image"])):h("",!0),i(t).siteTitle?(a(),u("span",{key:1,innerHTML:i(t).siteTitle},null,8,Ss)):i(t).siteTitle===void 0?(a(),u("span",Ts,N(i(e).title),1)):h("",!0),c(v.$slots,"nav-bar-title-after",{},void 0,!0)],8,Vs)],2))}}),Ns=g(ws,[["__scopeId","data-v-9f43907a"]]),Is={class:"items"},Ms={class:"title"},Bs=m({__name:"VPNavBarTranslations",setup(s){const{theme:e}=L(),{localeLinks:t,currentLang:o}=J({correspondingLink:!0});return(n,r)=>i(t).length&&i(o).label?(a(),k(ke,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:i(e).langMenuLabel||"Change language"},{default:p(()=>[d("div",Is,[d("p",Ms,N(i(o).label),1),(a(!0),u(M,null,H(i(t),l=>(a(),k(te,{key:l.link,item:l},null,8,["item"]))),128))])]),_:1},8,["label"])):h("",!0)}}),As=g(Bs,[["__scopeId","data-v-acee064b"]]),Hs={class:"wrapper"},Cs={class:"container"},Es={class:"title"},Fs={class:"content"},Ds={class:"content-body"},Os=m({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(s){const e=s,{y:t}=Se(),{hasSidebar:o}=O(),{frontmatter:n}=L(),r=T({});return ve(()=>{r.value={"has-sidebar":o.value,home:n.value.layout==="home",top:t.value===0,"screen-open":e.isScreenOpen}}),(l,f)=>(a(),u("div",{class:I(["VPNavBar",r.value])},[d("div",Hs,[d("div",Cs,[d("div",Es,[_(Ns,null,{"nav-bar-title-before":p(()=>[c(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":p(()=>[c(l.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),d("div",Fs,[d("div",Ds,[c(l.$slots,"nav-bar-content-before",{},void 0,!0),_(ys,{class:"search"}),_(fs,{class:"menu"}),_(As,{class:"translations"}),_(Po,{class:"appearance"}),_(Ls,{class:"social-links"}),_(ss,{class:"extra"}),c(l.$slots,"nav-bar-content-after",{},void 0,!0),_(is,{class:"hamburger",active:l.isScreenOpen,onClick:f[0]||(f[0]=v=>l.$emit("toggle-screen"))},null,8,["active"])])])])]),f[1]||(f[1]=d("div",{class:"divider"},[d("div",{class:"divider-line"})],-1))],2))}}),js=g(Os,[["__scopeId","data-v-9fd4d1dd"]]),Gs={key:0,class:"VPNavScreenAppearance"},Us={class:"text"},zs=m({__name:"VPNavScreenAppearance",setup(s){const{site:e,theme:t}=L();return(o,n)=>i(e).appearance&&i(e).appearance!=="force-dark"&&i(e).appearance!=="force-auto"?(a(),u("div",Gs,[d("p",Us,N(i(t).darkModeSwitchLabel||"Appearance"),1),_(me)])):h("",!0)}}),qs=g(zs,[["__scopeId","data-v-a3e2920d"]]),Ks=["innerHTML"],Rs=m({__name:"VPNavScreenMenuLink",props:{item:{}},setup(s){const e=x("close-screen");return(t,o)=>(a(),k(F,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:i(e)},{default:p(()=>[d("span",{innerHTML:t.item.text},null,8,Ks)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),Ws=g(Rs,[["__scopeId","data-v-fa963d97"]]),Js=["innerHTML"],Xs=m({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(s){const e=x("close-screen");return(t,o)=>(a(),k(F,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,"no-icon":t.item.noIcon,onClick:i(e)},{default:p(()=>[d("span",{innerHTML:t.item.text},null,8,Js)]),_:1},8,["href","target","rel","no-icon","onClick"]))}}),Ce=g(Xs,[["__scopeId","data-v-e04f3e85"]]),Ys={class:"VPNavScreenMenuGroupSection"},Qs={key:0,class:"title"},Zs=m({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(s){return(e,t)=>(a(),u("div",Ys,[e.text?(a(),u("p",Qs,N(e.text),1)):h("",!0),(a(!0),u(M,null,H(e.items,o=>(a(),k(Ce,{key:o.text,item:o},null,8,["item"]))),128))]))}}),xs=g(Zs,[["__scopeId","data-v-f60dbfa7"]]),ea=["aria-controls","aria-expanded"],ta=["innerHTML"],na=["id"],oa={key:0,class:"item"},sa={key:1,class:"item"},aa={key:2,class:"group"},ra=m({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(s){const e=s,t=T(!1),o=y(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function n(){t.value=!t.value}return(r,l)=>(a(),u("div",{class:I(["VPNavScreenMenuGroup",{open:t.value}])},[d("button",{class:"button","aria-controls":o.value,"aria-expanded":t.value,onClick:n},[d("span",{class:"button-text",innerHTML:r.text},null,8,ta),l[0]||(l[0]=d("span",{class:"vpi-plus button-icon"},null,-1))],8,ea),d("div",{id:o.value,class:"items"},[(a(!0),u(M,null,H(r.items,f=>(a(),u(M,{key:JSON.stringify(f)},["link"in f?(a(),u("div",oa,[_(Ce,{item:f},null,8,["item"])])):"component"in f?(a(),u("div",sa,[(a(),k(E(f.component),G({ref_for:!0},f.props,{"screen-menu":""}),null,16))])):(a(),u("div",aa,[_(xs,{text:f.text,items:f.items},null,8,["text","items"])]))],64))),128))],8,na)],2))}}),ia=g(ra,[["__scopeId","data-v-d99bfeec"]]),la={key:0,class:"VPNavScreenMenu"},ca=m({__name:"VPNavScreenMenu",setup(s){const{theme:e}=L();return(t,o)=>i(e).nav?(a(),u("nav",la,[(a(!0),u(M,null,H(i(e).nav,n=>(a(),u(M,{key:JSON.stringify(n)},["link"in n?(a(),k(Ws,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(E(n.component),G({key:1,ref_for:!0},n.props,{"screen-menu":""}),null,16)):(a(),k(ia,{key:2,text:n.text||"",items:n.items},null,8,["text","items"]))],64))),128))])):h("",!0)}}),ua=m({__name:"VPNavScreenSocialLinks",setup(s){const{theme:e}=L();return(t,o)=>i(e).socialLinks?(a(),k(be,{key:0,class:"VPNavScreenSocialLinks",links:i(e).socialLinks},null,8,["links"])):h("",!0)}}),da={class:"list"},pa=m({__name:"VPNavScreenTranslations",setup(s){const{localeLinks:e,currentLang:t}=J({correspondingLink:!0}),o=T(!1);function n(){o.value=!o.value}return(r,l)=>i(e).length&&i(t).label?(a(),u("div",{key:0,class:I(["VPNavScreenTranslations",{open:o.value}])},[d("button",{class:"title",onClick:n},[l[0]||(l[0]=d("span",{class:"vpi-languages icon lang"},null,-1)),U(" "+N(i(t).label)+" ",1),l[1]||(l[1]=d("span",{class:"vpi-chevron-down icon chevron"},null,-1))]),d("ul",da,[(a(!0),u(M,null,H(i(e),f=>(a(),u("li",{key:f.link,class:"item"},[_(F,{class:"link",href:f.link},{default:p(()=>[U(N(f.text),1)]),_:2},1032,["href"])]))),128))])],2)):h("",!0)}}),va=g(pa,[["__scopeId","data-v-516e4bc3"]]),fa={class:"container"},ha=m({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(s){const e=T(null),t=we(ee?document.body:null);return(o,n)=>(a(),k(ue,{name:"fade",onEnter:n[0]||(n[0]=r=>t.value=!0),onAfterLeave:n[1]||(n[1]=r=>t.value=!1)},{default:p(()=>[o.open?(a(),u("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[d("div",fa,[c(o.$slots,"nav-screen-content-before",{},void 0,!0),_(ca,{class:"menu"}),_(va,{class:"translations"}),_(qs,{class:"appearance"}),_(ua,{class:"social-links"}),c(o.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):h("",!0)]),_:3}))}}),ma=g(ha,[["__scopeId","data-v-2dd6d0c7"]]),_a={key:0,class:"VPNav"},ka=m({__name:"VPNav",setup(s){const{isScreenOpen:e,closeScreen:t,toggleScreen:o}=vo(),{frontmatter:n}=L(),r=y(()=>n.value.navbar!==!1);return Ne("close-screen",t),Q(()=>{ee&&document.documentElement.classList.toggle("hide-nav",!r.value)}),(l,f)=>r.value?(a(),u("header",_a,[_(js,{"is-screen-open":i(e),onToggleScreen:i(o)},{"nav-bar-title-before":p(()=>[c(l.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":p(()=>[c(l.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":p(()=>[c(l.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":p(()=>[c(l.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),_(ma,{open:i(e)},{"nav-screen-content-before":p(()=>[c(l.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":p(()=>[c(l.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):h("",!0)}}),ba=g(ka,[["__scopeId","data-v-7ad780c2"]]),ga=["role","tabindex"],$a={key:1,class:"items"},ya=m({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(s){const e=s,{collapsed:t,collapsible:o,isLink:n,isActiveLink:r,hasActiveLink:l,hasChildren:f,toggle:v}=ht(y(()=>e.item)),$=y(()=>f.value?"section":"div"),V=y(()=>n.value?"a":"div"),b=y(()=>f.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),P=y(()=>n.value?void 0:"button"),w=y(()=>[[`level-${e.depth}`],{collapsible:o.value},{collapsed:t.value},{"is-link":n.value},{"is-active":r.value},{"has-active":l.value}]);function B(S){"key"in S&&S.key!=="Enter"||!e.item.link&&v()}function A(){e.item.link&&v()}return(S,C)=>{const j=K("VPSidebarItem",!0);return a(),k(E($.value),{class:I(["VPSidebarItem",w.value])},{default:p(()=>[S.item.text?(a(),u("div",G({key:0,class:"item",role:P.value},Re(S.item.items?{click:B,keydown:B}:{},!0),{tabindex:S.item.items&&0}),[C[1]||(C[1]=d("div",{class:"indicator"},null,-1)),S.item.link?(a(),k(F,{key:0,tag:V.value,class:"link",href:S.item.link,rel:S.item.rel,target:S.item.target},{default:p(()=>[(a(),k(E(b.value),{class:"text",innerHTML:S.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(a(),k(E(b.value),{key:1,class:"text",innerHTML:S.item.text},null,8,["innerHTML"])),S.item.collapsed!=null&&S.item.items&&S.item.items.length?(a(),u("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:A,onKeydown:We(A,["enter"]),tabindex:"0"},C[0]||(C[0]=[d("span",{class:"vpi-chevron-right caret-icon"},null,-1)]),32)):h("",!0)],16,ga)):h("",!0),S.item.items&&S.item.items.length?(a(),u("div",$a,[S.depth<5?(a(!0),u(M,{key:0},H(S.item.items,R=>(a(),k(j,{key:R.text,item:R,depth:S.depth+1},null,8,["item","depth"]))),128)):h("",!0)])):h("",!0)]),_:1},8,["class"])}}}),Pa=g(ya,[["__scopeId","data-v-edd2eed8"]]),La=m({__name:"VPSidebarGroup",props:{items:{}},setup(s){const e=T(!0);let t=null;return z(()=>{t=setTimeout(()=>{t=null,e.value=!1},300)}),Je(()=>{t!=null&&(clearTimeout(t),t=null)}),(o,n)=>(a(!0),u(M,null,H(o.items,r=>(a(),u("div",{key:r.text,class:I(["group",{"no-transition":e.value}])},[_(Pa,{item:r,depth:0},null,8,["item"])],2))),128))}}),Va=g(La,[["__scopeId","data-v-51288d80"]]),Sa={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},Ta=m({__name:"VPSidebar",props:{open:{type:Boolean}},setup(s){const{sidebarGroups:e,hasSidebar:t}=O(),o=s,n=T(null),r=we(ee?document.body:null);D([o,n],()=>{var f;o.open?(r.value=!0,(f=n.value)==null||f.focus()):r.value=!1},{immediate:!0,flush:"post"});const l=T(0);return D(e,()=>{l.value+=1},{deep:!0}),(f,v)=>i(t)?(a(),u("aside",{key:0,class:I(["VPSidebar",{open:f.open}]),ref_key:"navEl",ref:n,onClick:v[0]||(v[0]=Xe(()=>{},["stop"]))},[v[2]||(v[2]=d("div",{class:"curtain"},null,-1)),d("nav",Sa,[v[1]||(v[1]=d("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),c(f.$slots,"sidebar-nav-before",{},void 0,!0),(a(),k(Va,{items:i(e),key:l.value},null,8,["items"])),c(f.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):h("",!0)}}),wa=g(Ta,[["__scopeId","data-v-42c4c606"]]),Na=m({__name:"VPSkipLink",setup(s){const e=W(),t=T();D(()=>e.path,()=>t.value.focus());function o({target:n}){const r=document.getElementById(decodeURIComponent(n.hash).slice(1));if(r){const l=()=>{r.removeAttribute("tabindex"),r.removeEventListener("blur",l)};r.setAttribute("tabindex","-1"),r.addEventListener("blur",l),r.focus(),window.scrollTo(0,0)}}return(n,r)=>(a(),u(M,null,[d("span",{ref_key:"backToTop",ref:t,tabindex:"-1"},null,512),d("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:o}," Skip to content ")],64))}}),Ia=g(Na,[["__scopeId","data-v-c8291ffa"]]),Ma=m({__name:"Layout",setup(s){const{isOpen:e,open:t,close:o}=O(),n=W();D(()=>n.path,o),ft(e,o);const{frontmatter:r}=L(),l=Ye(),f=y(()=>!!l["home-hero-image"]);return Ne("hero-image-slot-exists",f),(v,$)=>{const V=K("Content");return i(r).layout!==!1?(a(),u("div",{key:0,class:I(["Layout",i(r).pageClass])},[c(v.$slots,"layout-top",{},void 0,!0),_(Ia),_(tt,{class:"backdrop",show:i(e),onClick:i(o)},null,8,["show","onClick"]),_(ba,null,{"nav-bar-title-before":p(()=>[c(v.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":p(()=>[c(v.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":p(()=>[c(v.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":p(()=>[c(v.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":p(()=>[c(v.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":p(()=>[c(v.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),_(po,{open:i(e),onOpenMenu:i(t)},null,8,["open","onOpenMenu"]),_(wa,{open:i(e)},{"sidebar-nav-before":p(()=>[c(v.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":p(()=>[c(v.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),_(Xn,null,{"page-top":p(()=>[c(v.$slots,"page-top",{},void 0,!0)]),"page-bottom":p(()=>[c(v.$slots,"page-bottom",{},void 0,!0)]),"not-found":p(()=>[c(v.$slots,"not-found",{},void 0,!0)]),"home-hero-before":p(()=>[c(v.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":p(()=>[c(v.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":p(()=>[c(v.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":p(()=>[c(v.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":p(()=>[c(v.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":p(()=>[c(v.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":p(()=>[c(v.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":p(()=>[c(v.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":p(()=>[c(v.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":p(()=>[c(v.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":p(()=>[c(v.$slots,"doc-before",{},void 0,!0)]),"doc-after":p(()=>[c(v.$slots,"doc-after",{},void 0,!0)]),"doc-top":p(()=>[c(v.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":p(()=>[c(v.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":p(()=>[c(v.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":p(()=>[c(v.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":p(()=>[c(v.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":p(()=>[c(v.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":p(()=>[c(v.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":p(()=>[c(v.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),_(eo),c(v.$slots,"layout-bottom",{},void 0,!0)],2)):(a(),k(V,{key:1}))}}}),Ba=g(Ma,[["__scopeId","data-v-d8b57b2d"]]),$e={Layout:Ba,enhanceApp:({app:s})=>{s.component("Badge",Ze)}};function Aa(){const s="twitter-wjs";if(document.getElementById(s))window.twttr.widgets.load();else{const e=document.getElementsByTagName("script")[0],t=/^http:/.test(document.location)?"http":"https",o=document.createElement("script");o.id=s,o.src=t+"://platform.twitter.com/widgets.js",e.parentNode.insertBefore(o,e)}}function Ee(){const s="facebook-jssdk";if(document.getElementById(s))window.FB.XFBML.parse();else{const e=document.getElementsByTagName("script")[0],t=/^http:/.test(document.location)?"http":"https",o=document.createElement("script");o.id=s,o.src=t+"://connect.facebook.net/ja_JP/sdk.js#xfbml=1&version=v3.2",e.parentNode.insertBefore(o,e)}}function Fe(){const s="hatena-buttons";if(document.getElementById(s))return;const e=document.getElementsByTagName("script")[0],t=/^http:/.test(document.location)?"http":"https",o=document.createElement("script");o.id=s,o.src=t+"://b.st-hatena.com/js/bookmark_button.js",e.parentNode.insertBefore(o,e)}function Ha(s){const e="pocket-btn-js"+s,t=document.createElement("script");t.id=e,t.src="https://widgets.getpocket.com/v1/j/btn.js?v=1",document.body.appendChild(t)}function Ca(s,e){let t;return()=>{t!=null&&clearTimeout(t),t=setTimeout(s,e)}}const Ea=Ca(function(){Ee(),Fe()},1e3),Fa={name:"PageInfo",props:{href:{type:String,required:!0}},computed:{hatena(){return this.href.replace("https://","https://b.hatena.ne.jp/entry/s/")}},mounted(){Ea()}},Da={class:"page-info"},Oa=["data-href"],ja=["href"];function Ga(s,e,t,o,n,r){return a(),u("div",Da,[d("div",{class:"fb-like","data-href":t.href,"data-layout":"button_count","data-action":"like","data-size":"small","data-show-faces":"true","data-share":"true",style:{height:"20px","line-height":"20px"}},null,8,Oa),d("a",{href:r.hatena,class:"hatena-bookmark-button","data-hatena-bookmark-layout":"basic-label-counter","data-hatena-bookmark-lang":"ja",title:"このエントリーをはてなブックマークに追加"},e[0]||(e[0]=[d("img",{src:"https://b.st-hatena.com/images/entry-button/button-only@2x.png",alt:"このエントリーをはてなブックマークに追加",width:"20",height:"20",style:{border:"none"}},null,-1)]),8,ja)])}const Ua=g(Fa,[["render",Ga],["__scopeId","data-v-b1e769ab"]]),za={name:"PageTitle",data:function(){return{GithubButton:"div"}},computed:{$page(){const s=W();return{path:s.path,title:s.data.title,frontmatter:s.data.frontmatter}},pageUrl(){return"https://future-architect.github.io/coding-standards"+this.$page.path}},mounted(){Te(async()=>{const{default:s}=await import("./index.CRBiAhYs.js");return{default:s}},__vite__mapDeps([2,1])).then(({default:s})=>{this.GithubButton=Qe(s)}),setTimeout(()=>{Aa(),Ee(),Fe(),Ha()},10)}},qa={class:"vitepress-page-title"},Ka={class:"share-buttons"},Ra=["data-url"],Wa=["data-href"],Ja=["href"],Xa=["data-save-url"],Ya={class:"vitepress-page-title__title"},Qa={class:"vitepress-page-title__author"};function Za(s,e,t,o,n,r){return a(),u("div",qa,[d("div",Ka,[d("a",{href:"https://twitter.com/share?ref_src=twsrc%5Etfw",class:"twitter-share-button","data-url":r.pageUrl,"data-show-count":"false"}," Tweet ",8,Ra),d("div",{class:"fb-like","data-href":r.pageUrl,"data-layout":"button_count","data-action":"like","data-size":"small","data-show-faces":"true","data-share":"true"},null,8,Wa),d("a",{href:"http://b.hatena.ne.jp/entry/s/future-architect.github.io/coding-standards"+r.$page.path,class:"hatena-bookmark-button","data-hatena-bookmark-layout":"basic-label-counter","data-hatena-bookmark-lang":"ja",title:"このエントリーをはてなブックマークに追加"},e[0]||(e[0]=[d("img",{src:"https://b.st-hatena.com/images/v4/public/entry-button/button-only@2x.png",alt:"このエントリーをはてなブックマークに追加",width:"20",height:"20",style:{border:"none"}},null,-1)]),8,Ja),(a(),k(E(s.GithubButton),{href:"https://github.com/future-architect/coding-standards","data-icon":"octicon-star","data-show-count":"true","aria-label":"Star future-architect/coding-standards on GitHub"},{default:p(()=>e[1]||(e[1]=[U(" Star ")])),_:1})),d("a",{href:"https://getpocket.com/save",class:"pocket-btn","data-lang":"en","data-save-url":r.pageUrl,"data-pocket-count":"horizontal","data-pocket-align":"left"},"Pocket",8,Xa)]),d("h1",Ya,N(r.$page.title),1),d("div",Qa,N(r.$page.frontmatter.author),1)])}const xa=g(za,[["render",Za],["__scopeId","data-v-ba3c56d6"]]),tr={...$e,enhanceApp:s=>{$e.enhanceApp(s),s.app.component("PageInfo",Ua),s.app.component("PageTitle",xa)}};export{tr as R,hs as c,L as u}; diff --git a/assets/chunks/timeline-definition-U7ZMHBDA.CdHHaiF9.js b/assets/chunks/timeline-definition-U7ZMHBDA.CdHHaiF9.js new file mode 100644 index 00000000..65e49802 --- /dev/null +++ b/assets/chunks/timeline-definition-U7ZMHBDA.CdHHaiF9.js @@ -0,0 +1,61 @@ +import{_ as s,aa as xt,ab as kt,x as vt,j as q,d as _t,l as T,ac as bt,ad as wt,ae as St,af as Et}from"../app.CXGmg8Jv.js";import{d as nt}from"./arc.w3rEdi5q.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";var X=function(){var n=s(function(f,i,a,d){for(a=a||{},d=f.length;d--;a[f[d]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],h=[1,12],c=[1,13],g=[1,16],m=[1,17],p={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,d,u,y,o,S){var k=o.length-1;switch(y){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:u.addTask(o[k],0,""),this.$=o[k];break;case 16:u.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:h,17:c,18:14,19:15,20:g,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:h,17:c,18:14,19:15,20:g,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var d=new Error(i);throw d.hash=a,d}},"parseError"),parse:s(function(i){var a=this,d=[0],u=[],y=[null],o=[],S=this.table,k="",M=0,P=0,B=2,J=1,O=o.slice.call(arguments,1),v=Object.create(this.lexer),E={yy:{}};for(var b in this.yy)Object.prototype.hasOwnProperty.call(this.yy,b)&&(E.yy[b]=this.yy[b]);v.setInput(i,E.yy),E.yy.lexer=v,E.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var L=v.yylloc;o.push(L);var A=v.options&&v.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(I){d.length=d.length-2*I,y.length=y.length-I,o.length=o.length-I}s(R,"popStack");function F(){var I;return I=u.pop()||v.lex()||J,typeof I!="number"&&(I instanceof Array&&(u=I,I=u.pop()),I=a.symbols_[I]||I),I}s(F,"lex");for(var w,C,N,K,z={},j,$,et,G;;){if(C=d[d.length-1],this.defaultActions[C]?N=this.defaultActions[C]:((w===null||typeof w>"u")&&(w=F()),N=S[C]&&S[C][w]),typeof N>"u"||!N.length||!N[0]){var Q="";G=[];for(j in S[C])this.terminals_[j]&&j>B&&G.push("'"+this.terminals_[j]+"'");v.showPosition?Q="Parse error on line "+(M+1)+`: +`+v.showPosition()+` +Expecting `+G.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Q="Parse error on line "+(M+1)+": Unexpected "+(w==J?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Q,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:L,expected:G})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+w);switch(N[0]){case 1:d.push(w),y.push(v.yytext),o.push(v.yylloc),d.push(N[1]),w=null,P=v.yyleng,k=v.yytext,M=v.yylineno,L=v.yylloc;break;case 2:if($=this.productions_[N[1]][1],z.$=y[y.length-$],z._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},A&&(z._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),K=this.performAction.apply(z,[k,P,M,E.yy,N[1],y,o].concat(O)),typeof K<"u")return K;$&&(d=d.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),d.push(this.productions_[N[1]][0]),y.push(z.$),o.push(z._$),et=S[d[d.length-2]][d[d.length-1]],d.push(et);break;case 3:return!0}}return!0},"parse")},x=function(){var f={EOF:1,parseError:s(function(a,d){if(this.yy.parser)this.yy.parser.parseError(a,d);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,d=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===u.length?this.yylloc.first_column:0)+u[u.length-d.length].length-d[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:s(function(i,a){var d,u,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),u=i[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],d=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var o in y)this[o]=y[o];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,d,u;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),o=0;oa[0].length)){if(a=d,u=o,this.options.backtrack_lexer){if(i=this.test_match(d,y[o]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,y[u]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var a=this.next();return a||this.lex()},"lex"),begin:s(function(a){this.conditionStack.push(a)},"begin"),popState:s(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:s(function(a){this.begin(a)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(a,d,u,y){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return f}();p.lexer=x;function _(){this.yy={}}return s(_,"Parser"),_.prototype=p,p.Parser=_,new _}();X.parser=X;var Tt=X,at={};xt(at,{addEvent:()=>yt,addSection:()=>ht,addTask:()=>pt,addTaskOrg:()=>gt,clear:()=>ct,default:()=>It,getCommonDb:()=>ot,getSections:()=>dt,getTasks:()=>ut});var V="",lt=0,Y=[],U=[],W=[],ot=s(()=>kt,"getCommonDb"),ct=s(function(){Y.length=0,U.length=0,V="",W.length=0,vt()},"clear"),ht=s(function(n){V=n,Y.push(n)},"addSection"),dt=s(function(){return Y},"getSections"),ut=s(function(){let n=rt();const t=100;let e=0;for(;!n&&ee.id===lt-1).events.push(n)},"addEvent"),gt=s(function(n){const t={section:V,type:V,description:n,task:n,classes:[]};U.push(t)},"addTaskOrg"),rt=s(function(){const n=s(function(e){return W[e].processed},"compileTask");let t=!0;for(const[e,l]of W.entries())n(e),t=t&&l.processed;return t},"compileTasks"),It={clear:ct,getCommonDb:ot,addSection:ht,getSections:dt,getTasks:ut,addTask:pt,addTaskOrg:gt,addEvent:yt},Nt=12,Z=s(function(n,t){const e=n.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),Lt=s(function(n,t){const l=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=n.append("g");r.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function h(m){const p=nt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(h,"smile");function c(m){const p=nt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(c,"sad");function g(m){m.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(g,"ambivalent"),t.score>3?h(r):t.score<3?c(r):g(r),l},"drawFace"),Mt=s(function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),ft=s(function(n,t){const e=t.text.replace(//gi," "),l=n.append("text");l.attr("x",t.x),l.attr("y",t.y),l.attr("class","legend"),l.style("text-anchor",t.anchor),t.class!==void 0&&l.attr("class",t.class);const r=l.append("tspan");return r.attr("x",t.x+t.textMargin*2),r.text(e),l},"drawText"),$t=s(function(n,t){function e(r,h,c,g,m){return r+","+h+" "+(r+c)+","+h+" "+(r+c)+","+(h+g-m)+" "+(r+c-m*1.2)+","+(h+g)+" "+r+","+(h+g)}s(e,"genPoints");const l=n.append("polygon");l.attr("points",e(t.x,t.y,50,20,7)),l.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,ft(n,t)},"drawLabel"),Pt=s(function(n,t,e){const l=n.append("g"),r=D();r.x=t.x,r.y=t.y,r.fill=t.fill,r.width=e.width,r.height=e.height,r.class="journey-section section-type-"+t.num,r.rx=3,r.ry=3,Z(l,r),mt(e)(t.text,l,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),it=-1,At=s(function(n,t,e){const l=t.x+e.width/2,r=n.append("g");it++;const h=300+5*30;r.append("line").attr("id","task"+it).attr("x1",l).attr("y1",t.y).attr("x2",l).attr("y2",h).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Lt(r,{cx:l,cy:300+(5-t.score)*30,score:t.score});const c=D();c.x=t.x,c.y=t.y,c.fill=t.fill,c.width=e.width,c.height=e.height,c.class="task task-type-"+t.num,c.rx=3,c.ry=3,Z(r,c),mt(e)(t.task,r,c.x,c.y,c.width,c.height,{class:"task"},e,t.colour)},"drawTask"),Ct=s(function(n,t){Z(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Ht=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),D=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt=function(){function n(r,h,c,g,m,p,x,_){const f=h.append("text").attr("x",c+m/2).attr("y",g+p/2+5).style("font-color",_).style("text-anchor","middle").text(r);l(f,x)}s(n,"byText");function t(r,h,c,g,m,p,x,_,f){const{taskFontSize:i,taskFontFamily:a}=_,d=r.split(//gi);for(let u=0;u)/).reverse(),r,h=[],c=1.1,g=e.attr("y"),m=parseFloat(e.attr("dy")),p=e.text(null).append("tspan").attr("x",0).attr("y",g).attr("dy",m+"em");for(let x=0;xt||r==="
    ")&&(h.pop(),p.text(h.join(" ").trim()),r==="
    "?h=[""]:h=[r],p=e.append("tspan").attr("x",0).attr("y",g).attr("dy",c+"em").text(r))})}s(tt,"wrap");var Ft=s(function(n,t,e,l){var _;const r=e%Nt-1,h=n.append("g");t.section=r,h.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+r));const c=h.append("g"),g=h.append("g"),p=g.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(tt,t.width).node().getBBox(),x=(_=l.fontSize)!=null&&_.replace?l.fontSize.replace("px",""):l.fontSize;return t.height=p.height+x*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,g.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),Vt(c,t,r,l),t},"drawNode"),zt=s(function(n,t,e){var g;const l=n.append("g"),h=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(tt,t.width).node().getBBox(),c=(g=e.fontSize)!=null&&g.replace?e.fontSize.replace("px",""):e.fontSize;return l.remove(),h.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),Vt=s(function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+2*5} q0,-5 5,-5 h${t.width-2*5} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),H={drawRect:Z,drawCircle:Mt,drawSection:Pt,drawText:ft,drawLabel:$t,drawTask:At,drawBackgroundRect:Ct,getTextObj:Ht,getNoteRect:D,initGraphics:Rt,drawNode:Ft,getVirtualNodeHeight:zt},Wt=s(function(n,t,e,l){var O,v;const r=_t(),h=r.leftMargin??50;T.debug("timeline",l.db);const c=r.securityLevel;let g;c==="sandbox"&&(g=q("#i"+t));const p=(c==="sandbox"?q(g.nodes()[0].contentDocument.body):q("body")).select("#"+t);p.append("g");const x=l.db.getTasks(),_=l.db.getCommonDb().getDiagramTitle();T.debug("task",x),H.initGraphics(p);const f=l.db.getSections();T.debug("sections",f);let i=0,a=0,d=0,u=0,y=50+h,o=50;u=50;let S=0,k=!0;f.forEach(function(E){const b={number:S,descr:E,section:S,width:150,padding:20,maxHeight:i},L=H.getVirtualNodeHeight(p,b,r);T.debug("sectionHeight before draw",L),i=Math.max(i,L+20)});let M=0,P=0;T.debug("tasks.length",x.length);for(const[E,b]of x.entries()){const L={number:E,descr:b,section:b.section,width:150,padding:20,maxHeight:a},A=H.getVirtualNodeHeight(p,L,r);T.debug("taskHeight before draw",A),a=Math.max(a,A+20),M=Math.max(M,b.events.length);let R=0;for(const F of b.events){const w={descr:F,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};R+=H.getVirtualNodeHeight(p,w,r)}P=Math.max(P,R)}T.debug("maxSectionHeight before draw",i),T.debug("maxTaskHeight before draw",a),f&&f.length>0?f.forEach(E=>{const b=x.filter(F=>F.section===E),L={number:S,descr:E,section:S,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:i};T.debug("sectionNode",L);const A=p.append("g"),R=H.drawNode(A,L,S,r);T.debug("sectionNode output",R),A.attr("transform",`translate(${y}, ${u})`),o+=i+50,b.length>0&&st(p,b,S,y,o,a,r,M,P,i,!1),y+=200*Math.max(b.length,1),o=u,S++}):(k=!1,st(p,x,S,y,o,a,r,M,P,i,!0));const B=p.node().getBBox();T.debug("bounds",B),_&&p.append("text").text(_).attr("x",B.width/2-h).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),d=k?i+a+150:a+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",h).attr("y1",d).attr("x2",B.width+3*h).attr("y2",d).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),bt(void 0,p,((O=r.timeline)==null?void 0:O.padding)??50,((v=r.timeline)==null?void 0:v.useMaxWidth)??!1)},"draw"),st=s(function(n,t,e,l,r,h,c,g,m,p,x){var _;for(const f of t){const i={descr:f.task,section:e,number:e,width:150,padding:20,maxHeight:h};T.debug("taskNode",i);const a=n.append("g").attr("class","taskWrapper"),u=H.drawNode(a,i,e,c).height;if(T.debug("taskHeight after draw",u),a.attr("transform",`translate(${l}, ${r})`),h=Math.max(h,u),f.events){const y=n.append("g").attr("class","lineWrapper");let o=h;r+=100,o=o+Bt(n,f.events,e,l,r,c),r-=100,y.append("line").attr("x1",l+190/2).attr("y1",r+h).attr("x2",l+190/2).attr("y2",r+h+(x?h:p)+m+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}l=l+200,x&&!((_=c.timeline)!=null&&_.disableMulticolor)&&e++}r=r-10},"drawTasks"),Bt=s(function(n,t,e,l,r,h){let c=0;const g=r;r=r+100;for(const m of t){const p={descr:m,section:e,number:e,width:150,padding:20,maxHeight:50};T.debug("eventNode",p);const x=n.append("g").attr("class","eventWrapper"),f=H.drawNode(x,p,e,h).height;c=c+f,x.attr("transform",`translate(${l}, ${r})`),r=r+10+f}return r=g,c},"drawEvents"),Ot={setConf:s(()=>{},"setConf"),draw:Wt},jt=s(n=>{let t="";for(let e=0;e` + .edge { + stroke-width: 3; + } + ${jt(n)} + .section-root rect, .section-root path, .section-root circle { + fill: ${n.git0}; + } + .section-root text { + fill: ${n.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`,"getStyles"),qt=Gt,Qt={db:at,renderer:Ot,parser:Tt,styles:qt};export{Qt as diagram}; diff --git a/assets/chunks/virtual_mermaid-config.DDnGl6nM.js b/assets/chunks/virtual_mermaid-config.DDnGl6nM.js new file mode 100644 index 00000000..effcb965 --- /dev/null +++ b/assets/chunks/virtual_mermaid-config.DDnGl6nM.js @@ -0,0 +1 @@ +const e={securityLevel:"loose",startOnLoad:!1};export{e as default}; diff --git a/assets/chunks/xychartDiagram-6QU3TZC5.BLrMmmG-.js b/assets/chunks/xychartDiagram-6QU3TZC5.BLrMmmG-.js new file mode 100644 index 00000000..eb58c2ec --- /dev/null +++ b/assets/chunks/xychartDiagram-6QU3TZC5.BLrMmmG-.js @@ -0,0 +1,7 @@ +import{_ as a,aE as ui,l as Ft,a1 as Bt,a0 as gi,F as At,E as Xt,D as xi,i as di,r as Nt,s as pi,g as fi,q as mi,b as yi,c as bi,x as Ai,I as wi,k as Ci}from"../app.CXGmg8Jv.js";import{i as Si}from"./init.Gi6I4Gst.js";import{o as _i}from"./ordinal.BYWQX77i.js";import{l as Wt}from"./linear.BcMShDgX.js";import"./framework.BDUoXecB.js";import"./theme.C7mmewBt.js";function ki(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s"u"&&(T.yylloc={});var gt=T.yylloc;r.push(gt);var li=T.options&&T.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ci(L){g.length=g.length-2*L,A.length=A.length-L,r.length=r.length-L}a(ci,"popStack");function Mt(){var L;return L=x.pop()||T.lex()||It,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=c.symbols_[L]||L),L}a(Mt,"lex");for(var P,O,M,xt,z={},at,V,Vt,rt;;){if(O=g[g.length-1],this.defaultActions[O]?M=this.defaultActions[O]:((P===null||typeof P>"u")&&(P=Mt()),M=Z[O]&&Z[O][P]),typeof M>"u"||!M.length||!M[0]){var dt="";rt=[];for(at in Z[O])this.terminals_[at]&&at>oi&&rt.push("'"+this.terminals_[at]+"'");T.showPosition?dt="Parse error on line "+(nt+1)+`: +`+T.showPosition()+` +Expecting `+rt.join(", ")+", got '"+(this.terminals_[P]||P)+"'":dt="Parse error on line "+(nt+1)+": Unexpected "+(P==It?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(dt,{text:T.match,token:this.terminals_[P]||P,line:T.yylineno,loc:gt,expected:rt})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+P);switch(M[0]){case 1:g.push(P),A.push(T.yytext),r.push(T.yylloc),g.push(M[1]),P=null,Et=T.yyleng,d=T.yytext,nt=T.yylineno,gt=T.yylloc;break;case 2:if(V=this.productions_[M[1]][1],z.$=A[A.length-V],z._$={first_line:r[r.length-(V||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(V||1)].first_column,last_column:r[r.length-1].last_column},li&&(z._$.range=[r[r.length-(V||1)].range[0],r[r.length-1].range[1]]),xt=this.performAction.apply(z,[d,Et,nt,W.yy,M[1],A,r].concat(hi)),typeof xt<"u")return xt;V&&(g=g.slice(0,-1*V*2),A=A.slice(0,-1*V),r=r.slice(0,-1*V)),g.push(this.productions_[M[1]][0]),A.push(z.$),r.push(z._$),Vt=Z[g[g.length-2]][g[g.length-1]],g.push(Vt);break;case 3:return!0}}return!0},"parse")},ri=function(){var B={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+` +`+c+"^"},"showPosition"),test_match:a(function(h,c){var g,x,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),x=h[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],g=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var r in A)this[r]=A[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,c,g,x;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),r=0;rc[0].length)){if(c=g,x=r,this.options.backtrack_lexer){if(h=this.test_match(g,A[r]),h!==!1)return h;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(h=this.test_match(c,A[x]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var c=this.next();return c||this.lex()},"lex"),begin:a(function(c){this.conditionStack.push(c)},"begin"),popState:a(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:a(function(c){this.begin(c)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(c,g,x,A){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return B}();ct.lexer=ri;function st(){this.yy={}}return a(st,"Parser"),st.prototype=ct,ct.Parser=st,new st}();ft.parser=ft;var Ri=ft;function mt(e){return e.type==="bar"}a(mt,"isBarPlot");function wt(e){return e.type==="band"}a(wt,"isBandAxisData");function F(e){return e.type==="linear"}a(F,"isLinearAxisData");var X,Yt=(X=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,u)=>Math.max(u.length,o),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const u=ui(n,1,o),f=u?u.width:o.length*i,p=u?u.height:i;s.width=Math.max(s.width,f),s.height=Math.max(s.height,p)}return n.remove(),s}},a(X,"TextDimensionCalculatorWithFont"),X),Ot=.7,zt=.2,N,Ht=(N=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ot*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ot*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=zt*t.width;this.outerPadding=Math.min(s.width/2,n);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=zt*t.height;this.outerPadding=Math.min(s.height/2,n);const o=s.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(N,"BaseAxis"),N),Y,Ti=(Y=class extends Ht{constructor(t,i,s,n,o){super(t,n,o,i),this.categories=s,this.scale=pt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=pt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Ft.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},a(Y,"BandAxis"),Y),H,Di=(H=class extends Ht{constructor(t,i,s,n,o){super(t,n,o,i),this.domain=s,this.scale=Wt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Wt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(H,"LinearAxis"),H);function yt(e,t,i,s){const n=new Yt(s);return wt(e)?new Ti(t,i,e.categories,e.title,n):new Di(t,i,[e.min,e.max],e.title,n)}a(yt,"getAxis");var U,vi=(U=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(U,"ChartTitle"),U);function Ut(e,t,i,s){const n=new Yt(s);return new vi(n,e,t,i)}a(Ut,"getChartTitleComponent");var $,Pi=($=class{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let i;return this.orientation==="horizontal"?i=Bt().y(s=>s[0]).x(s=>s[1])(t):i=Bt().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},a($,"LinePlot"),$),q,Li=(q=class{constructor(t,i,s,n,o,u){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=u}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(q,"BarPlot"),q),G,Ei=(G=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new Pi(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new Li(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}},a(G,"BasePlot"),G);function $t(e,t,i){return new Ei(e,t,i)}a($t,"getPlotComponent");var j,Ii=(j=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:Ut(t,i,s,n),plot:$t(t,i,s),xAxis:yt(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:yt(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:o,height:u});t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=f.width,t-=f.width,t>0&&(o+=t,t=0),i>0&&(u+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+u}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(p=>mt(p))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,u=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:u,height:f});t-=p.width,i-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=p.height,i-=p.height,this.componentStore.xAxis.setAxisPosition("left"),p=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=p.width,n=p.width,this.componentStore.yAxis.setAxisPosition("top"),p=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=p.height,o=s+p.height,t>0&&(u+=t,t=0),i>0&&(f+=i,i=0),this.componentStore.plot.calculateSpace({width:u,height:f}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(k=>mt(k))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(j,"Orchestrator"),j),Q,Mi=(Q=class{static build(t,i,s,n){return new Ii(t,i,s,n).getDrawableElement()}},a(Q,"XYChartBuilder"),Q),J=0,qt,tt=_t(),it=St(),b=kt(),bt=it.plotColorPalette.split(",").map(e=>e.trim()),ot=!1,Ct=!1;function St(){const e=gi(),t=At();return Xt(e.xyChart,t.themeVariables.xyChart)}a(St,"getChartDefaultThemeConfig");function _t(){const e=At();return Xt(xi.xyChart,e.xyChart)}a(_t,"getChartDefaultConfig");function kt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(kt,"getChartDefaultData");function ht(e){const t=At();return di(e.trim(),t)}a(ht,"textSanitizer");function Gt(e){qt=e}a(Gt,"setTmpSVGG");function jt(e){e==="horizontal"?tt.chartOrientation="horizontal":tt.chartOrientation="vertical"}a(jt,"setOrientation");function Qt(e){b.xAxis.title=ht(e.text)}a(Qt,"setXAxisTitle");function Rt(e,t){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:t},ot=!0}a(Rt,"setXAxisRangeData");function Kt(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map(t=>ht(t.text))},ot=!0}a(Kt,"setXAxisBand");function Zt(e){b.yAxis.title=ht(e.text)}a(Zt,"setYAxisTitle");function Jt(e,t){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:t},Ct=!0}a(Jt,"setYAxisRangeData");function ti(e){const t=Math.min(...e),i=Math.max(...e),s=F(b.yAxis)?b.yAxis.min:1/0,n=F(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}a(ti,"setYAxisRangeFromPlotData");function Tt(e){let t=[];if(e.length===0)return t;if(!ot){const i=F(b.xAxis)?b.xAxis.min:1/0,s=F(b.xAxis)?b.xAxis.max:-1/0;Rt(Math.min(i,1),Math.max(s,e.length))}if(Ct||ti(e),wt(b.xAxis)&&(t=b.xAxis.categories.map((i,s)=>[i,e[s]])),F(b.xAxis)){const i=b.xAxis.min,s=b.xAxis.max,n=(s-i)/(e.length-1),o=[];for(let u=i;u<=s;u+=n)o.push(`${u}`);t=o.map((u,f)=>[u,e[f]])}return t}a(Tt,"transformDataWithoutCategory");function Dt(e){return bt[e===0?0:e%bt.length]}a(Dt,"getPlotColorFromPalette");function ii(e,t){const i=Tt(t);b.plots.push({type:"line",strokeFill:Dt(J),strokeWidth:2,data:i}),J++}a(ii,"setLineData");function ei(e,t){const i=Tt(t);b.plots.push({type:"bar",fill:Dt(J),data:i}),J++}a(ei,"setBarData");function si(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=Nt(),Mi.build(tt,b,it,qt)}a(si,"getDrawableElem");function ni(){return it}a(ni,"getChartThemeConfig");function ai(){return tt}a(ai,"getChartConfig");var Vi=a(function(){Ai(),J=0,tt=_t(),b=kt(),it=St(),bt=it.plotColorPalette.split(",").map(e=>e.trim()),ot=!1,Ct=!1},"clear"),Bi={getDrawableElem:si,clear:Vi,setAccTitle:pi,getAccTitle:fi,setDiagramTitle:mi,getDiagramTitle:Nt,getAccDescription:yi,setAccDescription:bi,setOrientation:jt,setXAxisTitle:Qt,setXAxisRangeData:Rt,setXAxisBand:Kt,setYAxisTitle:Zt,setYAxisRangeData:Jt,setLineData:ii,setBarData:ei,setTmpSVGG:Gt,getChartThemeConfig:ni,getChartConfig:ai},Wi=a((e,t,i,s)=>{const n=s.db,o=n.getChartThemeConfig(),u=n.getChartConfig();function f(m){return m==="top"?"text-before-edge":"middle"}a(f,"getDominantBaseLine");function p(m){return m==="left"?"start":m==="right"?"end":"middle"}a(p,"getTextAnchor");function k(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}a(k,"getTextTransformation"),Ft.debug(`Rendering xychart chart +`+e);const R=wi(t),w=R.append("g").attr("class","main"),y=w.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");Ci(R,u.height,u.width,!0),R.attr("viewBox",`0 0 ${u.width} ${u.height}`),y.attr("fill",o.backgroundColor),n.setTmpSVGG(R.append("g").attr("class","mermaid-tmp-group"));const D=n.getDrawableElem(),S={};function v(m){let _=w,l="";for(const[E]of m.entries()){let K=w;E>0&&S[l]&&(K=S[l]),l+=m[E],_=S[l],_||(_=S[l]=K.append("g").attr("class",m[E]))}return _}a(v,"getGroup");for(const m of D){if(m.data.length===0)continue;const _=v(m.groupTexts);switch(m.type){case"rect":_.selectAll("rect").data(m.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break;case"text":_.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>f(l.verticalPos)).attr("text-anchor",l=>p(l.horizontalPos)).attr("transform",l=>k(l)).text(l=>l.text);break;case"path":_.selectAll("path").data(m.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Oi={draw:Wi},Ui={parser:Ri,db:Bi,renderer:Oi};export{Ui as diagram}; diff --git a/assets/create_new_tag.vcx7NIW6.png b/assets/create_new_tag.vcx7NIW6.png new file mode 100644 index 00000000..42b46c5d Binary files /dev/null and b/assets/create_new_tag.vcx7NIW6.png differ diff --git a/assets/create_new_tag_title.DvuteGpB.png b/assets/create_new_tag_title.DvuteGpB.png new file mode 100644 index 00000000..b943d45f Binary files /dev/null and b/assets/create_new_tag_title.DvuteGpB.png differ diff --git "a/assets/documents_forAWSResource_AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md.DgKzw8SL.js" "b/assets/documents_forAWSResource_AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md.DgKzw8SL.js" new file mode 100644 index 00000000..83eb54a0 --- /dev/null +++ "b/assets/documents_forAWSResource_AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md.DgKzw8SL.js" @@ -0,0 +1,176 @@ +import{_ as n,c as e,G as i,a3 as l,B as t,o as p}from"./chunks/framework.BDUoXecB.js";const g=JSON.parse('{"title":"AWSインフラ命名規約","description":"","frontmatter":{"sidebarDepth":4,"title":"AWSインフラ命名規約","author":"フューチャー株式会社","head":[["meta",{"name":"keywords","content":"AWS,命名規約,コーディング規約"}]]},"headers":[],"relativePath":"documents/forAWSResource/AWSインフラリソース命名規約.md","filePath":"documents/forAWSResource/AWSインフラリソース命名規約.md"}'),r={name:"documents/forAWSResource/AWSインフラリソース命名規約.md"};function d(h,s,c,o,u,b){const a=t("page-title");return p(),e("div",null,[i(a),s[0]||(s[0]=l(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。 ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。 また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    免責事項

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせた開発手法が採用されている。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している

    前提条件

    • 開発チームが 3 ~ 30 名程度で構築する規模での利用を想定している
    • 本規約をそのままプロジェクトに導入することを推奨する
      • そのままの導入ができない場合は、一部を抜粋、拡張して用いられることを想定している
    • AWS の構成はマネージドサービスを活用するベストプラクティスに従うものとする
      • 例えば、1 台の EC2 上で DB とアプリのように複数のサービスを稼働させるといった構成は考慮しない
    • 一部のリージョンでのみ利用可能な機能は想定していない

    名前の構成要素

    各リソースの名前に用いる要素を次の一覧に示す。

    CategoryItemNameUsage
    Common{env}環境環境の区別
    {product}製品名構築する製品名またはシステム名。稼働するマイクロサービス名もこれに当たる
    {role}役割役割を示す。場合によっては具体的な製品名 postgres, jenkins などを指定する
    {usage}用途利用目的やリソースの動作 (action) を示す。user_master, fileupload など識別したい値を指定する
    {target}対象操作の対象。usage が複数の対象があり区別したいときに利用する。
    Network{region}リージョンリージョンコード の略称を用いる
    {az}アベイラビリティーゾーンマルチ AZ 構成などで、明示的に AZ を意識する場合に用いる
    {access}アクセス修飾子access modifier. ネットワークでの public, private を区別したいときに利用する
    {permission}権限allow または deny を指定する。Security Group での利用を想定
    Organization{company}会社名会社の特定に利用。複数の会社による構築や、運用に複数社関わる場合などに必要となる
    {project}プロジェクトプロジェクト制でプロダクトを開発する際のプロジェクト名または、プロジェクトコード

    環境 ({env})

    ソフトウェア開発では複数の環境を用意し、dev, stg, prod などの名前をつけて互いに完全に分離・区別する運用を行うことが多い。そういった環境分離のために AWS インフラは次のいずれか、もしくは組み合わせで設計される。

    1. 環境単位で AWS アカウントを作成する
    2. 環境単位で AWS リージョンを分ける
    3. 命名で分ける

    いずれの方法でも、 各リソース名に環境名を付与することを推奨 する。冗長な命名となる場合もあるが、以下が理由である。

    • 同一 AWS アカウントかつ同一リージョン内には、同じ名前のリソースを作成できない
    • AWS リソース名のみで環境を特定できるようにする事で、誤った環境のリソースを操作してしまうミスを低減する
    • メンバー間の認識齟齬を無くし生産性を高める
      • チームメンバーなどの問い合わせやトラブルシュートの際に、リソース名のみでどの環境にあるか素早く判断できるようにする
      • メンバーの役割によっては AWS アカウント構成を完全には理解できていない可能性がある
    環境識別子

    主要な環境名と識別子 (Identifier) は以下である。AWS リソースの命名には識別子を用いる。

    NameIdentifierMemo
    Productionprodエンドユーザーが使う環境、本番運用環境
    Stagingstg本番と同じ構成でテストするための環境
    User Acceptance Testuatユーザーがシステムのレビュー、または操作を学習するための環境
    Performance Testperf性能検証を行うための環境
    Developmentdev開発チームが開発するための環境
    Locallocalローカル環境

    prod についてはよく用いる dev, stg と見間違えを防ぐため 4 文字にしている。

    デプロイメント環境 の考え方では、User Acceptance Test 環境を単にテスト環境 (Test) 呼ぶが、テストという単語は汎用的であるため複数の環境にあてはまる。したがって容易に認識齟齬が生じるため本規約では非推奨とする。

    名前には必ず識別子を用いる。環境名をそのまま利用しない (例: production-example-s3bucket とは命名しない)。

    理由:

    • AWS リソースによっては名前の文字数の制限が厳しい (例: ELB は最大 32 文字である)
    • AWS コンソールや設計ドキュメントなどで一覧化した場合に見切れる可能性を減らして可読性を高める
    • 識別子に採用した単語は一般的に用いられている略称である
    • その他の環境についても、環境識別子の数は通常そこまで多くならないず、またよく用いられるため、利用者にとっての認識負荷は少なく覚えるコストも低い
    同一目的の複数環境

    同一目的の環境が複数必要な場合は、識別子の末尾に連番をつける。

    例:

    • dev1, dev2, dev3
    • stg1, stg2

    役割 ({role})

    アプリケーションを構成する要素には役割がある。それを AWS リソース名に含めることで、開発者の理解を助け、操作ミスを低減する。

    主要なロール名と識別子は以下である。

    NameIdentifierMemo
    Web Serverwebapache や nginx などの Web サーバとしての役割
    Web ApplicationappWeb アプリケーションとしての役割
    Web APIapiHTTP(s) API を提供する
    Jobjob時間やある特定のイベントをもとにバックグラウンドの処理(バッチ処理など)を行う
    I/Fifファイル入出力を行う
    DBdbデータベース
    Cachecacheキャッシュ
    CI/CDciCI/CD サーバ

    名前を一般化せず、プロダクト名をそのまま利用しても問題ない。例えば、Web アプリサーバに tomcat、CI/CD サーバに jenkins といった名称を使っても良い。

    用途 ({usage})

    利用目的やリソースの動作 (action) を示す。user_master, fileupload といった形式や、認証(auth)や BFF(Backend For Frontend)など。

    役割 ({role}) と合わせてリソースが一意に特定できる名称を設定する。

    リージョン ({region})

    マルチリージョン構成を取り、リージョンを意識する必要のある場合に利用する。リージョンコード そのものではなく略称を識別子として用いる。

    NameRegion CodeIdentifier
    米国東部 (バージニア北部)us-east-1ue1
    米国東部 (オハイオ)us-east-2ue2
    米国西部 (北カリフォルニア)us-west-1uw1
    米国西部 (オレゴン)us-west-2uw2
    アジアパシフィック (東京)ap-northeast-1an1
    アジアパシフィック (ソウル)ap-northeast-2an2
    アジアパシフィック (大阪)ap-northeast-3an3
    アジアパシフィック (シンガポール)ap-southeast-1as1

    シングルリージョン構成または、リージョン間のリソースの関係が疎である場合はリージョン識別子を付与しない。

    アベイラビリティゾーン ({az})

    AZ 名にはリージョンコードを含めず、末尾のアルファベットだけとする。

    AZ IDIdentifier
    ap-northeast-1aa
    ap-northeast-1cc
    ap-northeast-1dd
    • 利用可能な文字: [a-d]{1}

    アクセス修飾子 ({access})

    VPC のサブネットは、パブリックサブネットの場合インターネットに直接アクセスできる。パブリックサブネットを区別したい場合はリソース名にアクセス修飾子を付与する。

    NameIdentifier
    パブリックサブネットpublic
    プライベートサブネットprivate

    全体ポリシー

    命名規約

    次のように各要素を使ってケバブケース (kebab-case) で命名する。パスカルケース (PascalCase) やスネークケース (snake_case) は利用しない。なお、サービス名自体にパスカルケースを用いることは許容する

    properties
    # 命名規約の基本形
    +{env}-{product}-{role}-{usage}

    理由:

    • ほぼ全ての AWS サービスではリソース名にハイフンを許容する。一方で、アンダースコアを許容しない WebACL のようなサービスがある
    • 環境名、サービス名などの単位で区切りを明確にできる

    利用可能な文字

    利用する文字は、半角英数字とハイフンに限定する。また、 小文字を推奨 する。

    • 推奨: [a-z0-9\\-]+

    また、先頭文字には半角英字を用い (ハイフン、数値を先頭にしない)、ハイフンは 2 文字以上連続させないこととする。

    AWS サービス名を含めない

    リソース名に AWS サービス名を含めない。

    良い例:

    properties
    stg-fuga-web-fileupload
    +stg-fuga-web-fileupload

    悪い例:

    properties
    stg-fuga-web-fileupload-s3
    +stg-fuga-web-fileupload-bucket

    理由:

    • AWS コンソールで見たときにどの AWS サービスのリソースを見ているか自明である
    • Terraform の命名規則 にリソース名を繰り返さないという記載があり、整合性を持たせるため

    Resource and data source arguments Do not repeat resource type in resource name (not partially, nor completely):

    ただし、VPC エンドポイントやセキュリティグループのように、どの AWS サービスの何で利用されているかを示す場合には利用することがある。

    プロジェクト名を含めない

    プロジェクト制を取っている場合、その開発チームの持ち物であることを示すためプロジェクト名をリソース名に含めたくなるが非推奨である。

    理由:

    • 必ずしも開発しているプロダクトと、プロジェクトの粒度・ライフサイクルは一致しない
    • プロジェクトが解散すると管理主管が曖昧になる

    プロジェクト名の替わりにプロダクト名を含めることとする。

    マルチクラウドを考慮し、aws 識別子を追加するかどうか

    AWS だけではなく、Azure や GCP などを組み合わせたマルチクラウド運用を行っている、あるいは行う予定がある場合を考慮し、リソース名に aws といったプレフィックス/サフィックスを付与する考えもある。

    本規約では、aws キーワードをリソース名に含めることは非推奨とする。

    理由:

    • 同一 product を異なるクラウドサービスで運用することは稀
    • 一部のサービス (例えば DWH のみ Google BigQuery を利用するようなケース) だけの使用であれば、{usage} で区別すれば十分である

    サービス別の命名規約

    サービスによって異なる命名規約と例を記載する。

    以下ではプロダクト名を fuga とした場合の例をあげる。

    VPC

    VPC に関わるリソースの命名について記載する。

    Resource NameNaming ConventionExampleNote
    VPC{env}-{product}stg-fuga
    Subnet{env}-{product}-{access}-{az}stg-fuga-public-aAZ: どこのゾーンかを識別するため
    EIP{env}-{product}-{usage}stg-fuga-nat
    Route Table{env}-{product}-{access}stg-fuga-public
    Internet Gateway{env}-{product}stg-fuga
    NAT Gateway{env}-{product}stg-fuga
    Endpoint{env}-{product}-{aws_service}stg-fuga-s3様々なサービスが利用するため AWS サービス名を含めている
    Security Group{env}-{product}-{aws_service}-{usage}stg-fuga-ec2-bastion様々なサービスが利用するため AWS サービス名を含めている

    API Gateway

    AWS上の命名制約
    • ドキュメントは確認できなかったら、リソース名は 1024 文字まで指定可能。システム上は一意である必要はない

    API Gateway は 全体ポリシーの命名規約 に則る。管理上、一意となるように命名する

    properties
    # 命名規約の基本形
    +{env}-{product}-{role}-{usage}-{access}
    +
    +# 例
    +stg-fuga-web-portal-private
    +stg-fuga-web-fileupload-public
    • API Gateway には複数の機能種別 (REST, HTTP) が存在するが、命名には含めない
    • private/public を名前に含めることで、public は認証が入っているかなどをチェックできる

    EC2

    インスタンス名の制限=タグの制限のため、名前は Amazon EC2 リソースのタグ付け に従う必要がある。

    properties
    # 命名規約の基本形
    +{env}-{product}-{role}
    +
    +# 例
    +stg-fuga-web

    オートスケーリング、オートヒーリング構成をする場合にどこの AZ に配置するかを意識させないため、リソース名に AZ は基本的に含めない。そのような構成をしないという方針は、アンチパターンのため構成を見直すべきと考える。

    LB

    AWS上の命名制約

    LB には ALB/NLB/CLB などの種類があるが、いずれも以下の命名規約に従う。また、Internal LB に関しては、{usage} 部に含める。

    properties
    # 命名規約
    +{env}-{product}-{role}-{usage}-{access}
    +
    +# 例
    +stg-fuga-web-api-public

    ターゲットグループ名は、基本的には LB と同じである。

    ただし、Blue/Green デプロイを行う場合は、ターゲットグループ名をユニークにし、どちら (Blue/Green) に所属しているかをわかるようにする。

    properties
    # Target group name (Blue/Green) の命名規約
    +{env}-{product}-{role}-{usage}-{access}-blue
    +
    +# 例
    +stg-fuga-web-public-blue

    ECS

    AWS上の命名制約
    • クラスター
      • 最大文字数: 255
      • 利用可能文字種: A-z, 0-9, -, _
      • その他制約: 先頭の文字は A-z のみ利用可能
    • サービス、タスク定義
      • 最大文字数: 255
      • 利用可能文字種: A-z, 0-9, -, _

    ECS の命名規約は以下のとおりである

    properties
    # クラスターの命名規約
    +{env}-{product}
    +
    +# 例
    +stg-fuga
    +
    +# サービスの命名規約
    +{env}-{product}-{role}-{usage}
    +
    +# 例
    +stg-fuga-api-auth
    +stg-fuga-web-frontend
    +
    +# タスク定義の命名規約
    +{env}-{product}-{role}-{usage}
    +
    +# 例
    +stg-fuga-batch-import-address

    Lambda

    Lambda Function
    AWS上の命名制約

    CreateFunction によると以下の制約である。

    • 1 ~ 64 文字
    • 利用可能文字: [a-zA-Z0-9-_]+

    Lambda は運用を経てリソース数が増えやすいサービスの一つである。そのため個別の機能名の前に {role} を含めてグルーピングしやすい名前にする。

    properties
    # 命名規約
    +{env}-{product}-{role}-{usage}
    +
    +# 例
    +stg-fuga-import-userprofile
    +stg-fuga-job-checkconsistency
    +stg-fuga-report-successrate

    もし、Scatter-Gather パターンを用いる場合は次のようにサフィックスに追加して区別する。

    properties
    # 命名規約
    +{env}-{product}-{role}-{usage}-scatter
    +{env}-{product}-{role}-{usage}-segment
    +{env}-{product}-{role}-{usage}-gather
    Lambda Layer
    AWS上の命名制約
    • 1 ~ 64 文字
    • 利用可能文字: [a-zA-Z0-9-_]+

    Lambda Layers は実行環境が重要であるため、 {runtime} で言語バージョンを指定する。

    properties
    # 命名規約
    +{env}-{product}-{runtime}-{usage}
    +
    +# 例
    +stg-fuga-python310-auth
    +stg-fuga-nodejs18-frontend

    RDS/Aurora

    AWS上の命名制約

    Amazon RDS の命名に関する制約 によると以下の制約である。

    • 1 ~ 63 個の英数字またはハイフンを使用する必要があります
    • 1 字目は文字である必要があります
    • 文字列の最後にハイフンを使用したり、ハイフンを 2 つ続けて使用したりすることはできません
    • 1 つの AWS アカウント、1 つの AWS リージョンにつき、すべての DB インスタンスにおいて一意である必要があります
    properties
    # クラスターの命名規約
    +{env}-{product}-{role}
    +
    +# 例
    +stg-fuga-auth
    +
    +# インスタンスの命名規約
    +{env}-{product}-{role}-{serial}
    +
    +# 例
    +stg-fuga-auth-01
    +
    +# DBパラメータグループの命名規約
    +{env}-{product}-{role}
    +{env}-{product}
    +
    +# 手動スナップショットの命名規約
    +{env}-{product}-{role}-{yyyy}-{mm}-{dd}

    AZ は含めない。

    理由:

    • RDS はマルチ AZ 構成をとることが推奨のため
    • Aurora は自動でマルチ AZ 構成をとっているため

    DB パラメータグループは、role 単位での設定を推奨する。product を跨いでの設定は行わない。

    • 設定値の変更はパラメータグループを適用している全ての DB に変更が反映される。同じパラメータグループを複数の DB で共有し過ぎることにより意図しない DB にまで設定変更が反映されるリスクを避けるため

    クラスター/インスタンスに適用する IAM ロール

    DB サブネット

    • VPC のサブネットを参照

    DynamoDB

    AWS上の命名制約

    Amazon DynamoDB でサポートされるデータ型と命名規則 によると以下の制約である。

    • すべての名前は UTF-8 を使用してエンコードする必要があり、大文字と小文字が区別される
    • 3 ~ 255 文字
    • 利用可能な文字: [a-zA-Z0-9_.-]+

    DynamoDB のテーブル名には、環境、プロダクト名、用途を用いる。データは長く残り、かつ変更しにくいため会社名などの変化しやすい項目は含めない。

    properties
    # DynamoDB の命名規約
    +{env}-{product}-{usage}
    +
    +# 例
    +stg-fuga-user
    +stg-fuga-user-accesslog

    なお、インデックス名は idx-1, idx-2 のような連番での管理を推奨する。RDB とは異なりアカウント単位での一意性は不要なため、テーブル名は含めなくても良いため、 idx_{テーブル名}_{連番} としなくても良い。DynamoDB は 最大で 20 のグローバルセカンダリインデックス を持つことができるが、インデックスの数は最小限に抑えることが鉄則であるため、0 埋めしない。ただし、要件上どうしても多用が避けられないことが判明している場合は idx-01, idx-02 と 0 埋めする。

    S3 Bucket

    AWS上の命名制約

    Amazon S3 バケットの命名要件 によると以下の制約である。

    • 1 ~ 63 文字
    • 半角英数字、ピリオド、ダッシュのみを使用可能
    • バケット名の各ラベルは、小文字または数字で始まっている必要がある
    • バケット名では、アンダースコア、末尾のダッシュ、連続するピリオド、隣接するピリオドとダッシュは使用できない
    • バケット名を IP アドレス (198.51.100.24) として書式設定することはできない

    S3 は非常に多くの用途で用いることがあるため、利用形態に応じて規則を変えて対応する。

    properties
    # 通常の命名規約
    +{env}-{product}-{use}
    +
    +# 例
    +stg-fuga-fileupload
    +
    +# ログを保管するバケットの命名規約
    +{env}-{product}-{service}-logs
    +
    +# 例
    +stg-fuga-alb-logs
    +
    +# データ授受で利用する場合の命名規約
    +{env}-{product}-{use}-{dest}-if
    +
    +# 例
    +stg-fuga-userinfo-fis-if

    Kinesis Data Streams

    AWS上の命名制約

    CreateStream によると以下の制約である。

    • 異なる AWS アカウントであれば同名が許容
    • 異なるリージョンであれば同名が許容
    • 1 ~ 128 文字
    • [a-zA-Z0-9_.-]+

    IoT のセンシングを始めとしたイベントデータの場合は、次の命名規約を用いる。{role} には import や export など、どのような処理を行うかを規定する。

    設計によっては、データ種別 (スキーマ) 毎に分離することもあるため、デバイス名やセンサー名などの発生源の名前を持たせる。

    properties
    # 命名規約
    +{env}-{product}-{role}-{usage}-{schema}
    +
    +# 例
    +stg-fuga-import-iotsensor-devicetype
    +stg-fuga-import-iotsensor-toggle

    ジョブキューとして用いる場合は、どのジョブを利用するかが重要であるため、呼び出し用であることが明確になるように命名する。

    properties
    # 命名規約
    +{env}-{product}-call-{呼び出したいジョブ名}
    +
    +# 例
    +stg-fuga-call-job-arrival-check

    SQS

    AWS上の命名制約

    Amazon SQS キューとメッセージの識別子 によると以下の制約である。

    • 最大 80 文字
    • [a-zA-Z0-9_-]
    • FIFO キューの場合には .fifo のサフィックスで終わる必要がある
    • 1 つの AWS アカウント、1 つの AWS リージョンにつき一意である必要がある

    1 つのキューに対し、複数のプロデューサー、コンシューマーを取りうるため、プロデューサー、コンシューマーを名前に含めることは推奨しない。

    properties
    # 標準キューの命名規約
    +{env}-{company}-{product}-{usage}
    +
    +# 例
    +stg-future-fuga-processresult
    +
    +# FIFOキューの命名規約
    +{env}-{company}-{product}-{usage}.fifo
    +
    +# 例
    +stg-future-fuga-processresult.fifo

    Event Bridge Rule

    AWS上の命名制約
    • 最大 64 文字
    • 数字、小文字/大文字、 . (ピリオド)、 - (ハイフン)、 _ (アンダーバー) が使用可能
    • 同じリージョン内および同じイベントバス上の別のルールと同じ名前を付けることは不可
    properties
    # 命名規約
    +{env}-{product}-{usage}-{source}-{target}
    +
    +# 例
    +stg-fuga-deploy-s3-codepipeline
    +stg-fuga-archive-auth0-s3
    +stg-fuga-polling-schedule-lambda

    ※スケジュールタイプのルールの場合は {source}schedule と記載する。

    IAM

    IAM に関わるリソースの命名について記載する。IAM グループ、IAM ユーザー、IAM ロール、IAM ポリシーの 4 点について述べる。

    IAM ユーザー

    IAM ユーザーについては、誰 (人またはシステム) が利用するのかを識別することを目的とする。同じユーザーを複数の人やシステムで使いまわすと、誰が操作したのかといった証跡を追えなくなってしまうため、個別に発行することを推奨する。 また、役割や権限といった情報は名前に含めない。そのような名前はユーザーに紐づけるロールが増えた際などに名前と役割や権限の実態が乖離してしまうためである。

    IAM ユーザー名については全体ポリシーから外れ、アンダースコア区切りを推奨する。

    理由:

    • 多くのサービスでユーザー名には慣習的にアンダースコアを用いることが多いため

    人が利用する IAM ユーザー:

    properties
    # 命名規約
    +{company}_{username}
    +
    +# 例
    +future_taro_mirai

    ※AWS アカウントに関与する人が単一の会社に属する人だけである場合は {company}_ を省略しても良い。

    システムが利用する IAM ユーザー:

    properties
    # 命名規約
    +{product}_{usage}
    +
    +# 例
    +fuga_api
    +fuga_auth0

    AWS サービスに権限付与する場合は IAM ロールで付与することを想定している。システムが利用する IAM ユーザーは、別のクラウドや SaaS 等への権限付与に使うことを想定している。

    全体ポリシーの命名規約 とは異なり、環境名 {env} を Prefix につけない理由は次である。

    • ある AWS アカウントに対して、Switch Role などで別の環境にアクセスする際に混乱が生じる
    • ブラウザのパスワード管理などのために ID 名を分けたいという考えもあるかもしれないが、パスワード管理アプリなどの利用を推奨する
    IAM グループ

    IAM グループに IAM ユーザーを追加することで複数ユーザーの権限を一括管理できる。IAM ユーザーは複数の IAM グループに追加可能だが、所属可能なグループ数は最大で 10 という制約があるため注意が必要である。

    この制約を踏まえ、各役職ごとに基本となるグループを作成し、基本グループで対応できない例外的な権限の付与を個別のグループで対応することを想定した命名としている。

    また、グループ数をむやみに増やさないためにグループ名に環境名 {env} はつけない。仮に future-developer というグループが dev 環境のみにアクセスできるといったような制御をする場合でも、グループ名には dev をつけず、dev 環境にアクセス可能なポリシーをグループにアタッチする方針としている。

    基本となるグループ:

    properties
    # 命名規約
    +{company}-{role}
    +
    +# 例
    +future-developer
    +future-maintainer

    ここでの {role} はユーザーが担う役割を表す。

    個別のグループ:

    properties
    # 命名規約
    +{target}-{usage}
    +
    +# 例
    +bastion-access

    個別のグループは Session Manager で EC2 にアクセスするグループといった使い方を想定している。

    例外的に特定のユーザーにのみ権限を付与する、会社を超えて共通のグループを付与するといったユースケースも考えられる。

    IAM ロール

    IAM ロールは、AWS サービスに権限を付与する目的で利用する。IAM ロールに複数の IAM ポリシーをアタッチできるため、IAM ロールの命名では細かい権限を表現することは避け、IAM ロールを誰が使うのかを明確にすることを主目的とする。

    properties
    # 命名規約
    +{env}-{product}-{aws_service}-{usage}
    +
    +# 例
    +stg-fuga-ec2-bastion
    +stg-fuga-lambda-api

    ※場合によっては {usage} 部に詳細情報を追加しても良い

    IAM ポリシー

    IAM ポリシーの命名に入る前に、ポリシーの設計方針について記載する。 ここでは、ポリシー設計方針の代表例として、以下の 2 パターンについて説明する。

    • 細かく設定し再利用するパターン
    • 特定のリソースに付与するポリシーを書き出すパターン

    それぞれの設計方針にはメリット・デメリットがあり開発規模などで使い分けが想定されるため、それぞれの場合の命名方法について記載する。

    細かく設定する場合:

    json
    {
    +  "Version": "2012-10-17",
    +  "Statement": [
    +    {
    +      "Action": "s3:*",
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    }
    +  ]
    +}
    properties
    # 命名規約
    +{env}-{product}-{permission}-{aws_service}-{usage}
    +
    +# 例
    +stg-fuga-allow-s3-full
    +stg-fuga-allow-ses-send

    特定のリソースに付与するポリシーを書き出す場合:

    json
    {
    +  "Version": "2012-10-17",
    +  "Statement": [
    +    {
    +      "Action": "s3:*",
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    },
    +    {
    +      "Action": ["ses:SendEmail", "ses:SendRawEmail"],
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    },
    +    {
    +      "Action": "sqs:*",
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    }
    +  ]
    +}
    properties
    # 命名規約
    +{env}-{product}-{aws_service}-{usage}
    +
    +# 例
    +stg-fuga-ec2-bastion
    +stg-fuga-iam-group-future-develop

    IAM グループ用のポリシーを作成する例では、company を含めた future-develop といった名前を {usage} としている。

    この場合は命名粒度が IAM ロールと等しくなるため、命名規約も同じ方針にしている。

    予め用意されているポリシーの名前は PascalCase 形式であるが (例: AmazonS3FullAccess)、ユーザーが作成したことを明確にするため snake_case で命名する。

    タグの命名

    AWS上の命名制約

    Tag naming and usage conventions によれば以下の制約である。

    • 最大 50 個のタグを設定できる
    • タグキーは一意でなければならない
    • タグキーは最長 128 Unicode 文字、タグ値は最長 256 Unicode 文字
    • 使用可能文字
      • UTF-8 で表現できる文字、数字、スペース、. : + = @ _ / -
    • タグのキーと値では大文字と小文字が区別されます
    • タグに aws: プレフィックスは禁止

    AWS リソースのタグ付け によれば、タグ付けのベストプラクティスは以下である。

    • 個人情報 (PII) などの機密情報や秘匿性の高い情報をタグに設定しない
    • すべてのリソースタイプに一貫して適用する
    • リソースアクセスコントロールの管理、コスト追跡、オートメーション、整理など、複数の目的に対応したタグガイドラインを考慮する
    • 自動化ツールを使用してリソースタグを管理する
    • タグは、多めに使用する
    • 将来の変更の影響を考慮する
    • AWS Organizations のタグポリシーを利用することで、組織が採用するタグ付け標準を自動的に適用する

    より詳しいタグ付けのベストプラクティスも存在するが、本紙の範囲を超えるため紹介のみに留める。 https://docs.aws.amazon.com/whitepapers/latest/tagging-best-practices/tagging-best-practices.html

    タグキー

    • 使用する文字は英数字に限定する。基本的には パスカルケース (PascalCase) 形式を推奨する
      • リソース作成時に自動生成される Name タグと平仄を合わせるため
    • 以下の観点でタグを使い分ける
      • リソース整理
      • コスト管理
        • AWS Billing にてコスト配分タグの設定が必要
      • オートメーション
        • EC2 の自動起動停止の管理など
      • アクセス制御
        • タグ値を利用した IAM ポリシーのアクセス制御など

    主要なタグ項目

    CategoryTag KeyRequiredNote
    CommonEnv環境識別子
    Systemシステム名
    Nameリソースの識別子として機能名などを設定
    費用按分Ownerリソースの管理主管部署。費用の負担先を想定
    Project開発担当チーム。どのチームがどれくらい利用したかをトレースするために設定
    ツールで利用StartAt起動時刻。自動化ツールなどで必要があれば設定
    EndAt停止時刻

    タグ値

    • 各タグキーごとに原則、タグ値の元となる命名規約に従う
    • 元となる命名規約がない場合、以下を推奨する
      • リソースの命名規約に従う
      • 頭文字のみの略語の場合は大文字のみ
    • 値の取りうるパターンが決まっている場合には、タグポリシーで値を設定する

    タグポリシー

    AWS Organizations を利用している場合、タグの標準化を促進するタグポリシーの設定が可能となる。 タグポリシーにより実現できることは以下。

    • タグキーの大文字小文字の組み合わせを強制する
      • 例: Name を指定した場合、 name, NAME, nAME などはタグキーとして設定できなくなる
    • 任意のタグキーに対して、設定可能なタグ値を指定する
      • Env など、予め取りうるタグ値のパターンが決まっている場合に利用
    • タグポリシーを適用するリソースタイプを指定

    License

    CC-By-4.0

    `,207))])}const m=n(r,[["render",d]]);export{g as __pageData,m as default}; diff --git "a/assets/documents_forAWSResource_AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md.DgKzw8SL.lean.js" "b/assets/documents_forAWSResource_AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md.DgKzw8SL.lean.js" new file mode 100644 index 00000000..83eb54a0 --- /dev/null +++ "b/assets/documents_forAWSResource_AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.md.DgKzw8SL.lean.js" @@ -0,0 +1,176 @@ +import{_ as n,c as e,G as i,a3 as l,B as t,o as p}from"./chunks/framework.BDUoXecB.js";const g=JSON.parse('{"title":"AWSインフラ命名規約","description":"","frontmatter":{"sidebarDepth":4,"title":"AWSインフラ命名規約","author":"フューチャー株式会社","head":[["meta",{"name":"keywords","content":"AWS,命名規約,コーディング規約"}]]},"headers":[],"relativePath":"documents/forAWSResource/AWSインフラリソース命名規約.md","filePath":"documents/forAWSResource/AWSインフラリソース命名規約.md"}'),r={name:"documents/forAWSResource/AWSインフラリソース命名規約.md"};function d(h,s,c,o,u,b){const a=t("page-title");return p(),e("div",null,[i(a),s[0]||(s[0]=l(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。 ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。 また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    免責事項

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせた開発手法が採用されている。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している

    前提条件

    • 開発チームが 3 ~ 30 名程度で構築する規模での利用を想定している
    • 本規約をそのままプロジェクトに導入することを推奨する
      • そのままの導入ができない場合は、一部を抜粋、拡張して用いられることを想定している
    • AWS の構成はマネージドサービスを活用するベストプラクティスに従うものとする
      • 例えば、1 台の EC2 上で DB とアプリのように複数のサービスを稼働させるといった構成は考慮しない
    • 一部のリージョンでのみ利用可能な機能は想定していない

    名前の構成要素

    各リソースの名前に用いる要素を次の一覧に示す。

    CategoryItemNameUsage
    Common{env}環境環境の区別
    {product}製品名構築する製品名またはシステム名。稼働するマイクロサービス名もこれに当たる
    {role}役割役割を示す。場合によっては具体的な製品名 postgres, jenkins などを指定する
    {usage}用途利用目的やリソースの動作 (action) を示す。user_master, fileupload など識別したい値を指定する
    {target}対象操作の対象。usage が複数の対象があり区別したいときに利用する。
    Network{region}リージョンリージョンコード の略称を用いる
    {az}アベイラビリティーゾーンマルチ AZ 構成などで、明示的に AZ を意識する場合に用いる
    {access}アクセス修飾子access modifier. ネットワークでの public, private を区別したいときに利用する
    {permission}権限allow または deny を指定する。Security Group での利用を想定
    Organization{company}会社名会社の特定に利用。複数の会社による構築や、運用に複数社関わる場合などに必要となる
    {project}プロジェクトプロジェクト制でプロダクトを開発する際のプロジェクト名または、プロジェクトコード

    環境 ({env})

    ソフトウェア開発では複数の環境を用意し、dev, stg, prod などの名前をつけて互いに完全に分離・区別する運用を行うことが多い。そういった環境分離のために AWS インフラは次のいずれか、もしくは組み合わせで設計される。

    1. 環境単位で AWS アカウントを作成する
    2. 環境単位で AWS リージョンを分ける
    3. 命名で分ける

    いずれの方法でも、 各リソース名に環境名を付与することを推奨 する。冗長な命名となる場合もあるが、以下が理由である。

    • 同一 AWS アカウントかつ同一リージョン内には、同じ名前のリソースを作成できない
    • AWS リソース名のみで環境を特定できるようにする事で、誤った環境のリソースを操作してしまうミスを低減する
    • メンバー間の認識齟齬を無くし生産性を高める
      • チームメンバーなどの問い合わせやトラブルシュートの際に、リソース名のみでどの環境にあるか素早く判断できるようにする
      • メンバーの役割によっては AWS アカウント構成を完全には理解できていない可能性がある
    環境識別子

    主要な環境名と識別子 (Identifier) は以下である。AWS リソースの命名には識別子を用いる。

    NameIdentifierMemo
    Productionprodエンドユーザーが使う環境、本番運用環境
    Stagingstg本番と同じ構成でテストするための環境
    User Acceptance Testuatユーザーがシステムのレビュー、または操作を学習するための環境
    Performance Testperf性能検証を行うための環境
    Developmentdev開発チームが開発するための環境
    Locallocalローカル環境

    prod についてはよく用いる dev, stg と見間違えを防ぐため 4 文字にしている。

    デプロイメント環境 の考え方では、User Acceptance Test 環境を単にテスト環境 (Test) 呼ぶが、テストという単語は汎用的であるため複数の環境にあてはまる。したがって容易に認識齟齬が生じるため本規約では非推奨とする。

    名前には必ず識別子を用いる。環境名をそのまま利用しない (例: production-example-s3bucket とは命名しない)。

    理由:

    • AWS リソースによっては名前の文字数の制限が厳しい (例: ELB は最大 32 文字である)
    • AWS コンソールや設計ドキュメントなどで一覧化した場合に見切れる可能性を減らして可読性を高める
    • 識別子に採用した単語は一般的に用いられている略称である
    • その他の環境についても、環境識別子の数は通常そこまで多くならないず、またよく用いられるため、利用者にとっての認識負荷は少なく覚えるコストも低い
    同一目的の複数環境

    同一目的の環境が複数必要な場合は、識別子の末尾に連番をつける。

    例:

    • dev1, dev2, dev3
    • stg1, stg2

    役割 ({role})

    アプリケーションを構成する要素には役割がある。それを AWS リソース名に含めることで、開発者の理解を助け、操作ミスを低減する。

    主要なロール名と識別子は以下である。

    NameIdentifierMemo
    Web Serverwebapache や nginx などの Web サーバとしての役割
    Web ApplicationappWeb アプリケーションとしての役割
    Web APIapiHTTP(s) API を提供する
    Jobjob時間やある特定のイベントをもとにバックグラウンドの処理(バッチ処理など)を行う
    I/Fifファイル入出力を行う
    DBdbデータベース
    Cachecacheキャッシュ
    CI/CDciCI/CD サーバ

    名前を一般化せず、プロダクト名をそのまま利用しても問題ない。例えば、Web アプリサーバに tomcat、CI/CD サーバに jenkins といった名称を使っても良い。

    用途 ({usage})

    利用目的やリソースの動作 (action) を示す。user_master, fileupload といった形式や、認証(auth)や BFF(Backend For Frontend)など。

    役割 ({role}) と合わせてリソースが一意に特定できる名称を設定する。

    リージョン ({region})

    マルチリージョン構成を取り、リージョンを意識する必要のある場合に利用する。リージョンコード そのものではなく略称を識別子として用いる。

    NameRegion CodeIdentifier
    米国東部 (バージニア北部)us-east-1ue1
    米国東部 (オハイオ)us-east-2ue2
    米国西部 (北カリフォルニア)us-west-1uw1
    米国西部 (オレゴン)us-west-2uw2
    アジアパシフィック (東京)ap-northeast-1an1
    アジアパシフィック (ソウル)ap-northeast-2an2
    アジアパシフィック (大阪)ap-northeast-3an3
    アジアパシフィック (シンガポール)ap-southeast-1as1

    シングルリージョン構成または、リージョン間のリソースの関係が疎である場合はリージョン識別子を付与しない。

    アベイラビリティゾーン ({az})

    AZ 名にはリージョンコードを含めず、末尾のアルファベットだけとする。

    AZ IDIdentifier
    ap-northeast-1aa
    ap-northeast-1cc
    ap-northeast-1dd
    • 利用可能な文字: [a-d]{1}

    アクセス修飾子 ({access})

    VPC のサブネットは、パブリックサブネットの場合インターネットに直接アクセスできる。パブリックサブネットを区別したい場合はリソース名にアクセス修飾子を付与する。

    NameIdentifier
    パブリックサブネットpublic
    プライベートサブネットprivate

    全体ポリシー

    命名規約

    次のように各要素を使ってケバブケース (kebab-case) で命名する。パスカルケース (PascalCase) やスネークケース (snake_case) は利用しない。なお、サービス名自体にパスカルケースを用いることは許容する

    properties
    # 命名規約の基本形
    +{env}-{product}-{role}-{usage}

    理由:

    • ほぼ全ての AWS サービスではリソース名にハイフンを許容する。一方で、アンダースコアを許容しない WebACL のようなサービスがある
    • 環境名、サービス名などの単位で区切りを明確にできる

    利用可能な文字

    利用する文字は、半角英数字とハイフンに限定する。また、 小文字を推奨 する。

    • 推奨: [a-z0-9\\-]+

    また、先頭文字には半角英字を用い (ハイフン、数値を先頭にしない)、ハイフンは 2 文字以上連続させないこととする。

    AWS サービス名を含めない

    リソース名に AWS サービス名を含めない。

    良い例:

    properties
    stg-fuga-web-fileupload
    +stg-fuga-web-fileupload

    悪い例:

    properties
    stg-fuga-web-fileupload-s3
    +stg-fuga-web-fileupload-bucket

    理由:

    • AWS コンソールで見たときにどの AWS サービスのリソースを見ているか自明である
    • Terraform の命名規則 にリソース名を繰り返さないという記載があり、整合性を持たせるため

    Resource and data source arguments Do not repeat resource type in resource name (not partially, nor completely):

    ただし、VPC エンドポイントやセキュリティグループのように、どの AWS サービスの何で利用されているかを示す場合には利用することがある。

    プロジェクト名を含めない

    プロジェクト制を取っている場合、その開発チームの持ち物であることを示すためプロジェクト名をリソース名に含めたくなるが非推奨である。

    理由:

    • 必ずしも開発しているプロダクトと、プロジェクトの粒度・ライフサイクルは一致しない
    • プロジェクトが解散すると管理主管が曖昧になる

    プロジェクト名の替わりにプロダクト名を含めることとする。

    マルチクラウドを考慮し、aws 識別子を追加するかどうか

    AWS だけではなく、Azure や GCP などを組み合わせたマルチクラウド運用を行っている、あるいは行う予定がある場合を考慮し、リソース名に aws といったプレフィックス/サフィックスを付与する考えもある。

    本規約では、aws キーワードをリソース名に含めることは非推奨とする。

    理由:

    • 同一 product を異なるクラウドサービスで運用することは稀
    • 一部のサービス (例えば DWH のみ Google BigQuery を利用するようなケース) だけの使用であれば、{usage} で区別すれば十分である

    サービス別の命名規約

    サービスによって異なる命名規約と例を記載する。

    以下ではプロダクト名を fuga とした場合の例をあげる。

    VPC

    VPC に関わるリソースの命名について記載する。

    Resource NameNaming ConventionExampleNote
    VPC{env}-{product}stg-fuga
    Subnet{env}-{product}-{access}-{az}stg-fuga-public-aAZ: どこのゾーンかを識別するため
    EIP{env}-{product}-{usage}stg-fuga-nat
    Route Table{env}-{product}-{access}stg-fuga-public
    Internet Gateway{env}-{product}stg-fuga
    NAT Gateway{env}-{product}stg-fuga
    Endpoint{env}-{product}-{aws_service}stg-fuga-s3様々なサービスが利用するため AWS サービス名を含めている
    Security Group{env}-{product}-{aws_service}-{usage}stg-fuga-ec2-bastion様々なサービスが利用するため AWS サービス名を含めている

    API Gateway

    AWS上の命名制約
    • ドキュメントは確認できなかったら、リソース名は 1024 文字まで指定可能。システム上は一意である必要はない

    API Gateway は 全体ポリシーの命名規約 に則る。管理上、一意となるように命名する

    properties
    # 命名規約の基本形
    +{env}-{product}-{role}-{usage}-{access}
    +
    +# 例
    +stg-fuga-web-portal-private
    +stg-fuga-web-fileupload-public
    • API Gateway には複数の機能種別 (REST, HTTP) が存在するが、命名には含めない
    • private/public を名前に含めることで、public は認証が入っているかなどをチェックできる

    EC2

    インスタンス名の制限=タグの制限のため、名前は Amazon EC2 リソースのタグ付け に従う必要がある。

    properties
    # 命名規約の基本形
    +{env}-{product}-{role}
    +
    +# 例
    +stg-fuga-web

    オートスケーリング、オートヒーリング構成をする場合にどこの AZ に配置するかを意識させないため、リソース名に AZ は基本的に含めない。そのような構成をしないという方針は、アンチパターンのため構成を見直すべきと考える。

    LB

    AWS上の命名制約

    LB には ALB/NLB/CLB などの種類があるが、いずれも以下の命名規約に従う。また、Internal LB に関しては、{usage} 部に含める。

    properties
    # 命名規約
    +{env}-{product}-{role}-{usage}-{access}
    +
    +# 例
    +stg-fuga-web-api-public

    ターゲットグループ名は、基本的には LB と同じである。

    ただし、Blue/Green デプロイを行う場合は、ターゲットグループ名をユニークにし、どちら (Blue/Green) に所属しているかをわかるようにする。

    properties
    # Target group name (Blue/Green) の命名規約
    +{env}-{product}-{role}-{usage}-{access}-blue
    +
    +# 例
    +stg-fuga-web-public-blue

    ECS

    AWS上の命名制約
    • クラスター
      • 最大文字数: 255
      • 利用可能文字種: A-z, 0-9, -, _
      • その他制約: 先頭の文字は A-z のみ利用可能
    • サービス、タスク定義
      • 最大文字数: 255
      • 利用可能文字種: A-z, 0-9, -, _

    ECS の命名規約は以下のとおりである

    properties
    # クラスターの命名規約
    +{env}-{product}
    +
    +# 例
    +stg-fuga
    +
    +# サービスの命名規約
    +{env}-{product}-{role}-{usage}
    +
    +# 例
    +stg-fuga-api-auth
    +stg-fuga-web-frontend
    +
    +# タスク定義の命名規約
    +{env}-{product}-{role}-{usage}
    +
    +# 例
    +stg-fuga-batch-import-address

    Lambda

    Lambda Function
    AWS上の命名制約

    CreateFunction によると以下の制約である。

    • 1 ~ 64 文字
    • 利用可能文字: [a-zA-Z0-9-_]+

    Lambda は運用を経てリソース数が増えやすいサービスの一つである。そのため個別の機能名の前に {role} を含めてグルーピングしやすい名前にする。

    properties
    # 命名規約
    +{env}-{product}-{role}-{usage}
    +
    +# 例
    +stg-fuga-import-userprofile
    +stg-fuga-job-checkconsistency
    +stg-fuga-report-successrate

    もし、Scatter-Gather パターンを用いる場合は次のようにサフィックスに追加して区別する。

    properties
    # 命名規約
    +{env}-{product}-{role}-{usage}-scatter
    +{env}-{product}-{role}-{usage}-segment
    +{env}-{product}-{role}-{usage}-gather
    Lambda Layer
    AWS上の命名制約
    • 1 ~ 64 文字
    • 利用可能文字: [a-zA-Z0-9-_]+

    Lambda Layers は実行環境が重要であるため、 {runtime} で言語バージョンを指定する。

    properties
    # 命名規約
    +{env}-{product}-{runtime}-{usage}
    +
    +# 例
    +stg-fuga-python310-auth
    +stg-fuga-nodejs18-frontend

    RDS/Aurora

    AWS上の命名制約

    Amazon RDS の命名に関する制約 によると以下の制約である。

    • 1 ~ 63 個の英数字またはハイフンを使用する必要があります
    • 1 字目は文字である必要があります
    • 文字列の最後にハイフンを使用したり、ハイフンを 2 つ続けて使用したりすることはできません
    • 1 つの AWS アカウント、1 つの AWS リージョンにつき、すべての DB インスタンスにおいて一意である必要があります
    properties
    # クラスターの命名規約
    +{env}-{product}-{role}
    +
    +# 例
    +stg-fuga-auth
    +
    +# インスタンスの命名規約
    +{env}-{product}-{role}-{serial}
    +
    +# 例
    +stg-fuga-auth-01
    +
    +# DBパラメータグループの命名規約
    +{env}-{product}-{role}
    +{env}-{product}
    +
    +# 手動スナップショットの命名規約
    +{env}-{product}-{role}-{yyyy}-{mm}-{dd}

    AZ は含めない。

    理由:

    • RDS はマルチ AZ 構成をとることが推奨のため
    • Aurora は自動でマルチ AZ 構成をとっているため

    DB パラメータグループは、role 単位での設定を推奨する。product を跨いでの設定は行わない。

    • 設定値の変更はパラメータグループを適用している全ての DB に変更が反映される。同じパラメータグループを複数の DB で共有し過ぎることにより意図しない DB にまで設定変更が反映されるリスクを避けるため

    クラスター/インスタンスに適用する IAM ロール

    DB サブネット

    • VPC のサブネットを参照

    DynamoDB

    AWS上の命名制約

    Amazon DynamoDB でサポートされるデータ型と命名規則 によると以下の制約である。

    • すべての名前は UTF-8 を使用してエンコードする必要があり、大文字と小文字が区別される
    • 3 ~ 255 文字
    • 利用可能な文字: [a-zA-Z0-9_.-]+

    DynamoDB のテーブル名には、環境、プロダクト名、用途を用いる。データは長く残り、かつ変更しにくいため会社名などの変化しやすい項目は含めない。

    properties
    # DynamoDB の命名規約
    +{env}-{product}-{usage}
    +
    +# 例
    +stg-fuga-user
    +stg-fuga-user-accesslog

    なお、インデックス名は idx-1, idx-2 のような連番での管理を推奨する。RDB とは異なりアカウント単位での一意性は不要なため、テーブル名は含めなくても良いため、 idx_{テーブル名}_{連番} としなくても良い。DynamoDB は 最大で 20 のグローバルセカンダリインデックス を持つことができるが、インデックスの数は最小限に抑えることが鉄則であるため、0 埋めしない。ただし、要件上どうしても多用が避けられないことが判明している場合は idx-01, idx-02 と 0 埋めする。

    S3 Bucket

    AWS上の命名制約

    Amazon S3 バケットの命名要件 によると以下の制約である。

    • 1 ~ 63 文字
    • 半角英数字、ピリオド、ダッシュのみを使用可能
    • バケット名の各ラベルは、小文字または数字で始まっている必要がある
    • バケット名では、アンダースコア、末尾のダッシュ、連続するピリオド、隣接するピリオドとダッシュは使用できない
    • バケット名を IP アドレス (198.51.100.24) として書式設定することはできない

    S3 は非常に多くの用途で用いることがあるため、利用形態に応じて規則を変えて対応する。

    properties
    # 通常の命名規約
    +{env}-{product}-{use}
    +
    +# 例
    +stg-fuga-fileupload
    +
    +# ログを保管するバケットの命名規約
    +{env}-{product}-{service}-logs
    +
    +# 例
    +stg-fuga-alb-logs
    +
    +# データ授受で利用する場合の命名規約
    +{env}-{product}-{use}-{dest}-if
    +
    +# 例
    +stg-fuga-userinfo-fis-if

    Kinesis Data Streams

    AWS上の命名制約

    CreateStream によると以下の制約である。

    • 異なる AWS アカウントであれば同名が許容
    • 異なるリージョンであれば同名が許容
    • 1 ~ 128 文字
    • [a-zA-Z0-9_.-]+

    IoT のセンシングを始めとしたイベントデータの場合は、次の命名規約を用いる。{role} には import や export など、どのような処理を行うかを規定する。

    設計によっては、データ種別 (スキーマ) 毎に分離することもあるため、デバイス名やセンサー名などの発生源の名前を持たせる。

    properties
    # 命名規約
    +{env}-{product}-{role}-{usage}-{schema}
    +
    +# 例
    +stg-fuga-import-iotsensor-devicetype
    +stg-fuga-import-iotsensor-toggle

    ジョブキューとして用いる場合は、どのジョブを利用するかが重要であるため、呼び出し用であることが明確になるように命名する。

    properties
    # 命名規約
    +{env}-{product}-call-{呼び出したいジョブ名}
    +
    +# 例
    +stg-fuga-call-job-arrival-check

    SQS

    AWS上の命名制約

    Amazon SQS キューとメッセージの識別子 によると以下の制約である。

    • 最大 80 文字
    • [a-zA-Z0-9_-]
    • FIFO キューの場合には .fifo のサフィックスで終わる必要がある
    • 1 つの AWS アカウント、1 つの AWS リージョンにつき一意である必要がある

    1 つのキューに対し、複数のプロデューサー、コンシューマーを取りうるため、プロデューサー、コンシューマーを名前に含めることは推奨しない。

    properties
    # 標準キューの命名規約
    +{env}-{company}-{product}-{usage}
    +
    +# 例
    +stg-future-fuga-processresult
    +
    +# FIFOキューの命名規約
    +{env}-{company}-{product}-{usage}.fifo
    +
    +# 例
    +stg-future-fuga-processresult.fifo

    Event Bridge Rule

    AWS上の命名制約
    • 最大 64 文字
    • 数字、小文字/大文字、 . (ピリオド)、 - (ハイフン)、 _ (アンダーバー) が使用可能
    • 同じリージョン内および同じイベントバス上の別のルールと同じ名前を付けることは不可
    properties
    # 命名規約
    +{env}-{product}-{usage}-{source}-{target}
    +
    +# 例
    +stg-fuga-deploy-s3-codepipeline
    +stg-fuga-archive-auth0-s3
    +stg-fuga-polling-schedule-lambda

    ※スケジュールタイプのルールの場合は {source}schedule と記載する。

    IAM

    IAM に関わるリソースの命名について記載する。IAM グループ、IAM ユーザー、IAM ロール、IAM ポリシーの 4 点について述べる。

    IAM ユーザー

    IAM ユーザーについては、誰 (人またはシステム) が利用するのかを識別することを目的とする。同じユーザーを複数の人やシステムで使いまわすと、誰が操作したのかといった証跡を追えなくなってしまうため、個別に発行することを推奨する。 また、役割や権限といった情報は名前に含めない。そのような名前はユーザーに紐づけるロールが増えた際などに名前と役割や権限の実態が乖離してしまうためである。

    IAM ユーザー名については全体ポリシーから外れ、アンダースコア区切りを推奨する。

    理由:

    • 多くのサービスでユーザー名には慣習的にアンダースコアを用いることが多いため

    人が利用する IAM ユーザー:

    properties
    # 命名規約
    +{company}_{username}
    +
    +# 例
    +future_taro_mirai

    ※AWS アカウントに関与する人が単一の会社に属する人だけである場合は {company}_ を省略しても良い。

    システムが利用する IAM ユーザー:

    properties
    # 命名規約
    +{product}_{usage}
    +
    +# 例
    +fuga_api
    +fuga_auth0

    AWS サービスに権限付与する場合は IAM ロールで付与することを想定している。システムが利用する IAM ユーザーは、別のクラウドや SaaS 等への権限付与に使うことを想定している。

    全体ポリシーの命名規約 とは異なり、環境名 {env} を Prefix につけない理由は次である。

    • ある AWS アカウントに対して、Switch Role などで別の環境にアクセスする際に混乱が生じる
    • ブラウザのパスワード管理などのために ID 名を分けたいという考えもあるかもしれないが、パスワード管理アプリなどの利用を推奨する
    IAM グループ

    IAM グループに IAM ユーザーを追加することで複数ユーザーの権限を一括管理できる。IAM ユーザーは複数の IAM グループに追加可能だが、所属可能なグループ数は最大で 10 という制約があるため注意が必要である。

    この制約を踏まえ、各役職ごとに基本となるグループを作成し、基本グループで対応できない例外的な権限の付与を個別のグループで対応することを想定した命名としている。

    また、グループ数をむやみに増やさないためにグループ名に環境名 {env} はつけない。仮に future-developer というグループが dev 環境のみにアクセスできるといったような制御をする場合でも、グループ名には dev をつけず、dev 環境にアクセス可能なポリシーをグループにアタッチする方針としている。

    基本となるグループ:

    properties
    # 命名規約
    +{company}-{role}
    +
    +# 例
    +future-developer
    +future-maintainer

    ここでの {role} はユーザーが担う役割を表す。

    個別のグループ:

    properties
    # 命名規約
    +{target}-{usage}
    +
    +# 例
    +bastion-access

    個別のグループは Session Manager で EC2 にアクセスするグループといった使い方を想定している。

    例外的に特定のユーザーにのみ権限を付与する、会社を超えて共通のグループを付与するといったユースケースも考えられる。

    IAM ロール

    IAM ロールは、AWS サービスに権限を付与する目的で利用する。IAM ロールに複数の IAM ポリシーをアタッチできるため、IAM ロールの命名では細かい権限を表現することは避け、IAM ロールを誰が使うのかを明確にすることを主目的とする。

    properties
    # 命名規約
    +{env}-{product}-{aws_service}-{usage}
    +
    +# 例
    +stg-fuga-ec2-bastion
    +stg-fuga-lambda-api

    ※場合によっては {usage} 部に詳細情報を追加しても良い

    IAM ポリシー

    IAM ポリシーの命名に入る前に、ポリシーの設計方針について記載する。 ここでは、ポリシー設計方針の代表例として、以下の 2 パターンについて説明する。

    • 細かく設定し再利用するパターン
    • 特定のリソースに付与するポリシーを書き出すパターン

    それぞれの設計方針にはメリット・デメリットがあり開発規模などで使い分けが想定されるため、それぞれの場合の命名方法について記載する。

    細かく設定する場合:

    json
    {
    +  "Version": "2012-10-17",
    +  "Statement": [
    +    {
    +      "Action": "s3:*",
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    }
    +  ]
    +}
    properties
    # 命名規約
    +{env}-{product}-{permission}-{aws_service}-{usage}
    +
    +# 例
    +stg-fuga-allow-s3-full
    +stg-fuga-allow-ses-send

    特定のリソースに付与するポリシーを書き出す場合:

    json
    {
    +  "Version": "2012-10-17",
    +  "Statement": [
    +    {
    +      "Action": "s3:*",
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    },
    +    {
    +      "Action": ["ses:SendEmail", "ses:SendRawEmail"],
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    },
    +    {
    +      "Action": "sqs:*",
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    }
    +  ]
    +}
    properties
    # 命名規約
    +{env}-{product}-{aws_service}-{usage}
    +
    +# 例
    +stg-fuga-ec2-bastion
    +stg-fuga-iam-group-future-develop

    IAM グループ用のポリシーを作成する例では、company を含めた future-develop といった名前を {usage} としている。

    この場合は命名粒度が IAM ロールと等しくなるため、命名規約も同じ方針にしている。

    予め用意されているポリシーの名前は PascalCase 形式であるが (例: AmazonS3FullAccess)、ユーザーが作成したことを明確にするため snake_case で命名する。

    タグの命名

    AWS上の命名制約

    Tag naming and usage conventions によれば以下の制約である。

    • 最大 50 個のタグを設定できる
    • タグキーは一意でなければならない
    • タグキーは最長 128 Unicode 文字、タグ値は最長 256 Unicode 文字
    • 使用可能文字
      • UTF-8 で表現できる文字、数字、スペース、. : + = @ _ / -
    • タグのキーと値では大文字と小文字が区別されます
    • タグに aws: プレフィックスは禁止

    AWS リソースのタグ付け によれば、タグ付けのベストプラクティスは以下である。

    • 個人情報 (PII) などの機密情報や秘匿性の高い情報をタグに設定しない
    • すべてのリソースタイプに一貫して適用する
    • リソースアクセスコントロールの管理、コスト追跡、オートメーション、整理など、複数の目的に対応したタグガイドラインを考慮する
    • 自動化ツールを使用してリソースタグを管理する
    • タグは、多めに使用する
    • 将来の変更の影響を考慮する
    • AWS Organizations のタグポリシーを利用することで、組織が採用するタグ付け標準を自動的に適用する

    より詳しいタグ付けのベストプラクティスも存在するが、本紙の範囲を超えるため紹介のみに留める。 https://docs.aws.amazon.com/whitepapers/latest/tagging-best-practices/tagging-best-practices.html

    タグキー

    • 使用する文字は英数字に限定する。基本的には パスカルケース (PascalCase) 形式を推奨する
      • リソース作成時に自動生成される Name タグと平仄を合わせるため
    • 以下の観点でタグを使い分ける
      • リソース整理
      • コスト管理
        • AWS Billing にてコスト配分タグの設定が必要
      • オートメーション
        • EC2 の自動起動停止の管理など
      • アクセス制御
        • タグ値を利用した IAM ポリシーのアクセス制御など

    主要なタグ項目

    CategoryTag KeyRequiredNote
    CommonEnv環境識別子
    Systemシステム名
    Nameリソースの識別子として機能名などを設定
    費用按分Ownerリソースの管理主管部署。費用の負担先を想定
    Project開発担当チーム。どのチームがどれくらい利用したかをトレースするために設定
    ツールで利用StartAt起動時刻。自動化ツールなどで必要があれば設定
    EndAt停止時刻

    タグ値

    • 各タグキーごとに原則、タグ値の元となる命名規約に従う
    • 元となる命名規約がない場合、以下を推奨する
      • リソースの命名規約に従う
      • 頭文字のみの略語の場合は大文字のみ
    • 値の取りうるパターンが決まっている場合には、タグポリシーで値を設定する

    タグポリシー

    AWS Organizations を利用している場合、タグの標準化を促進するタグポリシーの設定が可能となる。 タグポリシーにより実現できることは以下。

    • タグキーの大文字小文字の組み合わせを強制する
      • 例: Name を指定した場合、 name, NAME, nAME などはタグキーとして設定できなくなる
    • 任意のタグキーに対して、設定可能なタグ値を指定する
      • Env など、予め取りうるタグ値のパターンが決まっている場合に利用
    • タグポリシーを適用するリソースタイプを指定

    License

    CC-By-4.0

    `,207))])}const m=n(r,[["render",d]]);export{g as __pageData,m as default}; diff --git a/assets/documents_forAWSResource_index.md.BirY3q_E.js b/assets/documents_forAWSResource_index.md.BirY3q_E.js new file mode 100644 index 00000000..e0705ee1 --- /dev/null +++ b/assets/documents_forAWSResource_index.md.BirY3q_E.js @@ -0,0 +1 @@ +import{_ as r,c as t,a3 as a,o}from"./chunks/framework.BDUoXecB.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"AWSインフラ命名規約","tagline":"Future Enterprise Naming Convention Standards for AWS infrastructure resource","actions":[{"theme":"brand","text":"AWSインフラ命名規約","link":"./AWSインフラリソース命名規約.md"}]}},"headers":[],"relativePath":"documents/forAWSResource/index.md","filePath":"documents/forAWSResource/index.md"}'),s={name:"documents/forAWSResource/index.md"};function n(c,e,d,i,u,E){return o(),t("div",null,e[0]||(e[0]=[a('

    可読性や保守性、拡張性を考慮した AWS インフラ命名規則です。

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。

    ファイルはPandocを利用して作成しています。

    ',5)]))}const A=r(s,[["render",n]]);export{h as __pageData,A as default}; diff --git a/assets/documents_forAWSResource_index.md.BirY3q_E.lean.js b/assets/documents_forAWSResource_index.md.BirY3q_E.lean.js new file mode 100644 index 00000000..e0705ee1 --- /dev/null +++ b/assets/documents_forAWSResource_index.md.BirY3q_E.lean.js @@ -0,0 +1 @@ +import{_ as r,c as t,a3 as a,o}from"./chunks/framework.BDUoXecB.js";const h=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"AWSインフラ命名規約","tagline":"Future Enterprise Naming Convention Standards for AWS infrastructure resource","actions":[{"theme":"brand","text":"AWSインフラ命名規約","link":"./AWSインフラリソース命名規約.md"}]}},"headers":[],"relativePath":"documents/forAWSResource/index.md","filePath":"documents/forAWSResource/index.md"}'),s={name:"documents/forAWSResource/index.md"};function n(c,e,d,i,u,E){return o(),t("div",null,e[0]||(e[0]=[a('

    可読性や保守性、拡張性を考慮した AWS インフラ命名規則です。

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。

    ファイルはPandocを利用して作成しています。

    ',5)]))}const A=r(s,[["render",n]]);export{h as __pageData,A as default}; diff --git a/assets/documents_forGitBranch_commit_message_rule.md.DI5kmJni.js b/assets/documents_forGitBranch_commit_message_rule.md.DI5kmJni.js new file mode 100644 index 00000000..cae3e673 --- /dev/null +++ b/assets/documents_forGitBranch_commit_message_rule.md.DI5kmJni.js @@ -0,0 +1,18 @@ +import{_ as a,c as n,a3 as e,o as t}from"./chunks/framework.BDUoXecB.js";const u=JSON.parse('{"title":"コミットメッセージ規約","description":"","frontmatter":{"sidebarDepth":4,"title":"コミットメッセージ規約","author":"フューチャー株式会社"},"headers":[],"relativePath":"documents/forGitBranch/commit_message_rule.md","filePath":"documents/forGitBranch/commit_message_rule.md"}'),p={name:"documents/forGitBranch/commit_message_rule.md"};function i(l,s,r,c,d,o){return t(),n("div",null,s[0]||(s[0]=[e(`

    コミットメッセージ規約

    Gitのコミットメッセージにの書式についてルール化することで、コミットの目的がわかりやすくなる、履歴からのトラッキングの容易になる利点がある。

    本規約のコミットメッセージの書式としては、Conventional Commitsをベースとした規約としている。

    以下の形式でコミットメッセージを記載することとする。

    md
    <type>: <subject> <gitmoji>

    コミットメッセージは type、subject、gitmojiの最大3つの要素から構成され、それぞれは後述する書式に従うものとする。 この中でも、type、subjectについては必須とし、ほかの要素についてはプロジェクトの運用にしたがい任意とする。

    type

    typeについては必須の要素となり、以下のいずれかを選択するものとする。

    type説明
    feat新機能の追加
    fixバグの修正
    docsドキュメンテーションの更新
    refactorリファクタリング

    subject

    subjectについては必須の要素となり、変更内容を簡潔に記載するものとする。 issue idについては、PRから参照する運用を想定し、コミットメッセージの必須要素とはしないこととする。

    gitmoji

    gitmojiについては任意の要素となり、変更内容を視認しやすい絵文字の使用を可能とする。

    変更内容と選択される絵文字の対応については厳密とせず、開発者が任意に選択するものとする。

    type(feat, fix, docs, refactorなど)に基づく、選択例を以下に示す。

    txt
     ==== Emojis ====
    + :ambulance:  🚑致命的なバグ修正(fix)
    + :bug:  🐛バグ修正(fix)
    + :+1: 👍機能改善・機能修正(fix)
    + :cop: 👮セキュリティ関連の修正(fix)
    + :art: 🎨レイアウト関連の修正(fix)
    + :green_heart: 💚テストやCIの修正・改善(fix)
    + :wrench: 🔧設定ファイルの修正(fix)
    + :building_construction: 🏗️アーキテクチャの変更(fix)
    + :tada: 🎉大きな機能追加(feat)
    + :sparkles: ✨部分的な機能追加(feat)
    + :up:   🆙依存パッケージ等のアップデート(feat)
    + :memo: 📝ドキュメント修正(docs)
    + :bulb: 💡ソースコードへのコメント追加や修正(docs)
    + :lipstick: 💄Lintエラーの修正やコードスタイルの修正(refactor)
    + :recycle: ♻️リファクタリング(refactor)
    + :fire: 🔥コードやファイルの削除(refactor)
    + :rocket: 🚀パフォーマンス改善(refactor)

    コミットメッセージ例

    上記のルールに従った、コミットメッセージのサンプルは以下のようなものとなる。 以下のようなコミットをルールとすることで、変更内容を視覚的に把握しやすくなる利点がある。

    txt
    feat: カレンダー機能の追加 🎉
    txt
    fix: メモリリークの修正 🚑
    txt
    docs: デプロイフローをドキュメント化 📝
    txt
    refactor: Lintエラーの修正 💄
    `,22)]))}const m=a(p,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/documents_forGitBranch_commit_message_rule.md.DI5kmJni.lean.js b/assets/documents_forGitBranch_commit_message_rule.md.DI5kmJni.lean.js new file mode 100644 index 00000000..cae3e673 --- /dev/null +++ b/assets/documents_forGitBranch_commit_message_rule.md.DI5kmJni.lean.js @@ -0,0 +1,18 @@ +import{_ as a,c as n,a3 as e,o as t}from"./chunks/framework.BDUoXecB.js";const u=JSON.parse('{"title":"コミットメッセージ規約","description":"","frontmatter":{"sidebarDepth":4,"title":"コミットメッセージ規約","author":"フューチャー株式会社"},"headers":[],"relativePath":"documents/forGitBranch/commit_message_rule.md","filePath":"documents/forGitBranch/commit_message_rule.md"}'),p={name:"documents/forGitBranch/commit_message_rule.md"};function i(l,s,r,c,d,o){return t(),n("div",null,s[0]||(s[0]=[e(`

    コミットメッセージ規約

    Gitのコミットメッセージにの書式についてルール化することで、コミットの目的がわかりやすくなる、履歴からのトラッキングの容易になる利点がある。

    本規約のコミットメッセージの書式としては、Conventional Commitsをベースとした規約としている。

    以下の形式でコミットメッセージを記載することとする。

    md
    <type>: <subject> <gitmoji>

    コミットメッセージは type、subject、gitmojiの最大3つの要素から構成され、それぞれは後述する書式に従うものとする。 この中でも、type、subjectについては必須とし、ほかの要素についてはプロジェクトの運用にしたがい任意とする。

    type

    typeについては必須の要素となり、以下のいずれかを選択するものとする。

    type説明
    feat新機能の追加
    fixバグの修正
    docsドキュメンテーションの更新
    refactorリファクタリング

    subject

    subjectについては必須の要素となり、変更内容を簡潔に記載するものとする。 issue idについては、PRから参照する運用を想定し、コミットメッセージの必須要素とはしないこととする。

    gitmoji

    gitmojiについては任意の要素となり、変更内容を視認しやすい絵文字の使用を可能とする。

    変更内容と選択される絵文字の対応については厳密とせず、開発者が任意に選択するものとする。

    type(feat, fix, docs, refactorなど)に基づく、選択例を以下に示す。

    txt
     ==== Emojis ====
    + :ambulance:  🚑致命的なバグ修正(fix)
    + :bug:  🐛バグ修正(fix)
    + :+1: 👍機能改善・機能修正(fix)
    + :cop: 👮セキュリティ関連の修正(fix)
    + :art: 🎨レイアウト関連の修正(fix)
    + :green_heart: 💚テストやCIの修正・改善(fix)
    + :wrench: 🔧設定ファイルの修正(fix)
    + :building_construction: 🏗️アーキテクチャの変更(fix)
    + :tada: 🎉大きな機能追加(feat)
    + :sparkles: ✨部分的な機能追加(feat)
    + :up:   🆙依存パッケージ等のアップデート(feat)
    + :memo: 📝ドキュメント修正(docs)
    + :bulb: 💡ソースコードへのコメント追加や修正(docs)
    + :lipstick: 💄Lintエラーの修正やコードスタイルの修正(refactor)
    + :recycle: ♻️リファクタリング(refactor)
    + :fire: 🔥コードやファイルの削除(refactor)
    + :rocket: 🚀パフォーマンス改善(refactor)

    コミットメッセージ例

    上記のルールに従った、コミットメッセージのサンプルは以下のようなものとなる。 以下のようなコミットをルールとすることで、変更内容を視覚的に把握しやすくなる利点がある。

    txt
    feat: カレンダー機能の追加 🎉
    txt
    fix: メモリリークの修正 🚑
    txt
    docs: デプロイフローをドキュメント化 📝
    txt
    refactor: Lintエラーの修正 💄
    `,22)]))}const m=a(p,[["render",i]]);export{u as __pageData,m as default}; diff --git a/assets/documents_forGitBranch_git_branch_standards.md.DSwGA5sV.js b/assets/documents_forGitBranch_git_branch_standards.md.DSwGA5sV.js new file mode 100644 index 00000000..773b96f8 --- /dev/null +++ b/assets/documents_forGitBranch_git_branch_standards.md.DSwGA5sV.js @@ -0,0 +1,69 @@ +import{_ as i}from"./chunks/merge_strategy_develop_to_feature_rebase.drawio.Z3kz7T7n.js";import{_ as e}from"./chunks/merge_strategy_feature_to_develop_squash_and_merge.drawio.BAaxnYY7.js";import{_ as t,c as l,G as n,a3 as d,B as r,o as p}from"./chunks/framework.BDUoXecB.js";const h="/coding-standards/assets/branch_strategy_feature.drawio.Dx3_5kFX.png",o="/coding-standards/assets/branch_strategy_develop.drawio.BB9doEUP.png",c="/coding-standards/assets/branch_strategy_release.drawio.DosnswvU.png",k="/coding-standards/assets/branch_strategy_hotfix.drawio.RF4mmQSP.png",u="/coding-standards/assets/branch_strategy_topic.drawio._OMQxJxK.png",b="/coding-standards/assets/branch_strategy_multi_develop.drawio.BUj3y2B6.png",g="/coding-standards/assets/branch_strategy_release_multi_develop.drawio.D7tvE9S0.png",F="/coding-standards/assets/branch_strategy_multi_version.drawio.BALCIJus.png",m="/coding-standards/assets/release_overtaking.drawio.DPjD4_z3.png",f="/coding-standards/assets/release_overtaking_hotfix.drawio.BcV3VqPO.png",y="/coding-standards/assets/create_new_tag.vcx7NIW6.png",C="/coding-standards/assets/create_new_tag_title.DvuteGpB.png",D=JSON.parse('{"title":"Gitブランチフロー規約","description":"","frontmatter":{"sidebarDepth":4,"title":"Gitブランチフロー規約","author":"フューチャー株式会社","head":[["meta",{"name":"keywords","content":"Git"}]]},"headers":[],"relativePath":"documents/forGitBranch/git_branch_standards.md","filePath":"documents/forGitBranch/git_branch_standards.md"}'),v={name:"documents/forGitBranch/git_branch_standards.md"};function B(q,a,E,_,x,G){const s=r("page-title");return p(),l("div",null,[n(s),a[0]||(a[0]=d('

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。

    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。

    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    本規約はGitブランチ管理の標準的な運用ルールをまとめている。以下の想定で作成されているため留意すること。

    • GitHub / GitLab の利用
    • トランクベース開発(フィーチャーフラグ)を 採用しない
    • ライブラリではなく、アプリケーション(CLIツール、Webアプリケーションなどの)開発で利用する

    免責事項

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせて工夫された設計開発の方針が存在する。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している

    基本方針

    一般的なGitブランチ運用のプラクティスに従い、本規約も以下の方針に則る。

    • すべての機能開発や不具合修正に、featureブランチを使用する
    • プルリクエストを経由してfeatureブランチの修正内容をマージする
    • 永続ブランチは各環境にデプロイ可能となるよう整合性を保つ

    ブランチの種類

    本規約で想定する、ブランチの種類とその役割を説明する。

    ブランチ名称役割ライフサイクル派生元ブランチ命名規則直プッシュ
    mainプロダクション環境との同期永続的-main 固定❌️
    feature特定機能の追加/変更短命maindevelopfeature/${チケット番号}: 詳細はfeatureブランチ を参照✅️※1
    develop開発の大元永続的maindevelop 固定。複数必要な場合は develop2 と連番にする❌️
    releaseリリース作業用途短命developrelease/${yyyymmdd}release/${リリースバージョン} など❌️
    hotfixmainブランチに対する即時修正短命mainhotfix/${チケット番号}: featureブランチに準じる✅️
    topic複数人での機能開発用途短命featuretopic/${チケット番号}: featureブランチに準じる✅️

    ※1: topicブランチを利用する場合は、派生させたfeatureブランチへの直プッシュはNGとなる

    mainブランチ

    Gitリポジトリを新規作成するとデフォルトで作成されるブランチ。masterからmainに改名された経緯を持つ[1]

    マージ毎にプロダクション環境へデプロイし同期を取る。

    featureブランチ

    機能追加や変更を行うブランチで、主な特徴は以下である。

    • ひとつの変更に対してひとつのfeatureブランチを作成し、作業完了後に削除するため、開発中で最も使われる短命なブランチである
    • 基本的に1人の開発者のみが利用する

    feature branch

    以下の命名に従う。

    • feature/ のプレフィックスを付ける
    • 課題管理システムと紐付けられるようなブランチ名にする
    sh
    # OK(課題管理システムの課題番号をブランチ名に利用)
    +feature/#12345
    +
    +# OK(GitHub Issue や JIRA や Backlog のプロジェクトIDをブランチ名に利用)
    +feature/<PROJECTID>-9403
    +
    +# NG(プレフィックスが無い)
    +fixtypo

    developブランチ

    開発の中心となるブランチである。

    develop branch

    releaseブランチ

    リリースするために使用するブランチで、主な特徴は以下である。

    • リリース前の検証を開発と並行して実施する場合に利用する
    • releaseブランチではバグ修正、ドキュメント生成、その他のリリースに伴うタスクのみを実施する
    • masterブランチのマージコミットにリリースタグを打ち、mainブランチをdevelopブランチへマージ後、releaseブランチを削除する

    release branch

    hotfixブランチ

    本番リリースに対して迅速にパッチを当てて修正する場合に使用するブランチで、主な特徴は以下である。

    • 修正が完了するとmainとdevelopの両方(あるいは進行中のreleaseブランチ)にマージされる
    • main/developブランチがあると必要になる可能性がある。main/featureブランチのみの運用では必須ではない(管理上の目的でfeatureとhotfixを分けることはあり得る)

    hotfix branch

    topicブランチ

    featureブランチで実現する機能を複数人で開発する場合に使用するブランチである。

    • topicブランチが必要なケースでは、featureブランチへの直接プッシュを行ってはならない
    • GitHub Flowではfeatureブランチのことをtopicブランチと呼称する場合があるが、本規約ではfeatureブランチから派生するブランチをtopicブランチと定義する

    topic branch

    ブランチ戦略の選定

    ブランチ戦略は以下の方針で選定する。

    • できるかぎりシンプルなモデルを選択し、運用コストを下げる
    • プロジェクトのフェーズや体制に応じて、変更を許容する

    有名なブランチ戦略として以下がある。

    本規約で推奨するブランチ戦略は次の2パターンであり、これをベースとして選択する。

    名称利用ブランチデフォルトブランチリリース作業ブランチ備考
    Lite GitLab Flow
    ※1
    main
    develop
    feature
    topic
    hotfix
    developdevelop・GitLab Flowからreleaseブランチを除いたパターン
    ・リリース作業時にdevelopマージを止められる場合に利用する
    GitLab Flowmain
    develop
    release
    feature
    topic
    hotfix
    ※2
    developrelease・リリース作業と開発作業が並行して行う必要があるか、
    断面を指定して複数テスト環境にデプロイしたい場合に利用する
    • ※1: 特定の呼称はないためLite GitLab FLowと命名する
    • ※2: 本規約では、本来のGitLab Flowの呼称である productionmainpre productionreleaseに言い換えている

    ブランチ戦略とデプロイメント環境

    各ブランチ戦略ごとに、デプロイメント環境に対応するブランチを整理する。プロダクション環境リリース前には、mainブランチでタグを打つこととする。

    名称開発環境ステージング環境プロダクション環境備考
    Lite GitLab Flowdevelopdevelopmain・開発環境へはdevelopマージをトリガーにCI/CDでデプロイを推奨する
    ・開発環境へのデプロイ漏れを防ぐため定期的にCI/CDでdevelop断面をリリースすることを推奨する
    ・動作確認など理由がある場合はfeatureブランチから直接開発環境へのデプロイも許容する
    ・ステージング環境は日次など定期的なCI/CDによるデプロイを推奨する
    GitLab Flowdevelopreleasemain・開発環境へはdevelopマージをトリガーにCI/CDでデプロイを推奨する
    ・検証期間が長引きそうな場合は、PRレビュー承認後にfeatureブランチから開発環境へのデプロイを許容する

    ブランチ戦略の拡張

    次のような要件があった場合には、ベースとなるブランチ戦略を拡張する必要がある。

    1. developブランチを複数作成する場合
    2. 過去バージョンをサポートする場合

    1. developブランチを複数作成する場合

    multi develop branch

    日々のエンハンス開発と並行して、数カ月後に大型リリースを行いたい場合がある。このときは複数リリースバージョンを並行して開発するため、 developdevelop2 といった複数のdevelopブランチを作る必要がある。

    概要:

    • develop の変更にはバグフィックスや軽微なUI向上が含まれ、日次/週次などの頻度でプロダクション環境へリリースされる
    • develop2develop ブランチの変更をすべて取り込んだ上で、大型機能の準備を行う必要がある

    develop2 同期の注意点:

    • リベースすると develop2 を元にfeatureブランチを作成して開発している開発者が混乱することになるため、マージコミットをお用いる
    • 誤操作を避ける目的でcherry-pickは行わない
    • devleop2 への同期は、 develop -> main ブランチに反映されるタイミングで同期を行う(これにより、品質保証済みの変更のみ取り入れることができる9

    release multi develop branch

    develop2のリリース手順

    1. developからdevelop2へマージコミットする(2でコンフリクトが起こらないよう、前準備の意味合いで実施する。)
    2. develop2からdevelopにマージを行い、その後は通常のリリースフローに従う
    3. 問題なくリリースが完了し次第、develop2を削除する

    developからdevelop2へマージ後、develop2mainブランチに反映させる手順も考えられるが、develop2からdevelopへのマージとすると以下のメリットがある。

    • プロダクション環境(=develop)との差分を把握することができる
    • より一般的な名称である develop ブランチのみ残るため、新規参画者フレンドリーである

    2. 過去バージョンをサポートする場合

    multi version branch

    (社内外の)ライブラリでインターフェースの大型改善や仕様変更を受けて、メジャーバージョンを1→2に上げることがる。この時に過去バージョンもサポートする必要があると、バージョン別にsupportブランチを作成する。

    概要:

    • メインの更新はversion2(mainブランチ)に対して行っていくが、version1の利用ユーザーが存在する場合、バグfixやセキュリティアップデートを並行して行う
      • version1を示すブランチ(support/v1)を別途作成、そのブランチからfeatureブランチを作成する
    • featureブランチのマージ後、マイナーバージョン(あるいはパッチバージョン)を上げたタグをコミットし、リリースする
      • ※この例ではversion1とversion2が別リソースとして動いていることを前提としている。同一リソースで複数バージョンが稼働する場合はversion2のブランチで対応を行う必要がある。

    マージ戦略の選定

    マージ戦略とは、複数のブランチ間で生じた変更の取り込み方針を指す。

    具体的には次の3ケースそれぞれで、「マージコミット」「リベース」「スカッシュマージ」のどれを採用するか判断する。

    1. developブランチからfeatureブランチへ変更を取り込む
    2. featureブランチからdevelopブランチへ変更を取り込む
    3. 永続ブランチ間で変更を取り込む

    以下に影響を与えるため、Gitの利用開始前に決めチームで統制を図ることが重要である。

    • プロジェクトのコミット履歴の管理
    • 開発プロセスの円滑な進行
    • 最終的なソフトウェア品質

    1. developブランチからfeatureブランチへ変更を取り込む

    featureブランチでの作業中に、developブランチが更新された場合、品質保証の観点でdevelopブランチの変更をfeatureブランチに取り込んだ上で、テストなどの検証作業を行う必要がある。

    developブランチの変更をfeatureブランチに取り込む方法に記載した2つの方法のうち、「リベース」による方法を推奨する。

    リベース

    理由は次の通り。

    • マージコミットが作成されると履歴が複雑になり、レビューアの負荷が高まる
    • スカッシュマージはこのケースでは選択できない
    • コンフリクトリスクは、マージ・リベース問わず発生するもので、リベースの選択による悪影響は存在しない

    この選択にあたり、以下の設定を行う。

    1. git pull 時の挙動がリベースになるよう git config pull.rebase true を実行する
    2. developブランチの変更を取り込む場合、同じコンフリクトの解消を何度も求められることを解消するため、git config rerere.enabled true を実行する

    マージによる変更の取り込みが既存のブランチを変更しないのに対し、リベースは全く新しい(元のコミットIDとは別のコミットIDで)コミットを作成するため、次の1点に注意すること。

    1. リモートにプッシュ済のブランチがあり、developブランチからさらに変更をリベースで取り込んだ場合、強制プッシュ(Force Push)が必要になる
      • git push origin HEAD --force-with-lease --force-if-includes とすることで、意図せずリモートブランチの変更を上書きしないようにする
        • --force-with-lease: ローカルのリモート追跡ブランチの ref とリモートの ref を比較し、ローカルの状態が最新でない場合(プッシュ先のリモートブランチに変更が入ったが、ローカルで git fetch していない場合)は、プッシュに失敗する。逆にいうと、プッシュ前に git fetch を実行済みの場合は、リモートの変更を上書きする形で強制プッシュができてしまうため、これを防ぐには --force-if-includes フラグを併用する
        • --force-if-includes: リモート追跡ブランチの変更がローカルに全て取り込まれていない場合は、プッシュに失敗する。これにより意図せず他の人のコミットを上書きすることを防ぎつつ、必要な変更を強制的にプッシュすることができる

    強制プッシュでレビューコメントは消えるのか?

    強制プッシュすることにより、レビューコメントが消えてしまわないかという懸念を聞くことがある。2024年7月に実施した調査結果では問題なかった。

    • a.履歴保持: 強制プッシュを行い、GitHub投稿したレビューコメントが履歴として何かしらのページで取得できるかどうか。GitHubではConversationタブで確認
    • b.行単位の紐づけ(該当行の変更なし): レビューコメントが付けられた行とは別の変更を行い、強制プッシュしたときにレビューコメントの紐づけが残るかどうか。GitHubではFile chagedタブで確認
    • c.行単位の紐づけ(該当行の変更あり): レビューコメントで付けられた行を修正し、強制プッシュ時の挙動。レビュー対応をしたとみなしレビューコメントのひも付きは解除されているべきである。GitHubではFile chagedタブで確認
    サービスa.履歴保持b.行単位の紐づけ(該当行の変更なし)c.行単位の紐づけ(該当行の変更あり)
    GitHub残る残る消える
    GitLab残る残る消える

    2. featureブランチからdevelopブランチへ変更を取り込む

    プルリクエスト(以下、PR)を経由して、開発が完了したfeatureブランチをメインのdevelopブランチに取り込むためには、GitHub(GitLab)上でPRを経由する運用を行うこと。

    developブランチにfeatureブランチの変更を取り込む方法に記載した3パターンのうち、「スカッシュマージ」による方法を推奨する。

    Squash and Merge

    理由は次の通り。

    • featureブランチのコミットログが、汚れることは許容したいため
    • developブランチの履歴をクリーンに保てるため
    • PRをよりシンプルに保つインセンティブとしたいため(単一のコミットメッセージで表現できる程度の方がレビューコストも小さいため)

    「スカッシュマージ」を行うと、変更元のfeatureブランチのコミットをまとめたコミットが新たに作成されるめ、元のfeatureブランチを再利用しPRを作成するとコンフリクトが発生する。そのためマージ後はリモート/ローカルの双方で速やかにfeatureブランチを削除させるため、以下の設定を加える。

    • マージ後にfeatureブランチを自動削除する設定
      • リモート側: GitHubでは「Automatically delete head branches」を選択することで、マージ後に自動でブランチの削除が行われる(GitLabではプロジェクト設定で「Enable "Delete source branch" option by default」を選択する)
      • ローカル側: git config --global fetch.prune true: リモート側で削除されたブランチをローカル側でも削除する

    「スカッシュマージ」による変更の取り込みを行う場合、次の2点に注意すること。

    1. 部分的なコミットの取り消しができない
      • 履歴上は1つのコミットになるため、マージ後に一部の変更だけの取り消しが不可能。そのためPRをなるべく小さなまとまりにする
    2. Authorが失われる
      • featureブランチにコミットを行った人がAuthorになるのではなく、「スカッシュマージ」を行った人がAuthorになる。OSS開発を行う場合など、厳密にコントリビューションを管理する必要がある場合は注意する
      • GitHubでは「スカッシュマージ」を行う場合、デフォルトでコミットメッセージに co-authored-by トレーラーが追加され、1つのコミットが複数の作成者に帰属するようにするようになっている[2]。この記述は削除しないようにする

    3. 永続ブランチ間で変更を取り込む

    永続ブランチ同士の変更を取り込むケースとして、develop ブランチを main ブランチや releaseブランチにマージするといった場合がある。

    ブランチ間の同期が取れないため「リベース」「スカッシュマージ」は選択できないため、「マージコミット」を採用する。

    ブランチ運用アンチパターン

    ブランチ運用でよく課題に上がるパターンとその対応を紹介する。

    追い抜きリリース

    以下のような状況とする。

    • 2つのチケット(issue-312、issue-394とする)があり、どちらも同じファイルの修正を含む
    • 先にissue-312がdevelopにマージされ、その後に着手されたissue-394がマージされた
    • 以下のような条件があるため、issue-394分を先にリリースしたい
      • issue-312のリリースは業務上の合意が得られていない(エンドユーザ操作に影響があるため、事前告知した日時でリリースしたいなど)
      • issue-394は不具合修正であり業務上の優先度が高いため、なるべく早くリリースしたい

    同一ファイルを複数

    よく陥りがちな対策としては次の2点が考えられる。

    1. issue-312をリバートする
    2. issue-394のコミットのみをcherry pick してmainブランチにマージする

    1のリバートはGitHubの機能で提供されていることもあり簡単に行えるが、手戻りであることは間違いないし、コミットの履歴が汚れるため、保守運用の視点ではマイナスである。2のcherry pickは操作、管理ともに煩雑でミスが出やすいという課題がある。

    処方箋だが、前提条件によって別の対応策が考えられる。

    1. issue-312のマージがおかしいとするケース
      • 本来想定していたリリーススケジュールから見て、issue-312がdevelopにマージされている状態が正しくないのであれば、issue-312はdevelopにマージせず待機しておくべきだった
      • 誤ってissue-312をマージしてしまったことが原因であれば、リバートを行うことが正しい
    2. issue-394のマージがおかしいとするケース
      • 本来想定していたリリーススケジュールを破って、issue-394を優先してリリースしたいというのであれば、feature ではなく hotfix ブランチで対応すべきであった

    2の例を以下に図示する

    hotfixで追い抜き

    コミットメッセージ規則

    Gitのコミットメッセージは原則自由とする。理由は以下である。

    • 通常、作業はチケット管理システムを駆動に開発するため、情報が重複する
    • リリースノートの自動生成での扱いは、どちらかといえばラベルとPRのタイトルが重要
    • メンバーによっては粒度の小さいコミットを好む場合も多く、運用の徹底化を図る負荷が高い

    チーム規模や特性によっては、Gitのコミットメッセージをルール化する方ことにより、メリットがある場合は Conventional Commits をベースとした以下の規約を推奨する。

    ブランチ命名規則

    ブランチ名の命名規則は、ブランチの種類 章に従うこと。

    タグ規則

    Gitにはタグ機能があり、リリースポイントとしてタグを作成する運用とする。

    これにより、リリースしたアプリケーションやライブラリに何か不具合があれば、切り戻しや原因追求が容易になる利点がある。

    タグの運用ルール

    • リリースごとに新しいバージョンを示したタグを発行する
    • (推奨) GitHubなどの画面経由でタグを作成する
    • mainブランチにてタグを作成する
    • 入力間違えなどのケースを除き、一度タグをつけた後は削除しない
    • 後述する「タグの命名規則」に従う

    GitHub画面でbackend/v1.6.0のタグを作成する

    何かしらの理由で、コマンドラインからタグを作成する必要がある場合は、以下に注意する。画面経由・コマンドライン経由でのタグ作成は混ぜないようにし、運用手順は統一する。

    • 軽量 (lightweight) 版ではなく、注釈付き (annotated) 版のタグを利用する
    sh
    # OK(注釈付きタグを利用する)
    +$ git tag "v1.0.4" -m "v1.0.4 🐛Fix item api log"
    +
    +# NG(軽量タグは利用しない)
    +$ git tag "v1.0.4"

    タグの命名規則

    • v1.2.4 などの セマンティックバージョニング を基本とする
    • モノリポの場合は frontend/v1.0.0backend/v2.0.1 など領域ごとにプレフィックスを付与する形式を取る
      • プレフィックスにすることで、タグをリスト表示した場合に視認性を上げることができる

    命名に従うと、次のようなコマンドで絞り込みで表示できる。

    sh
    $ git tag -l --sort=-version:refname "frontend/v*"
    +frontend/v2.0.0
    +frontend/v1.3.0
    +frontend/v1.2.0
    +frontend/v1.1.0
    +...

    また、Gitクライアントによっては / を使うことでフォルダのように階層表示ができるため、プレフィックスの区切り文字は - ハイフンではなく、スラッシュとする。

    タグメッセージの規則

    • (推奨) GitHubを利用中の場合、「Generate release notes」を用いて、タイトルや本文を自動生成する
    • フロントエンド・バックエンドで整合性を保っているのであれば、メモ目的でバージョンを記載する運用を推奨とする
    • 実用的な利用用途が思いつかない場合は、開発者視点での楽しみリリースの大きなマイルストーンの名称など、チームの関心事を記入することを推奨とする

    create new tag

    何かしらの理由で、コマンドラインからタグを作成する必要がある場合は、GitHub利用時の規則に合わせて次のように作成する。

    入力例:

    sh
    # OK
    +$ git tag -a backend/v1.8.0 -m "backend/v1.8.0"
    +$ git tag -a backend/v1.9.0 -m "backend/v1.9.0 🚀Release with frontend-v3.0.1"
    +$ git tag -a backend/v2.0.0 -m "backend/v2.0.0 ✨Android版アプリリリース対応"
    +
    +# NG
    +$ git tag -a backend/v3.0.0 -m "🚀Release version v2.0.0"

    バージョンアップ規則

    • 開発しているプロダクトがライブラリの場合、セマンティックバージョニングに厳密に従う
    • 開発しているプロダクトがシステム(アプリケーション)の場合、その成熟度や初回リリースの区切りでバージョンアップを行うことを推奨する。適切なバージョンアップを行うことで視認性が上がり、運用負荷を下げることができる
      • 例1: 初回リリース、カットオーバーで v1.0.0 に上げる
      • 例2: 稼働後1年以上経過し、中規模以上の大きな機能アップデートがあったので、 v2.0.0 に上げる

    ラベル規則

    IssueやPRを分類することができるラベルについての利用は自由とする。

    PRに適切なラベルを設定し、 自動生成リリースノート - GitHub Docs に記載があるように .github/release.yml への設定を行うことで、リリースノートの生成をラベル単位にグルーピングできる。

    PRを後で探しやすくするための検索キーとしての位置づけと、リリースノート自動生成という観点でラベルを準備すること。

    ローカルでのGit操作

    gitコマンド

    sh
    # 変更作業
    +git checkout -b <branchname>
    +git add
    +git commit -a
    +
    +# リモートブランチの変更を同期
    +git pull origin develop
    +
    +# コンフリクト対応
    +git add <file1> <file2> ...
    +git commit -a
    +
    +# リモートブランチへプッシュ(pullした際にリベースしているため、オプションは必須である)
    +git push origin HEAD --force-with-lease --force-if-includes

    VS Code

    利用頻度が高いとされるGitクライアントである、VS Code上でのGit操作を紹介する。

    推奨設定

    GitやGitHubb/GitLabの推奨設定をまとめる。本規約にあるGitブランチ運用は、以下の設定が行われている前提で説明している箇所がある。

    git config推奨設定

    git config の推奨設定を紹介する。特にGitワークフローの設定が重要である。

    sh
    # 基礎
    +git config --global user.name "Your Name"
    +git config --global user.email "your_email@example.com"
    +
    +# プロキシ設定(存在する場合)
    +git config --global http.proxy http://id:password@proxy.example.co.jp:8000/
    +git config --global https.proxy http://id:password@proxy.example.co.jp:8000/
    +
    +# プロキシが独自の証明書を持っている場合は、git config http.sslVerify false ではなく、証明書を設定する
    +git config --global http.sslCAInfo ~/custom_ca_sha2.cer
    +
    +# Gitワークフロー
    +git config --global pull.rebase true
    +git config --global rerere.enabled true
    +git config --global fetch.prune true
    +
    +# エイリアス(メンバーそれぞれで別のエイリアスを登録されると、チャットなどのトラブルシュート時に混乱をきすため、ベーシックなものはチームで統一して、認識齟齬を減らす目的で設定を推奨する)
    +git config --global alias.st status
    +git config --global alias.co checkout
    +git config --global alias.ci commit
    +git config --global alias.br branch

    git workflowの補足説明

    • pull.rebase: pull時にリベースする
    • rerere.enabled: コンフリクトの解決を記録しておき、再び同様のコンフリクトが発生した場合に自動適用する
    • fetch.prune: リモートリポジトリで削除されたブランチを削除する

    git-secrets

    git-secretsを用いることで、ユーザーパスワードや AWS アクセスキーなどの機密情報が含まれる可能性のあるコードなどをGit リポジトリに追加されないようにできる。

    本規約の推奨は以下。

    • チームメンバー全員にgit-secretsを導入する

    GitHub推奨設定

    業務利用でのチーム開発を想定しており、リポジトリは以下の条件を満たす前提とする。

    • プライベートリポジトリ
    • Organization配下に作成
    • Teamsプラン以上の有料契約(※プロテクトブランチの機能などを利用するために必要)

    General

    CategoryItemValueMemo
    GeneralRequire contributors to sign off on web-based commitsチェックなし著作権・ライセンス承諾の場合に用いるが、業務アプリ開発では不要
    Default branchdevelop
    Pull RequestsAllow merge commits✅️main <- developなどのマージ時に必要
    Allow squash merging✅️develop <- feature はSquash mergeを推奨
    Allow rebase merging-利用しないため、チェックを外す
    Allow suggest updating pull request branches✅️Pull Request作成後、ベースブランチが更新された場合、ソースブランチの更新を提案してくれる
    Automatically delete head branches✅️マージ後にfeature branchを削除するため有効にする
    PushesLimit how many branches and tags can be updated in a single push5git push origin –mirrorで誤ってリモートブランチを破壊しないようにする。推奨値の5を設定する

    Access

    CategoryItemValueMemo
    Collaborators and teamsChoose a role任意の権限※後述
    • 各ロールの権限については、公式ドキュメントを参照
    • 通常、開発者には「Write」ロールを付与する
    • 開発を行わない、例えばスキーマファイルの参照のみ必要であれば、「Read」権限を、Issueの起票などのみ実施するマネージャーであれば「Triage」ロールを付与する
    • 「Maintain」権限は、付与しない
    • 「Admin」権限は、マネージャークラスに対して合計2~3名を付与し、属人化しないようにする
      • 1名でも、4名以上でもNGとする

    Code and automation

    Branches

    Branch protection rules にdevelop, mainなど永続的なブランチに保護設定を追加する。

    CategoryItemValueMemo
    Protect matching branchesRequire a pull request before merging✅️プルリクエストを必須とする
    Require approvals✅️レビューを必須とする
    Required number of approvals before merging1最低1名以上の承認を必須とする
    Dismiss stale pull request approvals when new commits are pushed-レビュー承認後のPushで再承認を必要とするかだが、レビュー運用上に支障となることも多く、チェックを外す
    Require status checks to pass before merging✅️CIの成功を条件とする
    Require branches to be up to date before merging任意CIパイプラインのワークフロー名を指定
    Require conversation resolution before merging✅️レビューコメントがすべて解決していることを条件とする
    Require signed commits✅️署名付きコミットを必須化し、セキュアな設定にする
    Require linear history✅️/-mainブランチの場合はOFFとするが、developの場合はSquash mergeを求めるため有効にする
    Do not allow bypassing the above settings✅️パイパスを許容しない

    developブランチに対し「require linear history」を選択することを推奨することで、「Create a merge commit」が選択できないようにする。

    また、意図しない方法でのマージを避けるためにブランチごとにマージ戦略を設定しておき、想定外のマージ戦略が選択された時に警告色を表示するというサードパーティ製のChrome拡張[3]も存在する。必要に応じて導入を検討する。

    Tags
    CategoryItemValueMemo
    Protect tagsv[0-9]+.[0-9]+.[0-9]セマンティックバージョニングに則ったタグのみ、削除を防ぐ
    GitHub Actions
    CategoryItemValueMemo
    Actions permissionsAllow asset-taskforce, and select non-asset-taskforce, actions and reusable workflows > Allow actions created by GitHub✅️
    Allow asset-taskforce, and select non-asset-taskforce, actions and reusable workflows > Allow actions Marketplace verified creators✅️
    Code security and analysis
    CategoryItemValueMemo
    DependabotDependabot alerts✅️依存パッケージのアップデートを検知するため
    Dependabot security updates✅️
    Dependabot version updates✅️

    GitLab推奨設定

    • GitHubの「Automatically delete head branches」
      • マージリクエストから「Delete source branch」オプションを有効にすることが該当
      • プロジェクトの設定で「Enable "Delete source branch" option by default」を選択しておくとデフォルトで有効になる

    設定ファイル

    .gitattribute

    チーム開発において開発環境がWindows/Macなど複数存在することは少なくなく、また、Gitリポジトリ上の改行コードは統一した方が余計な差分が生じず扱いやすくなる。このときよく用いるのが、 core.autocrlf という設定である。

    名称設定値チェックアウト時の挙動コミット時の挙動
    core.autocrlftrue改行コードをCRLFに変換改行コードをLFに変換
    input何もしない改行コードをLFに変換
    false何もしない何もしない

    特にWindowsでの開発者の作業ミスを防ぐため、 git config --global core.autocrlf input のような設定を行うチームも多い。

    しかし、上記の設定漏れや手順が増えてしまうため、本規約では .gitattributes での対応を推奨する。

    .gitattributes というファイルをGitリポジトリのルートにコミットしておけば、そのGitリポジトリを使う全員で改行コードの扱いをLFに統一できる。

    sh
    * text=auto eol=lf

    通常、改行コードやインデントの設定はEditorConfigで行うことが多く、 .gitattributes の設定とは重複する。しかし、環境構築ミスなど何らかのトラブルで動作しなかった場合に改行コードミスで特にジュニアクラスのメンバーが困る状況もゼロとは言えないため、本規約では .gitattributes も作成しておくことを推奨する。

    .gitignore

    Gitで管理したくないファイル名のルールを定義する.gitignoreファイルも入れる。ウェブフロントエンドであれば新規プロジェクトを作成すると大抵作成されるのでそれを登録すれば良いが、もしない場合、あるいは複数の言語を使っている場合などはGitHubが提供するテンプレートを元に作成すると良い。GlobalフォルダにはWindows/macOSのOS固有設定や、エディタ設定などもある。

    環境設定を.envで行うのが一般的になってきているが、.env.local.env.dev.localといった.localがついたファイルはクレデンシャルなどの機微な情報を扱うファイルとして定着しているため、 *.localも追加すると良い。

    個人用のファイルをGit管理対象外とする

    .gitignore を用いると、チームでGit対象外とするファイルを一律で設定できる。

    一方で、動作確認用のちょっとしたスクリプトなどで以下の要件が出てくることがある。

    • 個人的にGitリポジトリ配下のフォルダに格納したいが、コミットしたくない(≒自分のローカルリポジトリのみ必要である)
    • あくまで個人用途であるため .gitignore に追記したくない

    上記の場合は、.git/info/exclude を利用することを推奨する。

    参考:

    Pull Request / Merge Request テンプレート

    GitHubやGitLabでは、プルリクエスト作成時のテンプレートを作ることができる。チームでプルリクエストで書いてほしいことを明示的にすることで、レビュー効率の向上や障害調査に役立てることができる。

    GitHubでは .github/PULL_REQUEST_TEMPLATE.md に記載する。(GitLabでは .gitlab/merge_request_templates/{your_template}.md を配置する。)

    テンプレートの例を以下にあげる。

    md
    ## チケットURL
    +
    +## 特に見てほしいレビューポイント
    +
    +## 残課題(別チケットで対応予定の内容、別プルリクエストで対応予定の内容)
    +
    +## 動作確認内容(画面キャプチャなど)
    +
    +## セルフチェックリスト
    +
    +- [ ] 開発規約(DEVELOPMENT.md) を確認した
    +- [ ] Files changed を開き、変更内容を確認した
    +- [ ] コードの変更に伴い、同期必要な設計ドキュメントを更新した
    +- [ ] 今回のPRでは未対応の残課題があればIssueに起票した

    1. https://github.com/github/renaming ↩︎

    2. https://docs.github.com/ja/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors ↩︎

    3. https://zenn.dev/daku10/articles/github-merge-guardian ↩︎

    `,211))])}const R=t(v,[["render",B]]);export{D as __pageData,R as default}; diff --git a/assets/documents_forGitBranch_git_branch_standards.md.DSwGA5sV.lean.js b/assets/documents_forGitBranch_git_branch_standards.md.DSwGA5sV.lean.js new file mode 100644 index 00000000..773b96f8 --- /dev/null +++ b/assets/documents_forGitBranch_git_branch_standards.md.DSwGA5sV.lean.js @@ -0,0 +1,69 @@ +import{_ as i}from"./chunks/merge_strategy_develop_to_feature_rebase.drawio.Z3kz7T7n.js";import{_ as e}from"./chunks/merge_strategy_feature_to_develop_squash_and_merge.drawio.BAaxnYY7.js";import{_ as t,c as l,G as n,a3 as d,B as r,o as p}from"./chunks/framework.BDUoXecB.js";const h="/coding-standards/assets/branch_strategy_feature.drawio.Dx3_5kFX.png",o="/coding-standards/assets/branch_strategy_develop.drawio.BB9doEUP.png",c="/coding-standards/assets/branch_strategy_release.drawio.DosnswvU.png",k="/coding-standards/assets/branch_strategy_hotfix.drawio.RF4mmQSP.png",u="/coding-standards/assets/branch_strategy_topic.drawio._OMQxJxK.png",b="/coding-standards/assets/branch_strategy_multi_develop.drawio.BUj3y2B6.png",g="/coding-standards/assets/branch_strategy_release_multi_develop.drawio.D7tvE9S0.png",F="/coding-standards/assets/branch_strategy_multi_version.drawio.BALCIJus.png",m="/coding-standards/assets/release_overtaking.drawio.DPjD4_z3.png",f="/coding-standards/assets/release_overtaking_hotfix.drawio.BcV3VqPO.png",y="/coding-standards/assets/create_new_tag.vcx7NIW6.png",C="/coding-standards/assets/create_new_tag_title.DvuteGpB.png",D=JSON.parse('{"title":"Gitブランチフロー規約","description":"","frontmatter":{"sidebarDepth":4,"title":"Gitブランチフロー規約","author":"フューチャー株式会社","head":[["meta",{"name":"keywords","content":"Git"}]]},"headers":[],"relativePath":"documents/forGitBranch/git_branch_standards.md","filePath":"documents/forGitBranch/git_branch_standards.md"}'),v={name:"documents/forGitBranch/git_branch_standards.md"};function B(q,a,E,_,x,G){const s=r("page-title");return p(),l("div",null,[n(s),a[0]||(a[0]=d('

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。

    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。

    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    本規約はGitブランチ管理の標準的な運用ルールをまとめている。以下の想定で作成されているため留意すること。

    • GitHub / GitLab の利用
    • トランクベース開発(フィーチャーフラグ)を 採用しない
    • ライブラリではなく、アプリケーション(CLIツール、Webアプリケーションなどの)開発で利用する

    免責事項

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせて工夫された設計開発の方針が存在する。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している

    基本方針

    一般的なGitブランチ運用のプラクティスに従い、本規約も以下の方針に則る。

    • すべての機能開発や不具合修正に、featureブランチを使用する
    • プルリクエストを経由してfeatureブランチの修正内容をマージする
    • 永続ブランチは各環境にデプロイ可能となるよう整合性を保つ

    ブランチの種類

    本規約で想定する、ブランチの種類とその役割を説明する。

    ブランチ名称役割ライフサイクル派生元ブランチ命名規則直プッシュ
    mainプロダクション環境との同期永続的-main 固定❌️
    feature特定機能の追加/変更短命maindevelopfeature/${チケット番号}: 詳細はfeatureブランチ を参照✅️※1
    develop開発の大元永続的maindevelop 固定。複数必要な場合は develop2 と連番にする❌️
    releaseリリース作業用途短命developrelease/${yyyymmdd}release/${リリースバージョン} など❌️
    hotfixmainブランチに対する即時修正短命mainhotfix/${チケット番号}: featureブランチに準じる✅️
    topic複数人での機能開発用途短命featuretopic/${チケット番号}: featureブランチに準じる✅️

    ※1: topicブランチを利用する場合は、派生させたfeatureブランチへの直プッシュはNGとなる

    mainブランチ

    Gitリポジトリを新規作成するとデフォルトで作成されるブランチ。masterからmainに改名された経緯を持つ[1]

    マージ毎にプロダクション環境へデプロイし同期を取る。

    featureブランチ

    機能追加や変更を行うブランチで、主な特徴は以下である。

    • ひとつの変更に対してひとつのfeatureブランチを作成し、作業完了後に削除するため、開発中で最も使われる短命なブランチである
    • 基本的に1人の開発者のみが利用する

    feature branch

    以下の命名に従う。

    • feature/ のプレフィックスを付ける
    • 課題管理システムと紐付けられるようなブランチ名にする
    sh
    # OK(課題管理システムの課題番号をブランチ名に利用)
    +feature/#12345
    +
    +# OK(GitHub Issue や JIRA や Backlog のプロジェクトIDをブランチ名に利用)
    +feature/<PROJECTID>-9403
    +
    +# NG(プレフィックスが無い)
    +fixtypo

    developブランチ

    開発の中心となるブランチである。

    develop branch

    releaseブランチ

    リリースするために使用するブランチで、主な特徴は以下である。

    • リリース前の検証を開発と並行して実施する場合に利用する
    • releaseブランチではバグ修正、ドキュメント生成、その他のリリースに伴うタスクのみを実施する
    • masterブランチのマージコミットにリリースタグを打ち、mainブランチをdevelopブランチへマージ後、releaseブランチを削除する

    release branch

    hotfixブランチ

    本番リリースに対して迅速にパッチを当てて修正する場合に使用するブランチで、主な特徴は以下である。

    • 修正が完了するとmainとdevelopの両方(あるいは進行中のreleaseブランチ)にマージされる
    • main/developブランチがあると必要になる可能性がある。main/featureブランチのみの運用では必須ではない(管理上の目的でfeatureとhotfixを分けることはあり得る)

    hotfix branch

    topicブランチ

    featureブランチで実現する機能を複数人で開発する場合に使用するブランチである。

    • topicブランチが必要なケースでは、featureブランチへの直接プッシュを行ってはならない
    • GitHub Flowではfeatureブランチのことをtopicブランチと呼称する場合があるが、本規約ではfeatureブランチから派生するブランチをtopicブランチと定義する

    topic branch

    ブランチ戦略の選定

    ブランチ戦略は以下の方針で選定する。

    • できるかぎりシンプルなモデルを選択し、運用コストを下げる
    • プロジェクトのフェーズや体制に応じて、変更を許容する

    有名なブランチ戦略として以下がある。

    本規約で推奨するブランチ戦略は次の2パターンであり、これをベースとして選択する。

    名称利用ブランチデフォルトブランチリリース作業ブランチ備考
    Lite GitLab Flow
    ※1
    main
    develop
    feature
    topic
    hotfix
    developdevelop・GitLab Flowからreleaseブランチを除いたパターン
    ・リリース作業時にdevelopマージを止められる場合に利用する
    GitLab Flowmain
    develop
    release
    feature
    topic
    hotfix
    ※2
    developrelease・リリース作業と開発作業が並行して行う必要があるか、
    断面を指定して複数テスト環境にデプロイしたい場合に利用する
    • ※1: 特定の呼称はないためLite GitLab FLowと命名する
    • ※2: 本規約では、本来のGitLab Flowの呼称である productionmainpre productionreleaseに言い換えている

    ブランチ戦略とデプロイメント環境

    各ブランチ戦略ごとに、デプロイメント環境に対応するブランチを整理する。プロダクション環境リリース前には、mainブランチでタグを打つこととする。

    名称開発環境ステージング環境プロダクション環境備考
    Lite GitLab Flowdevelopdevelopmain・開発環境へはdevelopマージをトリガーにCI/CDでデプロイを推奨する
    ・開発環境へのデプロイ漏れを防ぐため定期的にCI/CDでdevelop断面をリリースすることを推奨する
    ・動作確認など理由がある場合はfeatureブランチから直接開発環境へのデプロイも許容する
    ・ステージング環境は日次など定期的なCI/CDによるデプロイを推奨する
    GitLab Flowdevelopreleasemain・開発環境へはdevelopマージをトリガーにCI/CDでデプロイを推奨する
    ・検証期間が長引きそうな場合は、PRレビュー承認後にfeatureブランチから開発環境へのデプロイを許容する

    ブランチ戦略の拡張

    次のような要件があった場合には、ベースとなるブランチ戦略を拡張する必要がある。

    1. developブランチを複数作成する場合
    2. 過去バージョンをサポートする場合

    1. developブランチを複数作成する場合

    multi develop branch

    日々のエンハンス開発と並行して、数カ月後に大型リリースを行いたい場合がある。このときは複数リリースバージョンを並行して開発するため、 developdevelop2 といった複数のdevelopブランチを作る必要がある。

    概要:

    • develop の変更にはバグフィックスや軽微なUI向上が含まれ、日次/週次などの頻度でプロダクション環境へリリースされる
    • develop2develop ブランチの変更をすべて取り込んだ上で、大型機能の準備を行う必要がある

    develop2 同期の注意点:

    • リベースすると develop2 を元にfeatureブランチを作成して開発している開発者が混乱することになるため、マージコミットをお用いる
    • 誤操作を避ける目的でcherry-pickは行わない
    • devleop2 への同期は、 develop -> main ブランチに反映されるタイミングで同期を行う(これにより、品質保証済みの変更のみ取り入れることができる9

    release multi develop branch

    develop2のリリース手順

    1. developからdevelop2へマージコミットする(2でコンフリクトが起こらないよう、前準備の意味合いで実施する。)
    2. develop2からdevelopにマージを行い、その後は通常のリリースフローに従う
    3. 問題なくリリースが完了し次第、develop2を削除する

    developからdevelop2へマージ後、develop2mainブランチに反映させる手順も考えられるが、develop2からdevelopへのマージとすると以下のメリットがある。

    • プロダクション環境(=develop)との差分を把握することができる
    • より一般的な名称である develop ブランチのみ残るため、新規参画者フレンドリーである

    2. 過去バージョンをサポートする場合

    multi version branch

    (社内外の)ライブラリでインターフェースの大型改善や仕様変更を受けて、メジャーバージョンを1→2に上げることがる。この時に過去バージョンもサポートする必要があると、バージョン別にsupportブランチを作成する。

    概要:

    • メインの更新はversion2(mainブランチ)に対して行っていくが、version1の利用ユーザーが存在する場合、バグfixやセキュリティアップデートを並行して行う
      • version1を示すブランチ(support/v1)を別途作成、そのブランチからfeatureブランチを作成する
    • featureブランチのマージ後、マイナーバージョン(あるいはパッチバージョン)を上げたタグをコミットし、リリースする
      • ※この例ではversion1とversion2が別リソースとして動いていることを前提としている。同一リソースで複数バージョンが稼働する場合はversion2のブランチで対応を行う必要がある。

    マージ戦略の選定

    マージ戦略とは、複数のブランチ間で生じた変更の取り込み方針を指す。

    具体的には次の3ケースそれぞれで、「マージコミット」「リベース」「スカッシュマージ」のどれを採用するか判断する。

    1. developブランチからfeatureブランチへ変更を取り込む
    2. featureブランチからdevelopブランチへ変更を取り込む
    3. 永続ブランチ間で変更を取り込む

    以下に影響を与えるため、Gitの利用開始前に決めチームで統制を図ることが重要である。

    • プロジェクトのコミット履歴の管理
    • 開発プロセスの円滑な進行
    • 最終的なソフトウェア品質

    1. developブランチからfeatureブランチへ変更を取り込む

    featureブランチでの作業中に、developブランチが更新された場合、品質保証の観点でdevelopブランチの変更をfeatureブランチに取り込んだ上で、テストなどの検証作業を行う必要がある。

    developブランチの変更をfeatureブランチに取り込む方法に記載した2つの方法のうち、「リベース」による方法を推奨する。

    リベース

    理由は次の通り。

    • マージコミットが作成されると履歴が複雑になり、レビューアの負荷が高まる
    • スカッシュマージはこのケースでは選択できない
    • コンフリクトリスクは、マージ・リベース問わず発生するもので、リベースの選択による悪影響は存在しない

    この選択にあたり、以下の設定を行う。

    1. git pull 時の挙動がリベースになるよう git config pull.rebase true を実行する
    2. developブランチの変更を取り込む場合、同じコンフリクトの解消を何度も求められることを解消するため、git config rerere.enabled true を実行する

    マージによる変更の取り込みが既存のブランチを変更しないのに対し、リベースは全く新しい(元のコミットIDとは別のコミットIDで)コミットを作成するため、次の1点に注意すること。

    1. リモートにプッシュ済のブランチがあり、developブランチからさらに変更をリベースで取り込んだ場合、強制プッシュ(Force Push)が必要になる
      • git push origin HEAD --force-with-lease --force-if-includes とすることで、意図せずリモートブランチの変更を上書きしないようにする
        • --force-with-lease: ローカルのリモート追跡ブランチの ref とリモートの ref を比較し、ローカルの状態が最新でない場合(プッシュ先のリモートブランチに変更が入ったが、ローカルで git fetch していない場合)は、プッシュに失敗する。逆にいうと、プッシュ前に git fetch を実行済みの場合は、リモートの変更を上書きする形で強制プッシュができてしまうため、これを防ぐには --force-if-includes フラグを併用する
        • --force-if-includes: リモート追跡ブランチの変更がローカルに全て取り込まれていない場合は、プッシュに失敗する。これにより意図せず他の人のコミットを上書きすることを防ぎつつ、必要な変更を強制的にプッシュすることができる

    強制プッシュでレビューコメントは消えるのか?

    強制プッシュすることにより、レビューコメントが消えてしまわないかという懸念を聞くことがある。2024年7月に実施した調査結果では問題なかった。

    • a.履歴保持: 強制プッシュを行い、GitHub投稿したレビューコメントが履歴として何かしらのページで取得できるかどうか。GitHubではConversationタブで確認
    • b.行単位の紐づけ(該当行の変更なし): レビューコメントが付けられた行とは別の変更を行い、強制プッシュしたときにレビューコメントの紐づけが残るかどうか。GitHubではFile chagedタブで確認
    • c.行単位の紐づけ(該当行の変更あり): レビューコメントで付けられた行を修正し、強制プッシュ時の挙動。レビュー対応をしたとみなしレビューコメントのひも付きは解除されているべきである。GitHubではFile chagedタブで確認
    サービスa.履歴保持b.行単位の紐づけ(該当行の変更なし)c.行単位の紐づけ(該当行の変更あり)
    GitHub残る残る消える
    GitLab残る残る消える

    2. featureブランチからdevelopブランチへ変更を取り込む

    プルリクエスト(以下、PR)を経由して、開発が完了したfeatureブランチをメインのdevelopブランチに取り込むためには、GitHub(GitLab)上でPRを経由する運用を行うこと。

    developブランチにfeatureブランチの変更を取り込む方法に記載した3パターンのうち、「スカッシュマージ」による方法を推奨する。

    Squash and Merge

    理由は次の通り。

    • featureブランチのコミットログが、汚れることは許容したいため
    • developブランチの履歴をクリーンに保てるため
    • PRをよりシンプルに保つインセンティブとしたいため(単一のコミットメッセージで表現できる程度の方がレビューコストも小さいため)

    「スカッシュマージ」を行うと、変更元のfeatureブランチのコミットをまとめたコミットが新たに作成されるめ、元のfeatureブランチを再利用しPRを作成するとコンフリクトが発生する。そのためマージ後はリモート/ローカルの双方で速やかにfeatureブランチを削除させるため、以下の設定を加える。

    • マージ後にfeatureブランチを自動削除する設定
      • リモート側: GitHubでは「Automatically delete head branches」を選択することで、マージ後に自動でブランチの削除が行われる(GitLabではプロジェクト設定で「Enable "Delete source branch" option by default」を選択する)
      • ローカル側: git config --global fetch.prune true: リモート側で削除されたブランチをローカル側でも削除する

    「スカッシュマージ」による変更の取り込みを行う場合、次の2点に注意すること。

    1. 部分的なコミットの取り消しができない
      • 履歴上は1つのコミットになるため、マージ後に一部の変更だけの取り消しが不可能。そのためPRをなるべく小さなまとまりにする
    2. Authorが失われる
      • featureブランチにコミットを行った人がAuthorになるのではなく、「スカッシュマージ」を行った人がAuthorになる。OSS開発を行う場合など、厳密にコントリビューションを管理する必要がある場合は注意する
      • GitHubでは「スカッシュマージ」を行う場合、デフォルトでコミットメッセージに co-authored-by トレーラーが追加され、1つのコミットが複数の作成者に帰属するようにするようになっている[2]。この記述は削除しないようにする

    3. 永続ブランチ間で変更を取り込む

    永続ブランチ同士の変更を取り込むケースとして、develop ブランチを main ブランチや releaseブランチにマージするといった場合がある。

    ブランチ間の同期が取れないため「リベース」「スカッシュマージ」は選択できないため、「マージコミット」を採用する。

    ブランチ運用アンチパターン

    ブランチ運用でよく課題に上がるパターンとその対応を紹介する。

    追い抜きリリース

    以下のような状況とする。

    • 2つのチケット(issue-312、issue-394とする)があり、どちらも同じファイルの修正を含む
    • 先にissue-312がdevelopにマージされ、その後に着手されたissue-394がマージされた
    • 以下のような条件があるため、issue-394分を先にリリースしたい
      • issue-312のリリースは業務上の合意が得られていない(エンドユーザ操作に影響があるため、事前告知した日時でリリースしたいなど)
      • issue-394は不具合修正であり業務上の優先度が高いため、なるべく早くリリースしたい

    同一ファイルを複数

    よく陥りがちな対策としては次の2点が考えられる。

    1. issue-312をリバートする
    2. issue-394のコミットのみをcherry pick してmainブランチにマージする

    1のリバートはGitHubの機能で提供されていることもあり簡単に行えるが、手戻りであることは間違いないし、コミットの履歴が汚れるため、保守運用の視点ではマイナスである。2のcherry pickは操作、管理ともに煩雑でミスが出やすいという課題がある。

    処方箋だが、前提条件によって別の対応策が考えられる。

    1. issue-312のマージがおかしいとするケース
      • 本来想定していたリリーススケジュールから見て、issue-312がdevelopにマージされている状態が正しくないのであれば、issue-312はdevelopにマージせず待機しておくべきだった
      • 誤ってissue-312をマージしてしまったことが原因であれば、リバートを行うことが正しい
    2. issue-394のマージがおかしいとするケース
      • 本来想定していたリリーススケジュールを破って、issue-394を優先してリリースしたいというのであれば、feature ではなく hotfix ブランチで対応すべきであった

    2の例を以下に図示する

    hotfixで追い抜き

    コミットメッセージ規則

    Gitのコミットメッセージは原則自由とする。理由は以下である。

    • 通常、作業はチケット管理システムを駆動に開発するため、情報が重複する
    • リリースノートの自動生成での扱いは、どちらかといえばラベルとPRのタイトルが重要
    • メンバーによっては粒度の小さいコミットを好む場合も多く、運用の徹底化を図る負荷が高い

    チーム規模や特性によっては、Gitのコミットメッセージをルール化する方ことにより、メリットがある場合は Conventional Commits をベースとした以下の規約を推奨する。

    ブランチ命名規則

    ブランチ名の命名規則は、ブランチの種類 章に従うこと。

    タグ規則

    Gitにはタグ機能があり、リリースポイントとしてタグを作成する運用とする。

    これにより、リリースしたアプリケーションやライブラリに何か不具合があれば、切り戻しや原因追求が容易になる利点がある。

    タグの運用ルール

    • リリースごとに新しいバージョンを示したタグを発行する
    • (推奨) GitHubなどの画面経由でタグを作成する
    • mainブランチにてタグを作成する
    • 入力間違えなどのケースを除き、一度タグをつけた後は削除しない
    • 後述する「タグの命名規則」に従う

    GitHub画面でbackend/v1.6.0のタグを作成する

    何かしらの理由で、コマンドラインからタグを作成する必要がある場合は、以下に注意する。画面経由・コマンドライン経由でのタグ作成は混ぜないようにし、運用手順は統一する。

    • 軽量 (lightweight) 版ではなく、注釈付き (annotated) 版のタグを利用する
    sh
    # OK(注釈付きタグを利用する)
    +$ git tag "v1.0.4" -m "v1.0.4 🐛Fix item api log"
    +
    +# NG(軽量タグは利用しない)
    +$ git tag "v1.0.4"

    タグの命名規則

    • v1.2.4 などの セマンティックバージョニング を基本とする
    • モノリポの場合は frontend/v1.0.0backend/v2.0.1 など領域ごとにプレフィックスを付与する形式を取る
      • プレフィックスにすることで、タグをリスト表示した場合に視認性を上げることができる

    命名に従うと、次のようなコマンドで絞り込みで表示できる。

    sh
    $ git tag -l --sort=-version:refname "frontend/v*"
    +frontend/v2.0.0
    +frontend/v1.3.0
    +frontend/v1.2.0
    +frontend/v1.1.0
    +...

    また、Gitクライアントによっては / を使うことでフォルダのように階層表示ができるため、プレフィックスの区切り文字は - ハイフンではなく、スラッシュとする。

    タグメッセージの規則

    • (推奨) GitHubを利用中の場合、「Generate release notes」を用いて、タイトルや本文を自動生成する
    • フロントエンド・バックエンドで整合性を保っているのであれば、メモ目的でバージョンを記載する運用を推奨とする
    • 実用的な利用用途が思いつかない場合は、開発者視点での楽しみリリースの大きなマイルストーンの名称など、チームの関心事を記入することを推奨とする

    create new tag

    何かしらの理由で、コマンドラインからタグを作成する必要がある場合は、GitHub利用時の規則に合わせて次のように作成する。

    入力例:

    sh
    # OK
    +$ git tag -a backend/v1.8.0 -m "backend/v1.8.0"
    +$ git tag -a backend/v1.9.0 -m "backend/v1.9.0 🚀Release with frontend-v3.0.1"
    +$ git tag -a backend/v2.0.0 -m "backend/v2.0.0 ✨Android版アプリリリース対応"
    +
    +# NG
    +$ git tag -a backend/v3.0.0 -m "🚀Release version v2.0.0"

    バージョンアップ規則

    • 開発しているプロダクトがライブラリの場合、セマンティックバージョニングに厳密に従う
    • 開発しているプロダクトがシステム(アプリケーション)の場合、その成熟度や初回リリースの区切りでバージョンアップを行うことを推奨する。適切なバージョンアップを行うことで視認性が上がり、運用負荷を下げることができる
      • 例1: 初回リリース、カットオーバーで v1.0.0 に上げる
      • 例2: 稼働後1年以上経過し、中規模以上の大きな機能アップデートがあったので、 v2.0.0 に上げる

    ラベル規則

    IssueやPRを分類することができるラベルについての利用は自由とする。

    PRに適切なラベルを設定し、 自動生成リリースノート - GitHub Docs に記載があるように .github/release.yml への設定を行うことで、リリースノートの生成をラベル単位にグルーピングできる。

    PRを後で探しやすくするための検索キーとしての位置づけと、リリースノート自動生成という観点でラベルを準備すること。

    ローカルでのGit操作

    gitコマンド

    sh
    # 変更作業
    +git checkout -b <branchname>
    +git add
    +git commit -a
    +
    +# リモートブランチの変更を同期
    +git pull origin develop
    +
    +# コンフリクト対応
    +git add <file1> <file2> ...
    +git commit -a
    +
    +# リモートブランチへプッシュ(pullした際にリベースしているため、オプションは必須である)
    +git push origin HEAD --force-with-lease --force-if-includes

    VS Code

    利用頻度が高いとされるGitクライアントである、VS Code上でのGit操作を紹介する。

    推奨設定

    GitやGitHubb/GitLabの推奨設定をまとめる。本規約にあるGitブランチ運用は、以下の設定が行われている前提で説明している箇所がある。

    git config推奨設定

    git config の推奨設定を紹介する。特にGitワークフローの設定が重要である。

    sh
    # 基礎
    +git config --global user.name "Your Name"
    +git config --global user.email "your_email@example.com"
    +
    +# プロキシ設定(存在する場合)
    +git config --global http.proxy http://id:password@proxy.example.co.jp:8000/
    +git config --global https.proxy http://id:password@proxy.example.co.jp:8000/
    +
    +# プロキシが独自の証明書を持っている場合は、git config http.sslVerify false ではなく、証明書を設定する
    +git config --global http.sslCAInfo ~/custom_ca_sha2.cer
    +
    +# Gitワークフロー
    +git config --global pull.rebase true
    +git config --global rerere.enabled true
    +git config --global fetch.prune true
    +
    +# エイリアス(メンバーそれぞれで別のエイリアスを登録されると、チャットなどのトラブルシュート時に混乱をきすため、ベーシックなものはチームで統一して、認識齟齬を減らす目的で設定を推奨する)
    +git config --global alias.st status
    +git config --global alias.co checkout
    +git config --global alias.ci commit
    +git config --global alias.br branch

    git workflowの補足説明

    • pull.rebase: pull時にリベースする
    • rerere.enabled: コンフリクトの解決を記録しておき、再び同様のコンフリクトが発生した場合に自動適用する
    • fetch.prune: リモートリポジトリで削除されたブランチを削除する

    git-secrets

    git-secretsを用いることで、ユーザーパスワードや AWS アクセスキーなどの機密情報が含まれる可能性のあるコードなどをGit リポジトリに追加されないようにできる。

    本規約の推奨は以下。

    • チームメンバー全員にgit-secretsを導入する

    GitHub推奨設定

    業務利用でのチーム開発を想定しており、リポジトリは以下の条件を満たす前提とする。

    • プライベートリポジトリ
    • Organization配下に作成
    • Teamsプラン以上の有料契約(※プロテクトブランチの機能などを利用するために必要)

    General

    CategoryItemValueMemo
    GeneralRequire contributors to sign off on web-based commitsチェックなし著作権・ライセンス承諾の場合に用いるが、業務アプリ開発では不要
    Default branchdevelop
    Pull RequestsAllow merge commits✅️main <- developなどのマージ時に必要
    Allow squash merging✅️develop <- feature はSquash mergeを推奨
    Allow rebase merging-利用しないため、チェックを外す
    Allow suggest updating pull request branches✅️Pull Request作成後、ベースブランチが更新された場合、ソースブランチの更新を提案してくれる
    Automatically delete head branches✅️マージ後にfeature branchを削除するため有効にする
    PushesLimit how many branches and tags can be updated in a single push5git push origin –mirrorで誤ってリモートブランチを破壊しないようにする。推奨値の5を設定する

    Access

    CategoryItemValueMemo
    Collaborators and teamsChoose a role任意の権限※後述
    • 各ロールの権限については、公式ドキュメントを参照
    • 通常、開発者には「Write」ロールを付与する
    • 開発を行わない、例えばスキーマファイルの参照のみ必要であれば、「Read」権限を、Issueの起票などのみ実施するマネージャーであれば「Triage」ロールを付与する
    • 「Maintain」権限は、付与しない
    • 「Admin」権限は、マネージャークラスに対して合計2~3名を付与し、属人化しないようにする
      • 1名でも、4名以上でもNGとする

    Code and automation

    Branches

    Branch protection rules にdevelop, mainなど永続的なブランチに保護設定を追加する。

    CategoryItemValueMemo
    Protect matching branchesRequire a pull request before merging✅️プルリクエストを必須とする
    Require approvals✅️レビューを必須とする
    Required number of approvals before merging1最低1名以上の承認を必須とする
    Dismiss stale pull request approvals when new commits are pushed-レビュー承認後のPushで再承認を必要とするかだが、レビュー運用上に支障となることも多く、チェックを外す
    Require status checks to pass before merging✅️CIの成功を条件とする
    Require branches to be up to date before merging任意CIパイプラインのワークフロー名を指定
    Require conversation resolution before merging✅️レビューコメントがすべて解決していることを条件とする
    Require signed commits✅️署名付きコミットを必須化し、セキュアな設定にする
    Require linear history✅️/-mainブランチの場合はOFFとするが、developの場合はSquash mergeを求めるため有効にする
    Do not allow bypassing the above settings✅️パイパスを許容しない

    developブランチに対し「require linear history」を選択することを推奨することで、「Create a merge commit」が選択できないようにする。

    また、意図しない方法でのマージを避けるためにブランチごとにマージ戦略を設定しておき、想定外のマージ戦略が選択された時に警告色を表示するというサードパーティ製のChrome拡張[3]も存在する。必要に応じて導入を検討する。

    Tags
    CategoryItemValueMemo
    Protect tagsv[0-9]+.[0-9]+.[0-9]セマンティックバージョニングに則ったタグのみ、削除を防ぐ
    GitHub Actions
    CategoryItemValueMemo
    Actions permissionsAllow asset-taskforce, and select non-asset-taskforce, actions and reusable workflows > Allow actions created by GitHub✅️
    Allow asset-taskforce, and select non-asset-taskforce, actions and reusable workflows > Allow actions Marketplace verified creators✅️
    Code security and analysis
    CategoryItemValueMemo
    DependabotDependabot alerts✅️依存パッケージのアップデートを検知するため
    Dependabot security updates✅️
    Dependabot version updates✅️

    GitLab推奨設定

    • GitHubの「Automatically delete head branches」
      • マージリクエストから「Delete source branch」オプションを有効にすることが該当
      • プロジェクトの設定で「Enable "Delete source branch" option by default」を選択しておくとデフォルトで有効になる

    設定ファイル

    .gitattribute

    チーム開発において開発環境がWindows/Macなど複数存在することは少なくなく、また、Gitリポジトリ上の改行コードは統一した方が余計な差分が生じず扱いやすくなる。このときよく用いるのが、 core.autocrlf という設定である。

    名称設定値チェックアウト時の挙動コミット時の挙動
    core.autocrlftrue改行コードをCRLFに変換改行コードをLFに変換
    input何もしない改行コードをLFに変換
    false何もしない何もしない

    特にWindowsでの開発者の作業ミスを防ぐため、 git config --global core.autocrlf input のような設定を行うチームも多い。

    しかし、上記の設定漏れや手順が増えてしまうため、本規約では .gitattributes での対応を推奨する。

    .gitattributes というファイルをGitリポジトリのルートにコミットしておけば、そのGitリポジトリを使う全員で改行コードの扱いをLFに統一できる。

    sh
    * text=auto eol=lf

    通常、改行コードやインデントの設定はEditorConfigで行うことが多く、 .gitattributes の設定とは重複する。しかし、環境構築ミスなど何らかのトラブルで動作しなかった場合に改行コードミスで特にジュニアクラスのメンバーが困る状況もゼロとは言えないため、本規約では .gitattributes も作成しておくことを推奨する。

    .gitignore

    Gitで管理したくないファイル名のルールを定義する.gitignoreファイルも入れる。ウェブフロントエンドであれば新規プロジェクトを作成すると大抵作成されるのでそれを登録すれば良いが、もしない場合、あるいは複数の言語を使っている場合などはGitHubが提供するテンプレートを元に作成すると良い。GlobalフォルダにはWindows/macOSのOS固有設定や、エディタ設定などもある。

    環境設定を.envで行うのが一般的になってきているが、.env.local.env.dev.localといった.localがついたファイルはクレデンシャルなどの機微な情報を扱うファイルとして定着しているため、 *.localも追加すると良い。

    個人用のファイルをGit管理対象外とする

    .gitignore を用いると、チームでGit対象外とするファイルを一律で設定できる。

    一方で、動作確認用のちょっとしたスクリプトなどで以下の要件が出てくることがある。

    • 個人的にGitリポジトリ配下のフォルダに格納したいが、コミットしたくない(≒自分のローカルリポジトリのみ必要である)
    • あくまで個人用途であるため .gitignore に追記したくない

    上記の場合は、.git/info/exclude を利用することを推奨する。

    参考:

    Pull Request / Merge Request テンプレート

    GitHubやGitLabでは、プルリクエスト作成時のテンプレートを作ることができる。チームでプルリクエストで書いてほしいことを明示的にすることで、レビュー効率の向上や障害調査に役立てることができる。

    GitHubでは .github/PULL_REQUEST_TEMPLATE.md に記載する。(GitLabでは .gitlab/merge_request_templates/{your_template}.md を配置する。)

    テンプレートの例を以下にあげる。

    md
    ## チケットURL
    +
    +## 特に見てほしいレビューポイント
    +
    +## 残課題(別チケットで対応予定の内容、別プルリクエストで対応予定の内容)
    +
    +## 動作確認内容(画面キャプチャなど)
    +
    +## セルフチェックリスト
    +
    +- [ ] 開発規約(DEVELOPMENT.md) を確認した
    +- [ ] Files changed を開き、変更内容を確認した
    +- [ ] コードの変更に伴い、同期必要な設計ドキュメントを更新した
    +- [ ] 今回のPRでは未対応の残課題があればIssueに起票した

    1. https://github.com/github/renaming ↩︎

    2. https://docs.github.com/ja/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors ↩︎

    3. https://zenn.dev/daku10/articles/github-merge-guardian ↩︎

    `,211))])}const R=t(v,[["render",B]]);export{D as __pageData,R as default}; diff --git a/assets/documents_forGitBranch_index.md.B55H9nHJ.js b/assets/documents_forGitBranch_index.md.B55H9nHJ.js new file mode 100644 index 00000000..fa86a0b1 --- /dev/null +++ b/assets/documents_forGitBranch_index.md.B55H9nHJ.js @@ -0,0 +1 @@ +import{_ as r,c as e,a3 as a,o as n}from"./chunks/framework.BDUoXecB.js";const E=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"Gitブランチフロー規約","tagline":"Future Enterprise Standards for Git branch flow","actions":[{"theme":"brand","text":"Gitブランチフロー規約","link":"./git_branch_standards.md"}]}},"headers":[],"relativePath":"documents/forGitBranch/index.md","filePath":"documents/forGitBranch/index.md"}'),i={name:"documents/forGitBranch/index.md"};function o(s,t,d,c,l,h){return n(),e("div",null,t[0]||(t[0]=[a('

    Gitブランチフロー規約

    チーム開発する上で必要となるGitブランチフローの規約です。

    次のリンクから単一ファイル版を取得できます。

    ファイルはPandocを利用して作成しています。

    ',6)]))}const f=r(i,[["render",o]]);export{E as __pageData,f as default}; diff --git a/assets/documents_forGitBranch_index.md.B55H9nHJ.lean.js b/assets/documents_forGitBranch_index.md.B55H9nHJ.lean.js new file mode 100644 index 00000000..fa86a0b1 --- /dev/null +++ b/assets/documents_forGitBranch_index.md.B55H9nHJ.lean.js @@ -0,0 +1 @@ +import{_ as r,c as e,a3 as a,o as n}from"./chunks/framework.BDUoXecB.js";const E=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"Gitブランチフロー規約","tagline":"Future Enterprise Standards for Git branch flow","actions":[{"theme":"brand","text":"Gitブランチフロー規約","link":"./git_branch_standards.md"}]}},"headers":[],"relativePath":"documents/forGitBranch/index.md","filePath":"documents/forGitBranch/index.md"}'),i={name:"documents/forGitBranch/index.md"};function o(s,t,d,c,l,h){return n(),e("div",null,t[0]||(t[0]=[a('

    Gitブランチフロー規約

    チーム開発する上で必要となるGitブランチフローの規約です。

    次のリンクから単一ファイル版を取得できます。

    ファイルはPandocを利用して作成しています。

    ',6)]))}const f=r(i,[["render",o]]);export{E as __pageData,f as default}; diff --git a/assets/documents_forGitBranch_merge_develop_to_feature.md.DppWFrFb.js b/assets/documents_forGitBranch_merge_develop_to_feature.md.DppWFrFb.js new file mode 100644 index 00000000..8077c2c3 --- /dev/null +++ b/assets/documents_forGitBranch_merge_develop_to_feature.md.DppWFrFb.js @@ -0,0 +1,19 @@ +import{_ as a}from"./chunks/merge_strategy_develop_to_feature_rebase.drawio.Z3kz7T7n.js";import{_ as n,c as i,a3 as e,o as p}from"./chunks/framework.BDUoXecB.js";const l="/coding-standards/assets/merge_strategy_develop_to_feature_merge.drawio.Chi_3Oep.png",u=JSON.parse('{"title":"機能ブランチに開発ブランチの変更を取り込む方法","description":"","frontmatter":{"sidebarDepth":4,"title":"機能ブランチに開発ブランチの変更を取り込む方法","author":"フューチャー株式会社"},"headers":[],"relativePath":"documents/forGitBranch/merge_develop_to_feature.md","filePath":"documents/forGitBranch/merge_develop_to_feature.md"}'),t={name:"documents/forGitBranch/merge_develop_to_feature.md"};function r(h,s,d,k,c,o){return p(),i("div",null,s[0]||(s[0]=[e('

    機能ブランチに開発ブランチの変更を取り込む方法

    機能ブランチに対して開発ブランチの変更を取り込む方法は「マージ」「リベース」2つの方法が考えられる。

    1. マージコミット

    マージとは get fetch & git merge コマンド( = git pull コマンド)を使用して、開発ブランチの変更を機能ブランチに取り込む方法を指す。 マージを行った場合は下記の通り、「マージコミット」が作成される。

    マージ

    bash
    # 現在のブランチは 機能(feature/A)ブランチ
    +$ git branch
    +  develop
    +* feature/A
    +
    +# リモート追跡ブランチの最新化
    +$ git fetch
    +
    +# 開発(develop)ブランチの変更を機能(feature/A)ブランチにマージ
    +$ git merge develop

    2. リベース

    リベースとは get fetch & git rebase コマンド( = git pull --rebase コマンド)を使用して、開発ブランチの変更を機能ブランチに取り込む方法を指す。 最新の開発ブランチの先頭から新たにコミットを作りなおす動きになるので、マージによる方法と異なり「マージコミット」は作成されない。

    リベース

    bash
    # 現在のブランチは 機能(feature/A)ブランチ
    +$ git branch
    +  develop
    +* feature/A
    +
    +# リモート追跡ブランチの最新化
    +$ git fetch
    +
    +# 機能(feature/A)ブランチを開発(develop)ブランチにリベース
    +$ git rebase develop
    `,10)]))}const m=n(t,[["render",r]]);export{u as __pageData,m as default}; diff --git a/assets/documents_forGitBranch_merge_develop_to_feature.md.DppWFrFb.lean.js b/assets/documents_forGitBranch_merge_develop_to_feature.md.DppWFrFb.lean.js new file mode 100644 index 00000000..8077c2c3 --- /dev/null +++ b/assets/documents_forGitBranch_merge_develop_to_feature.md.DppWFrFb.lean.js @@ -0,0 +1,19 @@ +import{_ as a}from"./chunks/merge_strategy_develop_to_feature_rebase.drawio.Z3kz7T7n.js";import{_ as n,c as i,a3 as e,o as p}from"./chunks/framework.BDUoXecB.js";const l="/coding-standards/assets/merge_strategy_develop_to_feature_merge.drawio.Chi_3Oep.png",u=JSON.parse('{"title":"機能ブランチに開発ブランチの変更を取り込む方法","description":"","frontmatter":{"sidebarDepth":4,"title":"機能ブランチに開発ブランチの変更を取り込む方法","author":"フューチャー株式会社"},"headers":[],"relativePath":"documents/forGitBranch/merge_develop_to_feature.md","filePath":"documents/forGitBranch/merge_develop_to_feature.md"}'),t={name:"documents/forGitBranch/merge_develop_to_feature.md"};function r(h,s,d,k,c,o){return p(),i("div",null,s[0]||(s[0]=[e('

    機能ブランチに開発ブランチの変更を取り込む方法

    機能ブランチに対して開発ブランチの変更を取り込む方法は「マージ」「リベース」2つの方法が考えられる。

    1. マージコミット

    マージとは get fetch & git merge コマンド( = git pull コマンド)を使用して、開発ブランチの変更を機能ブランチに取り込む方法を指す。 マージを行った場合は下記の通り、「マージコミット」が作成される。

    マージ

    bash
    # 現在のブランチは 機能(feature/A)ブランチ
    +$ git branch
    +  develop
    +* feature/A
    +
    +# リモート追跡ブランチの最新化
    +$ git fetch
    +
    +# 開発(develop)ブランチの変更を機能(feature/A)ブランチにマージ
    +$ git merge develop

    2. リベース

    リベースとは get fetch & git rebase コマンド( = git pull --rebase コマンド)を使用して、開発ブランチの変更を機能ブランチに取り込む方法を指す。 最新の開発ブランチの先頭から新たにコミットを作りなおす動きになるので、マージによる方法と異なり「マージコミット」は作成されない。

    リベース

    bash
    # 現在のブランチは 機能(feature/A)ブランチ
    +$ git branch
    +  develop
    +* feature/A
    +
    +# リモート追跡ブランチの最新化
    +$ git fetch
    +
    +# 機能(feature/A)ブランチを開発(develop)ブランチにリベース
    +$ git rebase develop
    `,10)]))}const m=n(t,[["render",r]]);export{u as __pageData,m as default}; diff --git a/assets/documents_forGitBranch_merge_feature_to_develop.md.Badw-1gI.js b/assets/documents_forGitBranch_merge_feature_to_develop.md.Badw-1gI.js new file mode 100644 index 00000000..d2de3c97 --- /dev/null +++ b/assets/documents_forGitBranch_merge_feature_to_develop.md.Badw-1gI.js @@ -0,0 +1,6 @@ +import{_ as a}from"./chunks/merge_strategy_feature_to_develop_squash_and_merge.drawio.BAaxnYY7.js";import{_ as i,c as s,a3 as t,o as r}from"./chunks/framework.BDUoXecB.js";const n="/coding-standards/assets/merge_strategy_feature_to_develop_merge_commit.drawio.ClfglnSw.png",l="/coding-standards/assets/merge_strategy_feature_to_develop_rebase_and_merge.drawio.C4YTK8Ke.png",o="/coding-standards/assets/merge_strategy_feature_to_develop_squash_and_merge_gitlab.drawio.DUmvz-tJ.png",_=JSON.parse('{"title":"開発ブランチに機能ブランチの変更を取り込む方法","description":"","frontmatter":{"sidebarDepth":4,"title":"開発ブランチに機能ブランチの変更を取り込む方法","author":"フューチャー株式会社"},"headers":[],"relativePath":"documents/forGitBranch/merge_feature_to_develop.md","filePath":"documents/forGitBranch/merge_feature_to_develop.md"}'),h={name:"documents/forGitBranch/merge_feature_to_develop.md"};function p(d,e,m,c,g,k){return r(),s("div",null,e[0]||(e[0]=[t('

    開発ブランチに機能ブランチの変更を取り込む方法

    GitHubの場合

    プルリクエストを経由して、開発が完了した機能ブランチをメインの開発ブランチに取り込むためには、GitHub(GitLab)上でプルリクエスト(マージリクエスト)を経由する運用を前提とする。

    GitHubを利用する場合、開発ブランチに機能ブランチの変更を取り込む方法は3種類ある。

    1. スカッシュ マージ(Create a merge commit)
    2. リベース(Rebase and merge)
    3. スカッシュマージ(Squash and merge)

    1. マージコミット

    動作としては git merge --no-ff コマンドを使用して、機能ブランチの変更を取り込む形になる。
    この方法を選択した場合は、下記のとおり、メインの開発ブランチにマージコミットが作成される。

    Merge Commit

    2. リベース

    動作としては機能ブランチを最新の開発ブランチにリベースした後に、git merge --ff コマンドを使用して、機能ブランチの変更を取り込む形になる。
    この方法を選択した場合は、下記のとおり、メインの開発ブランチにマージコミットは作成されず、履歴が一直線になる。

    Rebase and Merge

    3. スカッシュマージ

    動作としては git merge --squash コマンドを使用して、機能ブランチの変更を取り込む形になる。
    この方法では、機能ブランチで行った変更YとZを1つにまとめたコミットがメインの開発ブランチに作成されます。

    Squash and Merge

    GitLabを利用するの手順

    開発ブランチに機能ブランチの変更を取り込む方法は3種類ある。
    ただし、マージリクエスト上のオプションによってコミット履歴が変わるため、別途記載する。

    1. Merge commit
    2. Merge commit with semi-linear history
    3. Fast-forward merge

    1. Merge commit

    動作としては、GitHubにおける Create a merge commit と同様のマージ方法になる。
    ただし、マージリクエスト上で Squash commits を選択してマージした場合、squash commitmerge commit の2つのコミットが作成されるため注意する。

    Merge commit with squash commits

    bash
    # マージ方法で Merge commit を選択して、マージリクエスト上で Squash commits オプションを選択してマージした場合
    +git checkout \`git merge-base feature/A develop\`
    +git merge --squash feature/A
    +SOURCE_SHA=\`git rev-parse HEAD\`
    +git checkout develop
    +git merge --no-ff $SOURCE_SHA

    2. Merge commit with semi-linear history

    動作としては、前述の Merge commit と同じコマンドを使用して、機能ブランチの変更を取り込む形になる。
    この方法を選択した場合は、ソースブランチがターゲットブランチより古い場合はリベースしないとマージできない。

    3. Fast-forward merge

    動作としては、GitHubにおける Rebase and merge と同様のマージ方法になる。
    ただし、マージリクエスト上で Squash commits を選択してマージした場合、GitHubにおける Squash and merge と同様のマージ方法になる。

    `,25)]))}const F=i(h,[["render",p]]);export{_ as __pageData,F as default}; diff --git a/assets/documents_forGitBranch_merge_feature_to_develop.md.Badw-1gI.lean.js b/assets/documents_forGitBranch_merge_feature_to_develop.md.Badw-1gI.lean.js new file mode 100644 index 00000000..d2de3c97 --- /dev/null +++ b/assets/documents_forGitBranch_merge_feature_to_develop.md.Badw-1gI.lean.js @@ -0,0 +1,6 @@ +import{_ as a}from"./chunks/merge_strategy_feature_to_develop_squash_and_merge.drawio.BAaxnYY7.js";import{_ as i,c as s,a3 as t,o as r}from"./chunks/framework.BDUoXecB.js";const n="/coding-standards/assets/merge_strategy_feature_to_develop_merge_commit.drawio.ClfglnSw.png",l="/coding-standards/assets/merge_strategy_feature_to_develop_rebase_and_merge.drawio.C4YTK8Ke.png",o="/coding-standards/assets/merge_strategy_feature_to_develop_squash_and_merge_gitlab.drawio.DUmvz-tJ.png",_=JSON.parse('{"title":"開発ブランチに機能ブランチの変更を取り込む方法","description":"","frontmatter":{"sidebarDepth":4,"title":"開発ブランチに機能ブランチの変更を取り込む方法","author":"フューチャー株式会社"},"headers":[],"relativePath":"documents/forGitBranch/merge_feature_to_develop.md","filePath":"documents/forGitBranch/merge_feature_to_develop.md"}'),h={name:"documents/forGitBranch/merge_feature_to_develop.md"};function p(d,e,m,c,g,k){return r(),s("div",null,e[0]||(e[0]=[t('

    開発ブランチに機能ブランチの変更を取り込む方法

    GitHubの場合

    プルリクエストを経由して、開発が完了した機能ブランチをメインの開発ブランチに取り込むためには、GitHub(GitLab)上でプルリクエスト(マージリクエスト)を経由する運用を前提とする。

    GitHubを利用する場合、開発ブランチに機能ブランチの変更を取り込む方法は3種類ある。

    1. スカッシュ マージ(Create a merge commit)
    2. リベース(Rebase and merge)
    3. スカッシュマージ(Squash and merge)

    1. マージコミット

    動作としては git merge --no-ff コマンドを使用して、機能ブランチの変更を取り込む形になる。
    この方法を選択した場合は、下記のとおり、メインの開発ブランチにマージコミットが作成される。

    Merge Commit

    2. リベース

    動作としては機能ブランチを最新の開発ブランチにリベースした後に、git merge --ff コマンドを使用して、機能ブランチの変更を取り込む形になる。
    この方法を選択した場合は、下記のとおり、メインの開発ブランチにマージコミットは作成されず、履歴が一直線になる。

    Rebase and Merge

    3. スカッシュマージ

    動作としては git merge --squash コマンドを使用して、機能ブランチの変更を取り込む形になる。
    この方法では、機能ブランチで行った変更YとZを1つにまとめたコミットがメインの開発ブランチに作成されます。

    Squash and Merge

    GitLabを利用するの手順

    開発ブランチに機能ブランチの変更を取り込む方法は3種類ある。
    ただし、マージリクエスト上のオプションによってコミット履歴が変わるため、別途記載する。

    1. Merge commit
    2. Merge commit with semi-linear history
    3. Fast-forward merge

    1. Merge commit

    動作としては、GitHubにおける Create a merge commit と同様のマージ方法になる。
    ただし、マージリクエスト上で Squash commits を選択してマージした場合、squash commitmerge commit の2つのコミットが作成されるため注意する。

    Merge commit with squash commits

    bash
    # マージ方法で Merge commit を選択して、マージリクエスト上で Squash commits オプションを選択してマージした場合
    +git checkout \`git merge-base feature/A develop\`
    +git merge --squash feature/A
    +SOURCE_SHA=\`git rev-parse HEAD\`
    +git checkout develop
    +git merge --no-ff $SOURCE_SHA

    2. Merge commit with semi-linear history

    動作としては、前述の Merge commit と同じコマンドを使用して、機能ブランチの変更を取り込む形になる。
    この方法を選択した場合は、ソースブランチがターゲットブランチより古い場合はリベースしないとマージできない。

    3. Fast-forward merge

    動作としては、GitHubにおける Rebase and merge と同様のマージ方法になる。
    ただし、マージリクエスト上で Squash commits を選択してマージした場合、GitHubにおける Squash and merge と同様のマージ方法になる。

    `,25)]))}const F=i(h,[["render",p]]);export{_ as __pageData,F as default}; diff --git a/assets/documents_forGitBranch_vscode_git_ope.md.EwXmig8W.js b/assets/documents_forGitBranch_vscode_git_ope.md.EwXmig8W.js new file mode 100644 index 00000000..e38880ac --- /dev/null +++ b/assets/documents_forGitBranch_vscode_git_ope.md.EwXmig8W.js @@ -0,0 +1 @@ +import{_ as e,c as a,a3 as i,o}from"./chunks/framework.BDUoXecB.js";const s="/coding-standards/assets/vscode_git_clone1.qDoYJxim.png",r="/coding-standards/assets/vscode_git_clone2.CEP9JvgJ.png",c="/coding-standards/assets/vscode_git_graph1.B-QqvDRT.png",l="/coding-standards/assets/vscode_git_graph2.004hjEVr.png",n="/coding-standards/assets/vscode_git_fetch1.DRikG15J.png",d="/coding-standards/assets/vscode_git_fetch2.DAVY-Tc0.png",g="/coding-standards/assets/vscode_git_branch1.l8tVcgzj.png",h="/coding-standards/assets/vscode_git_branch2.Cwy7x_5O.png",p="/coding-standards/assets/vscode_git_stage.BcG6O3Ku.png",u="/coding-standards/assets/vscode_git_commit.BYQAFQn8.png",m="/coding-standards/assets/vscode_git_push1.BlFN6oO1.png",_="/coding-standards/assets/vscode_git_push2.BhX_AasB.png",C="/coding-standards/assets/vscode_git_push3.DjxvPuCO.png",B=JSON.parse('{"title":"VSCode上でのGit操作","description":"","frontmatter":{"sidebarDepth":4,"title":"VSCode上でのGit操作","author":"フューチャー株式会社"},"headers":[],"relativePath":"documents/forGitBranch/vscode_git_ope.md","filePath":"documents/forGitBranch/vscode_git_ope.md"}'),b={name:"documents/forGitBranch/vscode_git_ope.md"};function f(O,t,q,v,G,k){return o(),a("div",null,t[0]||(t[0]=[i('

    VSCode上でのGit操作

    利用頻度が高いとされるVS CodeでのGit操作を紹介する。

    VSCode上でのGit操作は、サイドバーの "Source Control" から行うことができる。ほとんど全ての操作はコマンドパレットからも実行可能だが、説明は割愛する。

    推奨する拡張機能

    GUIでのGit操作にあたり、次の2つの拡張機能をインストールしておくと利便性が高い。業務上はほぼ必須と見て良い。

    以降では、これらの拡張機能がインストールされていることを前提に説明を行う。

    リポジトリのクローン (git clone)

    サイドバー > Explorer か Source Control > Clone Repository ボタンをクリックし、URLを入力すると、リポジトリをクローンできる。

    Clone1 Clone2

    コミットグラフの表示

    SOURCE CONTROL パネル > 黒丸のグラフアイコン (View Git Graph (git log)) をクリックすると、コミットグラフを表示できる。

    白丸のグラフアイコン (Show Commit Graph) はGitLensのコミットグラフだが、冒頭の記述通り、Pro版でのみの提供となる。

    Graph1 Graph2

    リモートのフェッチ/プル (git fetch / git pull)

    以下のいずれかの操作を実行すると、リモートリポジトリをフェッチできる。

    • SOURCE CONTROL パネル > 三点リーダーアイコン (More Actions...) をクリックし、 Fetch を選択
    • コミットグラフ > 雲アイコン (Fetch from Remote(s)) をクリック

    Fetch1

    なお、フェッチ後に以下のようなダイアログが表示される場合があるが、 "Yes" を選択すると、自動で定期的にフェッチを行う。

    Fetch2

    [TODO] プルを追記する。

    ブランチの作成/チェックアウト (git branch / git checkout)

    以下のいずれかの操作を実行すると、ブランチを作成できる。

    • SOURCE CONTROL パネル > 三点リーダーアイコン (More Actions...) をクリックし、Branch > Create Branch... を選択
      • 現在チェックアウトしているブランチから新規ブランチが作成されますが、Create Branch From... を選択すると、作成元のブランチを選択することができる
      • 作成したブランチに自動的にチェックアウトする
    • コミットグラフ > 作成元コミットの行上で右クリックし、Create Branch... を選択
      • "Check out" にチェックを入れると、作成したブランチにチェックアウトする

    Branch1 Branch2

    [TODO] チェックアウトを追記する。

    ステージ/コミット/プッシュ (git add / git commit / git push)

    SOURCE CONTROL パネル > 変更ファイルの行 > +アイコン (Stage Changes) をクリックすると、対象ファイルをステージできる。(Changes > +アイコン (Stage All Changes) をクリックすると、すべての変更をステージする)

    Stage

    必要な変更をステージ後、 SOURCE CONTROL パネル内でコミットメッセージを入力し、 Commit ボタンをクリックすると、コミットを作成できる。

    Commit

    以下のいずれかの操作を実行すると、作成したコミットをリモートリポジトリにプッシュできる。

    • SOURCE CONTROL パネル > 三点リーダーアイコン (More Actions...) をクリックし、Push を選択
    • BRANCHES パネル > 対象ブランチの行 > 雲アイコン (Publish Branch) をクリック
    • コミットグラフ > 対象ブランチの上で右クリックし、Push Branch... を選択

    push1 push2 push3

    リバート (git revert)

    TODO

    マージ (git merge)

    TODO

    リベース (git rebase)

    TODO

    スタッシュ (git stash)

    TODO

    ',42)]))}const P=e(b,[["render",f]]);export{B as __pageData,P as default}; diff --git a/assets/documents_forGitBranch_vscode_git_ope.md.EwXmig8W.lean.js b/assets/documents_forGitBranch_vscode_git_ope.md.EwXmig8W.lean.js new file mode 100644 index 00000000..e38880ac --- /dev/null +++ b/assets/documents_forGitBranch_vscode_git_ope.md.EwXmig8W.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,a3 as i,o}from"./chunks/framework.BDUoXecB.js";const s="/coding-standards/assets/vscode_git_clone1.qDoYJxim.png",r="/coding-standards/assets/vscode_git_clone2.CEP9JvgJ.png",c="/coding-standards/assets/vscode_git_graph1.B-QqvDRT.png",l="/coding-standards/assets/vscode_git_graph2.004hjEVr.png",n="/coding-standards/assets/vscode_git_fetch1.DRikG15J.png",d="/coding-standards/assets/vscode_git_fetch2.DAVY-Tc0.png",g="/coding-standards/assets/vscode_git_branch1.l8tVcgzj.png",h="/coding-standards/assets/vscode_git_branch2.Cwy7x_5O.png",p="/coding-standards/assets/vscode_git_stage.BcG6O3Ku.png",u="/coding-standards/assets/vscode_git_commit.BYQAFQn8.png",m="/coding-standards/assets/vscode_git_push1.BlFN6oO1.png",_="/coding-standards/assets/vscode_git_push2.BhX_AasB.png",C="/coding-standards/assets/vscode_git_push3.DjxvPuCO.png",B=JSON.parse('{"title":"VSCode上でのGit操作","description":"","frontmatter":{"sidebarDepth":4,"title":"VSCode上でのGit操作","author":"フューチャー株式会社"},"headers":[],"relativePath":"documents/forGitBranch/vscode_git_ope.md","filePath":"documents/forGitBranch/vscode_git_ope.md"}'),b={name:"documents/forGitBranch/vscode_git_ope.md"};function f(O,t,q,v,G,k){return o(),a("div",null,t[0]||(t[0]=[i('

    VSCode上でのGit操作

    利用頻度が高いとされるVS CodeでのGit操作を紹介する。

    VSCode上でのGit操作は、サイドバーの "Source Control" から行うことができる。ほとんど全ての操作はコマンドパレットからも実行可能だが、説明は割愛する。

    推奨する拡張機能

    GUIでのGit操作にあたり、次の2つの拡張機能をインストールしておくと利便性が高い。業務上はほぼ必須と見て良い。

    以降では、これらの拡張機能がインストールされていることを前提に説明を行う。

    リポジトリのクローン (git clone)

    サイドバー > Explorer か Source Control > Clone Repository ボタンをクリックし、URLを入力すると、リポジトリをクローンできる。

    Clone1 Clone2

    コミットグラフの表示

    SOURCE CONTROL パネル > 黒丸のグラフアイコン (View Git Graph (git log)) をクリックすると、コミットグラフを表示できる。

    白丸のグラフアイコン (Show Commit Graph) はGitLensのコミットグラフだが、冒頭の記述通り、Pro版でのみの提供となる。

    Graph1 Graph2

    リモートのフェッチ/プル (git fetch / git pull)

    以下のいずれかの操作を実行すると、リモートリポジトリをフェッチできる。

    • SOURCE CONTROL パネル > 三点リーダーアイコン (More Actions...) をクリックし、 Fetch を選択
    • コミットグラフ > 雲アイコン (Fetch from Remote(s)) をクリック

    Fetch1

    なお、フェッチ後に以下のようなダイアログが表示される場合があるが、 "Yes" を選択すると、自動で定期的にフェッチを行う。

    Fetch2

    [TODO] プルを追記する。

    ブランチの作成/チェックアウト (git branch / git checkout)

    以下のいずれかの操作を実行すると、ブランチを作成できる。

    • SOURCE CONTROL パネル > 三点リーダーアイコン (More Actions...) をクリックし、Branch > Create Branch... を選択
      • 現在チェックアウトしているブランチから新規ブランチが作成されますが、Create Branch From... を選択すると、作成元のブランチを選択することができる
      • 作成したブランチに自動的にチェックアウトする
    • コミットグラフ > 作成元コミットの行上で右クリックし、Create Branch... を選択
      • "Check out" にチェックを入れると、作成したブランチにチェックアウトする

    Branch1 Branch2

    [TODO] チェックアウトを追記する。

    ステージ/コミット/プッシュ (git add / git commit / git push)

    SOURCE CONTROL パネル > 変更ファイルの行 > +アイコン (Stage Changes) をクリックすると、対象ファイルをステージできる。(Changes > +アイコン (Stage All Changes) をクリックすると、すべての変更をステージする)

    Stage

    必要な変更をステージ後、 SOURCE CONTROL パネル内でコミットメッセージを入力し、 Commit ボタンをクリックすると、コミットを作成できる。

    Commit

    以下のいずれかの操作を実行すると、作成したコミットをリモートリポジトリにプッシュできる。

    • SOURCE CONTROL パネル > 三点リーダーアイコン (More Actions...) をクリックし、Push を選択
    • BRANCHES パネル > 対象ブランチの行 > 雲アイコン (Publish Branch) をクリック
    • コミットグラフ > 対象ブランチの上で右クリックし、Push Branch... を選択

    push1 push2 push3

    リバート (git revert)

    TODO

    マージ (git merge)

    TODO

    リベース (git rebase)

    TODO

    スタッシュ (git stash)

    TODO

    ',42)]))}const P=e(b,[["render",f]]);export{B as __pageData,P as default}; diff --git "a/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.md.BwEbWD0S.js" "b/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.md.BwEbWD0S.js" new file mode 100644 index 00000000..626acba1 --- /dev/null +++ "b/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.md.BwEbWD0S.js" @@ -0,0 +1,761 @@ +import{_ as a,c as n,G as l,a3 as p,B as e,o as t}from"./chunks/framework.BDUoXecB.js";const o=JSON.parse('{"title":"Javaコーディング規約","description":"","frontmatter":{"sidebarDepth":4,"title":"Javaコーディング規約","author":"Future Enterprise Coding Standards","head":[["meta",{"name":"keywords","content":"Javaコーディング規約,Java17,コーディング規約,Java"}]]},"headers":[],"relativePath":"documents/forJava/Javaコーディング規約.md","filePath":"documents/forJava/Javaコーディング規約.md"}'),h={name:"documents/forJava/Javaコーディング規約.md"};function k(r,s,d,E,g,c){const i=e("page-title");return t(),n("div",null,[l(i),s[0]||(s[0]=p(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    一般に利用・参照されている Java コーディング規約やガイドラインを以下に示す。本規約の作成においても、下記規約類を参照・抜粋している。

    規約著作者URL
    Code Conventions for the Java Programming LanguageSun Microsystemshttp://www.oracle.com/technetwork/java/codeconvtoc-136057.html
    Writing Robust Java CodeScott W. Amblerhttp://www.ambysoft.com/downloads/javaCodingStandards.pdf
    オブジェクト倶楽部版 Java コーディング標準オブジェクト倶楽部http://objectclub.jp/community/codingstandard/CodingStd.pdf
    電通国際情報際サービス版 Java コーディング規約 2004電通国際情報サービスhttp://objectclub.jp/community/codingstandard/JavaCodingStandard2004.pdf
    JJGuideline (Java - J2EE Conventions and Guidelines)Stephan.J & JCS Teamhttp://www.fedict.belgium.be/sites/default/files/downloads/Java_J2EE_conventions_and_guidelines_EN.pdf
    Google Java Style (非公式和訳)Googlehttps://kazurof.github.io/GoogleJavaStyle-ja/
    Acroquest Technology Java コーディング規約Acroquest Technologyhttps://www.acroquest.co.jp/webworkshop/javacordingrule/Acroquest_JavaCodingStandard_6_7.pdf
    ※現在は削除されています

    ※ Sun Microsystems の規約は Java 草創期から一応の標準という位置づけだったが、オブジェクト指向、及び、その開発環境の普及・発展によって、設計やコーディングにおいて、直接的に有用な知識や豊富な指針を含むような優れた規約や、ツールなどによる機械的な準拠チェックと連携する規約が普及してきている。

    規約の重要性

    標準としての規約を定義し、遵守することの重要性を以下に示す。

    • ソフトウェアメンテナンスにおける、可読性・保守性・拡張性の向上
    • 問題を起こしやすい実装を未然に回避することによる、品質・生産性の向上
    • 標準規約を通して得られる一般的な実装知識やノウハウ(=学習効果)

    コーディングの心得

    長いプログラムを記述すること(ステップ数)によって生産性が評価されたのは、過去の時代の出来事である。現在は、クラスやメソッドの役割が明確で、ロジックが読みやすく、保守性に優れたプログラムを記述することが評価される。コーディング規約は、コードの書き方に関する一種のパターンと考えることもでき、コードの保守性を向上させる具体的な方法を示している。したがって、規約の一つ一つの意図を理解し、守ることが重要になる。しかし、保守性に優れたコードを作成するためには、コーディング規約を守ることに加えて、良いコードを記述するための基本的な心構えをしっかり心に留めておく必要がある。以下では、その心得について述べる。

    【コーディングの心得 5 か条】

    1. 見やすさを重視せよ
    2. ネーミングはわかりやすく
    3. サンプルを鵜呑みにしない
    4. 同じコードを二度書かない
    5. 役割は一つに

    見やすさを重視せよ

    「良いコード」の基本は、「他の人が読んでもわかりやすいと感じられるコード」。コードの見やすさは、フォーマットはもちろん、ロジックの簡潔さや API の常識的な使い方などから生まれる。コーディングにあたっては、常に他の人の視点を意識しながら、見やすさに気を配って記述する必要がある。例えば、自分で記述したコードであっても、しばらくたってから読み返してみると理解に時間がかかった経験は誰にもあるはず。「3 日前に書いたコードは他人のコードと同じ」ということもよく言われる。見やすさを重視することは、他の人のためだけでなく自分のためにもなる。コードを読んでもすぐに理解できないような実装は、再考(リファクタリング)の必要がある。

    ネーミングはわかりやすく

    コーディングでは、様々な変数やメソッドなどにネーミング(名前付け)する必要がある。ネーミングとは、本来、その対象の本質を表すような名前を考える作業である。大変難易度の高い作業だが、一方で適当に行ってもコードの動作は変わらないため、人によっては手を抜きがちとなる。しかし、ネーミングの良し悪しは、コードの可読性に非常に大きな影響を及ぼす。例えば、「C0001」というクラス名があるとする。これでは、何を表すクラスなのかすぐにはわからないだろう。また、「int p = 5000;」という記述があるとする。プログラマに聞くと、変数名 p は価格(Price)の略だと言うのだが、それならば略さずに、「int price = 5000;」としたほうが分かりやすいはずである。「ネーミングはわかりやすく」の背景には、読んで内容が理解できるという意味で、文章のようなプログラミングを行う、という考え方に基づく。

    サンプルを鵜呑みにしない

    サンプルコードを活用すること自体は、著作権等を侵害しなければ問題ない。問題なのは、その内容や背景を理解しないまま、サンプルコードだけを鵜呑みにして、「おまじない」として表面的に適用してしまうことである。コードを「おまじない」ととらえていては、サンプルコードの間違いを気づかないまま適用してしまうこともある。例えば、ストリームのクローズ処理を行っていないサンプルコードであっても、それに気づかずに自分のコードに適用してしまい、後で思わぬ障害を引き起こすという可能性がある。サンプルコードは、そこで説明する内容に絞ったコードが多いため、このような例はよく見られる。また、サンプルコードをそのまま適用した結果、自分が記述すべきコードには必要のないコードが含まれてしまう場合もある。その場合、コードの可読性を下げる原因となる。自分のコードは、自分で深く理解して記述すべきである。

    同じコードは二度書かない

    コードをコピー・ペーストしていませんか?コピー・ペーストしてしまうと、何らかの修正をする際に、全ての個所に同じ修正をする羽目になる。同じコードが現れるようならまとめて一つにし、外に出してコールするような書き方にすべきである。同じコードをまとめる作業は、どちらかといえば、コーディング時よりリファクタリング(ソフトウェアの外部的振る舞いを変更せずに内部構造を改善する作業)で行われることが多い。しかし、コーディング時からできるだけ気をつけておきたいことでもある。

    役割は一つに

    メソッドの役割が明確で、かつ 1 つであれば単体テストが行いやすくなる。つまり、コードの「試験性」が高まる。また、役割が一つであれば、後でコードを変更する際に修正箇所がわかりやすいため、障害修正に要する時間が短くなる。つまり、コードの「保守性」があがることになる。例えば、「チェックをして実行する」機能を実現するために、checkAndDo()メソッドが存在したとする。この場合、このメソッドは check()メソッドと do()メソッドに分割すべきである。なぜなら、checkAndDo()メソッドの check()ロジックに誤りがあった場合、do()メソッドに書かれる内容まで把握する必要が生じるためである。分割してあれば、check()メソッドだけの変更で済む。このことはクラスの設計にもあてはまる。

    ネーミング規約

    全般

    • 大文字・小文字の違いで名前を区別しない。

      良い例:

      java
      private int carNumber;
      +private int trainNumber;

      悪い例:

      java
      private int num;
      +private int Num;

    パッケージ

    • パッケージ名はすべて小文字にする
    • パッケージ名は意味のある名前にする
    • サブパッケージ名の重複は可能

    クラス

    • クラス名は単語の先頭を大文字にする
      良い例:

      java
      public class Entry {

      悪い例:

      java
      public class entry {
    • インターフェース名、Enum 名、Record 名はクラス名に準ずる

    メソッド

    • コンストラクタと同じ名前のメソッドはつくらない

    • メソッド名は区切りのみ大文字にする
      良い例:

      java
      public String getName() {
      +    //・・・
      +}

      悪い例:

      java
      public String getname() {
      +    //・・・
      +}
      +public String GETNAME() {
      +    //・・・
      +}
    • 変換メソッド名は「"to"+オブジェクト名」にする
      良い例:

      java
      public String toString() {

      悪い例:

      java
      public String string() {
    • ゲッターメソッド名は「"get"+属性名」にする
      型がbooleanの場合は「"is"+属性名」にする

    • セッターメソッド名は「"set"+属性名」にする

    • boolean変数を返すメソッド名はtrue/falseの状態がわかるようにする

      良い例:

      java
      public boolean isAsleep() {
      +}
      +public boolean exists() {
      +}
      +public boolean hasExpired() {
      +}

    引数

    • メソッドのパラメータ名とインスタンス変数名を一緒にしない
      ただし、アクセサメソッドやコンストラクタなど、統合開発環境の機能により自動生成するものに関しては可とする。
      アンダースコア _ をつけての区別は原則禁止とする。

      良い例:

      java
      public double calc(double rate) {
      +    return this.value * rate;
      +}

      悪い例:

      java
      public double calc(double value) {
      +    return this.value * value;
      +}
      +
      +public double calc(double _value) {
      +    return this.value * _value;
      +}

    変数全般

    • boolean変数はtrue/false の状態がわかるようにする

      良い例:

      java
      private boolean isOpen;

      悪い例:

      java
      private boolean flag;
    • 定数は全てstatic finalとし、すべて大文字、区切りは"_"

      良い例:

      java
      private static final String SYSTEM_NAME = "販売管理システム";
    • 変数名は小文字とし、単語の区切りのみ大文字にする

      良い例:

      java
      private String thisIsString;

      変数名に固有名詞が含まれる場合、先頭をのぞき、単語の区切り以外に大文字を使用してもよい

      良い例:

      java
      private String thisIsIPAddress;

    ローカル変数

    • スコープが狭い変数名は省略した名前でもよい
      良い例:

      java
      if (・・・) {
      +    String s = "・・・・";
      +   //変数sを利用した処理 数行
      +}

      悪い例:

      java
      String s = "・・・・";
      +if (・・・) {
      +   //変数sを利用した処理
      +}
      +・・・
      +if (・・・) {
      +   //変数sを利用した処理
      +}

      変数sの利用範囲が広いので役割が明確になる変数名に変更する。

    • for 文のループカウンタは、ネストごとに"i","j","k"・・・を使う

    Enum

    • Enum 名はクラス名と同じく、単語の先頭を大文字にする

    • 列挙定数は定数と同じく、すべて大文字、区切りは"_"

      良い例:

      java
      enum Season {
      +    WINTER,
      +    SPRING,
      +    SUMMER,
      +    FALL
      +}

      悪い例:

      java
      enum Season {
      +    winter,
      +    spring,
      +    summer,
      +    fall
      +}

    コーディング規約

    全般

    • 原則としてオブジェクトの参照にはインターフェースを利用する
      オブジェクトを参照する際は、そのオブジェクトの実装クラスを用いて宣言できるが、実装クラスに適切なインターフェースが存在している場合は、必ずインターフェースを用いて宣言すること。

      良い例:

      java
      List<Entry> list = new ArrayList<>();
      +Map<String, String> map = new HashMap<>();

      悪い例:

      java
      ArrayList<Entry> list = new ArrayList<>();
      +HashMap<String, String> map = new HashMap<>();
    • 推奨されない API を使用しない
      アノテーション@Deprecatedで指定されたメソッドは利用しないこと。

    • 使われないコードは書かない

    • 宣言は適切な権限で行うこと(public, protected, private

    • final を適切に利用する
      継承されないクラス、オーバーライドされないメソッド、値の変わらない変数(つまり定数)等、変化のないもの/変化させたくないものについてはfinal で宣言する。

      良い例:

      java
      //継承されないクラス
      +public final class CalculateUtils {
      +    //・・・
      +}
      +
      +//値の変わらない変数(定数)
      +private static final String MESSAGE = "・・・";
      +
      +//オーバーライドされないメソッド
      +public final int sum(/*変化させたくない値*/final int... values) {
      +    int sumValue = 0;
      +    for (/*変化させたくない値*/final int value : values) {
      +        sumValue += value;
      +    }
      +    return sumValue;
      +}

    フォーマット

    • インデントは空白文字 4 文字分の Tab を使用する

    • 長すぎる行は避ける

    • { の後にステートメントを記述しない
      良い例:

      java
      if (s == null) {
      +    return 0;
      +}

      悪い例:

      java
      if (s == null) {return 0;}
    • 1 行に 2 つ以上のステートメントを記述しない
      悪い例:

      java
      } catch (Exception e) {
      +    log.error("Error", e);return null;
      +}
    • カンマの後には空白文字を
      良い例:

      java
      process(x, y, z);

      悪い例:

      java
      process(x,y,z);
    • 代入演算子( = , += , -= , …)の前後には空白文字を挿入する
      良い例:

      java
      int a = x;
      +a += 10;

      悪い例:

      java
      int a=x;
      +a+= 10;
    • for 文内のセミコロンの後には空白文字を挿入する
      良い例:

      java
      for (int i = 0; i < array.length; i++) {
      +    //・・・
      +}

      悪い例:

      java
      for (int i = 0;i < array.length ;i++) {
      +    //・・・
      +}
    • ++-- とオペランドの間には空白文字を入れない
      良い例:

      java
      i++;

      悪い例:

      java
      i ++;
    • ビット演算子( |&^<<>> )の前後には空白文字を挿入する

    • 論理演算子( ||&&)の前後には空白文字を挿入する

    • 関係演算子( <>>=<===!= )の前後には空白文字を挿入する

    • 算術演算子( /% )の前後には空白文字を挿入する

    • return 文ではカッコを使わない
      良い例:

      java
      int answer = (a + b + c) * d;
      +return answer;

      悪い例:

      java
      return ((a + b + c) * d);
    • if などの条件式で boolean の変数を比較しない

      良い例:

      java
      if (hasStock)

      悪い例:

      java
      if (hasStock == true)
    • 不等号の向きは左向き( <<= )にする
      良い例:

      java
      if (from <= x && x <= to) {

      悪い例:

      java
      if (x >= from && x <= to) {

    コメント

    • ファイルの先頭への Copyright の表記について
      ソースのファイルヘッダにコピーライト標記は法的拘束力がないため、不要とする。
      ただし、顧客からの要求があった場合を除く。

    • Javadoc コメントには、少なくとも author と version(クラス)、param と return と exception(メソッド)を記述する

      • 今後もバージョンアップのリリースが予定されているソースでは、上記に加えて since(バージョン)を記述する
      • @Overrideのあるメソッドでは、上記に加えて{@Inherit}を記述する
    • Javadoc  クラスヘッダコメントのフォーマットは以下の通り

      良い例:

      java
      /**
      + * Action(or Bean)クラス メニュー名称
      + *
      + * @author 姓 名
      + * @version バージョン YYYY/MM/DD 説明
      + */
    • コメントは必要なものだけを簡潔に
      悪い例:

      java
      /**
      + * 文字列に変換
      + */
      +@Override
      +public String toString() {
      +
      +/**
      + * コピー
      + *
      + * @return コピーしたインスタンス
      + */
      +public Entry copy() {
    • 不要なコメントは記載しない

      • コードからすぐわかること・冗長なコメント
      • 名前の説明
        コメントではなくわかりやすい名前を付ける。
      • 別システムで管理している内容
        ソースコード管理システム、バグトラッキングシステムで管理している内容はソースコードにコメントで記載する必要はない。
        • コメントアウトされたコード
          ソースコード管理システムで管理されている

    インポート

    • java.langパッケージはインポートしない

      悪い例:

      java
      import java.lang.String;//必要のない記述
    • 原則として static インポートしない
      JUnit の作成やフレームワークとして static インポートが推奨されるような場合は利用してもよい

    • 原則としてオンデマンドのインポート宣言(type-import-on-demand declaration)(アスタリスク*によるインポート) は行わない

      悪い例:

      java
      import java.util.*;

    コンストラクタ

    • public 宣言していないクラスにはpublic権限のコンストラクタを作らない
      良い例:

      java
      class Entry {
      +    //・・・
      +    Entry(int id) {
      +        //・・・
      +    }

      悪い例:

      java
      class Entry {
      +    //・・・
      +    public Entry(int id) {
      +        //・・・
      +    }
    • インスタンスメンバを持たない(static メンバのみの)クラスは、private権限のコンストラクタを作成する

    メソッド

    • オーバーライドさせたくないメソッドはfinalを利用する

    • 戻り値が配列のメソッドで、戻る配列のサイズが 0 の場合、メソッドを使用するクライアントの余計な null チェックのロジックを回避するため、null ではなく長さゼロの配列を戻すようにする。 良い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return ArrayUtils.EMPTY_STRING_ARRAY;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return Collections.emptyList();
      +    }
      +    return List.of(s);
      +}

      悪い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return List.of(s);
      +}
    • メソッドは 1 つの役割にする

    クラスメソッド

    • クラスメソッドを利用するときは、クラス名を使って呼び出す
      良い例:

      java
      int comp = Integer.compare(x, y);

      悪い例:

      java
      Integer a = //
      +int comp = a.compare(x, y);

    変数全般

    • 1 つのステートメントには 1 つの変数宣言
      良い例:

      java
      /** 科目コード */
      +private String code;
      +/** 科目名 */
      +private String name;
      +/** 科目略名 */
      +private String shortName;

      悪い例:

      java
      private String code, name, shortName;
    • リテラルは使用しない
      リテラルとは、コード中に、表現が定数として直接現れており、記号やリストで表現することができないものを指す(数値、文字列両方含む 通称マジックナンバー)。コードの可読性・保守性の低下を防ぐために、リテラル定数(static final フィールド)を使用すること。
      例外:-1,0,1 等をカウント値としてループ処理等で使用するような場合

      良い例:

      java
      private static final double ONE_MILE_METRE = 1609.344;
      +
      +public double mileToMetre(double mi) {
      +    return mi * ONE_MILE_METRE;
      +}

      悪い例:

      java
      public double mileToMetre(double mi) {
      +    return mi * 1609.344;
      +}
      • リテラル定数の名前はその値の意味を正しく表現したものにする

        悪い例:

        java
        private static final int ZERO = 0;
    • 配列宣言は「型名[]」にする

      良い例:

      java
      private int[] sampleArray = new int[10];

      悪い例:

      java
      private int sampleArray[] = new int[10];
    • できるだけローカル変数を利用する
      ローカル変数で事足りるものをインスタンス変数として利用するなど、必要のないインスタンス変数を定義すると、パフォーマンスや可読性の低下やの大きな要因となる上、マルチスレッドを意識した際に不整合がおきる可能性があるので、インスタンス変数は必要性を充分に考慮してから使用すること。

    • 定数はfinalで宣言する

    • ローカル変数とインスタンス変数を使いわける

    定数

    • public で宣言するクラス変数とインスタンス変数は、定数のみとし、 static final で定義する
      final ではない static な定数は作成しない。

      良い例:

      java
      public static final String PROTOCOL_HTTP = "http";
    • 定数( static フィールド)に、 static ではないメソッドから書き込まない

    • 定数は、プリミティブ型もしくは、不変(Immutable)オブジェクトで参照する

      • 不変Listの生成にはList.of()を利用する

        良い例:

        java
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);

        悪い例:

        java
        public static final List<Integer> VALUES = Arrays.asList(1, 2, 3, 4, 5);
      • 不変Setの生成にはSet.of()を利用する

      • 不変Mapの生成にはMap.of()を利用する

        良い例:

        java
        public static final Map<Integer, String> VALUES_MAP = Map.of(1, "A", 2, "B", 3, "C");

        悪い例:

        java
        public static final Map<Integer, String> VALUES_MAP = new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +};
      • 不変な配列インスタンスは長さ 0 の配列以外は生成不可能なため、外部から参照される(public)定数では利用せず、List等への置き換えをすること

        良い例:

        java
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);

        悪い例:

        java
        public static final int[] VALUES = { 1, 2, 3, 4, 5 };

    インスタンス変数

    • インスタンス変数はprivateにする

      良い例:

      java
      public class Employee {
      +    private long id;
      +
      +    //・・・
      +    //getter/setter
      +}

      悪い例:

      java
      public class Employee {
      +    public long id;
      +
      +    //・・・
      +    //getter/setter
      +}

    クラス変数

    • public static final 宣言した配列を利用しない
      ※「定数」を参照

    • クラス変数にはクラス名を使用してアクセスすること

      良い例:

      java
      BigDecimal b = BigDecimal.ZERO;

      悪い例:

      java
      BigDecimal a = //
      +BigDecimal b = a.ZERO;

    ローカル変数

    • ローカル変数は利用する直前で宣言する
      行間の程度にもよるが、ある程度まとめて宣言するのは OK とする。

      良い例:

      java
      for (int i = 0; i < lines.length; i++) {
      +    String line = lines[i];
      +    //lineの処理
      +}

      悪い例:

      java
      String line;
      +for (int i = 0; i < lines.length; i++) {
      +    line = lines[i];
      +    //lineの処理
      +}
    • ローカル変数は安易に再利用しない
      一度宣言したローカル変数を、複数の目的で安易に使いまわさないこと。ローカル変数は、役割ごとに新しいものを宣言して初期化することにより、コードの可読性・保守性の向上、及びコンパイラの最適化の促進をはかる。

    引数

    • メソッド引数への代入は行わない
      原則としてfinalで宣言する。

      良い例:

      java
      public void add(final int value) {
      +    //・・・
      +}

    継承

    • スーパークラスのインスタンス変数をサブクラスでオーバーライドしない
      スーパークラスと同じ名前のフィールドをサブクラスで宣言しないこと。 同じ名前のフィールドを宣言すると、スーパークラスのフィールドはサブクラスで宣言されたフィールドによって隠ぺいされてしまうので、他の人の混乱を招くことを防ぐため重複する名前は付けないこと。

      悪い例:

      java
      public class Abs {
      +    protected String name;
      +}
      +
      +public class Sub extends Abs {
      +    protected String name;//Abs#nameは隠ぺいされる
      +}
    • スーパークラスのメソッドをオーバーライドするときは@Override アノテーションを指定する。

      良い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    @Override
      +    protected void process() {
      +
      +    }
      +}

      悪い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    //@Overrideアノテーションの指定がない
      +    protected void process() {
      +
      +    }
      +}
    • スーパークラスで private 宣言されているメソッドと同じ名前のメソッドをサブクラスで定義しない
      スーパークラスにある private メソッドと同じ名前のメソッドをサブクラスで定義しないこと。private メソッドはオーバーライドされず全く別のメソッドとして扱われ、他の人の混乱を招き、バグにつながる恐れがある。

    インナークラス

    • 原則としてインナークラスは利用しない
      一つの java ファイルに複数のクラスを記載するのは NG とする。また無名クラスを利用するのも原則として NG とする。
      Enum の定数固有メソッド実装(constant-specific method implementation)、Java8 のラムダ式は内部的にインナークラスとされるがこれらは許可する。

    メンバー順序

    • 以下の順で記述する

      1. static フィールド
      2. static イニシャライザー
      3. static メソッド
      4. フィールド
      5. イニシャライザー
      6. コンストラクター
      7. メソッド
    • 同一カテゴリー内では以下の可視性の順で記述する

      1. public
      2. protected
      3. パッケージ private
      4. private

    インスタンス

    • オブジェクト同士はequals()メソッドで比較する

      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}

      ただし Enum の場合は==演算子を利用して比較する

      equals()メソッドで比較する際、左辺のオブジェクトが null にならないように制御すること。

    • Class 名を利用した比較をおこなわない

      良い例:

      java
      if (o instanceof Foo f) {
      +    // ...
      +}

      悪い例:

      java
      if ("my.Foo".equals(o.getClass().getName())) {
      +    Foo f = (Foo)o;
      +    // ...
      +}
    • インスタンスの型キャスト(Class キャスト)が必要な場合はパターンマッチングを使用する

      良い例:

      java
      if (o instanceof String s) {
      +    // ...
      +}
      +
      +var str = (o instanceof BigDecimal b) ? b.toPlainString() : String.valueOf(o);
      +
      +var empty = o == null ||
      +  (o instanceof String s && s.isEmpty()) ||
      +  (o instanceof Collection c && c.isEmpty());

      悪い例:

      java
      if (o instanceof String) {
      +    String s = (String)o;
      +    // ...
      +}
      +
      +var str = (o instanceof BigDecimal) ? ((BigDecimal)o).toPlainString() : String.valueOf(o);
      +
      +var empty = o == null ||
      +  (o instanceof String && ((String)o).isEmpty()) ||
      +  (o instanceof Collection && ((Collection)o).isEmpty());

    制御構造

    • 制御文( if , else , while , for , do while )の { } は省略しない

      良い例:

      java
      if (s == null) {
      +    return;
      +}

      悪い例:

      java
      if (s == null)
      +    return;
    • ステートメントが無い {} ブロックを利用しない
      悪い例:

      java
      //{}内の記述が無い
      +if (s == null) {
      +}
    • if / while の条件式で = は利用しない
      良い例:

      java
      boolean a =//
      +if (!a) {
      +    //・・・
      +}

      悪い例:

      java
      boolean a =//
      +if (a = false) {//コーディングミス
      +    //・・・
      +}
      +
      +
      +boolean a =//
      +boolean b =//
      +if (a = b) {//おそらくコーディングミス
      +    //・・・
      +}
    • forwhile の使い分けを意識する

    • for 文を利用した繰り返し処理中でループ変数の値を変更しない
      悪い例:

      java
      String[] array = { /*・・・*/ };
      +for (int i = 0; i < array.length; i++) {
      +    //・・・
      +    i += 2;//NG
      +}
      +
      +for (String s : array) {
      +    //・・・
      +    s = "string";//NG
      +}
    • for 文のカウンタは特別な事情がない限り、0 から始める

    • 配列やリストなどの全要素に対するループ処理は拡張 for 文を使用する。
      良い例:

      java
      for (int value : array) {
      +    //・・・
      +}
      +
      +for (String value : list) {
      +    //・・・
      +}
    • 配列をコピーするときはArrays.copyOf()メソッドを利用する

      良い例:

      java
      int[] newArray = Arrays.copyOf(array, array.length);

      悪い例:

      java
      int[] newArray = new int[array.length];
      +System.arraycopy(array, 0, newArray, 0, array.length);
    • 繰り返し処理中のオブジェクトの生成は最小限にする

    • if 文と else 文の繰り返しや switch 文の利用はなるべく避け、オブジェクト指向の手法を利用する
      良い例:

      java
      CodingKind codingKind = toCodingKind(kind);
      +d = codingKind.encode(s);
      +
      +//---
      +
      +CodingKind codingKind = toCodingKind(kind);
      +s = codingKind.decode(d);

      悪い例:

      java
      switch (kind) {
      +case 1 ->
      +    d = encode1(s);
      +case 2 ->
      +    d = encode2(s);
      +}
      +
      +//---
      +
      +switch (kind) {
      +case 1 ->
      +    s = decode1(d);
      +case 2 ->
      +    s = decode2(d);
      +}
    • 繰り返し処理の内部で try ブロックを利用しない
      特に理由がない場合は繰り返し処理の外にtryブロックを記載する。
      ただし、繰り返し処理内部で例外をキャッチし処理を行いたい場合は繰り返し処理の内部でtryブロックを利用してもよい。

      良い例:

      java
      for (String s : array) {
      +    BigDecimal num;
      +    try {
      +        num = new BigDecimal(s);
      +    } catch (NumberFormatException e) {
      +        num = BigDecimal.ZERO;
      +    }
      +    //・・・
      +}

    文字列操作

    • 文字列同士が同じ値かを比較するときは、equals()メソッドを利用する
      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}
    • 文字列リテラルはnew しない
      良い例:

      java
      String s = "";

      悪い例:

      java
      String s = new String();
    • 更新される文字列にはStringBuilder クラスを利用する
      良い例:

      java
      StringBuilder builder = new StringBuilder();
      +for (String s : array) {
      +    builder.append(s);
      +}
      +System.out.println(builder.toString());

      悪い例:

      java
      String string = "";
      +for (String s : array) {
      +    string += s;
      +}
      +System.out.println(string);

      スレッドセーフ性が保証されていない箇所では\`StringBuffer\`クラスを利用する

      ※パフォーマンスについても記載しているので参考にしてください

    • 1ステートメントのみで行われる文字列の連結には+演算子を利用する

      良い例:

      java
      String s = s1 + s2;
      +
      +return s1 + s2 + s3 + s4 + s5;

      悪い例:

      java
      String s = new StringBuilder(s1).append(s2).toString();
      +
      +return new StringBuilder(s1).append(s2).append(s3).append(s4).append(s5).toString();
    • 更新されない文字列にはString クラスを利用する

    • 文字列リテラルと定数を比較するときは、文字列リテラルのequals()メソッドを利用する
      良い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (PROTOCOL_HTTP.equals(url.getProtocol())) {
      +
      +}

      悪い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (url.getProtocol().equals(PROTOCOL_HTTP)) {
      +
      +}
    • プリミティブ型とString オブジェクトの変換には、変換用のメソッドを利用する
      良い例:

      java
      int i = 1000;
      +String s = String.valueOf(i);// "1000"
      +s = NumberFormat.getNumberInstance().format(i);// 3桁区切り "1,000"
      +
      +boolean b = true;
      +s = String.valueOf(b);// true/false
      +s = BooleanUtils.toStringOnOff(b);// on/off
    • 文字列の中に、ある文字が含まれているか調べるには、contains()メソッドを利用する

    • システム依存記号( \\n\\r など)は使用しない。
      悪い例:

      java
      String text = Arrays.stream(array)
      +    .collect(Collectors.joining("\\n"));

    数値

    • 誤差の無い計算をするときは、BigDecimal クラスを使う
      浮動小数点演算は科学技術計算に利用するもので、誤差が発生する。これに対して、クラス「BigDecimal」は、文字列で数値の計算を行うので、金額などの正確な計算に適している。BigDecimal ではインスタンス生成時に指定された桁数での精度が保証される。

    • 数値の比較は精度に気をつける
      良い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +if (a.compareTo(b) == 0) {
      +    System.out.println("一致");
      +}

      悪い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +
      +if (a.equals(b)) {
      +    System.out.println("精度が違うためこの分岐には入らない");
      +}
    • 低精度なプリミティブ型にキャストしない

    • BigDecimalString変換する際はtoString()ではなくtoPlainString()を利用すること
      toString()を利用した場合、指数表記になることがあります。

    日付

    • 日付の文字列のフォーマットには、SimpleDateFormatまたはDateTimeFormatterを使う
      良い例:

      java
      Date date = new Date();
      +SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
      +String s = dateFormat.format(date);

    三項演算子

    • 入れ子の三項演算子の利用は禁止
      可読性が悪くなるので三項演算子を入れ子で行うのは禁止。

    switch 式

    • 一つの値を変数に代入するための if-else 文は代わりに switch 式の使用を推奨する
      switch 式の値を使用することで変数を不変(実質的 final)にでき、代入箇所が分散することによる可読性の低下を防げます。

      良い例:

      java
      var value = switch (op) {
      +    case "add" -> a + b;
      +    default -> a - b;
      +};

      悪い例:

      java
      int value;
      +if (op.equals("add")) {
      +    value = a + b;
      +} else {
      +    value = a - b;
      +}
    • case 句はなるべく一つの式での記述を推奨する
      複雑な式や複雑なステートメントを記述しなければならない場合は、メソッドに分割することを検討してください。

    • switch 式は、コーディングミスによるフォールスルーを避けるため、常にアロー構文を使用する
      https://docs.oracle.com/javase/jp/16/language/switch-expressions.htmlからの引用:

      ノート:case L ->ラベルの使用をお薦めします。case L:ラベルの使用時は、break文またはyield文の挿入を忘れがちです。これを忘れると、コード内で思いがけないフォール・スルーが発生する場合があります。 case L ->ラベルで、複数の文または式でないコード、あるいはthrow文を指定するには、それらをブロック内に囲みます。caseラベルが生成する値をyield文で指定します。

      良い例:

      java
      var date = LocalDate.now();
      +var off = switch (date.getDayOfWeek()) {
      +    case MONDAY -> {
      +        if (myCalendar.isOff(date) || localCalendar.isHoliday(date)) {
      +            yield true;
      +        }
      +        yield localCalendar.isHoliday(date.minusDays(1));
      +    }
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY ->
      +        myCalendar.isOff(date) || localCalendar.isHoliday(date);
      +    case SUNDAY, SATURDAY -> true;
      +};

      悪い例:

      java
      var date = LocalDate.now();
      +var off = switch (date.getDayOfWeek()) {
      +    case MONDAY:
      +        if (myCalendar.isOff(date) || localCalendar.isHoliday(date)) {
      +            yield true;
      +        }
      +        yield localCalendar.isHoliday(date.minusDays(1));
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY:
      +        yield myCalendar.isOff(date) || localCalendar.isHoliday(date);
      +    case SUNDAY, SATURDAY:
      +        yield true;
      +};
    • アロー構文の、中カッコ、yieldを省略できる場合は必ず省略する
      良い例:

      java
      var day = DayOfWeek.SUNDAY;
      +var shortDay = switch (day) {
      +    case MONDAY -> "M";
      +    case WEDNESDAY -> "W";
      +    case FRIDAY -> "F";
      +    case TUESDAY, THURSDAY -> "T";
      +    case SUNDAY, SATURDAY -> "S";
      +};

      悪い例:

      java
      var day = DayOfWeek.SUNDAY;
      +var shortDay = switch (day) {
      +    case MONDAY -> {
      +        yield "M";
      +    }
      +    case WEDNESDAY -> {
      +        yield "W";
      +    }
      +    case FRIDAY -> {
      +        yield "F";
      +    }
      +    case TUESDAY, THURSDAY -> {
      +        yield "T";
      +    }
      +    case SUNDAY, SATURDAY -> {
      +        yield "S";
      +    }
      +};
    • Enum 値の switch 式で case 句が全ての Enum 値をカバーする場合は default 句はデッドコードとなるため記述しない
      良い例:

      java
      var day = DayOfWeek.SUNDAY;
      +var off = switch (day) {
      +    case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> false;
      +    case SUNDAY, SATURDAY -> true;
      +};
      +
      +var day = DayOfWeek.SUNDAY;
      +var off = switch (day) {
      +    case SUNDAY, SATURDAY -> true;
      +    default -> false;
      +};

      悪い例:

      java
      var day = DayOfWeek.SUNDAY;
      +var off = switch (day) {
      +    case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> false;
      +    case SUNDAY, SATURDAY -> true;
      +    default -> false;
      +};

    switch 文

    • 代わりに switch 式が使用できる箇所は switch 式を使用する

      • case 句でreturnを記述する場合は switch 文を使用して良い
    • case 句はなるべく 1 行のステートメントでの記述を推奨する
      複雑なステートメントを記述しなければならない場合は、メソッドに分割することを検討してください。

    • switch 文は、コーディングミスによるフォールスルーを避けるため、なるべくアロー構文を使用することを推奨する
      https://docs.oracle.com/javase/jp/16/language/switch-expressions.htmlからの引用:

      ノート:case L ->ラベルの使用をお薦めします。case L:ラベルの使用時は、break文またはyield文の挿入を忘れがちです。これを忘れると、コード内で思いがけないフォール・スルーが発生する場合があります。 case L ->ラベルで、複数の文または式でないコード、あるいはthrow文を指定するには、それらをブロック内に囲みます。caseラベルが生成する値をyield文で指定します。

      良い例:

      java
      var date = LocalDate.now();
      +switch (date.getDayOfWeek()) {
      +    case MONDAY -> {
      +        if (
      +            !myCalendar.isOff(date) && !localCalendar.isHoliday(date) &&
      +            !localCalendar.isHoliday(date.minusDays(1))
      +        ) {
      +            work();
      +        }
      +    }
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> {
      +        if (!myCalendar.isOff(date) && !localCalendar.isHoliday(date)) {
      +            work();
      +        }
      +    }
      +}

      悪い例:

      java
      var date = LocalDate.now();
      +switch (date.getDayOfWeek()) {
      +    case MONDAY:
      +        if (
      +            !myCalendar.isOff(date) && !localCalendar.isHoliday(date) &&
      +            !localCalendar.isHoliday(date.minusDays(1))
      +        ) {
      +            work();
      +        }
      +        break;
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY:
      +        if (!myCalendar.isOff(date) && !localCalendar.isHoliday(date)) {
      +            work();
      +        }
      +        break;
      +}
    • アロー構文を使用しない(コロンを使用する)場合、複数の値をマッチさせるときの case 句はカンマを使用して列挙する
      良い例:

      java
      var day = DayOfWeek.SUNDAY;
      +boolean off = false;
      +switch (day) {
      +    case SUNDAY, SATURDAY:
      +      off = true;
      +      break;
      +};

      悪い例:

      java
      var day = DayOfWeek.SUNDAY;
      +boolean off = false;
      +switch (day) {
      +    case SUNDAY:
      +    case SATURDAY:
      +      off = true;
      +      break;
      +};

    コレクション

    • Java2 以降のコレクションクラスを利用する
      Vector クラス、Hashtable クラス、Enumeration 等は、特にこれらを利用する理由がなければ、インターフェースを統一する目的で、これらの代わりにList(ArrayList クラス)、Map(HashMap クラス)、Iterator を使用すること。List などのインターフェースを利用することで JDK1.2 で整理されたわかりやすいメソッドを利用でき、また、インターフェースの特性から呼び出し元を変更せずに実装クラスを変更することができる。

    • 特定の型のオブジェクトだけを受け入れるコレクションクラスを利用する

      良い例:

      java
      List<Map<String, String>> list = new ArrayList<>();
    • ListのソートはList.sort()を利用する
      Listクラスの要素をソートする際は Java8 で追加されたList.sort()を利用すること。
      Java 7 以前で利用されていたCollections.sort()は利用しないこと。

    • Collection.forEach()は利用しない。拡張 for 文の利用を検討する
      Java8 で追加されたメソッド。
      拡張 for 文を利用したほうが多くの場合でデバッグに有利であり、可読性においてもforEachの優位性は少ないため、forEachは原則利用しない。拡張 for 文を利用する。
      具体的には下記のメソッドを利用しないこと。

      • Collection#forEach
      • Set#forEach
      • List#forEach

      Map#forEachはこの限りではない

      良い例:

      java
      for (String s : List.of("A", "B")) {
      +    //処理
      +}

      悪い例:

      java
      List.of("A", "B").forEach(s -> {
      +    //処理
      +});

      ただし、メソッド参照で処理できる場合はforEachを利用する。
      (デバッグのデメリットがほとんどなく、他と比較して処理効率が良いため)

      良い例:

      java
      List.of("A", "B").forEach(this::process);

      悪い例:

      java
      for (String s : List.of("A", "B")) {
      +    this.process(s);
      +}
    • Arrays.asList()は利用せず、List.of()を利用する
      Java9 で追加されたメソッド。
      配列をListに置き換える場合や、単純な固定のListを生成する際にはList.of()を利用する。

      • Arrays.asList()List.of()の違い
        List.of()で生成したListは、完全に不変(Immutable)なListで、
        Arrays.asList()で生成したListは、サイズのみ不変で、set等による値の操作が可能なListです。
        また、setを行った場合、Arrays.asList()に与えられた配列インスタンスにも影響します。

    ラムダ式・メソッド参照・コンストラクタ参照

    • ラムダ式が利用できる箇所はラムダ式を利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • ただし、メソッド参照・コンストラクタ参照が利用できる場合はメソッド参照・コンストラクタ参照を利用する

      良い例:

      java
      String::compareToIgnoreCase

      悪い例:

      java
      (s1, s2) -> s1.compareToIgnoreCase(s2)

      良い例:

      java
      BigDecimal::add

      悪い例:

      java
      (b1, b2) -> b1.add(b2)
    • ラムダ式記述の際、型宣言は省略記法で記述する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (String s1, String s2) -> s1 + "=" + s2
    • 原則ラムダ式内の行数は 1 行とする
      複数行で利用したい場合は、privateメソッドを作成しメソッド参照を利用する

      良い例:

      java
      this::getMax
      +
      +private int getMax(int i1, int i2) {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}

      悪い例:

      java
      (i1, i2) -> {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}
    • 原則ラムダ式は 1 行記述に限定するので、中カッコ、returnは必ず省略する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (s1, s2) -> {
      +    return s1 + "=" + s2;
      +}

    実質的 final(effectively final)

    • 実質的 final を利用する
      変数宣言にfinalを記載しなくてよい。

    Stream API

    • 利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • 並列ストリームは利用しないこと
      悪い例:

      java
      Stream<?> s = list.parallelStream();
      +Stream<?> s = list.stream().parallel();
    • StreamAPI 記述の際の改行位置は、各中間処理・末端処理前のピリオドの前で改行する

      良い例:

      java
      List<Character> alphabetLower = list.stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .toList();

      悪い例:

      java
      List<Character> alphabetLower = list.stream().filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase).toList();
      +
      +List<Character> alphabetLower = list
      +    .stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .toList();
    • インデントは統合開発環境の提供するフォーマッタに合わせる

    • 中間処理の数は 3 つ(3 行)程度までを推奨する
      中間処理の記述が多くなると可読性も悪くなり、デバッグも難しくなるため、3 行程度を目安にロジックを検討すること。

    • コメントは、原則として処理中には記載しない
      難解になってしまった場合のみ処理中の記載を認める

      良い例:

      java
      // クラスFooのフィールドStrの値で昇順にソートし、フィールドStrの要素を取得して処理する。
      +fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    .map(Foo::getStr)
      +    .forEach(this::proc);

      悪い例:

      java
      fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr)) //クラスFooのフィールドStrの値で昇順にソート
      +    .map (Foo::getStr) //フィールドStrの要素を取得
      +    .forEach(this::proc); //処理
      +
      +
      +fooList.stream()
      +    //クラスFooのフィールドStrの値で昇順にソート
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    //フィールドStrの要素を取得
      +    .map (Foo::getStr)
      +    //処理
      +    .forEach(this::proc);
    • Stream は極力変数代入しないこと
      Stream は中間処理、末端処理を行うと使用済みとなり、以降同じインスタンスは利用できない。
      変数代入はほとんどの場合意味をなさず、むしろミスの元となるため極力変数代入はしないこと。

      良い例:

      java
      List<String> list1 = Stream.of("A", "B", "C")
      +        .map(String::toLowerCase)
      +        .toList();
      +
      +List<String> list2 = Stream.of("A", "B", "C")
      +        .map(s -> s + s)
      +        .toList();

      悪い例:

      java
      Stream<String> stream = Stream.of("A", "B", "C");
      +Stream<String> stream1 = stream.map(String::toLowerCase);
      +List<String> list1 = stream1.toList();
      +
      +Stream<String> stream2 = stream.map(s -> s + s);//コーディングミス streamは使用済のためエラーになる
      +List<String> list2 = stream2.toList();

    Optional

    • Optional は同メソッド内で値を取り出す場合は極力変数代入しないこと
      Optional とその値の変数は同じものを示す名前となり、同じ意味の変数名が複数現れることで可読性が下がるため、Optional の変数代入は行わないこととする。

      良い例:

      java
      Employee employee = findEmployee(employeeId)
      +        .orElseThrow(IllegalArgumentException::new);

      悪い例:

      java
      Optional<Employee> employeeOpt = findEmployee(employeeId);
      +Employee employee = employeeOpt.orElseThrow(IllegalArgumentException::new);

      直接、値を取り出すことなくOptionalでのみ扱う場合はOptionalを変数代入してもよい。

      良い例:

      java
      Optional<Employee> employee = findEmployee(employeeId);
      +
      +Dept dept = employee.map(Employee::getDivision)
      +        .map(Division::getDept)
      +        .orElse(null);
      +
      +Role role = employee.map(Employee::getRole)
      +        .orElse(null);
      +
      +//-----
      +
      +Optional<Employee> employee = findEmployee(employeeId);
      +//・・・処理
      +return employee;

    var (Local-Variable Type Inference)

    次のリンクも参考にしてください。
    Style Guidelines for Local Variable Type Inference in Java

    • 明確な方針で、利用する・利用しないを統一すること
      方針無く、varを混在させるとソースコードの見通しと保守性が悪くなります。
      各プロジェクトで、例えば以下ののような方針で統一してください。

      1. varを利用しない
      2. 原則varを利用する
      3. 右辺で、明確に型がわかる場合はvarを利用する

      以下で23について例を示します。

      • 原則varを利用する

        利用できる箇所は全てvarを利用します。

        良い例:

        java
        var a = "";
        +var b = 123;
        +var c = new ArrayList<String>();

        悪い例:

        java
        var a = "";
        +int b = 123;
        +List<String> c = new ArrayList<>();
        java
        void methodA() {
        +    var a = "";
        +}
        +void methodB() {
        +    String a = "";
        +}
      • 右辺で、明確に型がわかる場合はvarを利用する

        右辺をみて型がわかる場合は、全てvarを利用します。 それ以外はvarを利用してはいけません。

        良い例:

        java
        var s = ""; // リテラルによって型が明確に判断できます
        +var list1 = new ArrayList<String>(); // newによって型が明確に判断できます
        +var list2 = (List<String>) map.get("p"); // キャストによって型が明確に判断できます
        +var list3 = List.of("A", "B", "C"); // ファクトリーによって型が明確に判断できます

        プロジェクトで観点を決めるべき例:

        java
        var b1 = s.isEmpty(); // \`is\`で始まるメソッドは通例としてbooleanを返します
        +var b2 = Objects.equals(s1, s2); // \`equals\`メソッドは通例としてbooleanを返します
        +var i1 = Objects.hash(s); // \`hash\`、\`hashCode\`メソッドは通例としてintを返します
        +var i2 = Objects.compare(s1, s2); // \`compare\`、\`compareTo\`メソッドは通例としてintを返します

        悪い例:

        java
        var a = e.getData(); // \`e\`の型と、メソッド定義がわからなければ型が判断できません

    レコード

    • 明確な方針で、利用する・利用しないを統一すること
      方針無く、recordとクラスと JavaBeans 形式のクラスや Lombok の @Data の使用を混在させるとソースコードの見通しと保守性が悪くなります。
      各プロジェクトで、recordを利用しないか、recordの使用しても良い箇所について方針を決めた上で使用するようにしてください。 また、recordは JavaBeans とは互換性がないため使用している各種ライブラリの対応状況にも注意する必要があります。

      方針例: クラス内で処理する一時的なデータを表現するためだけにrecordを使用しても良い。

      java
      // parentId と id をキーとして、重複を排除した uniqueItems を作成します。
      +record Key(int parentId, int id) {
      +}
      +var map = new HashMap<Key, Item>();
      +for (Item item : items) {
      +  var key = new Key(item.getParenId(), item.getId());
      +  map.putIfAbsent(key, item);
      +}
      +var uniqueItems = map.values();
    • 次の記述スタイルを標準とする
      ただし、フォーマッタを導入している場合はフォーマッタに合わせます。

      良い例:

      java
      /**
      + * 矩形を表すクラス
      + *
      + * @param x      矩形の左上隅の x 座標
      + * @param y      矩形の左上隅の y 座標
      + * @param width  矩形の幅
      + * @param height 矩形の高さ
      + */
      +public record Rect(
      +    /* 矩形の左上隅の x 座標 */
      +    double x,
      +    /* 矩形の左上隅の y 座標 */
      +    double y,
      +    /* 矩形の幅 */
      +    double width,
      +    /* 矩形の高さ */
      +    double height) {
      +}

      次にポイントを説明します。

      • {の後、}の前に改行する

      • レコードコンポーネント(パラメータ)のカンマの後に改行することを推奨する
        レコードコンポーネントが少なく、レコードコンポーネント名からでも意味が理解でき、改行がなくても可読性が低下しない場合は、改行を必要としません。
        改行を推奨する理由は以下です。

        • アノテーションを付与したときでも比較的読みやすい(アノテーション引数との混在による可読性の低下の回避)
        • レコードコンポーネントが多い場合も比較的読みやすい
      • レコードコンポーネントが多い場合、レコードコンポーネントへ直接コメントをつけることを検討する
        レコードコンポーネントの JavaDoc としては@param形式でレコード名の上部に記述しますが、このソースコードをテキストとしてみた場合、レコードコンポーネントの定義と@paramの説明とで距離が空いてしまう場合があり、型と説明を読むのに時間がかかってしまう可能性があります。
        また、使用する IDE によっては、アクセサから宣言へのジャンプを使用すると、レコードコンポーネント(パラメータ)の定義へジャンプするものがあります。レコードコンポーネントにコメントがあればすぐに説明を読むことができますが、JavaDoc しか記述しない場合は、ファイル上部へ移動して対応するレコードコンポーネントの説明を探さなければなりません。

        java
        public record Rect(
        +    /* 矩形の左上隅の x 座標 */
        +    double x,
        +    /* 矩形の左上隅の y 座標 */
        +    double y,
        +    /* 矩形の幅 */
        +    double width,
        +    /* 矩形の高さ */
        +    double height) {
        +}
    • レコードのアクセサを上書きしない

      悪い例:

      java
      public record Rect(
      +    double x,
      +    double y,
      +    double width,
      +    double height) {
      +
      +    public double x() {
      +        return x;
      +    }
      +}

    テキストブロック

    次のリンクも参考にしてください。
    Programmer's Guide To Text Blocks > Style Guidelines For Text Blocks

    • 複数行の文字列を定義する際、文字列連結よりもテキストブロックを使用する

      良い例:

      java
      String message = """
      +        複数行の文字列はテキストブロックを使用しましょう。
      +        文字列連結と違い、プラス記号や改行コードのエスケープシーケンスのような無駄を排除でき、
      +        より読みやすいソースコードで書くことができます。
      +        """;

      悪い例:

      java
      String message =
      +        "複数行の文字列はテキストブロックを使用しましょう。\\n" +
      +        "文字列連結と違い、プラス記号や改行コードのエスケープシーケンスのような無駄を排除でき、\\n" +
      +        "より読みやすいソースコードで書くことができます。\\n";
    • 単一行の文字列を定義する際、テキストブロックは使用せず文字列リテラルを使用する
      ただし、二重引用符(")のエスケープを避ける目的ではテキストブロックを使用しても良い。

      良い例:

      java
      String singleLine = "単一行の文字列です。";
      +
      +String message = """
      +        テキストブロックでは単一の二重引用符「"」にエスケープを使用する必要がありません。""";

      悪い例:

      java
      String singleLine = """
      +        単一行の文字列です。""";
    • テキストブロック内では基本的に改行コードのエスケープシーケンス(\\n)を使用しないが、読みやすさ向上の目的で改行コードのエスケープシーケンス(\\n)を使用しても良い

      良い例:

      java
      String multiLine = """
      +        複数行の、
      +        文字列です。
      +        """;
      +
      +String csv = """
      +        名前,説明,MIMEタイプ
      +        CSV,"Comma-Separated Valuesの略\\nCharacter-Separated Valuesの意味で使用されることもある","text/csv"
      +        TSV,"Tab-Separated Valuesの略","text/tab-separated-values"
      +        """;

      悪い例:

      java
      String multiLine = """
      +        複数行の、\\n文字列です。
      +        """;
    • テキストブロックで定義した文字列を処理する場合は、テキストブロックをローカル変数やフィールドへ代入してから使用することを推奨する

      良い例:

      java
      String selectX = """
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_X
      +        """;
      +String selectY = """
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_Y
      +        """;
      +processValues(fetch(selectX, Entity1.class), fetch(selectY, Entity2.class));

      悪い例:

      java
      processValues(fetch("""
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_X
      +        """, Entity1.class), fetch("""
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_Y
      +        """, Entity2.class));

      複雑な処理に直接テキストブロックを使用すると可読性を下げる可能性があります。

    • 3 つ以上続く二重引用符(")をエスケープする際は、最初の二重引用符にエスケープシーケンスを使用する

      良い例:

      java
      String javaCode = """
      +        String message = \\"""
      +                テキストブロックです。
      +                \\""";
      +        System.out.println(message);
      +        """;

      悪い例:

      java
      String javaCode = """
      +        String message = \\"\\"\\"
      +                テキストブロックです。
      +                \\"\\"\\";
      +        System.out.println(message);
      +        """;
      +
      +String javaCode = """
      +        String message = ""\\"
      +                テキストブロックです。
      +                ""\\";
      +        System.out.println(message);
      +        """;
    • テキストブロックの開始引用符(""")は前の行の右端に記述する

      良い例:

      java
      String message = """
      +        テキストブロックです。
      +        """;

      悪い例:

      java
      String message =
      +        """
      +        テキストブロックです。
      +        """;
    • テキストブロックのインデントは開始引用符(""")に合わせる必要はない

      良い例:

      java
      String message = """
      +        テキストブロックです。
      +        """;

      悪い例:

      java
      String message = """
      +                 テキストブロックです。
      +                 """;

      一見すると、読みやすく見えるかもしれませんが、変数名の変更によって簡単に崩れてしまい、修正するために多くの行の変更を強制することになるため、メンテナンス性が低下します。

    • テキストブロックで定義する文字列のインデントは基本的に周辺の Java コードに合わせてインデントする
      ただし、横に長い文字列などの可読性向上の目的で左端に揃えるのは良い。

      良い例:

      java
      public class Foo {
      +    public void process() {
      +        String message = """
      +                テキストブロックです。
      +                """;
      +    }
      +}

      悪い例:

      java
      public class Foo {
      +    public void process() {
      +        String message = """
      +    テキストブロックです。
      +    """;
      +    }
      +}

      良い例:

      java
      public class Foo {
      +    public void process() {
      +        if (foo) {
      +            String message = """
      +それはもう長い長いテキストブロックのためインデントするとエディタ上でテキストを見るためには横スクロールが必要になるかもしれません。
      +""";
      +        }
      +    }
      +}

      悪い例:

      java
      public class Foo {
      +    public void process() {
      +        if (foo) {
      +            String message = """
      +                    それはもう長い長いテキストブロックのためインデントするとエディタ上でテキストを見るためには横スクロールが必要になるかもしれません。
      +                    """;
      +        }
      +    }
      +}
    • テキストブロックのインデントにスペース文字とタブ文字を混在させない

    • 文字列の最後に改行コードを入れずに、意図的にインデントした文字列を定義するとき終了引用符(""")の前の行の右端に\\を使用する

      良い例:

      java
      String text = """
      +            ABC
      +            DEF
      +            GHI\\
      +        """;

      悪い例:

      java
      String text = """
      +        ABC
      +        DEF
      +        GHI""".indent(4);

    ストリーム(InputStream OutputStream)

    • ストリームを扱う API を利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • ObjectOutputStream ではreset()を利用する

    リソースの解放

    • リソース解放を必要とするクラスを利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • リソース解放を必要とするクラスを作成する場合はAutoCloseableimplementsする
      AutoCloseableimplementsすることで try-with-resources 文が利用できるようになります。

    例外

    • catch 文で受け取る例外は、詳細な例外クラスで受け取る

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (IOException e) {
      +    log.error("Error", e);
      +    throw e;
      +}

      悪い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (Exception e) {//範囲が広すぎる例外クラスの利用はNG
      +    log.error("Error", e);
      +    throw e;
      +}
    • Exception クラスのオブジェクトを生成してスローしない

    • catch ブロックでは基本、例外処理をする。ただし処理を書いてはいけない部分もあるので、その部分については、"// ignore" というコメントを記述すること。

    • 例外クラスは無駄に定義しない

    ガベージコレクション

    • 原則finalize()のオーバーライド実装は禁止
    • もしfinalize()をオーバーライドした場合はsuper.finalize() を呼び出す
    • アプリケーションからfinalize()を呼び出さない

    コメント規約

    よいコメントの鉄則

    • コードを明確化するコメントを書く
      コードにコメントを書く理由は、自分自身、一緒に仕事をしている人、後に関わる開発者にとってコードをより理解しやすいものにするためである。

    • コメント化する価値がないプログラムならば、実行するに値しない
      有用な格言。コメントは必須。

    • 過剰な装飾は使わない (例:見出し状のコメント)
      1960 年代から 1970 年代の典型的な COBOL プログラマにはアスタリスク( * )でコメントを囲った箱を書く習慣があった。彼らの芸術的な主張を表わしているのかもしれないが、率直に言えばそれは製品に加わるちょっとした価値に比べれば大きな時間の無駄である。かわいいコードではなくきれいなコードを書くはずである。さらに、コードを表示するディスプレイや印刷するプリントに使われるフォントはプロポーショナルだったりそうでなかったりして、箱をきれいに整列させることは難しい。

    • コメントはシンプルに
      かつて見たもっとも最良のコメントは、シンプルな要点をまとめた注釈であった。なにも本を書く必要はなく、他の人がコードを理解するに十分な情報を提供するだけでよいのである。

    • コードを書く前に先にコメントを記述する
      コードをコメント化する最良の方法は、コードを書く前にコメントを書くことである。それが、コードを書く前にコードがどのように動作するかについて考えるよい機会となり、コメントの存在を保障することにもつながる。少なくともコードを書いた時にコメントすべきである。コメントによってコードが理解しやすくなることで、コードの開発中にアドバンテージを得ることができる。コードにコメントを書く時間を費やせば、それによって得られるものがある。

    • コメントには、なぜそうなのかを書く。コードを読めば分かることを書かない
      基本的に、コードの一部分を見ればそれが何かを理解することはできる。例えば、以下のコードを見て、$1000 以上の注文については 5%ディスカウントされることは理解できる。なぜそうなのか?大きな注文ではディスカウントがつきものだというビジネスルールがあるのだろうか?大きな注文に時間限定サービスがあるのか、それともずっとサービスがあるのか?これを書いたプログラマの気前がよかったのか?
      どこかソースコード中か別な文書にコメントされていない限り、それがなぜなのかを知ることはできない。

      java
      if (grandTotal >= 1000.00) {
      +    grandTotal = grandTotal * 0.95;
      +}

      なお、メソッドコメントには、適切な javadoc コメント(タグ)のほかに、以下の内容も可能な限り明記すること。

      • 副作用のある処理の場合は、その内容 (→ メソッドの引数オブジェクトがメソッド内で変更されるケースなど)
      • 既知のバグ (→ 判明しているが修正しないことにした場合など)
      • 影響のある事前条件、事後条件 (→ メソッドが正しく動作するための前提について)
      • 並行性 (→  マルチスレッドでアクセスされた場合の動作について)
      • 該当メソッドの使用例やサンプルコード
    • TODO コメント
      設計者確認待ち、共通処理の作成待ちなどの理由により、実装時に TODO がある場合、下記のようにコメントを記述する。
      (Eclipse の TODO コメント形式を採用)
      例)

      //TODO:ワークフローの仕様決定待ち 関連チケット#12345

    Java コメント(3 種類)の使い分け

    Java では 3 種類のコメントが使える。javadoc コメントは/**で開始され、*/で終わる。C 風コメントは/*で開始され*/で終わる。単一行コメントは//で開始され、そのソースコード行が終わるまで続く。以下の表ではコメントの使い方とその例を示す。(コメントのスタイルに関しては、前述の「標準規約に準拠したコーディング例」を参照)

    コメント種類使用方法
    javadoc コメント
    /** comment */
    interface、class、メソッド、フィールドの直前に書く。コメントは javadoc によって処理され、外部ドキュメント(HTML)として生成される。(この形式以外のコメントはドキュメントとして出力されないことに注意)/*_
    _ 顧客(Customer)-
    _ 顧客はわれわれがサービスまたは製品を売った人物
    _ もしくは組織のいずれかである。
    _ @author 開発太郎
    _/
    C 風コメント
    /* comment */
    特定のコードを無効化したいが、後で使用するかもしれないので残しておくためにコメント化する時や、デバッグ時に一時的に無効化するときに使用する。/_
    このコードは J.T.Kirk によって 1997.12.9 に前述のコードと置き換えたためコメント化した。2 年間不要であるならば削除せよ。
    ... (ソースコード)
    _/
    単一行コメント
    // comment
    メソッド内にて、ビジネスロジック、コードの概要、一時変数の定義内容などを記述する。// 1995 年 2 月に開始された X 氏の寛大なキャンペーンで
    // 定められた通り 1000$を超える請求には、全て 5%割引を
    // 適用する。

    ※ ロジック中に、頻繁に C 風コメントでコメントを書くとまとめてコメントアウトする場合に不便なため、基本的にロジック中では単一行コメントを利用すること。

    パフォーマンス

    パフォーマンスを考慮した Java のコーディングについて以下に示す。

    ※ パフォーマンスは jre のバージョンやスペックによって変化します。本内容は jre1.8.0_74 での検証結果を元にした内容です。

    ※ 性能計測結果についての記載がありますが、あくまでも参考値です。性能を保証するものではありません。

    Stream API

    Java8 で追加された Stream API での記述は、可読性も高く、簡潔に書けますが、パフォーマンス・性能面で注意が必要な場合があります。

    List の処理を行う際、拡張 for 文で処理する場合は Iterator インスタンスが 1 つだけ生成されますが、Stream API で処理する場合、最初の Stream インスタンスに加え、各中間処理ごとにも Stream インスタンスが生成され、その分の性能劣化が懸念されます。
    以下に処理例と計測結果を記載します。

    • 拡張 for 文

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = new ArrayList<>();
      +for (String string : list) {
      +    if (string.endsWith("0")) {
      +        resultList.add(string);
      +    }
      +}
      +return resultList;
    • Stream API

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = list.stream()
      +    .filter(s -> s.endsWith("0"))
      +    .toList();
      +return resultList;
    • 計測結果

      処理する List の件数拡張 for 文 (ms)StreamAPI (ms)
      100 万件79
      1,000 万件88114
      1 億件9491,026
      2 億件1,8222,081

    小中規模の処理量であれば考慮するほどの性能差はありませんが、大量の処理が見込まれる場合は考慮が必要です。
    また、Stream API は並列処理(スレッド処理)の機能をサポートしていますので、利用できる場合は並列処理も含めての検証が必要です。

    ラムダ式・メソッド参照・コンストラクタ参照

    Java8 で追加されたラムダ式・メソッド参照・コンストラクタ参照は、匿名クラスを利用するよりも効率的です。
    積極的な利用を推奨します。

    以下に Comparator を生成した場合の計測結果を記載します。

    • 匿名クラス

      java
      Comparator<String> c = new Comparator<String>() {
      +    @Override
      +    public int compare(String o1, String o2) {
      +        return o1.compareToIgnoreCase(o2);
      +    }
      +};
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> o1.compareToIgnoreCase(o2);
    • メソッド参照

      java
      Comparator<String> c = String::compareToIgnoreCase;
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)メソッド参照 (ms)
      10 億回3800(計測不能)0(計測不能)
      100 億回6,3740(計測不能)0(計測不能)
      1 京回(30 秒以上)1410

    ラムダ式は外部の変数を利用する場合、匿名クラスとほぼ同じ動作をします。

    • 匿名クラス

      java
      new Comparator<String>() {
      +        @Override
      +        public int compare(String o1, String o2) {
      +            return arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                            : o1.compareToIgnoreCase(o2);
      +        }
      +    }
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                    : o1.compareToIgnoreCase(o2);
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)
      10 億回(パラメータあり)571572
      100 億回(パラメータあり)9,9009,864

    文字列連結

    文字列連結(繰り返し)

    文字列連結を繰り返し処理中で行う際、+演算子で処理することはアンチパターンとして知られています。
    繰り返し処理中の文字列連結は、 StringBuilderStringJoinerStringBuffer を利用します。
    また、コレクション要素の結合であればString#joinが利用できます。

    以下に処理例と計測結果を記載します。

    • +演算子

      java
      String s = "";
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        s += ",";
      +    }
      +    s += string;
      +}
      +return s;
    • StringBuilder

      java
      StringBuilder sb = new StringBuilder();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • StringBuffer

      java
      StringBuffer sb = new StringBuffer();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • String#join

      java
      return String.join(",", list);
    • 計測結果

      処理する List の件数+演算子 (ms)StringBuilder (ms)StringBuffer (ms)String#join (ms)
      1,000 件50(計測不能)0(計測不能)0(計測不能)
      1 万件1,016111
      10 万件(30 秒以上)255
      100 万件(30 秒以上)294251

    文字列連結(定数)

    基本的に処理中の文字列連結では+演算子は使わないで処理するほうがパフォーマンスが高くなりますが、定数の場合は+演算子で定義するほうがパフォーマンスが高いです。

    たとえば以下のように、処理したい場合、

    java
    private static final String CONST_A = "A";
    +private static final String CONST_B = "B";
    +private static final String CONST_AB = CONST_A + CONST_B;

    StringBuilder で処理しようとすると以下のようになります。

    java
    private static final String CONST_AB = new StringBuilder(CONST_A).append(CONST_B).toString();

    しかし、これらをバイトコード上で確認するとそれぞれ以下のようになります。

    • +演算子

      java
      private static final java.lang.String CONST_AB = "AB";
    • StringBuilder

      java
      private static final java.lang.String CONST_AB;
      +
      +static {};
      +   0  new java.lang.StringBuilder [20]
      +   3  dup
      +   4  ldc <String "A"> [8]
      +   6  invokespecial java.lang.StringBuilder(java.lang.String) [22]
      +   9  ldc <String "B"> [11]
      +  11  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [26]
      +  14  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [30]
      +  17  putstatic jp.co.packagename.ClassName.CONST_AB : java.lang.String [34]
      +  20  return

    +演算子を利用した場合コンパイル時に最適化され、文字列"A""B"をあらかじめ結合して class が作成されます。
    StringBuilderを利用した場合は最適化はされず、記述した通りの処理が行われます。

    計測した場合、下記のようになります。

    • 計測結果

      処理回数StringBuilder (ms)+演算子 (ms)
      5,000 万回5590(計測不能)
      1 億回1,0590(計測不能)

    通常、定数処理を大量に処理することは考えられないので性能問題になることはありませんが、+演算子を利用したほうがパフォーマンスが高いこともあるということを理解してください。

    List の種類

    ListにはArrayListのようなRandomAccessを implements した、ランダムアクセスをサポートしているクラスと、
    LinkedListのようなランダムアクセスをサポートしていない(シーケンシャルアクセス)クラスが存在します。
    RandomAccessではないListは、List#getなどインデックスを利用するような操作のパフォーマンスが低いので注意してください。

    以下に処理例と計測結果を記載します。

    • for 文(List#get(int)によるループ)

      java
      int size = list.size();
      +for (int i = 0; i < size; i++) {
      +    String s = list.get(i);
      +    //処理
      +}
    • 拡張 for 文

      java
      for (String s : list) {
      +    //処理
      +}
    • forEach

      java
      list.forEach(this::処理);
    • 計測結果

      処理する List の件数ArrayList
      for 文(List#get(int)によるループ) (ms)
      LinkedList
      for 文(List#get(int)によるループ) (ms)
      ArrayList
      拡張 for 文 (ms)
      LinkedList
      拡張 for 文 (ms)
      ArrayList
      forEach (ms)
      LinkedList
      forEach (ms)
      1 万件0(計測不能)730(計測不能)0(計測不能)0(計測不能)0(計測不能)
      10 万件0(計測不能)7,5760(計測不能)0(計測不能)12
      20 万件0(計測不能)17,7400(計測不能)0(計測不能)0(計測不能)0(計測不能)
      50 万件0(計測不能)(30 秒以上)0(計測不能)20(計測不能)2
      100 万件1(30 秒以上)0(計測不能)40(計測不能)4
      1,000 万件16(30 秒以上)845644

    ランダムアクセスをサポートしているListがシーケンシャルアクセス(iterator を利用した処理など)で遅いということはないので、
    ループの処理は拡張 for 文等、Iterator によるループで記述するのが無難です。
    List#getでの処理をすべて禁止することはできませんが、高いパフォーマンスが求められる場合はListの種類にも注目してみてください。

    BigDecimal の ZERO との比較

    BigDecimal の正・負・ZERO の判定はBigDecimal#signumを利用します。
    compareToを利用してBigDecimal.ZEROと比較しても同じことができますが、signumを利用したほうが効率的です。

    以下に処理例と計測結果を記載します。

    • compareTo 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.compareTo(BigDecimal.ZERO) == 0) {
    • signum 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.signum() == 0) {
    • 計測結果

      (単位:マイクロ秒)

      処理回数compareTo 利用 (マイクロ秒)signum 利用 (マイクロ秒)
      1 京回527
      max:26,367
      min:0
      424
      max:21,213
      min:0

    性能差が少ないので、必ずしも signum を利用する必要はありませんが、大量に処理する場合など、高いパフォーマンスが求められる場合は意識してください。


    License

    CC-By-4.0

    `,168))])}const b=a(h,[["render",k]]);export{o as __pageData,b as default}; diff --git "a/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.md.BwEbWD0S.lean.js" "b/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.md.BwEbWD0S.lean.js" new file mode 100644 index 00000000..626acba1 --- /dev/null +++ "b/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.md.BwEbWD0S.lean.js" @@ -0,0 +1,761 @@ +import{_ as a,c as n,G as l,a3 as p,B as e,o as t}from"./chunks/framework.BDUoXecB.js";const o=JSON.parse('{"title":"Javaコーディング規約","description":"","frontmatter":{"sidebarDepth":4,"title":"Javaコーディング規約","author":"Future Enterprise Coding Standards","head":[["meta",{"name":"keywords","content":"Javaコーディング規約,Java17,コーディング規約,Java"}]]},"headers":[],"relativePath":"documents/forJava/Javaコーディング規約.md","filePath":"documents/forJava/Javaコーディング規約.md"}'),h={name:"documents/forJava/Javaコーディング規約.md"};function k(r,s,d,E,g,c){const i=e("page-title");return t(),n("div",null,[l(i),s[0]||(s[0]=p(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    一般に利用・参照されている Java コーディング規約やガイドラインを以下に示す。本規約の作成においても、下記規約類を参照・抜粋している。

    規約著作者URL
    Code Conventions for the Java Programming LanguageSun Microsystemshttp://www.oracle.com/technetwork/java/codeconvtoc-136057.html
    Writing Robust Java CodeScott W. Amblerhttp://www.ambysoft.com/downloads/javaCodingStandards.pdf
    オブジェクト倶楽部版 Java コーディング標準オブジェクト倶楽部http://objectclub.jp/community/codingstandard/CodingStd.pdf
    電通国際情報際サービス版 Java コーディング規約 2004電通国際情報サービスhttp://objectclub.jp/community/codingstandard/JavaCodingStandard2004.pdf
    JJGuideline (Java - J2EE Conventions and Guidelines)Stephan.J & JCS Teamhttp://www.fedict.belgium.be/sites/default/files/downloads/Java_J2EE_conventions_and_guidelines_EN.pdf
    Google Java Style (非公式和訳)Googlehttps://kazurof.github.io/GoogleJavaStyle-ja/
    Acroquest Technology Java コーディング規約Acroquest Technologyhttps://www.acroquest.co.jp/webworkshop/javacordingrule/Acroquest_JavaCodingStandard_6_7.pdf
    ※現在は削除されています

    ※ Sun Microsystems の規約は Java 草創期から一応の標準という位置づけだったが、オブジェクト指向、及び、その開発環境の普及・発展によって、設計やコーディングにおいて、直接的に有用な知識や豊富な指針を含むような優れた規約や、ツールなどによる機械的な準拠チェックと連携する規約が普及してきている。

    規約の重要性

    標準としての規約を定義し、遵守することの重要性を以下に示す。

    • ソフトウェアメンテナンスにおける、可読性・保守性・拡張性の向上
    • 問題を起こしやすい実装を未然に回避することによる、品質・生産性の向上
    • 標準規約を通して得られる一般的な実装知識やノウハウ(=学習効果)

    コーディングの心得

    長いプログラムを記述すること(ステップ数)によって生産性が評価されたのは、過去の時代の出来事である。現在は、クラスやメソッドの役割が明確で、ロジックが読みやすく、保守性に優れたプログラムを記述することが評価される。コーディング規約は、コードの書き方に関する一種のパターンと考えることもでき、コードの保守性を向上させる具体的な方法を示している。したがって、規約の一つ一つの意図を理解し、守ることが重要になる。しかし、保守性に優れたコードを作成するためには、コーディング規約を守ることに加えて、良いコードを記述するための基本的な心構えをしっかり心に留めておく必要がある。以下では、その心得について述べる。

    【コーディングの心得 5 か条】

    1. 見やすさを重視せよ
    2. ネーミングはわかりやすく
    3. サンプルを鵜呑みにしない
    4. 同じコードを二度書かない
    5. 役割は一つに

    見やすさを重視せよ

    「良いコード」の基本は、「他の人が読んでもわかりやすいと感じられるコード」。コードの見やすさは、フォーマットはもちろん、ロジックの簡潔さや API の常識的な使い方などから生まれる。コーディングにあたっては、常に他の人の視点を意識しながら、見やすさに気を配って記述する必要がある。例えば、自分で記述したコードであっても、しばらくたってから読み返してみると理解に時間がかかった経験は誰にもあるはず。「3 日前に書いたコードは他人のコードと同じ」ということもよく言われる。見やすさを重視することは、他の人のためだけでなく自分のためにもなる。コードを読んでもすぐに理解できないような実装は、再考(リファクタリング)の必要がある。

    ネーミングはわかりやすく

    コーディングでは、様々な変数やメソッドなどにネーミング(名前付け)する必要がある。ネーミングとは、本来、その対象の本質を表すような名前を考える作業である。大変難易度の高い作業だが、一方で適当に行ってもコードの動作は変わらないため、人によっては手を抜きがちとなる。しかし、ネーミングの良し悪しは、コードの可読性に非常に大きな影響を及ぼす。例えば、「C0001」というクラス名があるとする。これでは、何を表すクラスなのかすぐにはわからないだろう。また、「int p = 5000;」という記述があるとする。プログラマに聞くと、変数名 p は価格(Price)の略だと言うのだが、それならば略さずに、「int price = 5000;」としたほうが分かりやすいはずである。「ネーミングはわかりやすく」の背景には、読んで内容が理解できるという意味で、文章のようなプログラミングを行う、という考え方に基づく。

    サンプルを鵜呑みにしない

    サンプルコードを活用すること自体は、著作権等を侵害しなければ問題ない。問題なのは、その内容や背景を理解しないまま、サンプルコードだけを鵜呑みにして、「おまじない」として表面的に適用してしまうことである。コードを「おまじない」ととらえていては、サンプルコードの間違いを気づかないまま適用してしまうこともある。例えば、ストリームのクローズ処理を行っていないサンプルコードであっても、それに気づかずに自分のコードに適用してしまい、後で思わぬ障害を引き起こすという可能性がある。サンプルコードは、そこで説明する内容に絞ったコードが多いため、このような例はよく見られる。また、サンプルコードをそのまま適用した結果、自分が記述すべきコードには必要のないコードが含まれてしまう場合もある。その場合、コードの可読性を下げる原因となる。自分のコードは、自分で深く理解して記述すべきである。

    同じコードは二度書かない

    コードをコピー・ペーストしていませんか?コピー・ペーストしてしまうと、何らかの修正をする際に、全ての個所に同じ修正をする羽目になる。同じコードが現れるようならまとめて一つにし、外に出してコールするような書き方にすべきである。同じコードをまとめる作業は、どちらかといえば、コーディング時よりリファクタリング(ソフトウェアの外部的振る舞いを変更せずに内部構造を改善する作業)で行われることが多い。しかし、コーディング時からできるだけ気をつけておきたいことでもある。

    役割は一つに

    メソッドの役割が明確で、かつ 1 つであれば単体テストが行いやすくなる。つまり、コードの「試験性」が高まる。また、役割が一つであれば、後でコードを変更する際に修正箇所がわかりやすいため、障害修正に要する時間が短くなる。つまり、コードの「保守性」があがることになる。例えば、「チェックをして実行する」機能を実現するために、checkAndDo()メソッドが存在したとする。この場合、このメソッドは check()メソッドと do()メソッドに分割すべきである。なぜなら、checkAndDo()メソッドの check()ロジックに誤りがあった場合、do()メソッドに書かれる内容まで把握する必要が生じるためである。分割してあれば、check()メソッドだけの変更で済む。このことはクラスの設計にもあてはまる。

    ネーミング規約

    全般

    • 大文字・小文字の違いで名前を区別しない。

      良い例:

      java
      private int carNumber;
      +private int trainNumber;

      悪い例:

      java
      private int num;
      +private int Num;

    パッケージ

    • パッケージ名はすべて小文字にする
    • パッケージ名は意味のある名前にする
    • サブパッケージ名の重複は可能

    クラス

    • クラス名は単語の先頭を大文字にする
      良い例:

      java
      public class Entry {

      悪い例:

      java
      public class entry {
    • インターフェース名、Enum 名、Record 名はクラス名に準ずる

    メソッド

    • コンストラクタと同じ名前のメソッドはつくらない

    • メソッド名は区切りのみ大文字にする
      良い例:

      java
      public String getName() {
      +    //・・・
      +}

      悪い例:

      java
      public String getname() {
      +    //・・・
      +}
      +public String GETNAME() {
      +    //・・・
      +}
    • 変換メソッド名は「"to"+オブジェクト名」にする
      良い例:

      java
      public String toString() {

      悪い例:

      java
      public String string() {
    • ゲッターメソッド名は「"get"+属性名」にする
      型がbooleanの場合は「"is"+属性名」にする

    • セッターメソッド名は「"set"+属性名」にする

    • boolean変数を返すメソッド名はtrue/falseの状態がわかるようにする

      良い例:

      java
      public boolean isAsleep() {
      +}
      +public boolean exists() {
      +}
      +public boolean hasExpired() {
      +}

    引数

    • メソッドのパラメータ名とインスタンス変数名を一緒にしない
      ただし、アクセサメソッドやコンストラクタなど、統合開発環境の機能により自動生成するものに関しては可とする。
      アンダースコア _ をつけての区別は原則禁止とする。

      良い例:

      java
      public double calc(double rate) {
      +    return this.value * rate;
      +}

      悪い例:

      java
      public double calc(double value) {
      +    return this.value * value;
      +}
      +
      +public double calc(double _value) {
      +    return this.value * _value;
      +}

    変数全般

    • boolean変数はtrue/false の状態がわかるようにする

      良い例:

      java
      private boolean isOpen;

      悪い例:

      java
      private boolean flag;
    • 定数は全てstatic finalとし、すべて大文字、区切りは"_"

      良い例:

      java
      private static final String SYSTEM_NAME = "販売管理システム";
    • 変数名は小文字とし、単語の区切りのみ大文字にする

      良い例:

      java
      private String thisIsString;

      変数名に固有名詞が含まれる場合、先頭をのぞき、単語の区切り以外に大文字を使用してもよい

      良い例:

      java
      private String thisIsIPAddress;

    ローカル変数

    • スコープが狭い変数名は省略した名前でもよい
      良い例:

      java
      if (・・・) {
      +    String s = "・・・・";
      +   //変数sを利用した処理 数行
      +}

      悪い例:

      java
      String s = "・・・・";
      +if (・・・) {
      +   //変数sを利用した処理
      +}
      +・・・
      +if (・・・) {
      +   //変数sを利用した処理
      +}

      変数sの利用範囲が広いので役割が明確になる変数名に変更する。

    • for 文のループカウンタは、ネストごとに"i","j","k"・・・を使う

    Enum

    • Enum 名はクラス名と同じく、単語の先頭を大文字にする

    • 列挙定数は定数と同じく、すべて大文字、区切りは"_"

      良い例:

      java
      enum Season {
      +    WINTER,
      +    SPRING,
      +    SUMMER,
      +    FALL
      +}

      悪い例:

      java
      enum Season {
      +    winter,
      +    spring,
      +    summer,
      +    fall
      +}

    コーディング規約

    全般

    • 原則としてオブジェクトの参照にはインターフェースを利用する
      オブジェクトを参照する際は、そのオブジェクトの実装クラスを用いて宣言できるが、実装クラスに適切なインターフェースが存在している場合は、必ずインターフェースを用いて宣言すること。

      良い例:

      java
      List<Entry> list = new ArrayList<>();
      +Map<String, String> map = new HashMap<>();

      悪い例:

      java
      ArrayList<Entry> list = new ArrayList<>();
      +HashMap<String, String> map = new HashMap<>();
    • 推奨されない API を使用しない
      アノテーション@Deprecatedで指定されたメソッドは利用しないこと。

    • 使われないコードは書かない

    • 宣言は適切な権限で行うこと(public, protected, private

    • final を適切に利用する
      継承されないクラス、オーバーライドされないメソッド、値の変わらない変数(つまり定数)等、変化のないもの/変化させたくないものについてはfinal で宣言する。

      良い例:

      java
      //継承されないクラス
      +public final class CalculateUtils {
      +    //・・・
      +}
      +
      +//値の変わらない変数(定数)
      +private static final String MESSAGE = "・・・";
      +
      +//オーバーライドされないメソッド
      +public final int sum(/*変化させたくない値*/final int... values) {
      +    int sumValue = 0;
      +    for (/*変化させたくない値*/final int value : values) {
      +        sumValue += value;
      +    }
      +    return sumValue;
      +}

    フォーマット

    • インデントは空白文字 4 文字分の Tab を使用する

    • 長すぎる行は避ける

    • { の後にステートメントを記述しない
      良い例:

      java
      if (s == null) {
      +    return 0;
      +}

      悪い例:

      java
      if (s == null) {return 0;}
    • 1 行に 2 つ以上のステートメントを記述しない
      悪い例:

      java
      } catch (Exception e) {
      +    log.error("Error", e);return null;
      +}
    • カンマの後には空白文字を
      良い例:

      java
      process(x, y, z);

      悪い例:

      java
      process(x,y,z);
    • 代入演算子( = , += , -= , …)の前後には空白文字を挿入する
      良い例:

      java
      int a = x;
      +a += 10;

      悪い例:

      java
      int a=x;
      +a+= 10;
    • for 文内のセミコロンの後には空白文字を挿入する
      良い例:

      java
      for (int i = 0; i < array.length; i++) {
      +    //・・・
      +}

      悪い例:

      java
      for (int i = 0;i < array.length ;i++) {
      +    //・・・
      +}
    • ++-- とオペランドの間には空白文字を入れない
      良い例:

      java
      i++;

      悪い例:

      java
      i ++;
    • ビット演算子( |&^<<>> )の前後には空白文字を挿入する

    • 論理演算子( ||&&)の前後には空白文字を挿入する

    • 関係演算子( <>>=<===!= )の前後には空白文字を挿入する

    • 算術演算子( /% )の前後には空白文字を挿入する

    • return 文ではカッコを使わない
      良い例:

      java
      int answer = (a + b + c) * d;
      +return answer;

      悪い例:

      java
      return ((a + b + c) * d);
    • if などの条件式で boolean の変数を比較しない

      良い例:

      java
      if (hasStock)

      悪い例:

      java
      if (hasStock == true)
    • 不等号の向きは左向き( <<= )にする
      良い例:

      java
      if (from <= x && x <= to) {

      悪い例:

      java
      if (x >= from && x <= to) {

    コメント

    • ファイルの先頭への Copyright の表記について
      ソースのファイルヘッダにコピーライト標記は法的拘束力がないため、不要とする。
      ただし、顧客からの要求があった場合を除く。

    • Javadoc コメントには、少なくとも author と version(クラス)、param と return と exception(メソッド)を記述する

      • 今後もバージョンアップのリリースが予定されているソースでは、上記に加えて since(バージョン)を記述する
      • @Overrideのあるメソッドでは、上記に加えて{@Inherit}を記述する
    • Javadoc  クラスヘッダコメントのフォーマットは以下の通り

      良い例:

      java
      /**
      + * Action(or Bean)クラス メニュー名称
      + *
      + * @author 姓 名
      + * @version バージョン YYYY/MM/DD 説明
      + */
    • コメントは必要なものだけを簡潔に
      悪い例:

      java
      /**
      + * 文字列に変換
      + */
      +@Override
      +public String toString() {
      +
      +/**
      + * コピー
      + *
      + * @return コピーしたインスタンス
      + */
      +public Entry copy() {
    • 不要なコメントは記載しない

      • コードからすぐわかること・冗長なコメント
      • 名前の説明
        コメントではなくわかりやすい名前を付ける。
      • 別システムで管理している内容
        ソースコード管理システム、バグトラッキングシステムで管理している内容はソースコードにコメントで記載する必要はない。
        • コメントアウトされたコード
          ソースコード管理システムで管理されている

    インポート

    • java.langパッケージはインポートしない

      悪い例:

      java
      import java.lang.String;//必要のない記述
    • 原則として static インポートしない
      JUnit の作成やフレームワークとして static インポートが推奨されるような場合は利用してもよい

    • 原則としてオンデマンドのインポート宣言(type-import-on-demand declaration)(アスタリスク*によるインポート) は行わない

      悪い例:

      java
      import java.util.*;

    コンストラクタ

    • public 宣言していないクラスにはpublic権限のコンストラクタを作らない
      良い例:

      java
      class Entry {
      +    //・・・
      +    Entry(int id) {
      +        //・・・
      +    }

      悪い例:

      java
      class Entry {
      +    //・・・
      +    public Entry(int id) {
      +        //・・・
      +    }
    • インスタンスメンバを持たない(static メンバのみの)クラスは、private権限のコンストラクタを作成する

    メソッド

    • オーバーライドさせたくないメソッドはfinalを利用する

    • 戻り値が配列のメソッドで、戻る配列のサイズが 0 の場合、メソッドを使用するクライアントの余計な null チェックのロジックを回避するため、null ではなく長さゼロの配列を戻すようにする。 良い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return ArrayUtils.EMPTY_STRING_ARRAY;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return Collections.emptyList();
      +    }
      +    return List.of(s);
      +}

      悪い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return List.of(s);
      +}
    • メソッドは 1 つの役割にする

    クラスメソッド

    • クラスメソッドを利用するときは、クラス名を使って呼び出す
      良い例:

      java
      int comp = Integer.compare(x, y);

      悪い例:

      java
      Integer a = //
      +int comp = a.compare(x, y);

    変数全般

    • 1 つのステートメントには 1 つの変数宣言
      良い例:

      java
      /** 科目コード */
      +private String code;
      +/** 科目名 */
      +private String name;
      +/** 科目略名 */
      +private String shortName;

      悪い例:

      java
      private String code, name, shortName;
    • リテラルは使用しない
      リテラルとは、コード中に、表現が定数として直接現れており、記号やリストで表現することができないものを指す(数値、文字列両方含む 通称マジックナンバー)。コードの可読性・保守性の低下を防ぐために、リテラル定数(static final フィールド)を使用すること。
      例外:-1,0,1 等をカウント値としてループ処理等で使用するような場合

      良い例:

      java
      private static final double ONE_MILE_METRE = 1609.344;
      +
      +public double mileToMetre(double mi) {
      +    return mi * ONE_MILE_METRE;
      +}

      悪い例:

      java
      public double mileToMetre(double mi) {
      +    return mi * 1609.344;
      +}
      • リテラル定数の名前はその値の意味を正しく表現したものにする

        悪い例:

        java
        private static final int ZERO = 0;
    • 配列宣言は「型名[]」にする

      良い例:

      java
      private int[] sampleArray = new int[10];

      悪い例:

      java
      private int sampleArray[] = new int[10];
    • できるだけローカル変数を利用する
      ローカル変数で事足りるものをインスタンス変数として利用するなど、必要のないインスタンス変数を定義すると、パフォーマンスや可読性の低下やの大きな要因となる上、マルチスレッドを意識した際に不整合がおきる可能性があるので、インスタンス変数は必要性を充分に考慮してから使用すること。

    • 定数はfinalで宣言する

    • ローカル変数とインスタンス変数を使いわける

    定数

    • public で宣言するクラス変数とインスタンス変数は、定数のみとし、 static final で定義する
      final ではない static な定数は作成しない。

      良い例:

      java
      public static final String PROTOCOL_HTTP = "http";
    • 定数( static フィールド)に、 static ではないメソッドから書き込まない

    • 定数は、プリミティブ型もしくは、不変(Immutable)オブジェクトで参照する

      • 不変Listの生成にはList.of()を利用する

        良い例:

        java
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);

        悪い例:

        java
        public static final List<Integer> VALUES = Arrays.asList(1, 2, 3, 4, 5);
      • 不変Setの生成にはSet.of()を利用する

      • 不変Mapの生成にはMap.of()を利用する

        良い例:

        java
        public static final Map<Integer, String> VALUES_MAP = Map.of(1, "A", 2, "B", 3, "C");

        悪い例:

        java
        public static final Map<Integer, String> VALUES_MAP = new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +};
      • 不変な配列インスタンスは長さ 0 の配列以外は生成不可能なため、外部から参照される(public)定数では利用せず、List等への置き換えをすること

        良い例:

        java
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);

        悪い例:

        java
        public static final int[] VALUES = { 1, 2, 3, 4, 5 };

    インスタンス変数

    • インスタンス変数はprivateにする

      良い例:

      java
      public class Employee {
      +    private long id;
      +
      +    //・・・
      +    //getter/setter
      +}

      悪い例:

      java
      public class Employee {
      +    public long id;
      +
      +    //・・・
      +    //getter/setter
      +}

    クラス変数

    • public static final 宣言した配列を利用しない
      ※「定数」を参照

    • クラス変数にはクラス名を使用してアクセスすること

      良い例:

      java
      BigDecimal b = BigDecimal.ZERO;

      悪い例:

      java
      BigDecimal a = //
      +BigDecimal b = a.ZERO;

    ローカル変数

    • ローカル変数は利用する直前で宣言する
      行間の程度にもよるが、ある程度まとめて宣言するのは OK とする。

      良い例:

      java
      for (int i = 0; i < lines.length; i++) {
      +    String line = lines[i];
      +    //lineの処理
      +}

      悪い例:

      java
      String line;
      +for (int i = 0; i < lines.length; i++) {
      +    line = lines[i];
      +    //lineの処理
      +}
    • ローカル変数は安易に再利用しない
      一度宣言したローカル変数を、複数の目的で安易に使いまわさないこと。ローカル変数は、役割ごとに新しいものを宣言して初期化することにより、コードの可読性・保守性の向上、及びコンパイラの最適化の促進をはかる。

    引数

    • メソッド引数への代入は行わない
      原則としてfinalで宣言する。

      良い例:

      java
      public void add(final int value) {
      +    //・・・
      +}

    継承

    • スーパークラスのインスタンス変数をサブクラスでオーバーライドしない
      スーパークラスと同じ名前のフィールドをサブクラスで宣言しないこと。 同じ名前のフィールドを宣言すると、スーパークラスのフィールドはサブクラスで宣言されたフィールドによって隠ぺいされてしまうので、他の人の混乱を招くことを防ぐため重複する名前は付けないこと。

      悪い例:

      java
      public class Abs {
      +    protected String name;
      +}
      +
      +public class Sub extends Abs {
      +    protected String name;//Abs#nameは隠ぺいされる
      +}
    • スーパークラスのメソッドをオーバーライドするときは@Override アノテーションを指定する。

      良い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    @Override
      +    protected void process() {
      +
      +    }
      +}

      悪い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    //@Overrideアノテーションの指定がない
      +    protected void process() {
      +
      +    }
      +}
    • スーパークラスで private 宣言されているメソッドと同じ名前のメソッドをサブクラスで定義しない
      スーパークラスにある private メソッドと同じ名前のメソッドをサブクラスで定義しないこと。private メソッドはオーバーライドされず全く別のメソッドとして扱われ、他の人の混乱を招き、バグにつながる恐れがある。

    インナークラス

    • 原則としてインナークラスは利用しない
      一つの java ファイルに複数のクラスを記載するのは NG とする。また無名クラスを利用するのも原則として NG とする。
      Enum の定数固有メソッド実装(constant-specific method implementation)、Java8 のラムダ式は内部的にインナークラスとされるがこれらは許可する。

    メンバー順序

    • 以下の順で記述する

      1. static フィールド
      2. static イニシャライザー
      3. static メソッド
      4. フィールド
      5. イニシャライザー
      6. コンストラクター
      7. メソッド
    • 同一カテゴリー内では以下の可視性の順で記述する

      1. public
      2. protected
      3. パッケージ private
      4. private

    インスタンス

    • オブジェクト同士はequals()メソッドで比較する

      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}

      ただし Enum の場合は==演算子を利用して比較する

      equals()メソッドで比較する際、左辺のオブジェクトが null にならないように制御すること。

    • Class 名を利用した比較をおこなわない

      良い例:

      java
      if (o instanceof Foo f) {
      +    // ...
      +}

      悪い例:

      java
      if ("my.Foo".equals(o.getClass().getName())) {
      +    Foo f = (Foo)o;
      +    // ...
      +}
    • インスタンスの型キャスト(Class キャスト)が必要な場合はパターンマッチングを使用する

      良い例:

      java
      if (o instanceof String s) {
      +    // ...
      +}
      +
      +var str = (o instanceof BigDecimal b) ? b.toPlainString() : String.valueOf(o);
      +
      +var empty = o == null ||
      +  (o instanceof String s && s.isEmpty()) ||
      +  (o instanceof Collection c && c.isEmpty());

      悪い例:

      java
      if (o instanceof String) {
      +    String s = (String)o;
      +    // ...
      +}
      +
      +var str = (o instanceof BigDecimal) ? ((BigDecimal)o).toPlainString() : String.valueOf(o);
      +
      +var empty = o == null ||
      +  (o instanceof String && ((String)o).isEmpty()) ||
      +  (o instanceof Collection && ((Collection)o).isEmpty());

    制御構造

    • 制御文( if , else , while , for , do while )の { } は省略しない

      良い例:

      java
      if (s == null) {
      +    return;
      +}

      悪い例:

      java
      if (s == null)
      +    return;
    • ステートメントが無い {} ブロックを利用しない
      悪い例:

      java
      //{}内の記述が無い
      +if (s == null) {
      +}
    • if / while の条件式で = は利用しない
      良い例:

      java
      boolean a =//
      +if (!a) {
      +    //・・・
      +}

      悪い例:

      java
      boolean a =//
      +if (a = false) {//コーディングミス
      +    //・・・
      +}
      +
      +
      +boolean a =//
      +boolean b =//
      +if (a = b) {//おそらくコーディングミス
      +    //・・・
      +}
    • forwhile の使い分けを意識する

    • for 文を利用した繰り返し処理中でループ変数の値を変更しない
      悪い例:

      java
      String[] array = { /*・・・*/ };
      +for (int i = 0; i < array.length; i++) {
      +    //・・・
      +    i += 2;//NG
      +}
      +
      +for (String s : array) {
      +    //・・・
      +    s = "string";//NG
      +}
    • for 文のカウンタは特別な事情がない限り、0 から始める

    • 配列やリストなどの全要素に対するループ処理は拡張 for 文を使用する。
      良い例:

      java
      for (int value : array) {
      +    //・・・
      +}
      +
      +for (String value : list) {
      +    //・・・
      +}
    • 配列をコピーするときはArrays.copyOf()メソッドを利用する

      良い例:

      java
      int[] newArray = Arrays.copyOf(array, array.length);

      悪い例:

      java
      int[] newArray = new int[array.length];
      +System.arraycopy(array, 0, newArray, 0, array.length);
    • 繰り返し処理中のオブジェクトの生成は最小限にする

    • if 文と else 文の繰り返しや switch 文の利用はなるべく避け、オブジェクト指向の手法を利用する
      良い例:

      java
      CodingKind codingKind = toCodingKind(kind);
      +d = codingKind.encode(s);
      +
      +//---
      +
      +CodingKind codingKind = toCodingKind(kind);
      +s = codingKind.decode(d);

      悪い例:

      java
      switch (kind) {
      +case 1 ->
      +    d = encode1(s);
      +case 2 ->
      +    d = encode2(s);
      +}
      +
      +//---
      +
      +switch (kind) {
      +case 1 ->
      +    s = decode1(d);
      +case 2 ->
      +    s = decode2(d);
      +}
    • 繰り返し処理の内部で try ブロックを利用しない
      特に理由がない場合は繰り返し処理の外にtryブロックを記載する。
      ただし、繰り返し処理内部で例外をキャッチし処理を行いたい場合は繰り返し処理の内部でtryブロックを利用してもよい。

      良い例:

      java
      for (String s : array) {
      +    BigDecimal num;
      +    try {
      +        num = new BigDecimal(s);
      +    } catch (NumberFormatException e) {
      +        num = BigDecimal.ZERO;
      +    }
      +    //・・・
      +}

    文字列操作

    • 文字列同士が同じ値かを比較するときは、equals()メソッドを利用する
      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}
    • 文字列リテラルはnew しない
      良い例:

      java
      String s = "";

      悪い例:

      java
      String s = new String();
    • 更新される文字列にはStringBuilder クラスを利用する
      良い例:

      java
      StringBuilder builder = new StringBuilder();
      +for (String s : array) {
      +    builder.append(s);
      +}
      +System.out.println(builder.toString());

      悪い例:

      java
      String string = "";
      +for (String s : array) {
      +    string += s;
      +}
      +System.out.println(string);

      スレッドセーフ性が保証されていない箇所では\`StringBuffer\`クラスを利用する

      ※パフォーマンスについても記載しているので参考にしてください

    • 1ステートメントのみで行われる文字列の連結には+演算子を利用する

      良い例:

      java
      String s = s1 + s2;
      +
      +return s1 + s2 + s3 + s4 + s5;

      悪い例:

      java
      String s = new StringBuilder(s1).append(s2).toString();
      +
      +return new StringBuilder(s1).append(s2).append(s3).append(s4).append(s5).toString();
    • 更新されない文字列にはString クラスを利用する

    • 文字列リテラルと定数を比較するときは、文字列リテラルのequals()メソッドを利用する
      良い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (PROTOCOL_HTTP.equals(url.getProtocol())) {
      +
      +}

      悪い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (url.getProtocol().equals(PROTOCOL_HTTP)) {
      +
      +}
    • プリミティブ型とString オブジェクトの変換には、変換用のメソッドを利用する
      良い例:

      java
      int i = 1000;
      +String s = String.valueOf(i);// "1000"
      +s = NumberFormat.getNumberInstance().format(i);// 3桁区切り "1,000"
      +
      +boolean b = true;
      +s = String.valueOf(b);// true/false
      +s = BooleanUtils.toStringOnOff(b);// on/off
    • 文字列の中に、ある文字が含まれているか調べるには、contains()メソッドを利用する

    • システム依存記号( \\n\\r など)は使用しない。
      悪い例:

      java
      String text = Arrays.stream(array)
      +    .collect(Collectors.joining("\\n"));

    数値

    • 誤差の無い計算をするときは、BigDecimal クラスを使う
      浮動小数点演算は科学技術計算に利用するもので、誤差が発生する。これに対して、クラス「BigDecimal」は、文字列で数値の計算を行うので、金額などの正確な計算に適している。BigDecimal ではインスタンス生成時に指定された桁数での精度が保証される。

    • 数値の比較は精度に気をつける
      良い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +if (a.compareTo(b) == 0) {
      +    System.out.println("一致");
      +}

      悪い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +
      +if (a.equals(b)) {
      +    System.out.println("精度が違うためこの分岐には入らない");
      +}
    • 低精度なプリミティブ型にキャストしない

    • BigDecimalString変換する際はtoString()ではなくtoPlainString()を利用すること
      toString()を利用した場合、指数表記になることがあります。

    日付

    • 日付の文字列のフォーマットには、SimpleDateFormatまたはDateTimeFormatterを使う
      良い例:

      java
      Date date = new Date();
      +SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
      +String s = dateFormat.format(date);

    三項演算子

    • 入れ子の三項演算子の利用は禁止
      可読性が悪くなるので三項演算子を入れ子で行うのは禁止。

    switch 式

    • 一つの値を変数に代入するための if-else 文は代わりに switch 式の使用を推奨する
      switch 式の値を使用することで変数を不変(実質的 final)にでき、代入箇所が分散することによる可読性の低下を防げます。

      良い例:

      java
      var value = switch (op) {
      +    case "add" -> a + b;
      +    default -> a - b;
      +};

      悪い例:

      java
      int value;
      +if (op.equals("add")) {
      +    value = a + b;
      +} else {
      +    value = a - b;
      +}
    • case 句はなるべく一つの式での記述を推奨する
      複雑な式や複雑なステートメントを記述しなければならない場合は、メソッドに分割することを検討してください。

    • switch 式は、コーディングミスによるフォールスルーを避けるため、常にアロー構文を使用する
      https://docs.oracle.com/javase/jp/16/language/switch-expressions.htmlからの引用:

      ノート:case L ->ラベルの使用をお薦めします。case L:ラベルの使用時は、break文またはyield文の挿入を忘れがちです。これを忘れると、コード内で思いがけないフォール・スルーが発生する場合があります。 case L ->ラベルで、複数の文または式でないコード、あるいはthrow文を指定するには、それらをブロック内に囲みます。caseラベルが生成する値をyield文で指定します。

      良い例:

      java
      var date = LocalDate.now();
      +var off = switch (date.getDayOfWeek()) {
      +    case MONDAY -> {
      +        if (myCalendar.isOff(date) || localCalendar.isHoliday(date)) {
      +            yield true;
      +        }
      +        yield localCalendar.isHoliday(date.minusDays(1));
      +    }
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY ->
      +        myCalendar.isOff(date) || localCalendar.isHoliday(date);
      +    case SUNDAY, SATURDAY -> true;
      +};

      悪い例:

      java
      var date = LocalDate.now();
      +var off = switch (date.getDayOfWeek()) {
      +    case MONDAY:
      +        if (myCalendar.isOff(date) || localCalendar.isHoliday(date)) {
      +            yield true;
      +        }
      +        yield localCalendar.isHoliday(date.minusDays(1));
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY:
      +        yield myCalendar.isOff(date) || localCalendar.isHoliday(date);
      +    case SUNDAY, SATURDAY:
      +        yield true;
      +};
    • アロー構文の、中カッコ、yieldを省略できる場合は必ず省略する
      良い例:

      java
      var day = DayOfWeek.SUNDAY;
      +var shortDay = switch (day) {
      +    case MONDAY -> "M";
      +    case WEDNESDAY -> "W";
      +    case FRIDAY -> "F";
      +    case TUESDAY, THURSDAY -> "T";
      +    case SUNDAY, SATURDAY -> "S";
      +};

      悪い例:

      java
      var day = DayOfWeek.SUNDAY;
      +var shortDay = switch (day) {
      +    case MONDAY -> {
      +        yield "M";
      +    }
      +    case WEDNESDAY -> {
      +        yield "W";
      +    }
      +    case FRIDAY -> {
      +        yield "F";
      +    }
      +    case TUESDAY, THURSDAY -> {
      +        yield "T";
      +    }
      +    case SUNDAY, SATURDAY -> {
      +        yield "S";
      +    }
      +};
    • Enum 値の switch 式で case 句が全ての Enum 値をカバーする場合は default 句はデッドコードとなるため記述しない
      良い例:

      java
      var day = DayOfWeek.SUNDAY;
      +var off = switch (day) {
      +    case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> false;
      +    case SUNDAY, SATURDAY -> true;
      +};
      +
      +var day = DayOfWeek.SUNDAY;
      +var off = switch (day) {
      +    case SUNDAY, SATURDAY -> true;
      +    default -> false;
      +};

      悪い例:

      java
      var day = DayOfWeek.SUNDAY;
      +var off = switch (day) {
      +    case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> false;
      +    case SUNDAY, SATURDAY -> true;
      +    default -> false;
      +};

    switch 文

    • 代わりに switch 式が使用できる箇所は switch 式を使用する

      • case 句でreturnを記述する場合は switch 文を使用して良い
    • case 句はなるべく 1 行のステートメントでの記述を推奨する
      複雑なステートメントを記述しなければならない場合は、メソッドに分割することを検討してください。

    • switch 文は、コーディングミスによるフォールスルーを避けるため、なるべくアロー構文を使用することを推奨する
      https://docs.oracle.com/javase/jp/16/language/switch-expressions.htmlからの引用:

      ノート:case L ->ラベルの使用をお薦めします。case L:ラベルの使用時は、break文またはyield文の挿入を忘れがちです。これを忘れると、コード内で思いがけないフォール・スルーが発生する場合があります。 case L ->ラベルで、複数の文または式でないコード、あるいはthrow文を指定するには、それらをブロック内に囲みます。caseラベルが生成する値をyield文で指定します。

      良い例:

      java
      var date = LocalDate.now();
      +switch (date.getDayOfWeek()) {
      +    case MONDAY -> {
      +        if (
      +            !myCalendar.isOff(date) && !localCalendar.isHoliday(date) &&
      +            !localCalendar.isHoliday(date.minusDays(1))
      +        ) {
      +            work();
      +        }
      +    }
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> {
      +        if (!myCalendar.isOff(date) && !localCalendar.isHoliday(date)) {
      +            work();
      +        }
      +    }
      +}

      悪い例:

      java
      var date = LocalDate.now();
      +switch (date.getDayOfWeek()) {
      +    case MONDAY:
      +        if (
      +            !myCalendar.isOff(date) && !localCalendar.isHoliday(date) &&
      +            !localCalendar.isHoliday(date.minusDays(1))
      +        ) {
      +            work();
      +        }
      +        break;
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY:
      +        if (!myCalendar.isOff(date) && !localCalendar.isHoliday(date)) {
      +            work();
      +        }
      +        break;
      +}
    • アロー構文を使用しない(コロンを使用する)場合、複数の値をマッチさせるときの case 句はカンマを使用して列挙する
      良い例:

      java
      var day = DayOfWeek.SUNDAY;
      +boolean off = false;
      +switch (day) {
      +    case SUNDAY, SATURDAY:
      +      off = true;
      +      break;
      +};

      悪い例:

      java
      var day = DayOfWeek.SUNDAY;
      +boolean off = false;
      +switch (day) {
      +    case SUNDAY:
      +    case SATURDAY:
      +      off = true;
      +      break;
      +};

    コレクション

    • Java2 以降のコレクションクラスを利用する
      Vector クラス、Hashtable クラス、Enumeration 等は、特にこれらを利用する理由がなければ、インターフェースを統一する目的で、これらの代わりにList(ArrayList クラス)、Map(HashMap クラス)、Iterator を使用すること。List などのインターフェースを利用することで JDK1.2 で整理されたわかりやすいメソッドを利用でき、また、インターフェースの特性から呼び出し元を変更せずに実装クラスを変更することができる。

    • 特定の型のオブジェクトだけを受け入れるコレクションクラスを利用する

      良い例:

      java
      List<Map<String, String>> list = new ArrayList<>();
    • ListのソートはList.sort()を利用する
      Listクラスの要素をソートする際は Java8 で追加されたList.sort()を利用すること。
      Java 7 以前で利用されていたCollections.sort()は利用しないこと。

    • Collection.forEach()は利用しない。拡張 for 文の利用を検討する
      Java8 で追加されたメソッド。
      拡張 for 文を利用したほうが多くの場合でデバッグに有利であり、可読性においてもforEachの優位性は少ないため、forEachは原則利用しない。拡張 for 文を利用する。
      具体的には下記のメソッドを利用しないこと。

      • Collection#forEach
      • Set#forEach
      • List#forEach

      Map#forEachはこの限りではない

      良い例:

      java
      for (String s : List.of("A", "B")) {
      +    //処理
      +}

      悪い例:

      java
      List.of("A", "B").forEach(s -> {
      +    //処理
      +});

      ただし、メソッド参照で処理できる場合はforEachを利用する。
      (デバッグのデメリットがほとんどなく、他と比較して処理効率が良いため)

      良い例:

      java
      List.of("A", "B").forEach(this::process);

      悪い例:

      java
      for (String s : List.of("A", "B")) {
      +    this.process(s);
      +}
    • Arrays.asList()は利用せず、List.of()を利用する
      Java9 で追加されたメソッド。
      配列をListに置き換える場合や、単純な固定のListを生成する際にはList.of()を利用する。

      • Arrays.asList()List.of()の違い
        List.of()で生成したListは、完全に不変(Immutable)なListで、
        Arrays.asList()で生成したListは、サイズのみ不変で、set等による値の操作が可能なListです。
        また、setを行った場合、Arrays.asList()に与えられた配列インスタンスにも影響します。

    ラムダ式・メソッド参照・コンストラクタ参照

    • ラムダ式が利用できる箇所はラムダ式を利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • ただし、メソッド参照・コンストラクタ参照が利用できる場合はメソッド参照・コンストラクタ参照を利用する

      良い例:

      java
      String::compareToIgnoreCase

      悪い例:

      java
      (s1, s2) -> s1.compareToIgnoreCase(s2)

      良い例:

      java
      BigDecimal::add

      悪い例:

      java
      (b1, b2) -> b1.add(b2)
    • ラムダ式記述の際、型宣言は省略記法で記述する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (String s1, String s2) -> s1 + "=" + s2
    • 原則ラムダ式内の行数は 1 行とする
      複数行で利用したい場合は、privateメソッドを作成しメソッド参照を利用する

      良い例:

      java
      this::getMax
      +
      +private int getMax(int i1, int i2) {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}

      悪い例:

      java
      (i1, i2) -> {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}
    • 原則ラムダ式は 1 行記述に限定するので、中カッコ、returnは必ず省略する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (s1, s2) -> {
      +    return s1 + "=" + s2;
      +}

    実質的 final(effectively final)

    • 実質的 final を利用する
      変数宣言にfinalを記載しなくてよい。

    Stream API

    • 利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • 並列ストリームは利用しないこと
      悪い例:

      java
      Stream<?> s = list.parallelStream();
      +Stream<?> s = list.stream().parallel();
    • StreamAPI 記述の際の改行位置は、各中間処理・末端処理前のピリオドの前で改行する

      良い例:

      java
      List<Character> alphabetLower = list.stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .toList();

      悪い例:

      java
      List<Character> alphabetLower = list.stream().filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase).toList();
      +
      +List<Character> alphabetLower = list
      +    .stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .toList();
    • インデントは統合開発環境の提供するフォーマッタに合わせる

    • 中間処理の数は 3 つ(3 行)程度までを推奨する
      中間処理の記述が多くなると可読性も悪くなり、デバッグも難しくなるため、3 行程度を目安にロジックを検討すること。

    • コメントは、原則として処理中には記載しない
      難解になってしまった場合のみ処理中の記載を認める

      良い例:

      java
      // クラスFooのフィールドStrの値で昇順にソートし、フィールドStrの要素を取得して処理する。
      +fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    .map(Foo::getStr)
      +    .forEach(this::proc);

      悪い例:

      java
      fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr)) //クラスFooのフィールドStrの値で昇順にソート
      +    .map (Foo::getStr) //フィールドStrの要素を取得
      +    .forEach(this::proc); //処理
      +
      +
      +fooList.stream()
      +    //クラスFooのフィールドStrの値で昇順にソート
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    //フィールドStrの要素を取得
      +    .map (Foo::getStr)
      +    //処理
      +    .forEach(this::proc);
    • Stream は極力変数代入しないこと
      Stream は中間処理、末端処理を行うと使用済みとなり、以降同じインスタンスは利用できない。
      変数代入はほとんどの場合意味をなさず、むしろミスの元となるため極力変数代入はしないこと。

      良い例:

      java
      List<String> list1 = Stream.of("A", "B", "C")
      +        .map(String::toLowerCase)
      +        .toList();
      +
      +List<String> list2 = Stream.of("A", "B", "C")
      +        .map(s -> s + s)
      +        .toList();

      悪い例:

      java
      Stream<String> stream = Stream.of("A", "B", "C");
      +Stream<String> stream1 = stream.map(String::toLowerCase);
      +List<String> list1 = stream1.toList();
      +
      +Stream<String> stream2 = stream.map(s -> s + s);//コーディングミス streamは使用済のためエラーになる
      +List<String> list2 = stream2.toList();

    Optional

    • Optional は同メソッド内で値を取り出す場合は極力変数代入しないこと
      Optional とその値の変数は同じものを示す名前となり、同じ意味の変数名が複数現れることで可読性が下がるため、Optional の変数代入は行わないこととする。

      良い例:

      java
      Employee employee = findEmployee(employeeId)
      +        .orElseThrow(IllegalArgumentException::new);

      悪い例:

      java
      Optional<Employee> employeeOpt = findEmployee(employeeId);
      +Employee employee = employeeOpt.orElseThrow(IllegalArgumentException::new);

      直接、値を取り出すことなくOptionalでのみ扱う場合はOptionalを変数代入してもよい。

      良い例:

      java
      Optional<Employee> employee = findEmployee(employeeId);
      +
      +Dept dept = employee.map(Employee::getDivision)
      +        .map(Division::getDept)
      +        .orElse(null);
      +
      +Role role = employee.map(Employee::getRole)
      +        .orElse(null);
      +
      +//-----
      +
      +Optional<Employee> employee = findEmployee(employeeId);
      +//・・・処理
      +return employee;

    var (Local-Variable Type Inference)

    次のリンクも参考にしてください。
    Style Guidelines for Local Variable Type Inference in Java

    • 明確な方針で、利用する・利用しないを統一すること
      方針無く、varを混在させるとソースコードの見通しと保守性が悪くなります。
      各プロジェクトで、例えば以下ののような方針で統一してください。

      1. varを利用しない
      2. 原則varを利用する
      3. 右辺で、明確に型がわかる場合はvarを利用する

      以下で23について例を示します。

      • 原則varを利用する

        利用できる箇所は全てvarを利用します。

        良い例:

        java
        var a = "";
        +var b = 123;
        +var c = new ArrayList<String>();

        悪い例:

        java
        var a = "";
        +int b = 123;
        +List<String> c = new ArrayList<>();
        java
        void methodA() {
        +    var a = "";
        +}
        +void methodB() {
        +    String a = "";
        +}
      • 右辺で、明確に型がわかる場合はvarを利用する

        右辺をみて型がわかる場合は、全てvarを利用します。 それ以外はvarを利用してはいけません。

        良い例:

        java
        var s = ""; // リテラルによって型が明確に判断できます
        +var list1 = new ArrayList<String>(); // newによって型が明確に判断できます
        +var list2 = (List<String>) map.get("p"); // キャストによって型が明確に判断できます
        +var list3 = List.of("A", "B", "C"); // ファクトリーによって型が明確に判断できます

        プロジェクトで観点を決めるべき例:

        java
        var b1 = s.isEmpty(); // \`is\`で始まるメソッドは通例としてbooleanを返します
        +var b2 = Objects.equals(s1, s2); // \`equals\`メソッドは通例としてbooleanを返します
        +var i1 = Objects.hash(s); // \`hash\`、\`hashCode\`メソッドは通例としてintを返します
        +var i2 = Objects.compare(s1, s2); // \`compare\`、\`compareTo\`メソッドは通例としてintを返します

        悪い例:

        java
        var a = e.getData(); // \`e\`の型と、メソッド定義がわからなければ型が判断できません

    レコード

    • 明確な方針で、利用する・利用しないを統一すること
      方針無く、recordとクラスと JavaBeans 形式のクラスや Lombok の @Data の使用を混在させるとソースコードの見通しと保守性が悪くなります。
      各プロジェクトで、recordを利用しないか、recordの使用しても良い箇所について方針を決めた上で使用するようにしてください。 また、recordは JavaBeans とは互換性がないため使用している各種ライブラリの対応状況にも注意する必要があります。

      方針例: クラス内で処理する一時的なデータを表現するためだけにrecordを使用しても良い。

      java
      // parentId と id をキーとして、重複を排除した uniqueItems を作成します。
      +record Key(int parentId, int id) {
      +}
      +var map = new HashMap<Key, Item>();
      +for (Item item : items) {
      +  var key = new Key(item.getParenId(), item.getId());
      +  map.putIfAbsent(key, item);
      +}
      +var uniqueItems = map.values();
    • 次の記述スタイルを標準とする
      ただし、フォーマッタを導入している場合はフォーマッタに合わせます。

      良い例:

      java
      /**
      + * 矩形を表すクラス
      + *
      + * @param x      矩形の左上隅の x 座標
      + * @param y      矩形の左上隅の y 座標
      + * @param width  矩形の幅
      + * @param height 矩形の高さ
      + */
      +public record Rect(
      +    /* 矩形の左上隅の x 座標 */
      +    double x,
      +    /* 矩形の左上隅の y 座標 */
      +    double y,
      +    /* 矩形の幅 */
      +    double width,
      +    /* 矩形の高さ */
      +    double height) {
      +}

      次にポイントを説明します。

      • {の後、}の前に改行する

      • レコードコンポーネント(パラメータ)のカンマの後に改行することを推奨する
        レコードコンポーネントが少なく、レコードコンポーネント名からでも意味が理解でき、改行がなくても可読性が低下しない場合は、改行を必要としません。
        改行を推奨する理由は以下です。

        • アノテーションを付与したときでも比較的読みやすい(アノテーション引数との混在による可読性の低下の回避)
        • レコードコンポーネントが多い場合も比較的読みやすい
      • レコードコンポーネントが多い場合、レコードコンポーネントへ直接コメントをつけることを検討する
        レコードコンポーネントの JavaDoc としては@param形式でレコード名の上部に記述しますが、このソースコードをテキストとしてみた場合、レコードコンポーネントの定義と@paramの説明とで距離が空いてしまう場合があり、型と説明を読むのに時間がかかってしまう可能性があります。
        また、使用する IDE によっては、アクセサから宣言へのジャンプを使用すると、レコードコンポーネント(パラメータ)の定義へジャンプするものがあります。レコードコンポーネントにコメントがあればすぐに説明を読むことができますが、JavaDoc しか記述しない場合は、ファイル上部へ移動して対応するレコードコンポーネントの説明を探さなければなりません。

        java
        public record Rect(
        +    /* 矩形の左上隅の x 座標 */
        +    double x,
        +    /* 矩形の左上隅の y 座標 */
        +    double y,
        +    /* 矩形の幅 */
        +    double width,
        +    /* 矩形の高さ */
        +    double height) {
        +}
    • レコードのアクセサを上書きしない

      悪い例:

      java
      public record Rect(
      +    double x,
      +    double y,
      +    double width,
      +    double height) {
      +
      +    public double x() {
      +        return x;
      +    }
      +}

    テキストブロック

    次のリンクも参考にしてください。
    Programmer's Guide To Text Blocks > Style Guidelines For Text Blocks

    • 複数行の文字列を定義する際、文字列連結よりもテキストブロックを使用する

      良い例:

      java
      String message = """
      +        複数行の文字列はテキストブロックを使用しましょう。
      +        文字列連結と違い、プラス記号や改行コードのエスケープシーケンスのような無駄を排除でき、
      +        より読みやすいソースコードで書くことができます。
      +        """;

      悪い例:

      java
      String message =
      +        "複数行の文字列はテキストブロックを使用しましょう。\\n" +
      +        "文字列連結と違い、プラス記号や改行コードのエスケープシーケンスのような無駄を排除でき、\\n" +
      +        "より読みやすいソースコードで書くことができます。\\n";
    • 単一行の文字列を定義する際、テキストブロックは使用せず文字列リテラルを使用する
      ただし、二重引用符(")のエスケープを避ける目的ではテキストブロックを使用しても良い。

      良い例:

      java
      String singleLine = "単一行の文字列です。";
      +
      +String message = """
      +        テキストブロックでは単一の二重引用符「"」にエスケープを使用する必要がありません。""";

      悪い例:

      java
      String singleLine = """
      +        単一行の文字列です。""";
    • テキストブロック内では基本的に改行コードのエスケープシーケンス(\\n)を使用しないが、読みやすさ向上の目的で改行コードのエスケープシーケンス(\\n)を使用しても良い

      良い例:

      java
      String multiLine = """
      +        複数行の、
      +        文字列です。
      +        """;
      +
      +String csv = """
      +        名前,説明,MIMEタイプ
      +        CSV,"Comma-Separated Valuesの略\\nCharacter-Separated Valuesの意味で使用されることもある","text/csv"
      +        TSV,"Tab-Separated Valuesの略","text/tab-separated-values"
      +        """;

      悪い例:

      java
      String multiLine = """
      +        複数行の、\\n文字列です。
      +        """;
    • テキストブロックで定義した文字列を処理する場合は、テキストブロックをローカル変数やフィールドへ代入してから使用することを推奨する

      良い例:

      java
      String selectX = """
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_X
      +        """;
      +String selectY = """
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_Y
      +        """;
      +processValues(fetch(selectX, Entity1.class), fetch(selectY, Entity2.class));

      悪い例:

      java
      processValues(fetch("""
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_X
      +        """, Entity1.class), fetch("""
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_Y
      +        """, Entity2.class));

      複雑な処理に直接テキストブロックを使用すると可読性を下げる可能性があります。

    • 3 つ以上続く二重引用符(")をエスケープする際は、最初の二重引用符にエスケープシーケンスを使用する

      良い例:

      java
      String javaCode = """
      +        String message = \\"""
      +                テキストブロックです。
      +                \\""";
      +        System.out.println(message);
      +        """;

      悪い例:

      java
      String javaCode = """
      +        String message = \\"\\"\\"
      +                テキストブロックです。
      +                \\"\\"\\";
      +        System.out.println(message);
      +        """;
      +
      +String javaCode = """
      +        String message = ""\\"
      +                テキストブロックです。
      +                ""\\";
      +        System.out.println(message);
      +        """;
    • テキストブロックの開始引用符(""")は前の行の右端に記述する

      良い例:

      java
      String message = """
      +        テキストブロックです。
      +        """;

      悪い例:

      java
      String message =
      +        """
      +        テキストブロックです。
      +        """;
    • テキストブロックのインデントは開始引用符(""")に合わせる必要はない

      良い例:

      java
      String message = """
      +        テキストブロックです。
      +        """;

      悪い例:

      java
      String message = """
      +                 テキストブロックです。
      +                 """;

      一見すると、読みやすく見えるかもしれませんが、変数名の変更によって簡単に崩れてしまい、修正するために多くの行の変更を強制することになるため、メンテナンス性が低下します。

    • テキストブロックで定義する文字列のインデントは基本的に周辺の Java コードに合わせてインデントする
      ただし、横に長い文字列などの可読性向上の目的で左端に揃えるのは良い。

      良い例:

      java
      public class Foo {
      +    public void process() {
      +        String message = """
      +                テキストブロックです。
      +                """;
      +    }
      +}

      悪い例:

      java
      public class Foo {
      +    public void process() {
      +        String message = """
      +    テキストブロックです。
      +    """;
      +    }
      +}

      良い例:

      java
      public class Foo {
      +    public void process() {
      +        if (foo) {
      +            String message = """
      +それはもう長い長いテキストブロックのためインデントするとエディタ上でテキストを見るためには横スクロールが必要になるかもしれません。
      +""";
      +        }
      +    }
      +}

      悪い例:

      java
      public class Foo {
      +    public void process() {
      +        if (foo) {
      +            String message = """
      +                    それはもう長い長いテキストブロックのためインデントするとエディタ上でテキストを見るためには横スクロールが必要になるかもしれません。
      +                    """;
      +        }
      +    }
      +}
    • テキストブロックのインデントにスペース文字とタブ文字を混在させない

    • 文字列の最後に改行コードを入れずに、意図的にインデントした文字列を定義するとき終了引用符(""")の前の行の右端に\\を使用する

      良い例:

      java
      String text = """
      +            ABC
      +            DEF
      +            GHI\\
      +        """;

      悪い例:

      java
      String text = """
      +        ABC
      +        DEF
      +        GHI""".indent(4);

    ストリーム(InputStream OutputStream)

    • ストリームを扱う API を利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • ObjectOutputStream ではreset()を利用する

    リソースの解放

    • リソース解放を必要とするクラスを利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • リソース解放を必要とするクラスを作成する場合はAutoCloseableimplementsする
      AutoCloseableimplementsすることで try-with-resources 文が利用できるようになります。

    例外

    • catch 文で受け取る例外は、詳細な例外クラスで受け取る

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (IOException e) {
      +    log.error("Error", e);
      +    throw e;
      +}

      悪い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (Exception e) {//範囲が広すぎる例外クラスの利用はNG
      +    log.error("Error", e);
      +    throw e;
      +}
    • Exception クラスのオブジェクトを生成してスローしない

    • catch ブロックでは基本、例外処理をする。ただし処理を書いてはいけない部分もあるので、その部分については、"// ignore" というコメントを記述すること。

    • 例外クラスは無駄に定義しない

    ガベージコレクション

    • 原則finalize()のオーバーライド実装は禁止
    • もしfinalize()をオーバーライドした場合はsuper.finalize() を呼び出す
    • アプリケーションからfinalize()を呼び出さない

    コメント規約

    よいコメントの鉄則

    • コードを明確化するコメントを書く
      コードにコメントを書く理由は、自分自身、一緒に仕事をしている人、後に関わる開発者にとってコードをより理解しやすいものにするためである。

    • コメント化する価値がないプログラムならば、実行するに値しない
      有用な格言。コメントは必須。

    • 過剰な装飾は使わない (例:見出し状のコメント)
      1960 年代から 1970 年代の典型的な COBOL プログラマにはアスタリスク( * )でコメントを囲った箱を書く習慣があった。彼らの芸術的な主張を表わしているのかもしれないが、率直に言えばそれは製品に加わるちょっとした価値に比べれば大きな時間の無駄である。かわいいコードではなくきれいなコードを書くはずである。さらに、コードを表示するディスプレイや印刷するプリントに使われるフォントはプロポーショナルだったりそうでなかったりして、箱をきれいに整列させることは難しい。

    • コメントはシンプルに
      かつて見たもっとも最良のコメントは、シンプルな要点をまとめた注釈であった。なにも本を書く必要はなく、他の人がコードを理解するに十分な情報を提供するだけでよいのである。

    • コードを書く前に先にコメントを記述する
      コードをコメント化する最良の方法は、コードを書く前にコメントを書くことである。それが、コードを書く前にコードがどのように動作するかについて考えるよい機会となり、コメントの存在を保障することにもつながる。少なくともコードを書いた時にコメントすべきである。コメントによってコードが理解しやすくなることで、コードの開発中にアドバンテージを得ることができる。コードにコメントを書く時間を費やせば、それによって得られるものがある。

    • コメントには、なぜそうなのかを書く。コードを読めば分かることを書かない
      基本的に、コードの一部分を見ればそれが何かを理解することはできる。例えば、以下のコードを見て、$1000 以上の注文については 5%ディスカウントされることは理解できる。なぜそうなのか?大きな注文ではディスカウントがつきものだというビジネスルールがあるのだろうか?大きな注文に時間限定サービスがあるのか、それともずっとサービスがあるのか?これを書いたプログラマの気前がよかったのか?
      どこかソースコード中か別な文書にコメントされていない限り、それがなぜなのかを知ることはできない。

      java
      if (grandTotal >= 1000.00) {
      +    grandTotal = grandTotal * 0.95;
      +}

      なお、メソッドコメントには、適切な javadoc コメント(タグ)のほかに、以下の内容も可能な限り明記すること。

      • 副作用のある処理の場合は、その内容 (→ メソッドの引数オブジェクトがメソッド内で変更されるケースなど)
      • 既知のバグ (→ 判明しているが修正しないことにした場合など)
      • 影響のある事前条件、事後条件 (→ メソッドが正しく動作するための前提について)
      • 並行性 (→  マルチスレッドでアクセスされた場合の動作について)
      • 該当メソッドの使用例やサンプルコード
    • TODO コメント
      設計者確認待ち、共通処理の作成待ちなどの理由により、実装時に TODO がある場合、下記のようにコメントを記述する。
      (Eclipse の TODO コメント形式を採用)
      例)

      //TODO:ワークフローの仕様決定待ち 関連チケット#12345

    Java コメント(3 種類)の使い分け

    Java では 3 種類のコメントが使える。javadoc コメントは/**で開始され、*/で終わる。C 風コメントは/*で開始され*/で終わる。単一行コメントは//で開始され、そのソースコード行が終わるまで続く。以下の表ではコメントの使い方とその例を示す。(コメントのスタイルに関しては、前述の「標準規約に準拠したコーディング例」を参照)

    コメント種類使用方法
    javadoc コメント
    /** comment */
    interface、class、メソッド、フィールドの直前に書く。コメントは javadoc によって処理され、外部ドキュメント(HTML)として生成される。(この形式以外のコメントはドキュメントとして出力されないことに注意)/*_
    _ 顧客(Customer)-
    _ 顧客はわれわれがサービスまたは製品を売った人物
    _ もしくは組織のいずれかである。
    _ @author 開発太郎
    _/
    C 風コメント
    /* comment */
    特定のコードを無効化したいが、後で使用するかもしれないので残しておくためにコメント化する時や、デバッグ時に一時的に無効化するときに使用する。/_
    このコードは J.T.Kirk によって 1997.12.9 に前述のコードと置き換えたためコメント化した。2 年間不要であるならば削除せよ。
    ... (ソースコード)
    _/
    単一行コメント
    // comment
    メソッド内にて、ビジネスロジック、コードの概要、一時変数の定義内容などを記述する。// 1995 年 2 月に開始された X 氏の寛大なキャンペーンで
    // 定められた通り 1000$を超える請求には、全て 5%割引を
    // 適用する。

    ※ ロジック中に、頻繁に C 風コメントでコメントを書くとまとめてコメントアウトする場合に不便なため、基本的にロジック中では単一行コメントを利用すること。

    パフォーマンス

    パフォーマンスを考慮した Java のコーディングについて以下に示す。

    ※ パフォーマンスは jre のバージョンやスペックによって変化します。本内容は jre1.8.0_74 での検証結果を元にした内容です。

    ※ 性能計測結果についての記載がありますが、あくまでも参考値です。性能を保証するものではありません。

    Stream API

    Java8 で追加された Stream API での記述は、可読性も高く、簡潔に書けますが、パフォーマンス・性能面で注意が必要な場合があります。

    List の処理を行う際、拡張 for 文で処理する場合は Iterator インスタンスが 1 つだけ生成されますが、Stream API で処理する場合、最初の Stream インスタンスに加え、各中間処理ごとにも Stream インスタンスが生成され、その分の性能劣化が懸念されます。
    以下に処理例と計測結果を記載します。

    • 拡張 for 文

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = new ArrayList<>();
      +for (String string : list) {
      +    if (string.endsWith("0")) {
      +        resultList.add(string);
      +    }
      +}
      +return resultList;
    • Stream API

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = list.stream()
      +    .filter(s -> s.endsWith("0"))
      +    .toList();
      +return resultList;
    • 計測結果

      処理する List の件数拡張 for 文 (ms)StreamAPI (ms)
      100 万件79
      1,000 万件88114
      1 億件9491,026
      2 億件1,8222,081

    小中規模の処理量であれば考慮するほどの性能差はありませんが、大量の処理が見込まれる場合は考慮が必要です。
    また、Stream API は並列処理(スレッド処理)の機能をサポートしていますので、利用できる場合は並列処理も含めての検証が必要です。

    ラムダ式・メソッド参照・コンストラクタ参照

    Java8 で追加されたラムダ式・メソッド参照・コンストラクタ参照は、匿名クラスを利用するよりも効率的です。
    積極的な利用を推奨します。

    以下に Comparator を生成した場合の計測結果を記載します。

    • 匿名クラス

      java
      Comparator<String> c = new Comparator<String>() {
      +    @Override
      +    public int compare(String o1, String o2) {
      +        return o1.compareToIgnoreCase(o2);
      +    }
      +};
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> o1.compareToIgnoreCase(o2);
    • メソッド参照

      java
      Comparator<String> c = String::compareToIgnoreCase;
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)メソッド参照 (ms)
      10 億回3800(計測不能)0(計測不能)
      100 億回6,3740(計測不能)0(計測不能)
      1 京回(30 秒以上)1410

    ラムダ式は外部の変数を利用する場合、匿名クラスとほぼ同じ動作をします。

    • 匿名クラス

      java
      new Comparator<String>() {
      +        @Override
      +        public int compare(String o1, String o2) {
      +            return arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                            : o1.compareToIgnoreCase(o2);
      +        }
      +    }
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                    : o1.compareToIgnoreCase(o2);
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)
      10 億回(パラメータあり)571572
      100 億回(パラメータあり)9,9009,864

    文字列連結

    文字列連結(繰り返し)

    文字列連結を繰り返し処理中で行う際、+演算子で処理することはアンチパターンとして知られています。
    繰り返し処理中の文字列連結は、 StringBuilderStringJoinerStringBuffer を利用します。
    また、コレクション要素の結合であればString#joinが利用できます。

    以下に処理例と計測結果を記載します。

    • +演算子

      java
      String s = "";
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        s += ",";
      +    }
      +    s += string;
      +}
      +return s;
    • StringBuilder

      java
      StringBuilder sb = new StringBuilder();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • StringBuffer

      java
      StringBuffer sb = new StringBuffer();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • String#join

      java
      return String.join(",", list);
    • 計測結果

      処理する List の件数+演算子 (ms)StringBuilder (ms)StringBuffer (ms)String#join (ms)
      1,000 件50(計測不能)0(計測不能)0(計測不能)
      1 万件1,016111
      10 万件(30 秒以上)255
      100 万件(30 秒以上)294251

    文字列連結(定数)

    基本的に処理中の文字列連結では+演算子は使わないで処理するほうがパフォーマンスが高くなりますが、定数の場合は+演算子で定義するほうがパフォーマンスが高いです。

    たとえば以下のように、処理したい場合、

    java
    private static final String CONST_A = "A";
    +private static final String CONST_B = "B";
    +private static final String CONST_AB = CONST_A + CONST_B;

    StringBuilder で処理しようとすると以下のようになります。

    java
    private static final String CONST_AB = new StringBuilder(CONST_A).append(CONST_B).toString();

    しかし、これらをバイトコード上で確認するとそれぞれ以下のようになります。

    • +演算子

      java
      private static final java.lang.String CONST_AB = "AB";
    • StringBuilder

      java
      private static final java.lang.String CONST_AB;
      +
      +static {};
      +   0  new java.lang.StringBuilder [20]
      +   3  dup
      +   4  ldc <String "A"> [8]
      +   6  invokespecial java.lang.StringBuilder(java.lang.String) [22]
      +   9  ldc <String "B"> [11]
      +  11  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [26]
      +  14  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [30]
      +  17  putstatic jp.co.packagename.ClassName.CONST_AB : java.lang.String [34]
      +  20  return

    +演算子を利用した場合コンパイル時に最適化され、文字列"A""B"をあらかじめ結合して class が作成されます。
    StringBuilderを利用した場合は最適化はされず、記述した通りの処理が行われます。

    計測した場合、下記のようになります。

    • 計測結果

      処理回数StringBuilder (ms)+演算子 (ms)
      5,000 万回5590(計測不能)
      1 億回1,0590(計測不能)

    通常、定数処理を大量に処理することは考えられないので性能問題になることはありませんが、+演算子を利用したほうがパフォーマンスが高いこともあるということを理解してください。

    List の種類

    ListにはArrayListのようなRandomAccessを implements した、ランダムアクセスをサポートしているクラスと、
    LinkedListのようなランダムアクセスをサポートしていない(シーケンシャルアクセス)クラスが存在します。
    RandomAccessではないListは、List#getなどインデックスを利用するような操作のパフォーマンスが低いので注意してください。

    以下に処理例と計測結果を記載します。

    • for 文(List#get(int)によるループ)

      java
      int size = list.size();
      +for (int i = 0; i < size; i++) {
      +    String s = list.get(i);
      +    //処理
      +}
    • 拡張 for 文

      java
      for (String s : list) {
      +    //処理
      +}
    • forEach

      java
      list.forEach(this::処理);
    • 計測結果

      処理する List の件数ArrayList
      for 文(List#get(int)によるループ) (ms)
      LinkedList
      for 文(List#get(int)によるループ) (ms)
      ArrayList
      拡張 for 文 (ms)
      LinkedList
      拡張 for 文 (ms)
      ArrayList
      forEach (ms)
      LinkedList
      forEach (ms)
      1 万件0(計測不能)730(計測不能)0(計測不能)0(計測不能)0(計測不能)
      10 万件0(計測不能)7,5760(計測不能)0(計測不能)12
      20 万件0(計測不能)17,7400(計測不能)0(計測不能)0(計測不能)0(計測不能)
      50 万件0(計測不能)(30 秒以上)0(計測不能)20(計測不能)2
      100 万件1(30 秒以上)0(計測不能)40(計測不能)4
      1,000 万件16(30 秒以上)845644

    ランダムアクセスをサポートしているListがシーケンシャルアクセス(iterator を利用した処理など)で遅いということはないので、
    ループの処理は拡張 for 文等、Iterator によるループで記述するのが無難です。
    List#getでの処理をすべて禁止することはできませんが、高いパフォーマンスが求められる場合はListの種類にも注目してみてください。

    BigDecimal の ZERO との比較

    BigDecimal の正・負・ZERO の判定はBigDecimal#signumを利用します。
    compareToを利用してBigDecimal.ZEROと比較しても同じことができますが、signumを利用したほうが効率的です。

    以下に処理例と計測結果を記載します。

    • compareTo 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.compareTo(BigDecimal.ZERO) == 0) {
    • signum 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.signum() == 0) {
    • 計測結果

      (単位:マイクロ秒)

      処理回数compareTo 利用 (マイクロ秒)signum 利用 (マイクロ秒)
      1 京回527
      max:26,367
      min:0
      424
      max:21,213
      min:0

    性能差が少ないので、必ずしも signum を利用する必要はありませんが、大量に処理する場合など、高いパフォーマンスが求められる場合は意識してください。


    License

    CC-By-4.0

    `,168))])}const b=a(h,[["render",k]]);export{o as __pageData,b as default}; diff --git "a/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.md.CtnIBNB8.js" "b/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.md.CtnIBNB8.js" new file mode 100644 index 00000000..21f9a379 --- /dev/null +++ "b/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.md.CtnIBNB8.js" @@ -0,0 +1,492 @@ +import{_ as a,c as n,G as l,a3 as p,B as e,o as t}from"./chunks/framework.BDUoXecB.js";const y=JSON.parse('{"title":"Javaコーディング規約 for Java11","description":"","frontmatter":{"sidebarDepth":4,"title":"Javaコーディング規約 for Java11","author":"Future Enterprise Coding Standards","head":[["meta",{"name":"keywords","content":"Javaコーディング規約,Java11,コーディング規約,Java,Java9"}]]},"headers":[],"relativePath":"documents/forJava/Javaコーディング規約_for_11.md","filePath":"documents/forJava/Javaコーディング規約_for_11.md"}'),h={name:"documents/forJava/Javaコーディング規約_for_11.md"};function k(r,s,d,E,g,c){const i=e("page-title");return t(),n("div",null,[l(i),s[0]||(s[0]=p(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    一般に利用・参照されている Java コーディング規約やガイドラインを以下に示す。本規約の作成においても、下記規約類を参照・抜粋している。

    規約著作者URL
    Code Conventions for the Java Programming LanguageSun Microsystemshttp://www.oracle.com/technetwork/java/codeconvtoc-136057.html
    Writing Robust Java CodeScott W. Amblerhttp://www.ambysoft.com/downloads/javaCodingStandards.pdf
    オブジェクト倶楽部版 Java コーディング標準オブジェクト倶楽部http://objectclub.jp/community/codingstandard/CodingStd.pdf
    電通国際情報際サービス版 Java コーディング規約 2004電通国際情報サービスhttp://objectclub.jp/community/codingstandard/JavaCodingStandard2004.pdf
    JJGuideline (Java - J2EE Conventions and Guidelines)Stephan.J & JCS Teamhttp://www.fedict.belgium.be/sites/default/files/downloads/Java_J2EE_conventions_and_guidelines_EN.pdf
    Google Java Style (非公式和訳)Googlehttps://kazurof.github.io/GoogleJavaStyle-ja/
    Acroquest Technology Java コーディング規約Acroquest Technologyhttps://www.acroquest.co.jp/webworkshop/javacordingrule/Acroquest_JavaCodingStandard_6_7.pdf
    ※現在は削除されています

    ※ Sun Microsystems の規約は Java 草創期から一応の標準という位置づけだったが、オブジェクト指向、及び、その開発環境の普及・発展によって、設計やコーディングにおいて、直接的に有用な知識や豊富な指針を含むような優れた規約や、ツールなどによる機械的な準拠チェックと連携する規約が普及してきている。

    規約の重要性

    標準としての規約を定義し、遵守することの重要性を以下に示す。

    • ソフトウェアメンテナンスにおける、可読性・保守性・拡張性の向上
    • 問題を起こしやすい実装を未然に回避することによる、品質・生産性の向上
    • 標準規約を通して得られる一般的な実装知識やノウハウ(=学習効果)

    コーディングの心得

    長いプログラムを記述すること(ステップ数)によって生産性が評価されたのは、過去の時代の出来事である。現在は、クラスやメソッドの役割が明確で、ロジックが読みやすく、保守性に優れたプログラムを記述することが評価される。コーディング規約は、コードの書き方に関する一種のパターンと考えることもでき、コードの保守性を向上させる具体的な方法を示している。したがって、規約の一つ一つの意図を理解し、守ることが重要になる。しかし、保守性に優れたコードを作成するためには、コーディング規約を守ることに加えて、良いコードを記述するための基本的な心構えをしっかり心に留めておく必要がある。以下では、その心得について述べる。

    【コーディングの心得 5 か条】

    1. 見やすさを重視せよ
    2. ネーミングはわかりやすく
    3. サンプルを鵜呑みにしない
    4. 同じコードを二度書かない
    5. 役割は一つに

    見やすさを重視せよ

    「良いコード」の基本は、「他の人が読んでもわかりやすいと感じられるコード」。コードの見やすさは、フォーマットはもちろん、ロジックの簡潔さや API の常識的な使い方などから生まれる。コーディングにあたっては、常に他の人の視点を意識しながら、見やすさに気を配って記述する必要がある。例えば、自分で記述したコードであっても、しばらくたってから読み返してみると理解に時間がかかった経験は誰にもあるはず。「3 日前に書いたコードは他人のコードと同じ」ということもよく言われる。見やすさを重視することは、他の人のためだけでなく自分のためにもなる。コードを読んでもすぐに理解できないような実装は、再考(リファクタリング)の必要がある。

    ネーミングはわかりやすく

    コーディングでは、様々な変数やメソッドなどにネーミング(名前付け)する必要がある。ネーミングとは、本来、その対象の本質を表すような名前を考える作業である。大変難易度の高い作業だが、一方で適当に行ってもコードの動作は変わらないため、人によっては手を抜きがちとなる。しかし、ネーミングの良し悪しは、コードの可読性に非常に大きな影響を及ぼす。例えば、「C0001」というクラス名があるとする。これでは、何を表すクラスなのかすぐにはわからないだろう。また、「int p = 5000;」という記述があるとする。プログラマに聞くと、変数名 p は価格(Price)の略だと言うのだが、それならば略さずに、「int price = 5000;」としたほうが分かりやすいはずである。「ネーミングはわかりやすく」の背景には、読んで内容が理解できるという意味で、文章のようなプログラミングを行う、という考え方に基づく。

    サンプルを鵜呑みにしない

    サンプルコードを活用すること自体は、著作権等を侵害しなければ問題ない。問題なのは、その内容や背景を理解しないまま、サンプルコードだけを鵜呑みにして、「おまじない」として表面的に適用してしまうことである。コードを「おまじない」ととらえていては、サンプルコードの間違いを気づかないまま適用してしまうこともある。例えば、ストリームのクローズ処理を行っていないサンプルコードであっても、それに気づかずに自分のコードに適用してしまい、後で思わぬ障害を引き起こすという可能性がある。サンプルコードは、そこで説明する内容に絞ったコードが多いため、このような例はよく見られる。また、サンプルコードをそのまま適用した結果、自分が記述すべきコードには必要のないコードが含まれてしまう場合もある。その場合、コードの可読性を下げる原因となる。自分のコードは、自分で深く理解して記述すべきである。

    同じコードは二度書かない

    コードをコピー・ペーストしていませんか?コピー・ペーストしてしまうと、何らかの修正をする際に、全ての個所に同じ修正をする羽目になる。同じコードが現れるようならまとめて一つにし、外に出してコールするような書き方にすべきである。同じコードをまとめる作業は、どちらかといえば、コーディング時よりリファクタリング(ソフトウェアの外部的振る舞いを変更せずに内部構造を改善する作業)で行われることが多い。しかし、コーディング時からできるだけ気をつけておきたいことでもある。

    役割は一つに

    メソッドの役割が明確で、かつ 1 つであれば単体テストが行いやすくなる。つまり、コードの「試験性」が高まる。また、役割が一つであれば、後でコードを変更する際に修正箇所がわかりやすいため、障害修正に要する時間が短くなる。つまり、コードの「保守性」があがることになる。例えば、「チェックをして実行する」機能を実現するために、checkAndDo()メソッドが存在したとする。この場合、このメソッドは check()メソッドと do()メソッドに分割すべきである。なぜなら、checkAndDo()メソッドの check()ロジックに誤りがあった場合、do()メソッドに書かれる内容まで把握する必要が生じるためである。分割してあれば、check()メソッドだけの変更で済む。このことはクラスの設計にもあてはまる。

    ネーミング規約

    全般

    • 大文字・小文字の違いで名前を区別しない。

      良い例:

      java
      private int carNumber;
      +private int trainNumber;

      悪い例:

      java
      private int num;
      +private int Num;

    パッケージ

    • パッケージ名はすべて小文字にする
    • パッケージ名は意味のある名前にする
    • サブパッケージ名の重複は可能

    クラス

    • クラス名は単語の先頭を大文字にする
      良い例:

      java
      public class Entry {

      悪い例:

      java
      public class entry {
    • インターフェース名、Enum 名はクラス名に準ずる

    メソッド

    • コンストラクタと同じ名前のメソッドはつくらない

    • メソッド名は区切りのみ大文字にする
      良い例:

      java
      public String getName() {
      +    //・・・
      +}

      悪い例:

      java
      public String getname() {
      +    //・・・
      +}
      +public String GETNAME() {
      +    //・・・
      +}
    • 変換メソッド名は「"to"+オブジェクト名」にする
      良い例:

      java
      public String toString() {

      悪い例:

      java
      public String string() {
    • ゲッターメソッド名は「"get"+属性名」にする
      型がbooleanの場合は「"is"+属性名」にする

    • セッターメソッド名は「"set"+属性名」にする

    • boolean変数を返すメソッド名はtrue/falseの状態がわかるようにする

      良い例:

      java
      public boolean isAsleep() {
      +}
      +public boolean exists() {
      +}
      +public boolean hasExpired() {
      +}

    引数

    • メソッドのパラメータ名とインスタンス変数名を一緒にしない
      ただし、アクセサメソッドやコンストラクタなど、統合開発環境の機能により自動生成するものに関しては可とする。
      アンダースコア _ をつけての区別は原則禁止とする。

      良い例:

      java
      public double calc(double rate) {
      +    return this.value * rate;
      +}

      悪い例:

      java
      public double calc(double value) {
      +    return this.value * value;
      +}
      +
      +public double calc(double _value) {
      +    return this.value * _value;
      +}

    変数全般

    • boolean変数はtrue/false の状態がわかるようにする

      良い例:

      java
      private boolean isOpen;

      悪い例:

      java
      private boolean flag;
    • 定数は全てstatic finalとし、すべて大文字、区切りは"_"

      良い例:

      java
      private static final String SYSTEM_NAME = "販売管理システム";
    • 変数名は小文字とし、単語の区切りのみ大文字にする

      良い例:

      java
      private String thisIsString;

      変数名に固有名詞が含まれる場合、先頭をのぞき、単語の区切り以外に大文字を使用してもよい

      良い例:

      java
      private String thisIsIPAddress;

    ローカル変数

    • スコープが狭い変数名は省略した名前でもよい
      良い例:

      java
      if (・・・) {
      +    String s = "・・・・";
      +   //変数sを利用した処理 数行
      +}

      悪い例:

      java
      String s = "・・・・";
      +if (・・・) {
      +   //変数sを利用した処理
      +}
      +・・・
      +if (・・・) {
      +   //変数sを利用した処理
      +}

      変数sの利用範囲が広いので役割が明確になる変数名に変更する。

    • for 文のループカウンタは、ネストごとに"i","j","k"・・・を使う

    Enum

    • Enum 名はクラス名と同じく、単語の先頭を大文字にする

    • 列挙定数は定数と同じく、すべて大文字、区切りは"_"

      良い例:

      java
      enum Season {
      +    WINTER,
      +    SPRING,
      +    SUMMER,
      +    FALL
      +}

      悪い例:

      java
      enum Season {
      +    winter,
      +    spring,
      +    summer,
      +    fall
      +}

    コーディング規約

    全般

    • 原則としてオブジェクトの参照にはインターフェースを利用する
      オブジェクトを参照する際は、そのオブジェクトの実装クラスを用いて宣言できるが、実装クラスに適切なインターフェースが存在している場合は、必ずインターフェースを用いて宣言すること。

      良い例:

      java
      List<Entry> list = new ArrayList<>();
      +Map<String, String> map = new HashMap<>();

      悪い例:

      java
      ArrayList<Entry> list = new ArrayList<>();
      +HashMap<String, String> map = new HashMap<>();
    • 推奨されない API を使用しない
      アノテーション@Deprecatedで指定されたメソッドは利用しないこと。

    • 使われないコードは書かない

    • 宣言は適切な権限で行うこと(public, protected, private

    • final を適切に利用する
      継承されないクラス、オーバーライドされないメソッド、値の変わらない変数(つまり定数)等、変化のないもの/変化させたくないものについてはfinal で宣言する。

      良い例:

      java
      //継承されないクラス
      +public final class CalculateUtils {
      +    //・・・
      +}
      +
      +//値の変わらない変数(定数)
      +private static final String MESSAGE = "・・・";
      +
      +//オーバーライドされないメソッド
      +public final int sum(/*変化させたくない値*/final int... values) {
      +    int sumValue = 0;
      +    for (/*変化させたくない値*/final int value : values) {
      +        sumValue += value;
      +    }
      +    return sumValue;
      +}

    フォーマット

    • インデントは空白文字 4 文字分の Tab を使用する

    • 長すぎる行は避ける

    • { の後にステートメントを記述しない
      良い例:

      java
      if (s == null) {
      +    return 0;
      +}

      悪い例:

      java
      if (s == null) {return 0;}
    • 1 行に 2 つ以上のステートメントを記述しない
      悪い例:

      java
      } catch (Exception e) {
      +    log.error("Error", e);return null;
      +}
    • カンマの後には空白文字を
      良い例:

      java
      process(x, y, z);

      悪い例:

      java
      process(x,y,z);
    • 代入演算子( = , += , -= , …)の前後には空白文字を挿入する
      良い例:

      java
      int a = x;
      +a += 10;

      悪い例:

      java
      int a=x;
      +a+= 10;
    • for 文内のセミコロンの後には空白文字を挿入する
      良い例:

      java
      for (int i = 0; i < array.length; i++) {
      +    //・・・
      +}

      悪い例:

      java
      for (int i = 0;i < array.length ;i++) {
      +    //・・・
      +}
    • ++-- とオペランドの間には空白文字を入れない
      良い例:

      java
      i++;

      悪い例:

      java
      i ++;
    • ビット演算子( |&^<<>> )の前後には空白文字を挿入する

    • 論理演算子( ||&&)の前後には空白文字を挿入する

    • 関係演算子( <>>=<===!= )の前後には空白文字を挿入する

    • 算術演算子( /% )の前後には空白文字を挿入する

    • return 文ではカッコを使わない
      良い例:

      java
      int answer = (a + b + c) * d;
      +return answer;

      悪い例:

      java
      return ((a + b + c) * d);
    • if などの条件式で boolean の変数を比較しない

      良い例:

      java
      if (hasStock)

      悪い例:

      java
      if (hasStock == true)
    • 不等号の向きは左向き( <<= )にする
      良い例:

      java
      if (from <= x && x <= to) {

      悪い例:

      java
      if (x >= from && x <= to) {

    コメント

    • ファイルの先頭への Copyright の表記について
      ソースのファイルヘッダにコピーライト標記は法的拘束力がないため、不要とする。
      ただし、顧客からの要求があった場合を除く。

    • Javadoc コメントには、少なくとも author と version(クラス)、param と return と exception(メソッド)を記述する

      • 今後もバージョンアップのリリースが予定されているソースでは、上記に加えて since(バージョン)を記述する
      • @Overrideのあるメソッドでは、上記に加えて{@Inherit}を記述する
    • Javadoc  クラスヘッダコメントのフォーマットは以下の通り

      良い例:

      java
      /**
      + * Action(or Bean)クラス メニュー名称
      + *
      + * @author 姓 名
      + * @version バージョン YYYY/MM/DD 説明
      + */
    • コメントは必要なものだけを簡潔に
      悪い例:

      java
      /**
      + * 文字列に変換
      + */
      +@Override
      +public String toString() {
      +
      +/**
      + * コピー
      + *
      + * @return コピーしたインスタンス
      + */
      +public Entry copy() {
    • 不要なコメントは記載しない

      • コードからすぐわかること・冗長なコメント
      • 名前の説明
        コメントではなくわかりやすい名前を付ける。
      • 別システムで管理している内容
        ソースコード管理システム、バグトラッキングシステムで管理している内容はソースコードにコメントで記載する必要はない。
        • コメントアウトされたコード
          ソースコード管理システムで管理されている

    インポート

    • java.langパッケージはインポートしない

      悪い例:

      java
      import java.lang.String;//必要のない記述
    • 原則として static インポートしない
      JUnit の作成やフレームワークとして static インポートが推奨されるような場合は利用してもよい

    • 原則としてオンデマンドのインポート宣言(type-import-on-demand declaration)(アスタリスク*によるインポート) は行わない

      悪い例:

      java
      import java.util.*;

    コンストラクタ

    • public 宣言していないクラスにはpublic権限のコンストラクタを作らない
      良い例:

      java
      class Entry {
      +    //・・・
      +    Entry(int id) {
      +        //・・・
      +    }

      悪い例:

      java
      class Entry {
      +    //・・・
      +    public Entry(int id) {
      +        //・・・
      +    }
    • インスタンスメンバを持たない(static メンバのみの)クラスは、private権限のコンストラクタを作成する

    メソッド

    • オーバーライドさせたくないメソッドはfinalを利用する

    • 戻り値が配列のメソッドで、戻る配列のサイズが 0 の場合、メソッドを使用するクライアントの余計な null チェックのロジックを回避するため、null ではなく長さゼロの配列を戻すようにする。 良い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return ArrayUtils.EMPTY_STRING_ARRAY;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return Collections.emptyList();
      +    }
      +    return List.of(s);
      +}

      悪い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return List.of(s);
      +}
    • メソッドは 1 つの役割にする

    クラスメソッド

    • クラスメソッドを利用するときは、クラス名を使って呼び出す
      良い例:

      java
      int comp = Integer.compare(x, y);

      悪い例:

      java
      Integer a = //
      +int comp = a.compare(x, y);

    変数全般

    • 1 つのステートメントには 1 つの変数宣言
      良い例:

      java
      /** 科目コード */
      +private String code;
      +/** 科目名 */
      +private String name;
      +/** 科目略名 */
      +private String shortName;

      悪い例:

      java
      private String code, name, shortName;
    • リテラルは使用しない
      リテラルとは、コード中に、表現が定数として直接現れており、記号やリストで表現することができないものを指す(数値、文字列両方含む 通称マジックナンバー)。コードの可読性・保守性の低下を防ぐために、リテラル定数(static final フィールド)を使用すること。
      例外:-1,0,1 等をカウント値としてループ処理等で使用するような場合

      良い例:

      java
      private static final double ONE_MILE_METRE = 1609.344;
      +
      +public double mileToMetre(double mi) {
      +    return mi * ONE_MILE_METRE;
      +}

      悪い例:

      java
      public double mileToMetre(double mi) {
      +    return mi * 1609.344;
      +}
      • リテラル定数の名前はその値の意味を正しく表現したものにする

        悪い例:

        java
        private static final int ZERO = 0;
    • 配列宣言は「型名[]」にする

      良い例:

      java
      private int[] sampleArray = new int[10];

      悪い例:

      java
      private int sampleArray[] = new int[10];
    • できるだけローカル変数を利用する
      ローカル変数で事足りるものをインスタンス変数として利用するなど、必要のないインスタンス変数を定義すると、パフォーマンスや可読性の低下やの大きな要因となる上、マルチスレッドを意識した際に不整合がおきる可能性があるので、インスタンス変数は必要性を充分に考慮してから使用すること。

    • 定数はfinalで宣言する

    • ローカル変数とインスタンス変数を使いわける

    定数

    • public で宣言するクラス変数とインスタンス変数は、定数のみとし、 static final で定義する
      final ではない static な定数は作成しない。

      良い例:

      java
      public static final String PROTOCOL_HTTP = "http";
    • 定数( static フィールド)に、 static ではないメソッドから書き込まない

    • 定数は、プリミティブ型もしくは、不変(Immutable)オブジェクトで参照する

      • 不変Listの生成にはList.of()を利用する

        良い例:

        java
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);

        悪い例:

        java
        public static final List<Integer> VALUES = Arrays.asList(1, 2, 3, 4, 5);
      • 不変Setの生成にはSet.of()を利用する

      • 不変Mapの生成にはMap.of()を利用する

        良い例:

        java
        public static final Map<Integer, String> VALUES_MAP = Map.of(1, "A", 2, "B", 3, "C");

        悪い例:

        java
        public static final Map<Integer, String> VALUES_MAP = new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +};
      • 不変な配列インスタンスは長さ 0 の配列以外は生成不可能なため、外部から参照される(public)定数では利用せず、List等への置き換えをすること

        良い例:

        java
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);

        悪い例:

        java
        public static final int[] VALUES = { 1, 2, 3, 4, 5 };

    インスタンス変数

    • インスタンス変数はprivateにする

      良い例:

      java
      public class Employee {
      +    private long id;
      +
      +    //・・・
      +    //getter/setter
      +}

      悪い例:

      java
      public class Employee {
      +    public long id;
      +
      +    //・・・
      +    //getter/setter
      +}

    クラス変数

    • public static final 宣言した配列を利用しない
      ※「定数」を参照

    • クラス変数にはクラス名を使用してアクセスすること

      良い例:

      java
      BigDecimal b = BigDecimal.ZERO;

      悪い例:

      java
      BigDecimal a = //
      +BigDecimal b = a.ZERO;

    ローカル変数

    • ローカル変数は利用する直前で宣言する
      行間の程度にもよるが、ある程度まとめて宣言するのは OK とする。

      良い例:

      java
      for (int i = 0; i < lines.length; i++) {
      +    String line = lines[i];
      +    //lineの処理
      +}

      悪い例:

      java
      String line;
      +for (int i = 0; i < lines.length; i++) {
      +    line = lines[i];
      +    //lineの処理
      +}
    • ローカル変数は安易に再利用しない
      一度宣言したローカル変数を、複数の目的で安易に使いまわさないこと。ローカル変数は、役割ごとに新しいものを宣言して初期化することにより、コードの可読性・保守性の向上、及びコンパイラの最適化の促進をはかる。

    引数

    • メソッド引数への代入は行わない
      原則としてfinalで宣言する。

      良い例:

      java
      public void add(final int value) {
      +    //・・・
      +}

    継承

    • スーパークラスのインスタンス変数をサブクラスでオーバーライドしない
      スーパークラスと同じ名前のフィールドをサブクラスで宣言しないこと。 同じ名前のフィールドを宣言すると、スーパークラスのフィールドはサブクラスで宣言されたフィールドによって隠ぺいされてしまうので、他の人の混乱を招くことを防ぐため重複する名前は付けないこと。

      悪い例:

      java
      public class Abs {
      +    protected String name;
      +}
      +
      +public class Sub extends Abs {
      +    protected String name;//Abs#nameは隠ぺいされる
      +}
    • スーパークラスのメソッドをオーバーライドするときは@Override アノテーションを指定する。

      良い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    @Override
      +    protected void process() {
      +
      +    }
      +}

      悪い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    //@Overrideアノテーションの指定がない
      +    protected void process() {
      +
      +    }
      +}
    • スーパークラスで private 宣言されているメソッドと同じ名前のメソッドをサブクラスで定義しない
      スーパークラスにある private メソッドと同じ名前のメソッドをサブクラスで定義しないこと。private メソッドはオーバーライドされず全く別のメソッドとして扱われ、他の人の混乱を招き、バグにつながる恐れがある。

    インナークラス

    • 原則としてインナークラスは利用しない
      一つの java ファイルに複数のクラスを記載するのは NG とする。また無名クラスを利用するのも原則として NG とする。
      Enum の定数固有メソッド実装(constant-specific method implementation)、Java8 のラムダ式は内部的にインナークラスとされるがこれらは許可する。

    メンバー順序

    • 以下の順で記述する

      1. static フィールド
      2. static イニシャライザー
      3. static メソッド
      4. フィールド
      5. イニシャライザー
      6. コンストラクター
      7. メソッド
    • 同一カテゴリー内では以下の可視性の順で記述する

      1. public
      2. protected
      3. パッケージ private
      4. private

    インスタンス

    • オブジェクト同士はequals()メソッドで比較する

      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}

      ただし Enum の場合は==演算子を利用して比較する

      equals()メソッドで比較する際、左辺のオブジェクトが null にならないように制御すること。

    • Class 名を利用した比較をおこなわない

      良い例:

      java
      if (o instanceof Foo) {
      +    // ...
      +}

      悪い例:

      java
      if ("my.Foo".equals(o.getClass().getName())) {
      +    // ...
      +}

    制御構造

    • 制御文( if , else , while , for , do while )の { } は省略しない

      良い例:

      java
      if (s == null) {
      +    return;
      +}

      悪い例:

      java
      if (s == null)
      +    return;
    • ステートメントが無い {} ブロックを利用しない
      悪い例:

      java
      //{}内の記述が無い
      +if (s == null) {
      +}
    • if / while の条件式で = は利用しない
      良い例:

      java
      boolean a =//
      +if (!a) {
      +    //・・・
      +}

      悪い例:

      java
      boolean a =//
      +if (a = false) {//コーディングミス
      +    //・・・
      +}
      +
      +
      +boolean a =//
      +boolean b =//
      +if (a = b) {//おそらくコーディングミス
      +    //・・・
      +}
    • forwhile の使い分けを意識する

    • for 文を利用した繰り返し処理中でループ変数の値を変更しない
      悪い例:

      java
      String[] array = { /*・・・*/ };
      +for (int i = 0; i < array.length; i++) {
      +    //・・・
      +    i += 2;//NG
      +}
      +
      +for (String s : array) {
      +    //・・・
      +    s = "string";//NG
      +}
    • for 文のカウンタは特別な事情がない限り、0 から始める

    • 配列やリストなどの全要素に対するループ処理は拡張 for 文を使用する。
      良い例:

      java
      for (int value : array) {
      +    //・・・
      +}
      +
      +for (String value : list) {
      +    //・・・
      +}
    • 配列をコピーするときはArrays.copyOf()メソッドを利用する

      良い例:

      java
      int[] newArray = Arrays.copyOf(array, array.length);

      悪い例:

      java
      int[] newArray = new int[array.length];
      +System.arraycopy(array, 0, newArray, 0, array.length);
    • 繰り返し処理中のオブジェクトの生成は最小限にする

    • if 文と else 文の繰り返しや switch 文の利用はなるべく避け、オブジェクト指向の手法を利用する
      良い例:

      java
      CodingKind codingKind = toCodingKind(kind);
      +d = codingKind.encode(s);
      +
      +//---
      +
      +CodingKind codingKind = toCodingKind(kind);
      +s = codingKind.decode(d);

      悪い例:

      java
      switch (kind) {
      +case 1:
      +    d = encode1(s);
      +    break;
      +case 2:
      +    d = encode2(s);
      +    break;
      +default:
      +    break;
      +}
      +
      +//---
      +
      +switch (kind) {
      +case 1:
      +    s = decode1(d);
      +    break;
      +case 2:
      +    s = decode2(d);
      +    break;
      +default:
      +    break;
      +}
    • 繰り返し処理の内部で try ブロックを利用しない
      特に理由がない場合は繰り返し処理の外にtryブロックを記載する。
      ただし、繰り返し処理内部で例外をキャッチし処理を行いたい場合は繰り返し処理の内部でtryブロックを利用してもよい。

      良い例:

      java
      for (String s : array) {
      +    BigDecimal num;
      +    try {
      +        num = new BigDecimal(s);
      +    } catch (NumberFormatException e) {
      +        num = BigDecimal.ZERO;
      +    }
      +    //・・・
      +}

    文字列操作

    • 文字列同士が同じ値かを比較するときは、equals()メソッドを利用する
      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}
    • 文字列リテラルはnew しない
      良い例:

      java
      String s = "";

      悪い例:

      java
      String s = new String();
    • 更新される文字列にはStringBuilder クラスを利用する
      良い例:

      java
      StringBuilder builder = new StringBuilder();
      +for (String s : array) {
      +    builder.append(s);
      +}
      +System.out.println(builder.toString());

      悪い例:

      java
      String string = "";
      +for (String s : array) {
      +    string += s;
      +}
      +System.out.println(string);

      スレッドセーフ性が保証されていない箇所では\`StringBuffer\`クラスを利用する

      ※パフォーマンスについても記載しているので参考にしてください

    • 1ステートメントのみで行われる文字列の連結には+演算子を利用する

      良い例:

      java
      String s = s1 + s2;
      +
      +return s1 + s2 + s3 + s4 + s5;

      悪い例:

      java
      String s = new StringBuilder(s1).append(s2).toString();
      +
      +return new StringBuilder(s1).append(s2).append(s3).append(s4).append(s5).toString();
    • 更新されない文字列にはString クラスを利用する

    • 文字列リテラルと定数を比較するときは、文字列リテラルのequals()メソッドを利用する
      良い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (PROTOCOL_HTTP.equals(url.getProtocol())) {
      +
      +}

      悪い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (url.getProtocol().equals(PROTOCOL_HTTP)) {
      +
      +}
    • プリミティブ型とString オブジェクトの変換には、変換用のメソッドを利用する
      良い例:

      java
      int i = 1000;
      +String s = String.valueOf(i);// "1000"
      +s = NumberFormat.getNumberInstance().format(i);// 3桁区切り "1,000"
      +
      +boolean b = true;
      +s = String.valueOf(b);// true/false
      +s = BooleanUtils.toStringOnOff(b);// on/off
    • 文字列の中に、ある文字が含まれているか調べるには、contains()メソッドを利用する

    • システム依存記号( \\n\\r など)は使用しない。
      悪い例:

      java
      String text = Arrays.stream(array)
      +    .collect(Collectors.joining("\\n"));

    数値

    • 誤差の無い計算をするときは、BigDecimal クラスを使う
      浮動小数点演算は科学技術計算に利用するもので、誤差が発生する。これに対して、クラス「BigDecimal」は、文字列で数値の計算を行うので、金額などの正確な計算に適している。BigDecimal ではインスタンス生成時に指定された桁数での精度が保証される。

    • 数値の比較は精度に気をつける
      良い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +if (a.compareTo(b) == 0) {
      +    System.out.println("一致");
      +}

      悪い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +
      +if (a.equals(b)) {
      +    System.out.println("精度が違うためこの分岐には入らない");
      +}
    • 低精度なプリミティブ型にキャストしない

    • BigDecimalString変換する際はtoString()ではなくtoPlainString()を利用すること
      toString()を利用した場合、指数表記になることがあります。

    日付

    • 日付の文字列のフォーマットには、SimpleDateFormatまたはDateTimeFormatterを使う
      良い例:

      java
      Date date = new Date();
      +SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
      +String s = dateFormat.format(date);

    三項演算子

    • 入れ子の三項演算子の利用は禁止
      可読性が悪くなるので三項演算子を入れ子で行うのは禁止。

    コレクション

    • Java2 以降のコレクションクラスを利用する
      Vector クラス、Hashtable クラス、Enumeration 等は、特にこれらを利用する理由がなければ、インターフェースを統一する目的で、これらの代わりにList(ArrayList クラス)、Map(HashMap クラス)、Iterator を使用すること。List などのインターフェースを利用することで JDK1.2 で整理されたわかりやすいメソッドを利用でき、また、インターフェースの特性から呼び出し元を変更せずに実装クラスを変更することができる。

    • 特定の型のオブジェクトだけを受け入れるコレクションクラスを利用する

      良い例:

      java
      List<Map<String, String>> list = new ArrayList<>();
    • ListのソートはList.sort()を利用する
      Listクラスの要素をソートする際は Java8 で追加されたList.sort()を利用すること。
      Java 7 以前で利用されていたCollections.sort()は利用しないこと。

    • Collection.forEach()は利用しない。拡張 for 文の利用を検討する
      Java8 で追加されたメソッド。
      拡張 for 文を利用したほうが多くの場合でデバッグに有利であり、可読性においてもforEachの優位性は少ないため、forEachは原則利用しない。拡張 for 文を利用する。
      具体的には下記のメソッドを利用しないこと。

      • Collection#forEach
      • Set#forEach
      • List#forEach

      Map#forEachはこの限りではない

      良い例:

      java
      for (String s : List.of("A", "B")) {
      +    //処理
      +}

      悪い例:

      java
      List.of("A", "B").forEach(s -> {
      +    //処理
      +});

      ただし、メソッド参照で処理できる場合はforEachを利用する。
      (デバッグのデメリットがほとんどなく、他と比較して処理効率が良いため)

      良い例:

      java
      List.of("A", "B").forEach(this::process);

      悪い例:

      java
      for (String s : List.of("A", "B")) {
      +    this.process(s);
      +}
    • Arrays.asList()は利用せず、List.of()を利用する
      Java9 で追加されたメソッド。
      配列をListに置き換える場合や、単純な固定のListを生成する際にはList.of()を利用する。

      • Arrays.asList()List.of()の違い
        List.of()で生成したListは、完全に不変(Immutable)なListで、
        Arrays.asList()で生成したListは、サイズのみ不変で、set等による値の操作が可能なListです。
        また、setを行った場合、Arrays.asList()に与えられた配列インスタンスにも影響します。

    ラムダ式・メソッド参照・コンストラクタ参照

    • ラムダ式が利用できる箇所はラムダ式を利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • ただし、メソッド参照・コンストラクタ参照が利用できる場合はメソッド参照・コンストラクタ参照を利用する

      良い例:

      java
      String::compareToIgnoreCase

      悪い例:

      java
      (s1, s2) -> s1.compareToIgnoreCase(s2)

      良い例:

      java
      BigDecimal::add

      悪い例:

      java
      (b1, b2) -> b1.add(b2)
    • ラムダ式記述の際、型宣言は省略記法で記述する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (String s1, String s2) -> s1 + "=" + s2
    • 原則ラムダ式内の行数は 1 行とする
      複数行で利用したい場合は、privateメソッドを作成しメソッド参照を利用する

      良い例:

      java
      this::getMax
      +
      +private int getMax(int i1, int i2) {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}

      悪い例:

      java
      (i1, i2) -> {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}
    • 原則ラムダ式は 1 行記述に限定するので、中カッコ、returnは必ず省略する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (s1, s2) -> {
      +    return s1 + "=" + s2;
      +}

    実質的 final(effectively final)

    • 実質的 final を利用する
      変数宣言にfinalを記載しなくてよい。

    Stream API

    • 利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • 並列ストリームは利用しないこと
      悪い例:

      java
      Stream<?> s = list.parallelStream();
      +Stream<?> s = list.stream().parallel();
    • StreamAPI 記述の際の改行位置は、各中間処理・末端処理前のピリオドの前で改行する

      良い例:

      java
      List<Character> alphabetLower = list.stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .collect(Collectors.toList());

      悪い例:

      java
      List<Character> alphabetLower = list.stream().filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase).collect(Collectors.toList());
      +
      +List<Character> alphabetLower = list
      +    .stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .collect(Collectors.toList());
    • インデントは統合開発環境の提供するフォーマッタに合わせる

    • 中間処理の数は 3 つ(3 行)程度までを推奨する
      中間処理の記述が多くなると可読性も悪くなり、デバッグも難しくなるため、3 行程度を目安にロジックを検討すること。

    • コメントは、原則として処理中には記載しない
      難解になってしまった場合のみ処理中の記載を認める

      良い例:

      java
      // クラスFooのフィールドStrの値で昇順にソートし、フィールドStrの要素を取得して処理する。
      +hogeList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    .map(Foo::getStr)
      +    .forEach(this::proc);

      悪い例:

      java
      hogeList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr)) //クラスFooのフィールドStrの値で昇順にソート
      +    .map (Foo::getStr) //フィールドStrの要素を取得
      +    .forEach(this::proc); //処理
      +
      +
      +hogeList.stream()
      +    //クラスFooのフィールドStrの値で昇順にソート
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    //フィールドStrの要素を取得
      +    .map (Foo::getStr)
      +    //処理
      +    .forEach(this::proc);
    • Stream は極力変数代入しないこと
      Stream は中間処理、末端処理を行うと使用済みとなり、以降同じインスタンスは利用できない。
      変数代入はほとんどの場合意味をなさず、むしろミスの元となるため極力変数代入はしないこと。

      良い例:

      java
      List<String> list1 = Stream.of("A", "B", "C")
      +        .map(String::toLowerCase)
      +        .collect(Collectors.toList());
      +
      +List<String> list2 = Stream.of("A", "B", "C")
      +        .map(s -> s + s)
      +        .collect(Collectors.toList());

      悪い例:

      java
      Stream<String> stream = Stream.of("A", "B", "C");
      +Stream<String> stream1 = stream.map(String::toLowerCase);
      +List<String> list1 = stream1.collect(Collectors.toList());
      +
      +Stream<String> stream2 = stream.map(s -> s + s);//コーディングミス streamは使用済のためエラーになる
      +List<String> list2 = stream2.collect(Collectors.toList());

    Optional

    • Optional は同メソッド内で値を取り出す場合は極力変数代入しないこと
      Optional とその値の変数は同じものを示す名前となり、同じ意味の変数名が複数現れることで可読性が下がるため、Optional の変数代入は行わないこととする。

      良い例:

      java
      Employee employee = findEmployee(employeeId)
      +        .orElseThrow(IllegalArgumentException::new);

      悪い例:

      java
      Optional<Employee> employeeOpt = findEmployee(employeeId);
      +Employee employee = employeeOpt.orElseThrow(IllegalArgumentException::new);

      直接、値を取り出すことなくOptionalでのみ扱う場合はOptionalを変数代入してもよい。

      良い例:

      java
      Optional<Employee> employee = findEmployee(employeeId);
      +
      +Dept dept = employee.map(Employee::getDivision)
      +        .map(Division::getDept)
      +        .orElse(null);
      +
      +Role role = employee.map(Employee::getRole)
      +        .orElse(null);
      +
      +//-----
      +
      +Optional<Employee> employee = findEmployee(employeeId);
      +//・・・処理
      +return employee;

    var (Local-Variable Type Inference)

    次のリンクも参考にしてください。
    Style Guidelines for Local Variable Type Inference in Java

    • 明確な方針で、利用する・利用しないを統一すること
      方針無く、varを混在させるとソースコードの見通しと保守性が悪くなります。
      各プロジェクトで、例えば以下ののような方針で統一してください。

      1. varを利用しない
      2. 原則varを利用する
      3. 右辺で、明確に型がわかる場合はvarを利用する

      以下で23について例を示します。

      • 原則varを利用する

        利用できる箇所は全てvarを利用します。

        良い例:

        java
        var a = "";
        +var b = 123;
        +var c = new ArrayList<String>();

        悪い例:

        java
        var a = "";
        +int b = 123;
        +List<String> c = new ArrayList<>();
        java
        void methodA() {
        +    var a = "";
        +}
        +void methodB() {
        +    String a = "";
        +}
      • 右辺で、明確に型がわかる場合はvarを利用する

        右辺をみて型がわかる場合は、全てvarを利用します。 それ以外はvarを利用してはいけません。

        良い例:

        java
        var s = ""; // リテラルによって型が明確に判断できます
        +var list1 = new ArrayList<String>(); // newによって型が明確に判断できます
        +var list2 = (List<String>) map.get("p"); // キャストによって型が明確に判断できます
        +var list3 = List.of("A", "B", "C"); // ファクトリーによって型が明確に判断できます

        プロジェクトで観点を決めるべき例:

        java
        var b1 = s.isEmpty(); // \`is\`で始まるメソッドは通例としてbooleanを返します
        +var b2 = Objects.equals(s1, s2); // \`equals\`メソッドは通例としてbooleanを返します
        +var i1 = Objects.hash(s); // \`hash\`、\`hashCode\`メソッドは通例としてintを返します
        +var i2 = Objects.compare(s1, s2); // \`compare\`、\`compareTo\`メソッドは通例としてintを返します

        悪い例:

        java
        var a = e.getData(); // \`e\`の型と、メソッド定義がわからなければ型が判断できません

    ストリーム(InputStream OutputStream)

    • ストリームを扱う API を利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • ObjectOutputStream ではreset()を利用する

    リソースの解放

    • リソース解放を必要とするクラスを利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • リソース解放を必要とするクラスを作成する場合はAutoCloseableimplementsする
      AutoCloseableimplementsすることで try-with-resources 文が利用できるようになります。

    例外

    • catch 文で受け取る例外は、詳細な例外クラスで受け取る

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (IOException e) {
      +    log.error("Error", e);
      +    throw e;
      +}

      悪い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (Exception e) {//範囲が広すぎる例外クラスの利用はNG
      +    log.error("Error", e);
      +    throw e;
      +}
    • Exception クラスのオブジェクトを生成してスローしない

    • catch ブロックでは基本、例外処理をする。ただし処理を書いてはいけない部分もあるので、その部分については、"// ignore" というコメントを記述すること。

    • 例外クラスは無駄に定義しない

    ガベージコレクション

    • 原則finalize()のオーバーライド実装は禁止
    • もしfinalize()をオーバーライドした場合はsuper.finalize() を呼び出す
    • アプリケーションからfinalize()を呼び出さない

    コメント規約

    よいコメントの鉄則

    • コードを明確化するコメントを書く
      コードにコメントを書く理由は、自分自身、一緒に仕事をしている人、後に関わる開発者にとってコードをより理解しやすいものにするためである。

    • コメント化する価値がないプログラムならば、実行するに値しない
      有用な格言。コメントは必須。

    • 過剰な装飾は使わない (例:見出し状のコメント)
      1960 年代から 1970 年代の典型的な COBOL プログラマにはアスタリスク( * )でコメントを囲った箱を書く習慣があった。彼らの芸術的な主張を表わしているのかもしれないが、率直に言えばそれは製品に加わるちょっとした価値に比べれば大きな時間の無駄である。かわいいコードではなくきれいなコードを書くはずである。さらに、コードを表示するディスプレイや印刷するプリントに使われるフォントはプロポーショナルだったりそうでなかったりして、箱をきれいに整列させることは難しい。

    • コメントはシンプルに
      かつて見たもっとも最良のコメントは、シンプルな要点をまとめた注釈であった。なにも本を書く必要はなく、他の人がコードを理解するに十分な情報を提供するだけでよいのである。

    • コードを書く前に先にコメントを記述する
      コードをコメント化する最良の方法は、コードを書く前にコメントを書くことである。それが、コードを書く前にコードがどのように動作するかについて考えるよい機会となり、コメントの存在を保障することにもつながる。少なくともコードを書いた時にコメントすべきである。コメントによってコードが理解しやすくなることで、コードの開発中にアドバンテージを得ることができる。コードにコメントを書く時間を費やせば、それによって得られるものがある。

    • コメントには、なぜそうなのかを書く。コードを読めば分かることを書かない
      基本的に、コードの一部分を見ればそれが何かを理解することはできる。例えば、以下のコードを見て、$1000 以上の注文については 5%ディスカウントされることは理解できる。なぜそうなのか?大きな注文ではディスカウントがつきものだというビジネスルールがあるのだろうか?大きな注文に時間限定サービスがあるのか、それともずっとサービスがあるのか?これを書いたプログラマの気前がよかったのか?
      どこかソースコード中か別な文書にコメントされていない限り、それがなぜなのかを知ることはできない。

      java
      if (grandTotal >= 1000.00) {
      +    grandTotal = grandTotal * 0.95;
      +}

      なお、メソッドコメントには、適切な javadoc コメント(タグ)のほかに、以下の内容も可能な限り明記すること。

      • 副作用のある処理の場合は、その内容 (→ メソッドの引数オブジェクトがメソッド内で変更されるケースなど)
      • 既知のバグ (→ 判明しているが修正しないことにした場合など)
      • 影響のある事前条件、事後条件 (→ メソッドが正しく動作するための前提について)
      • 並行性 (→  マルチスレッドでアクセスされた場合の動作について)
      • 該当メソッドの使用例やサンプルコード
    • TODO コメント
      設計者確認待ち、共通処理の作成待ちなどの理由により、実装時に TODO がある場合、下記のようにコメントを記述する。
      (Eclipse の TODO コメント形式を採用)
      例)

      //TODO:ワークフローの仕様決定待ち 関連チケット#12345

    Java コメント(3 種類)の使い分け

    Java では 3 種類のコメントが使える。javadoc コメントは/**で開始され、*/で終わる。C 風コメントは/*で開始され*/で終わる。単一行コメントは//で開始され、そのソースコード行が終わるまで続く。以下の表ではコメントの使い方とその例を示す。(コメントのスタイルに関しては、前述の「標準規約に準拠したコーディング例」を参照)

    コメント種類使用方法
    javadoc コメント
    /** comment */
    interface、class、メソッド、フィールドの直前に書く。コメントは javadoc によって処理され、外部ドキュメント(HTML)として生成される。(この形式以外のコメントはドキュメントとして出力されないことに注意)/*_
    _ 顧客(Customer)-
    _ 顧客はわれわれがサービスまたは製品を売った人物
    _ もしくは組織のいずれかである。
    _ @author 開発太郎
    _/
    C 風コメント
    /* comment */
    特定のコードを無効化したいが、後で使用するかもしれないので残しておくためにコメント化する時や、デバッグ時に一時的に無効化するときに使用する。/_
    このコードは J.T.Kirk によって 1997.12.9 に前述のコードと置き換えたためコメント化した。2 年間不要であるならば削除せよ。
    ... (ソースコード)
    _/
    単一行コメント
    // comment
    メソッド内にて、ビジネスロジック、コードの概要、一時変数の定義内容などを記述する。// 1995 年 2 月に開始された X 氏の寛大なキャンペーンで
    // 定められた通り 1000$を超える請求には、全て 5%割引を
    // 適用する。

    ※ ロジック中に、頻繁に C 風コメントでコメントを書くとまとめてコメントアウトする場合に不便なため、基本的にロジック中では単一行コメントを利用すること。

    パフォーマンス

    パフォーマンスを考慮した Java のコーディングについて以下に示す。

    ※ パフォーマンスは jre のバージョンやスペックによって変化します。本内容は jre1.8.0_74 での検証結果を元にした内容です。

    ※ 性能計測結果についての記載がありますが、あくまでも参考値です。性能を保証するものではありません。

    Stream API

    Java8 で追加された Stream API での記述は、可読性も高く、簡潔に書けますが、パフォーマンス・性能面で注意が必要な場合があります。

    List の処理を行う際、拡張 for 文で処理する場合は Iterator インスタンスが 1 つだけ生成されますが、Stream API で処理する場合、最初の Stream インスタンスに加え、各中間処理ごとにも Stream インスタンスが生成され、その分の性能劣化が懸念されます。
    以下に処理例と計測結果を記載します。

    • 拡張 for 文

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = new ArrayList<>();
      +for (String string : list) {
      +    if (string.endsWith("0")) {
      +        resultList.add(string);
      +    }
      +}
      +return resultList;
    • Stream API

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = list.stream()
      +    .filter(s -> s.endsWith("0"))
      +    .collect(Collectors.toList());
      +return resultList;
    • 計測結果

      処理する List の件数拡張 for 文 (ms)StreamAPI (ms)
      100 万件79
      1,000 万件88114
      1 億件9491,026
      2 億件1,8222,081

    小中規模の処理量であれば考慮するほどの性能差はありませんが、大量の処理が見込まれる場合は考慮が必要です。
    また、Stream API は並列処理(スレッド処理)の機能をサポートしていますので、利用できる場合は並列処理も含めての検証が必要です。

    ラムダ式・メソッド参照・コンストラクタ参照

    Java8 で追加されたラムダ式・メソッド参照・コンストラクタ参照は、匿名クラスを利用するよりも効率的です。
    積極的な利用を推奨します。

    以下に Comparator を生成した場合の計測結果を記載します。

    • 匿名クラス

      java
      Comparator<String> c = new Comparator<String>() {
      +    @Override
      +    public int compare(String o1, String o2) {
      +        return o1.compareToIgnoreCase(o2);
      +    }
      +};
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> o1.compareToIgnoreCase(o2);
    • メソッド参照

      java
      Comparator<String> c = String::compareToIgnoreCase;
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)メソッド参照 (ms)
      10 億回3800(計測不能)0(計測不能)
      100 億回6,3740(計測不能)0(計測不能)
      1 京回(30 秒以上)1410

    ラムダ式は外部の変数を利用する場合、匿名クラスとほぼ同じ動作をします。

    • 匿名クラス

      java
      new Comparator<String>() {
      +        @Override
      +        public int compare(String o1, String o2) {
      +            return arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                            : o1.compareToIgnoreCase(o2);
      +        }
      +    }
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                    : o1.compareToIgnoreCase(o2);
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)
      10 億回(パラメータあり)571572
      100 億回(パラメータあり)9,9009,864

    文字列連結

    文字列連結(繰り返し)

    文字列連結を繰り返し処理中で行う際、+演算子で処理することはアンチパターンとして知られています。
    繰り返し処理中の文字列連結は、 StringBuilderStringJoinerStringBuffer を利用します。
    また、コレクション要素の結合であればString#joinが利用できます。

    以下に処理例と計測結果を記載します。

    • +演算子

      java
      String s = "";
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        s += ",";
      +    }
      +    s += string;
      +}
      +return s;
    • StringBuilder

      java
      StringBuilder sb = new StringBuilder();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • StringBuffer

      java
      StringBuffer sb = new StringBuffer();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • String#join

      java
      return String.join(",", list);
    • 計測結果

      処理する List の件数+演算子 (ms)StringBuilder (ms)StringBuffer (ms)String#join (ms)
      1,000 件50(計測不能)0(計測不能)0(計測不能)
      1 万件1,016111
      10 万件(30 秒以上)255
      100 万件(30 秒以上)294251

    文字列連結(定数)

    基本的に処理中の文字列連結では+演算子は使わないで処理するほうがパフォーマンスが高くなりますが、定数の場合は+演算子で定義するほうがパフォーマンスが高いです。

    たとえば以下のように、処理したい場合、

    java
    private static final String CONST_A = "A";
    +private static final String CONST_B = "B";
    +private static final String CONST_AB = CONST_A + CONST_B;

    StringBuilder で処理しようとすると以下のようになります。

    java
    private static final String CONST_AB = new StringBuilder(CONST_A).append(CONST_B).toString();

    しかし、これらをバイトコード上で確認するとそれぞれ以下のようになります。

    • +演算子

      java
      private static final java.lang.String CONST_AB = "AB";
    • StringBuilder

      java
      private static final java.lang.String CONST_AB;
      +
      +static {};
      +   0  new java.lang.StringBuilder [20]
      +   3  dup
      +   4  ldc <String "A"> [8]
      +   6  invokespecial java.lang.StringBuilder(java.lang.String) [22]
      +   9  ldc <String "B"> [11]
      +  11  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [26]
      +  14  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [30]
      +  17  putstatic jp.co.packagename.ClassName.CONST_AB : java.lang.String [34]
      +  20  return

    +演算子を利用した場合コンパイル時に最適化され、文字列"A""B"をあらかじめ結合して class が作成されます。
    StringBuilderを利用した場合は最適化はされず、記述した通りの処理が行われます。

    計測した場合、下記のようになります。

    • 計測結果

      処理回数StringBuilder (ms)+演算子 (ms)
      5,000 万回5590(計測不能)
      1 億回1,0590(計測不能)

    通常、定数処理を大量に処理することは考えられないので性能問題になることはありませんが、+演算子を利用したほうがパフォーマンスが高いこともあるということを理解してください。

    List の種類

    ListにはArrayListのようなRandomAccessを implements した、ランダムアクセスをサポートしているクラスと、
    LinkedListのようなランダムアクセスをサポートしていない(シーケンシャルアクセス)クラスが存在します。
    RandomAccessではないListは、List#getなどインデックスを利用するような操作のパフォーマンスが低いので注意してください。

    以下に処理例と計測結果を記載します。

    • for 文(List#get(int)によるループ)

      java
      int size = list.size();
      +for (int i = 0; i < size; i++) {
      +    String s = list.get(i);
      +    //処理
      +}
    • 拡張 for 文

      java
      for (String s : list) {
      +    //処理
      +}
    • forEach

      java
      list.forEach(this::処理);
    • 計測結果

      処理する List の件数ArrayList
      for 文(List#get(int)によるループ) (ms)
      LinkedList
      for 文(List#get(int)によるループ) (ms)
      ArrayList
      拡張 for 文 (ms)
      LinkedList
      拡張 for 文 (ms)
      ArrayList
      forEach (ms)
      LinkedList
      forEach (ms)
      1 万件0(計測不能)730(計測不能)0(計測不能)0(計測不能)0(計測不能)
      10 万件0(計測不能)7,5760(計測不能)0(計測不能)12
      20 万件0(計測不能)17,7400(計測不能)0(計測不能)0(計測不能)0(計測不能)
      50 万件0(計測不能)(30 秒以上)0(計測不能)20(計測不能)2
      100 万件1(30 秒以上)0(計測不能)40(計測不能)4
      1,000 万件16(30 秒以上)845644

    ランダムアクセスをサポートしているListがシーケンシャルアクセス(iterator を利用した処理など)で遅いということはないので、
    ループの処理は拡張 for 文等、Iterator によるループで記述するのが無難です。
    List#getでの処理をすべて禁止することはできませんが、高いパフォーマンスが求められる場合はListの種類にも注目してみてください。

    String から Integer・Long への変換

    数値文字列のStringIntegerに変換するには、Integer#valueOf(String)を利用して下記のように記述します。

    java
    String s = "1";
    +Integer value = Integer.valueOf(s);

    しかし、下記のようにも記述できます。

    java
    String s = "1";
    +Integer value = new Integer(s);

    これらの違いは、
    new Integer(s)とした場合、必ず Integer インスタンスが生成されますが、
    Integer.valueOf(s)とした場合は -128 から 127 の間の数値であればキャッシュから取り出すためインスタンスを生成しません。

    このため、前者のInteger#valueOf(String)を利用した記述のほうが効率的です。
    Long#valueOf(String)も同様です。

    性能差が少ないため、ほとんど問題にはなりませんが、FindBugs 等、静的解析で検出される問題のため、理解が必要です。

    また、String からの変換だけでなく、int や long からの変換も#valueOfが効率的ですが、オートボクシングを利用した場合、コンパイルで自動的にこれらの処理に変換されるため、記述することはありません。

    String から int・long への変換

    数値文字列のStringintに変換するには、Integer#parseInt(String)を利用して下記のように記述します。

    java
    String s = "1";
    +int value = Integer.parseInt(s);

    しかし、オートボクシングが利用できるため、意図せず下記のように記述ミスをする場合があります。

    java
    String s = "1";
    +int value = Integer.valueOf(s);//取得したIntegerインスタンスをオートボクシングでintにcastしている
    java
    String s = "1";
    +int value = new Integer(s);//生成したIntegerインスタンスをオートボクシングでintにcastしている

    「オートボクシング」の説明に記載した通り、性能に差が出るだけでなく、
    記述から明らかにミスであることが解るため、FindBugs 等、静的解析で検出されるコードです。

    longへの変換の場合はLong#parseLong(String)を利用します

    以下に計測結果を記載します。

    • 計測結果

      処理回数Integer.valueOf(String) (ms)Integer#parseInt(String) (ms)
      1,000 万回396318
      1 億回4,0603,077

    BigDecimal の ZERO との比較

    BigDecimal の正・負・ZERO の判定はBigDecimal#signumを利用します。
    compareToを利用してBigDecimal.ZEROと比較しても同じことができますが、signumを利用したほうが効率的です。

    以下に処理例と計測結果を記載します。

    • compareTo 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.compareTo(BigDecimal.ZERO) == 0) {
    • signum 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.signum() == 0) {
    • 計測結果

      (単位:マイクロ秒)

      処理回数compareTo 利用 (マイクロ秒)signum 利用 (マイクロ秒)
      1 京回527
      max:26,367
      min:0
      424
      max:21,213
      min:0

    性能差が少ないので、必ずしも signum を利用する必要はありませんが、大量に処理する場合など、高いパフォーマンスが求められる場合は意識してください。


    License

    CC-By-4.0

    `,178))])}const b=a(h,[["render",k]]);export{y as __pageData,b as default}; diff --git "a/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.md.CtnIBNB8.lean.js" "b/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.md.CtnIBNB8.lean.js" new file mode 100644 index 00000000..21f9a379 --- /dev/null +++ "b/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.md.CtnIBNB8.lean.js" @@ -0,0 +1,492 @@ +import{_ as a,c as n,G as l,a3 as p,B as e,o as t}from"./chunks/framework.BDUoXecB.js";const y=JSON.parse('{"title":"Javaコーディング規約 for Java11","description":"","frontmatter":{"sidebarDepth":4,"title":"Javaコーディング規約 for Java11","author":"Future Enterprise Coding Standards","head":[["meta",{"name":"keywords","content":"Javaコーディング規約,Java11,コーディング規約,Java,Java9"}]]},"headers":[],"relativePath":"documents/forJava/Javaコーディング規約_for_11.md","filePath":"documents/forJava/Javaコーディング規約_for_11.md"}'),h={name:"documents/forJava/Javaコーディング規約_for_11.md"};function k(r,s,d,E,g,c){const i=e("page-title");return t(),n("div",null,[l(i),s[0]||(s[0]=p(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    一般に利用・参照されている Java コーディング規約やガイドラインを以下に示す。本規約の作成においても、下記規約類を参照・抜粋している。

    規約著作者URL
    Code Conventions for the Java Programming LanguageSun Microsystemshttp://www.oracle.com/technetwork/java/codeconvtoc-136057.html
    Writing Robust Java CodeScott W. Amblerhttp://www.ambysoft.com/downloads/javaCodingStandards.pdf
    オブジェクト倶楽部版 Java コーディング標準オブジェクト倶楽部http://objectclub.jp/community/codingstandard/CodingStd.pdf
    電通国際情報際サービス版 Java コーディング規約 2004電通国際情報サービスhttp://objectclub.jp/community/codingstandard/JavaCodingStandard2004.pdf
    JJGuideline (Java - J2EE Conventions and Guidelines)Stephan.J & JCS Teamhttp://www.fedict.belgium.be/sites/default/files/downloads/Java_J2EE_conventions_and_guidelines_EN.pdf
    Google Java Style (非公式和訳)Googlehttps://kazurof.github.io/GoogleJavaStyle-ja/
    Acroquest Technology Java コーディング規約Acroquest Technologyhttps://www.acroquest.co.jp/webworkshop/javacordingrule/Acroquest_JavaCodingStandard_6_7.pdf
    ※現在は削除されています

    ※ Sun Microsystems の規約は Java 草創期から一応の標準という位置づけだったが、オブジェクト指向、及び、その開発環境の普及・発展によって、設計やコーディングにおいて、直接的に有用な知識や豊富な指針を含むような優れた規約や、ツールなどによる機械的な準拠チェックと連携する規約が普及してきている。

    規約の重要性

    標準としての規約を定義し、遵守することの重要性を以下に示す。

    • ソフトウェアメンテナンスにおける、可読性・保守性・拡張性の向上
    • 問題を起こしやすい実装を未然に回避することによる、品質・生産性の向上
    • 標準規約を通して得られる一般的な実装知識やノウハウ(=学習効果)

    コーディングの心得

    長いプログラムを記述すること(ステップ数)によって生産性が評価されたのは、過去の時代の出来事である。現在は、クラスやメソッドの役割が明確で、ロジックが読みやすく、保守性に優れたプログラムを記述することが評価される。コーディング規約は、コードの書き方に関する一種のパターンと考えることもでき、コードの保守性を向上させる具体的な方法を示している。したがって、規約の一つ一つの意図を理解し、守ることが重要になる。しかし、保守性に優れたコードを作成するためには、コーディング規約を守ることに加えて、良いコードを記述するための基本的な心構えをしっかり心に留めておく必要がある。以下では、その心得について述べる。

    【コーディングの心得 5 か条】

    1. 見やすさを重視せよ
    2. ネーミングはわかりやすく
    3. サンプルを鵜呑みにしない
    4. 同じコードを二度書かない
    5. 役割は一つに

    見やすさを重視せよ

    「良いコード」の基本は、「他の人が読んでもわかりやすいと感じられるコード」。コードの見やすさは、フォーマットはもちろん、ロジックの簡潔さや API の常識的な使い方などから生まれる。コーディングにあたっては、常に他の人の視点を意識しながら、見やすさに気を配って記述する必要がある。例えば、自分で記述したコードであっても、しばらくたってから読み返してみると理解に時間がかかった経験は誰にもあるはず。「3 日前に書いたコードは他人のコードと同じ」ということもよく言われる。見やすさを重視することは、他の人のためだけでなく自分のためにもなる。コードを読んでもすぐに理解できないような実装は、再考(リファクタリング)の必要がある。

    ネーミングはわかりやすく

    コーディングでは、様々な変数やメソッドなどにネーミング(名前付け)する必要がある。ネーミングとは、本来、その対象の本質を表すような名前を考える作業である。大変難易度の高い作業だが、一方で適当に行ってもコードの動作は変わらないため、人によっては手を抜きがちとなる。しかし、ネーミングの良し悪しは、コードの可読性に非常に大きな影響を及ぼす。例えば、「C0001」というクラス名があるとする。これでは、何を表すクラスなのかすぐにはわからないだろう。また、「int p = 5000;」という記述があるとする。プログラマに聞くと、変数名 p は価格(Price)の略だと言うのだが、それならば略さずに、「int price = 5000;」としたほうが分かりやすいはずである。「ネーミングはわかりやすく」の背景には、読んで内容が理解できるという意味で、文章のようなプログラミングを行う、という考え方に基づく。

    サンプルを鵜呑みにしない

    サンプルコードを活用すること自体は、著作権等を侵害しなければ問題ない。問題なのは、その内容や背景を理解しないまま、サンプルコードだけを鵜呑みにして、「おまじない」として表面的に適用してしまうことである。コードを「おまじない」ととらえていては、サンプルコードの間違いを気づかないまま適用してしまうこともある。例えば、ストリームのクローズ処理を行っていないサンプルコードであっても、それに気づかずに自分のコードに適用してしまい、後で思わぬ障害を引き起こすという可能性がある。サンプルコードは、そこで説明する内容に絞ったコードが多いため、このような例はよく見られる。また、サンプルコードをそのまま適用した結果、自分が記述すべきコードには必要のないコードが含まれてしまう場合もある。その場合、コードの可読性を下げる原因となる。自分のコードは、自分で深く理解して記述すべきである。

    同じコードは二度書かない

    コードをコピー・ペーストしていませんか?コピー・ペーストしてしまうと、何らかの修正をする際に、全ての個所に同じ修正をする羽目になる。同じコードが現れるようならまとめて一つにし、外に出してコールするような書き方にすべきである。同じコードをまとめる作業は、どちらかといえば、コーディング時よりリファクタリング(ソフトウェアの外部的振る舞いを変更せずに内部構造を改善する作業)で行われることが多い。しかし、コーディング時からできるだけ気をつけておきたいことでもある。

    役割は一つに

    メソッドの役割が明確で、かつ 1 つであれば単体テストが行いやすくなる。つまり、コードの「試験性」が高まる。また、役割が一つであれば、後でコードを変更する際に修正箇所がわかりやすいため、障害修正に要する時間が短くなる。つまり、コードの「保守性」があがることになる。例えば、「チェックをして実行する」機能を実現するために、checkAndDo()メソッドが存在したとする。この場合、このメソッドは check()メソッドと do()メソッドに分割すべきである。なぜなら、checkAndDo()メソッドの check()ロジックに誤りがあった場合、do()メソッドに書かれる内容まで把握する必要が生じるためである。分割してあれば、check()メソッドだけの変更で済む。このことはクラスの設計にもあてはまる。

    ネーミング規約

    全般

    • 大文字・小文字の違いで名前を区別しない。

      良い例:

      java
      private int carNumber;
      +private int trainNumber;

      悪い例:

      java
      private int num;
      +private int Num;

    パッケージ

    • パッケージ名はすべて小文字にする
    • パッケージ名は意味のある名前にする
    • サブパッケージ名の重複は可能

    クラス

    • クラス名は単語の先頭を大文字にする
      良い例:

      java
      public class Entry {

      悪い例:

      java
      public class entry {
    • インターフェース名、Enum 名はクラス名に準ずる

    メソッド

    • コンストラクタと同じ名前のメソッドはつくらない

    • メソッド名は区切りのみ大文字にする
      良い例:

      java
      public String getName() {
      +    //・・・
      +}

      悪い例:

      java
      public String getname() {
      +    //・・・
      +}
      +public String GETNAME() {
      +    //・・・
      +}
    • 変換メソッド名は「"to"+オブジェクト名」にする
      良い例:

      java
      public String toString() {

      悪い例:

      java
      public String string() {
    • ゲッターメソッド名は「"get"+属性名」にする
      型がbooleanの場合は「"is"+属性名」にする

    • セッターメソッド名は「"set"+属性名」にする

    • boolean変数を返すメソッド名はtrue/falseの状態がわかるようにする

      良い例:

      java
      public boolean isAsleep() {
      +}
      +public boolean exists() {
      +}
      +public boolean hasExpired() {
      +}

    引数

    • メソッドのパラメータ名とインスタンス変数名を一緒にしない
      ただし、アクセサメソッドやコンストラクタなど、統合開発環境の機能により自動生成するものに関しては可とする。
      アンダースコア _ をつけての区別は原則禁止とする。

      良い例:

      java
      public double calc(double rate) {
      +    return this.value * rate;
      +}

      悪い例:

      java
      public double calc(double value) {
      +    return this.value * value;
      +}
      +
      +public double calc(double _value) {
      +    return this.value * _value;
      +}

    変数全般

    • boolean変数はtrue/false の状態がわかるようにする

      良い例:

      java
      private boolean isOpen;

      悪い例:

      java
      private boolean flag;
    • 定数は全てstatic finalとし、すべて大文字、区切りは"_"

      良い例:

      java
      private static final String SYSTEM_NAME = "販売管理システム";
    • 変数名は小文字とし、単語の区切りのみ大文字にする

      良い例:

      java
      private String thisIsString;

      変数名に固有名詞が含まれる場合、先頭をのぞき、単語の区切り以外に大文字を使用してもよい

      良い例:

      java
      private String thisIsIPAddress;

    ローカル変数

    • スコープが狭い変数名は省略した名前でもよい
      良い例:

      java
      if (・・・) {
      +    String s = "・・・・";
      +   //変数sを利用した処理 数行
      +}

      悪い例:

      java
      String s = "・・・・";
      +if (・・・) {
      +   //変数sを利用した処理
      +}
      +・・・
      +if (・・・) {
      +   //変数sを利用した処理
      +}

      変数sの利用範囲が広いので役割が明確になる変数名に変更する。

    • for 文のループカウンタは、ネストごとに"i","j","k"・・・を使う

    Enum

    • Enum 名はクラス名と同じく、単語の先頭を大文字にする

    • 列挙定数は定数と同じく、すべて大文字、区切りは"_"

      良い例:

      java
      enum Season {
      +    WINTER,
      +    SPRING,
      +    SUMMER,
      +    FALL
      +}

      悪い例:

      java
      enum Season {
      +    winter,
      +    spring,
      +    summer,
      +    fall
      +}

    コーディング規約

    全般

    • 原則としてオブジェクトの参照にはインターフェースを利用する
      オブジェクトを参照する際は、そのオブジェクトの実装クラスを用いて宣言できるが、実装クラスに適切なインターフェースが存在している場合は、必ずインターフェースを用いて宣言すること。

      良い例:

      java
      List<Entry> list = new ArrayList<>();
      +Map<String, String> map = new HashMap<>();

      悪い例:

      java
      ArrayList<Entry> list = new ArrayList<>();
      +HashMap<String, String> map = new HashMap<>();
    • 推奨されない API を使用しない
      アノテーション@Deprecatedで指定されたメソッドは利用しないこと。

    • 使われないコードは書かない

    • 宣言は適切な権限で行うこと(public, protected, private

    • final を適切に利用する
      継承されないクラス、オーバーライドされないメソッド、値の変わらない変数(つまり定数)等、変化のないもの/変化させたくないものについてはfinal で宣言する。

      良い例:

      java
      //継承されないクラス
      +public final class CalculateUtils {
      +    //・・・
      +}
      +
      +//値の変わらない変数(定数)
      +private static final String MESSAGE = "・・・";
      +
      +//オーバーライドされないメソッド
      +public final int sum(/*変化させたくない値*/final int... values) {
      +    int sumValue = 0;
      +    for (/*変化させたくない値*/final int value : values) {
      +        sumValue += value;
      +    }
      +    return sumValue;
      +}

    フォーマット

    • インデントは空白文字 4 文字分の Tab を使用する

    • 長すぎる行は避ける

    • { の後にステートメントを記述しない
      良い例:

      java
      if (s == null) {
      +    return 0;
      +}

      悪い例:

      java
      if (s == null) {return 0;}
    • 1 行に 2 つ以上のステートメントを記述しない
      悪い例:

      java
      } catch (Exception e) {
      +    log.error("Error", e);return null;
      +}
    • カンマの後には空白文字を
      良い例:

      java
      process(x, y, z);

      悪い例:

      java
      process(x,y,z);
    • 代入演算子( = , += , -= , …)の前後には空白文字を挿入する
      良い例:

      java
      int a = x;
      +a += 10;

      悪い例:

      java
      int a=x;
      +a+= 10;
    • for 文内のセミコロンの後には空白文字を挿入する
      良い例:

      java
      for (int i = 0; i < array.length; i++) {
      +    //・・・
      +}

      悪い例:

      java
      for (int i = 0;i < array.length ;i++) {
      +    //・・・
      +}
    • ++-- とオペランドの間には空白文字を入れない
      良い例:

      java
      i++;

      悪い例:

      java
      i ++;
    • ビット演算子( |&^<<>> )の前後には空白文字を挿入する

    • 論理演算子( ||&&)の前後には空白文字を挿入する

    • 関係演算子( <>>=<===!= )の前後には空白文字を挿入する

    • 算術演算子( /% )の前後には空白文字を挿入する

    • return 文ではカッコを使わない
      良い例:

      java
      int answer = (a + b + c) * d;
      +return answer;

      悪い例:

      java
      return ((a + b + c) * d);
    • if などの条件式で boolean の変数を比較しない

      良い例:

      java
      if (hasStock)

      悪い例:

      java
      if (hasStock == true)
    • 不等号の向きは左向き( <<= )にする
      良い例:

      java
      if (from <= x && x <= to) {

      悪い例:

      java
      if (x >= from && x <= to) {

    コメント

    • ファイルの先頭への Copyright の表記について
      ソースのファイルヘッダにコピーライト標記は法的拘束力がないため、不要とする。
      ただし、顧客からの要求があった場合を除く。

    • Javadoc コメントには、少なくとも author と version(クラス)、param と return と exception(メソッド)を記述する

      • 今後もバージョンアップのリリースが予定されているソースでは、上記に加えて since(バージョン)を記述する
      • @Overrideのあるメソッドでは、上記に加えて{@Inherit}を記述する
    • Javadoc  クラスヘッダコメントのフォーマットは以下の通り

      良い例:

      java
      /**
      + * Action(or Bean)クラス メニュー名称
      + *
      + * @author 姓 名
      + * @version バージョン YYYY/MM/DD 説明
      + */
    • コメントは必要なものだけを簡潔に
      悪い例:

      java
      /**
      + * 文字列に変換
      + */
      +@Override
      +public String toString() {
      +
      +/**
      + * コピー
      + *
      + * @return コピーしたインスタンス
      + */
      +public Entry copy() {
    • 不要なコメントは記載しない

      • コードからすぐわかること・冗長なコメント
      • 名前の説明
        コメントではなくわかりやすい名前を付ける。
      • 別システムで管理している内容
        ソースコード管理システム、バグトラッキングシステムで管理している内容はソースコードにコメントで記載する必要はない。
        • コメントアウトされたコード
          ソースコード管理システムで管理されている

    インポート

    • java.langパッケージはインポートしない

      悪い例:

      java
      import java.lang.String;//必要のない記述
    • 原則として static インポートしない
      JUnit の作成やフレームワークとして static インポートが推奨されるような場合は利用してもよい

    • 原則としてオンデマンドのインポート宣言(type-import-on-demand declaration)(アスタリスク*によるインポート) は行わない

      悪い例:

      java
      import java.util.*;

    コンストラクタ

    • public 宣言していないクラスにはpublic権限のコンストラクタを作らない
      良い例:

      java
      class Entry {
      +    //・・・
      +    Entry(int id) {
      +        //・・・
      +    }

      悪い例:

      java
      class Entry {
      +    //・・・
      +    public Entry(int id) {
      +        //・・・
      +    }
    • インスタンスメンバを持たない(static メンバのみの)クラスは、private権限のコンストラクタを作成する

    メソッド

    • オーバーライドさせたくないメソッドはfinalを利用する

    • 戻り値が配列のメソッドで、戻る配列のサイズが 0 の場合、メソッドを使用するクライアントの余計な null チェックのロジックを回避するため、null ではなく長さゼロの配列を戻すようにする。 良い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return ArrayUtils.EMPTY_STRING_ARRAY;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return Collections.emptyList();
      +    }
      +    return List.of(s);
      +}

      悪い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return List.of(s);
      +}
    • メソッドは 1 つの役割にする

    クラスメソッド

    • クラスメソッドを利用するときは、クラス名を使って呼び出す
      良い例:

      java
      int comp = Integer.compare(x, y);

      悪い例:

      java
      Integer a = //
      +int comp = a.compare(x, y);

    変数全般

    • 1 つのステートメントには 1 つの変数宣言
      良い例:

      java
      /** 科目コード */
      +private String code;
      +/** 科目名 */
      +private String name;
      +/** 科目略名 */
      +private String shortName;

      悪い例:

      java
      private String code, name, shortName;
    • リテラルは使用しない
      リテラルとは、コード中に、表現が定数として直接現れており、記号やリストで表現することができないものを指す(数値、文字列両方含む 通称マジックナンバー)。コードの可読性・保守性の低下を防ぐために、リテラル定数(static final フィールド)を使用すること。
      例外:-1,0,1 等をカウント値としてループ処理等で使用するような場合

      良い例:

      java
      private static final double ONE_MILE_METRE = 1609.344;
      +
      +public double mileToMetre(double mi) {
      +    return mi * ONE_MILE_METRE;
      +}

      悪い例:

      java
      public double mileToMetre(double mi) {
      +    return mi * 1609.344;
      +}
      • リテラル定数の名前はその値の意味を正しく表現したものにする

        悪い例:

        java
        private static final int ZERO = 0;
    • 配列宣言は「型名[]」にする

      良い例:

      java
      private int[] sampleArray = new int[10];

      悪い例:

      java
      private int sampleArray[] = new int[10];
    • できるだけローカル変数を利用する
      ローカル変数で事足りるものをインスタンス変数として利用するなど、必要のないインスタンス変数を定義すると、パフォーマンスや可読性の低下やの大きな要因となる上、マルチスレッドを意識した際に不整合がおきる可能性があるので、インスタンス変数は必要性を充分に考慮してから使用すること。

    • 定数はfinalで宣言する

    • ローカル変数とインスタンス変数を使いわける

    定数

    • public で宣言するクラス変数とインスタンス変数は、定数のみとし、 static final で定義する
      final ではない static な定数は作成しない。

      良い例:

      java
      public static final String PROTOCOL_HTTP = "http";
    • 定数( static フィールド)に、 static ではないメソッドから書き込まない

    • 定数は、プリミティブ型もしくは、不変(Immutable)オブジェクトで参照する

      • 不変Listの生成にはList.of()を利用する

        良い例:

        java
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);

        悪い例:

        java
        public static final List<Integer> VALUES = Arrays.asList(1, 2, 3, 4, 5);
      • 不変Setの生成にはSet.of()を利用する

      • 不変Mapの生成にはMap.of()を利用する

        良い例:

        java
        public static final Map<Integer, String> VALUES_MAP = Map.of(1, "A", 2, "B", 3, "C");

        悪い例:

        java
        public static final Map<Integer, String> VALUES_MAP = new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +};
      • 不変な配列インスタンスは長さ 0 の配列以外は生成不可能なため、外部から参照される(public)定数では利用せず、List等への置き換えをすること

        良い例:

        java
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);

        悪い例:

        java
        public static final int[] VALUES = { 1, 2, 3, 4, 5 };

    インスタンス変数

    • インスタンス変数はprivateにする

      良い例:

      java
      public class Employee {
      +    private long id;
      +
      +    //・・・
      +    //getter/setter
      +}

      悪い例:

      java
      public class Employee {
      +    public long id;
      +
      +    //・・・
      +    //getter/setter
      +}

    クラス変数

    • public static final 宣言した配列を利用しない
      ※「定数」を参照

    • クラス変数にはクラス名を使用してアクセスすること

      良い例:

      java
      BigDecimal b = BigDecimal.ZERO;

      悪い例:

      java
      BigDecimal a = //
      +BigDecimal b = a.ZERO;

    ローカル変数

    • ローカル変数は利用する直前で宣言する
      行間の程度にもよるが、ある程度まとめて宣言するのは OK とする。

      良い例:

      java
      for (int i = 0; i < lines.length; i++) {
      +    String line = lines[i];
      +    //lineの処理
      +}

      悪い例:

      java
      String line;
      +for (int i = 0; i < lines.length; i++) {
      +    line = lines[i];
      +    //lineの処理
      +}
    • ローカル変数は安易に再利用しない
      一度宣言したローカル変数を、複数の目的で安易に使いまわさないこと。ローカル変数は、役割ごとに新しいものを宣言して初期化することにより、コードの可読性・保守性の向上、及びコンパイラの最適化の促進をはかる。

    引数

    • メソッド引数への代入は行わない
      原則としてfinalで宣言する。

      良い例:

      java
      public void add(final int value) {
      +    //・・・
      +}

    継承

    • スーパークラスのインスタンス変数をサブクラスでオーバーライドしない
      スーパークラスと同じ名前のフィールドをサブクラスで宣言しないこと。 同じ名前のフィールドを宣言すると、スーパークラスのフィールドはサブクラスで宣言されたフィールドによって隠ぺいされてしまうので、他の人の混乱を招くことを防ぐため重複する名前は付けないこと。

      悪い例:

      java
      public class Abs {
      +    protected String name;
      +}
      +
      +public class Sub extends Abs {
      +    protected String name;//Abs#nameは隠ぺいされる
      +}
    • スーパークラスのメソッドをオーバーライドするときは@Override アノテーションを指定する。

      良い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    @Override
      +    protected void process() {
      +
      +    }
      +}

      悪い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    //@Overrideアノテーションの指定がない
      +    protected void process() {
      +
      +    }
      +}
    • スーパークラスで private 宣言されているメソッドと同じ名前のメソッドをサブクラスで定義しない
      スーパークラスにある private メソッドと同じ名前のメソッドをサブクラスで定義しないこと。private メソッドはオーバーライドされず全く別のメソッドとして扱われ、他の人の混乱を招き、バグにつながる恐れがある。

    インナークラス

    • 原則としてインナークラスは利用しない
      一つの java ファイルに複数のクラスを記載するのは NG とする。また無名クラスを利用するのも原則として NG とする。
      Enum の定数固有メソッド実装(constant-specific method implementation)、Java8 のラムダ式は内部的にインナークラスとされるがこれらは許可する。

    メンバー順序

    • 以下の順で記述する

      1. static フィールド
      2. static イニシャライザー
      3. static メソッド
      4. フィールド
      5. イニシャライザー
      6. コンストラクター
      7. メソッド
    • 同一カテゴリー内では以下の可視性の順で記述する

      1. public
      2. protected
      3. パッケージ private
      4. private

    インスタンス

    • オブジェクト同士はequals()メソッドで比較する

      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}

      ただし Enum の場合は==演算子を利用して比較する

      equals()メソッドで比較する際、左辺のオブジェクトが null にならないように制御すること。

    • Class 名を利用した比較をおこなわない

      良い例:

      java
      if (o instanceof Foo) {
      +    // ...
      +}

      悪い例:

      java
      if ("my.Foo".equals(o.getClass().getName())) {
      +    // ...
      +}

    制御構造

    • 制御文( if , else , while , for , do while )の { } は省略しない

      良い例:

      java
      if (s == null) {
      +    return;
      +}

      悪い例:

      java
      if (s == null)
      +    return;
    • ステートメントが無い {} ブロックを利用しない
      悪い例:

      java
      //{}内の記述が無い
      +if (s == null) {
      +}
    • if / while の条件式で = は利用しない
      良い例:

      java
      boolean a =//
      +if (!a) {
      +    //・・・
      +}

      悪い例:

      java
      boolean a =//
      +if (a = false) {//コーディングミス
      +    //・・・
      +}
      +
      +
      +boolean a =//
      +boolean b =//
      +if (a = b) {//おそらくコーディングミス
      +    //・・・
      +}
    • forwhile の使い分けを意識する

    • for 文を利用した繰り返し処理中でループ変数の値を変更しない
      悪い例:

      java
      String[] array = { /*・・・*/ };
      +for (int i = 0; i < array.length; i++) {
      +    //・・・
      +    i += 2;//NG
      +}
      +
      +for (String s : array) {
      +    //・・・
      +    s = "string";//NG
      +}
    • for 文のカウンタは特別な事情がない限り、0 から始める

    • 配列やリストなどの全要素に対するループ処理は拡張 for 文を使用する。
      良い例:

      java
      for (int value : array) {
      +    //・・・
      +}
      +
      +for (String value : list) {
      +    //・・・
      +}
    • 配列をコピーするときはArrays.copyOf()メソッドを利用する

      良い例:

      java
      int[] newArray = Arrays.copyOf(array, array.length);

      悪い例:

      java
      int[] newArray = new int[array.length];
      +System.arraycopy(array, 0, newArray, 0, array.length);
    • 繰り返し処理中のオブジェクトの生成は最小限にする

    • if 文と else 文の繰り返しや switch 文の利用はなるべく避け、オブジェクト指向の手法を利用する
      良い例:

      java
      CodingKind codingKind = toCodingKind(kind);
      +d = codingKind.encode(s);
      +
      +//---
      +
      +CodingKind codingKind = toCodingKind(kind);
      +s = codingKind.decode(d);

      悪い例:

      java
      switch (kind) {
      +case 1:
      +    d = encode1(s);
      +    break;
      +case 2:
      +    d = encode2(s);
      +    break;
      +default:
      +    break;
      +}
      +
      +//---
      +
      +switch (kind) {
      +case 1:
      +    s = decode1(d);
      +    break;
      +case 2:
      +    s = decode2(d);
      +    break;
      +default:
      +    break;
      +}
    • 繰り返し処理の内部で try ブロックを利用しない
      特に理由がない場合は繰り返し処理の外にtryブロックを記載する。
      ただし、繰り返し処理内部で例外をキャッチし処理を行いたい場合は繰り返し処理の内部でtryブロックを利用してもよい。

      良い例:

      java
      for (String s : array) {
      +    BigDecimal num;
      +    try {
      +        num = new BigDecimal(s);
      +    } catch (NumberFormatException e) {
      +        num = BigDecimal.ZERO;
      +    }
      +    //・・・
      +}

    文字列操作

    • 文字列同士が同じ値かを比較するときは、equals()メソッドを利用する
      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}
    • 文字列リテラルはnew しない
      良い例:

      java
      String s = "";

      悪い例:

      java
      String s = new String();
    • 更新される文字列にはStringBuilder クラスを利用する
      良い例:

      java
      StringBuilder builder = new StringBuilder();
      +for (String s : array) {
      +    builder.append(s);
      +}
      +System.out.println(builder.toString());

      悪い例:

      java
      String string = "";
      +for (String s : array) {
      +    string += s;
      +}
      +System.out.println(string);

      スレッドセーフ性が保証されていない箇所では\`StringBuffer\`クラスを利用する

      ※パフォーマンスについても記載しているので参考にしてください

    • 1ステートメントのみで行われる文字列の連結には+演算子を利用する

      良い例:

      java
      String s = s1 + s2;
      +
      +return s1 + s2 + s3 + s4 + s5;

      悪い例:

      java
      String s = new StringBuilder(s1).append(s2).toString();
      +
      +return new StringBuilder(s1).append(s2).append(s3).append(s4).append(s5).toString();
    • 更新されない文字列にはString クラスを利用する

    • 文字列リテラルと定数を比較するときは、文字列リテラルのequals()メソッドを利用する
      良い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (PROTOCOL_HTTP.equals(url.getProtocol())) {
      +
      +}

      悪い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (url.getProtocol().equals(PROTOCOL_HTTP)) {
      +
      +}
    • プリミティブ型とString オブジェクトの変換には、変換用のメソッドを利用する
      良い例:

      java
      int i = 1000;
      +String s = String.valueOf(i);// "1000"
      +s = NumberFormat.getNumberInstance().format(i);// 3桁区切り "1,000"
      +
      +boolean b = true;
      +s = String.valueOf(b);// true/false
      +s = BooleanUtils.toStringOnOff(b);// on/off
    • 文字列の中に、ある文字が含まれているか調べるには、contains()メソッドを利用する

    • システム依存記号( \\n\\r など)は使用しない。
      悪い例:

      java
      String text = Arrays.stream(array)
      +    .collect(Collectors.joining("\\n"));

    数値

    • 誤差の無い計算をするときは、BigDecimal クラスを使う
      浮動小数点演算は科学技術計算に利用するもので、誤差が発生する。これに対して、クラス「BigDecimal」は、文字列で数値の計算を行うので、金額などの正確な計算に適している。BigDecimal ではインスタンス生成時に指定された桁数での精度が保証される。

    • 数値の比較は精度に気をつける
      良い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +if (a.compareTo(b) == 0) {
      +    System.out.println("一致");
      +}

      悪い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +
      +if (a.equals(b)) {
      +    System.out.println("精度が違うためこの分岐には入らない");
      +}
    • 低精度なプリミティブ型にキャストしない

    • BigDecimalString変換する際はtoString()ではなくtoPlainString()を利用すること
      toString()を利用した場合、指数表記になることがあります。

    日付

    • 日付の文字列のフォーマットには、SimpleDateFormatまたはDateTimeFormatterを使う
      良い例:

      java
      Date date = new Date();
      +SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
      +String s = dateFormat.format(date);

    三項演算子

    • 入れ子の三項演算子の利用は禁止
      可読性が悪くなるので三項演算子を入れ子で行うのは禁止。

    コレクション

    • Java2 以降のコレクションクラスを利用する
      Vector クラス、Hashtable クラス、Enumeration 等は、特にこれらを利用する理由がなければ、インターフェースを統一する目的で、これらの代わりにList(ArrayList クラス)、Map(HashMap クラス)、Iterator を使用すること。List などのインターフェースを利用することで JDK1.2 で整理されたわかりやすいメソッドを利用でき、また、インターフェースの特性から呼び出し元を変更せずに実装クラスを変更することができる。

    • 特定の型のオブジェクトだけを受け入れるコレクションクラスを利用する

      良い例:

      java
      List<Map<String, String>> list = new ArrayList<>();
    • ListのソートはList.sort()を利用する
      Listクラスの要素をソートする際は Java8 で追加されたList.sort()を利用すること。
      Java 7 以前で利用されていたCollections.sort()は利用しないこと。

    • Collection.forEach()は利用しない。拡張 for 文の利用を検討する
      Java8 で追加されたメソッド。
      拡張 for 文を利用したほうが多くの場合でデバッグに有利であり、可読性においてもforEachの優位性は少ないため、forEachは原則利用しない。拡張 for 文を利用する。
      具体的には下記のメソッドを利用しないこと。

      • Collection#forEach
      • Set#forEach
      • List#forEach

      Map#forEachはこの限りではない

      良い例:

      java
      for (String s : List.of("A", "B")) {
      +    //処理
      +}

      悪い例:

      java
      List.of("A", "B").forEach(s -> {
      +    //処理
      +});

      ただし、メソッド参照で処理できる場合はforEachを利用する。
      (デバッグのデメリットがほとんどなく、他と比較して処理効率が良いため)

      良い例:

      java
      List.of("A", "B").forEach(this::process);

      悪い例:

      java
      for (String s : List.of("A", "B")) {
      +    this.process(s);
      +}
    • Arrays.asList()は利用せず、List.of()を利用する
      Java9 で追加されたメソッド。
      配列をListに置き換える場合や、単純な固定のListを生成する際にはList.of()を利用する。

      • Arrays.asList()List.of()の違い
        List.of()で生成したListは、完全に不変(Immutable)なListで、
        Arrays.asList()で生成したListは、サイズのみ不変で、set等による値の操作が可能なListです。
        また、setを行った場合、Arrays.asList()に与えられた配列インスタンスにも影響します。

    ラムダ式・メソッド参照・コンストラクタ参照

    • ラムダ式が利用できる箇所はラムダ式を利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • ただし、メソッド参照・コンストラクタ参照が利用できる場合はメソッド参照・コンストラクタ参照を利用する

      良い例:

      java
      String::compareToIgnoreCase

      悪い例:

      java
      (s1, s2) -> s1.compareToIgnoreCase(s2)

      良い例:

      java
      BigDecimal::add

      悪い例:

      java
      (b1, b2) -> b1.add(b2)
    • ラムダ式記述の際、型宣言は省略記法で記述する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (String s1, String s2) -> s1 + "=" + s2
    • 原則ラムダ式内の行数は 1 行とする
      複数行で利用したい場合は、privateメソッドを作成しメソッド参照を利用する

      良い例:

      java
      this::getMax
      +
      +private int getMax(int i1, int i2) {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}

      悪い例:

      java
      (i1, i2) -> {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}
    • 原則ラムダ式は 1 行記述に限定するので、中カッコ、returnは必ず省略する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (s1, s2) -> {
      +    return s1 + "=" + s2;
      +}

    実質的 final(effectively final)

    • 実質的 final を利用する
      変数宣言にfinalを記載しなくてよい。

    Stream API

    • 利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • 並列ストリームは利用しないこと
      悪い例:

      java
      Stream<?> s = list.parallelStream();
      +Stream<?> s = list.stream().parallel();
    • StreamAPI 記述の際の改行位置は、各中間処理・末端処理前のピリオドの前で改行する

      良い例:

      java
      List<Character> alphabetLower = list.stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .collect(Collectors.toList());

      悪い例:

      java
      List<Character> alphabetLower = list.stream().filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase).collect(Collectors.toList());
      +
      +List<Character> alphabetLower = list
      +    .stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .collect(Collectors.toList());
    • インデントは統合開発環境の提供するフォーマッタに合わせる

    • 中間処理の数は 3 つ(3 行)程度までを推奨する
      中間処理の記述が多くなると可読性も悪くなり、デバッグも難しくなるため、3 行程度を目安にロジックを検討すること。

    • コメントは、原則として処理中には記載しない
      難解になってしまった場合のみ処理中の記載を認める

      良い例:

      java
      // クラスFooのフィールドStrの値で昇順にソートし、フィールドStrの要素を取得して処理する。
      +hogeList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    .map(Foo::getStr)
      +    .forEach(this::proc);

      悪い例:

      java
      hogeList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr)) //クラスFooのフィールドStrの値で昇順にソート
      +    .map (Foo::getStr) //フィールドStrの要素を取得
      +    .forEach(this::proc); //処理
      +
      +
      +hogeList.stream()
      +    //クラスFooのフィールドStrの値で昇順にソート
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    //フィールドStrの要素を取得
      +    .map (Foo::getStr)
      +    //処理
      +    .forEach(this::proc);
    • Stream は極力変数代入しないこと
      Stream は中間処理、末端処理を行うと使用済みとなり、以降同じインスタンスは利用できない。
      変数代入はほとんどの場合意味をなさず、むしろミスの元となるため極力変数代入はしないこと。

      良い例:

      java
      List<String> list1 = Stream.of("A", "B", "C")
      +        .map(String::toLowerCase)
      +        .collect(Collectors.toList());
      +
      +List<String> list2 = Stream.of("A", "B", "C")
      +        .map(s -> s + s)
      +        .collect(Collectors.toList());

      悪い例:

      java
      Stream<String> stream = Stream.of("A", "B", "C");
      +Stream<String> stream1 = stream.map(String::toLowerCase);
      +List<String> list1 = stream1.collect(Collectors.toList());
      +
      +Stream<String> stream2 = stream.map(s -> s + s);//コーディングミス streamは使用済のためエラーになる
      +List<String> list2 = stream2.collect(Collectors.toList());

    Optional

    • Optional は同メソッド内で値を取り出す場合は極力変数代入しないこと
      Optional とその値の変数は同じものを示す名前となり、同じ意味の変数名が複数現れることで可読性が下がるため、Optional の変数代入は行わないこととする。

      良い例:

      java
      Employee employee = findEmployee(employeeId)
      +        .orElseThrow(IllegalArgumentException::new);

      悪い例:

      java
      Optional<Employee> employeeOpt = findEmployee(employeeId);
      +Employee employee = employeeOpt.orElseThrow(IllegalArgumentException::new);

      直接、値を取り出すことなくOptionalでのみ扱う場合はOptionalを変数代入してもよい。

      良い例:

      java
      Optional<Employee> employee = findEmployee(employeeId);
      +
      +Dept dept = employee.map(Employee::getDivision)
      +        .map(Division::getDept)
      +        .orElse(null);
      +
      +Role role = employee.map(Employee::getRole)
      +        .orElse(null);
      +
      +//-----
      +
      +Optional<Employee> employee = findEmployee(employeeId);
      +//・・・処理
      +return employee;

    var (Local-Variable Type Inference)

    次のリンクも参考にしてください。
    Style Guidelines for Local Variable Type Inference in Java

    • 明確な方針で、利用する・利用しないを統一すること
      方針無く、varを混在させるとソースコードの見通しと保守性が悪くなります。
      各プロジェクトで、例えば以下ののような方針で統一してください。

      1. varを利用しない
      2. 原則varを利用する
      3. 右辺で、明確に型がわかる場合はvarを利用する

      以下で23について例を示します。

      • 原則varを利用する

        利用できる箇所は全てvarを利用します。

        良い例:

        java
        var a = "";
        +var b = 123;
        +var c = new ArrayList<String>();

        悪い例:

        java
        var a = "";
        +int b = 123;
        +List<String> c = new ArrayList<>();
        java
        void methodA() {
        +    var a = "";
        +}
        +void methodB() {
        +    String a = "";
        +}
      • 右辺で、明確に型がわかる場合はvarを利用する

        右辺をみて型がわかる場合は、全てvarを利用します。 それ以外はvarを利用してはいけません。

        良い例:

        java
        var s = ""; // リテラルによって型が明確に判断できます
        +var list1 = new ArrayList<String>(); // newによって型が明確に判断できます
        +var list2 = (List<String>) map.get("p"); // キャストによって型が明確に判断できます
        +var list3 = List.of("A", "B", "C"); // ファクトリーによって型が明確に判断できます

        プロジェクトで観点を決めるべき例:

        java
        var b1 = s.isEmpty(); // \`is\`で始まるメソッドは通例としてbooleanを返します
        +var b2 = Objects.equals(s1, s2); // \`equals\`メソッドは通例としてbooleanを返します
        +var i1 = Objects.hash(s); // \`hash\`、\`hashCode\`メソッドは通例としてintを返します
        +var i2 = Objects.compare(s1, s2); // \`compare\`、\`compareTo\`メソッドは通例としてintを返します

        悪い例:

        java
        var a = e.getData(); // \`e\`の型と、メソッド定義がわからなければ型が判断できません

    ストリーム(InputStream OutputStream)

    • ストリームを扱う API を利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • ObjectOutputStream ではreset()を利用する

    リソースの解放

    • リソース解放を必要とするクラスを利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • リソース解放を必要とするクラスを作成する場合はAutoCloseableimplementsする
      AutoCloseableimplementsすることで try-with-resources 文が利用できるようになります。

    例外

    • catch 文で受け取る例外は、詳細な例外クラスで受け取る

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (IOException e) {
      +    log.error("Error", e);
      +    throw e;
      +}

      悪い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (Exception e) {//範囲が広すぎる例外クラスの利用はNG
      +    log.error("Error", e);
      +    throw e;
      +}
    • Exception クラスのオブジェクトを生成してスローしない

    • catch ブロックでは基本、例外処理をする。ただし処理を書いてはいけない部分もあるので、その部分については、"// ignore" というコメントを記述すること。

    • 例外クラスは無駄に定義しない

    ガベージコレクション

    • 原則finalize()のオーバーライド実装は禁止
    • もしfinalize()をオーバーライドした場合はsuper.finalize() を呼び出す
    • アプリケーションからfinalize()を呼び出さない

    コメント規約

    よいコメントの鉄則

    • コードを明確化するコメントを書く
      コードにコメントを書く理由は、自分自身、一緒に仕事をしている人、後に関わる開発者にとってコードをより理解しやすいものにするためである。

    • コメント化する価値がないプログラムならば、実行するに値しない
      有用な格言。コメントは必須。

    • 過剰な装飾は使わない (例:見出し状のコメント)
      1960 年代から 1970 年代の典型的な COBOL プログラマにはアスタリスク( * )でコメントを囲った箱を書く習慣があった。彼らの芸術的な主張を表わしているのかもしれないが、率直に言えばそれは製品に加わるちょっとした価値に比べれば大きな時間の無駄である。かわいいコードではなくきれいなコードを書くはずである。さらに、コードを表示するディスプレイや印刷するプリントに使われるフォントはプロポーショナルだったりそうでなかったりして、箱をきれいに整列させることは難しい。

    • コメントはシンプルに
      かつて見たもっとも最良のコメントは、シンプルな要点をまとめた注釈であった。なにも本を書く必要はなく、他の人がコードを理解するに十分な情報を提供するだけでよいのである。

    • コードを書く前に先にコメントを記述する
      コードをコメント化する最良の方法は、コードを書く前にコメントを書くことである。それが、コードを書く前にコードがどのように動作するかについて考えるよい機会となり、コメントの存在を保障することにもつながる。少なくともコードを書いた時にコメントすべきである。コメントによってコードが理解しやすくなることで、コードの開発中にアドバンテージを得ることができる。コードにコメントを書く時間を費やせば、それによって得られるものがある。

    • コメントには、なぜそうなのかを書く。コードを読めば分かることを書かない
      基本的に、コードの一部分を見ればそれが何かを理解することはできる。例えば、以下のコードを見て、$1000 以上の注文については 5%ディスカウントされることは理解できる。なぜそうなのか?大きな注文ではディスカウントがつきものだというビジネスルールがあるのだろうか?大きな注文に時間限定サービスがあるのか、それともずっとサービスがあるのか?これを書いたプログラマの気前がよかったのか?
      どこかソースコード中か別な文書にコメントされていない限り、それがなぜなのかを知ることはできない。

      java
      if (grandTotal >= 1000.00) {
      +    grandTotal = grandTotal * 0.95;
      +}

      なお、メソッドコメントには、適切な javadoc コメント(タグ)のほかに、以下の内容も可能な限り明記すること。

      • 副作用のある処理の場合は、その内容 (→ メソッドの引数オブジェクトがメソッド内で変更されるケースなど)
      • 既知のバグ (→ 判明しているが修正しないことにした場合など)
      • 影響のある事前条件、事後条件 (→ メソッドが正しく動作するための前提について)
      • 並行性 (→  マルチスレッドでアクセスされた場合の動作について)
      • 該当メソッドの使用例やサンプルコード
    • TODO コメント
      設計者確認待ち、共通処理の作成待ちなどの理由により、実装時に TODO がある場合、下記のようにコメントを記述する。
      (Eclipse の TODO コメント形式を採用)
      例)

      //TODO:ワークフローの仕様決定待ち 関連チケット#12345

    Java コメント(3 種類)の使い分け

    Java では 3 種類のコメントが使える。javadoc コメントは/**で開始され、*/で終わる。C 風コメントは/*で開始され*/で終わる。単一行コメントは//で開始され、そのソースコード行が終わるまで続く。以下の表ではコメントの使い方とその例を示す。(コメントのスタイルに関しては、前述の「標準規約に準拠したコーディング例」を参照)

    コメント種類使用方法
    javadoc コメント
    /** comment */
    interface、class、メソッド、フィールドの直前に書く。コメントは javadoc によって処理され、外部ドキュメント(HTML)として生成される。(この形式以外のコメントはドキュメントとして出力されないことに注意)/*_
    _ 顧客(Customer)-
    _ 顧客はわれわれがサービスまたは製品を売った人物
    _ もしくは組織のいずれかである。
    _ @author 開発太郎
    _/
    C 風コメント
    /* comment */
    特定のコードを無効化したいが、後で使用するかもしれないので残しておくためにコメント化する時や、デバッグ時に一時的に無効化するときに使用する。/_
    このコードは J.T.Kirk によって 1997.12.9 に前述のコードと置き換えたためコメント化した。2 年間不要であるならば削除せよ。
    ... (ソースコード)
    _/
    単一行コメント
    // comment
    メソッド内にて、ビジネスロジック、コードの概要、一時変数の定義内容などを記述する。// 1995 年 2 月に開始された X 氏の寛大なキャンペーンで
    // 定められた通り 1000$を超える請求には、全て 5%割引を
    // 適用する。

    ※ ロジック中に、頻繁に C 風コメントでコメントを書くとまとめてコメントアウトする場合に不便なため、基本的にロジック中では単一行コメントを利用すること。

    パフォーマンス

    パフォーマンスを考慮した Java のコーディングについて以下に示す。

    ※ パフォーマンスは jre のバージョンやスペックによって変化します。本内容は jre1.8.0_74 での検証結果を元にした内容です。

    ※ 性能計測結果についての記載がありますが、あくまでも参考値です。性能を保証するものではありません。

    Stream API

    Java8 で追加された Stream API での記述は、可読性も高く、簡潔に書けますが、パフォーマンス・性能面で注意が必要な場合があります。

    List の処理を行う際、拡張 for 文で処理する場合は Iterator インスタンスが 1 つだけ生成されますが、Stream API で処理する場合、最初の Stream インスタンスに加え、各中間処理ごとにも Stream インスタンスが生成され、その分の性能劣化が懸念されます。
    以下に処理例と計測結果を記載します。

    • 拡張 for 文

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = new ArrayList<>();
      +for (String string : list) {
      +    if (string.endsWith("0")) {
      +        resultList.add(string);
      +    }
      +}
      +return resultList;
    • Stream API

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = list.stream()
      +    .filter(s -> s.endsWith("0"))
      +    .collect(Collectors.toList());
      +return resultList;
    • 計測結果

      処理する List の件数拡張 for 文 (ms)StreamAPI (ms)
      100 万件79
      1,000 万件88114
      1 億件9491,026
      2 億件1,8222,081

    小中規模の処理量であれば考慮するほどの性能差はありませんが、大量の処理が見込まれる場合は考慮が必要です。
    また、Stream API は並列処理(スレッド処理)の機能をサポートしていますので、利用できる場合は並列処理も含めての検証が必要です。

    ラムダ式・メソッド参照・コンストラクタ参照

    Java8 で追加されたラムダ式・メソッド参照・コンストラクタ参照は、匿名クラスを利用するよりも効率的です。
    積極的な利用を推奨します。

    以下に Comparator を生成した場合の計測結果を記載します。

    • 匿名クラス

      java
      Comparator<String> c = new Comparator<String>() {
      +    @Override
      +    public int compare(String o1, String o2) {
      +        return o1.compareToIgnoreCase(o2);
      +    }
      +};
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> o1.compareToIgnoreCase(o2);
    • メソッド参照

      java
      Comparator<String> c = String::compareToIgnoreCase;
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)メソッド参照 (ms)
      10 億回3800(計測不能)0(計測不能)
      100 億回6,3740(計測不能)0(計測不能)
      1 京回(30 秒以上)1410

    ラムダ式は外部の変数を利用する場合、匿名クラスとほぼ同じ動作をします。

    • 匿名クラス

      java
      new Comparator<String>() {
      +        @Override
      +        public int compare(String o1, String o2) {
      +            return arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                            : o1.compareToIgnoreCase(o2);
      +        }
      +    }
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                    : o1.compareToIgnoreCase(o2);
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)
      10 億回(パラメータあり)571572
      100 億回(パラメータあり)9,9009,864

    文字列連結

    文字列連結(繰り返し)

    文字列連結を繰り返し処理中で行う際、+演算子で処理することはアンチパターンとして知られています。
    繰り返し処理中の文字列連結は、 StringBuilderStringJoinerStringBuffer を利用します。
    また、コレクション要素の結合であればString#joinが利用できます。

    以下に処理例と計測結果を記載します。

    • +演算子

      java
      String s = "";
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        s += ",";
      +    }
      +    s += string;
      +}
      +return s;
    • StringBuilder

      java
      StringBuilder sb = new StringBuilder();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • StringBuffer

      java
      StringBuffer sb = new StringBuffer();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • String#join

      java
      return String.join(",", list);
    • 計測結果

      処理する List の件数+演算子 (ms)StringBuilder (ms)StringBuffer (ms)String#join (ms)
      1,000 件50(計測不能)0(計測不能)0(計測不能)
      1 万件1,016111
      10 万件(30 秒以上)255
      100 万件(30 秒以上)294251

    文字列連結(定数)

    基本的に処理中の文字列連結では+演算子は使わないで処理するほうがパフォーマンスが高くなりますが、定数の場合は+演算子で定義するほうがパフォーマンスが高いです。

    たとえば以下のように、処理したい場合、

    java
    private static final String CONST_A = "A";
    +private static final String CONST_B = "B";
    +private static final String CONST_AB = CONST_A + CONST_B;

    StringBuilder で処理しようとすると以下のようになります。

    java
    private static final String CONST_AB = new StringBuilder(CONST_A).append(CONST_B).toString();

    しかし、これらをバイトコード上で確認するとそれぞれ以下のようになります。

    • +演算子

      java
      private static final java.lang.String CONST_AB = "AB";
    • StringBuilder

      java
      private static final java.lang.String CONST_AB;
      +
      +static {};
      +   0  new java.lang.StringBuilder [20]
      +   3  dup
      +   4  ldc <String "A"> [8]
      +   6  invokespecial java.lang.StringBuilder(java.lang.String) [22]
      +   9  ldc <String "B"> [11]
      +  11  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [26]
      +  14  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [30]
      +  17  putstatic jp.co.packagename.ClassName.CONST_AB : java.lang.String [34]
      +  20  return

    +演算子を利用した場合コンパイル時に最適化され、文字列"A""B"をあらかじめ結合して class が作成されます。
    StringBuilderを利用した場合は最適化はされず、記述した通りの処理が行われます。

    計測した場合、下記のようになります。

    • 計測結果

      処理回数StringBuilder (ms)+演算子 (ms)
      5,000 万回5590(計測不能)
      1 億回1,0590(計測不能)

    通常、定数処理を大量に処理することは考えられないので性能問題になることはありませんが、+演算子を利用したほうがパフォーマンスが高いこともあるということを理解してください。

    List の種類

    ListにはArrayListのようなRandomAccessを implements した、ランダムアクセスをサポートしているクラスと、
    LinkedListのようなランダムアクセスをサポートしていない(シーケンシャルアクセス)クラスが存在します。
    RandomAccessではないListは、List#getなどインデックスを利用するような操作のパフォーマンスが低いので注意してください。

    以下に処理例と計測結果を記載します。

    • for 文(List#get(int)によるループ)

      java
      int size = list.size();
      +for (int i = 0; i < size; i++) {
      +    String s = list.get(i);
      +    //処理
      +}
    • 拡張 for 文

      java
      for (String s : list) {
      +    //処理
      +}
    • forEach

      java
      list.forEach(this::処理);
    • 計測結果

      処理する List の件数ArrayList
      for 文(List#get(int)によるループ) (ms)
      LinkedList
      for 文(List#get(int)によるループ) (ms)
      ArrayList
      拡張 for 文 (ms)
      LinkedList
      拡張 for 文 (ms)
      ArrayList
      forEach (ms)
      LinkedList
      forEach (ms)
      1 万件0(計測不能)730(計測不能)0(計測不能)0(計測不能)0(計測不能)
      10 万件0(計測不能)7,5760(計測不能)0(計測不能)12
      20 万件0(計測不能)17,7400(計測不能)0(計測不能)0(計測不能)0(計測不能)
      50 万件0(計測不能)(30 秒以上)0(計測不能)20(計測不能)2
      100 万件1(30 秒以上)0(計測不能)40(計測不能)4
      1,000 万件16(30 秒以上)845644

    ランダムアクセスをサポートしているListがシーケンシャルアクセス(iterator を利用した処理など)で遅いということはないので、
    ループの処理は拡張 for 文等、Iterator によるループで記述するのが無難です。
    List#getでの処理をすべて禁止することはできませんが、高いパフォーマンスが求められる場合はListの種類にも注目してみてください。

    String から Integer・Long への変換

    数値文字列のStringIntegerに変換するには、Integer#valueOf(String)を利用して下記のように記述します。

    java
    String s = "1";
    +Integer value = Integer.valueOf(s);

    しかし、下記のようにも記述できます。

    java
    String s = "1";
    +Integer value = new Integer(s);

    これらの違いは、
    new Integer(s)とした場合、必ず Integer インスタンスが生成されますが、
    Integer.valueOf(s)とした場合は -128 から 127 の間の数値であればキャッシュから取り出すためインスタンスを生成しません。

    このため、前者のInteger#valueOf(String)を利用した記述のほうが効率的です。
    Long#valueOf(String)も同様です。

    性能差が少ないため、ほとんど問題にはなりませんが、FindBugs 等、静的解析で検出される問題のため、理解が必要です。

    また、String からの変換だけでなく、int や long からの変換も#valueOfが効率的ですが、オートボクシングを利用した場合、コンパイルで自動的にこれらの処理に変換されるため、記述することはありません。

    String から int・long への変換

    数値文字列のStringintに変換するには、Integer#parseInt(String)を利用して下記のように記述します。

    java
    String s = "1";
    +int value = Integer.parseInt(s);

    しかし、オートボクシングが利用できるため、意図せず下記のように記述ミスをする場合があります。

    java
    String s = "1";
    +int value = Integer.valueOf(s);//取得したIntegerインスタンスをオートボクシングでintにcastしている
    java
    String s = "1";
    +int value = new Integer(s);//生成したIntegerインスタンスをオートボクシングでintにcastしている

    「オートボクシング」の説明に記載した通り、性能に差が出るだけでなく、
    記述から明らかにミスであることが解るため、FindBugs 等、静的解析で検出されるコードです。

    longへの変換の場合はLong#parseLong(String)を利用します

    以下に計測結果を記載します。

    • 計測結果

      処理回数Integer.valueOf(String) (ms)Integer#parseInt(String) (ms)
      1,000 万回396318
      1 億回4,0603,077

    BigDecimal の ZERO との比較

    BigDecimal の正・負・ZERO の判定はBigDecimal#signumを利用します。
    compareToを利用してBigDecimal.ZEROと比較しても同じことができますが、signumを利用したほうが効率的です。

    以下に処理例と計測結果を記載します。

    • compareTo 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.compareTo(BigDecimal.ZERO) == 0) {
    • signum 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.signum() == 0) {
    • 計測結果

      (単位:マイクロ秒)

      処理回数compareTo 利用 (マイクロ秒)signum 利用 (マイクロ秒)
      1 京回527
      max:26,367
      min:0
      424
      max:21,213
      min:0

    性能差が少ないので、必ずしも signum を利用する必要はありませんが、大量に処理する場合など、高いパフォーマンスが求められる場合は意識してください。


    License

    CC-By-4.0

    `,178))])}const b=a(h,[["render",k]]);export{y as __pageData,b as default}; diff --git "a/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.md.CNbXdYCI.js" "b/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.md.CNbXdYCI.js" new file mode 100644 index 00000000..d7e7200f --- /dev/null +++ "b/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.md.CNbXdYCI.js" @@ -0,0 +1,479 @@ +import{_ as a,c as n,G as l,a3 as p,B as e,o as t}from"./chunks/framework.BDUoXecB.js";const y=JSON.parse('{"title":"Javaコーディング規約 for Java8","description":"","frontmatter":{"sidebarDepth":4,"title":"Javaコーディング規約 for Java8","author":"Future Enterprise Coding Standards","head":[["meta",{"name":"keywords","content":"Javaコーディング規約,Java8,コーディング規約,Java"}]]},"headers":[],"relativePath":"documents/forJava/Javaコーディング規約_for_8.md","filePath":"documents/forJava/Javaコーディング規約_for_8.md"}'),h={name:"documents/forJava/Javaコーディング規約_for_8.md"};function k(r,s,d,E,g,c){const i=e("page-title");return t(),n("div",null,[l(i),s[0]||(s[0]=p(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    一般に利用・参照されている Java コーディング規約やガイドラインを以下に示す。本規約の作成においても、下記規約類を参照・抜粋している。

    規約著作者URL
    Code Conventions for the Java Programming LanguageSun Microsystemshttp://www.oracle.com/technetwork/java/codeconvtoc-136057.html
    Writing Robust Java CodeScott W. Amblerhttp://www.ambysoft.com/downloads/javaCodingStandards.pdf
    オブジェクト倶楽部版 Java コーディング標準オブジェクト倶楽部http://objectclub.jp/community/codingstandard/CodingStd.pdf
    電通国際情報際サービス版 Java コーディング規約 2004電通国際情報サービスhttp://objectclub.jp/community/codingstandard/JavaCodingStandard2004.pdf
    JJGuideline (Java - J2EE Conventions and Guidelines)Stephan.J & JCS Teamhttp://www.fedict.belgium.be/sites/default/files/downloads/Java_J2EE_conventions_and_guidelines_EN.pdf
    Google Java Style (非公式和訳)Googlehttps://kazurof.github.io/GoogleJavaStyle-ja/
    Acroquest Technology Java コーディング規約Acroquest Technologyhttps://www.acroquest.co.jp/webworkshop/javacordingrule/Acroquest_JavaCodingStandard_6_7.pdf
    ※現在は削除されています

    ※ Sun Microsystems の規約は Java 草創期から一応の標準という位置づけだったが、オブジェクト指向、及び、その開発環境の普及・発展によって、設計やコーディングにおいて、直接的に有用な知識や豊富な指針を含むような優れた規約や、ツールなどによる機械的な準拠チェックと連携する規約が普及してきている。

    規約の重要性

    標準としての規約を定義し、遵守することの重要性を以下に示す。

    • ソフトウェアメンテナンスにおける、可読性・保守性・拡張性の向上
    • 問題を起こしやすい実装を未然に回避することによる、品質・生産性の向上
    • 標準規約を通して得られる一般的な実装知識やノウハウ(=学習効果)

    コーディングの心得

    長いプログラムを記述すること(ステップ数)によって生産性が評価されたのは、過去の時代の出来事である。現在は、クラスやメソッドの役割が明確で、ロジックが読みやすく、保守性に優れたプログラムを記述することが評価される。コーディング規約は、コードの書き方に関する一種のパターンと考えることもでき、コードの保守性を向上させる具体的な方法を示している。したがって、規約の一つ一つの意図を理解し、守ることが重要になる。しかし、保守性に優れたコードを作成するためには、コーディング規約を守ることに加えて、良いコードを記述するための基本的な心構えをしっかり心に留めておく必要がある。以下では、その心得について述べる。

    【コーディングの心得 5 か条】

    1. 見やすさを重視せよ
    2. ネーミングはわかりやすく
    3. サンプルを鵜呑みにしない
    4. 同じコードを二度書かない
    5. 役割は一つに

    見やすさを重視せよ

    「良いコード」の基本は、「他の人が読んでもわかりやすいと感じられるコード」。コードの見やすさは、フォーマットはもちろん、ロジックの簡潔さや API の常識的な使い方などから生まれる。コーディングにあたっては、常に他の人の視点を意識しながら、見やすさに気を配って記述する必要がある。例えば、自分で記述したコードであっても、しばらくたってから読み返してみると理解に時間がかかった経験は誰にもあるはず。「3 日前に書いたコードは他人のコードと同じ」ということもよく言われる。見やすさを重視することは、他の人のためだけでなく自分のためにもなる。コードを読んでもすぐに理解できないような実装は、再考(リファクタリング)の必要がある。

    ネーミングはわかりやすく

    コーディングでは、様々な変数やメソッドなどにネーミング(名前付け)する必要がある。ネーミングとは、本来、その対象の本質を表すような名前を考える作業である。大変難易度の高い作業だが、一方で適当に行ってもコードの動作は変わらないため、人によっては手を抜きがちとなる。しかし、ネーミングの良し悪しは、コードの可読性に非常に大きな影響を及ぼす。例えば、「C0001」というクラス名があるとする。これでは、何を表すクラスなのかすぐにはわからないだろう。また、「int p = 5000;」という記述があるとする。プログラマに聞くと、変数名 p は価格(Price)の略だと言うのだが、それならば略さずに、「int price = 5000;」としたほうが分かりやすいはずである。「ネーミングはわかりやすく」の背景には、読んで内容が理解できるという意味で、文章のようなプログラミングを行う、という考え方に基づく。

    サンプルを鵜呑みにしない

    サンプルコードを活用すること自体は、著作権等を侵害しなければ問題ない。問題なのは、その内容や背景を理解しないまま、サンプルコードだけを鵜呑みにして、「おまじない」として表面的に適用してしまうことである。コードを「おまじない」ととらえていては、サンプルコードの間違いを気づかないまま適用してしまうこともある。例えば、ストリームのクローズ処理を行っていないサンプルコードであっても、それに気づかずに自分のコードに適用してしまい、後で思わぬ障害を引き起こすという可能性がある。サンプルコードは、そこで説明する内容に絞ったコードが多いため、このような例はよく見られる。また、サンプルコードをそのまま適用した結果、自分が記述すべきコードには必要のないコードが含まれてしまう場合もある。その場合、コードの可読性を下げる原因となる。自分のコードは、自分で深く理解して記述すべきである。

    同じコードは二度書かない

    コードをコピー・ペーストしていませんか?コピー・ペーストしてしまうと、何らかの修正をする際に、全ての個所に同じ修正をする羽目になる。同じコードが現れるようならまとめて一つにし、外に出してコールするような書き方にすべきである。同じコードをまとめる作業は、どちらかといえば、コーディング時よりリファクタリング(ソフトウェアの外部的振る舞いを変更せずに内部構造を改善する作業)で行われることが多い。しかし、コーディング時からできるだけ気をつけておきたいことでもある。

    役割は一つに

    メソッドの役割が明確で、かつ 1 つであれば単体テストが行いやすくなる。つまり、コードの「試験性」が高まる。また、役割が一つであれば、後でコードを変更する際に修正箇所がわかりやすいため、障害修正に要する時間が短くなる。つまり、コードの「保守性」があがることになる。例えば、「チェックをして実行する」機能を実現するために、checkAndDo()メソッドが存在したとする。この場合、このメソッドは check()メソッドと do()メソッドに分割すべきである。なぜなら、checkAndDo()メソッドの check()ロジックに誤りがあった場合、do()メソッドに書かれる内容まで把握する必要が生じるためである。分割してあれば、check()メソッドだけの変更で済む。このことはクラスの設計にもあてはまる。

    ネーミング規約

    全般

    • 大文字・小文字の違いで名前を区別しない。

      良い例:

      java
      private int carNumber;
      +private int trainNumber;

      悪い例:

      java
      private int num;
      +private int Num;

    パッケージ

    • パッケージ名はすべて小文字にする
    • パッケージ名は意味のある名前にする
    • サブパッケージ名の重複は可能

    クラス

    • クラス名は単語の先頭を大文字にする
      良い例:

      java
      public class Entry {

      悪い例:

      java
      public class entry {
    • インターフェース名、Enum 名はクラス名に準ずる

    メソッド

    • コンストラクタと同じ名前のメソッドはつくらない

    • メソッド名は区切りのみ大文字にする
      良い例:

      java
      public String getName() {
      +    //・・・
      +}

      悪い例:

      java
      public String getname() {
      +    //・・・
      +}
      +public String GETNAME() {
      +    //・・・
      +}
    • 変換メソッド名は「"to"+オブジェクト名」にする
      良い例:

      java
      public String toString() {

      悪い例:

      java
      public String string() {
    • ゲッターメソッド名は「"get"+属性名」にする
      型がbooleanの場合は「"is"+属性名」にする

    • セッターメソッド名は「"set"+属性名」にする

    • boolean変数を返すメソッド名はtrue/falseの状態がわかるようにする

      良い例:

      java
      public boolean isAsleep() {
      +}
      +public boolean exists() {
      +}
      +public boolean hasExpired() {
      +}

    引数

    • メソッドのパラメータ名とインスタンス変数名を一緒にしない
      ただし、アクセサメソッドやコンストラクタなど、統合開発環境の機能により自動生成するものに関しては可とする。
      アンダースコア _ をつけての区別は原則禁止とする。

      良い例:

      java
      public double calc(double rate) {
      +    return this.value * rate;
      +}

      悪い例:

      java
      public double calc(double value) {
      +    return this.value * value;
      +}
      +
      +public double calc(double _value) {
      +    return this.value * _value;
      +}

    変数全般

    • boolean変数はtrue/false の状態がわかるようにする

      良い例:

      java
      private boolean isOpen;

      悪い例:

      java
      private boolean flag;
    • 定数は全てstatic finalとし、すべて大文字、区切りは"_"

      良い例:

      java
      private static final String SYSTEM_NAME = "販売管理システム";
    • 変数名は小文字とし、単語の区切りのみ大文字にする

      良い例:

      java
      private String thisIsString;

      変数名に固有名詞が含まれる場合、先頭をのぞき、単語の区切り以外に大文字を使用してもよい

      良い例:

      java
      private String thisIsIPAddress;

    ローカル変数

    • スコープが狭い変数名は省略した名前でもよい
      良い例:

      java
      if (・・・) {
      +    String s = "・・・・";
      +   //変数sを利用した処理 数行
      +}

      悪い例:

      java
      String s = "・・・・";
      +if (・・・) {
      +   //変数sを利用した処理
      +}
      +・・・
      +if (・・・) {
      +   //変数sを利用した処理
      +}

      変数sの利用範囲が広いので役割が明確になる変数名に変更する。

    • for 文のループカウンタは、ネストごとに"i","j","k"・・・を使う

    Enum

    • Enum 名はクラス名と同じく、単語の先頭を大文字にする

    • 列挙定数は定数と同じく、すべて大文字、区切りは"_"

      良い例:

      java
      enum Season {
      +    WINTER,
      +    SPRING,
      +    SUMMER,
      +    FALL
      +}

      悪い例:

      java
      enum Season {
      +    winter,
      +    spring,
      +    summer,
      +    fall
      +}

    コーディング規約

    全般

    • 原則としてオブジェクトの参照にはインターフェースを利用する
      オブジェクトを参照する際は、そのオブジェクトの実装クラスを用いて宣言できるが、実装クラスに適切なインターフェースが存在している場合は、必ずインターフェースを用いて宣言すること。

      良い例:

      java
      List<Entry> list = new ArrayList<>();
      +Map<String, String> map = new HashMap<>();

      悪い例:

      java
      ArrayList<Entry> list = new ArrayList<>();
      +HashMap<String, String> map = new HashMap<>();
    • 推奨されない API を使用しない
      アノテーション@Deprecatedで指定されたメソッドは利用しないこと。

    • 使われないコードは書かない

    • 宣言は適切な権限で行うこと(public, protected, private

    • final を適切に利用する
      継承されないクラス、オーバーライドされないメソッド、値の変わらない変数(つまり定数)等、変化のないもの/変化させたくないものについてはfinal で宣言する。

      良い例:

      java
      //継承されないクラス
      +public final class CalculateUtils {
      +    //・・・
      +}
      +
      +//値の変わらない変数(定数)
      +private static final String MESSAGE = "・・・";
      +
      +//オーバーライドされないメソッド
      +public final int sum(/*変化させたくない値*/final int... values) {
      +    int sumValue = 0;
      +    for (/*変化させたくない値*/final int value : values) {
      +        sumValue += value;
      +    }
      +    return sumValue;
      +}

    フォーマット

    • インデントは空白文字 4 文字分の Tab を使用する

    • 長すぎる行は避ける

    • { の後にステートメントを記述しない
      良い例:

      java
      if (s == null) {
      +    return 0;
      +}

      悪い例:

      java
      if (s == null) {return 0;}
    • 1 行に 2 つ以上のステートメントを記述しない
      悪い例:

      java
      } catch (Exception e) {
      +    log.error("Error", e);return null;
      +}
    • カンマの後には空白文字を
      良い例:

      java
      process(x, y, z);

      悪い例:

      java
      process(x,y,z);
    • 代入演算子( = , += , -= , …)の前後には空白文字を挿入する
      良い例:

      java
      int a = x;
      +a += 10;

      悪い例:

      java
      int a=x;
      +a+= 10;
    • for 文内のセミコロンの後には空白文字を挿入する
      良い例:

      java
      for (int i = 0; i < array.length; i++) {
      +    //・・・
      +}

      悪い例:

      java
      for (int i = 0;i < array.length ;i++) {
      +    //・・・
      +}
    • ++-- とオペランドの間には空白文字を入れない
      良い例:

      java
      i++;

      悪い例:

      java
      i ++;
    • ビット演算子( |&^<<>> )の前後には空白文字を挿入する

    • 論理演算子( ||&&)の前後には空白文字を挿入する

    • 関係演算子( <>>=<===!= )の前後には空白文字を挿入する

    • 算術演算子( /% )の前後には空白文字を挿入する

    • return 文ではカッコを使わない
      良い例:

      java
      int answer = (a + b + c) * d;
      +return answer;

      悪い例:

      java
      return ((a + b + c) * d);
    • if などの条件式で boolean の変数を比較しない

      良い例:

      java
      if (hasStock)

      悪い例:

      java
      if (hasStock == true)
    • 不等号の向きは左向き( <<= )にする
      良い例:

      java
      if (from <= x && x <= to) {

      悪い例:

      java
      if (x >= from && x <= to) {

    コメント

    • ファイルの先頭への Copyright の表記について
      ソースのファイルヘッダにコピーライト標記は法的拘束力がないため、不要とする。
      ただし、顧客からの要求があった場合を除く。

    • Javadoc コメントには、少なくとも author と version(クラス)、param と return と exception(メソッド)を記述する

      • 今後もバージョンアップのリリースが予定されているソースでは、上記に加えて since(バージョン)を記述する
      • @Overrideのあるメソッドでは、上記に加えて{@Inherit}を記述する
    • Javadoc  クラスヘッダコメントのフォーマットは以下の通り

      良い例:

      java
      /**
      + * Action(or Bean)クラス メニュー名称
      + *
      + * @author 姓 名
      + * @version バージョン YYYY/MM/DD 説明
      + */
    • コメントは必要なものだけを簡潔に
      悪い例:

      java
      /**
      + * 文字列に変換
      + */
      +@Override
      +public String toString() {
      +
      +/**
      + * コピー
      + *
      + * @return コピーしたインスタンス
      + */
      +public Entry copy() {
    • 不要なコメントは記載しない

      • コードからすぐわかること・冗長なコメント
      • 名前の説明
        コメントではなくわかりやすい名前を付ける。
      • 別システムで管理している内容
        ソースコード管理システム、バグトラッキングシステムで管理している内容はソースコードにコメントで記載する必要はない。
        • コメントアウトされたコード
          ソースコード管理システムで管理されている

    インポート

    • java.langパッケージはインポートしない

      悪い例:

      java
      import java.lang.String;//必要のない記述
    • 原則として static インポートしない
      JUnit の作成やフレームワークとして static インポートが推奨されるような場合は利用してもよい

    • 原則としてオンデマンドのインポート宣言(type-import-on-demand declaration)(アスタリスク*によるインポート) は行わない

      悪い例:

      java
      import java.util.*;

    コンストラクタ

    • public 宣言していないクラスにはpublic権限のコンストラクタを作らない
      良い例:

      java
      class Entry {
      +    //・・・
      +    Entry(int id) {
      +        //・・・
      +    }

      悪い例:

      java
      class Entry {
      +    //・・・
      +    public Entry(int id) {
      +        //・・・
      +    }
    • インスタンスメンバを持たない(static メンバのみの)クラスは、private権限のコンストラクタを作成する

    メソッド

    • オーバーライドさせたくないメソッドはfinalを利用する

    • 戻り値が配列のメソッドで、戻る配列のサイズが 0 の場合、メソッドを使用するクライアントの余計な null チェックのロジックを回避するため、null ではなく長さゼロの配列を戻すようにする。 良い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return ArrayUtils.EMPTY_STRING_ARRAY;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return Collections.emptyList();
      +    }
      +    return Arrays.asList(s);
      +}

      悪い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return Arrays.asList(s);
      +}
    • メソッドは 1 つの役割にする

    クラスメソッド

    • クラスメソッドを利用するときは、クラス名を使って呼び出す
      良い例:

      java
      int comp = Integer.compare(x, y);

      悪い例:

      java
      Integer a = //
      +int comp = a.compare(x, y);

    変数全般

    • 1 つのステートメントには 1 つの変数宣言
      良い例:

      java
      /** 科目コード */
      +private String code;
      +/** 科目名 */
      +private String name;
      +/** 科目略名 */
      +private String shortName;

      悪い例:

      java
      private String code, name, shortName;
    • リテラルは使用しない
      リテラルとは、コード中に、表現が定数として直接現れており、記号やリストで表現することができないものを指す(数値、文字列両方含む 通称マジックナンバー)。コードの可読性・保守性の低下を防ぐために、リテラル定数(static final フィールド)を使用すること。
      例外:-1,0,1 等をカウント値としてループ処理等で使用するような場合

      良い例:

      java
      private static final double ONE_MILE_METRE = 1609.344;
      +
      +public double mileToMetre(double mi) {
      +    return mi * ONE_MILE_METRE;
      +}

      悪い例:

      java
      public double mileToMetre(double mi) {
      +    return mi * 1609.344;
      +}
      • リテラル定数の名前はその値の意味を正しく表現したものにする

        悪い例:

        java
        private static final int ZERO = 0;
    • 配列宣言は「型名[]」にする

      良い例:

      java
      private int[] sampleArray = new int[10];

      悪い例:

      java
      private int sampleArray[] = new int[10];
    • できるだけローカル変数を利用する
      ローカル変数で事足りるものをインスタンス変数として利用するなど、必要のないインスタンス変数を定義すると、パフォーマンスや可読性の低下やの大きな要因となる上、マルチスレッドを意識した際に不整合がおきる可能性があるので、インスタンス変数は必要性を充分に考慮してから使用すること。

    • 定数はfinalで宣言する

    • ローカル変数とインスタンス変数を使いわける

    定数

    • public で宣言するクラス変数とインスタンス変数は、定数のみとし、 static final で定義する
      final ではない static な定数は作成しない。

      良い例:

      java
      public static final String PROTOCOL_HTTP = "http";
    • 定数( static フィールド)に、 static ではないメソッドから書き込まない

    • 定数は、プリミティブ型もしくは、不変(Immutable)オブジェクトで参照する

      • 不変Listの生成にはCollectionsクラスのunmodifiableList()メソッドを利用する

        良い例:

        java
        public static final List<Integer> VALUES = Collections.unmodifiableList(Arrays.asList(1, 2, 3, 4, 5));

        悪い例:

        java
        public static final List<Integer> VALUES = Arrays.asList(1, 2, 3, 4, 5);
      • 不変Setの生成にはCollectionsクラスのunmodifiableSet()メソッドを利用する

      • 不変Mapの生成にはCollectionsクラスのunmodifiableMap()メソッドを利用する

        良い例:

        java
        public static final Map<Integer, String> VALUES_MAP = Collections.unmodifiableMap(new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +});

        悪い例:

        java
        public static final Map<Integer, String> VALUES_MAP = new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +};
      • 不変な配列インスタンスは長さ 0 の配列以外は生成不可能なため、外部から参照される(public)定数では利用せず、List等への置き換えをすること

        良い例:

        java
        public static final List<Integer> VALUES = Collections.unmodifiableList(Arrays.asList(1, 2, 3, 4, 5));

        悪い例:

        java
        public static final int[] VALUES = { 1, 2, 3, 4, 5 };

    インスタンス変数

    • インスタンス変数はprivateにする

      良い例:

      java
      public class Employee {
      +    private long id;
      +
      +    //・・・
      +    //getter/setter
      +}

      悪い例:

      java
      public class Employee {
      +    public long id;
      +
      +    //・・・
      +    //getter/setter
      +}

    クラス変数

    • public static final 宣言した配列を利用しない
      ※「定数」を参照

    • クラス変数にはクラス名を使用してアクセスすること

      良い例:

      java
      BigDecimal b = BigDecimal.ZERO;

      悪い例:

      java
      BigDecimal a = //
      +BigDecimal b = a.ZERO;

    ローカル変数

    • ローカル変数は利用する直前で宣言する
      行間の程度にもよるが、ある程度まとめて宣言するのは OK とする。

      良い例:

      java
      for (int i = 0; i < lines.length; i++) {
      +    String line = lines[i];
      +    //lineの処理
      +}

      悪い例:

      java
      String line;
      +for (int i = 0; i < lines.length; i++) {
      +    line = lines[i];
      +    //lineの処理
      +}
    • ローカル変数は安易に再利用しない
      一度宣言したローカル変数を、複数の目的で安易に使いまわさないこと。ローカル変数は、役割ごとに新しいものを宣言して初期化することにより、コードの可読性・保守性の向上、及びコンパイラの最適化の促進をはかる。

    引数

    • メソッド引数への代入は行わない
      原則としてfinalで宣言する。

      良い例:

      java
      public void add(final int value) {
      +    //・・・
      +}

    継承

    • スーパークラスのインスタンス変数をサブクラスでオーバーライドしない
      スーパークラスと同じ名前のフィールドをサブクラスで宣言しないこと。 同じ名前のフィールドを宣言すると、スーパークラスのフィールドはサブクラスで宣言されたフィールドによって隠ぺいされてしまうので、他の人の混乱を招くことを防ぐため重複する名前は付けないこと。

      悪い例:

      java
      public class Abs {
      +    protected String name;
      +}
      +
      +public class Sub extends Abs {
      +    protected String name;//Abs#nameは隠ぺいされる
      +}
    • スーパークラスのメソッドをオーバーライドするときは@Override アノテーションを指定する。

      良い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    @Override
      +    protected void process() {
      +
      +    }
      +}

      悪い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    //@Overrideアノテーションの指定がない
      +    protected void process() {
      +
      +    }
      +}
    • スーパークラスで private 宣言されているメソッドと同じ名前のメソッドをサブクラスで定義しない
      スーパークラスにある private メソッドと同じ名前のメソッドをサブクラスで定義しないこと。private メソッドはオーバーライドされず全く別のメソッドとして扱われ、他の人の混乱を招き、バグにつながる恐れがある。

    インナークラス

    • 原則としてインナークラスは利用しない
      一つの java ファイルに複数のクラスを記載するのは NG とする。また無名クラスを利用するのも原則として NG とする。
      Enum の定数固有メソッド実装(constant-specific method implementation)、Java8 のラムダ式は内部的にインナークラスとされるがこれらは許可する。

    メンバー順序

    • 以下の順で記述する

      1. static フィールド
      2. static イニシャライザー
      3. static メソッド
      4. フィールド
      5. イニシャライザー
      6. コンストラクター
      7. メソッド
    • 同一カテゴリー内では以下の可視性の順で記述する

      1. public
      2. protected
      3. パッケージ private
      4. private

    インスタンス

    • オブジェクト同士はequals()メソッドで比較する

      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}

      ただし Enum の場合は==演算子を利用して比較する

      equals()メソッドで比較する際、左辺のオブジェクトが null にならないように制御すること。

    • Class 名を利用した比較をおこなわない

      良い例:

      java
      if (o instanceof Foo) {
      +    // ...
      +}

      悪い例:

      java
      if ("my.Foo".equals(o.getClass().getName())) {
      +    // ...
      +}

    制御構造

    • 制御文( if , else , while , for , do while )の { } は省略しない

      良い例:

      java
      if (s == null) {
      +    return;
      +}

      悪い例:

      java
      if (s == null)
      +    return;
    • ステートメントが無い {} ブロックを利用しない
      悪い例:

      java
      //{}内の記述が無い
      +if (s == null) {
      +}
    • if / while の条件式で = は利用しない
      良い例:

      java
      boolean a =//
      +if (!a) {
      +    //・・・
      +}

      悪い例:

      java
      boolean a =//
      +if (a = false) {//コーディングミス
      +    //・・・
      +}
      +
      +
      +boolean a =//
      +boolean b =//
      +if (a = b) {//おそらくコーディングミス
      +    //・・・
      +}
    • forwhile の使い分けを意識する

    • for 文を利用した繰り返し処理中でループ変数の値を変更しない
      悪い例:

      java
      String[] array = { /*・・・*/ };
      +for (int i = 0; i < array.length; i++) {
      +    //・・・
      +    i += 2;//NG
      +}
      +
      +for (String s : array) {
      +    //・・・
      +    s = "string";//NG
      +}
    • for 文のカウンタは特別な事情がない限り、0 から始める

    • 配列やリストなどの全要素に対するループ処理は拡張 for 文を使用する。
      良い例:

      java
      for (int value : array) {
      +    //・・・
      +}
      +
      +for (String value : list) {
      +    //・・・
      +}
    • 配列をコピーするときはArrays.copyOf()メソッドを利用する

      良い例:

      java
      int[] newArray = Arrays.copyOf(array, array.length);

      悪い例:

      java
      int[] newArray = new int[array.length];
      +System.arraycopy(array, 0, newArray, 0, array.length);
    • 繰り返し処理中のオブジェクトの生成は最小限にする

    • if 文と else 文の繰り返しや switch 文の利用はなるべく避け、オブジェクト指向の手法を利用する
      良い例:

      java
      CodingKind codingKind = toCodingKind(kind);
      +d = codingKind.encode(s);
      +
      +//---
      +
      +CodingKind codingKind = toCodingKind(kind);
      +s = codingKind.decode(d);

      悪い例:

      java
      switch (kind) {
      +case 1:
      +    d = encode1(s);
      +    break;
      +case 2:
      +    d = encode2(s);
      +    break;
      +default:
      +    break;
      +}
      +
      +//---
      +
      +switch (kind) {
      +case 1:
      +    s = decode1(d);
      +    break;
      +case 2:
      +    s = decode2(d);
      +    break;
      +default:
      +    break;
      +}
    • 繰り返し処理の内部で try ブロックを利用しない
      特に理由がない場合は繰り返し処理の外にtryブロックを記載する。
      ただし、繰り返し処理内部で例外をキャッチし処理を行いたい場合は繰り返し処理の内部でtryブロックを利用してもよい。

      良い例:

      java
      for (String s : array) {
      +    BigDecimal num;
      +    try {
      +        num = new BigDecimal(s);
      +    } catch (NumberFormatException e) {
      +        num = BigDecimal.ZERO;
      +    }
      +    //・・・
      +}

    文字列操作

    • 文字列同士が同じ値かを比較するときは、equals()メソッドを利用する
      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}
    • 文字列リテラルはnew しない
      良い例:

      java
      String s = "";

      悪い例:

      java
      String s = new String();
    • 更新される文字列にはStringBuilder クラスを利用する
      良い例:

      java
      StringBuilder builder = new StringBuilder();
      +for (String s : array) {
      +    builder.append(s);
      +}
      +System.out.println(builder.toString());

      悪い例:

      java
      String string = "";
      +for (String s : array) {
      +    string += s;
      +}
      +System.out.println(string);

      スレッドセーフ性が保証されていない箇所では\`StringBuffer\`クラスを利用する

      ※パフォーマンスについても記載しているので参考にしてください

    • 更新されない文字列にはString クラスを利用する

    • 文字列リテラルと定数を比較するときは、文字列リテラルのequals()メソッドを利用する
      良い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (PROTOCOL_HTTP.equals(url.getProtocol())) {
      +
      +}

      悪い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (url.getProtocol().equals(PROTOCOL_HTTP)) {
      +
      +}
    • プリミティブ型とString オブジェクトの変換には、変換用のメソッドを利用する
      良い例:

      java
      int i = 1000;
      +String s = String.valueOf(i);// "1000"
      +s = NumberFormat.getNumberInstance().format(i);// 3桁区切り "1,000"
      +
      +boolean b = true;
      +s = String.valueOf(b);// true/false
      +s = BooleanUtils.toStringOnOff(b);// on/off
    • 文字列の中に、ある文字が含まれているか調べるには、contains()メソッドを利用する

    • システム依存記号( \\n\\r など)は使用しない。
      悪い例:

      java
      String text = Arrays.stream(array)
      +    .collect(Collectors.joining("\\n"));

    数値

    • 誤差の無い計算をするときは、BigDecimal クラスを使う
      浮動小数点演算は科学技術計算に利用するもので、誤差が発生する。これに対して、クラス「BigDecimal」は、文字列で数値の計算を行うので、金額などの正確な計算に適している。BigDecimal ではインスタンス生成時に指定された桁数での精度が保証される。

    • 数値の比較は精度に気をつける
      良い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +if (a.compareTo(b) == 0) {
      +    System.out.println("一致");
      +}

      悪い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +
      +if (a.equals(b)) {
      +    System.out.println("精度が違うためこの分岐には入らない");
      +}
    • 低精度なプリミティブ型にキャストしない

    • BigDecimalString変換する際はtoString()ではなくtoPlainString()を利用すること
      toString()を利用した場合、指数表記になることがあります。

    日付

    • 日付の文字列のフォーマットには、SimpleDateFormatまたはDateTimeFormatterを使う
      良い例:

      java
      Date date = new Date();
      +SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
      +String s = dateFormat.format(date);

    三項演算子

    • 入れ子の三項演算子の利用は禁止
      可読性が悪くなるので三項演算子を入れ子で行うのは禁止。

    コレクション

    • Java2 以降のコレクションクラスを利用する
      Vector クラス、Hashtable クラス、Enumeration 等は、特にこれらを利用する理由がなければ、インターフェースを統一する目的で、これらの代わりにList(ArrayList クラス)、Map(HashMap クラス)、Iterator を使用すること。List などのインターフェースを利用することで JDK1.2 で整理されたわかりやすいメソッドを利用でき、また、インターフェースの特性から呼び出し元を変更せずに実装クラスを変更することができる。

    • 特定の型のオブジェクトだけを受け入れるコレクションクラスを利用する

      良い例:

      java
      List<Map<String, String>> list = new ArrayList<>();
    • ListのソートはList.sort()を利用する
      Listクラスの要素をソートする際は Java8 で追加されたList.sort()を利用すること。
      Java 7 以前で利用されていたCollections.sort()は利用しないこと。

    • Collection.forEach()は利用しない。拡張 for 文の利用を検討する
      Java8 で追加されたメソッド。
      拡張 for 文を利用したほうが多くの場合でデバッグに有利であり、可読性においてもforEachの優位性は少ないため、forEachは原則利用しない。拡張 for 文を利用する。
      具体的には下記のメソッドを利用しないこと。

      • Collection#forEach
      • Set#forEach
      • List#forEach

      Map#forEachはこの限りではない

      良い例:

      java
      for (String s : Arrays.asList("A", "B")) {
      +    //処理
      +}

      悪い例:

      java
      Arrays.asList("A", "B").forEach(s -> {
      +    //処理
      +});

      ただし、メソッド参照で処理できる場合はforEachを利用する。
      (デバッグのデメリットがほとんどなく、他と比較して処理効率が良いため)

      良い例:

      java
      Arrays.asList("A", "B").forEach(this::process);

      悪い例:

      java
      for (String s : Arrays.asList("A", "B")) {
      +    this.process(s);
      +}

    ラムダ式・メソッド参照・コンストラクタ参照

    • ラムダ式が利用できる箇所はラムダ式を利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • ただし、メソッド参照・コンストラクタ参照が利用できる場合はメソッド参照・コンストラクタ参照を利用する

      良い例:

      java
      String::compareToIgnoreCase

      悪い例:

      java
      (s1, s2) -> s1.compareToIgnoreCase(s2)

      良い例:

      java
      BigDecimal::add

      悪い例:

      java
      (b1, b2) -> b1.add(b2)
    • ラムダ式記述の際、型宣言は省略記法で記述する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (String s1, String s2) -> s1 + "=" + s2
    • 原則ラムダ式内の行数は 1 行とする
      複数行で利用したい場合は、privateメソッドを作成しメソッド参照を利用する

      良い例:

      java
      this::getMax
      +
      +private int getMax(int i1, int i2) {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}

      悪い例:

      java
      (i1, i2) -> {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}
    • 原則ラムダ式は 1 行記述に限定するので、中カッコ、returnは必ず省略する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (s1, s2) -> {
      +    return s1 + "=" + s2;
      +}

    実質的 final(effectively final)

    • 実質的 final を利用する
      変数宣言にfinalを記載しなくてよい。

    Stream API

    • 利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • 並列ストリームは利用しないこと
      悪い例:

      java
      Stream<?> s = list.parallelStream();
      +Stream<?> s = list.stream().parallel();
    • StreamAPI 記述の際の改行位置は、各中間処理・末端処理前のピリオドの前で改行する

      良い例:

      java
      List<Character> alphabetLower = list.stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .collect(Collectors.toList());

      悪い例:

      java
      List<Character> alphabetLower = list.stream().filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase).collect(Collectors.toList());
      +
      +List<Character> alphabetLower = list
      +    .stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .collect(Collectors.toList());
    • インデントは統合開発環境の提供するフォーマッタに合わせる

    • 中間処理の数は 3 つ(3 行)程度までを推奨する
      中間処理の記述が多くなると可読性も悪くなり、デバッグも難しくなるため、3 行程度を目安にロジックを検討すること。

    • コメントは、原則として処理中には記載しない
      難解になってしまった場合のみ処理中の記載を認める

      良い例:

      java
      // クラスFooのフィールドStrの値で昇順にソートし、フィールドStrの要素を取得して処理する。
      +fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    .map(Foo::getStr)
      +    .forEach(this::proc);

      悪い例:

      java
      fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr)) //クラスFooのフィールドStrの値で昇順にソート
      +    .map (Foo::getStr) //フィールドStrの要素を取得
      +    .forEach(this::proc); //処理
      +
      +
      +fooList.stream()
      +    //クラスFooのフィールドStrの値で昇順にソート
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    //フィールドStrの要素を取得
      +    .map (Foo::getStr)
      +    //処理
      +    .forEach(this::proc);
    • Stream は極力変数代入しないこと
      Stream は中間処理、末端処理を行うと使用済みとなり、以降同じインスタンスは利用できない。
      変数代入はほとんどの場合意味をなさず、むしろミスの元となるため極力変数代入はしないこと。

      良い例:

      java
      List<String> list1 = Stream.of("A", "B", "C")
      +        .map(String::toLowerCase)
      +        .collect(Collectors.toList());
      +
      +List<String> list2 = Stream.of("A", "B", "C")
      +        .map(s -> s + s)
      +        .collect(Collectors.toList());

      悪い例:

      java
      Stream<String> stream = Stream.of("A", "B", "C");
      +Stream<String> stream1 = stream.map(String::toLowerCase);
      +List<String> list1 = stream1.collect(Collectors.toList());
      +
      +Stream<String> stream2 = stream.map(s -> s + s);//コーディングミス streamは使用済のためエラーになる
      +List<String> list2 = stream2.collect(Collectors.toList());

    Optional

    • Optional は同メソッド内で値を取り出す場合は極力変数代入しないこと
      Optional とその値の変数は同じものを示す名前となり、同じ意味の変数名が複数現れることで可読性が下がるため、Optional の変数代入は行わないこととする。

      良い例:

      java
      Employee employee = findEmployee(employeeId)
      +        .orElseThrow(IllegalArgumentException::new);

      悪い例:

      java
      Optional<Employee> employeeOpt = findEmployee(employeeId);
      +Employee employee = employeeOpt.orElseThrow(IllegalArgumentException::new);

      直接、値を取り出すことなくOptionalでのみ扱う場合はOptionalを変数代入してもよい。

      良い例:

      java
      Optional<Employee> employee = findEmployee(employeeId);
      +
      +Dept dept = employee.map(Employee::getDivision)
      +        .map(Division::getDept)
      +        .orElse(null);
      +
      +Role role = employee.map(Employee::getRole)
      +        .orElse(null);
      +
      +//-----
      +
      +Optional<Employee> employee = findEmployee(employeeId);
      +//・・・処理
      +return employee;

    ストリーム(InputStream OutputStream)

    • ストリームを扱う API を利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • ObjectOutputStream ではreset()を利用する

    リソースの解放

    • リソース解放を必要とするクラスを利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • リソース解放を必要とするクラスを作成する場合はAutoCloseableimplementsする
      AutoCloseableimplementsすることで try-with-resources 文が利用できるようになります。

    例外

    • catch 文で受け取る例外は、詳細な例外クラスで受け取る

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (IOException e) {
      +    log.error("Error", e);
      +    throw e;
      +}

      悪い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (Exception e) {//範囲が広すぎる例外クラスの利用はNG
      +    log.error("Error", e);
      +    throw e;
      +}
    • Exception クラスのオブジェクトを生成してスローしない

    • catch ブロックでは基本、例外処理をする。ただし処理を書いてはいけない部分もあるので、その部分については、"// ignore" というコメントを記述すること。

    • 例外クラスは無駄に定義しない

    ガベージコレクション

    • 原則finalize()のオーバーライド実装は禁止
    • もしfinalize()をオーバーライドした場合はsuper.finalize() を呼び出す
    • アプリケーションからfinalize()を呼び出さない

    コメント規約

    よいコメントの鉄則

    • コードを明確化するコメントを書く
      コードにコメントを書く理由は、自分自身、一緒に仕事をしている人、後に関わる開発者にとってコードをより理解しやすいものにするためである。

    • コメント化する価値がないプログラムならば、実行するに値しない
      有用な格言。コメントは必須。

    • 過剰な装飾は使わない (例:見出し状のコメント)
      1960 年代から 1970 年代の典型的な COBOL プログラマにはアスタリスク( * )でコメントを囲った箱を書く習慣があった。彼らの芸術的な主張を表わしているのかもしれないが、率直に言えばそれは製品に加わるちょっとした価値に比べれば大きな時間の無駄である。かわいいコードではなくきれいなコードを書くはずである。さらに、コードを表示するディスプレイや印刷するプリントに使われるフォントはプロポーショナルだったりそうでなかったりして、箱をきれいに整列させることは難しい。

    • コメントはシンプルに
      かつて見たもっとも最良のコメントは、シンプルな要点をまとめた注釈であった。なにも本を書く必要はなく、他の人がコードを理解するに十分な情報を提供するだけでよいのである。

    • コードを書く前に先にコメントを記述する
      コードをコメント化する最良の方法は、コードを書く前にコメントを書くことである。それが、コードを書く前にコードがどのように動作するかについて考えるよい機会となり、コメントの存在を保障することにもつながる。少なくともコードを書いた時にコメントすべきである。コメントによってコードが理解しやすくなることで、コードの開発中にアドバンテージを得ることができる。コードにコメントを書く時間を費やせば、それによって得られるものがある。

    • コメントには、なぜそうなのかを書く。コードを読めば分かることを書かない
      基本的に、コードの一部分を見ればそれが何かを理解することはできる。例えば、以下のコードを見て、$1000 以上の注文については 5%ディスカウントされることは理解できる。なぜそうなのか?大きな注文ではディスカウントがつきものだというビジネスルールがあるのだろうか?大きな注文に時間限定サービスがあるのか、それともずっとサービスがあるのか?これを書いたプログラマの気前がよかったのか?
      どこかソースコード中か別な文書にコメントされていない限り、それがなぜなのかを知ることはできない。

      java
      if (grandTotal >= 1000.00) {
      +    grandTotal = grandTotal * 0.95;
      +}

      なお、メソッドコメントには、適切な javadoc コメント(タグ)のほかに、以下の内容も可能な限り明記すること。

      • 副作用のある処理の場合は、その内容 (→ メソッドの引数オブジェクトがメソッド内で変更されるケースなど)
      • 既知のバグ (→ 判明しているが修正しないことにした場合など)
      • 影響のある事前条件、事後条件 (→ メソッドが正しく動作するための前提について)
      • 並行性 (→  マルチスレッドでアクセスされた場合の動作について)
      • 該当メソッドの使用例やサンプルコード
    • TODO コメント
      設計者確認待ち、共通処理の作成待ちなどの理由により、実装時に TODO がある場合、下記のようにコメントを記述する。
      (Eclipse の TODO コメント形式を採用)
      例)

      //TODO:ワークフローの仕様決定待ち 関連チケット#12345

    Java コメント(3 種類)の使い分け

    Java では 3 種類のコメントが使える。javadoc コメントは/**で開始され、*/で終わる。C 風コメントは/*で開始され*/で終わる。単一行コメントは//で開始され、そのソースコード行が終わるまで続く。以下の表ではコメントの使い方とその例を示す。(コメントのスタイルに関しては、前述の「標準規約に準拠したコーディング例」を参照)

    コメント種類使用方法
    javadoc コメント
    /** comment */
    interface、class、メソッド、フィールドの直前に書く。コメントは javadoc によって処理され、外部ドキュメント(HTML)として生成される。(この形式以外のコメントはドキュメントとして出力されないことに注意)/*_
    _ 顧客(Customer)-
    _ 顧客はわれわれがサービスまたは製品を売った人物
    _ もしくは組織のいずれかである。
    _ @author 開発太郎
    _/
    C 風コメント
    /* comment */
    特定のコードを無効化したいが、後で使用するかもしれないので残しておくためにコメント化する時や、デバッグ時に一時的に無効化するときに使用する。/_
    このコードは J.T.Kirk によって 1997.12.9 に前述のコードと置き換えたためコメント化した。2 年間不要であるならば削除せよ。
    ... (ソースコード)
    _/
    単一行コメント
    // comment
    メソッド内にて、ビジネスロジック、コードの概要、一時変数の定義内容などを記述する。// 1995 年 2 月に開始された X 氏の寛大なキャンペーンで
    // 定められた通り 1000$を超える請求には、全て 5%割引を
    // 適用する。

    ※ ロジック中に、頻繁に C 風コメントでコメントを書くとまとめてコメントアウトする場合に不便なため、基本的にロジック中では単一行コメントを利用すること。

    パフォーマンス

    パフォーマンスを考慮した Java のコーディングについて以下に示す。

    ※ パフォーマンスは jre のバージョンやスペックによって変化します。本内容は jre1.8.0_74 での検証結果を元にした内容です。

    ※ 性能計測結果についての記載がありますが、あくまでも参考値です。性能を保証するものではありません。

    Stream API

    Java8 で追加された Stream API での記述は、可読性も高く、簡潔に書けますが、パフォーマンス・性能面で注意が必要な場合があります。

    List の処理を行う際、拡張 for 文で処理する場合は Iterator インスタンスが 1 つだけ生成されますが、Stream API で処理する場合、最初の Stream インスタンスに加え、各中間処理ごとにも Stream インスタンスが生成され、その分の性能劣化が懸念されます。
    以下に処理例と計測結果を記載します。

    • 拡張 for 文

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = new ArrayList<>();
      +for (String string : list) {
      +    if (string.endsWith("0")) {
      +        resultList.add(string);
      +    }
      +}
      +return resultList;
    • Stream API

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = list.stream()
      +    .filter(s -> s.endsWith("0"))
      +    .collect(Collectors.toList());
      +return resultList;
    • 計測結果

      処理する List の件数拡張 for 文 (ms)StreamAPI (ms)
      100 万件79
      1,000 万件88114
      1 億件9491,026
      2 億件1,8222,081

    小中規模の処理量であれば考慮するほどの性能差はありませんが、大量の処理が見込まれる場合は考慮が必要です。
    また、Stream API は並列処理(スレッド処理)の機能をサポートしていますので、利用できる場合は並列処理も含めての検証が必要です。

    ラムダ式・メソッド参照・コンストラクタ参照

    Java8 で追加されたラムダ式・メソッド参照・コンストラクタ参照は、匿名クラスを利用するよりも効率的です。
    積極的な利用を推奨します。

    以下に Comparator を生成した場合の計測結果を記載します。

    • 匿名クラス

      java
      Comparator<String> c = new Comparator<String>() {
      +    @Override
      +    public int compare(String o1, String o2) {
      +        return o1.compareToIgnoreCase(o2);
      +    }
      +};
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> o1.compareToIgnoreCase(o2);
    • メソッド参照

      java
      Comparator<String> c = String::compareToIgnoreCase;
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)メソッド参照 (ms)
      10 億回3800(計測不能)0(計測不能)
      100 億回6,3740(計測不能)0(計測不能)
      1 京回(30 秒以上)1410

    ラムダ式は外部の変数を利用する場合、匿名クラスとほぼ同じ動作をします。

    • 匿名クラス

      java
      new Comparator<String>() {
      +        @Override
      +        public int compare(String o1, String o2) {
      +            return arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                            : o1.compareToIgnoreCase(o2);
      +        }
      +    }
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                    : o1.compareToIgnoreCase(o2);
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)
      10 億回(パラメータあり)571572
      100 億回(パラメータあり)9,9009,864

    文字列連結

    文字列連結(繰り返し)

    文字列連結を繰り返し処理中で行う際、+演算子で処理することはアンチパターンとして知られています。
    繰り返し処理中の文字列連結は、 StringBuilderStringJoinerStringBuffer を利用します。
    また、コレクション要素の結合であればString#joinが利用できます。

    以下に処理例と計測結果を記載します。

    • +演算子

      java
      String s = "";
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        s += ",";
      +    }
      +    s += string;
      +}
      +return s;
    • StringBuilder

      java
      StringBuilder sb = new StringBuilder();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • StringBuffer

      java
      StringBuffer sb = new StringBuffer();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • String#join

      java
      return String.join(",", list);
    • 計測結果

      処理する List の件数+演算子 (ms)StringBuilder (ms)StringBuffer (ms)String#join (ms)
      1,000 件50(計測不能)0(計測不能)0(計測不能)
      1 万件1,016111
      10 万件(30 秒以上)255
      100 万件(30 秒以上)294251

    文字列連結(定数)

    基本的に処理中の文字列連結では+演算子は使わないで処理するほうがパフォーマンスが高くなりますが、定数の場合は+演算子で定義するほうがパフォーマンスが高いです。

    たとえば以下のように、処理したい場合、

    java
    private static final String CONST_A = "A";
    +private static final String CONST_B = "B";
    +private static final String CONST_AB = CONST_A + CONST_B;

    StringBuilder で処理しようとすると以下のようになります。

    java
    private static final String CONST_AB = new StringBuilder(CONST_A).append(CONST_B).toString();

    しかし、これらをバイトコード上で確認するとそれぞれ以下のようになります。

    • +演算子

      java
      private static final java.lang.String CONST_AB = "AB";
    • StringBuilder

      java
      private static final java.lang.String CONST_AB;
      +
      +static {};
      +   0  new java.lang.StringBuilder [20]
      +   3  dup
      +   4  ldc <String "A"> [8]
      +   6  invokespecial java.lang.StringBuilder(java.lang.String) [22]
      +   9  ldc <String "B"> [11]
      +  11  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [26]
      +  14  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [30]
      +  17  putstatic jp.co.packagename.ClassName.CONST_AB : java.lang.String [34]
      +  20  return

    +演算子を利用した場合コンパイル時に最適化され、文字列"A""B"をあらかじめ結合して class が作成されます。
    StringBuilderを利用した場合は最適化はされず、記述した通りの処理が行われます。

    計測した場合、下記のようになります。

    • 計測結果

      処理回数StringBuilder (ms)+演算子 (ms)
      5,000 万回5590(計測不能)
      1 億回1,0590(計測不能)

    通常、定数処理を大量に処理することは考えられないので性能問題になることはありませんが、+演算子を利用したほうがパフォーマンスが高いこともあるということを理解してください。

    List の種類

    ListにはArrayListのようなRandomAccessを implements した、ランダムアクセスをサポートしているクラスと、
    LinkedListのようなランダムアクセスをサポートしていない(シーケンシャルアクセス)クラスが存在します。
    RandomAccessではないListは、List#getなどインデックスを利用するような操作のパフォーマンスが低いので注意してください。

    以下に処理例と計測結果を記載します。

    • for 文(List#get(int)によるループ)

      java
      int size = list.size();
      +for (int i = 0; i < size; i++) {
      +    String s = list.get(i);
      +    //処理
      +}
    • 拡張 for 文

      java
      for (String s : list) {
      +    //処理
      +}
    • forEach

      java
      list.forEach(this::処理);
    • 計測結果

      処理する List の件数ArrayList
      for 文(List#get(int)によるループ) (ms)
      LinkedList
      for 文(List#get(int)によるループ) (ms)
      ArrayList
      拡張 for 文 (ms)
      LinkedList
      拡張 for 文 (ms)
      ArrayList
      forEach (ms)
      LinkedList
      forEach (ms)
      1 万件0(計測不能)730(計測不能)0(計測不能)0(計測不能)0(計測不能)
      10 万件0(計測不能)7,5760(計測不能)0(計測不能)12
      20 万件0(計測不能)17,7400(計測不能)0(計測不能)0(計測不能)0(計測不能)
      50 万件0(計測不能)(30 秒以上)0(計測不能)20(計測不能)2
      100 万件1(30 秒以上)0(計測不能)40(計測不能)4
      1,000 万件16(30 秒以上)845644

    ランダムアクセスをサポートしているListがシーケンシャルアクセス(iterator を利用した処理など)で遅いということはないので、
    ループの処理は拡張 for 文等、Iterator によるループで記述するのが無難です。
    List#getでの処理をすべて禁止することはできませんが、高いパフォーマンスが求められる場合はListの種類にも注目してみてください。

    String から Integer・Long への変換

    数値文字列のStringIntegerに変換するには、Integer#valueOf(String)を利用して下記のように記述します。

    java
    String s = "1";
    +Integer value = Integer.valueOf(s);

    しかし、下記のようにも記述できます。

    java
    String s = "1";
    +Integer value = new Integer(s);

    これらの違いは、
    new Integer(s)とした場合、必ず Integer インスタンスが生成されますが、
    Integer.valueOf(s)とした場合は -128 から 127 の間の数値であればキャッシュから取り出すためインスタンスを生成しません。

    このため、前者のInteger#valueOf(String)を利用した記述のほうが効率的です。
    Long#valueOf(String)も同様です。

    性能差が少ないため、ほとんど問題にはなりませんが、FindBugs 等、静的解析で検出される問題のため、理解が必要です。

    また、String からの変換だけでなく、int や long からの変換も#valueOfが効率的ですが、オートボクシングを利用した場合、コンパイルで自動的にこれらの処理に変換されるため、記述することはありません。

    String から int・long への変換

    数値文字列のStringintに変換するには、Integer#parseInt(String)を利用して下記のように記述します。

    java
    String s = "1";
    +int value = Integer.parseInt(s);

    しかし、オートボクシングが利用できるため、意図せず下記のように記述ミスをする場合があります。

    java
    String s = "1";
    +int value = Integer.valueOf(s);//取得したIntegerインスタンスをオートボクシングでintにcastしている
    java
    String s = "1";
    +int value = new Integer(s);//生成したIntegerインスタンスをオートボクシングでintにcastしている

    「オートボクシング」の説明に記載した通り、性能に差が出るだけでなく、
    記述から明らかにミスであることが解るため、FindBugs 等、静的解析で検出されるコードです。

    longへの変換の場合はLong#parseLong(String)を利用します

    以下に計測結果を記載します。

    • 計測結果

      処理回数Integer.valueOf(String) (ms)Integer#parseInt(String) (ms)
      1,000 万回396318
      1 億回4,0603,077

    BigDecimal の ZERO との比較

    BigDecimal の正・負・ZERO の判定はBigDecimal#signumを利用します。
    compareToを利用してBigDecimal.ZEROと比較しても同じことができますが、signumを利用したほうが効率的です。

    以下に処理例と計測結果を記載します。

    • compareTo 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.compareTo(BigDecimal.ZERO) == 0) {
    • signum 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.signum() == 0) {
    • 計測結果

      (単位:マイクロ秒)

      処理回数compareTo 利用 (マイクロ秒)signum 利用 (マイクロ秒)
      1 京回527
      max:26,367
      min:0
      424
      max:21,213
      min:0

    性能差が少ないので、必ずしも signum を利用する必要はありませんが、大量に処理する場合など、高いパフォーマンスが求められる場合は意識してください。


    License

    CC-By-4.0

    `,175))])}const b=a(h,[["render",k]]);export{y as __pageData,b as default}; diff --git "a/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.md.CNbXdYCI.lean.js" "b/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.md.CNbXdYCI.lean.js" new file mode 100644 index 00000000..d7e7200f --- /dev/null +++ "b/assets/documents_forJava_Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.md.CNbXdYCI.lean.js" @@ -0,0 +1,479 @@ +import{_ as a,c as n,G as l,a3 as p,B as e,o as t}from"./chunks/framework.BDUoXecB.js";const y=JSON.parse('{"title":"Javaコーディング規約 for Java8","description":"","frontmatter":{"sidebarDepth":4,"title":"Javaコーディング規約 for Java8","author":"Future Enterprise Coding Standards","head":[["meta",{"name":"keywords","content":"Javaコーディング規約,Java8,コーディング規約,Java"}]]},"headers":[],"relativePath":"documents/forJava/Javaコーディング規約_for_8.md","filePath":"documents/forJava/Javaコーディング規約_for_8.md"}'),h={name:"documents/forJava/Javaコーディング規約_for_8.md"};function k(r,s,d,E,g,c){const i=e("page-title");return t(),n("div",null,[l(i),s[0]||(s[0]=p(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    一般に利用・参照されている Java コーディング規約やガイドラインを以下に示す。本規約の作成においても、下記規約類を参照・抜粋している。

    規約著作者URL
    Code Conventions for the Java Programming LanguageSun Microsystemshttp://www.oracle.com/technetwork/java/codeconvtoc-136057.html
    Writing Robust Java CodeScott W. Amblerhttp://www.ambysoft.com/downloads/javaCodingStandards.pdf
    オブジェクト倶楽部版 Java コーディング標準オブジェクト倶楽部http://objectclub.jp/community/codingstandard/CodingStd.pdf
    電通国際情報際サービス版 Java コーディング規約 2004電通国際情報サービスhttp://objectclub.jp/community/codingstandard/JavaCodingStandard2004.pdf
    JJGuideline (Java - J2EE Conventions and Guidelines)Stephan.J & JCS Teamhttp://www.fedict.belgium.be/sites/default/files/downloads/Java_J2EE_conventions_and_guidelines_EN.pdf
    Google Java Style (非公式和訳)Googlehttps://kazurof.github.io/GoogleJavaStyle-ja/
    Acroquest Technology Java コーディング規約Acroquest Technologyhttps://www.acroquest.co.jp/webworkshop/javacordingrule/Acroquest_JavaCodingStandard_6_7.pdf
    ※現在は削除されています

    ※ Sun Microsystems の規約は Java 草創期から一応の標準という位置づけだったが、オブジェクト指向、及び、その開発環境の普及・発展によって、設計やコーディングにおいて、直接的に有用な知識や豊富な指針を含むような優れた規約や、ツールなどによる機械的な準拠チェックと連携する規約が普及してきている。

    規約の重要性

    標準としての規約を定義し、遵守することの重要性を以下に示す。

    • ソフトウェアメンテナンスにおける、可読性・保守性・拡張性の向上
    • 問題を起こしやすい実装を未然に回避することによる、品質・生産性の向上
    • 標準規約を通して得られる一般的な実装知識やノウハウ(=学習効果)

    コーディングの心得

    長いプログラムを記述すること(ステップ数)によって生産性が評価されたのは、過去の時代の出来事である。現在は、クラスやメソッドの役割が明確で、ロジックが読みやすく、保守性に優れたプログラムを記述することが評価される。コーディング規約は、コードの書き方に関する一種のパターンと考えることもでき、コードの保守性を向上させる具体的な方法を示している。したがって、規約の一つ一つの意図を理解し、守ることが重要になる。しかし、保守性に優れたコードを作成するためには、コーディング規約を守ることに加えて、良いコードを記述するための基本的な心構えをしっかり心に留めておく必要がある。以下では、その心得について述べる。

    【コーディングの心得 5 か条】

    1. 見やすさを重視せよ
    2. ネーミングはわかりやすく
    3. サンプルを鵜呑みにしない
    4. 同じコードを二度書かない
    5. 役割は一つに

    見やすさを重視せよ

    「良いコード」の基本は、「他の人が読んでもわかりやすいと感じられるコード」。コードの見やすさは、フォーマットはもちろん、ロジックの簡潔さや API の常識的な使い方などから生まれる。コーディングにあたっては、常に他の人の視点を意識しながら、見やすさに気を配って記述する必要がある。例えば、自分で記述したコードであっても、しばらくたってから読み返してみると理解に時間がかかった経験は誰にもあるはず。「3 日前に書いたコードは他人のコードと同じ」ということもよく言われる。見やすさを重視することは、他の人のためだけでなく自分のためにもなる。コードを読んでもすぐに理解できないような実装は、再考(リファクタリング)の必要がある。

    ネーミングはわかりやすく

    コーディングでは、様々な変数やメソッドなどにネーミング(名前付け)する必要がある。ネーミングとは、本来、その対象の本質を表すような名前を考える作業である。大変難易度の高い作業だが、一方で適当に行ってもコードの動作は変わらないため、人によっては手を抜きがちとなる。しかし、ネーミングの良し悪しは、コードの可読性に非常に大きな影響を及ぼす。例えば、「C0001」というクラス名があるとする。これでは、何を表すクラスなのかすぐにはわからないだろう。また、「int p = 5000;」という記述があるとする。プログラマに聞くと、変数名 p は価格(Price)の略だと言うのだが、それならば略さずに、「int price = 5000;」としたほうが分かりやすいはずである。「ネーミングはわかりやすく」の背景には、読んで内容が理解できるという意味で、文章のようなプログラミングを行う、という考え方に基づく。

    サンプルを鵜呑みにしない

    サンプルコードを活用すること自体は、著作権等を侵害しなければ問題ない。問題なのは、その内容や背景を理解しないまま、サンプルコードだけを鵜呑みにして、「おまじない」として表面的に適用してしまうことである。コードを「おまじない」ととらえていては、サンプルコードの間違いを気づかないまま適用してしまうこともある。例えば、ストリームのクローズ処理を行っていないサンプルコードであっても、それに気づかずに自分のコードに適用してしまい、後で思わぬ障害を引き起こすという可能性がある。サンプルコードは、そこで説明する内容に絞ったコードが多いため、このような例はよく見られる。また、サンプルコードをそのまま適用した結果、自分が記述すべきコードには必要のないコードが含まれてしまう場合もある。その場合、コードの可読性を下げる原因となる。自分のコードは、自分で深く理解して記述すべきである。

    同じコードは二度書かない

    コードをコピー・ペーストしていませんか?コピー・ペーストしてしまうと、何らかの修正をする際に、全ての個所に同じ修正をする羽目になる。同じコードが現れるようならまとめて一つにし、外に出してコールするような書き方にすべきである。同じコードをまとめる作業は、どちらかといえば、コーディング時よりリファクタリング(ソフトウェアの外部的振る舞いを変更せずに内部構造を改善する作業)で行われることが多い。しかし、コーディング時からできるだけ気をつけておきたいことでもある。

    役割は一つに

    メソッドの役割が明確で、かつ 1 つであれば単体テストが行いやすくなる。つまり、コードの「試験性」が高まる。また、役割が一つであれば、後でコードを変更する際に修正箇所がわかりやすいため、障害修正に要する時間が短くなる。つまり、コードの「保守性」があがることになる。例えば、「チェックをして実行する」機能を実現するために、checkAndDo()メソッドが存在したとする。この場合、このメソッドは check()メソッドと do()メソッドに分割すべきである。なぜなら、checkAndDo()メソッドの check()ロジックに誤りがあった場合、do()メソッドに書かれる内容まで把握する必要が生じるためである。分割してあれば、check()メソッドだけの変更で済む。このことはクラスの設計にもあてはまる。

    ネーミング規約

    全般

    • 大文字・小文字の違いで名前を区別しない。

      良い例:

      java
      private int carNumber;
      +private int trainNumber;

      悪い例:

      java
      private int num;
      +private int Num;

    パッケージ

    • パッケージ名はすべて小文字にする
    • パッケージ名は意味のある名前にする
    • サブパッケージ名の重複は可能

    クラス

    • クラス名は単語の先頭を大文字にする
      良い例:

      java
      public class Entry {

      悪い例:

      java
      public class entry {
    • インターフェース名、Enum 名はクラス名に準ずる

    メソッド

    • コンストラクタと同じ名前のメソッドはつくらない

    • メソッド名は区切りのみ大文字にする
      良い例:

      java
      public String getName() {
      +    //・・・
      +}

      悪い例:

      java
      public String getname() {
      +    //・・・
      +}
      +public String GETNAME() {
      +    //・・・
      +}
    • 変換メソッド名は「"to"+オブジェクト名」にする
      良い例:

      java
      public String toString() {

      悪い例:

      java
      public String string() {
    • ゲッターメソッド名は「"get"+属性名」にする
      型がbooleanの場合は「"is"+属性名」にする

    • セッターメソッド名は「"set"+属性名」にする

    • boolean変数を返すメソッド名はtrue/falseの状態がわかるようにする

      良い例:

      java
      public boolean isAsleep() {
      +}
      +public boolean exists() {
      +}
      +public boolean hasExpired() {
      +}

    引数

    • メソッドのパラメータ名とインスタンス変数名を一緒にしない
      ただし、アクセサメソッドやコンストラクタなど、統合開発環境の機能により自動生成するものに関しては可とする。
      アンダースコア _ をつけての区別は原則禁止とする。

      良い例:

      java
      public double calc(double rate) {
      +    return this.value * rate;
      +}

      悪い例:

      java
      public double calc(double value) {
      +    return this.value * value;
      +}
      +
      +public double calc(double _value) {
      +    return this.value * _value;
      +}

    変数全般

    • boolean変数はtrue/false の状態がわかるようにする

      良い例:

      java
      private boolean isOpen;

      悪い例:

      java
      private boolean flag;
    • 定数は全てstatic finalとし、すべて大文字、区切りは"_"

      良い例:

      java
      private static final String SYSTEM_NAME = "販売管理システム";
    • 変数名は小文字とし、単語の区切りのみ大文字にする

      良い例:

      java
      private String thisIsString;

      変数名に固有名詞が含まれる場合、先頭をのぞき、単語の区切り以外に大文字を使用してもよい

      良い例:

      java
      private String thisIsIPAddress;

    ローカル変数

    • スコープが狭い変数名は省略した名前でもよい
      良い例:

      java
      if (・・・) {
      +    String s = "・・・・";
      +   //変数sを利用した処理 数行
      +}

      悪い例:

      java
      String s = "・・・・";
      +if (・・・) {
      +   //変数sを利用した処理
      +}
      +・・・
      +if (・・・) {
      +   //変数sを利用した処理
      +}

      変数sの利用範囲が広いので役割が明確になる変数名に変更する。

    • for 文のループカウンタは、ネストごとに"i","j","k"・・・を使う

    Enum

    • Enum 名はクラス名と同じく、単語の先頭を大文字にする

    • 列挙定数は定数と同じく、すべて大文字、区切りは"_"

      良い例:

      java
      enum Season {
      +    WINTER,
      +    SPRING,
      +    SUMMER,
      +    FALL
      +}

      悪い例:

      java
      enum Season {
      +    winter,
      +    spring,
      +    summer,
      +    fall
      +}

    コーディング規約

    全般

    • 原則としてオブジェクトの参照にはインターフェースを利用する
      オブジェクトを参照する際は、そのオブジェクトの実装クラスを用いて宣言できるが、実装クラスに適切なインターフェースが存在している場合は、必ずインターフェースを用いて宣言すること。

      良い例:

      java
      List<Entry> list = new ArrayList<>();
      +Map<String, String> map = new HashMap<>();

      悪い例:

      java
      ArrayList<Entry> list = new ArrayList<>();
      +HashMap<String, String> map = new HashMap<>();
    • 推奨されない API を使用しない
      アノテーション@Deprecatedで指定されたメソッドは利用しないこと。

    • 使われないコードは書かない

    • 宣言は適切な権限で行うこと(public, protected, private

    • final を適切に利用する
      継承されないクラス、オーバーライドされないメソッド、値の変わらない変数(つまり定数)等、変化のないもの/変化させたくないものについてはfinal で宣言する。

      良い例:

      java
      //継承されないクラス
      +public final class CalculateUtils {
      +    //・・・
      +}
      +
      +//値の変わらない変数(定数)
      +private static final String MESSAGE = "・・・";
      +
      +//オーバーライドされないメソッド
      +public final int sum(/*変化させたくない値*/final int... values) {
      +    int sumValue = 0;
      +    for (/*変化させたくない値*/final int value : values) {
      +        sumValue += value;
      +    }
      +    return sumValue;
      +}

    フォーマット

    • インデントは空白文字 4 文字分の Tab を使用する

    • 長すぎる行は避ける

    • { の後にステートメントを記述しない
      良い例:

      java
      if (s == null) {
      +    return 0;
      +}

      悪い例:

      java
      if (s == null) {return 0;}
    • 1 行に 2 つ以上のステートメントを記述しない
      悪い例:

      java
      } catch (Exception e) {
      +    log.error("Error", e);return null;
      +}
    • カンマの後には空白文字を
      良い例:

      java
      process(x, y, z);

      悪い例:

      java
      process(x,y,z);
    • 代入演算子( = , += , -= , …)の前後には空白文字を挿入する
      良い例:

      java
      int a = x;
      +a += 10;

      悪い例:

      java
      int a=x;
      +a+= 10;
    • for 文内のセミコロンの後には空白文字を挿入する
      良い例:

      java
      for (int i = 0; i < array.length; i++) {
      +    //・・・
      +}

      悪い例:

      java
      for (int i = 0;i < array.length ;i++) {
      +    //・・・
      +}
    • ++-- とオペランドの間には空白文字を入れない
      良い例:

      java
      i++;

      悪い例:

      java
      i ++;
    • ビット演算子( |&^<<>> )の前後には空白文字を挿入する

    • 論理演算子( ||&&)の前後には空白文字を挿入する

    • 関係演算子( <>>=<===!= )の前後には空白文字を挿入する

    • 算術演算子( /% )の前後には空白文字を挿入する

    • return 文ではカッコを使わない
      良い例:

      java
      int answer = (a + b + c) * d;
      +return answer;

      悪い例:

      java
      return ((a + b + c) * d);
    • if などの条件式で boolean の変数を比較しない

      良い例:

      java
      if (hasStock)

      悪い例:

      java
      if (hasStock == true)
    • 不等号の向きは左向き( <<= )にする
      良い例:

      java
      if (from <= x && x <= to) {

      悪い例:

      java
      if (x >= from && x <= to) {

    コメント

    • ファイルの先頭への Copyright の表記について
      ソースのファイルヘッダにコピーライト標記は法的拘束力がないため、不要とする。
      ただし、顧客からの要求があった場合を除く。

    • Javadoc コメントには、少なくとも author と version(クラス)、param と return と exception(メソッド)を記述する

      • 今後もバージョンアップのリリースが予定されているソースでは、上記に加えて since(バージョン)を記述する
      • @Overrideのあるメソッドでは、上記に加えて{@Inherit}を記述する
    • Javadoc  クラスヘッダコメントのフォーマットは以下の通り

      良い例:

      java
      /**
      + * Action(or Bean)クラス メニュー名称
      + *
      + * @author 姓 名
      + * @version バージョン YYYY/MM/DD 説明
      + */
    • コメントは必要なものだけを簡潔に
      悪い例:

      java
      /**
      + * 文字列に変換
      + */
      +@Override
      +public String toString() {
      +
      +/**
      + * コピー
      + *
      + * @return コピーしたインスタンス
      + */
      +public Entry copy() {
    • 不要なコメントは記載しない

      • コードからすぐわかること・冗長なコメント
      • 名前の説明
        コメントではなくわかりやすい名前を付ける。
      • 別システムで管理している内容
        ソースコード管理システム、バグトラッキングシステムで管理している内容はソースコードにコメントで記載する必要はない。
        • コメントアウトされたコード
          ソースコード管理システムで管理されている

    インポート

    • java.langパッケージはインポートしない

      悪い例:

      java
      import java.lang.String;//必要のない記述
    • 原則として static インポートしない
      JUnit の作成やフレームワークとして static インポートが推奨されるような場合は利用してもよい

    • 原則としてオンデマンドのインポート宣言(type-import-on-demand declaration)(アスタリスク*によるインポート) は行わない

      悪い例:

      java
      import java.util.*;

    コンストラクタ

    • public 宣言していないクラスにはpublic権限のコンストラクタを作らない
      良い例:

      java
      class Entry {
      +    //・・・
      +    Entry(int id) {
      +        //・・・
      +    }

      悪い例:

      java
      class Entry {
      +    //・・・
      +    public Entry(int id) {
      +        //・・・
      +    }
    • インスタンスメンバを持たない(static メンバのみの)クラスは、private権限のコンストラクタを作成する

    メソッド

    • オーバーライドさせたくないメソッドはfinalを利用する

    • 戻り値が配列のメソッドで、戻る配列のサイズが 0 の場合、メソッドを使用するクライアントの余計な null チェックのロジックを回避するため、null ではなく長さゼロの配列を戻すようにする。 良い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return ArrayUtils.EMPTY_STRING_ARRAY;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return Collections.emptyList();
      +    }
      +    return Arrays.asList(s);
      +}

      悪い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return Arrays.asList(s);
      +}
    • メソッドは 1 つの役割にする

    クラスメソッド

    • クラスメソッドを利用するときは、クラス名を使って呼び出す
      良い例:

      java
      int comp = Integer.compare(x, y);

      悪い例:

      java
      Integer a = //
      +int comp = a.compare(x, y);

    変数全般

    • 1 つのステートメントには 1 つの変数宣言
      良い例:

      java
      /** 科目コード */
      +private String code;
      +/** 科目名 */
      +private String name;
      +/** 科目略名 */
      +private String shortName;

      悪い例:

      java
      private String code, name, shortName;
    • リテラルは使用しない
      リテラルとは、コード中に、表現が定数として直接現れており、記号やリストで表現することができないものを指す(数値、文字列両方含む 通称マジックナンバー)。コードの可読性・保守性の低下を防ぐために、リテラル定数(static final フィールド)を使用すること。
      例外:-1,0,1 等をカウント値としてループ処理等で使用するような場合

      良い例:

      java
      private static final double ONE_MILE_METRE = 1609.344;
      +
      +public double mileToMetre(double mi) {
      +    return mi * ONE_MILE_METRE;
      +}

      悪い例:

      java
      public double mileToMetre(double mi) {
      +    return mi * 1609.344;
      +}
      • リテラル定数の名前はその値の意味を正しく表現したものにする

        悪い例:

        java
        private static final int ZERO = 0;
    • 配列宣言は「型名[]」にする

      良い例:

      java
      private int[] sampleArray = new int[10];

      悪い例:

      java
      private int sampleArray[] = new int[10];
    • できるだけローカル変数を利用する
      ローカル変数で事足りるものをインスタンス変数として利用するなど、必要のないインスタンス変数を定義すると、パフォーマンスや可読性の低下やの大きな要因となる上、マルチスレッドを意識した際に不整合がおきる可能性があるので、インスタンス変数は必要性を充分に考慮してから使用すること。

    • 定数はfinalで宣言する

    • ローカル変数とインスタンス変数を使いわける

    定数

    • public で宣言するクラス変数とインスタンス変数は、定数のみとし、 static final で定義する
      final ではない static な定数は作成しない。

      良い例:

      java
      public static final String PROTOCOL_HTTP = "http";
    • 定数( static フィールド)に、 static ではないメソッドから書き込まない

    • 定数は、プリミティブ型もしくは、不変(Immutable)オブジェクトで参照する

      • 不変Listの生成にはCollectionsクラスのunmodifiableList()メソッドを利用する

        良い例:

        java
        public static final List<Integer> VALUES = Collections.unmodifiableList(Arrays.asList(1, 2, 3, 4, 5));

        悪い例:

        java
        public static final List<Integer> VALUES = Arrays.asList(1, 2, 3, 4, 5);
      • 不変Setの生成にはCollectionsクラスのunmodifiableSet()メソッドを利用する

      • 不変Mapの生成にはCollectionsクラスのunmodifiableMap()メソッドを利用する

        良い例:

        java
        public static final Map<Integer, String> VALUES_MAP = Collections.unmodifiableMap(new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +});

        悪い例:

        java
        public static final Map<Integer, String> VALUES_MAP = new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +};
      • 不変な配列インスタンスは長さ 0 の配列以外は生成不可能なため、外部から参照される(public)定数では利用せず、List等への置き換えをすること

        良い例:

        java
        public static final List<Integer> VALUES = Collections.unmodifiableList(Arrays.asList(1, 2, 3, 4, 5));

        悪い例:

        java
        public static final int[] VALUES = { 1, 2, 3, 4, 5 };

    インスタンス変数

    • インスタンス変数はprivateにする

      良い例:

      java
      public class Employee {
      +    private long id;
      +
      +    //・・・
      +    //getter/setter
      +}

      悪い例:

      java
      public class Employee {
      +    public long id;
      +
      +    //・・・
      +    //getter/setter
      +}

    クラス変数

    • public static final 宣言した配列を利用しない
      ※「定数」を参照

    • クラス変数にはクラス名を使用してアクセスすること

      良い例:

      java
      BigDecimal b = BigDecimal.ZERO;

      悪い例:

      java
      BigDecimal a = //
      +BigDecimal b = a.ZERO;

    ローカル変数

    • ローカル変数は利用する直前で宣言する
      行間の程度にもよるが、ある程度まとめて宣言するのは OK とする。

      良い例:

      java
      for (int i = 0; i < lines.length; i++) {
      +    String line = lines[i];
      +    //lineの処理
      +}

      悪い例:

      java
      String line;
      +for (int i = 0; i < lines.length; i++) {
      +    line = lines[i];
      +    //lineの処理
      +}
    • ローカル変数は安易に再利用しない
      一度宣言したローカル変数を、複数の目的で安易に使いまわさないこと。ローカル変数は、役割ごとに新しいものを宣言して初期化することにより、コードの可読性・保守性の向上、及びコンパイラの最適化の促進をはかる。

    引数

    • メソッド引数への代入は行わない
      原則としてfinalで宣言する。

      良い例:

      java
      public void add(final int value) {
      +    //・・・
      +}

    継承

    • スーパークラスのインスタンス変数をサブクラスでオーバーライドしない
      スーパークラスと同じ名前のフィールドをサブクラスで宣言しないこと。 同じ名前のフィールドを宣言すると、スーパークラスのフィールドはサブクラスで宣言されたフィールドによって隠ぺいされてしまうので、他の人の混乱を招くことを防ぐため重複する名前は付けないこと。

      悪い例:

      java
      public class Abs {
      +    protected String name;
      +}
      +
      +public class Sub extends Abs {
      +    protected String name;//Abs#nameは隠ぺいされる
      +}
    • スーパークラスのメソッドをオーバーライドするときは@Override アノテーションを指定する。

      良い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    @Override
      +    protected void process() {
      +
      +    }
      +}

      悪い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    //@Overrideアノテーションの指定がない
      +    protected void process() {
      +
      +    }
      +}
    • スーパークラスで private 宣言されているメソッドと同じ名前のメソッドをサブクラスで定義しない
      スーパークラスにある private メソッドと同じ名前のメソッドをサブクラスで定義しないこと。private メソッドはオーバーライドされず全く別のメソッドとして扱われ、他の人の混乱を招き、バグにつながる恐れがある。

    インナークラス

    • 原則としてインナークラスは利用しない
      一つの java ファイルに複数のクラスを記載するのは NG とする。また無名クラスを利用するのも原則として NG とする。
      Enum の定数固有メソッド実装(constant-specific method implementation)、Java8 のラムダ式は内部的にインナークラスとされるがこれらは許可する。

    メンバー順序

    • 以下の順で記述する

      1. static フィールド
      2. static イニシャライザー
      3. static メソッド
      4. フィールド
      5. イニシャライザー
      6. コンストラクター
      7. メソッド
    • 同一カテゴリー内では以下の可視性の順で記述する

      1. public
      2. protected
      3. パッケージ private
      4. private

    インスタンス

    • オブジェクト同士はequals()メソッドで比較する

      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}

      ただし Enum の場合は==演算子を利用して比較する

      equals()メソッドで比較する際、左辺のオブジェクトが null にならないように制御すること。

    • Class 名を利用した比較をおこなわない

      良い例:

      java
      if (o instanceof Foo) {
      +    // ...
      +}

      悪い例:

      java
      if ("my.Foo".equals(o.getClass().getName())) {
      +    // ...
      +}

    制御構造

    • 制御文( if , else , while , for , do while )の { } は省略しない

      良い例:

      java
      if (s == null) {
      +    return;
      +}

      悪い例:

      java
      if (s == null)
      +    return;
    • ステートメントが無い {} ブロックを利用しない
      悪い例:

      java
      //{}内の記述が無い
      +if (s == null) {
      +}
    • if / while の条件式で = は利用しない
      良い例:

      java
      boolean a =//
      +if (!a) {
      +    //・・・
      +}

      悪い例:

      java
      boolean a =//
      +if (a = false) {//コーディングミス
      +    //・・・
      +}
      +
      +
      +boolean a =//
      +boolean b =//
      +if (a = b) {//おそらくコーディングミス
      +    //・・・
      +}
    • forwhile の使い分けを意識する

    • for 文を利用した繰り返し処理中でループ変数の値を変更しない
      悪い例:

      java
      String[] array = { /*・・・*/ };
      +for (int i = 0; i < array.length; i++) {
      +    //・・・
      +    i += 2;//NG
      +}
      +
      +for (String s : array) {
      +    //・・・
      +    s = "string";//NG
      +}
    • for 文のカウンタは特別な事情がない限り、0 から始める

    • 配列やリストなどの全要素に対するループ処理は拡張 for 文を使用する。
      良い例:

      java
      for (int value : array) {
      +    //・・・
      +}
      +
      +for (String value : list) {
      +    //・・・
      +}
    • 配列をコピーするときはArrays.copyOf()メソッドを利用する

      良い例:

      java
      int[] newArray = Arrays.copyOf(array, array.length);

      悪い例:

      java
      int[] newArray = new int[array.length];
      +System.arraycopy(array, 0, newArray, 0, array.length);
    • 繰り返し処理中のオブジェクトの生成は最小限にする

    • if 文と else 文の繰り返しや switch 文の利用はなるべく避け、オブジェクト指向の手法を利用する
      良い例:

      java
      CodingKind codingKind = toCodingKind(kind);
      +d = codingKind.encode(s);
      +
      +//---
      +
      +CodingKind codingKind = toCodingKind(kind);
      +s = codingKind.decode(d);

      悪い例:

      java
      switch (kind) {
      +case 1:
      +    d = encode1(s);
      +    break;
      +case 2:
      +    d = encode2(s);
      +    break;
      +default:
      +    break;
      +}
      +
      +//---
      +
      +switch (kind) {
      +case 1:
      +    s = decode1(d);
      +    break;
      +case 2:
      +    s = decode2(d);
      +    break;
      +default:
      +    break;
      +}
    • 繰り返し処理の内部で try ブロックを利用しない
      特に理由がない場合は繰り返し処理の外にtryブロックを記載する。
      ただし、繰り返し処理内部で例外をキャッチし処理を行いたい場合は繰り返し処理の内部でtryブロックを利用してもよい。

      良い例:

      java
      for (String s : array) {
      +    BigDecimal num;
      +    try {
      +        num = new BigDecimal(s);
      +    } catch (NumberFormatException e) {
      +        num = BigDecimal.ZERO;
      +    }
      +    //・・・
      +}

    文字列操作

    • 文字列同士が同じ値かを比較するときは、equals()メソッドを利用する
      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}
    • 文字列リテラルはnew しない
      良い例:

      java
      String s = "";

      悪い例:

      java
      String s = new String();
    • 更新される文字列にはStringBuilder クラスを利用する
      良い例:

      java
      StringBuilder builder = new StringBuilder();
      +for (String s : array) {
      +    builder.append(s);
      +}
      +System.out.println(builder.toString());

      悪い例:

      java
      String string = "";
      +for (String s : array) {
      +    string += s;
      +}
      +System.out.println(string);

      スレッドセーフ性が保証されていない箇所では\`StringBuffer\`クラスを利用する

      ※パフォーマンスについても記載しているので参考にしてください

    • 更新されない文字列にはString クラスを利用する

    • 文字列リテラルと定数を比較するときは、文字列リテラルのequals()メソッドを利用する
      良い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (PROTOCOL_HTTP.equals(url.getProtocol())) {
      +
      +}

      悪い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (url.getProtocol().equals(PROTOCOL_HTTP)) {
      +
      +}
    • プリミティブ型とString オブジェクトの変換には、変換用のメソッドを利用する
      良い例:

      java
      int i = 1000;
      +String s = String.valueOf(i);// "1000"
      +s = NumberFormat.getNumberInstance().format(i);// 3桁区切り "1,000"
      +
      +boolean b = true;
      +s = String.valueOf(b);// true/false
      +s = BooleanUtils.toStringOnOff(b);// on/off
    • 文字列の中に、ある文字が含まれているか調べるには、contains()メソッドを利用する

    • システム依存記号( \\n\\r など)は使用しない。
      悪い例:

      java
      String text = Arrays.stream(array)
      +    .collect(Collectors.joining("\\n"));

    数値

    • 誤差の無い計算をするときは、BigDecimal クラスを使う
      浮動小数点演算は科学技術計算に利用するもので、誤差が発生する。これに対して、クラス「BigDecimal」は、文字列で数値の計算を行うので、金額などの正確な計算に適している。BigDecimal ではインスタンス生成時に指定された桁数での精度が保証される。

    • 数値の比較は精度に気をつける
      良い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +if (a.compareTo(b) == 0) {
      +    System.out.println("一致");
      +}

      悪い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +
      +if (a.equals(b)) {
      +    System.out.println("精度が違うためこの分岐には入らない");
      +}
    • 低精度なプリミティブ型にキャストしない

    • BigDecimalString変換する際はtoString()ではなくtoPlainString()を利用すること
      toString()を利用した場合、指数表記になることがあります。

    日付

    • 日付の文字列のフォーマットには、SimpleDateFormatまたはDateTimeFormatterを使う
      良い例:

      java
      Date date = new Date();
      +SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
      +String s = dateFormat.format(date);

    三項演算子

    • 入れ子の三項演算子の利用は禁止
      可読性が悪くなるので三項演算子を入れ子で行うのは禁止。

    コレクション

    • Java2 以降のコレクションクラスを利用する
      Vector クラス、Hashtable クラス、Enumeration 等は、特にこれらを利用する理由がなければ、インターフェースを統一する目的で、これらの代わりにList(ArrayList クラス)、Map(HashMap クラス)、Iterator を使用すること。List などのインターフェースを利用することで JDK1.2 で整理されたわかりやすいメソッドを利用でき、また、インターフェースの特性から呼び出し元を変更せずに実装クラスを変更することができる。

    • 特定の型のオブジェクトだけを受け入れるコレクションクラスを利用する

      良い例:

      java
      List<Map<String, String>> list = new ArrayList<>();
    • ListのソートはList.sort()を利用する
      Listクラスの要素をソートする際は Java8 で追加されたList.sort()を利用すること。
      Java 7 以前で利用されていたCollections.sort()は利用しないこと。

    • Collection.forEach()は利用しない。拡張 for 文の利用を検討する
      Java8 で追加されたメソッド。
      拡張 for 文を利用したほうが多くの場合でデバッグに有利であり、可読性においてもforEachの優位性は少ないため、forEachは原則利用しない。拡張 for 文を利用する。
      具体的には下記のメソッドを利用しないこと。

      • Collection#forEach
      • Set#forEach
      • List#forEach

      Map#forEachはこの限りではない

      良い例:

      java
      for (String s : Arrays.asList("A", "B")) {
      +    //処理
      +}

      悪い例:

      java
      Arrays.asList("A", "B").forEach(s -> {
      +    //処理
      +});

      ただし、メソッド参照で処理できる場合はforEachを利用する。
      (デバッグのデメリットがほとんどなく、他と比較して処理効率が良いため)

      良い例:

      java
      Arrays.asList("A", "B").forEach(this::process);

      悪い例:

      java
      for (String s : Arrays.asList("A", "B")) {
      +    this.process(s);
      +}

    ラムダ式・メソッド参照・コンストラクタ参照

    • ラムダ式が利用できる箇所はラムダ式を利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • ただし、メソッド参照・コンストラクタ参照が利用できる場合はメソッド参照・コンストラクタ参照を利用する

      良い例:

      java
      String::compareToIgnoreCase

      悪い例:

      java
      (s1, s2) -> s1.compareToIgnoreCase(s2)

      良い例:

      java
      BigDecimal::add

      悪い例:

      java
      (b1, b2) -> b1.add(b2)
    • ラムダ式記述の際、型宣言は省略記法で記述する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (String s1, String s2) -> s1 + "=" + s2
    • 原則ラムダ式内の行数は 1 行とする
      複数行で利用したい場合は、privateメソッドを作成しメソッド参照を利用する

      良い例:

      java
      this::getMax
      +
      +private int getMax(int i1, int i2) {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}

      悪い例:

      java
      (i1, i2) -> {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}
    • 原則ラムダ式は 1 行記述に限定するので、中カッコ、returnは必ず省略する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (s1, s2) -> {
      +    return s1 + "=" + s2;
      +}

    実質的 final(effectively final)

    • 実質的 final を利用する
      変数宣言にfinalを記載しなくてよい。

    Stream API

    • 利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • 並列ストリームは利用しないこと
      悪い例:

      java
      Stream<?> s = list.parallelStream();
      +Stream<?> s = list.stream().parallel();
    • StreamAPI 記述の際の改行位置は、各中間処理・末端処理前のピリオドの前で改行する

      良い例:

      java
      List<Character> alphabetLower = list.stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .collect(Collectors.toList());

      悪い例:

      java
      List<Character> alphabetLower = list.stream().filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase).collect(Collectors.toList());
      +
      +List<Character> alphabetLower = list
      +    .stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .collect(Collectors.toList());
    • インデントは統合開発環境の提供するフォーマッタに合わせる

    • 中間処理の数は 3 つ(3 行)程度までを推奨する
      中間処理の記述が多くなると可読性も悪くなり、デバッグも難しくなるため、3 行程度を目安にロジックを検討すること。

    • コメントは、原則として処理中には記載しない
      難解になってしまった場合のみ処理中の記載を認める

      良い例:

      java
      // クラスFooのフィールドStrの値で昇順にソートし、フィールドStrの要素を取得して処理する。
      +fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    .map(Foo::getStr)
      +    .forEach(this::proc);

      悪い例:

      java
      fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr)) //クラスFooのフィールドStrの値で昇順にソート
      +    .map (Foo::getStr) //フィールドStrの要素を取得
      +    .forEach(this::proc); //処理
      +
      +
      +fooList.stream()
      +    //クラスFooのフィールドStrの値で昇順にソート
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    //フィールドStrの要素を取得
      +    .map (Foo::getStr)
      +    //処理
      +    .forEach(this::proc);
    • Stream は極力変数代入しないこと
      Stream は中間処理、末端処理を行うと使用済みとなり、以降同じインスタンスは利用できない。
      変数代入はほとんどの場合意味をなさず、むしろミスの元となるため極力変数代入はしないこと。

      良い例:

      java
      List<String> list1 = Stream.of("A", "B", "C")
      +        .map(String::toLowerCase)
      +        .collect(Collectors.toList());
      +
      +List<String> list2 = Stream.of("A", "B", "C")
      +        .map(s -> s + s)
      +        .collect(Collectors.toList());

      悪い例:

      java
      Stream<String> stream = Stream.of("A", "B", "C");
      +Stream<String> stream1 = stream.map(String::toLowerCase);
      +List<String> list1 = stream1.collect(Collectors.toList());
      +
      +Stream<String> stream2 = stream.map(s -> s + s);//コーディングミス streamは使用済のためエラーになる
      +List<String> list2 = stream2.collect(Collectors.toList());

    Optional

    • Optional は同メソッド内で値を取り出す場合は極力変数代入しないこと
      Optional とその値の変数は同じものを示す名前となり、同じ意味の変数名が複数現れることで可読性が下がるため、Optional の変数代入は行わないこととする。

      良い例:

      java
      Employee employee = findEmployee(employeeId)
      +        .orElseThrow(IllegalArgumentException::new);

      悪い例:

      java
      Optional<Employee> employeeOpt = findEmployee(employeeId);
      +Employee employee = employeeOpt.orElseThrow(IllegalArgumentException::new);

      直接、値を取り出すことなくOptionalでのみ扱う場合はOptionalを変数代入してもよい。

      良い例:

      java
      Optional<Employee> employee = findEmployee(employeeId);
      +
      +Dept dept = employee.map(Employee::getDivision)
      +        .map(Division::getDept)
      +        .orElse(null);
      +
      +Role role = employee.map(Employee::getRole)
      +        .orElse(null);
      +
      +//-----
      +
      +Optional<Employee> employee = findEmployee(employeeId);
      +//・・・処理
      +return employee;

    ストリーム(InputStream OutputStream)

    • ストリームを扱う API を利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • ObjectOutputStream ではreset()を利用する

    リソースの解放

    • リソース解放を必要とするクラスを利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • リソース解放を必要とするクラスを作成する場合はAutoCloseableimplementsする
      AutoCloseableimplementsすることで try-with-resources 文が利用できるようになります。

    例外

    • catch 文で受け取る例外は、詳細な例外クラスで受け取る

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (IOException e) {
      +    log.error("Error", e);
      +    throw e;
      +}

      悪い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (Exception e) {//範囲が広すぎる例外クラスの利用はNG
      +    log.error("Error", e);
      +    throw e;
      +}
    • Exception クラスのオブジェクトを生成してスローしない

    • catch ブロックでは基本、例外処理をする。ただし処理を書いてはいけない部分もあるので、その部分については、"// ignore" というコメントを記述すること。

    • 例外クラスは無駄に定義しない

    ガベージコレクション

    • 原則finalize()のオーバーライド実装は禁止
    • もしfinalize()をオーバーライドした場合はsuper.finalize() を呼び出す
    • アプリケーションからfinalize()を呼び出さない

    コメント規約

    よいコメントの鉄則

    • コードを明確化するコメントを書く
      コードにコメントを書く理由は、自分自身、一緒に仕事をしている人、後に関わる開発者にとってコードをより理解しやすいものにするためである。

    • コメント化する価値がないプログラムならば、実行するに値しない
      有用な格言。コメントは必須。

    • 過剰な装飾は使わない (例:見出し状のコメント)
      1960 年代から 1970 年代の典型的な COBOL プログラマにはアスタリスク( * )でコメントを囲った箱を書く習慣があった。彼らの芸術的な主張を表わしているのかもしれないが、率直に言えばそれは製品に加わるちょっとした価値に比べれば大きな時間の無駄である。かわいいコードではなくきれいなコードを書くはずである。さらに、コードを表示するディスプレイや印刷するプリントに使われるフォントはプロポーショナルだったりそうでなかったりして、箱をきれいに整列させることは難しい。

    • コメントはシンプルに
      かつて見たもっとも最良のコメントは、シンプルな要点をまとめた注釈であった。なにも本を書く必要はなく、他の人がコードを理解するに十分な情報を提供するだけでよいのである。

    • コードを書く前に先にコメントを記述する
      コードをコメント化する最良の方法は、コードを書く前にコメントを書くことである。それが、コードを書く前にコードがどのように動作するかについて考えるよい機会となり、コメントの存在を保障することにもつながる。少なくともコードを書いた時にコメントすべきである。コメントによってコードが理解しやすくなることで、コードの開発中にアドバンテージを得ることができる。コードにコメントを書く時間を費やせば、それによって得られるものがある。

    • コメントには、なぜそうなのかを書く。コードを読めば分かることを書かない
      基本的に、コードの一部分を見ればそれが何かを理解することはできる。例えば、以下のコードを見て、$1000 以上の注文については 5%ディスカウントされることは理解できる。なぜそうなのか?大きな注文ではディスカウントがつきものだというビジネスルールがあるのだろうか?大きな注文に時間限定サービスがあるのか、それともずっとサービスがあるのか?これを書いたプログラマの気前がよかったのか?
      どこかソースコード中か別な文書にコメントされていない限り、それがなぜなのかを知ることはできない。

      java
      if (grandTotal >= 1000.00) {
      +    grandTotal = grandTotal * 0.95;
      +}

      なお、メソッドコメントには、適切な javadoc コメント(タグ)のほかに、以下の内容も可能な限り明記すること。

      • 副作用のある処理の場合は、その内容 (→ メソッドの引数オブジェクトがメソッド内で変更されるケースなど)
      • 既知のバグ (→ 判明しているが修正しないことにした場合など)
      • 影響のある事前条件、事後条件 (→ メソッドが正しく動作するための前提について)
      • 並行性 (→  マルチスレッドでアクセスされた場合の動作について)
      • 該当メソッドの使用例やサンプルコード
    • TODO コメント
      設計者確認待ち、共通処理の作成待ちなどの理由により、実装時に TODO がある場合、下記のようにコメントを記述する。
      (Eclipse の TODO コメント形式を採用)
      例)

      //TODO:ワークフローの仕様決定待ち 関連チケット#12345

    Java コメント(3 種類)の使い分け

    Java では 3 種類のコメントが使える。javadoc コメントは/**で開始され、*/で終わる。C 風コメントは/*で開始され*/で終わる。単一行コメントは//で開始され、そのソースコード行が終わるまで続く。以下の表ではコメントの使い方とその例を示す。(コメントのスタイルに関しては、前述の「標準規約に準拠したコーディング例」を参照)

    コメント種類使用方法
    javadoc コメント
    /** comment */
    interface、class、メソッド、フィールドの直前に書く。コメントは javadoc によって処理され、外部ドキュメント(HTML)として生成される。(この形式以外のコメントはドキュメントとして出力されないことに注意)/*_
    _ 顧客(Customer)-
    _ 顧客はわれわれがサービスまたは製品を売った人物
    _ もしくは組織のいずれかである。
    _ @author 開発太郎
    _/
    C 風コメント
    /* comment */
    特定のコードを無効化したいが、後で使用するかもしれないので残しておくためにコメント化する時や、デバッグ時に一時的に無効化するときに使用する。/_
    このコードは J.T.Kirk によって 1997.12.9 に前述のコードと置き換えたためコメント化した。2 年間不要であるならば削除せよ。
    ... (ソースコード)
    _/
    単一行コメント
    // comment
    メソッド内にて、ビジネスロジック、コードの概要、一時変数の定義内容などを記述する。// 1995 年 2 月に開始された X 氏の寛大なキャンペーンで
    // 定められた通り 1000$を超える請求には、全て 5%割引を
    // 適用する。

    ※ ロジック中に、頻繁に C 風コメントでコメントを書くとまとめてコメントアウトする場合に不便なため、基本的にロジック中では単一行コメントを利用すること。

    パフォーマンス

    パフォーマンスを考慮した Java のコーディングについて以下に示す。

    ※ パフォーマンスは jre のバージョンやスペックによって変化します。本内容は jre1.8.0_74 での検証結果を元にした内容です。

    ※ 性能計測結果についての記載がありますが、あくまでも参考値です。性能を保証するものではありません。

    Stream API

    Java8 で追加された Stream API での記述は、可読性も高く、簡潔に書けますが、パフォーマンス・性能面で注意が必要な場合があります。

    List の処理を行う際、拡張 for 文で処理する場合は Iterator インスタンスが 1 つだけ生成されますが、Stream API で処理する場合、最初の Stream インスタンスに加え、各中間処理ごとにも Stream インスタンスが生成され、その分の性能劣化が懸念されます。
    以下に処理例と計測結果を記載します。

    • 拡張 for 文

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = new ArrayList<>();
      +for (String string : list) {
      +    if (string.endsWith("0")) {
      +        resultList.add(string);
      +    }
      +}
      +return resultList;
    • Stream API

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = list.stream()
      +    .filter(s -> s.endsWith("0"))
      +    .collect(Collectors.toList());
      +return resultList;
    • 計測結果

      処理する List の件数拡張 for 文 (ms)StreamAPI (ms)
      100 万件79
      1,000 万件88114
      1 億件9491,026
      2 億件1,8222,081

    小中規模の処理量であれば考慮するほどの性能差はありませんが、大量の処理が見込まれる場合は考慮が必要です。
    また、Stream API は並列処理(スレッド処理)の機能をサポートしていますので、利用できる場合は並列処理も含めての検証が必要です。

    ラムダ式・メソッド参照・コンストラクタ参照

    Java8 で追加されたラムダ式・メソッド参照・コンストラクタ参照は、匿名クラスを利用するよりも効率的です。
    積極的な利用を推奨します。

    以下に Comparator を生成した場合の計測結果を記載します。

    • 匿名クラス

      java
      Comparator<String> c = new Comparator<String>() {
      +    @Override
      +    public int compare(String o1, String o2) {
      +        return o1.compareToIgnoreCase(o2);
      +    }
      +};
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> o1.compareToIgnoreCase(o2);
    • メソッド参照

      java
      Comparator<String> c = String::compareToIgnoreCase;
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)メソッド参照 (ms)
      10 億回3800(計測不能)0(計測不能)
      100 億回6,3740(計測不能)0(計測不能)
      1 京回(30 秒以上)1410

    ラムダ式は外部の変数を利用する場合、匿名クラスとほぼ同じ動作をします。

    • 匿名クラス

      java
      new Comparator<String>() {
      +        @Override
      +        public int compare(String o1, String o2) {
      +            return arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                            : o1.compareToIgnoreCase(o2);
      +        }
      +    }
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                    : o1.compareToIgnoreCase(o2);
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)
      10 億回(パラメータあり)571572
      100 億回(パラメータあり)9,9009,864

    文字列連結

    文字列連結(繰り返し)

    文字列連結を繰り返し処理中で行う際、+演算子で処理することはアンチパターンとして知られています。
    繰り返し処理中の文字列連結は、 StringBuilderStringJoinerStringBuffer を利用します。
    また、コレクション要素の結合であればString#joinが利用できます。

    以下に処理例と計測結果を記載します。

    • +演算子

      java
      String s = "";
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        s += ",";
      +    }
      +    s += string;
      +}
      +return s;
    • StringBuilder

      java
      StringBuilder sb = new StringBuilder();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • StringBuffer

      java
      StringBuffer sb = new StringBuffer();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • String#join

      java
      return String.join(",", list);
    • 計測結果

      処理する List の件数+演算子 (ms)StringBuilder (ms)StringBuffer (ms)String#join (ms)
      1,000 件50(計測不能)0(計測不能)0(計測不能)
      1 万件1,016111
      10 万件(30 秒以上)255
      100 万件(30 秒以上)294251

    文字列連結(定数)

    基本的に処理中の文字列連結では+演算子は使わないで処理するほうがパフォーマンスが高くなりますが、定数の場合は+演算子で定義するほうがパフォーマンスが高いです。

    たとえば以下のように、処理したい場合、

    java
    private static final String CONST_A = "A";
    +private static final String CONST_B = "B";
    +private static final String CONST_AB = CONST_A + CONST_B;

    StringBuilder で処理しようとすると以下のようになります。

    java
    private static final String CONST_AB = new StringBuilder(CONST_A).append(CONST_B).toString();

    しかし、これらをバイトコード上で確認するとそれぞれ以下のようになります。

    • +演算子

      java
      private static final java.lang.String CONST_AB = "AB";
    • StringBuilder

      java
      private static final java.lang.String CONST_AB;
      +
      +static {};
      +   0  new java.lang.StringBuilder [20]
      +   3  dup
      +   4  ldc <String "A"> [8]
      +   6  invokespecial java.lang.StringBuilder(java.lang.String) [22]
      +   9  ldc <String "B"> [11]
      +  11  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [26]
      +  14  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [30]
      +  17  putstatic jp.co.packagename.ClassName.CONST_AB : java.lang.String [34]
      +  20  return

    +演算子を利用した場合コンパイル時に最適化され、文字列"A""B"をあらかじめ結合して class が作成されます。
    StringBuilderを利用した場合は最適化はされず、記述した通りの処理が行われます。

    計測した場合、下記のようになります。

    • 計測結果

      処理回数StringBuilder (ms)+演算子 (ms)
      5,000 万回5590(計測不能)
      1 億回1,0590(計測不能)

    通常、定数処理を大量に処理することは考えられないので性能問題になることはありませんが、+演算子を利用したほうがパフォーマンスが高いこともあるということを理解してください。

    List の種類

    ListにはArrayListのようなRandomAccessを implements した、ランダムアクセスをサポートしているクラスと、
    LinkedListのようなランダムアクセスをサポートしていない(シーケンシャルアクセス)クラスが存在します。
    RandomAccessではないListは、List#getなどインデックスを利用するような操作のパフォーマンスが低いので注意してください。

    以下に処理例と計測結果を記載します。

    • for 文(List#get(int)によるループ)

      java
      int size = list.size();
      +for (int i = 0; i < size; i++) {
      +    String s = list.get(i);
      +    //処理
      +}
    • 拡張 for 文

      java
      for (String s : list) {
      +    //処理
      +}
    • forEach

      java
      list.forEach(this::処理);
    • 計測結果

      処理する List の件数ArrayList
      for 文(List#get(int)によるループ) (ms)
      LinkedList
      for 文(List#get(int)によるループ) (ms)
      ArrayList
      拡張 for 文 (ms)
      LinkedList
      拡張 for 文 (ms)
      ArrayList
      forEach (ms)
      LinkedList
      forEach (ms)
      1 万件0(計測不能)730(計測不能)0(計測不能)0(計測不能)0(計測不能)
      10 万件0(計測不能)7,5760(計測不能)0(計測不能)12
      20 万件0(計測不能)17,7400(計測不能)0(計測不能)0(計測不能)0(計測不能)
      50 万件0(計測不能)(30 秒以上)0(計測不能)20(計測不能)2
      100 万件1(30 秒以上)0(計測不能)40(計測不能)4
      1,000 万件16(30 秒以上)845644

    ランダムアクセスをサポートしているListがシーケンシャルアクセス(iterator を利用した処理など)で遅いということはないので、
    ループの処理は拡張 for 文等、Iterator によるループで記述するのが無難です。
    List#getでの処理をすべて禁止することはできませんが、高いパフォーマンスが求められる場合はListの種類にも注目してみてください。

    String から Integer・Long への変換

    数値文字列のStringIntegerに変換するには、Integer#valueOf(String)を利用して下記のように記述します。

    java
    String s = "1";
    +Integer value = Integer.valueOf(s);

    しかし、下記のようにも記述できます。

    java
    String s = "1";
    +Integer value = new Integer(s);

    これらの違いは、
    new Integer(s)とした場合、必ず Integer インスタンスが生成されますが、
    Integer.valueOf(s)とした場合は -128 から 127 の間の数値であればキャッシュから取り出すためインスタンスを生成しません。

    このため、前者のInteger#valueOf(String)を利用した記述のほうが効率的です。
    Long#valueOf(String)も同様です。

    性能差が少ないため、ほとんど問題にはなりませんが、FindBugs 等、静的解析で検出される問題のため、理解が必要です。

    また、String からの変換だけでなく、int や long からの変換も#valueOfが効率的ですが、オートボクシングを利用した場合、コンパイルで自動的にこれらの処理に変換されるため、記述することはありません。

    String から int・long への変換

    数値文字列のStringintに変換するには、Integer#parseInt(String)を利用して下記のように記述します。

    java
    String s = "1";
    +int value = Integer.parseInt(s);

    しかし、オートボクシングが利用できるため、意図せず下記のように記述ミスをする場合があります。

    java
    String s = "1";
    +int value = Integer.valueOf(s);//取得したIntegerインスタンスをオートボクシングでintにcastしている
    java
    String s = "1";
    +int value = new Integer(s);//生成したIntegerインスタンスをオートボクシングでintにcastしている

    「オートボクシング」の説明に記載した通り、性能に差が出るだけでなく、
    記述から明らかにミスであることが解るため、FindBugs 等、静的解析で検出されるコードです。

    longへの変換の場合はLong#parseLong(String)を利用します

    以下に計測結果を記載します。

    • 計測結果

      処理回数Integer.valueOf(String) (ms)Integer#parseInt(String) (ms)
      1,000 万回396318
      1 億回4,0603,077

    BigDecimal の ZERO との比較

    BigDecimal の正・負・ZERO の判定はBigDecimal#signumを利用します。
    compareToを利用してBigDecimal.ZEROと比較しても同じことができますが、signumを利用したほうが効率的です。

    以下に処理例と計測結果を記載します。

    • compareTo 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.compareTo(BigDecimal.ZERO) == 0) {
    • signum 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.signum() == 0) {
    • 計測結果

      (単位:マイクロ秒)

      処理回数compareTo 利用 (マイクロ秒)signum 利用 (マイクロ秒)
      1 京回527
      max:26,367
      min:0
      424
      max:21,213
      min:0

    性能差が少ないので、必ずしも signum を利用する必要はありませんが、大量に処理する場合など、高いパフォーマンスが求められる場合は意識してください。


    License

    CC-By-4.0

    `,175))])}const b=a(h,[["render",k]]);export{y as __pageData,b as default}; diff --git a/assets/documents_forJava_index.md.DlReBA-G.js b/assets/documents_forJava_index.md.DlReBA-G.js new file mode 100644 index 00000000..9a634254 --- /dev/null +++ b/assets/documents_forJava_index.md.DlReBA-G.js @@ -0,0 +1 @@ +import{_ as r,c as e,a3 as t,o}from"./chunks/framework.BDUoXecB.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"Javaコーディング規約","tagline":"Future Enterprise Coding Standards for Java","image":{"src":"/images/JBee.png","alt":"Logo"},"actions":[{"theme":"brand","text":"Javaコーディング規約","link":"./Javaコーディング規約.md"}]}},"headers":[],"relativePath":"documents/forJava/index.md","filePath":"documents/forJava/index.md"}'),l={name:"documents/forJava/index.md"};function s(n,a,i,d,c,h){return o(),e("div",null,a[0]||(a[0]=[t('

    一般的に行われているコーディング規約から、Stream API やラムダ式、最新の Java17 で追加された構文にも対応しています。

    For Java17

    Java17 向けのコーディング規約はこちらです。

    For Old Versions

    • Java11 向けのコーディング規約はこちらです。
    • Java8 向けのコーディング規約はこちらです。

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。
    (これらのファイルはPandocを利用して作成しています。)

    ',8)]))}const E=r(l,[["render",s]]);export{f as __pageData,E as default}; diff --git a/assets/documents_forJava_index.md.DlReBA-G.lean.js b/assets/documents_forJava_index.md.DlReBA-G.lean.js new file mode 100644 index 00000000..9a634254 --- /dev/null +++ b/assets/documents_forJava_index.md.DlReBA-G.lean.js @@ -0,0 +1 @@ +import{_ as r,c as e,a3 as t,o}from"./chunks/framework.BDUoXecB.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"Javaコーディング規約","tagline":"Future Enterprise Coding Standards for Java","image":{"src":"/images/JBee.png","alt":"Logo"},"actions":[{"theme":"brand","text":"Javaコーディング規約","link":"./Javaコーディング規約.md"}]}},"headers":[],"relativePath":"documents/forJava/index.md","filePath":"documents/forJava/index.md"}'),l={name:"documents/forJava/index.md"};function s(n,a,i,d,c,h){return o(),e("div",null,a[0]||(a[0]=[t('

    一般的に行われているコーディング規約から、Stream API やラムダ式、最新の Java17 で追加された構文にも対応しています。

    For Java17

    Java17 向けのコーディング規約はこちらです。

    For Old Versions

    • Java11 向けのコーディング規約はこちらです。
    • Java8 向けのコーディング規約はこちらです。

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。
    (これらのファイルはPandocを利用して作成しています。)

    ',8)]))}const E=r(l,[["render",s]]);export{f as __pageData,E as default}; diff --git "a/assets/documents_forMarkdown_IF\345\256\232\347\276\251\346\233\270.md.BuJHNFYH.js" "b/assets/documents_forMarkdown_IF\345\256\232\347\276\251\346\233\270.md.BuJHNFYH.js" new file mode 100644 index 00000000..a16392f9 --- /dev/null +++ "b/assets/documents_forMarkdown_IF\345\256\232\347\276\251\346\233\270.md.BuJHNFYH.js" @@ -0,0 +1,33 @@ +import{_ as s,c as a,a3 as i,o as d}from"./chunks/framework.BDUoXecB.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/IF定義書.md","filePath":"documents/forMarkdown/IF定義書.md"}'),n={name:"documents/forMarkdown/IF定義書.md"};function e(l,t,r,h,p,k){return d(),a("div",null,t[0]||(t[0]=[i(`

    IF01 設備有効開始受信

    設備有効開始の取り込みを行う。

    対向システム

    連携元連携先
    A システムFuture

    環境情報

    Input

    ItemValue
    連携 S3 バケット\${env}-example-import
    プレフィックスactivate/year=\${yyyy}/month=\${MM}/day=\${dd}/
    ファイル名\${yyyy}-\${mm}-\${dd}-\${hh}-\${MM}-\${SS}.csv
    保持期限3 年

    Output

    ItemValue
    連携 S3 バケット\${env}-example-import
    プレフィックスactivate/year=\${yyyy}/month=\${MM}/day=\${dd}/
    ファイル名\${yyyy}-\${mm}-\${dd}-\${hh}-\${MM}-\${SS}.csv
    保持期限3 年

    連携元定義

    CategoryItemValueMemo
    Protocol連携方式(ファイル/API/ストリーム)ファイル
    連携タイミング(随時/定時)定時
    頻度1 回/日
    起動時間16:00
    処理完了期限16:00
    未着チェック(なし/WARN/ERROR)WARN
    全件/差分差分
    0 件時連携あり
    Formatファイル種別CSV
    レイアウトRFC 8259
    文字コードUTF-8
    改行コードLF
    圧縮-
    暗号化-
    ヘッダ行あり
    項目順固定項目順は入れ替え不可
    機密情報-

    項目定義

    NamePhysical NameTypeLengthPrecisionEnumFormatSensitiveExampleMemo
    会社コードcompany_cdstring5----00001
    設備コードdevice_cdstring8----00000052
    有効開始日activation_datestring10--YYYY-MM-DD-2022-10-16[1]
    サンプル
    csv
    company_cd,device_cd,activation_date
    +12121,00000052,2022-03-01
    +12121,00000053,2022-03-30

    連携先定義

    CategoryItemValueMemo
    Protocol連携方式(ファイル/API/ストリーム)ファイル
    連携タイミング(随時/定時)定時
    頻度1 回/日
    起動時間16:00
    処理完了期限16:00
    未着チェック(なし/WARN/ERROR)WARN
    全件/差分差分
    0 件時連携あり
    Formatファイル種別CSV
    レイアウトRFC 8259
    文字コードUTF-8
    改行コードLF
    圧縮-
    暗号化-
    ヘッダ行あり
    項目順固定項目順は入れ替え不可
    機密情報-

    処理概要

    • ファイル定義に則ったバリデーションを実施
    • 次の項目変換定義に従い加工し、出力先テーブルに Merge する
    • 受信完了後、 Completed: YYYY-MM-DDTHH:MI:SS.SSS のタグを追加する

    処理シーケンス

    plantuml
    @startuml
    +!theme toy
    +
    +participant システム
    +participant S3
    +database DB
    +
    +システム -> DB: 処理日付取得\\n[日付管理]
    +
    +システム -> S3: 対象ファイルの存在チェック
    +
    +alt ファイルが存在しなかった場合
    +   システム -> システム: 処理終了して、次の処理を待機
    +end
    +
    +システム -> DB: シーケンスの取得\\n[シーケンスオブジェクト]
    +
    +システム -> DB: 1.実行開始レコード追加\\n[IF受信管理]
    +
    +システム -> S3: 対象ファイルを取得
    +
    +システム -> DB: 対象マスタのTruncate
    +
    +システム -> DB: ファイル連携処理
    +
    +システム -> システム: 連携件数確認
    +
    +システム -> S3: 処理済対象ファイルを格納
    +
    +システム -> DB: 2.実行終了状態の更新\\n[IF受信管理]
    +@enduml

    DB 項目

    参照

    なし

    登録

    リストワークに以下のカラムでレコードを登録する

    • xxx ワーク.会社コード
    • xxx ワーク.処理日付
    • xxx ワーク.yyy 区分

    更新

    なし

    ビジネスロジック

    特記事項なし

    エラー処理

    PatternDescriptionrecovery
    フォーマットエラー連携元から提供されているデータ形式が想定外連携元またはIFの処理内容の修正と再実行

    1. 現在日以降である必要があるが、受信ではテスト観点で過去日も許容する ↩︎

    `,35)]))}const b=s(n,[["render",e]]);export{c as __pageData,b as default}; diff --git "a/assets/documents_forMarkdown_IF\345\256\232\347\276\251\346\233\270.md.BuJHNFYH.lean.js" "b/assets/documents_forMarkdown_IF\345\256\232\347\276\251\346\233\270.md.BuJHNFYH.lean.js" new file mode 100644 index 00000000..a16392f9 --- /dev/null +++ "b/assets/documents_forMarkdown_IF\345\256\232\347\276\251\346\233\270.md.BuJHNFYH.lean.js" @@ -0,0 +1,33 @@ +import{_ as s,c as a,a3 as i,o as d}from"./chunks/framework.BDUoXecB.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/IF定義書.md","filePath":"documents/forMarkdown/IF定義書.md"}'),n={name:"documents/forMarkdown/IF定義書.md"};function e(l,t,r,h,p,k){return d(),a("div",null,t[0]||(t[0]=[i(`

    IF01 設備有効開始受信

    設備有効開始の取り込みを行う。

    対向システム

    連携元連携先
    A システムFuture

    環境情報

    Input

    ItemValue
    連携 S3 バケット\${env}-example-import
    プレフィックスactivate/year=\${yyyy}/month=\${MM}/day=\${dd}/
    ファイル名\${yyyy}-\${mm}-\${dd}-\${hh}-\${MM}-\${SS}.csv
    保持期限3 年

    Output

    ItemValue
    連携 S3 バケット\${env}-example-import
    プレフィックスactivate/year=\${yyyy}/month=\${MM}/day=\${dd}/
    ファイル名\${yyyy}-\${mm}-\${dd}-\${hh}-\${MM}-\${SS}.csv
    保持期限3 年

    連携元定義

    CategoryItemValueMemo
    Protocol連携方式(ファイル/API/ストリーム)ファイル
    連携タイミング(随時/定時)定時
    頻度1 回/日
    起動時間16:00
    処理完了期限16:00
    未着チェック(なし/WARN/ERROR)WARN
    全件/差分差分
    0 件時連携あり
    Formatファイル種別CSV
    レイアウトRFC 8259
    文字コードUTF-8
    改行コードLF
    圧縮-
    暗号化-
    ヘッダ行あり
    項目順固定項目順は入れ替え不可
    機密情報-

    項目定義

    NamePhysical NameTypeLengthPrecisionEnumFormatSensitiveExampleMemo
    会社コードcompany_cdstring5----00001
    設備コードdevice_cdstring8----00000052
    有効開始日activation_datestring10--YYYY-MM-DD-2022-10-16[1]
    サンプル
    csv
    company_cd,device_cd,activation_date
    +12121,00000052,2022-03-01
    +12121,00000053,2022-03-30

    連携先定義

    CategoryItemValueMemo
    Protocol連携方式(ファイル/API/ストリーム)ファイル
    連携タイミング(随時/定時)定時
    頻度1 回/日
    起動時間16:00
    処理完了期限16:00
    未着チェック(なし/WARN/ERROR)WARN
    全件/差分差分
    0 件時連携あり
    Formatファイル種別CSV
    レイアウトRFC 8259
    文字コードUTF-8
    改行コードLF
    圧縮-
    暗号化-
    ヘッダ行あり
    項目順固定項目順は入れ替え不可
    機密情報-

    処理概要

    • ファイル定義に則ったバリデーションを実施
    • 次の項目変換定義に従い加工し、出力先テーブルに Merge する
    • 受信完了後、 Completed: YYYY-MM-DDTHH:MI:SS.SSS のタグを追加する

    処理シーケンス

    plantuml
    @startuml
    +!theme toy
    +
    +participant システム
    +participant S3
    +database DB
    +
    +システム -> DB: 処理日付取得\\n[日付管理]
    +
    +システム -> S3: 対象ファイルの存在チェック
    +
    +alt ファイルが存在しなかった場合
    +   システム -> システム: 処理終了して、次の処理を待機
    +end
    +
    +システム -> DB: シーケンスの取得\\n[シーケンスオブジェクト]
    +
    +システム -> DB: 1.実行開始レコード追加\\n[IF受信管理]
    +
    +システム -> S3: 対象ファイルを取得
    +
    +システム -> DB: 対象マスタのTruncate
    +
    +システム -> DB: ファイル連携処理
    +
    +システム -> システム: 連携件数確認
    +
    +システム -> S3: 処理済対象ファイルを格納
    +
    +システム -> DB: 2.実行終了状態の更新\\n[IF受信管理]
    +@enduml

    DB 項目

    参照

    なし

    登録

    リストワークに以下のカラムでレコードを登録する

    • xxx ワーク.会社コード
    • xxx ワーク.処理日付
    • xxx ワーク.yyy 区分

    更新

    なし

    ビジネスロジック

    特記事項なし

    エラー処理

    PatternDescriptionrecovery
    フォーマットエラー連携元から提供されているデータ形式が想定外連携元またはIFの処理内容の修正と再実行

    1. 現在日以降である必要があるが、受信ではテスト観点で過去日も許容する ↩︎

    `,35)]))}const b=s(n,[["render",e]]);export{c as __pageData,b as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM01_index.md.CRCgMTjO.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM01_index.md.CRCgMTjO.js" new file mode 100644 index 00000000..66d8b00b --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM01_index.md.CRCgMTjO.js" @@ -0,0 +1 @@ +import{_ as e,c as d,j as t,a as r,a3 as l,o as i}from"./chunks/framework.BDUoXecB.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/index.md"}'),o={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/index.md"};function h(n,a,s,u,c,m){return i(),d("div",null,a[0]||(a[0]=[t("h2",{id:"uim01-ログイン",tabindex:"-1"},[r("[UIM01] ログイン "),t("a",{class:"header-anchor",href:"#uim01-ログイン","aria-label":'Permalink to "[UIM01] ログイン"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=4-5&embed-host=share",allowfullscreen:""},null,-1),l('

    概要

    機能目的:

    • ログインや会員登録導線を提供する

    機能概要:

    • ログイン処理
    • 会員登録への導線

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示
    2ログインするボタン押下
    3会員登録ボタン押下

    イベント詳細

    1. 初期表示

    モーダルを起動。初期パラメータは無し。

    2. ログインする

    利用API:

    IDURLParameter
    API001POST /login入力フォームの値を取得

    画面表示制御:

    • HTTPステータスが400系
      • 「IDまたはパスワードが異なります」を表示
    • HTTPステータスが500系
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200

    3. 会員登録

    ...

    ',17)]))}const _=e(o,[["render",h]]);export{b as __pageData,_ as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM01_index.md.CRCgMTjO.lean.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM01_index.md.CRCgMTjO.lean.js" new file mode 100644 index 00000000..66d8b00b --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM01_index.md.CRCgMTjO.lean.js" @@ -0,0 +1 @@ +import{_ as e,c as d,j as t,a as r,a3 as l,o as i}from"./chunks/framework.BDUoXecB.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/index.md"}'),o={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM01/index.md"};function h(n,a,s,u,c,m){return i(),d("div",null,a[0]||(a[0]=[t("h2",{id:"uim01-ログイン",tabindex:"-1"},[r("[UIM01] ログイン "),t("a",{class:"header-anchor",href:"#uim01-ログイン","aria-label":'Permalink to "[UIM01] ログイン"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=4-5&embed-host=share",allowfullscreen:""},null,-1),l('

    概要

    機能目的:

    • ログインや会員登録導線を提供する

    機能概要:

    • ログイン処理
    • 会員登録への導線

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示
    2ログインするボタン押下
    3会員登録ボタン押下

    イベント詳細

    1. 初期表示

    モーダルを起動。初期パラメータは無し。

    2. ログインする

    利用API:

    IDURLParameter
    API001POST /login入力フォームの値を取得

    画面表示制御:

    • HTTPステータスが400系
      • 「IDまたはパスワードが異なります」を表示
    • HTTPステータスが500系
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200

    3. 会員登録

    ...

    ',17)]))}const _=e(o,[["render",h]]);export{b as __pageData,_ as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM02_index.md.BvNTz8Vk.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM02_index.md.BvNTz8Vk.js" new file mode 100644 index 00000000..31d81c0d --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM02_index.md.BvNTz8Vk.js" @@ -0,0 +1 @@ +import{_ as a,c as r,j as t,a as l,a3 as d,o as i}from"./chunks/framework.BDUoXecB.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM02/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM02/index.md"}'),o={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM02/index.md"};function n(h,e,s,u,c,m){return i(),r("div",null,e[0]||(e[0]=[t("h2",{id:"uim02-トレーナー検索",tabindex:"-1"},[l("[UIM02] トレーナー検索 "),t("a",{class:"header-anchor",href:"#uim02-トレーナー検索","aria-label":'Permalink to "[UIM02] トレーナー検索"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=233-907&embed-host=share",allowfullscreen:""},null,-1),d('

    概要

    機能目的:

    • パーソナルトレーナーを検索する

    機能概要:

    • 行きつけのジムの絞り込み
    • 店舗名の検索
    • トレーニング時間/予算の絞り込み
    • トレーニングコースの絞り込み

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示
    2検索ボタン押下

    イベント詳細

    1. 初期表示

    モーダルを起動。初期パラメータは無し。

    2. 検索

    利用API:

    IDURLParameter
    API007GET /trainersモーダルに指定された値をクエリパラメータに設定する

    画面表示制御:

    • 入力チェック
      • favorite_gym_name, store_nameが未設定の場合は、フロントエンド側でチェックし「行きつけのジム名・店舗名は必須項目です」と表示する
    • 応答が0件の場合
      • 「条件に一致するコーチは存在しませんでした」と表示する
    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
    ',15)]))}const b=a(o,[["render",n]]);export{p as __pageData,b as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM02_index.md.BvNTz8Vk.lean.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM02_index.md.BvNTz8Vk.lean.js" new file mode 100644 index 00000000..31d81c0d --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM02_index.md.BvNTz8Vk.lean.js" @@ -0,0 +1 @@ +import{_ as a,c as r,j as t,a as l,a3 as d,o as i}from"./chunks/framework.BDUoXecB.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM02/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM02/index.md"}'),o={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM02/index.md"};function n(h,e,s,u,c,m){return i(),r("div",null,e[0]||(e[0]=[t("h2",{id:"uim02-トレーナー検索",tabindex:"-1"},[l("[UIM02] トレーナー検索 "),t("a",{class:"header-anchor",href:"#uim02-トレーナー検索","aria-label":'Permalink to "[UIM02] トレーナー検索"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=233-907&embed-host=share",allowfullscreen:""},null,-1),d('

    概要

    機能目的:

    • パーソナルトレーナーを検索する

    機能概要:

    • 行きつけのジムの絞り込み
    • 店舗名の検索
    • トレーニング時間/予算の絞り込み
    • トレーニングコースの絞り込み

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示
    2検索ボタン押下

    イベント詳細

    1. 初期表示

    モーダルを起動。初期パラメータは無し。

    2. 検索

    利用API:

    IDURLParameter
    API007GET /trainersモーダルに指定された値をクエリパラメータに設定する

    画面表示制御:

    • 入力チェック
      • favorite_gym_name, store_nameが未設定の場合は、フロントエンド側でチェックし「行きつけのジム名・店舗名は必須項目です」と表示する
    • 応答が0件の場合
      • 「条件に一致するコーチは存在しませんでした」と表示する
    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
    ',15)]))}const b=a(o,[["render",n]]);export{p as __pageData,b as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM03_index.md.QlIlXJ1q.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM03_index.md.QlIlXJ1q.js" new file mode 100644 index 00000000..49ed48f8 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM03_index.md.QlIlXJ1q.js" @@ -0,0 +1 @@ +import{_ as l,c as d,j as t,a as r,a3 as a,o as i}from"./chunks/framework.BDUoXecB.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/index.md"}'),n={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/index.md"};function o(u,e,h,s,c,_){return i(),d("div",null,e[0]||(e[0]=[t("h2",{id:"uim03-カレンダー予約",tabindex:"-1"},[r("[UIM03] カレンダー予約 "),t("a",{class:"header-anchor",href:"#uim03-カレンダー予約","aria-label":'Permalink to "[UIM03] カレンダー予約"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=115-295&embed-host=share",allowfullscreen:""},null,-1),a('

    概要

    機能目的:

    • トレーニーやパーソナルトレーナの空き時間を表示し、予約を行えるようにする

    機能概要:

    • 本日以降の週間カレンダーを表示する
    • すでに予約済みの時間がわかるようにする

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示指定されたトレーナーと、ログイン中のトレーニーのスケジュールを表示
    2日時設定カレンダーを選択ドラッグ&ドロップで範囲指定
    3日時指定設定された日時で予約を指定する

    イベント詳細

    1. 初期表示

    起動パラメータ:

    ',10),t("table",{tabindex:"0"},[t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Value"),t("th",null,"Memo")])]),t("tbody",null,[t("tr",null,[t("td",null,"trainer_id"),t("td",{"trainer_id:<trainer_id":""}),t("td")]),t("tr",null,[t("td",null,"trainee_id"),t("td",{"trainee_id:<trainee_id":""}),t("td")])])],-1),t("p",null,"利用API:",-1),t("table",{tabindex:"0"},[t("thead",null,[t("tr",null,[t("th",null,"ID"),t("th",null,"URL"),t("th",null,"Parameter")])]),t("tbody",null,[t("tr",null,[t("td",null,"API011"),t("td",null,"GET /trainers/{trainer_id}/schedule"),t("td",null,"初期パラメータを設定")]),t("tr",null,[t("td",null,"API013"),t("td",{trainee_id:""},"GET /bookings/"),t("td",null,"初期パラメータを設定")])])],-1),a('

    画面表示制御:

    • API011
      • 0件の場合は何もしない
      • 1件以上存在した場合は、カレンダーには「ブロック」と表示する
    • API026
      • 0件の場合は何もしない
      • 1件以上存在した場合は、カレンダーに「予約あり」と表示する

    2. 日時設定

    選択された日付がカレンダーに追加される。

    3. 日時指定

    UIM04 を起動する。

    ',6)]))}const p=l(n,[["render",o]]);export{b as __pageData,p as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM03_index.md.QlIlXJ1q.lean.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM03_index.md.QlIlXJ1q.lean.js" new file mode 100644 index 00000000..49ed48f8 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM03_index.md.QlIlXJ1q.lean.js" @@ -0,0 +1 @@ +import{_ as l,c as d,j as t,a as r,a3 as a,o as i}from"./chunks/framework.BDUoXecB.js";const b=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/index.md"}'),n={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM03/index.md"};function o(u,e,h,s,c,_){return i(),d("div",null,e[0]||(e[0]=[t("h2",{id:"uim03-カレンダー予約",tabindex:"-1"},[r("[UIM03] カレンダー予約 "),t("a",{class:"header-anchor",href:"#uim03-カレンダー予約","aria-label":'Permalink to "[UIM03] カレンダー予約"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=115-295&embed-host=share",allowfullscreen:""},null,-1),a('

    概要

    機能目的:

    • トレーニーやパーソナルトレーナの空き時間を表示し、予約を行えるようにする

    機能概要:

    • 本日以降の週間カレンダーを表示する
    • すでに予約済みの時間がわかるようにする

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示指定されたトレーナーと、ログイン中のトレーニーのスケジュールを表示
    2日時設定カレンダーを選択ドラッグ&ドロップで範囲指定
    3日時指定設定された日時で予約を指定する

    イベント詳細

    1. 初期表示

    起動パラメータ:

    ',10),t("table",{tabindex:"0"},[t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Value"),t("th",null,"Memo")])]),t("tbody",null,[t("tr",null,[t("td",null,"trainer_id"),t("td",{"trainer_id:<trainer_id":""}),t("td")]),t("tr",null,[t("td",null,"trainee_id"),t("td",{"trainee_id:<trainee_id":""}),t("td")])])],-1),t("p",null,"利用API:",-1),t("table",{tabindex:"0"},[t("thead",null,[t("tr",null,[t("th",null,"ID"),t("th",null,"URL"),t("th",null,"Parameter")])]),t("tbody",null,[t("tr",null,[t("td",null,"API011"),t("td",null,"GET /trainers/{trainer_id}/schedule"),t("td",null,"初期パラメータを設定")]),t("tr",null,[t("td",null,"API013"),t("td",{trainee_id:""},"GET /bookings/"),t("td",null,"初期パラメータを設定")])])],-1),a('

    画面表示制御:

    • API011
      • 0件の場合は何もしない
      • 1件以上存在した場合は、カレンダーには「ブロック」と表示する
    • API026
      • 0件の場合は何もしない
      • 1件以上存在した場合は、カレンダーに「予約あり」と表示する

    2. 日時設定

    選択された日付がカレンダーに追加される。

    3. 日時指定

    UIM04 を起動する。

    ',6)]))}const p=l(n,[["render",o]]);export{b as __pageData,p as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM04_index.md.roT3YPrn.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM04_index.md.roT3YPrn.js" new file mode 100644 index 00000000..fa2e77d5 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM04_index.md.roT3YPrn.js" @@ -0,0 +1 @@ +import{_ as d,c as r,j as t,a as l,a3 as a,o as n}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/index.md"}'),i={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/index.md"};function o(h,e,u,s,c,m){return n(),r("div",null,e[0]||(e[0]=[t("h2",{id:"uim04-決済",tabindex:"-1"},[l("[UIM04] 決済 "),t("a",{class:"header-anchor",href:"#uim04-決済","aria-label":'Permalink to "[UIM04] 決済"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=249-925&embed-host=share",allowfullscreen:""},null,-1),a('

    概要

    機能目的:

    • トレーニング予約内容を表示し、決済によって確定する

    機能概要:

    • トレーニングのコース/日時/料金を表示
    • クレジット決済に必要な項目の入力
    • 決済の確定

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示
    2日時指定に戻るボタン押下UIM003に遷移
    2決済するボタン押下

    イベント詳細

    1. 初期表示

    起動パラメータ:

    ',10),t("table",{tabindex:"0"},[t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Value"),t("th",null,"Memo")])]),t("tbody",null,[t("tr",null,[t("td",null,"trainer_id"),t("td",{"trainer_id:<trainer_id":""}),t("td")]),t("tr",null,[t("td",null,"menu_id"),t("td",{"menu_id:<menu_id":""}),t("td")])])],-1),a('

    利用API:

    IDURLParameter
    APIxxxトレーニングメニュー取得初期パラメータを設定

    2. 日時指定に戻る

    UIM03に遷移

    3. 決済

    ...

    ',6)]))}const p=d(i,[["render",o]]);export{_ as __pageData,p as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM04_index.md.roT3YPrn.lean.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM04_index.md.roT3YPrn.lean.js" new file mode 100644 index 00000000..fa2e77d5 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIM04_index.md.roT3YPrn.lean.js" @@ -0,0 +1 @@ +import{_ as d,c as r,j as t,a as l,a3 as a,o as n}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/index.md"}'),i={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIM04/index.md"};function o(h,e,u,s,c,m){return n(),r("div",null,e[0]||(e[0]=[t("h2",{id:"uim04-決済",tabindex:"-1"},[l("[UIM04] 決済 "),t("a",{class:"header-anchor",href:"#uim04-決済","aria-label":'Permalink to "[UIM04] 決済"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=249-925&embed-host=share",allowfullscreen:""},null,-1),a('

    概要

    機能目的:

    • トレーニング予約内容を表示し、決済によって確定する

    機能概要:

    • トレーニングのコース/日時/料金を表示
    • クレジット決済に必要な項目の入力
    • 決済の確定

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示
    2日時指定に戻るボタン押下UIM003に遷移
    2決済するボタン押下

    イベント詳細

    1. 初期表示

    起動パラメータ:

    ',10),t("table",{tabindex:"0"},[t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Value"),t("th",null,"Memo")])]),t("tbody",null,[t("tr",null,[t("td",null,"trainer_id"),t("td",{"trainer_id:<trainer_id":""}),t("td")]),t("tr",null,[t("td",null,"menu_id"),t("td",{"menu_id:<menu_id":""}),t("td")])])],-1),a('

    利用API:

    IDURLParameter
    APIxxxトレーニングメニュー取得初期パラメータを設定

    2. 日時指定に戻る

    UIM03に遷移

    3. 決済

    ...

    ',6)]))}const p=d(i,[["render",o]]);export{_ as __pageData,p as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS01_index.md.ZxY0b2PV.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS01_index.md.ZxY0b2PV.js" new file mode 100644 index 00000000..910125d5 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS01_index.md.ZxY0b2PV.js" @@ -0,0 +1 @@ +import{_ as a,c as r,j as t,a as d,a3 as l,o as i}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/index.md"}'),n={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/index.md"};function u(o,e,h,s,c,p){return i(),r("div",null,e[0]||(e[0]=[t("h2",{id:"uis01-トップページ",tabindex:"-1"},[d("[UIS01] トップページ "),t("a",{class:"header-anchor",href:"#uis01-トップページ","aria-label":'Permalink to "[UIS01] トップページ"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=1-2&embed-host=share",allowfullscreen:""},null,-1),l('

    概要

    機能目的:

    • トップページ

    機能概要:

    • ログインへの導線
    • パーソナルトレーナーの検索への導線

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示ログイン済みである場合、「会員登録/ログイン」が「マイページ」に変わる
    2トレーナーを探すボタン押下パーソナルトレーナー検索モーダル起動
    3会員登録/ログインボタン押下ログインモーダル起動

    イベント詳細

    1. 初期表示

    起動パラメータ:

    ',10),t("table",{tabindex:"0"},[t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Value"),t("th",null,"Memo")])]),t("tbody",null,[t("tr",null,[t("td",null,"userState"),t("td",{"user_id:<user_id":""}),t("td",null,"ログイン状態")])])],-1),t("p",null,"初期表示イベント:",-1),t("ul",null,[t("li",null,"ログイン済み判定")],-1),t("p",null,"利用API:",-1),t("table",{tabindex:"0"},[t("thead",null,[t("tr",null,[t("th",null,"ID"),t("th",null,"URL"),t("th",null,"Parameter")])]),t("tbody",null,[t("tr",null,[t("td",null,"API-005"),t("td",{trainee_id:""},"GET /profile/"),t("td",null,"trainee_id=userState.user_id")])])],-1),l('

    画面表示制御:

    • HTTPステータスが500系
      • 何もしない(無視で良い)、初期表示のまま
    • HTTPステータスが400系
      • 未ログインとして、初期表示のまま
    • HTTPステータスが200
      • すでにログイン中と判断し、(画面表示制御1)へ

    画面表示制御1:

    • 「会員登録/ログイン」表示を、サムネイル画像(thumbnail_url)に書き換える

    2. トレーナーを探す

    UIM002 呼び出し

    3. 会員登録/ログイン

    UIM001 呼び出し

    ',8)]))}const b=a(n,[["render",u]]);export{_ as __pageData,b as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS01_index.md.ZxY0b2PV.lean.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS01_index.md.ZxY0b2PV.lean.js" new file mode 100644 index 00000000..910125d5 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS01_index.md.ZxY0b2PV.lean.js" @@ -0,0 +1 @@ +import{_ as a,c as r,j as t,a as d,a3 as l,o as i}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/index.md"}'),n={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS01/index.md"};function u(o,e,h,s,c,p){return i(),r("div",null,e[0]||(e[0]=[t("h2",{id:"uis01-トップページ",tabindex:"-1"},[d("[UIS01] トップページ "),t("a",{class:"header-anchor",href:"#uis01-トップページ","aria-label":'Permalink to "[UIS01] トップページ"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=1-2&embed-host=share",allowfullscreen:""},null,-1),l('

    概要

    機能目的:

    • トップページ

    機能概要:

    • ログインへの導線
    • パーソナルトレーナーの検索への導線

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示ログイン済みである場合、「会員登録/ログイン」が「マイページ」に変わる
    2トレーナーを探すボタン押下パーソナルトレーナー検索モーダル起動
    3会員登録/ログインボタン押下ログインモーダル起動

    イベント詳細

    1. 初期表示

    起動パラメータ:

    ',10),t("table",{tabindex:"0"},[t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Value"),t("th",null,"Memo")])]),t("tbody",null,[t("tr",null,[t("td",null,"userState"),t("td",{"user_id:<user_id":""}),t("td",null,"ログイン状態")])])],-1),t("p",null,"初期表示イベント:",-1),t("ul",null,[t("li",null,"ログイン済み判定")],-1),t("p",null,"利用API:",-1),t("table",{tabindex:"0"},[t("thead",null,[t("tr",null,[t("th",null,"ID"),t("th",null,"URL"),t("th",null,"Parameter")])]),t("tbody",null,[t("tr",null,[t("td",null,"API-005"),t("td",{trainee_id:""},"GET /profile/"),t("td",null,"trainee_id=userState.user_id")])])],-1),l('

    画面表示制御:

    • HTTPステータスが500系
      • 何もしない(無視で良い)、初期表示のまま
    • HTTPステータスが400系
      • 未ログインとして、初期表示のまま
    • HTTPステータスが200
      • すでにログイン中と判断し、(画面表示制御1)へ

    画面表示制御1:

    • 「会員登録/ログイン」表示を、サムネイル画像(thumbnail_url)に書き換える

    2. トレーナーを探す

    UIM002 呼び出し

    3. 会員登録/ログイン

    UIM001 呼び出し

    ',8)]))}const b=a(n,[["render",u]]);export{_ as __pageData,b as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS02_index.md.CtjQqWe_.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS02_index.md.CtjQqWe_.js" new file mode 100644 index 00000000..aa01ac42 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS02_index.md.CtjQqWe_.js" @@ -0,0 +1 @@ +import{_ as d,c as r,j as l,a as t,a3 as a,o as u}from"./chunks/framework.BDUoXecB.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/index.md"}'),n={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/index.md"};function i(o,e,h,s,c,_){return u(),r("div",null,e[0]||(e[0]=[l("h2",{id:"uis02-マイページ",tabindex:"-1"},[t("[UIS02] マイページ "),l("a",{class:"header-anchor",href:"#uis02-マイページ","aria-label":'Permalink to "[UIS02] マイページ"'},"​")],-1),l("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=4-2&embed-host=share",allowfullscreen:""},null,-1),a('

    概要

    機能目的:

    • トレーニーのマイページを表示し、受講予定・受講済みのトレーニング一覧を表示する

    機能概要:

    • 受講状況の表示
    • パーソナルトレーナーの検索への導線

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示初期検索条件に従いAPIを実行し、履歴表示する
    2トレーナーを探すボタン押下パーソナルトレーナー検索モーダル起動
    3受講完了確認ボタン押下予約済みトレーニングを受講完了に切り替えるためのモーダル起動
    4受講完了ボタン押下予約済みトレーニングを完了済みのトレーニングに更新

    イベント詳細

    1. 初期表示

    起動パラメータ:

    ',10),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"Name"),l("th",null,"Value"),l("th",null,"Memo")])]),l("tbody",null,[l("tr",null,[l("td",null,"userState"),l("td",{"user_id:<user_id":""}),l("td",null,"ログイン状態")])])],-1),l("p",null,"初期表示イベント:",-1),l("ul",null,[l("li",null,"マイページ表示")],-1),l("p",null,"利用API:",-1),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"ID"),l("th",null,"URL"),l("th",null,"Parameter")])]),l("tbody",null,[l("tr",null,[l("td",null,"API-005"),l("td",{trainee_id:""},"GET /profile/"),l("td",null,"trainee_id=userState.user_id")])])],-1),l("p",null,"画面表示制御:",-1),l("ul",null,[l("li",null,[t("HTTPステータスが500系 "),l("ul",null,[l("li",null,"メッセージID(MSG_BIZ_111)表示")])]),l("li",null,[t("HTTPステータスが400系 "),l("ul",null,[l("li",null,"トップページにリダイレクト")])])],-1),l("p",null,"利用API:",-1),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"ID"),l("th",null,"URL"),l("th",null,"Parameter")])]),l("tbody",null,[l("tr",null,[l("td",null,"API013"),l("td",{trainee_id:""},"GET /bookings/"),l("td",null,"trainee_id=userState.user_id")])])],-1),a('

    画面表示制御:

    • 起動条件
      • API016が有効な場合
    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示

    2. トレーナーを探す

    UIM002 を起動。

    3. 受講完了確認

    ${トレーニングメニュー} は完了しましたか?」ダイアログを表示する。

    キャンセルの場合は閉じる。

    4. 受講完了

    ${トレーニングメニュー} は完了しましたか?」ダイアログがOKの場合。

    利用API:

    IDURLParameter
    API016PUT /booking/{booking_id}/status選択されたトレーニング予約ID

    画面表示制御:

    • クリック可否判定
      • 予約済み+現在時間<=受講時間になっている場合に、クリック可能とする
    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
      • 次のAPIを呼び出し

    利用API:

    ',14),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"ID"),l("th",null,"URL"),l("th",null,"Parameter")])]),l("tbody",null,[l("tr",null,[l("td",null,"API-012"),l("td",{trainee_id:""},"GET /bookings/"),l("td",null,"trainee_id=userState.user_id")])])],-1),l("p",null,"画面表示制御:",-1),l("ul",null,[l("li",null,[t("起動条件 "),l("ul",null,[l("li",null,"API016が有効な場合")])]),l("li",null,[t("HTTPステータスが200以外 "),l("ul",null,[l("li",null,"メッセージID(MSG_BIZ_111)表示")])])],-1)]))}const P=d(n,[["render",i]]);export{p as __pageData,P as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS02_index.md.CtjQqWe_.lean.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS02_index.md.CtjQqWe_.lean.js" new file mode 100644 index 00000000..aa01ac42 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS02_index.md.CtjQqWe_.lean.js" @@ -0,0 +1 @@ +import{_ as d,c as r,j as l,a as t,a3 as a,o as u}from"./chunks/framework.BDUoXecB.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/index.md"}'),n={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS02/index.md"};function i(o,e,h,s,c,_){return u(),r("div",null,e[0]||(e[0]=[l("h2",{id:"uis02-マイページ",tabindex:"-1"},[t("[UIS02] マイページ "),l("a",{class:"header-anchor",href:"#uis02-マイページ","aria-label":'Permalink to "[UIS02] マイページ"'},"​")],-1),l("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=4-2&embed-host=share",allowfullscreen:""},null,-1),a('

    概要

    機能目的:

    • トレーニーのマイページを表示し、受講予定・受講済みのトレーニング一覧を表示する

    機能概要:

    • 受講状況の表示
    • パーソナルトレーナーの検索への導線

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示初期検索条件に従いAPIを実行し、履歴表示する
    2トレーナーを探すボタン押下パーソナルトレーナー検索モーダル起動
    3受講完了確認ボタン押下予約済みトレーニングを受講完了に切り替えるためのモーダル起動
    4受講完了ボタン押下予約済みトレーニングを完了済みのトレーニングに更新

    イベント詳細

    1. 初期表示

    起動パラメータ:

    ',10),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"Name"),l("th",null,"Value"),l("th",null,"Memo")])]),l("tbody",null,[l("tr",null,[l("td",null,"userState"),l("td",{"user_id:<user_id":""}),l("td",null,"ログイン状態")])])],-1),l("p",null,"初期表示イベント:",-1),l("ul",null,[l("li",null,"マイページ表示")],-1),l("p",null,"利用API:",-1),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"ID"),l("th",null,"URL"),l("th",null,"Parameter")])]),l("tbody",null,[l("tr",null,[l("td",null,"API-005"),l("td",{trainee_id:""},"GET /profile/"),l("td",null,"trainee_id=userState.user_id")])])],-1),l("p",null,"画面表示制御:",-1),l("ul",null,[l("li",null,[t("HTTPステータスが500系 "),l("ul",null,[l("li",null,"メッセージID(MSG_BIZ_111)表示")])]),l("li",null,[t("HTTPステータスが400系 "),l("ul",null,[l("li",null,"トップページにリダイレクト")])])],-1),l("p",null,"利用API:",-1),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"ID"),l("th",null,"URL"),l("th",null,"Parameter")])]),l("tbody",null,[l("tr",null,[l("td",null,"API013"),l("td",{trainee_id:""},"GET /bookings/"),l("td",null,"trainee_id=userState.user_id")])])],-1),a('

    画面表示制御:

    • 起動条件
      • API016が有効な場合
    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示

    2. トレーナーを探す

    UIM002 を起動。

    3. 受講完了確認

    ${トレーニングメニュー} は完了しましたか?」ダイアログを表示する。

    キャンセルの場合は閉じる。

    4. 受講完了

    ${トレーニングメニュー} は完了しましたか?」ダイアログがOKの場合。

    利用API:

    IDURLParameter
    API016PUT /booking/{booking_id}/status選択されたトレーニング予約ID

    画面表示制御:

    • クリック可否判定
      • 予約済み+現在時間<=受講時間になっている場合に、クリック可能とする
    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
      • 次のAPIを呼び出し

    利用API:

    ',14),l("table",{tabindex:"0"},[l("thead",null,[l("tr",null,[l("th",null,"ID"),l("th",null,"URL"),l("th",null,"Parameter")])]),l("tbody",null,[l("tr",null,[l("td",null,"API-012"),l("td",{trainee_id:""},"GET /bookings/"),l("td",null,"trainee_id=userState.user_id")])])],-1),l("p",null,"画面表示制御:",-1),l("ul",null,[l("li",null,[t("起動条件 "),l("ul",null,[l("li",null,"API016が有効な場合")])]),l("li",null,[t("HTTPステータスが200以外 "),l("ul",null,[l("li",null,"メッセージID(MSG_BIZ_111)表示")])])],-1)]))}const P=d(n,[["render",i]]);export{p as __pageData,P as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS03_index.md.f8FmFsMR.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS03_index.md.f8FmFsMR.js" new file mode 100644 index 00000000..1dbec704 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS03_index.md.f8FmFsMR.js" @@ -0,0 +1 @@ +import{_ as e,c as r,j as t,a as d,a3 as l,o as i}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/index.md"}'),o={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/index.md"};function h(n,a,s,u,c,m){return i(),r("div",null,a[0]||(a[0]=[t("h2",{id:"uis03-トレーナー一覧",tabindex:"-1"},[d("[UIS03] トレーナー一覧 "),t("a",{class:"header-anchor",href:"#uis03-トレーナー一覧","aria-label":'Permalink to "[UIS03] トレーナー一覧"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=4-11&embed-host=share",allowfullscreen:""},null,-1),l('

    概要

    機能目的:

    • 検索条件に一致する順にパーソナルトレーナーを表示する

    機能概要:

    • パーソナルトレーナーの一覧表示
    • パーソナルトレーナーの再検索を指定可能とする
    • 興味が湧いたパーソナルトレーナーについて、詳細画面への導線

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示検索条件に従いAPIを実行し、一覧表示する
    2トレーナー詳細ボタン押下UIS04に遷移
    3トレーナー検索ボタン押下入力された条件で検索

    イベント詳細

    1. 初期表示

    利用API:

    IDURLParameter
    API007GET /trainersfavorite_gym_nameなど、各クエリパラメータ指定されたパラメータを設定

    画面表示制御:

    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • 応答結果が0件の場合
      • 「条件に一致するパーソナルトレーナーが見つかりませんでした。」を表示する
    • 応答結果が1件以上の場合
      • リスト表示する(ページングは不要。応答順に最大100件表示する)

    2. トレーナー詳細

    UIS04に遷移

    3. トレーナー検索

    初期表示と同等の処理を実行する。

    ',17)]))}const b=e(o,[["render",h]]);export{_ as __pageData,b as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS03_index.md.f8FmFsMR.lean.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS03_index.md.f8FmFsMR.lean.js" new file mode 100644 index 00000000..1dbec704 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS03_index.md.f8FmFsMR.lean.js" @@ -0,0 +1 @@ +import{_ as e,c as r,j as t,a as d,a3 as l,o as i}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/index.md"}'),o={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS03/index.md"};function h(n,a,s,u,c,m){return i(),r("div",null,a[0]||(a[0]=[t("h2",{id:"uis03-トレーナー一覧",tabindex:"-1"},[d("[UIS03] トレーナー一覧 "),t("a",{class:"header-anchor",href:"#uis03-トレーナー一覧","aria-label":'Permalink to "[UIS03] トレーナー一覧"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=4-11&embed-host=share",allowfullscreen:""},null,-1),l('

    概要

    機能目的:

    • 検索条件に一致する順にパーソナルトレーナーを表示する

    機能概要:

    • パーソナルトレーナーの一覧表示
    • パーソナルトレーナーの再検索を指定可能とする
    • 興味が湧いたパーソナルトレーナーについて、詳細画面への導線

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示検索条件に従いAPIを実行し、一覧表示する
    2トレーナー詳細ボタン押下UIS04に遷移
    3トレーナー検索ボタン押下入力された条件で検索

    イベント詳細

    1. 初期表示

    利用API:

    IDURLParameter
    API007GET /trainersfavorite_gym_nameなど、各クエリパラメータ指定されたパラメータを設定

    画面表示制御:

    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • 応答結果が0件の場合
      • 「条件に一致するパーソナルトレーナーが見つかりませんでした。」を表示する
    • 応答結果が1件以上の場合
      • リスト表示する(ページングは不要。応答順に最大100件表示する)

    2. トレーナー詳細

    UIS04に遷移

    3. トレーナー検索

    初期表示と同等の処理を実行する。

    ',17)]))}const b=e(o,[["render",h]]);export{_ as __pageData,b as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS04_index.md.BqRZPnn-.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS04_index.md.BqRZPnn-.js" new file mode 100644 index 00000000..3b943da3 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS04_index.md.BqRZPnn-.js" @@ -0,0 +1 @@ +import{_ as l,c as r,j as t,a as d,a3 as a,o as i}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS04/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS04/index.md"}'),h={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS04/index.md"};function n(o,e,u,s,c,b){return i(),r("div",null,e[0]||(e[0]=[t("h2",{id:"uis04-トレーナー詳細",tabindex:"-1"},[d("[UIS04] トレーナー詳細 "),t("a",{class:"header-anchor",href:"#uis04-トレーナー詳細","aria-label":'Permalink to "[UIS04] トレーナー詳細"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=115-284&embed-host=share",allowfullscreen:""},null,-1),a('

    概要

    機能目的:

    • パーソナルトレーナーが提供するトレーニング一覧を表示する

    機能概要:

    • パーソナルトレーナー情報を表示
    • トレーニング一覧を表示する

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示初期検索条件に従いAPIを実行し、履歴表示する
    2トレーニングコース決定ボタン押下予約のためカレンダーモーダルを起動

    イベント詳細

    1. 初期表示

    起動パラメータ:

    ',10),t("table",{tabindex:"0"},[t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Value"),t("th",null,"Memo")])]),t("tbody",null,[t("tr",null,[t("td",null,"trainer_id"),t("td",{"trainer_id:<trainer_id":""}),t("td")])])],-1),a('

    利用API:

    IDURLParameter
    API009GET /trainers/{trainer_id}/profile起動パラメータを設定

    画面表示制御:

    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
      • プロフィールを更新
      • API008を呼び出し

    利用API:

    IDURLParameter
    API008GET /trainers/{trainer_id}/menus起動パラメータを設定

    画面表示制御:

    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
      • メニューを一覧表示
      • 0件の場合は「現在、提供できるメニューが存在しません。」と表示
      • API010を呼び出し

    利用API:

    IDURLParameter
    API010/trainers/{trainer_id}/reviews起動パラメータを設定

    画面表示制御:

    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
      • 0件の場合は、「レビューがありません」を表示する
      • 1件以上存在する場合は、最大5件まで表示する

    2. トレーニングコース決定

    UIM03 を起動する。

    ',14)]))}const m=l(h,[["render",n]]);export{_ as __pageData,m as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS04_index.md.BqRZPnn-.lean.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS04_index.md.BqRZPnn-.lean.js" new file mode 100644 index 00000000..3b943da3 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_UIS04_index.md.BqRZPnn-.lean.js" @@ -0,0 +1 @@ +import{_ as l,c as r,j as t,a as d,a3 as a,o as i}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS04/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS04/index.md"}'),h={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/UIS04/index.md"};function n(o,e,u,s,c,b){return i(),r("div",null,e[0]||(e[0]=[t("h2",{id:"uis04-トレーナー詳細",tabindex:"-1"},[d("[UIS04] トレーナー詳細 "),t("a",{class:"header-anchor",href:"#uis04-トレーナー詳細","aria-label":'Permalink to "[UIS04] トレーナー詳細"'},"​")],-1),t("iframe",{style:{border:"1px solid rgba(0, 0, 0, 0.1)"},width:"800",height:"450",src:"https://embed.figma.com/design/kLgdi4xdGRpQudMEoZYwvq/%E3%80%90FMP%E3%80%91Future-Muscle-Partner_%E7%94%BB%E9%9D%A2%E3%83%87%E3%82%B6%E3%82%A4%E3%83%B3?node-id=115-284&embed-host=share",allowfullscreen:""},null,-1),a('

    概要

    機能目的:

    • パーソナルトレーナーが提供するトレーニング一覧を表示する

    機能概要:

    • パーソナルトレーナー情報を表示
    • トレーニング一覧を表示する

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示初期検索条件に従いAPIを実行し、履歴表示する
    2トレーニングコース決定ボタン押下予約のためカレンダーモーダルを起動

    イベント詳細

    1. 初期表示

    起動パラメータ:

    ',10),t("table",{tabindex:"0"},[t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Value"),t("th",null,"Memo")])]),t("tbody",null,[t("tr",null,[t("td",null,"trainer_id"),t("td",{"trainer_id:<trainer_id":""}),t("td")])])],-1),a('

    利用API:

    IDURLParameter
    API009GET /trainers/{trainer_id}/profile起動パラメータを設定

    画面表示制御:

    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
      • プロフィールを更新
      • API008を呼び出し

    利用API:

    IDURLParameter
    API008GET /trainers/{trainer_id}/menus起動パラメータを設定

    画面表示制御:

    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
      • メニューを一覧表示
      • 0件の場合は「現在、提供できるメニューが存在しません。」と表示
      • API010を呼び出し

    利用API:

    IDURLParameter
    API010/trainers/{trainer_id}/reviews起動パラメータを設定

    画面表示制御:

    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
      • 0件の場合は、「レビューがありません」を表示する
      • 1件以上存在する場合は、最大5件まで表示する

    2. トレーニングコース決定

    UIM03 を起動する。

    ',14)]))}const m=l(h,[["render",n]]);export{_ as __pageData,m as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_index.md.CLdWSZO-.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_index.md.CLdWSZO-.js" new file mode 100644 index 00000000..6c4ee3f3 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_index.md.CLdWSZO-.js" @@ -0,0 +1 @@ +import{_ as d,c as a,a3 as e,o as r}from"./chunks/framework.BDUoXecB.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/index.md"}'),o={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/index.md"};function n(h,t,i,l,s,c){return r(),a("div",null,t[0]||(t[0]=[e('

    画面

    標準画面

    ID論理名備考
    UIS01トップページ
    UIS02マイページ
    UIS03トレーナー一覧
    UIS04トレーナー詳細

    モーダル画面

    ID論理名備考
    UIM01ログイン
    UIM02トレーナー検索
    UIM03カレンダー予約
    UIM04決済
    ',6)]))}const m=d(o,[["render",n]]);export{f as __pageData,m as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_index.md.CLdWSZO-.lean.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_index.md.CLdWSZO-.lean.js" new file mode 100644 index 00000000..6c4ee3f3 --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_01_\347\224\273\351\235\242_index.md.CLdWSZO-.lean.js" @@ -0,0 +1 @@ +import{_ as d,c as a,a3 as e,o as r}from"./chunks/framework.BDUoXecB.js";const f=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/01_画面/index.md"}'),o={name:"documents/forMarkdown/future_muscle_partner/docs/01_画面/index.md"};function n(h,t,i,l,s,c){return r(),a("div",null,t[0]||(t[0]=[e('

    画面

    標準画面

    ID論理名備考
    UIS01トップページ
    UIS02マイページ
    UIS03トレーナー一覧
    UIS04トレーナー詳細

    モーダル画面

    ID論理名備考
    UIM01ログイン
    UIM02トレーナー検索
    UIM03カレンダー予約
    UIM04決済
    ',6)]))}const m=d(o,[["render",n]]);export{f as __pageData,m as default}; diff --git a/assets/documents_forMarkdown_future_muscle_partner_docs_02_WebAPI_index.md.opMYqqJ4.js b/assets/documents_forMarkdown_future_muscle_partner_docs_02_WebAPI_index.md.opMYqqJ4.js new file mode 100644 index 00000000..d99f5a2d --- /dev/null +++ b/assets/documents_forMarkdown_future_muscle_partner_docs_02_WebAPI_index.md.opMYqqJ4.js @@ -0,0 +1 @@ +import{_ as r,c as t,j as e,a as n,o}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/index.md"}'),s={name:"documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/index.md"};function d(c,a,i,p,l,m){return o(),t("div",null,a[0]||(a[0]=[e("h3",{id:"web-api",tabindex:"-1"},[n("Web API "),e("a",{class:"header-anchor",href:"#web-api","aria-label":'Permalink to "Web API"'},"​")],-1),e("p",null,[e("a",{href:"openapi.yaml"},"openapi.yaml")],-1)]))}const f=r(s,[["render",d]]);export{_ as __pageData,f as default}; diff --git a/assets/documents_forMarkdown_future_muscle_partner_docs_02_WebAPI_index.md.opMYqqJ4.lean.js b/assets/documents_forMarkdown_future_muscle_partner_docs_02_WebAPI_index.md.opMYqqJ4.lean.js new file mode 100644 index 00000000..d99f5a2d --- /dev/null +++ b/assets/documents_forMarkdown_future_muscle_partner_docs_02_WebAPI_index.md.opMYqqJ4.lean.js @@ -0,0 +1 @@ +import{_ as r,c as t,j as e,a as n,o}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/index.md"}'),s={name:"documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/index.md"};function d(c,a,i,p,l,m){return o(),t("div",null,a[0]||(a[0]=[e("h3",{id:"web-api",tabindex:"-1"},[n("Web API "),e("a",{class:"header-anchor",href:"#web-api","aria-label":'Permalink to "Web API"'},"​")],-1),e("p",null,[e("a",{href:"openapi.yaml"},"openapi.yaml")],-1)]))}const f=r(s,[["render",d]]);export{_ as __pageData,f as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_03_\343\203\207\343\203\274\343\202\277_index.md.Dm_lmVb0.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_03_\343\203\207\343\203\274\343\202\277_index.md.Dm_lmVb0.js" new file mode 100644 index 00000000..7930465e --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_03_\343\203\207\343\203\274\343\202\277_index.md.Dm_lmVb0.js" @@ -0,0 +1 @@ +import{_ as t,c as n,j as e,a as r,o}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/03_データ/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/03_データ/index.md"}'),s={name:"documents/forMarkdown/future_muscle_partner/docs/03_データ/index.md"};function d(c,a,l,u,i,m){return o(),n("div",null,a[0]||(a[0]=[e("h2",{id:"テーブル一覧",tabindex:"-1"},[r("テーブル一覧 "),e("a",{class:"header-anchor",href:"#テーブル一覧","aria-label":'Permalink to "テーブル一覧"'},"​")],-1),e("p",null,[e("a",{href:"https://a5m2.mmatsubara.com/",target:"_blank",rel:"noreferrer"},"A5:SQL Mk-2"),r(" で管理している。")],-1),e("ul",null,[e("li",null,[e("a",{href:"https://github.com/future-architect/coding-standards/raw/gh-pages/example-resources/erd.a5er",target:"_blank",rel:"noreferrer"},"erd.a5er"),r(" を参照")])],-1)]))}const p=t(s,[["render",d]]);export{_ as __pageData,p as default}; diff --git "a/assets/documents_forMarkdown_future_muscle_partner_docs_03_\343\203\207\343\203\274\343\202\277_index.md.Dm_lmVb0.lean.js" "b/assets/documents_forMarkdown_future_muscle_partner_docs_03_\343\203\207\343\203\274\343\202\277_index.md.Dm_lmVb0.lean.js" new file mode 100644 index 00000000..7930465e --- /dev/null +++ "b/assets/documents_forMarkdown_future_muscle_partner_docs_03_\343\203\207\343\203\274\343\202\277_index.md.Dm_lmVb0.lean.js" @@ -0,0 +1 @@ +import{_ as t,c as n,j as e,a as r,o}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/03_データ/index.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/03_データ/index.md"}'),s={name:"documents/forMarkdown/future_muscle_partner/docs/03_データ/index.md"};function d(c,a,l,u,i,m){return o(),n("div",null,a[0]||(a[0]=[e("h2",{id:"テーブル一覧",tabindex:"-1"},[r("テーブル一覧 "),e("a",{class:"header-anchor",href:"#テーブル一覧","aria-label":'Permalink to "テーブル一覧"'},"​")],-1),e("p",null,[e("a",{href:"https://a5m2.mmatsubara.com/",target:"_blank",rel:"noreferrer"},"A5:SQL Mk-2"),r(" で管理している。")],-1),e("ul",null,[e("li",null,[e("a",{href:"https://github.com/future-architect/coding-standards/raw/gh-pages/example-resources/erd.a5er",target:"_blank",rel:"noreferrer"},"erd.a5er"),r(" を参照")])],-1)]))}const p=t(s,[["render",d]]);export{_ as __pageData,p as default}; diff --git a/assets/documents_forMarkdown_future_muscle_partner_docs_README.md.BAGNGqZo.js b/assets/documents_forMarkdown_future_muscle_partner_docs_README.md.BAGNGqZo.js new file mode 100644 index 00000000..ca154c32 --- /dev/null +++ b/assets/documents_forMarkdown_future_muscle_partner_docs_README.md.BAGNGqZo.js @@ -0,0 +1,6 @@ +import{_ as t,c as s,a3 as i,o as e}from"./chunks/framework.BDUoXecB.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/README.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/README.md"}'),d={name:"documents/forMarkdown/future_muscle_partner/docs/README.md"};function l(n,a,r,h,p,o){return e(),s("div",null,a[0]||(a[0]=[i(`

    docs

    設計ドキュメントを管理する。

    フォルダ階層

    sh
    docs
    +├── 01_画面      # Figma、画面アクション
    +├── 02_WebAPI   # openapi.yaml、API処理設計
    +├── 03_データ    # erd.a5er(ERD)、区分値
    +├── ...
    +└── README.md

    設計書

    コード体系

    機能IDのコード体系は以下に従う。

    種別種別備考
    UIS通常画面UIS01、UIS02UI Standard から
    UIMモーダル画面UIM01、UIM02UI Mordal から
    APIWeb APIAPI01、API02
    IFSシステムI/F 送信IFS01、IFS02InterFace Send から
    IFRシステムI/F 受信IFR01、IFR02InterFace Receive から
    BATバッチBAT01、BAT02BATch から
    RPT帳票RPT01、RPT02RePorT から

    コード体系について補足:

    • UISであれば、 UIS(0[1-9]{1}|[0-9]{2} といったフォーマットに従うこと
    • Future Muscle Partnerのプロダクト規模であれば、機能数が爆発しないという想定で2桁とする
      • 万が一あぶれた場合、16進数と見なしてA~Fを導入する拡張を行う

    機能IDの採番について注意点:

    • 採番後の変更は許可しない
    • 連番とする(数字部分に新しい体系を作らない)

    画面設計書の記載方針

    • Web API の応答項目が、画面項目のどこにマッピングすべきかという情報は、多くの業務画面で重要である
      • 理由は、類似名称の項目がWeb API応答項目にも画面項目多く、紐づけの認識の齟齬が生じやすいからである
    • future muscle partnerにおいては、項目数は多くなくFigmaを見れば自明であるため、画面項目定義を省略する
    `,15)]))}const k=t(d,[["render",l]]);export{u as __pageData,k as default}; diff --git a/assets/documents_forMarkdown_future_muscle_partner_docs_README.md.BAGNGqZo.lean.js b/assets/documents_forMarkdown_future_muscle_partner_docs_README.md.BAGNGqZo.lean.js new file mode 100644 index 00000000..ca154c32 --- /dev/null +++ b/assets/documents_forMarkdown_future_muscle_partner_docs_README.md.BAGNGqZo.lean.js @@ -0,0 +1,6 @@ +import{_ as t,c as s,a3 as i,o as e}from"./chunks/framework.BDUoXecB.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/docs/README.md","filePath":"documents/forMarkdown/future_muscle_partner/docs/README.md"}'),d={name:"documents/forMarkdown/future_muscle_partner/docs/README.md"};function l(n,a,r,h,p,o){return e(),s("div",null,a[0]||(a[0]=[i(`

    docs

    設計ドキュメントを管理する。

    フォルダ階層

    sh
    docs
    +├── 01_画面      # Figma、画面アクション
    +├── 02_WebAPI   # openapi.yaml、API処理設計
    +├── 03_データ    # erd.a5er(ERD)、区分値
    +├── ...
    +└── README.md

    設計書

    コード体系

    機能IDのコード体系は以下に従う。

    種別種別備考
    UIS通常画面UIS01、UIS02UI Standard から
    UIMモーダル画面UIM01、UIM02UI Mordal から
    APIWeb APIAPI01、API02
    IFSシステムI/F 送信IFS01、IFS02InterFace Send から
    IFRシステムI/F 受信IFR01、IFR02InterFace Receive から
    BATバッチBAT01、BAT02BATch から
    RPT帳票RPT01、RPT02RePorT から

    コード体系について補足:

    • UISであれば、 UIS(0[1-9]{1}|[0-9]{2} といったフォーマットに従うこと
    • Future Muscle Partnerのプロダクト規模であれば、機能数が爆発しないという想定で2桁とする
      • 万が一あぶれた場合、16進数と見なしてA~Fを導入する拡張を行う

    機能IDの採番について注意点:

    • 採番後の変更は許可しない
    • 連番とする(数字部分に新しい体系を作らない)

    画面設計書の記載方針

    • Web API の応答項目が、画面項目のどこにマッピングすべきかという情報は、多くの業務画面で重要である
      • 理由は、類似名称の項目がWeb API応答項目にも画面項目多く、紐づけの認識の齟齬が生じやすいからである
    • future muscle partnerにおいては、項目数は多くなくFigmaを見れば自明であるため、画面項目定義を省略する
    `,15)]))}const k=t(d,[["render",l]]);export{u as __pageData,k as default}; diff --git a/assets/documents_forMarkdown_future_muscle_partner_index.md.CCGpmIQT.js b/assets/documents_forMarkdown_future_muscle_partner_index.md.CCGpmIQT.js new file mode 100644 index 00000000..327369dd --- /dev/null +++ b/assets/documents_forMarkdown_future_muscle_partner_index.md.CCGpmIQT.js @@ -0,0 +1,5 @@ +import{_ as a,c as i,a3 as e,o as n}from"./chunks/framework.BDUoXecB.js";const l="/coding-standards/assets/future_muscle_partner_abstract.CX2VLXG2.png",k=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/index.md","filePath":"documents/forMarkdown/future_muscle_partner/index.md"}'),t={name:"documents/forMarkdown/future_muscle_partner/index.md"};function r(p,s,h,d,u,c){return n(),i("div",null,s[0]||(s[0]=[e('

    Future Muscle Partner

    「いきつけのジムでパーソナルトレーニングを受けよう」のFuture Muscle Partnerのリポジトリ。

    サービスコンセプト

    パーソナルトレーナーを身近なものにして、質が高く安全で楽しいフィットネス体験を提供する。

    アプリを通してトレーニがトレーナに予約し、トレーニングを実施するフロー

    サービス概要:

    • アプリ上でジム公認のトレーナーを検索&予約し、いきつけのジムでトレーニングを受けることができる

    主なアクターとメリット:

    • トレーニー
      • 自分が通っているジムでパーソナル受けられる
      • トレーナーの得意分野ごとにトレーナーを使い分けられる
    • パーソナルトレーニー
      • 24H型ジムでサービスを提供できる
      • いつ/誰に/どんなメニューでトレーニングしたかを管理できる

    フォルダ階層

    sh
    .
    +├── backend    # バックエンド系のコード
    +├── docs       # 設計書
    +├── frontend   # フロントエンド系のコード
    +├── infra      # インフラ系のコード

    設計書

    docs を参照。

    `,13)]))}const m=a(t,[["render",r]]);export{k as __pageData,m as default}; diff --git a/assets/documents_forMarkdown_future_muscle_partner_index.md.CCGpmIQT.lean.js b/assets/documents_forMarkdown_future_muscle_partner_index.md.CCGpmIQT.lean.js new file mode 100644 index 00000000..327369dd --- /dev/null +++ b/assets/documents_forMarkdown_future_muscle_partner_index.md.CCGpmIQT.lean.js @@ -0,0 +1,5 @@ +import{_ as a,c as i,a3 as e,o as n}from"./chunks/framework.BDUoXecB.js";const l="/coding-standards/assets/future_muscle_partner_abstract.CX2VLXG2.png",k=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/future_muscle_partner/index.md","filePath":"documents/forMarkdown/future_muscle_partner/index.md"}'),t={name:"documents/forMarkdown/future_muscle_partner/index.md"};function r(p,s,h,d,u,c){return n(),i("div",null,s[0]||(s[0]=[e('

    Future Muscle Partner

    「いきつけのジムでパーソナルトレーニングを受けよう」のFuture Muscle Partnerのリポジトリ。

    サービスコンセプト

    パーソナルトレーナーを身近なものにして、質が高く安全で楽しいフィットネス体験を提供する。

    アプリを通してトレーニがトレーナに予約し、トレーニングを実施するフロー

    サービス概要:

    • アプリ上でジム公認のトレーナーを検索&予約し、いきつけのジムでトレーニングを受けることができる

    主なアクターとメリット:

    • トレーニー
      • 自分が通っているジムでパーソナル受けられる
      • トレーナーの得意分野ごとにトレーナーを使い分けられる
    • パーソナルトレーニー
      • 24H型ジムでサービスを提供できる
      • いつ/誰に/どんなメニューでトレーニングしたかを管理できる

    フォルダ階層

    sh
    .
    +├── backend    # バックエンド系のコード
    +├── docs       # 設計書
    +├── frontend   # フロントエンド系のコード
    +├── infra      # インフラ系のコード

    設計書

    docs を参照。

    `,13)]))}const m=a(t,[["render",r]]);export{k as __pageData,m as default}; diff --git a/assets/documents_forMarkdown_index.md.Bz-unPiS.js b/assets/documents_forMarkdown_index.md.Bz-unPiS.js new file mode 100644 index 00000000..bea8cb19 --- /dev/null +++ b/assets/documents_forMarkdown_index.md.Bz-unPiS.js @@ -0,0 +1,38 @@ +import{_ as a,c as i,a3 as n,o as e}from"./chunks/framework.BDUoXecB.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"Markdown設計ドキュメント規約","tagline":"Future Enterprise Markdown Design Document Standards"}},"headers":[],"relativePath":"documents/forMarkdown/index.md","filePath":"documents/forMarkdown/index.md"}'),t={name:"documents/forMarkdown/index.md"};function l(p,s,h,r,k,d){return e(),i("div",null,s[0]||(s[0]=[n(`

    Markdown ベースの設計ドキュメントの規約をまとめる。

    システム開発にて利用する設計ドキュメントを Markdown ベースにすることで、コーディングと同じ慣れたツールを用いて、Git によるバージョン管理、レビュープロセス、CI/CD などに自動化(静的解析、自動生成)を行いやすくし、ドキュメントを陳腐化させず、俊敏な設計開発を目指す。

    Markdown に限った話では無いが、どういった内容を設計書に記載すべきかは悩むポイントは多い。

    本規約では、アプリケーションの種別ごとに記載すべき内容と、それをどのような Markdown の構造で記載するかを規約化し、各チームで悩む余地を減らし、注力すべきことに集中できる環境を提供することを目的とする。

    前提

    本規約は以下の前提で作成されている

    • チーム/プロジェクトが 3 ~ 10 名程度の規模
    • Git(GitHub, GitLab)で管理され、コードと設計書が同一リポジトリで管理される
    • システム開発で必要なアプリケーション開発

    本規約で紹介する設計ドキュメントの位置付け

    設計ドキュメントは様々な前提条件/制約/経緯で作成され、Excel/Word/パワーポイントなどのファイル形式で作成することが多い。

    本規約はそれらを否定するものではなく、様々な利害関係者の要求に応え洗練され続けた上記の設計ドキュメントのテンプレートには、強く敬意を表する。

    一方で、設計ドキュメントを精緻に管理していく優先度より、プロダクト開発の効率とビジネスピードをより重視する場合もあり、それらの開発チームでは設計ドキュメントが存在さえない、あっても設計書が実装と乖離しているなどの問題が世間で課題提起されることも多い。

    本規約では、後者のプロダクト開発の効率性を重視し、設計ドキュメントが開発以外の観点から求められない場合において、必要最低限必要だと思われるレベルの記載のサンプルを提供する。

    また、設計ドキュメントのファイル形式に制約は無いという前提に立つため、設計ドキュメントの陳腐化を防ぐのに有効だと思われる、テキストベース(Markdown)でGit管理するという思想を採用する。

    本規約で紹介した各設計ドキュメントの記載内容を参考にしつつ、各開発チームにおいて必要な情報を追加/削除して利用するという、テンプレートとしての利用を想定する。

    テキストベースにおける設計書の注意点

    特に扱いで留意すべき点として、列数が多い表形式で設計ドキュメントを記載するケースがある。

    Markdownで表を記載することは可能ですが、列数が多い場合は保守性が非常に低くなり、git diffを用いた差分が見れるメリットも下がる。

    例えば、1つの画面の利用項目数が数十以上になり得る場合は、Excelなどのファイル形式を利用することを推奨する。

    フォルダ階層の推奨

    リポジトリ直下に docs フォルダを作成し、その配下に設計ドキュメントとなる Markdown ファイルを配備する。

    次はバックエンド、フロントエンド、インフラのコードをモノリポで管理している例である。

    sh
    .
    +├── backend # バックエンド系のコード
    +├── docs
    +├── frontend # フロントエンド系のコード
    +├── infrastructure # インフラ系のコード

    docs 配下は以下のルールにしたがった構造を取る。

    • 01_02_ といったプレフィックスを持つ
    • 番号には体系をもたせず、必要になったタイミングでインクリメントさせる
    • オンボーディングコストを抑えるため、なるべく先頭に新規参画者が欲する情報を配備する

    構成例を次にあげる。

    sh
    docs
    +├── 01_キャッチアップ # ドメイン知識など抑えておくべき前提知識
    +├── 02_環境構築     #
    +├── 03_開発規約     # GitFlowなど、リリース方式、CI/CD周り
    +├── 04_ユーザーストーリー
    +├── 05_UI設計      # Figmaのパスなど
    +├── 06_画面設計書
    +├── 07_API設計書   # OpenAPIのパス+各BL設計
    +├── 08_データモデル # ERD, テーブル定義
    +├── 09_IF設計書    # I/F定義+受信/送信BL設計
    +├── 10_バッチ設計書 # タイマー、イベント起動の非同期処理のBL設計
    +├── 11_インフラ設計 # 監視、キャパシティサイジング、コスト
    +├── ...
    +└── README.md

    システム構成図

    図は基本的に変更差分がGitと相性が良い、PlantUML(またはMermaid.js)で作成すること。PlantUMLの場合、テーマは toy を指定すること。

    plantuml
    @startuml
    +!theme toy
    +
    +participant Participant as Foo
    +note over Foo: Event
    +actor       Actor       as Foo1
    +boundary    Boundary    as Foo2
    +control     Control     as Foo3
    +entity      Entity      as Foo4
    +database    Database    as Foo5
    +collections Collections as Foo6
    +queue       Queue       as Foo7
    +Foo -> Foo1 : To actor
    +Foo -> Foo2 : To boundary
    +Foo -> Foo3 : To control
    +Foo -> Foo4 : To entity
    +Foo -> Foo5 : To database
    +Foo -> Foo6 : To collections
    +Foo -> Foo7: To queue
    +
    +@enduml

    システム構成図などは上記では対応しにくいことが多いため、diagrams.net(draw.io)で作成する。

    diagrams.netの場合は、拡張子は以下のいずれかで作成する。

    • .drawio.png
    • .drawio.jpg
    • .drawio.svg

    フロントエンド

    以下の方針を取る。

    • Figmaを用いて、画面遷移、画面表示項目を定義する
    • Markdown設計書には、Figmaで判断可能な見た目の情報は 記載しない
    • Markdown設計書には、Web APIの呼び出しやイベントの定義、パラメータの受け渡し、バリデーションロジックなどを定義する。

    サンプル設計書を参考にする。

    バックエンド

    テーブル定義書

    A5:SQL Mk-2を用い、erd.a5er という名称で管理する。

    以下の情報の管理は erd.a5er で行えないため、別で定義する。

    • 保持期限
    • 個人情報有無

    区分値

    区分値設計書 を参考にする。

    Web API 設計書

    API 定義書は openapi.yaml で記載すること。

    詳細はOpenAPI Specification 3.0.3規約 を参考にする。

    プログラム設計書(バッチ、非同期タスクなど)

    プログラム設計書を参考にする。

    プログラム設計書(Web API)

    Web APIについても、プログラム設計書(バッチ、非同期タスクなど)と同様に機能ID単位で作成する。

    ただし、Web APIにおいては openapi.yaml と重複する部分で自明な内容(例えば、リクエストパラメータの定義や、レスポンス項目)については、重複するため記載を省略する。

    もし、検索APIで複数のテーブルを参照して結果を応答する場合に、項目の由来を示すため、下表のような形式を定義すること。

    Web API応答例
    ParameterDescriptionSettingsNote
    last_name氏名 (姓)m_user
    first_name氏名 (名)m_user
    last_name_kana氏名カナ (姓)m_user
    first_name_kana氏名カナ (名)m_user
    date_of_birth生年月日m_user_detail
    gender_type性別区分m_user_detail
    tel電話番号m_user_detail
    occupation_type職業区分m_user_detail
    zipcode郵便番号m_user_detail

    ※Descriptionは openapi.yaml 側の description で記載済みであれば、省略すること ※Noteは何かしら加工処理により生み出された項目であれば、計算ロジックを記載する

    I/F 定義書

    I/F 定義書は、システム間の連携について定義と、その受信/配信処理の設計書です。

    システム I/F は連携先の対向システムが存在するため、認識齟齬が無いように、どのようなプロトコル・項目であるかを定義する必要がある。

    IF定義書を参考にする。

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。 (これらのファイルはPandocを利用して作成しています。)

    `,62)]))}const F=a(t,[["render",l]]);export{c as __pageData,F as default}; diff --git a/assets/documents_forMarkdown_index.md.Bz-unPiS.lean.js b/assets/documents_forMarkdown_index.md.Bz-unPiS.lean.js new file mode 100644 index 00000000..bea8cb19 --- /dev/null +++ b/assets/documents_forMarkdown_index.md.Bz-unPiS.lean.js @@ -0,0 +1,38 @@ +import{_ as a,c as i,a3 as n,o as e}from"./chunks/framework.BDUoXecB.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"Markdown設計ドキュメント規約","tagline":"Future Enterprise Markdown Design Document Standards"}},"headers":[],"relativePath":"documents/forMarkdown/index.md","filePath":"documents/forMarkdown/index.md"}'),t={name:"documents/forMarkdown/index.md"};function l(p,s,h,r,k,d){return e(),i("div",null,s[0]||(s[0]=[n(`

    Markdown ベースの設計ドキュメントの規約をまとめる。

    システム開発にて利用する設計ドキュメントを Markdown ベースにすることで、コーディングと同じ慣れたツールを用いて、Git によるバージョン管理、レビュープロセス、CI/CD などに自動化(静的解析、自動生成)を行いやすくし、ドキュメントを陳腐化させず、俊敏な設計開発を目指す。

    Markdown に限った話では無いが、どういった内容を設計書に記載すべきかは悩むポイントは多い。

    本規約では、アプリケーションの種別ごとに記載すべき内容と、それをどのような Markdown の構造で記載するかを規約化し、各チームで悩む余地を減らし、注力すべきことに集中できる環境を提供することを目的とする。

    前提

    本規約は以下の前提で作成されている

    • チーム/プロジェクトが 3 ~ 10 名程度の規模
    • Git(GitHub, GitLab)で管理され、コードと設計書が同一リポジトリで管理される
    • システム開発で必要なアプリケーション開発

    本規約で紹介する設計ドキュメントの位置付け

    設計ドキュメントは様々な前提条件/制約/経緯で作成され、Excel/Word/パワーポイントなどのファイル形式で作成することが多い。

    本規約はそれらを否定するものではなく、様々な利害関係者の要求に応え洗練され続けた上記の設計ドキュメントのテンプレートには、強く敬意を表する。

    一方で、設計ドキュメントを精緻に管理していく優先度より、プロダクト開発の効率とビジネスピードをより重視する場合もあり、それらの開発チームでは設計ドキュメントが存在さえない、あっても設計書が実装と乖離しているなどの問題が世間で課題提起されることも多い。

    本規約では、後者のプロダクト開発の効率性を重視し、設計ドキュメントが開発以外の観点から求められない場合において、必要最低限必要だと思われるレベルの記載のサンプルを提供する。

    また、設計ドキュメントのファイル形式に制約は無いという前提に立つため、設計ドキュメントの陳腐化を防ぐのに有効だと思われる、テキストベース(Markdown)でGit管理するという思想を採用する。

    本規約で紹介した各設計ドキュメントの記載内容を参考にしつつ、各開発チームにおいて必要な情報を追加/削除して利用するという、テンプレートとしての利用を想定する。

    テキストベースにおける設計書の注意点

    特に扱いで留意すべき点として、列数が多い表形式で設計ドキュメントを記載するケースがある。

    Markdownで表を記載することは可能ですが、列数が多い場合は保守性が非常に低くなり、git diffを用いた差分が見れるメリットも下がる。

    例えば、1つの画面の利用項目数が数十以上になり得る場合は、Excelなどのファイル形式を利用することを推奨する。

    フォルダ階層の推奨

    リポジトリ直下に docs フォルダを作成し、その配下に設計ドキュメントとなる Markdown ファイルを配備する。

    次はバックエンド、フロントエンド、インフラのコードをモノリポで管理している例である。

    sh
    .
    +├── backend # バックエンド系のコード
    +├── docs
    +├── frontend # フロントエンド系のコード
    +├── infrastructure # インフラ系のコード

    docs 配下は以下のルールにしたがった構造を取る。

    • 01_02_ といったプレフィックスを持つ
    • 番号には体系をもたせず、必要になったタイミングでインクリメントさせる
    • オンボーディングコストを抑えるため、なるべく先頭に新規参画者が欲する情報を配備する

    構成例を次にあげる。

    sh
    docs
    +├── 01_キャッチアップ # ドメイン知識など抑えておくべき前提知識
    +├── 02_環境構築     #
    +├── 03_開発規約     # GitFlowなど、リリース方式、CI/CD周り
    +├── 04_ユーザーストーリー
    +├── 05_UI設計      # Figmaのパスなど
    +├── 06_画面設計書
    +├── 07_API設計書   # OpenAPIのパス+各BL設計
    +├── 08_データモデル # ERD, テーブル定義
    +├── 09_IF設計書    # I/F定義+受信/送信BL設計
    +├── 10_バッチ設計書 # タイマー、イベント起動の非同期処理のBL設計
    +├── 11_インフラ設計 # 監視、キャパシティサイジング、コスト
    +├── ...
    +└── README.md

    システム構成図

    図は基本的に変更差分がGitと相性が良い、PlantUML(またはMermaid.js)で作成すること。PlantUMLの場合、テーマは toy を指定すること。

    plantuml
    @startuml
    +!theme toy
    +
    +participant Participant as Foo
    +note over Foo: Event
    +actor       Actor       as Foo1
    +boundary    Boundary    as Foo2
    +control     Control     as Foo3
    +entity      Entity      as Foo4
    +database    Database    as Foo5
    +collections Collections as Foo6
    +queue       Queue       as Foo7
    +Foo -> Foo1 : To actor
    +Foo -> Foo2 : To boundary
    +Foo -> Foo3 : To control
    +Foo -> Foo4 : To entity
    +Foo -> Foo5 : To database
    +Foo -> Foo6 : To collections
    +Foo -> Foo7: To queue
    +
    +@enduml

    システム構成図などは上記では対応しにくいことが多いため、diagrams.net(draw.io)で作成する。

    diagrams.netの場合は、拡張子は以下のいずれかで作成する。

    • .drawio.png
    • .drawio.jpg
    • .drawio.svg

    フロントエンド

    以下の方針を取る。

    • Figmaを用いて、画面遷移、画面表示項目を定義する
    • Markdown設計書には、Figmaで判断可能な見た目の情報は 記載しない
    • Markdown設計書には、Web APIの呼び出しやイベントの定義、パラメータの受け渡し、バリデーションロジックなどを定義する。

    サンプル設計書を参考にする。

    バックエンド

    テーブル定義書

    A5:SQL Mk-2を用い、erd.a5er という名称で管理する。

    以下の情報の管理は erd.a5er で行えないため、別で定義する。

    • 保持期限
    • 個人情報有無

    区分値

    区分値設計書 を参考にする。

    Web API 設計書

    API 定義書は openapi.yaml で記載すること。

    詳細はOpenAPI Specification 3.0.3規約 を参考にする。

    プログラム設計書(バッチ、非同期タスクなど)

    プログラム設計書を参考にする。

    プログラム設計書(Web API)

    Web APIについても、プログラム設計書(バッチ、非同期タスクなど)と同様に機能ID単位で作成する。

    ただし、Web APIにおいては openapi.yaml と重複する部分で自明な内容(例えば、リクエストパラメータの定義や、レスポンス項目)については、重複するため記載を省略する。

    もし、検索APIで複数のテーブルを参照して結果を応答する場合に、項目の由来を示すため、下表のような形式を定義すること。

    Web API応答例
    ParameterDescriptionSettingsNote
    last_name氏名 (姓)m_user
    first_name氏名 (名)m_user
    last_name_kana氏名カナ (姓)m_user
    first_name_kana氏名カナ (名)m_user
    date_of_birth生年月日m_user_detail
    gender_type性別区分m_user_detail
    tel電話番号m_user_detail
    occupation_type職業区分m_user_detail
    zipcode郵便番号m_user_detail

    ※Descriptionは openapi.yaml 側の description で記載済みであれば、省略すること ※Noteは何かしら加工処理により生み出された項目であれば、計算ロジックを記載する

    I/F 定義書

    I/F 定義書は、システム間の連携について定義と、その受信/配信処理の設計書です。

    システム I/F は連携先の対向システムが存在するため、認識齟齬が無いように、どのようなプロトコル・項目であるかを定義する必要がある。

    IF定義書を参考にする。

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。 (これらのファイルはPandocを利用して作成しています。)

    `,62)]))}const F=a(t,[["render",l]]);export{c as __pageData,F as default}; diff --git "a/assets/documents_forMarkdown_\343\203\227\343\203\255\343\202\260\343\203\251\343\203\240\350\250\255\350\250\210\346\233\270.md.qu2nuHwH.js" "b/assets/documents_forMarkdown_\343\203\227\343\203\255\343\202\260\343\203\251\343\203\240\350\250\255\350\250\210\346\233\270.md.qu2nuHwH.js" new file mode 100644 index 00000000..188c467f --- /dev/null +++ "b/assets/documents_forMarkdown_\343\203\227\343\203\255\343\202\260\343\203\251\343\203\240\350\250\255\350\250\210\346\233\270.md.qu2nuHwH.js" @@ -0,0 +1,19 @@ +import{_ as a,c as i,a3 as n,o as l}from"./chunks/framework.BDUoXecB.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/プログラム設計書.md","filePath":"documents/forMarkdown/プログラム設計書.md"}'),e={name:"documents/forMarkdown/プログラム設計書.md"};function p(t,s,h,r,k,x){return l(),i("div",null,s[0]||(s[0]=[n(`

    BAT01 xxx 計算

    処理概要

    • xxx(なぜこれが必要なのか)
    • xxx受信の後続処理で起動し、xxx計算を行いxxxトランに登録する(処理の概略)

    処理シーケンス

    plantuml
    @startuml
    +!theme toy
    +
    +participant システム
    +database DB
    +
    +note over システム: 各種インプット取得
    +
    +システム -> DB: 業務日付取得 [日付マスタ]
    +システム -> DB: 計算対象抽出xxx\\n[xxx受信管理トラン]\\n[xxx受信ワーク]\\n[xxxマスタ]\\n[yyyマスタ]\\n[zzzマスタ]
    +システム -> システム: 支払い差し引き金額計算(※ビジネスロジック1)
    +システム -> DB: 登録\\n[xxxトラン]
    +システム -> DB: 更新\\n[xxx予測ワーク]
    +
    +@enduml

    ビジネスロジック

    ビジネスロジック1

    txt
    支払金額 = 受信ワーク.商品コード * xxx * xxx - yyyy
    +
    +IF xxx 区分
    +  支払金額 = 支払金額 * 支払い係数 + (支払金額 - 前回発注金額)/2
    +END

    DB 項目

    取得

    • xxxマスタ.支払い金額
    • xxxマスタ.特定商品区分
    • yyyマスタ.新古品フラグ
    • zzzマスタ.前回発注金額

    抽出条件:

    • xxx受信管理トラン.業務日付 = 業務日付
    • xxx受信管理トラン.処理連番 = xxx受信管理トラン の最新の処理連番

    登録

    • xxxトラン.会社コード = xxx
    • xxxトラン.処理日付 = xxx
    • xxxトラン.xxx区分 = xxx
    • xxxトラン.支払金額 = ビジネスロジック1計算結果

    更新

    xxx 予測ワーク:

    • xxx 予測ワーク.優先度
    • xxx 予測ワーク.処理予定日
    `,18)]))}const o=a(e,[["render",p]]);export{c as __pageData,o as default}; diff --git "a/assets/documents_forMarkdown_\343\203\227\343\203\255\343\202\260\343\203\251\343\203\240\350\250\255\350\250\210\346\233\270.md.qu2nuHwH.lean.js" "b/assets/documents_forMarkdown_\343\203\227\343\203\255\343\202\260\343\203\251\343\203\240\350\250\255\350\250\210\346\233\270.md.qu2nuHwH.lean.js" new file mode 100644 index 00000000..188c467f --- /dev/null +++ "b/assets/documents_forMarkdown_\343\203\227\343\203\255\343\202\260\343\203\251\343\203\240\350\250\255\350\250\210\346\233\270.md.qu2nuHwH.lean.js" @@ -0,0 +1,19 @@ +import{_ as a,c as i,a3 as n,o as l}from"./chunks/framework.BDUoXecB.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/プログラム設計書.md","filePath":"documents/forMarkdown/プログラム設計書.md"}'),e={name:"documents/forMarkdown/プログラム設計書.md"};function p(t,s,h,r,k,x){return l(),i("div",null,s[0]||(s[0]=[n(`

    BAT01 xxx 計算

    処理概要

    • xxx(なぜこれが必要なのか)
    • xxx受信の後続処理で起動し、xxx計算を行いxxxトランに登録する(処理の概略)

    処理シーケンス

    plantuml
    @startuml
    +!theme toy
    +
    +participant システム
    +database DB
    +
    +note over システム: 各種インプット取得
    +
    +システム -> DB: 業務日付取得 [日付マスタ]
    +システム -> DB: 計算対象抽出xxx\\n[xxx受信管理トラン]\\n[xxx受信ワーク]\\n[xxxマスタ]\\n[yyyマスタ]\\n[zzzマスタ]
    +システム -> システム: 支払い差し引き金額計算(※ビジネスロジック1)
    +システム -> DB: 登録\\n[xxxトラン]
    +システム -> DB: 更新\\n[xxx予測ワーク]
    +
    +@enduml

    ビジネスロジック

    ビジネスロジック1

    txt
    支払金額 = 受信ワーク.商品コード * xxx * xxx - yyyy
    +
    +IF xxx 区分
    +  支払金額 = 支払金額 * 支払い係数 + (支払金額 - 前回発注金額)/2
    +END

    DB 項目

    取得

    • xxxマスタ.支払い金額
    • xxxマスタ.特定商品区分
    • yyyマスタ.新古品フラグ
    • zzzマスタ.前回発注金額

    抽出条件:

    • xxx受信管理トラン.業務日付 = 業務日付
    • xxx受信管理トラン.処理連番 = xxx受信管理トラン の最新の処理連番

    登録

    • xxxトラン.会社コード = xxx
    • xxxトラン.処理日付 = xxx
    • xxxトラン.xxx区分 = xxx
    • xxxトラン.支払金額 = ビジネスロジック1計算結果

    更新

    xxx 予測ワーク:

    • xxx 予測ワーク.優先度
    • xxx 予測ワーク.処理予定日
    `,18)]))}const o=a(e,[["render",p]]);export{c as __pageData,o as default}; diff --git "a/assets/documents_forMarkdown_\343\203\241\343\203\203\343\202\273\343\203\274\343\202\270\350\250\255\350\250\210\346\233\270.md.BS8c2YMp.js" "b/assets/documents_forMarkdown_\343\203\241\343\203\203\343\202\273\343\203\274\343\202\270\350\250\255\350\250\210\346\233\270.md.BS8c2YMp.js" new file mode 100644 index 00000000..5169b254 --- /dev/null +++ "b/assets/documents_forMarkdown_\343\203\241\343\203\203\343\202\273\343\203\274\343\202\270\350\250\255\350\250\210\346\233\270.md.BS8c2YMp.js" @@ -0,0 +1 @@ +import{_ as d,c as a,a3 as e,o as r}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/メッセージ設計書.md","filePath":"documents/forMarkdown/メッセージ設計書.md"}'),o={name:"documents/forMarkdown/メッセージ設計書.md"};function n(h,t,i,l,s,c){return r(),a("div",null,t[0]||(t[0]=[e('

    MSG01

    メッセージ概要

    • 目的: ログイン処理周りでのエラー
    • スコープ: frontend, backend

    メッセージ定義

    識別子レベルステータスメッセージコメント
    10001E400ユーザー名またはパスワードが間違っていますログイン画面で発生
    10002W文字数オーバーですログイン画面で発生
    10003E500{domain}は無効なユーザードメインですユーザーの所属が異なっている
    10004F500EntraIDに接続できませんログインのバックエンドで発生
    ',5)]))}const u=d(o,[["render",n]]);export{_ as __pageData,u as default}; diff --git "a/assets/documents_forMarkdown_\343\203\241\343\203\203\343\202\273\343\203\274\343\202\270\350\250\255\350\250\210\346\233\270.md.BS8c2YMp.lean.js" "b/assets/documents_forMarkdown_\343\203\241\343\203\203\343\202\273\343\203\274\343\202\270\350\250\255\350\250\210\346\233\270.md.BS8c2YMp.lean.js" new file mode 100644 index 00000000..5169b254 --- /dev/null +++ "b/assets/documents_forMarkdown_\343\203\241\343\203\203\343\202\273\343\203\274\343\202\270\350\250\255\350\250\210\346\233\270.md.BS8c2YMp.lean.js" @@ -0,0 +1 @@ +import{_ as d,c as a,a3 as e,o as r}from"./chunks/framework.BDUoXecB.js";const _=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/メッセージ設計書.md","filePath":"documents/forMarkdown/メッセージ設計書.md"}'),o={name:"documents/forMarkdown/メッセージ設計書.md"};function n(h,t,i,l,s,c){return r(),a("div",null,t[0]||(t[0]=[e('

    MSG01

    メッセージ概要

    • 目的: ログイン処理周りでのエラー
    • スコープ: frontend, backend

    メッセージ定義

    識別子レベルステータスメッセージコメント
    10001E400ユーザー名またはパスワードが間違っていますログイン画面で発生
    10002W文字数オーバーですログイン画面で発生
    10003E500{domain}は無効なユーザードメインですユーザーの所属が異なっている
    10004F500EntraIDに接続できませんログインのバックエンドで発生
    ',5)]))}const u=d(o,[["render",n]]);export{_ as __pageData,u as default}; diff --git "a/assets/documents_forMarkdown_\345\214\272\345\210\206\345\200\244\350\250\255\350\250\210\346\233\270.md.CnQxW1-D.js" "b/assets/documents_forMarkdown_\345\214\272\345\210\206\345\200\244\350\250\255\350\250\210\346\233\270.md.CnQxW1-D.js" new file mode 100644 index 00000000..8aabc0e3 --- /dev/null +++ "b/assets/documents_forMarkdown_\345\214\272\345\210\206\345\200\244\350\250\255\350\250\210\346\233\270.md.CnQxW1-D.js" @@ -0,0 +1 @@ +import{_ as d,c as e,a3 as r,o as a}from"./chunks/framework.BDUoXecB.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/区分値設計書.md","filePath":"documents/forMarkdown/区分値設計書.md"}'),o={name:"documents/forMarkdown/区分値設計書.md"};function n(i,t,l,s,h,u){return a(),e("div",null,t[0]||(t[0]=[r('

    ENUM01 ユーザー権限

    区分値概要

    • 目的: 画面のモードの切り替えに利用する
    • 物理名: user permission level
    • 型: string
    • スコープ: frontend, backend
    • マスターテーブル: m_user_role

    区分値定義

    論理名物理名バージョンコメント
    ゲストguest011
    未認証ユーザーunauthenticated021
    登録ユーザーuser031
    プレミアムユーザーpremium_user042
    開発者developer050
    テスターtester060
    管理者administrator070
    ',5)]))}const _=d(o,[["render",n]]);export{m as __pageData,_ as default}; diff --git "a/assets/documents_forMarkdown_\345\214\272\345\210\206\345\200\244\350\250\255\350\250\210\346\233\270.md.CnQxW1-D.lean.js" "b/assets/documents_forMarkdown_\345\214\272\345\210\206\345\200\244\350\250\255\350\250\210\346\233\270.md.CnQxW1-D.lean.js" new file mode 100644 index 00000000..8aabc0e3 --- /dev/null +++ "b/assets/documents_forMarkdown_\345\214\272\345\210\206\345\200\244\350\250\255\350\250\210\346\233\270.md.CnQxW1-D.lean.js" @@ -0,0 +1 @@ +import{_ as d,c as e,a3 as r,o as a}from"./chunks/framework.BDUoXecB.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forMarkdown/区分値設計書.md","filePath":"documents/forMarkdown/区分値設計書.md"}'),o={name:"documents/forMarkdown/区分値設計書.md"};function n(i,t,l,s,h,u){return a(),e("div",null,t[0]||(t[0]=[r('

    ENUM01 ユーザー権限

    区分値概要

    • 目的: 画面のモードの切り替えに利用する
    • 物理名: user permission level
    • 型: string
    • スコープ: frontend, backend
    • マスターテーブル: m_user_role

    区分値定義

    論理名物理名バージョンコメント
    ゲストguest011
    未認証ユーザーunauthenticated021
    登録ユーザーuser031
    プレミアムユーザーpremium_user042
    開発者developer050
    テスターtester060
    管理者administrator070
    ',5)]))}const _=d(o,[["render",n]]);export{m as __pageData,_ as default}; diff --git a/assets/documents_forOpenAPISpecification_API_Design.md.DePo1nOn.js b/assets/documents_forOpenAPISpecification_API_Design.md.DePo1nOn.js new file mode 100644 index 00000000..33e75bf6 --- /dev/null +++ b/assets/documents_forOpenAPISpecification_API_Design.md.DePo1nOn.js @@ -0,0 +1 @@ +import{_ as a,c as o,a3 as t,o as i}from"./chunks/framework.BDUoXecB.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forOpenAPISpecification/API_Design.md","filePath":"documents/forOpenAPISpecification/API_Design.md"}'),l={name:"documents/forOpenAPISpecification/API_Design.md"};function r(d,e,c,n,h,s){return i(),o("div",null,e[0]||(e[0]=[t('

    Web API 設計標準

    OpenAPI Specification 規約を利用するに当たり、想定する Web API の設計ルールをまとめる。このルールに必ずしも準じる必要は無いが、このような設計を暗黙的に考慮し OpenAPI Specification 規約を作成している。

    HTTP メソッド

    実現したい操作により、以下のような使い分けを想定する。HEAD(リソースの存在チェック)、GET(参照)、POST(新規作成)、PUT(更新)、PATCH(一部更新)、DELETE(削除)。

    HTTP ステータス

    RFC 7231で定義されているレスポンスステータスコードを利用します。

    RFC9205日本語訳)の方針に原則則る。ユースケース別に利用すべき HTTP ステータスコードを記載します。

    共通

    • バリデーションエラー:400 Bad Request
    • 業務エラー:400 Bad Request
    • 認証エラー:401 Unauthorized
    • 認可エラー:403 Forbidden
    • システムエラー:500 Internal Server Error

    GET

    • 正常系:200 OK
      • 検索系 API で結果 0 件の場合も、 200 OK を返すとする
    • パスキー検索系 API で対象リソースが存在しないエラー:404 Not Found

    POST

    • 正常系(同期):201 Created
    • 正常系(非同期):202 Accepted
    • 一意制約違反エラー:409 Conflict
    • 親リソースが存在しないエラー:404 Not Found

    PUT

    • 正常系(同期):200 OK
    • 正常系(非同期):202 Accepted
    • 対象リソースが存在しないエラー:404 Not Found

    DELETE

    • 正常系:204 No Content
      • もし、削除した項目の情報を応答する場合は 200 OK とする
    • 対象リソースが存在しないエラー:404 Not Found

    API バージョン管理

    • /v1, /v2 といったパスで表現する
    • 型名変更、必須パラメータの追加、レスポンスの桁数変更、などをするときはバージョンを上げることを検討する

    パラメータの命名

    boolean 型である場合、 [a-zA-Z0-9-_]+_flag という命名は非推奨とする。

    is_[a-zA-Z0-9-_]+has_[a-zA-Z0-9-_]+ などの命名を代わりに検討する

    ',22)]))}const f=a(l,[["render",r]]);export{p as __pageData,f as default}; diff --git a/assets/documents_forOpenAPISpecification_API_Design.md.DePo1nOn.lean.js b/assets/documents_forOpenAPISpecification_API_Design.md.DePo1nOn.lean.js new file mode 100644 index 00000000..33e75bf6 --- /dev/null +++ b/assets/documents_forOpenAPISpecification_API_Design.md.DePo1nOn.lean.js @@ -0,0 +1 @@ +import{_ as a,c as o,a3 as t,o as i}from"./chunks/framework.BDUoXecB.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forOpenAPISpecification/API_Design.md","filePath":"documents/forOpenAPISpecification/API_Design.md"}'),l={name:"documents/forOpenAPISpecification/API_Design.md"};function r(d,e,c,n,h,s){return i(),o("div",null,e[0]||(e[0]=[t('

    Web API 設計標準

    OpenAPI Specification 規約を利用するに当たり、想定する Web API の設計ルールをまとめる。このルールに必ずしも準じる必要は無いが、このような設計を暗黙的に考慮し OpenAPI Specification 規約を作成している。

    HTTP メソッド

    実現したい操作により、以下のような使い分けを想定する。HEAD(リソースの存在チェック)、GET(参照)、POST(新規作成)、PUT(更新)、PATCH(一部更新)、DELETE(削除)。

    HTTP ステータス

    RFC 7231で定義されているレスポンスステータスコードを利用します。

    RFC9205日本語訳)の方針に原則則る。ユースケース別に利用すべき HTTP ステータスコードを記載します。

    共通

    • バリデーションエラー:400 Bad Request
    • 業務エラー:400 Bad Request
    • 認証エラー:401 Unauthorized
    • 認可エラー:403 Forbidden
    • システムエラー:500 Internal Server Error

    GET

    • 正常系:200 OK
      • 検索系 API で結果 0 件の場合も、 200 OK を返すとする
    • パスキー検索系 API で対象リソースが存在しないエラー:404 Not Found

    POST

    • 正常系(同期):201 Created
    • 正常系(非同期):202 Accepted
    • 一意制約違反エラー:409 Conflict
    • 親リソースが存在しないエラー:404 Not Found

    PUT

    • 正常系(同期):200 OK
    • 正常系(非同期):202 Accepted
    • 対象リソースが存在しないエラー:404 Not Found

    DELETE

    • 正常系:204 No Content
      • もし、削除した項目の情報を応答する場合は 200 OK とする
    • 対象リソースが存在しないエラー:404 Not Found

    API バージョン管理

    • /v1, /v2 といったパスで表現する
    • 型名変更、必須パラメータの追加、レスポンスの桁数変更、などをするときはバージョンを上げることを検討する

    パラメータの命名

    boolean 型である場合、 [a-zA-Z0-9-_]+_flag という命名は非推奨とする。

    is_[a-zA-Z0-9-_]+has_[a-zA-Z0-9-_]+ などの命名を代わりに検討する

    ',22)]))}const f=a(l,[["render",r]]);export{p as __pageData,f as default}; diff --git a/assets/documents_forOpenAPISpecification_OpenAPI_Specification_2.0.md.CL9CUyuq.js b/assets/documents_forOpenAPISpecification_OpenAPI_Specification_2.0.md.CL9CUyuq.js new file mode 100644 index 00000000..62337e7b --- /dev/null +++ b/assets/documents_forOpenAPISpecification_OpenAPI_Specification_2.0.md.CL9CUyuq.js @@ -0,0 +1,426 @@ +import{_ as t,c as k,G as i,a3 as a,b as r,w as n,a4 as E,B as l,o as p,a as d}from"./chunks/framework.BDUoXecB.js";const A=JSON.parse('{"title":"OpenAPI Specification 2.0規約","description":"","frontmatter":{"sidebarDepth":4,"title":"OpenAPI Specification 2.0規約","author":"フューチャー株式会社","head":[["meta",{"name":"keywords","content":"OpenAPI,Swagger,命名規約,コーディング規約"}]]},"headers":[],"relativePath":"documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md","filePath":"documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md"}'),c={name:"documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md"};function g(y,s,o,b,u,m){const e=l("page-title"),h=l("Mermaid");return p(),k("div",null,[i(e),s[1]||(s[1]=a(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。 ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。 また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    OpenAPI Specification 2.0(Swagger, OAS2)定義についてのコーディング規約をまとめます。より新しいバージョンとして OAS 3.0.3 規約(作成中)がありますので、ご注意ください。

    本規約の前提条件に従い作成されています。ToC 向けの LSUDs(Large Set of Unknown Developers)な Web API にはマッチしない可能性があります。

    Web API 自体の設計については範囲外としますが、API 設計標準に利用するステータスコードなどは記載しています。

    免責事項

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせた開発手法が採用されている。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している

    ファイルフォーマット

    ファイルフォーマット規約に準じる。

    要素規約

    Swagger の基本構造は以下の、swagger・info・host・basePath・schemes・paths・definitions から構成される。

    要素の並び順は、原則 OpenAPI Specification 2.0(Swagger, OAS2) に記載された順番に記載する。

    yaml
    swagger: "2.0"
    +info:
    +  title: サンプルAPI
    +  description: サンプルAPIはシステムにおけるユーザーのアカウント、契約、支払い、注文履歴などを管理できます
    +  version: 1.0.0
    +host: api.example.com
    +basePath: /v1
    +schemes:
    +  - https
    +consumes:
    +  - application/json
    +produces:
    +  - application/json
    +tags:
    +  - name: user
    +    description: ユーザー
    +paths:
    +  /users/{user_id}/account:
    +    get:
    +      tags:
    +        - user
    +      summary: API-001 ユーザーアカウント取得
    +      description: ユーザーのアカウント情報を取得します
    +      operationId: getUserAccount
    +      parameters:
    +        - name: user_id
    +          in: path
    +          type: string
    +          pattern: ^[0-9a-zA-Z_-]*$
    +          minLength: 4
    +          maxLength: 16
    +          required: true
    +          description: 登録時に設定されたユーザーID
    +      responses:
    +        "200":
    +          description: OK
    +          schema:
    +            $ref: "#/definitions/UserAccount"
    +        "400":
    +          description: パラメータ不正
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "404":
    +          description: リソースが存在しない
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "500":
    +          description: 内部エラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +        default:
    +          description: その他予期せぬエラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +definitions:
    +  UserAccount:
    +    required: [user_id, user_name, account_type, register_at]
    +    properties:
    +      user_id:
    +        type: string
    +        description: ユーザーID
    +        minLength: 4
    +        maxLength: 16
    +        example: 32AB1aaad100eavV
    +      user_name:
    +        type: string
    +        description: ユーザー名
    +        minLength: 1
    +        maxLength: 128
    +        example: 未来太郎
    +      account_type:
    +        type: string
    +        description: アカウント種別(1:ゲスト 2:登録済み 3:プレミアム 4:管理者)
    +        minLength: 1
    +        maxLength: 1
    +        example: "1"
    +      register_at:
    +        type: string
    +        description: 登録日時
    +        format: date-time
    +        example: "2023-04-01T11:30:45.000Z"

    swagger

    • 2.0 固定とする

    info

    info オブジェクトには Web API に関するメタデータを記載する。 title, description, version を必須項目とする。

    フィールド名必須記載内容
    titleWeb API の総称
    descriptionWeb API の簡単な説明
    versionOpenAPI ドキュメントのバージョン
    termsOfService利用規約の URL
    contact連絡先情報
    licenseライセンス情報

    title

    WebAPI の総称を記載する。システム名やサービス名 + API のような命名とすることを推奨する。 例. X System API

    desctiption

    Web API が提供する機能の概要・想定する利用者やユースケース・制約などを記載する。

    version

    この API 仕様のドキュメントのバージョンを記載する。アプリケーションのバージョン(git tag やリリースで管理するようなバージョン)とは別である。

    本規約の推奨は major.minor 形式である。 0.1 固定で開発を進め、サービスのリリース時に 1.0 とし、その後の項目やオプション、パスの追加ごとに 1.1 などインクリメントしていく。もし他チームへのドキュメントの頻繁な共有が必要だれば、1.0 のかわりに 2023.03.26 といった形式も許容する。

    host

    OpenAPI 3 系と異なり、 Swagger では複数のホストを指定できない。そのため host には開発環境(local, develop, staging, production というステージ区別であれば、develop)で用いる IP、ポート番号を指定する。他チームに提供するサンドボックス環境を用意する場合は、そのエンドポイントを指定しても良い。localhost などのローカル開発への向き先変更は、ツール側で対応している事が多く上書き可能なため記載しない。API 定義書は予期せぬタイミングで他チームに展開する必要がしばしばあり、お試しで触っても良い環境があることを示すことで情報量を増やし、円滑なコミュニケーションを促進することを狙いとする。

    yaml
    # OK
    +host: dev.api.example.com:80
    +host: sandbox.api.example.com:80
    +
    +# NG(ローカル開発で用いる環境を指定する)
    +host: localhost:8001
    +
    +# NG(LSUDs向けのWeb API開発では不用意に本番環境を触られたくないときが多く、避けるべきである)
    +host: prod.api.example.com:80

    basePath

    作成する Swagger 定義の URL パスの全てで、共通するプレフィックスを持つ場合に指定する。Swagger の仕様上、先頭には / が必須であるため、以下のように定義する。

    yaml
    # OK
    +basePath: /v1
    +basePAth: /api/v2
    +
    +# NG
    +basePath: v2

    schemes

    最終的に利用するスキーマのみを記載する。通常、HTTP 通信での Web API 提供は行わないと考えられるため、 https 固定で設定する。ローカル開発では http を指定することも多いが、ツールで生成されたコードのオプションで通常書き換えが可能なため、http の併記は許可しない。ただし、サーバサイドのマイクロサービス同士の通信で、VPC(プライベートセグメント)内であり、SSL 通信を本当に利用しない場合は http と記載する。

    yaml
    # OK
    +schemes:
    +  - https
    +
    +# NG(httpの指定は通常、Web APIサーバアプリケーションの開発時を除いて不要であるためわざわざ追加しない)
    +schemes:
    +  - http
    +  - https

    もし、WebSocket スキームを提供するサービスの定義である場合は、wss を(追加で)指定する。定義上は https 側との共存ができないため、ファイル定義を分けるようにする。

    security, securityDefinitions

    Swagger では、次の認証タイプを記載できる(詳細)。

    1. ベーシック認証
    2. API キー(リクエストヘッダ, クエリパラメータ)
    3. OAuth2

    もし、認証が必須であれば記載する。全ての Web API で未認証を受け入れる場合は記載しない。認証の要否が API ごとに異なる場合は、各 API 側で security: [] と記載しして上書き定義する必要がある。

    yaml
    # OK
    +securityDefinitions:
    +  OAuth2:
    +    type: oauth2
    +    flow: accessCode
    +    authorizationUrl: https://example.com/authorize
    +    tokenUrl: https://example.com/.well-known/jwks.json
    +
    +# OK(OAuth2認証ありの場合)
    +paths:
    +  /users/{user_id}/account:
    +    get:
    +      ...
    +      security:      # 認証が不要な場合は security: [] と記載する
    +        - OAuth2: []

    produces

    Web API が応答する際の MIME タイプを指定します。未指定の場合に、コード生成などツール側で予期しない動作をすることがあるため、固定で指定する。新規構築の Web API であれば application/xml は不要と通常は考えられるので、application/json を記載する。また、RFC 7807 Problem Details for HTTP APIs では Content-Type に application/problem+json を設定するとあるが、一部のコード生成ツールにおいて、 application/problemapplication/problem+json の使い分けが難しいため、併記を必須としない。OpenAPI Specification の 3 系ではステータスコードごとに Content-Type を指定できるため、3 系への移行も検討する。

    yaml
    # OK(applicaton/problem+json 無しでも良い)
    +produces:
    +  - application/json
    +
    +# OK(利用するツールで複数のContent-Typeの使い分けが実現しやすい場合は以下でも良い)
    +produces:
    +  - application/json
    +  - application/problem+json

    ある API のみ、バイナリ(画像データなど)を返すなどのケースがあれば、 paths 配下で上書き指定する。

    yaml
    paths:
    +  /logo:
    +    get:
    +      summary: API-002 ロゴ画像を取得する
    +      description: サービスのロゴ画像をpng形式で取得します
    +      operationId: getLogoImage
    +      produces:
    +        - image/png
    +      responses:
    +        "200":
    +          description: OK
    +          schema:
    +            type: file

    consumes

    Web API が要求を受け入れる際の MIME タイプを指定する。未指定の場合に、コード生成などツール側で予期しない動作をすることがあるため、固定で指定する。新規構築の Web API であれば application/xml は不要と通常は考えらえるので、application/json だけ記載する。

    仕様上、 consumes は POST, PUT, PATCH を利用した操作のみに影響し、GET などリクエストボディが無い操作では無視される。

    yaml
    # OK
    +consumes:
    +  - application/json

    tags

    タグを用いて、API 操作をグループ化することができる。ドキュメントやツールにとって非常に重要であるため、 必須 で指定する。

    • Swagger UI(HTML ドキュメント)の順序を制御できる
      • 未指定の場合は、登場順で生成されてしまう
    • 命名は、 単数形 で、小文字かつ半角スペース区切り で記載する
      • コード生成で利用され、Go ではパッケージ名や TypeScript の Class 単位となるため、シンプルな命名にする
      • HTML ドキュメントで参照する場合の可読性を上げるため、単語を半角スペース区切りとする
    • タグごとに description も必須で記載する
    yaml
    # NG
    +tags:
    +  - name: product
    +    description: 製品
    +  - name: store
    +    description: 店舗
    +  - name: user account
    +    description: ユーザーアカウント
    +
    +# NG
    +tags:
    +  - name: products
    +  - name: stores
    +  - name: user_account
    +  - name: UserAccount

    paths

    paths 配下に個々の API エンドポイントを記載する。

    paths は根幹となる定義部分であり、以下のように重要な定義が続く。それぞれ重要な要素ごとに規約を示す。

    sh
    Paths              # API定義全体
    + Path           # URLパス
    + Operation    # HTTPメソッド
    + Parameter  # リクエストパラメータ
    + Responses  # レスポンス
    + Response # ステータスコードに応じたレスポンス

    Paths > Path

    記載順は以下のルールである。

    • トップレベルの tags でグルーピングした順番に記載する
    • URL は短いものから並べる
    • HTTP メソッドは、 head, get, post, put, patch, delete の順にする
    yaml
    # 並び順の例(HTTPメソッドの子要素はtags以外を省略)
    +tags:
    +  - user
    +  - item
    +paths:
    +  /users:
    +    get:
    +      tags:
    +        - user
    +      ...
    +  /users/{user_id}/account:
    +    get:
    +      tags:
    +        - user
    +      ...
    +  /users/{user_id}/account:
    +    patch:
    +      tags:
    +        - user
    +      ...
    +  /items:
    +    get:
    +      tags:
    +        - item
    +      ...

    Paths > Path > Operation

    URL に紐づく HTTP メソッドで、1 つの操作を定義します。

    • summary
      • API の操作概要を summary に記載する
      • 機能 ID があるのでれば、ここに記載する
      • 例: API-001 ユーザアカウント取得
    • description
      • API の振る舞いの詳細や注意点(ある条件で区分の値が変わったり、権限についての注意、要素が空になるなど)を記載する
    • operationId
      • コード生成で利用される項目なので、必須で指定する
      • 原則、camelCase\${HTTPメソッド}\${機能物理名} で記載する(例: getUser, postUser, deleteUser)
        • ただし、HTTP メソッドに紐づかない操作であれば、HTTP メソッドの代わりに個別の動詞(例: searchUser, moveItemList, addPermission)を当てはめる
        • コード生成対象によっては、get_user(Python)、GetUser(Go)といった命名規約にしたくなるが、通常はコード生成側で配慮してくれる
    • consumes, produces
      • トップレベルに application/json を記載しているため、同様であれば記載しない
    yaml
    /users:
    +  get:
    +    tags:
    +      - user
    +    summary: API-001 ユーザーアカウント取得
    +    description: |
    +      ユーザーのアカウント情報を取得します。
    +      ログイン情報が不正の場合はアカウントが存在しても404を返すことがあります。
    +      アカウント種別については【別紙】X_定数一覧 を参照ください。
    +    operationId: getUser
    +    parameters: ...
    +    responses: ...

    Paths > Path > Parameter

    リクエストの定義を記載する。

    • name

      • snake_case で物理名を記載します
      • HTTP メソッドが POST/PUT/HTTP の場合は body に固定する
    • in

      • 仕様上、必須で query, header, path, formData, body のどれかを指定する
      • HTTP メソッドが HEAD/GET/DELETE の場合
        • path, query のみの利用を推奨する
      • HTTP メソッドが POST/PUT/HTTP の場合
        • body のみの利用を推奨する
    • required

      • 必須の場合のみ記載する。デフォルト false であるため、任意項目の場合は記載しない
      • POST, PUT で用いるリクエストボディに対しては、 required: true を必ず指定する
        • リクエストボディ自体が未指定だった場合、各項目の required: true を指定していてもサーバサイドのチェックが有効に働かないことがあるため
    • pattern, minLength, maxLength などの条件について

    • schema

      • リクエストボディは、$ref を用いて、#/definitions 配下に記載する。$ref を用いない記載は許可しない。
      yaml
        # OK
      +  - name: body
      +    in: body
      +    required: true
      +    schema:
      +      $ref: "#/definitions/PutUserAccount"
      +
      +  # NG
      +  - name: body
      +    in: body
      +    required: true
      +    type: object
      +    required: [user_name, account_type, register_at, point]
      +    properties:
      +      user_name:
      +        type: string
      +        ...
      +      account_type:
      +        type: string
      +        ...
      • モデル名は、 {HTTPメソッド名}{物理名} の PascalCase で記載する
        • 例: PutUserAccount、PostUserAccount, PatchUserAccount
    • desription

      • 項目の論理名や補足説明を記載する
    yaml
      /users/{user_id}/account:
    +    get:
    +      ...
    +      parameters:
    +        - name: user_id
    +          in: path
    +          type: string
    +          pattern: ^[0-9a-zA-Z_-]*$
    +          minLength: 4
    +          maxLength: 16
    +          required: true
    +          description: 登録時に設定されたユーザーID
    +      responses:
    +        ...
    +    put:
    +      ...
    +      parameters:
    +        - name: user_id
    +          in: path
    +          type: string
    +          pattern: ^[0-9a-zA-Z_-]*$
    +          minLength: 4
    +          maxLength: 16
    +          required: true
    +          description: 登録時に設定されたユーザーID
    +        - name: body
    +          in: body
    +          required: true
    +          schema:
    +            $ref: "#/definitions/PutUserAccount"
    +      responses:
    +        ...

    Paths > Path > Responses

    レスポンスの定義を記載する。

    • description
      • 必須で記載する
    • ステータスコードは発生し得る全てのパターンを列挙する
      • 正常系の 200 OK201 Created202 Accepted 204 No Content 以外の、異常系も忘れず記載する
      • 通常発生しない、サーバサイドの内部的な予期せぬエラー 500 Internal Server Error は必須で記載する
      • リクエストパラメータが存在する場合は 400 Bad Request が、認証がある場合は 401 Unauthorized403 Forbiddend が考えられる
      • default は必須で指定する
        • 例えば、URL 自体が存在しない場合の 404 NotFound や、提供していない HTTP メソッドを呼び出した場合に 405 Method Not Allowed を、自動生成したサーバサイドの実装が返すことがある。この場合、 default を指定していないとフロントエンド側でパースエラーとなることがあるため。各 API エンドポイントのサーバサイド側の実装が応答しないコードは、 default でまとめて指定させる
    yaml
      /users/{user_id}/account:
    +    get:
    +      ...
    +      parameters:
    +        ...
    +      responses:
    +        "200":
    +          description: OK
    +          schema:
    +            $ref: "#/definitions/Users"
    +        "400":
    +          description: パラメータ不正
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "404":
    +          description: リソースが存在しない
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "500":
    +          description: 内部エラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +        default:
    +          description: その他予期せぬエラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +    post:
    +      ...
    +      parameters:
    +        ...
    +      responses:
    +        "201":
    +          description: 新規登録に成功
    +          schema:
    +            $ref: "#/definitions/UserAccount"
    +        "400":
    +          description: パラメータ不正
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "409":
    +          description: すでに登録済みのユーザーIDを用いている
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "500":
    +          description: Internal Server Error
    +          schema:
    +            $ref: "#/definitions/Error"
    +        default:
    +          description: "その他予期せぬエラー"
    +          schema:
    +            $ref: "#/definitions/Error"

    definitions

    • モデル名は、PascalCase で記載する

    • 種別が配列の場合、ネストして定義するのではなく、 $ref を活用する

    • もし、リソース名が単複同形で type: array と区別できない場合、 List を末尾に付けて区別する

      • そうではない場合は s を付けて表現する
      yml
      # OK
      +- in: query
      +  name: product_types
      +  type: array
      +  description: プロダクト種別
      +
      +# NG
      +- in: query
      +  name: product_type_list # xxx_listはNG
      +  type: array
      +  description: プロダクト種別
    • リクエストボディ

      • 必須項目は required で項目を全て指定する
      • その他、項目定義として可能であればできる限り細かく指定する
    • レスポンスボディ

      • type, description, exampleが必須。
      • format, minLength, maxLength などの型桁はできる限り細かく指定する
        • 多くのクライアントは RDB をデータストアに持ち、それらの型定義の参考にするためである
      • enum指定してはならない
        • 一部のクライアント側のコード生成で、存在しない区分値を指定するとエラーになる(レスポンスを受信できない)。これはサーバサイドで区分値を増やす必要があるケースで、サーバ・クライアントの同期をとる必要があり困難なケースが多い。例えばクライアントがモバイルである場合、サーバサイドで区分値を追加した場合には、全端末でアプリアップデートが必要となリ、事実上 API 互換性がなくなるため、v1 を保持しつつ、区分値を追加した v2 の Path を追加する必要が出てくる
      • pattern の指定は不要
        • pattern も enum と同様に、サーバサイドが当初よりリクエストのバリデーションを緩めた場合に、古い pattern でクライアントがレスポンスを検証すると動作しなくなるため。クライアントサイドが RDB など書き込み時のスキーマが厳密であったとしても、正規表現レベルの厳格さで書き込みチェックをすることは無いと考えられる
      • example の値は、 例えば Prism でサーバのモックとして動かす場合に返される値になるため、できる限り具体的な値にする
      • 空文字、false, 0 値を返しうる項目に、x-omitempty :false を付与する
        • ツールの実装によっては、0 値や false を返した場合に JSON フィールドから除外される(omit される)ことがある
    • 日付は 2023-04-02 といった ISO 8601 date フォーマットを推奨する。この場合は fromat: date を指定する

    • 日時は 2023-04-02T15:04:05+09:00 といった ISO 8601 datetime フォーマットを推奨する。この場合は、 format: date-time を指定する

    • エラーについて

      • API 全体で一貫したエラーを返すことを推奨とし、そのために "#/definitions/Error" といった共通のエラーモデルを利用を推奨する
      • RFC 7807 Problem Details for HTTP APIs があるため、レイアウトを参考にする
    yaml
    definitions:
    +  UserAccounts:
    +    type: array
    +    items:
    +      $ref: "#/definitions/UserAccount"
    +  UserAccount:
    +    required: [user_id, user_name, account_type, register_at, point]
    +    properties:
    +      user_id:
    +        type: string
    +        description: ユーザーID
    +        minLength: 4
    +        maxLength: 16
    +        example: 32AB1aaad100eavV
    +      user_name:
    +        type: string
    +        description: ユーザー名
    +        minLength: 1
    +        maxLength: 128
    +        example: 未来太郎
    +      account_type: # enumは指定しないこと
    +        type: string
    +        description: アカウント種別(1:ゲスト 2:登録済み 3:プレミアム 4:管理者)
    +        minLength: 1
    +        maxLength: 1
    +        example: "1"
    +      register_at:
    +        type: string
    +        format: date-time
    +        description: 登録日時
    +        example: "2023-04-01T11:30:45.000Z"
    +      point:
    +        type: integer
    +        format: int64
    +        description: ポイント(0ポイント以上)
    +        exampe: 421
    +  PostUserAccount:
    +    required: [user_id, user_name, account_type, register_at]
    +    properties:
    +      user_id:
    +        type: string
    +        minLength: 4
    +        maxLength: 16
    +        pattern: ^[0-9a-zA-Z_-]*$
    +        description: ユーザーID
    +        example: 32AB1aaad100eavV
    +      user_name:
    +        type: string
    +        minLength: 1
    +        maxLength: 128
    +        description: ユーザー名
    +        example: 未来太郎
    +      account_type:
    +        type: string
    +        minLength: 1
    +        maxLength: 1
    +        enum: ["1", "2", "3", "4"]
    +        description: アカウント種別(1:ゲスト 2:登録済み 3:プレミアム 4:管理者)
    +        example: "1"
    +      register_at:
    +        type: string
    +        format: date-time
    +        description: 登録日時
    +        example: "2023-04-01T11:30:45.000Z"
    +  Error:
    +    description: エラー (RFC 7807)
    +    type: object
    +    required: [title, status, detail]
    +    properties:
    +      title:
    +        type: string
    +        description: タイトル
    +        minLength: 1
    +        maxLength: 64
    +        example: request validation error
    +      status:
    +        type: integer
    +        format: int32
    +        description: HTTPステータスコード
    +        minimum: 400
    +        maximum: 600
    +        exclusiveMaximum: true
    +        example: 503
    +      message_cd:
    +        type: string
    +        description: 状態の切り分けとアクションが一意に特定できるメッセージコード
    +        minLength: 1
    +        maxLength: 16
    +        example: APPERR-0001
    +      detail:
    +        type: string
    +        description: エラーメッセージ詳細
    +        minLength: 1
    +        maxLength: 128
    +        example: user name is too long

    バリデーションについて

    OpenAPI 定義を記載するにあたり、バリデーションをどこまで厳密に定義すべきかという議論はよく行いがちである。

    リクエストパラメータの各項目に対して、必須・型・桁・区分値・日付・正規表現のチェックが行える。レスポンスで用いるモデルについても同様に設定でき、enum, pattern 以外は API の利用者(クライアント)側の DB 設計などに必要な型桁情報を渡すのに有用であるため、できる限り詳しく指定する。

    必須

    必須パラメータのみ required: true を定義する

    デフォルト値

    パラメータにデフォルト値がある場合はdefault を定義する。

    yaml
    # ex. enum
    +name: limit
    +type: number
    +format: integer
    +minimum: 1
    +maximum: 100
    +default: 20
    +description: 検索結果の項目数上限(1~100が指定可能)

    【注意】API 公開後に、default 値を変更してはならない(API の互換性が崩れるため)。もし変更する場合は、API のバージョンを上げること。

    型・フォーマット

    型(type)は string(文字列), number(数値), integer(整数値), boolean(真偽値) array(配列), file(ファイル) のうちどれか指定する.

    フォーマット(format) は以下の型の詳細情報を示すもので、可能な限り設定する。

    • integer (整数)
      • int32, int64
    • number (数値)
      • float, double
    • string (バイナリ)
      • byte: Base64 でエンコードされた文字列
      • binary: バイト配列
    • string (日付)
      • date: RFC3339 full-date(例: 2023-07-21)
        • 項目名は _on を接尾辞につけることを推奨とする
      • date-time: RFC3339 date-time(例: 2023-07-21T17:32:28Z)
        • 項目名は _at を接尾辞につけることを推奨とする
    • string (その他)
      • password: Swagger UI で入力が隠される
      • その他、 email, uuid など Open API 仕様に存在しない任意のフォーマットを独自のドキュメント生成などのために記載しても良い

    データ型によって、利用できる桁を指定する項目が異なる。可能な限り設定する。

    • 文字列
      • 最大桁数:maxLength
      • 最小桁数:minLength
    • 数値または整数値
      • 最小値(境界値を含む):minimum
      • 最大値(境界値を含む):maximum
      • 境界値を含まない場合のみexclusiveMinimum: trueまたはexclusiveMaximum: trueを定義する。minimum, maximum で代用できる場合は利用しない
    • 配列:
      • 最大要素数:maxItems
      • 最小要素数:minItems
      • required: trueの場合は原則としてminItems: 1を定義する
      • uniqueItems は必須で指定する(通常は一意であるべき)

    【注意】API 公開後に、レスポンスの maxLength を以前より大きい値に変更してはならない。レスポンスの maxLength など API 利用者側システムの DB の ERD 定義のインプットになる事が多いため。もし行う場合は API のバージョンを上げることや、連携先に桁数変更の旨を調整するなどの考慮を行う。

    区分値

    区分値の場合は enum 属性を利用し、descriptionには区分値の論理名を記載する。

    yaml
    name: gender
    +type: string
    +enum: ["0", "1", "2", "9"]
    +description: |
    +  性別
    +    0: 不明
    +    1: 男
    +    2: 女
    +    9: 適用不能

    固定値

    固定値 の場合も enum を 1 つだけ指定して表現する。この場合もレスポンスで利用する場合は指定しない

    yaml
    name: file_layout
    +type: string
    +enum: ["json"]
    +description: ファイルレイアウト

    その他(正規表現)

    正規表現で表現できる文字列はpatternを利用して定義する。桁や区分値で代替できる場合は、pattern を用いない

    例:

    yaml
    remind_time:
    +  type: string
    +  description: リマインド時刻。(hh:mm)形式
    +  example: 23:59
    +  pattern: "^(2[0-3]|[01][0-9]):([0-5][0-9])$"

    ファイルアップロード

    Web API におけるファイルアップロードのよく利用される実装手段は、大きく分けて以下の 3 手法に分類できます

    1. ファイルのコンテンツを Base64 などにエンコードして、JSON の項目として設定し、リクエストボディで送る
      • メリット: 通常の JSON を扱うのとほぼ変わらないため楽。サムネイルなど限定されたユースケースの場合に向く
      • デメリット: 巨大なファイルを扱う場合などサーバリソース負荷が懸念。Base64 に変換する分 CPU 負荷は余計にかかる。ペイロードが膨れるためモバイルなどのクライアントでは帯域利用での懸念がある
    2. multipart/form-data ファイルを送信する
      • メリット: ファイルを Base64 に変換するといった作業が不要
      • デメリット: ブラウザ以外のクライアントにとって手間がかかる
    3. アップロード用に用いる、オブジェクトストレージの Signed URL を発行し、クライアントから直接ファイルをアップロードしてもらう

    本規約でファイルアップロードについて上記の 3. Signed URL を推奨する。API 呼び出しとしては次のようなフローとする。

    `,107)),(p(),r(E,null,{default:n(()=>[i(h,{id:"mermaid-1038",class:"mermaid",graph:"sequenceDiagram%0Aparticipant%20A%20as%20%E3%82%AF%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%B3%E3%83%88%0Aparticipant%20B%20as%20Web%20API%E3%82%B5%E3%83%BC%E3%83%90%0Aparticipant%20C%20as%20%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%B9%E3%83%88%E3%83%AC%E3%83%BC%E3%82%B8%0A%0AA-%3E%3EB%3A%20%E2%91%A0%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E5%85%88URL%E5%8F%96%E5%BE%97%0A%20%20B-%3E%3EC%3A%20Signed%20URL%E7%99%BA%E8%A1%8C%0A%20%20C--%3E%3EB%3A%20Signed%20URL%0A%20%20B--%3E%3EA%3A%20%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89URL%E3%80%81%E5%8F%97%E4%BB%98ID%EF%BC%88%E5%8A%A0%E3%81%88%E3%81%A6%E3%80%81%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E3%81%A7%E6%8C%87%E5%AE%9A%E3%81%97%E3%81%9F%E3%81%84HTTP%20Method%E3%82%84%E5%BF%85%E8%A6%81%E3%81%AA%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%83%98%E3%83%83%E3%83%80%E3%83%BC%E3%81%8C%E3%81%82%E3%82%8C%E3%81%B0%E5%BF%9C%E7%AD%94%E3%81%AE%E9%A0%85%E7%9B%AE%E3%81%AB%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B%EF%BC%89%0A%0AA-%3E%3EC%3A%20%E2%91%A1%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%0A%0AA-%3E%3EB%3A%20%E2%91%A2%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E5%AE%8C%E4%BA%86(%E5%8F%97%E4%BB%98ID%E3%80%81%E3%82%AD%E3%83%BC%E3%80%81%E5%B1%9E%E6%80%A7)%0A%20%20B--%3E%3EA%3A%20%E5%8F%97%E4%BB%98%E5%AE%8C%E4%BA%86%0A"})]),fallback:n(()=>s[0]||(s[0]=[d(" Loading... ")])),_:1})),s[2]||(s[2]=a(`

    フローの ①、② はアプリケーション固有の紐づけルールにおいて Web API を設計すれば良いため、本規約で YAML の設定例は記載しない。フロー ② については Signed URL を用いたアップロードであり、アプリケーションの Web API 定義を書く必要はない。もし、監査ログなどのガバナンス上、直接オブジェクトストレージへの書き込みを許容されないケースは、B で Signed URL に相当する書き込み先を提供し、B を経由してファイルをアップロードする。

    上記どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    ファイルダウンロード

    ファイルアップロードと同様、オブジェクトストレージの Signed URL 経由を経由してのダウンロードさせる手法を推奨する。Web API としてはオブジェクトストレージにダウンロード用のファイルを書き込み、クライアントが取得するための Signed URL をレスポンスの JSON 項目に渡す方式である。

    もし、サムネイルやアイコン画像など、ファイル容量がごく小さい場合は Base64 にエンコードして JSON に埋め込んで渡しても良い。線引をどこに設置するかは本規約で定義しない。

    どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    CORS

    CORS(Cross-Origin Resource Sharing)のために、options メソッドの追記は 原則不要 とする。

    理由は以下である。

    • サーバ側
      • options メソッド対応は、API 使用ではなく実装レベルの機能横断的な処理(Java における Servlet Filter や Spring の Interceptor、Go における Middleware など)で行うことが大半であり、コード生成が不要
    • クライアント側
      • options メソッドを用いるのはクライアントがブラウザであり、クライアントのアプリケーションコードが明示的にアクセスしないため、コード生成が不要
    • 使用面として
      • Access-Control-Allow-Origin がどのような値を返すか、呼び出し元によって動的な値を返したい場合があり、記載が困難なケースがある

    ただし、Amazon API Gateway のようなサービスを利用する場合は、options メソッドの記載が必須である場合は除く[1]

    OpenTelemetry Traceparent HTTP Header

    OpenOpenTelemetry で用いるられるtraceparent のリクエストヘッダーは OpenAPI で 原則不要 とする。

    理由は以下である。

    • OpenTelemetry が定めるヘッダー類は、API 横断的に設定されるべきものであり、ミドルウェアやフレームワーク側などでの一律の制御を推奨するため
    • 記載することにより、OpenOpenTelemetry に対応していることを明記し開発者に周知できるメリットより、各アプリ開発者が生成されたコードで悩んだり、誤解されることを回避したいため

    API のバージョン管理

    Swagger 定義で以下の変更を行う場合は、利用するコード生成の動作によってはクライアントにとって互換性を失う破壊的変更であることがあるため、変更は調整の上で行うか、バージョンを上げることを考える。

    • リクエスト項目
      • フィールドの型を変更する
      • 桁数を小さくする
      • enum の種類を減らす
      • 正規表現のチェックを厳しくする
      • 必須フィールドを後から追加する
      • デフォルト値を後から変更する
    • レスポンス項目
      • フィールドの型を変更する
      • 桁数を大きくする
      • デフォルト値を後から変更する

    ファイル単位

    TODO v3 の作成タイミングと合わせて追記する

    推奨ツール

    本当に使ってよかった OpenAPI (Swagger) ツール にあるように、様々なツールで開発ができる。VS Code を用いる場合は以下のプラグインを推奨する。

    editorconfig を用いる場合は、以下の定義を推奨する。

    ini
    root = true
    +
    +[*]
    +charset = utf-8
    +insert_final_newline = true
    +trim_trailing_whitespace = true
    +end_of_line = lf
    +
    +[*.{json,yaml}]
    +indent_size = 2
    +indent_style = space

    License

    CC-By-4.0


    1. https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/enable-cors-for-resource-using-swagger-importer-tool.html ↩︎

    `,30))])}const C=t(c,[["render",g]]);export{A as __pageData,C as default}; diff --git a/assets/documents_forOpenAPISpecification_OpenAPI_Specification_2.0.md.CL9CUyuq.lean.js b/assets/documents_forOpenAPISpecification_OpenAPI_Specification_2.0.md.CL9CUyuq.lean.js new file mode 100644 index 00000000..62337e7b --- /dev/null +++ b/assets/documents_forOpenAPISpecification_OpenAPI_Specification_2.0.md.CL9CUyuq.lean.js @@ -0,0 +1,426 @@ +import{_ as t,c as k,G as i,a3 as a,b as r,w as n,a4 as E,B as l,o as p,a as d}from"./chunks/framework.BDUoXecB.js";const A=JSON.parse('{"title":"OpenAPI Specification 2.0規約","description":"","frontmatter":{"sidebarDepth":4,"title":"OpenAPI Specification 2.0規約","author":"フューチャー株式会社","head":[["meta",{"name":"keywords","content":"OpenAPI,Swagger,命名規約,コーディング規約"}]]},"headers":[],"relativePath":"documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md","filePath":"documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md"}'),c={name:"documents/forOpenAPISpecification/OpenAPI_Specification_2.0.md"};function g(y,s,o,b,u,m){const e=l("page-title"),h=l("Mermaid");return p(),k("div",null,[i(e),s[1]||(s[1]=a(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。 ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。 また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    OpenAPI Specification 2.0(Swagger, OAS2)定義についてのコーディング規約をまとめます。より新しいバージョンとして OAS 3.0.3 規約(作成中)がありますので、ご注意ください。

    本規約の前提条件に従い作成されています。ToC 向けの LSUDs(Large Set of Unknown Developers)な Web API にはマッチしない可能性があります。

    Web API 自体の設計については範囲外としますが、API 設計標準に利用するステータスコードなどは記載しています。

    免責事項

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせた開発手法が採用されている。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している

    ファイルフォーマット

    ファイルフォーマット規約に準じる。

    要素規約

    Swagger の基本構造は以下の、swagger・info・host・basePath・schemes・paths・definitions から構成される。

    要素の並び順は、原則 OpenAPI Specification 2.0(Swagger, OAS2) に記載された順番に記載する。

    yaml
    swagger: "2.0"
    +info:
    +  title: サンプルAPI
    +  description: サンプルAPIはシステムにおけるユーザーのアカウント、契約、支払い、注文履歴などを管理できます
    +  version: 1.0.0
    +host: api.example.com
    +basePath: /v1
    +schemes:
    +  - https
    +consumes:
    +  - application/json
    +produces:
    +  - application/json
    +tags:
    +  - name: user
    +    description: ユーザー
    +paths:
    +  /users/{user_id}/account:
    +    get:
    +      tags:
    +        - user
    +      summary: API-001 ユーザーアカウント取得
    +      description: ユーザーのアカウント情報を取得します
    +      operationId: getUserAccount
    +      parameters:
    +        - name: user_id
    +          in: path
    +          type: string
    +          pattern: ^[0-9a-zA-Z_-]*$
    +          minLength: 4
    +          maxLength: 16
    +          required: true
    +          description: 登録時に設定されたユーザーID
    +      responses:
    +        "200":
    +          description: OK
    +          schema:
    +            $ref: "#/definitions/UserAccount"
    +        "400":
    +          description: パラメータ不正
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "404":
    +          description: リソースが存在しない
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "500":
    +          description: 内部エラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +        default:
    +          description: その他予期せぬエラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +definitions:
    +  UserAccount:
    +    required: [user_id, user_name, account_type, register_at]
    +    properties:
    +      user_id:
    +        type: string
    +        description: ユーザーID
    +        minLength: 4
    +        maxLength: 16
    +        example: 32AB1aaad100eavV
    +      user_name:
    +        type: string
    +        description: ユーザー名
    +        minLength: 1
    +        maxLength: 128
    +        example: 未来太郎
    +      account_type:
    +        type: string
    +        description: アカウント種別(1:ゲスト 2:登録済み 3:プレミアム 4:管理者)
    +        minLength: 1
    +        maxLength: 1
    +        example: "1"
    +      register_at:
    +        type: string
    +        description: 登録日時
    +        format: date-time
    +        example: "2023-04-01T11:30:45.000Z"

    swagger

    • 2.0 固定とする

    info

    info オブジェクトには Web API に関するメタデータを記載する。 title, description, version を必須項目とする。

    フィールド名必須記載内容
    titleWeb API の総称
    descriptionWeb API の簡単な説明
    versionOpenAPI ドキュメントのバージョン
    termsOfService利用規約の URL
    contact連絡先情報
    licenseライセンス情報

    title

    WebAPI の総称を記載する。システム名やサービス名 + API のような命名とすることを推奨する。 例. X System API

    desctiption

    Web API が提供する機能の概要・想定する利用者やユースケース・制約などを記載する。

    version

    この API 仕様のドキュメントのバージョンを記載する。アプリケーションのバージョン(git tag やリリースで管理するようなバージョン)とは別である。

    本規約の推奨は major.minor 形式である。 0.1 固定で開発を進め、サービスのリリース時に 1.0 とし、その後の項目やオプション、パスの追加ごとに 1.1 などインクリメントしていく。もし他チームへのドキュメントの頻繁な共有が必要だれば、1.0 のかわりに 2023.03.26 といった形式も許容する。

    host

    OpenAPI 3 系と異なり、 Swagger では複数のホストを指定できない。そのため host には開発環境(local, develop, staging, production というステージ区別であれば、develop)で用いる IP、ポート番号を指定する。他チームに提供するサンドボックス環境を用意する場合は、そのエンドポイントを指定しても良い。localhost などのローカル開発への向き先変更は、ツール側で対応している事が多く上書き可能なため記載しない。API 定義書は予期せぬタイミングで他チームに展開する必要がしばしばあり、お試しで触っても良い環境があることを示すことで情報量を増やし、円滑なコミュニケーションを促進することを狙いとする。

    yaml
    # OK
    +host: dev.api.example.com:80
    +host: sandbox.api.example.com:80
    +
    +# NG(ローカル開発で用いる環境を指定する)
    +host: localhost:8001
    +
    +# NG(LSUDs向けのWeb API開発では不用意に本番環境を触られたくないときが多く、避けるべきである)
    +host: prod.api.example.com:80

    basePath

    作成する Swagger 定義の URL パスの全てで、共通するプレフィックスを持つ場合に指定する。Swagger の仕様上、先頭には / が必須であるため、以下のように定義する。

    yaml
    # OK
    +basePath: /v1
    +basePAth: /api/v2
    +
    +# NG
    +basePath: v2

    schemes

    最終的に利用するスキーマのみを記載する。通常、HTTP 通信での Web API 提供は行わないと考えられるため、 https 固定で設定する。ローカル開発では http を指定することも多いが、ツールで生成されたコードのオプションで通常書き換えが可能なため、http の併記は許可しない。ただし、サーバサイドのマイクロサービス同士の通信で、VPC(プライベートセグメント)内であり、SSL 通信を本当に利用しない場合は http と記載する。

    yaml
    # OK
    +schemes:
    +  - https
    +
    +# NG(httpの指定は通常、Web APIサーバアプリケーションの開発時を除いて不要であるためわざわざ追加しない)
    +schemes:
    +  - http
    +  - https

    もし、WebSocket スキームを提供するサービスの定義である場合は、wss を(追加で)指定する。定義上は https 側との共存ができないため、ファイル定義を分けるようにする。

    security, securityDefinitions

    Swagger では、次の認証タイプを記載できる(詳細)。

    1. ベーシック認証
    2. API キー(リクエストヘッダ, クエリパラメータ)
    3. OAuth2

    もし、認証が必須であれば記載する。全ての Web API で未認証を受け入れる場合は記載しない。認証の要否が API ごとに異なる場合は、各 API 側で security: [] と記載しして上書き定義する必要がある。

    yaml
    # OK
    +securityDefinitions:
    +  OAuth2:
    +    type: oauth2
    +    flow: accessCode
    +    authorizationUrl: https://example.com/authorize
    +    tokenUrl: https://example.com/.well-known/jwks.json
    +
    +# OK(OAuth2認証ありの場合)
    +paths:
    +  /users/{user_id}/account:
    +    get:
    +      ...
    +      security:      # 認証が不要な場合は security: [] と記載する
    +        - OAuth2: []

    produces

    Web API が応答する際の MIME タイプを指定します。未指定の場合に、コード生成などツール側で予期しない動作をすることがあるため、固定で指定する。新規構築の Web API であれば application/xml は不要と通常は考えられるので、application/json を記載する。また、RFC 7807 Problem Details for HTTP APIs では Content-Type に application/problem+json を設定するとあるが、一部のコード生成ツールにおいて、 application/problemapplication/problem+json の使い分けが難しいため、併記を必須としない。OpenAPI Specification の 3 系ではステータスコードごとに Content-Type を指定できるため、3 系への移行も検討する。

    yaml
    # OK(applicaton/problem+json 無しでも良い)
    +produces:
    +  - application/json
    +
    +# OK(利用するツールで複数のContent-Typeの使い分けが実現しやすい場合は以下でも良い)
    +produces:
    +  - application/json
    +  - application/problem+json

    ある API のみ、バイナリ(画像データなど)を返すなどのケースがあれば、 paths 配下で上書き指定する。

    yaml
    paths:
    +  /logo:
    +    get:
    +      summary: API-002 ロゴ画像を取得する
    +      description: サービスのロゴ画像をpng形式で取得します
    +      operationId: getLogoImage
    +      produces:
    +        - image/png
    +      responses:
    +        "200":
    +          description: OK
    +          schema:
    +            type: file

    consumes

    Web API が要求を受け入れる際の MIME タイプを指定する。未指定の場合に、コード生成などツール側で予期しない動作をすることがあるため、固定で指定する。新規構築の Web API であれば application/xml は不要と通常は考えらえるので、application/json だけ記載する。

    仕様上、 consumes は POST, PUT, PATCH を利用した操作のみに影響し、GET などリクエストボディが無い操作では無視される。

    yaml
    # OK
    +consumes:
    +  - application/json

    tags

    タグを用いて、API 操作をグループ化することができる。ドキュメントやツールにとって非常に重要であるため、 必須 で指定する。

    • Swagger UI(HTML ドキュメント)の順序を制御できる
      • 未指定の場合は、登場順で生成されてしまう
    • 命名は、 単数形 で、小文字かつ半角スペース区切り で記載する
      • コード生成で利用され、Go ではパッケージ名や TypeScript の Class 単位となるため、シンプルな命名にする
      • HTML ドキュメントで参照する場合の可読性を上げるため、単語を半角スペース区切りとする
    • タグごとに description も必須で記載する
    yaml
    # NG
    +tags:
    +  - name: product
    +    description: 製品
    +  - name: store
    +    description: 店舗
    +  - name: user account
    +    description: ユーザーアカウント
    +
    +# NG
    +tags:
    +  - name: products
    +  - name: stores
    +  - name: user_account
    +  - name: UserAccount

    paths

    paths 配下に個々の API エンドポイントを記載する。

    paths は根幹となる定義部分であり、以下のように重要な定義が続く。それぞれ重要な要素ごとに規約を示す。

    sh
    Paths              # API定義全体
    + Path           # URLパス
    + Operation    # HTTPメソッド
    + Parameter  # リクエストパラメータ
    + Responses  # レスポンス
    + Response # ステータスコードに応じたレスポンス

    Paths > Path

    記載順は以下のルールである。

    • トップレベルの tags でグルーピングした順番に記載する
    • URL は短いものから並べる
    • HTTP メソッドは、 head, get, post, put, patch, delete の順にする
    yaml
    # 並び順の例(HTTPメソッドの子要素はtags以外を省略)
    +tags:
    +  - user
    +  - item
    +paths:
    +  /users:
    +    get:
    +      tags:
    +        - user
    +      ...
    +  /users/{user_id}/account:
    +    get:
    +      tags:
    +        - user
    +      ...
    +  /users/{user_id}/account:
    +    patch:
    +      tags:
    +        - user
    +      ...
    +  /items:
    +    get:
    +      tags:
    +        - item
    +      ...

    Paths > Path > Operation

    URL に紐づく HTTP メソッドで、1 つの操作を定義します。

    • summary
      • API の操作概要を summary に記載する
      • 機能 ID があるのでれば、ここに記載する
      • 例: API-001 ユーザアカウント取得
    • description
      • API の振る舞いの詳細や注意点(ある条件で区分の値が変わったり、権限についての注意、要素が空になるなど)を記載する
    • operationId
      • コード生成で利用される項目なので、必須で指定する
      • 原則、camelCase\${HTTPメソッド}\${機能物理名} で記載する(例: getUser, postUser, deleteUser)
        • ただし、HTTP メソッドに紐づかない操作であれば、HTTP メソッドの代わりに個別の動詞(例: searchUser, moveItemList, addPermission)を当てはめる
        • コード生成対象によっては、get_user(Python)、GetUser(Go)といった命名規約にしたくなるが、通常はコード生成側で配慮してくれる
    • consumes, produces
      • トップレベルに application/json を記載しているため、同様であれば記載しない
    yaml
    /users:
    +  get:
    +    tags:
    +      - user
    +    summary: API-001 ユーザーアカウント取得
    +    description: |
    +      ユーザーのアカウント情報を取得します。
    +      ログイン情報が不正の場合はアカウントが存在しても404を返すことがあります。
    +      アカウント種別については【別紙】X_定数一覧 を参照ください。
    +    operationId: getUser
    +    parameters: ...
    +    responses: ...

    Paths > Path > Parameter

    リクエストの定義を記載する。

    • name

      • snake_case で物理名を記載します
      • HTTP メソッドが POST/PUT/HTTP の場合は body に固定する
    • in

      • 仕様上、必須で query, header, path, formData, body のどれかを指定する
      • HTTP メソッドが HEAD/GET/DELETE の場合
        • path, query のみの利用を推奨する
      • HTTP メソッドが POST/PUT/HTTP の場合
        • body のみの利用を推奨する
    • required

      • 必須の場合のみ記載する。デフォルト false であるため、任意項目の場合は記載しない
      • POST, PUT で用いるリクエストボディに対しては、 required: true を必ず指定する
        • リクエストボディ自体が未指定だった場合、各項目の required: true を指定していてもサーバサイドのチェックが有効に働かないことがあるため
    • pattern, minLength, maxLength などの条件について

    • schema

      • リクエストボディは、$ref を用いて、#/definitions 配下に記載する。$ref を用いない記載は許可しない。
      yaml
        # OK
      +  - name: body
      +    in: body
      +    required: true
      +    schema:
      +      $ref: "#/definitions/PutUserAccount"
      +
      +  # NG
      +  - name: body
      +    in: body
      +    required: true
      +    type: object
      +    required: [user_name, account_type, register_at, point]
      +    properties:
      +      user_name:
      +        type: string
      +        ...
      +      account_type:
      +        type: string
      +        ...
      • モデル名は、 {HTTPメソッド名}{物理名} の PascalCase で記載する
        • 例: PutUserAccount、PostUserAccount, PatchUserAccount
    • desription

      • 項目の論理名や補足説明を記載する
    yaml
      /users/{user_id}/account:
    +    get:
    +      ...
    +      parameters:
    +        - name: user_id
    +          in: path
    +          type: string
    +          pattern: ^[0-9a-zA-Z_-]*$
    +          minLength: 4
    +          maxLength: 16
    +          required: true
    +          description: 登録時に設定されたユーザーID
    +      responses:
    +        ...
    +    put:
    +      ...
    +      parameters:
    +        - name: user_id
    +          in: path
    +          type: string
    +          pattern: ^[0-9a-zA-Z_-]*$
    +          minLength: 4
    +          maxLength: 16
    +          required: true
    +          description: 登録時に設定されたユーザーID
    +        - name: body
    +          in: body
    +          required: true
    +          schema:
    +            $ref: "#/definitions/PutUserAccount"
    +      responses:
    +        ...

    Paths > Path > Responses

    レスポンスの定義を記載する。

    • description
      • 必須で記載する
    • ステータスコードは発生し得る全てのパターンを列挙する
      • 正常系の 200 OK201 Created202 Accepted 204 No Content 以外の、異常系も忘れず記載する
      • 通常発生しない、サーバサイドの内部的な予期せぬエラー 500 Internal Server Error は必須で記載する
      • リクエストパラメータが存在する場合は 400 Bad Request が、認証がある場合は 401 Unauthorized403 Forbiddend が考えられる
      • default は必須で指定する
        • 例えば、URL 自体が存在しない場合の 404 NotFound や、提供していない HTTP メソッドを呼び出した場合に 405 Method Not Allowed を、自動生成したサーバサイドの実装が返すことがある。この場合、 default を指定していないとフロントエンド側でパースエラーとなることがあるため。各 API エンドポイントのサーバサイド側の実装が応答しないコードは、 default でまとめて指定させる
    yaml
      /users/{user_id}/account:
    +    get:
    +      ...
    +      parameters:
    +        ...
    +      responses:
    +        "200":
    +          description: OK
    +          schema:
    +            $ref: "#/definitions/Users"
    +        "400":
    +          description: パラメータ不正
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "404":
    +          description: リソースが存在しない
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "500":
    +          description: 内部エラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +        default:
    +          description: その他予期せぬエラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +    post:
    +      ...
    +      parameters:
    +        ...
    +      responses:
    +        "201":
    +          description: 新規登録に成功
    +          schema:
    +            $ref: "#/definitions/UserAccount"
    +        "400":
    +          description: パラメータ不正
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "409":
    +          description: すでに登録済みのユーザーIDを用いている
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "500":
    +          description: Internal Server Error
    +          schema:
    +            $ref: "#/definitions/Error"
    +        default:
    +          description: "その他予期せぬエラー"
    +          schema:
    +            $ref: "#/definitions/Error"

    definitions

    • モデル名は、PascalCase で記載する

    • 種別が配列の場合、ネストして定義するのではなく、 $ref を活用する

    • もし、リソース名が単複同形で type: array と区別できない場合、 List を末尾に付けて区別する

      • そうではない場合は s を付けて表現する
      yml
      # OK
      +- in: query
      +  name: product_types
      +  type: array
      +  description: プロダクト種別
      +
      +# NG
      +- in: query
      +  name: product_type_list # xxx_listはNG
      +  type: array
      +  description: プロダクト種別
    • リクエストボディ

      • 必須項目は required で項目を全て指定する
      • その他、項目定義として可能であればできる限り細かく指定する
    • レスポンスボディ

      • type, description, exampleが必須。
      • format, minLength, maxLength などの型桁はできる限り細かく指定する
        • 多くのクライアントは RDB をデータストアに持ち、それらの型定義の参考にするためである
      • enum指定してはならない
        • 一部のクライアント側のコード生成で、存在しない区分値を指定するとエラーになる(レスポンスを受信できない)。これはサーバサイドで区分値を増やす必要があるケースで、サーバ・クライアントの同期をとる必要があり困難なケースが多い。例えばクライアントがモバイルである場合、サーバサイドで区分値を追加した場合には、全端末でアプリアップデートが必要となリ、事実上 API 互換性がなくなるため、v1 を保持しつつ、区分値を追加した v2 の Path を追加する必要が出てくる
      • pattern の指定は不要
        • pattern も enum と同様に、サーバサイドが当初よりリクエストのバリデーションを緩めた場合に、古い pattern でクライアントがレスポンスを検証すると動作しなくなるため。クライアントサイドが RDB など書き込み時のスキーマが厳密であったとしても、正規表現レベルの厳格さで書き込みチェックをすることは無いと考えられる
      • example の値は、 例えば Prism でサーバのモックとして動かす場合に返される値になるため、できる限り具体的な値にする
      • 空文字、false, 0 値を返しうる項目に、x-omitempty :false を付与する
        • ツールの実装によっては、0 値や false を返した場合に JSON フィールドから除外される(omit される)ことがある
    • 日付は 2023-04-02 といった ISO 8601 date フォーマットを推奨する。この場合は fromat: date を指定する

    • 日時は 2023-04-02T15:04:05+09:00 といった ISO 8601 datetime フォーマットを推奨する。この場合は、 format: date-time を指定する

    • エラーについて

      • API 全体で一貫したエラーを返すことを推奨とし、そのために "#/definitions/Error" といった共通のエラーモデルを利用を推奨する
      • RFC 7807 Problem Details for HTTP APIs があるため、レイアウトを参考にする
    yaml
    definitions:
    +  UserAccounts:
    +    type: array
    +    items:
    +      $ref: "#/definitions/UserAccount"
    +  UserAccount:
    +    required: [user_id, user_name, account_type, register_at, point]
    +    properties:
    +      user_id:
    +        type: string
    +        description: ユーザーID
    +        minLength: 4
    +        maxLength: 16
    +        example: 32AB1aaad100eavV
    +      user_name:
    +        type: string
    +        description: ユーザー名
    +        minLength: 1
    +        maxLength: 128
    +        example: 未来太郎
    +      account_type: # enumは指定しないこと
    +        type: string
    +        description: アカウント種別(1:ゲスト 2:登録済み 3:プレミアム 4:管理者)
    +        minLength: 1
    +        maxLength: 1
    +        example: "1"
    +      register_at:
    +        type: string
    +        format: date-time
    +        description: 登録日時
    +        example: "2023-04-01T11:30:45.000Z"
    +      point:
    +        type: integer
    +        format: int64
    +        description: ポイント(0ポイント以上)
    +        exampe: 421
    +  PostUserAccount:
    +    required: [user_id, user_name, account_type, register_at]
    +    properties:
    +      user_id:
    +        type: string
    +        minLength: 4
    +        maxLength: 16
    +        pattern: ^[0-9a-zA-Z_-]*$
    +        description: ユーザーID
    +        example: 32AB1aaad100eavV
    +      user_name:
    +        type: string
    +        minLength: 1
    +        maxLength: 128
    +        description: ユーザー名
    +        example: 未来太郎
    +      account_type:
    +        type: string
    +        minLength: 1
    +        maxLength: 1
    +        enum: ["1", "2", "3", "4"]
    +        description: アカウント種別(1:ゲスト 2:登録済み 3:プレミアム 4:管理者)
    +        example: "1"
    +      register_at:
    +        type: string
    +        format: date-time
    +        description: 登録日時
    +        example: "2023-04-01T11:30:45.000Z"
    +  Error:
    +    description: エラー (RFC 7807)
    +    type: object
    +    required: [title, status, detail]
    +    properties:
    +      title:
    +        type: string
    +        description: タイトル
    +        minLength: 1
    +        maxLength: 64
    +        example: request validation error
    +      status:
    +        type: integer
    +        format: int32
    +        description: HTTPステータスコード
    +        minimum: 400
    +        maximum: 600
    +        exclusiveMaximum: true
    +        example: 503
    +      message_cd:
    +        type: string
    +        description: 状態の切り分けとアクションが一意に特定できるメッセージコード
    +        minLength: 1
    +        maxLength: 16
    +        example: APPERR-0001
    +      detail:
    +        type: string
    +        description: エラーメッセージ詳細
    +        minLength: 1
    +        maxLength: 128
    +        example: user name is too long

    バリデーションについて

    OpenAPI 定義を記載するにあたり、バリデーションをどこまで厳密に定義すべきかという議論はよく行いがちである。

    リクエストパラメータの各項目に対して、必須・型・桁・区分値・日付・正規表現のチェックが行える。レスポンスで用いるモデルについても同様に設定でき、enum, pattern 以外は API の利用者(クライアント)側の DB 設計などに必要な型桁情報を渡すのに有用であるため、できる限り詳しく指定する。

    必須

    必須パラメータのみ required: true を定義する

    デフォルト値

    パラメータにデフォルト値がある場合はdefault を定義する。

    yaml
    # ex. enum
    +name: limit
    +type: number
    +format: integer
    +minimum: 1
    +maximum: 100
    +default: 20
    +description: 検索結果の項目数上限(1~100が指定可能)

    【注意】API 公開後に、default 値を変更してはならない(API の互換性が崩れるため)。もし変更する場合は、API のバージョンを上げること。

    型・フォーマット

    型(type)は string(文字列), number(数値), integer(整数値), boolean(真偽値) array(配列), file(ファイル) のうちどれか指定する.

    フォーマット(format) は以下の型の詳細情報を示すもので、可能な限り設定する。

    • integer (整数)
      • int32, int64
    • number (数値)
      • float, double
    • string (バイナリ)
      • byte: Base64 でエンコードされた文字列
      • binary: バイト配列
    • string (日付)
      • date: RFC3339 full-date(例: 2023-07-21)
        • 項目名は _on を接尾辞につけることを推奨とする
      • date-time: RFC3339 date-time(例: 2023-07-21T17:32:28Z)
        • 項目名は _at を接尾辞につけることを推奨とする
    • string (その他)
      • password: Swagger UI で入力が隠される
      • その他、 email, uuid など Open API 仕様に存在しない任意のフォーマットを独自のドキュメント生成などのために記載しても良い

    データ型によって、利用できる桁を指定する項目が異なる。可能な限り設定する。

    • 文字列
      • 最大桁数:maxLength
      • 最小桁数:minLength
    • 数値または整数値
      • 最小値(境界値を含む):minimum
      • 最大値(境界値を含む):maximum
      • 境界値を含まない場合のみexclusiveMinimum: trueまたはexclusiveMaximum: trueを定義する。minimum, maximum で代用できる場合は利用しない
    • 配列:
      • 最大要素数:maxItems
      • 最小要素数:minItems
      • required: trueの場合は原則としてminItems: 1を定義する
      • uniqueItems は必須で指定する(通常は一意であるべき)

    【注意】API 公開後に、レスポンスの maxLength を以前より大きい値に変更してはならない。レスポンスの maxLength など API 利用者側システムの DB の ERD 定義のインプットになる事が多いため。もし行う場合は API のバージョンを上げることや、連携先に桁数変更の旨を調整するなどの考慮を行う。

    区分値

    区分値の場合は enum 属性を利用し、descriptionには区分値の論理名を記載する。

    yaml
    name: gender
    +type: string
    +enum: ["0", "1", "2", "9"]
    +description: |
    +  性別
    +    0: 不明
    +    1: 男
    +    2: 女
    +    9: 適用不能

    固定値

    固定値 の場合も enum を 1 つだけ指定して表現する。この場合もレスポンスで利用する場合は指定しない

    yaml
    name: file_layout
    +type: string
    +enum: ["json"]
    +description: ファイルレイアウト

    その他(正規表現)

    正規表現で表現できる文字列はpatternを利用して定義する。桁や区分値で代替できる場合は、pattern を用いない

    例:

    yaml
    remind_time:
    +  type: string
    +  description: リマインド時刻。(hh:mm)形式
    +  example: 23:59
    +  pattern: "^(2[0-3]|[01][0-9]):([0-5][0-9])$"

    ファイルアップロード

    Web API におけるファイルアップロードのよく利用される実装手段は、大きく分けて以下の 3 手法に分類できます

    1. ファイルのコンテンツを Base64 などにエンコードして、JSON の項目として設定し、リクエストボディで送る
      • メリット: 通常の JSON を扱うのとほぼ変わらないため楽。サムネイルなど限定されたユースケースの場合に向く
      • デメリット: 巨大なファイルを扱う場合などサーバリソース負荷が懸念。Base64 に変換する分 CPU 負荷は余計にかかる。ペイロードが膨れるためモバイルなどのクライアントでは帯域利用での懸念がある
    2. multipart/form-data ファイルを送信する
      • メリット: ファイルを Base64 に変換するといった作業が不要
      • デメリット: ブラウザ以外のクライアントにとって手間がかかる
    3. アップロード用に用いる、オブジェクトストレージの Signed URL を発行し、クライアントから直接ファイルをアップロードしてもらう

    本規約でファイルアップロードについて上記の 3. Signed URL を推奨する。API 呼び出しとしては次のようなフローとする。

    `,107)),(p(),r(E,null,{default:n(()=>[i(h,{id:"mermaid-1038",class:"mermaid",graph:"sequenceDiagram%0Aparticipant%20A%20as%20%E3%82%AF%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%B3%E3%83%88%0Aparticipant%20B%20as%20Web%20API%E3%82%B5%E3%83%BC%E3%83%90%0Aparticipant%20C%20as%20%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%B9%E3%83%88%E3%83%AC%E3%83%BC%E3%82%B8%0A%0AA-%3E%3EB%3A%20%E2%91%A0%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E5%85%88URL%E5%8F%96%E5%BE%97%0A%20%20B-%3E%3EC%3A%20Signed%20URL%E7%99%BA%E8%A1%8C%0A%20%20C--%3E%3EB%3A%20Signed%20URL%0A%20%20B--%3E%3EA%3A%20%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89URL%E3%80%81%E5%8F%97%E4%BB%98ID%EF%BC%88%E5%8A%A0%E3%81%88%E3%81%A6%E3%80%81%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E3%81%A7%E6%8C%87%E5%AE%9A%E3%81%97%E3%81%9F%E3%81%84HTTP%20Method%E3%82%84%E5%BF%85%E8%A6%81%E3%81%AA%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%83%98%E3%83%83%E3%83%80%E3%83%BC%E3%81%8C%E3%81%82%E3%82%8C%E3%81%B0%E5%BF%9C%E7%AD%94%E3%81%AE%E9%A0%85%E7%9B%AE%E3%81%AB%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B%EF%BC%89%0A%0AA-%3E%3EC%3A%20%E2%91%A1%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%0A%0AA-%3E%3EB%3A%20%E2%91%A2%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E5%AE%8C%E4%BA%86(%E5%8F%97%E4%BB%98ID%E3%80%81%E3%82%AD%E3%83%BC%E3%80%81%E5%B1%9E%E6%80%A7)%0A%20%20B--%3E%3EA%3A%20%E5%8F%97%E4%BB%98%E5%AE%8C%E4%BA%86%0A"})]),fallback:n(()=>s[0]||(s[0]=[d(" Loading... ")])),_:1})),s[2]||(s[2]=a(`

    フローの ①、② はアプリケーション固有の紐づけルールにおいて Web API を設計すれば良いため、本規約で YAML の設定例は記載しない。フロー ② については Signed URL を用いたアップロードであり、アプリケーションの Web API 定義を書く必要はない。もし、監査ログなどのガバナンス上、直接オブジェクトストレージへの書き込みを許容されないケースは、B で Signed URL に相当する書き込み先を提供し、B を経由してファイルをアップロードする。

    上記どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    ファイルダウンロード

    ファイルアップロードと同様、オブジェクトストレージの Signed URL 経由を経由してのダウンロードさせる手法を推奨する。Web API としてはオブジェクトストレージにダウンロード用のファイルを書き込み、クライアントが取得するための Signed URL をレスポンスの JSON 項目に渡す方式である。

    もし、サムネイルやアイコン画像など、ファイル容量がごく小さい場合は Base64 にエンコードして JSON に埋め込んで渡しても良い。線引をどこに設置するかは本規約で定義しない。

    どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    CORS

    CORS(Cross-Origin Resource Sharing)のために、options メソッドの追記は 原則不要 とする。

    理由は以下である。

    • サーバ側
      • options メソッド対応は、API 使用ではなく実装レベルの機能横断的な処理(Java における Servlet Filter や Spring の Interceptor、Go における Middleware など)で行うことが大半であり、コード生成が不要
    • クライアント側
      • options メソッドを用いるのはクライアントがブラウザであり、クライアントのアプリケーションコードが明示的にアクセスしないため、コード生成が不要
    • 使用面として
      • Access-Control-Allow-Origin がどのような値を返すか、呼び出し元によって動的な値を返したい場合があり、記載が困難なケースがある

    ただし、Amazon API Gateway のようなサービスを利用する場合は、options メソッドの記載が必須である場合は除く[1]

    OpenTelemetry Traceparent HTTP Header

    OpenOpenTelemetry で用いるられるtraceparent のリクエストヘッダーは OpenAPI で 原則不要 とする。

    理由は以下である。

    • OpenTelemetry が定めるヘッダー類は、API 横断的に設定されるべきものであり、ミドルウェアやフレームワーク側などでの一律の制御を推奨するため
    • 記載することにより、OpenOpenTelemetry に対応していることを明記し開発者に周知できるメリットより、各アプリ開発者が生成されたコードで悩んだり、誤解されることを回避したいため

    API のバージョン管理

    Swagger 定義で以下の変更を行う場合は、利用するコード生成の動作によってはクライアントにとって互換性を失う破壊的変更であることがあるため、変更は調整の上で行うか、バージョンを上げることを考える。

    • リクエスト項目
      • フィールドの型を変更する
      • 桁数を小さくする
      • enum の種類を減らす
      • 正規表現のチェックを厳しくする
      • 必須フィールドを後から追加する
      • デフォルト値を後から変更する
    • レスポンス項目
      • フィールドの型を変更する
      • 桁数を大きくする
      • デフォルト値を後から変更する

    ファイル単位

    TODO v3 の作成タイミングと合わせて追記する

    推奨ツール

    本当に使ってよかった OpenAPI (Swagger) ツール にあるように、様々なツールで開発ができる。VS Code を用いる場合は以下のプラグインを推奨する。

    editorconfig を用いる場合は、以下の定義を推奨する。

    ini
    root = true
    +
    +[*]
    +charset = utf-8
    +insert_final_newline = true
    +trim_trailing_whitespace = true
    +end_of_line = lf
    +
    +[*.{json,yaml}]
    +indent_size = 2
    +indent_style = space

    License

    CC-By-4.0


    1. https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/enable-cors-for-resource-using-swagger-importer-tool.html ↩︎

    `,30))])}const C=t(c,[["render",g]]);export{A as __pageData,C as default}; diff --git a/assets/documents_forOpenAPISpecification_OpenAPI_Specification_3.0.3.md.DkcvvhOI.js b/assets/documents_forOpenAPISpecification_OpenAPI_Specification_3.0.3.md.DkcvvhOI.js new file mode 100644 index 00000000..a6c75dd7 --- /dev/null +++ b/assets/documents_forOpenAPISpecification_OpenAPI_Specification_3.0.3.md.DkcvvhOI.js @@ -0,0 +1,792 @@ +import{_ as h,c as k,G as i,a3 as a,b as r,w as n,a4 as E,B as p,o as l,a as d}from"./chunks/framework.BDUoXecB.js";const A=JSON.parse('{"title":"OpenAPI Specification 3.0.3規約","description":"","frontmatter":{"sidebarDepth":4,"title":"OpenAPI Specification 3.0.3規約","author":"フューチャー株式会社","head":[["meta",{"name":"keywords","content":"OpenAPI,命名規約,コーディング規約"}]]},"headers":[],"relativePath":"documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.md","filePath":"documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.md"}'),c={name:"documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.md"};function g(y,s,b,o,u,m){const e=p("page-title"),t=p("Mermaid");return l(),k("div",null,[i(e),s[1]||(s[1]=a(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    本ドキュメントは OpenAPI Specification 3.0.3に則った API ドキュメントを記述する際のコーディング規約をまとめている。 旧バージョンであるOpenAPI Specification 2.0 の規約も存在するため、v2 を使用している場合はそちらを参照されたい。

    本規約は前提条件に基づいて作成されており、ToC 向けの LSUDs(Large Set of Unknown Developers)向けの Web API には適合しない場合もあるのでご留意いただきたい。 Web API の設計自体はこの規約の範囲外であるが、API 設計標準 にステータスコード等の標準を記載しているため、必要に応じて参考にされたい。

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせた開発手法が採用されている。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している

    ファイルフォーマット

    ファイルフォーマット規約に従う。

    OpenAPI ドキュメントの構成要素

    OpenAPI ドキュメントを構成する要素はオブジェクトと呼ばれ、ルートオブジェクトは以下の要素で構成される。

    各種規約を理解する上で、これらの要素を大まかに把握しておくことが重要である。

    各オブジェクトの詳細については公式ドキュメントを参照されたい。

    フィールド名必須説明
    openapiOpenAPI ドキュメントが使用する OpenAPI 仕様のバージョン番号
    infoAPI に関するメタデータ
    serversAPI サーバへの接続情報
    pathsAPI の利用可能なパスと操作方法
    components複数の API における共通の定義
    securityAPI 全体で利用可能なセキュリティ(認証)機構
    tags各種 API をグルーピングするためのタグ
    externalDocs追加の外部ドキュメント

    要素規約

    先述した OpenAPI ドキュメントを構成する要素別に具体的なコーディング規約を記載する。

    openapi

    OpenAPI ドキュメントが使用する OpenAPI 仕様のセマンティックバージョン番号を記載する。

    本規約はバージョン3.0.3を対象としているため、3.0.3とする。

    良い例:

    yaml
    openapi: 3.0.3

    悪い例:

    yaml
    openapi: 3.0

    info

    infoオブジェクトには Web API に関するメタデータを記載する。

    title, description, version を必須項目とする。

    フィールド名必須記載内容
    titleWeb API の総称
    descriptionWeb API の簡単な説明
    versionOpenAPI ドキュメントのバージョン
    termsOfService利用規約の URL
    contact連絡先情報
    licenseライセンス情報

    info > title

    Web API の総称を記載する。

    システム名やサービス名 + API のような命名を推奨する。

    良い例:

    yaml
    info:
    +  title: X System API

    info > description

    Web API が提供する機能の概要・想定する利用者やユースケース・制約などを記載する。

    info > version

    この API 仕様のドキュメントのバージョンを記載する。

    アプリケーションのバージョン(git tag やリリースで管理するようなバージョン)とは別である。

    • major.minor 形式を推奨する

      • 0.1 固定で開発を進め、サービスのリリース時に 1.0 とし、その後の項目やオプション、パスの追加ごとにマイナーバージョンをインクリメントしていく

      良い例:

      yaml
      info:
      +  version: 1.0
    • 他チームへの API ドキュメントの頻繁な共有が必要な場合は YYYY.MM.DD の日付形式も許容する

      良い例:

      yaml
      info:
      +  version: 2023.03.26

    servers

    Web API を提供するサーバの情報を記載する。

    • url, description を必須項目とする
    • ステージ(local, develop, staging など)が複数ある場合は各ステージ分の情報を記載する。
    • SSKDs 向けの Web API 開発においては本番環境の URL を不用意に公開したくないケースが多く、記載は避けるべきである

    良い例:

    yaml
    servers:
    +  - url: http://localhost:8001/
    +    description: Localhost Server
    +  - url: https://dev.api.example.com/v1
    +    description: Development Server
    +  - url: https://staging.api.example.com/v1
    +    description: Staging Server

    悪い例:

    yaml
    servers:
    +  - url: https://prod.api.example.com/v1
    +    description: Production Server

    paths

    API の利用可能なエンドポイントと操作方法を記載する。

    • API ごとに機能 ID を定義している場合、paths 配下の各パスは機能 ID の昇順に定義する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      summary: API-101 ユーザ一覧取得
      +  /products:
      +    get:
      +      summary: API-201 商品一覧取得

      悪い例:

      yaml
      paths:
      +  /products:
      +    get:
      +      summary: API-201 商品一覧取得
      +  /users:
      +    get:
      +      summary: API-101 ユーザ一覧取得
    • URL パスが複数の単語からなる場合、ケバブケースで表現する

      良い例:

      yaml
      paths:
      +  /product-owners:
      +    get: ...

      悪い例:

      yaml
      paths:
      +  /productOwners:
      +    get: ...
    • HTTP メソッドは GET, POST, PUT, PATCH, DELETE の順に定義する

      良い例:

      yaml
      paths:
      +  /products:
      +    get: ...
      +    post: ...

      悪い例:

      yaml
      paths:
      +  /products:
      +    post: ...
      +    get: ...
    • HTTP メソッドの配下に定義されるオペレーションオブジェクトは、下記の項目を必須項目とする

    フィールド名必須記載内容
    tagsAPI の論理的なグループ
    summaryAPI の操作概要
    descriptionAPI の振る舞いの詳細や注意点
    externalDocsAPI に関する追加の文書
    operationIdAPI の利用可能なエンドポイントと操作方法
    parametersAPI のリクエストパラメータ
    requestBodyAPI のリクエストボディ
    responsesAPI のレスポンス
    callbacks
    deprecatedAPI が非推奨であることの宣言
    securityAPI のセキュリティ機構
    serversAPI に対応する代替サーバ

    paths > {path} > {method} > tags

    API の論理的なグループを指定する。

    • タグオブジェクトとして事前定義したタグの中から選択する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      tags:
      +        - users
      +      ...
      +tags:
      +  - name: users

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      tags:
      +        # タグオブジェクトとして定義されていないタグが指定されている
      +        - users
      +      ...
      +tags: []
    • 1 API につき 1つのタグを指定する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      tags:
      +        - users
      +      ...

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      # 複数のタグが指定されている
      +      tags:
      +        - users
      +        - admin
      +      ...

    paths > {path} > {method} > summary

    API の操作概要を記載する。

    • API ごとに機能 ID や機能名があるのであれば記載する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      summary: API-001 ユーザ一覧取得

    paths > {path} > {method} > description

    API の振る舞いの詳細や注意点を記載する。

    別途参照させるべき設計書があるのであれば、設計書へのリンクを記載しても良い。

    良い例:

    yaml
    paths:
    +  /users:
    +    get:
    +      description: [API詳細設計書(API-001)](https://example.com/API-001.md)

    paths > {path} > {method} > operationId

    API を識別するための一意な文字列を記載する。

    • HTTP メソッドと URL パスの組み合わせをキャメルケースで表現する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      operationId: getUsers
      +      ...
      +  /products/{product_id}:
      +    put:
      +      operationId: putProductsProductId
      +      ...

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      operationId: get_users
      +      ...
    • OpenAPI ドキュメントエディタとして広く使用される Stoplight が提供するLinterの定義としては、ケバブケースが標準になっているため、Stoplight を使用する場合はケバブケースで表現しても良い

    paths > {path} > {method} > parameters

    API のリクエストパラメータを記載する。

    • クエリパラメータはスネークケースで表現する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      parameters:
      +        - name: account_type
      +          in: query

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      parameters:
      +        - name: account-type
      +          in: query
    • クエリパラメータは HTTP メソッドが GET, DELETE の場合にのみ指定する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      parameters:
      +        - name: account_type
      +          in: query

      悪い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      parameters:
      +        - name: acaccount_type
      +          in: query
    • ヘッダはハイフンを区切り文字とするパスカルケースで表現する

      良い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      parameters:
      +        - name: Content-Type
      +          in: header

      悪い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      parameters:
      +        - name: ContentType
      +          in: header

    paths > {path} > {method} > requestBody

    API のリクエストボディを記載する。

    • 標準仕様の describing-request-body の章にも記載がある通り、リクエストボディは HTTP メソッドが POST, PUT, PATCH の場合のみ指定する

      良い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      requestBody:
      +        required: true
      +        content:
      +          application/json:
      +            ...

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      # HTTP メソッドが GET の場合にリクエストボディを指定
      +      requestBody:
      +        ...
    • リクエストボディそのものは通常複数の API を跨いで再利用されるものではないため、原則 components オブジェクトとして共通化(コンポーネント化)を行わない

      • openapi-generatorを使用する場合は、コンポーネント化をせず、title を指定することで名称の指定が可能となる
      • oapi-codegenを使用する場合は、名称を指定するためにコンポーネント化が必要となるが、極力コンポーネント化せずデフォルトの名称を使用することを推奨する

      良い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      requestBody:
      +        required: true
      +        content:
      +          application/json:
      +            ...

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      requestBody:
      +        # コンポーネント化したリクエストボディを参照
      +        $ref: '#/components/requestBodies/ReqPostProductsBody'
      +
      +components:
      +  requestBodies:
      +    ReqPostProductsBody:
      +      content:
      +        application/json:

    paths > {path} > {method} > responses

    API のレスポンスを記載する。

    • 正常系(2xx)のレスポンスは通常複数の API を跨いで再利用されるものではないため、原則 components オブジェクトとして共通化(コンポーネント化)を行わない

      • openapi-generatorを使用する場合は、コンポーネント化をせず、title を指定することで名称の指定が可能となる
      • oapi-codegenを使用する場合は、レスポンスの構造体を出力するために strict-server オプションを true に指定する必要がある。名称を指定するためにコンポーネント化が必要となるが、極力コンポーネント化せずデフォルトの名称を使用することを推奨する

      良い例:

      yaml
      paths:
      +  /products:
      +    post:
      +      responses:
      +        "200":
      +          description: 200 OK
      +          content:
      +            application/json: ...

      悪い例:

      yaml
      paths:
      +  /products:
      +    post:
      +      responses:
      +        "200":
      +          # コンポーネント化したレスポンスオブジェクトを参照
      +          $ref: "#/components/responses/RespPostProductsBody"
      +
      +components:
      +  responses:
      +    RespPostProductsBody:
      +      description: 200 OK
      +      content:
      +        application/json: ...
    • 異常系(4xx, 5xx)のレスポンスは個別に定義するのではなく、事前に components オブジェクトとして定義を行い $ref で参照する

      良い例:

      yaml
      paths:
      +  /products:
      +    post:
      +      responses:
      +        "400":
      +          # コンポーネント化したレスポンスオブジェクトを参照
      +          $ref: "#/components/responses/BadRequest"
      +
      +components:
      +  responses:
      +    BadRequest:
      +      description: 400 Bad Request
      +      content:
      +        application/json: ...

      悪い例:

      yaml
      paths:
      +  /products:
      +    post:
      +      responses:
      +        "400":
      +          # レスポンスオブジェクトを個別に定義
      +          description: 400 Bad Request
      +          content:
      +            application/json: ...

    paths > {path} > {method} > security

    API の認証方式を記載する。

    • 通常はルートレベルの security で API 共通的な認証方式を設定し、個々の API で個別に設定は行わない

    • ヘルスチェックのような認証を通す必要がない API のみ、上書きで定義する

      良い例:

      yaml
      paths:
      +  /session:
      +    post:
      +      ...
      +      # 認証しない場合のみ個別で定義
      +      security: []

    components

    API 定義で利用する共通のデータモデルを定義する。定義方針は下記の通りである。

    フィールド名方針
    schemasAPI 共通的なリソース(例. ユーザや商品など)やエラー等のドメインオブジェクトを定義する
    responsesAPI 共通的なレスポンス(例. 異常系(4xx, 5xx)のレスポンス)を定義する
    parametersAPI 共通的なリクエストパラメータ(HTTP ヘッダやクエリパラメータ等)を定義する
    examples原則何も定義しない
    requestBodies原則何も定義せず、リクエストボディは API 個別に定義する
    headersAPI 共通的なレスポンスヘッダを定義する
    securitySchemes標準で用いる API 認証のスキームを定義する
    links原則何も定義しない
    callbacks原則何も定義しない

    ※ リクエストボディやレスポンスボディにおいてオブジェクトがネストする場合、 API 固有のオブジェクトであっても schemas に定義する。 これは、定義するオブジェクトの properties 配下に更に type: object が定義される場合に、生成ツールによってはうまく型が生成されないためである。 生成ツール上問題ないのであれば、API 固有のオブジェクトを schemas に定義する必要はない。

    components > schemas

    API 共通的なリソースやエラー等のドメインオブジェクトを記載する。

    • 名称はアッパーキャメルケースで定義する
    • 名称は単数形で定義する
    • type に複数の型を定義しない
    • typenull は原則指定しない(null 値を用いる代わりに、キー自体を含めない)
    • allOf, anyOf, oneOf は利用しない

    良い例:

    yaml
    components:
    +  schemas:
    +    # 共通で使用するリソースを表すオブジェクト
    +    Product:
    +      type: object
    +      properties: ...
    +    User:
    +      type: object
    +      properties:
    +    # 共通で使用するエラーを表すオブジェクト
    +    ProblemDetailError:
    +      type: object
    +      properties: ...

    components > responses

    API 共通的なレスポンスを記載する。主に異常系(4xx, 5xx)のレスポンスを定義する。

    • 名称はアッパーキャメルケースで定義する
    • 異常系(4xx, 5xx)のレスポンスの場合、名称にステータスコードの名称(例. BadRequest, Unauthorized)を用いる

    良い例:

    yaml
    components:
    +  schemas:
    +    ProblemDetailError:
    +      type: object
    +      properties:
    +        ...
    +  responses:
    +    # HTTP ステータスコード 400 のレスポンスオブジェクト
    +    BadRequest:
    +      description: 400 Bad Request
    +      content:
    +        application/json:
    +          schema:
    +            "$ref": "#/components/schemas/ProblemDetailError"
    +    # HTTP ステータスコード 401 のレスポンスオブジェクト
    +    Unauthorized:
    +      description: 401 Unauthorized
    +      content:
    +        application/json:
    +          schema:
    +            "$ref": "#/components/schemas/ProblemDetailError"
    +    ...

    正常系のレスポンスの例としてはファイルアップロード・ダウンロードのレスポンスなどが該当する。
    個別のアプリケーション要件でブレが少なく、複数のエンドポイントで用いられる場合に定義する。オブジェクトのスキーマは、schemas に切り出して定義し、コード生成ツールのために型情報を付与させる。

    良い例:

    yaml
    components:
    +  schemas:
    +    SignedURL:
    +      type: object
    +      properties:
    +        signed_url:
    +          type: string
    +          format: uri
    +        expired_at:
    +          type: string
    +          format: date-time
    +  responses:
    +    BlobUpload:
    +      description: BLOB(Binary Large Object) upload using presigned url
    +      content:
    +        application/json:
    +          schema:
    +            "$ref": "#/components/schemas/SignedURL"
    +    BlobDownload:
    +      description: BLOB(Binary Large Object) download using presigned url
    +      content:
    +        application/json:
    +          schema:
    +            "$ref": "#/components/schemas/SignedURL"
    +    ImageBinary:
    +      description: An image
    +      content:
    +        image/*:
    +          schema:
    +            type: string
    +            format: binary

    components > parameters

    API 共通的なリクエストパラメータ(パスパラメータ、クエリパラメータ、ヘッダ, Cookie)を記載する。

    パスパラメータ
    • API 全体で利用されるパスパラメータが必要なケースが想定されないため、原則定義しない
      • 特定リソースの操作(例えば更新と削除)を行う際のリソース ID はパスパラメータとして再利用できるが、コンフリクトを避けるため原則共通化は行わない
    クエリパラメータ
    • API 全体で利用可能な共通のクエリパラメータ(例: 検索数の limit, offset)を定義する
    • 命名はクエリパラメータ名に Query というプレフィックスを付与する形式を推奨する

    良い例:

    yaml
    paths:
    +  get:
    +    /products:
    +      parameters:
    +        - $ref: "#/components/parameters/QueryLimit"
    +
    +components:
    +  parameters:
    +    QueryLimit:
    +      name: limit
    +      in: query
    +      required: false
    +      schema:
    +        type: integer
    +      description: 検索数上限
    ヘッダ
    • API 全体で利用可能な共通のリクエストヘッダを定義する
    • 命名はヘッダ名に Header というプレフィックスを付与する形式を推奨する

    良い例:

    yaml
    paths:
    +  post:
    +    /products:
    +      parameters:
    +        - $ref: "#/components/parameters/HeaderContentType"
    +
    +components:
    +  parameters:
    +    HeaderContentType:
    +      name: Content-Type
    +      in: header
    +      schema:
    +        type: string
    +      required: true
    • API 全体で利用可能な共通の Cookie(例: CSRF 用のトークン)を定義する
    • 命名は Cookie 名に Cookie というプレフィックスを付与する形式を推奨する
    • Cookie 認証を定義する場合は、APIKey を利用する

    良い例:

    yaml
    paths:
    +  get:
    +    /products:
    +      parameters:
    +        - $ref: "#/components/parameters/CookieCSRFToken"
    +
    +components:
    +  parameters:
    +    CookieCSRFToken:
    +      name: csrftoken
    +      in: cookie
    +      required: true
    +      schema:
    +        type: string
    +      description: CSRFトークン

    components > requestBodies

    原則何も定義せず、リクエストボディは API 個別に記載する。

    components > headers

    API 共通的なレスポンスヘッダを記載する。

    • 命名はヘッダ名からハイフンを除去した形式を推奨する

    良い例:

    yaml
    paths:
    +  get:
    +    /products:
    +      responses:
    +        "200":
    +          headers:
    +            XCacheInfo:
    +              $ref: "#/components/headers/XCacheInfo"
    +
    +components:
    +  headers:
    +    XCacheInfo:
    +      description: not cacheable; meta data too large
    +      schema:
    +        type: string

    components > securitySchemes

    標準で用いる API 認証の定義を行う。

    良い例:

    yaml
    components:
    +  securitySchemes:
    +    # Bearer トークンによる認証
    +    Bearer:
    +      type: http
    +      scheme: bearer
    +      bearerFormat: JWT
    +      description: "Bearer トークン認証"

    links は OpenAPI 3.0 の新機能の1つで、ある API レスポンスの値を用いて、別の API を呼び出す方法を明示できるセクションである。

    興味深い機能であり、API のセマンティクスを伝えるのに有用であるが、本規約では記載しないことを推奨とする。

    理由:

    • 業務システムでは、業務フローを抑えておけば、API 操作フローの理解はそこまで難しくないことが多い
      • 逆に、API 同士の関係だけを示すだけでは業務モデリング図とのダブルメンテナンスになったり、中途半端になりうる
    • OAS 3.0 Support Backlog にあるように、2023/12/15時点では Swagger-UI が対応していない
      • links を書いたと言って、API ドキュメントに影響しない

    components > callbacks

    callbacks は OpenAPI 3.0 の新機能の1つで、API サーバ側が指定されたコールバック URL を呼び出すという仕組みである。

    仕様書には、EC ショップで購入のたびにマネージャーに通知を送るといった、何かしらの処理をトリガーにコールバック URL を呼び出す例が示されている。

    利便性は高い仕様だが、本規約では記載しないことを推奨とする。

    理由:

    • コールバック URL 呼び出しの、エラーハンドリングが難しい
    • 業務システムでは欠損が許されない、または将来的に許されなくなる可能性があり、その場合にこの機能に頼ると想定以上の追加作業が発生する

    コールバックのような仕組みを実現するには、別途キューイングのメッセージサービスの利用などを検討する。

    security

    全 API に共通で適用されるセキュリティ設定を定義する。

    業務システムの Web API において認証が全く存在しないケースは考えにくいため、本規約ではルートレベルで認証を設定し、個々の API への適応漏れを無くす。

    良い例:

    yaml
    security:
    +  - Bearer: []

    tags

    API を論理的にグループ化するためのタグを定義する。

    • ドキュメントやツールにとって重要であるため 必須 で指定する
    • name, description を必須項目とする
    • 単数形 で、小文字かつ半角スペース区切りで記載する
      • 半角スペース区切りで記載する理由は HTML ドキュメントで参照する場合の可読性を上げるため
    • コード生成で利用される(Go においてはパッケージ、 TypeScript においてはクラスに相当する)ため、シンプルな命名にする

    良い例:

    yaml
    tags:
    +  - name: product
    +    description: 製品
    +  - name: user account
    +    description: ユーザーアカウント

    悪い例:

    yaml
    tags:
    +  - name: products
    +    description: 製品
    +  - name: user_account
    +    description: ユーザーアカウント

    externalDocs

    参照情報としての URL を記載できる。

    ただし、description にて参考情報となる URL を記載する方が、複数リンクを指定可能であるなど自由度が高く使いやすいため externalDocs は利用せず description の利用を推奨する。

    良い例:

    yaml
    info:
    +  description: |-
    +    Some useful links:
    +    - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
    +    - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
    +
    +# 特別な場合を除き非推奨
    +externalDocs:
    +  description: Find out more about Swagger
    +  url: http://swagger.io

    設計上のポイント

    OpenAPI ドキュメントを作成する上での設計上ポイントをいくつか記載する。

    ファイルアップロード

    Web API におけるファイルアップロードのよく利用される実装手段は、大きく分けて以下の 3 手法に分類できる。

    1. ファイルのコンテンツを Base64 などにエンコードして、JSON の項目として設定し、リクエストボディで送る
      • メリット: 通常の JSON を扱うのとほぼ変わらないため楽。サムネイルなど限定されたユースケースの場合に向く
      • デメリット: 巨大なファイルを扱う場合などサーバリソース負荷が懸念。Base64 に変換する分 CPU 負荷は余計にかかる。ペイロードが膨れるためモバイルなどのクライアントでは帯域利用での懸念がある
    2. multipart/form-data ファイルを送信する
      • メリット: ファイルを Base64 に変換するといった作業が不要
      • デメリット: ブラウザ以外のクライアントにとって手間がかかる
    3. アップロード用に用いる、オブジェクトストレージの Signed URL を発行し、クライアントから直接ファイルをアップロードしてもらう

    本規約でファイルアップロードについて上記の 3. Signed URL を推奨する。API 呼び出しとしては次のようなフローとする。

    `,152)),(l(),r(E,null,{default:n(()=>[i(t,{id:"mermaid-1319",class:"mermaid",graph:"sequenceDiagram%0Aparticipant%20A%20as%20%E3%82%AF%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%B3%E3%83%88%0Aparticipant%20B%20as%20Web%20API%E3%82%B5%E3%83%BC%E3%83%90%0Aparticipant%20C%20as%20%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%B9%E3%83%88%E3%83%AC%E3%83%BC%E3%82%B8%0A%0AA-%3E%3EB%3A%20%E2%91%A0%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E5%85%88URL%E5%8F%96%E5%BE%97%0A%20%20B-%3E%3EC%3A%20Signed%20URL%E7%99%BA%E8%A1%8C%0A%20%20C--%3E%3EB%3A%20Signed%20URL%0A%20%20B--%3E%3EA%3A%20%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89URL%E3%80%81%E5%8F%97%E4%BB%98ID%EF%BC%88%E5%8A%A0%E3%81%88%E3%81%A6%E3%80%81%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E3%81%A7%E6%8C%87%E5%AE%9A%E3%81%97%E3%81%9F%E3%81%84HTTP%20Method%E3%82%84%E5%BF%85%E8%A6%81%E3%81%AA%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%83%98%E3%83%83%E3%83%80%E3%81%8C%E3%81%82%E3%82%8C%E3%81%B0%E5%BF%9C%E7%AD%94%E3%81%AE%E9%A0%85%E7%9B%AE%E3%81%AB%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B%EF%BC%89%0A%0AA-%3E%3EC%3A%20%E2%91%A1%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%0A%0AA-%3E%3EB%3A%20%E2%91%A2%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E5%AE%8C%E4%BA%86(%E5%8F%97%E4%BB%98ID%E3%80%81%E3%82%AD%E3%83%BC%E3%80%81%E5%B1%9E%E6%80%A7)%0A%20%20B--%3E%3EA%3A%20%E5%8F%97%E4%BB%98%E5%AE%8C%E4%BA%86%0A"})]),fallback:n(()=>s[0]||(s[0]=[d(" Loading... ")])),_:1})),s[2]||(s[2]=a(`

    フローの ①、② はアプリケーション固有の紐づけルールにおいて Web API を設計すれば良いため、本規約で YAML の設定例は記載しない。フロー ② については Signed URL を用いたアップロードであり、アプリケーションの Web API 定義を書く必要はない。もし、監査ログなどのガバナンス上、直接オブジェクトストレージへの書き込みを許容されないケースは、B で Signed URL に相当する書き込み先を提供し、B を経由してファイルをアップロードする。

    上記どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    ファイルダウンロード

    ファイルアップロードと同様、オブジェクトストレージの Signed URL 経由を経由してのダウンロードさせる手法を推奨する。Web API としてはオブジェクトストレージにダウンロード用のファイルを書き込み、クライアントが取得するための Signed URL をレスポンスの JSON 項目に渡す方式である。

    もし、サムネイルやアイコン画像など、ファイル容量がごく小さい場合は Base64 にエンコードして JSON に埋め込んで渡しても良い。線引をどこに設置するかは本規約で定義しない。

    どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    CORS

    CORS(Cross-Origin Resource Sharing)のために、options メソッドの追記は 原則不要 とする。

    理由:

    • サーバ側
      • options メソッド対応は、API 仕様ではなく実装レベルの機能横断的な処理(Java における Servlet Filter や Spring の Interceptor、Go における Middleware など)で行うことが大半であり、コード生成が不要
    • クライアント側
      • options メソッドを用いるのはクライアントがブラウザであり、クライアントのアプリケーションコードが明示的にアクセスしないため、コード生成が不要
    • 使用面として
      • Access-Control-Allow-Origin がどのような値を返すか、呼び出し元によって動的な値を返したい場合があり、記載が困難なケースがある

    ただし、Amazon API Gateway のようなサービスを利用する場合は、options メソッドの記載が必須である場合は除く[1]

    OpenTelemetry Traceparent HTTP Header

    OpenOpenTelemetry で用いるられるtraceparent のリクエストヘッダは OpenAPI で 原則不要 とする。

    理由:

    • OpenTelemetry が定めるヘッダ類は、API 横断的に設定されるべきものであり、ミドルウェアやフレームワーク側などでの一律の制御を推奨するため
    • 記載することにより、OpenOpenTelemetry に対応していることを明記し開発者に周知できるメリットより、各アプリ開発者が生成されたコードで悩んだり、誤解されることを回避したいため

    値が存在しないという状態の表現

    原則 null を用いず、パラメータのキー自体を含めないこと(undefined)による表現を行う。

    詳細はフューチャー技術ブログ記事を参照されたい

    バリデーション

    パラメータのバリデーションをどこまで厳密に定義すべきかという議論はしばしば行われる。

    リクエストパラメータの各項目に対して、必須・型・桁・区分値・日付・正規表現のチェックが行える。レスポンスで用いるモデルについても同様に設定でき、enum, pattern 以外は API の利用者(クライアント)側の DB 設計などに必要な型桁情報を渡すのに有用であるため、できる限り詳しく指定する。

    必須

    必須パラメータのみ required: true を定義する

    デフォルト値

    パラメータにデフォルト値がある場合はdefault を定義する。

    yaml
    # ex. enum
    +name: limit
    +type: number
    +format: integer
    +minimum: 1
    +maximum: 100
    +default: 20
    +description: 検索結果の項目数上限(1~100が指定可能)

    【注意】API 公開後に、default 値を変更してはならない(API の互換性が崩れるため)。もし変更する場合は、API のバージョンを上げること。

    型・フォーマット

    型(type)は string(文字列), number(数値), integer(整数値), boolean(真偽値) array(配列) のうちどれか指定する。

    フォーマット(format)は以下の型の詳細情報を示すもので、可能な限り設定する。

    • integer(整数)
      • int32, int64
    • number(数値)
      • float, double
    • string(バイナリ)
      • byte: Base64 でエンコードされた文字列
      • binary: バイト配列
    • string(日付)
      • date: RFC3339 full-date(例: 2023-07-21)
        • 項目名は _on を接尾辞につけることを推奨とする
      • date-time: RFC3339 date-time(例: 2023-07-21T17:32:28Z)
        • 項目名は _at を接尾辞につけることを推奨とする
    • string(その他)
      • password: Swagger UI で入力が隠される
      • その他、 email, uuid など Open API 仕様に存在しない任意のフォーマットを独自のドキュメント生成などのために記載しても良い

    OpenAPI 3.0 では 2.0 に存在した file type は存在しない。もし同等の指定をしたい場合は、以下の様に指定する。

    yaml
    type: string
    +format: binary # binary file contents

    データ型によって、利用できる桁を指定する項目が異なる。可能な限り設定する。

    • 文字列
      • 最大桁数:maxLength
      • 最小桁数:minLength
    • 数値または整数値
      • 最小値(境界値を含む):minimum
      • 最大値(境界値を含む):maximum
      • 境界値を含まない場合のみexclusiveMinimum: trueまたはexclusiveMaximum: trueを定義する。minimum, maximum で代用できる場合は利用しない
    • 配列:
      • 最大要素数:maxItems
      • 最小要素数:minItems
      • required: trueの場合は原則としてminItems: 1を定義する
      • uniqueItems は必須で指定する(通常は一意であるべき)

    【注意】API 公開後に、レスポンスの maxLength を以前より大きい値に変更してはならない。レスポンスの maxLength など API 利用者側システムの DB の ERD 定義のインプットになる事が多いため。もし行う場合は API のバージョンを上げることや、連携先に桁数変更の旨を調整するなどの考慮を行う。

    区分値

    区分値の場合は enum 属性を利用し、descriptionには区分値の論理名を記載する。

    yaml
    name: gender
    +type: string
    +enum: ["0", "1", "2", "9"]
    +description: |
    +  性別
    +    0: 不明
    +    1: 男
    +    2: 女
    +    9: 適用不能

    OpenAPI 3.0 では区分値の再利用ができるため、横断的に用いる区分値は components 側で定義する。

    yaml
    paths:
    +  /products:
    +    get:
    +      parameters:
    +        - in: query
    +          name: gender
    +          required: true
    +          schema:
    +            $ref: "#/components/schemas/Gender"
    +components:
    +  schemas:
    +    Gender:
    +      type: string
    +      enum: ["0", "1", "2", "9"]

    固定値

    固定値 の場合も enum を 1 つだけ指定して表現する。この場合もレスポンスで利用する場合は指定しない

    yaml
    name: file_layout
    +type: string
    +enum: ["json"]
    +description: ファイルレイアウト

    その他(正規表現)

    正規表現で表現できる文字列はpatternを利用して定義する。桁や区分値で代替できる場合は、pattern を用いない

    例:

    yaml
    remind_time:
    +  type: string
    +  description: リマインド時刻。(hh:mm)形式
    +  example: 23:59
    +  pattern: "^(2[0-3]|[01][0-9]):([0-5][0-9])$"

    ファイル分割

    OpenAPI ドキュメントは単一のファイルで構成することも複数の分割されたファイルで構成することもできるが、複数のファイルに分割することを推奨する。

    理由:

    • API path ごとに担当者を分けて設計する場合などに、複数人による編集によって意図しないコンフリクトが発生することを防ぐ
    • ファイルの肥大化による、可読性の低下を防ぐ

    分割方法の選定

    開発方針や OpenAPI の使用用途に合わせて、都合の良いファイルの分割方法を採用する。例えば、以下のような方法がある。

    1. API path ごとに設計担当者を分けて、それぞれに OpenAPI を編集する場合は、path の単位で分割する。
    2. テストツールとして stoplightio/prismを使用する場合、テストケースごとにデータファイルを作成して、examples にファイルパスを指定する。

    注意点:

    サンプル説明

    分割方法 1, 2 の両方に当てはまる場合のサンプルを用いて説明する。openapi.yaml とディレクトリ構成は下の通り。全量は sample_dividedを参照すること。

    • リソース単位にディレクトリを作成して、path ごとに定義ファイルを格納する。

    • components の schemas モデルの中身は別ファイルとして切り出すことが可能である。

      yaml
      # openapi.yaml(ファイル分割例)
      +openapi: "3.0.3"
      +info:
      +  version: 1.0.0
      +  title: Swagger Petstore
      +security:
      +  - Bearer: []
      +servers:
      +  - url: http://petstore.swagger.io/v1
      +tags:
      +  - name: pets
      +    description: Everything about your Pets
      +paths:
      +  /pets:
      +    $ref: "./pets/pets.yaml"
      +  /pets/{pet_id}:
      +    $ref: "./pets/pets_pet_id.yaml"
      +
      +components:
      +  securitySchemes:
      +    Bearer:
      +      type: http
      +      scheme: bearer
      +      bearerFormat: JWT
      +      description: "Authenthicaiton with bearer token"
      sh
      # ディレクトリ構成(ファイル分割例)
      +
      +├─openapi.gen.yaml
      +├─openapi.yaml
      +
      +├─examples
      +  ├─pets_get
      +    ├─test_case_001.yaml
      +    └─test_case_002.yaml
      +
      +  ├─pets_pet_id_get
      +    └─test_case_003.yaml
      +
      +  └─pets_post
      +       └─test_case_004.yaml
      +
      +└─pets
      +  ├─pets.yaml
      +  └─pets_pet_id.yaml
    • openapi.yamlpaths に記載した API ファイルは以下のように作成する(例: pets-pet-id.yaml)。

    • examples には、例えば各 API のテストケース ID をキーとして指定(TestCase003)し、該当するテストケースのデータファイルパスを参照させる。

      pets-pet-id.yamlを見る
      yaml
      # pets-pet-id.yaml(API path 別ファイルの記載例)
      +get:
      +  summary: Get details of a pet
      +  description: Get details of a pet by specifying its pet ID.
      +  operationId: getPetsPetId
      +  tags:
      +    - pets
      +  parameters:
      +    - name: pet_id
      +      in: path
      +      description: The id of the pet to retrieve
      +      schema:
      +        type: string
      +      required: true
      +  responses:
      +    "200":
      +      description: Expected response to a valid request
      +      content:
      +        application/json:
      +          schema:
      +            type: object
      +            properties:
      +              pet_detail:
      +                type: object
      +                properties:
      +                  breeder:
      +                    type: string
      +                  date_of_birth:
      +                    type: string
      +                    format: date
      +                  pedigree:
      +                    type: object
      +                    properties:
      +                      registration_no:
      +                        type: integer
      +                        format: int64
      +                      date_of_registration:
      +                        type: string
      +                        format: date
      +                      pedigree_image:
      +                        type: string
      +                    required:
      +                      - registration_no
      +                      - date_of_registration
      +                      - pedigree_image
      +            required:
      +              - pet_detail
      +          examples:
      +            TestCase003:
      +              $ref: "../examples/pets_pet_id_get/test_case_003.yaml"
      +    "404":
      +      $ref: "../common/responses.yaml#/components/responses/NotFound"
      +    "500":
      +      $ref: "../common/responses.yaml#/components/responses/InternalServerError"
    • OpenAPI の使用用途により、分割ファイルを1つのファイルにまとめる必要がある場合には、例えばRedocly CLIを使用して以下コマンドを実行する

    • まとめたファイルは、以下のようになる(例: openapi.gen.yaml)。

      bash
      redocly bundle openapi.yaml --output openapi.gen.yaml
      openapi.gen.yamlを見る
      yaml
      # openapi.gen.yaml(ファイルBundle後)
      +openapi: 3.0.3
      +info:
      +  version: 1.0.0
      +  title: Swagger Petstore
      +servers:
      +  - url: http://petstore.swagger.io/v1
      +security:
      +  - Bearer: []
      +tags:
      +  - name: pets
      +    description: Everything about your Pets
      +paths:
      +  /pets:
      +    get:
      +      summary: Search a pet list
      +      description: Search a list of registered pets up to 100.
      +      operationId: getPets
      +      tags:
      +        - pets
      +      parameters:
      +        - name: limit
      +          in: query
      +          description: How many items to return at one time (max 100)
      +          schema:
      +            type: integer
      +            maximum: 100
      +            format: int32
      +          required: false
      +      responses:
      +        "200":
      +          description: A paged array of pets
      +          headers:
      +            x-next:
      +              description: A link to the next page of responses
      +              schema:
      +                type: string
      +          content:
      +            application/json:
      +              schema:
      +                type: object
      +                properties:
      +                  pets:
      +                    type: array
      +                    maxItems: 100
      +                    items:
      +                      type: object
      +                      properties:
      +                        id:
      +                          type: integer
      +                          format: int64
      +                        name:
      +                          type: string
      +                          maxLength: 50
      +                        category:
      +                          type: string
      +                          maxLength: 10
      +                        sub_category:
      +                          type: string
      +                          maxLength: 50
      +                        age:
      +                          type: integer
      +                          format: int32
      +                        sex:
      +                          type: string
      +                          maxLength: 6
      +                        note:
      +                          type: string
      +                          maxLength: 200
      +                        tag:
      +                          type: string
      +                          maxLength: 20
      +                      required:
      +                        - id
      +                        - name
      +                        - category
      +                        - age
      +                        - sex
      +              examples:
      +                TestCase001:
      +                  $ref: "#/components/examples/test_case_001"
      +                TestCase002:
      +                  $ref: "#/components/examples/test_case_002"
      +        "404":
      +          $ref: "#/components/responses/NotFound"
      +        "500":
      +          $ref: "#/components/responses/InternalServerError"
      +    post:
      +      summary: Register a pet
      +      description: Reginster basic information of new pet.
      +      operationId: postPets
      +      tags:
      +        - pets
      +      requestBody:
      +        content:
      +          application/json:
      +            schema:
      +              type: object
      +              properties:
      +                pet:
      +                  type: object
      +                  properties:
      +                    id:
      +                      type: integer
      +                      format: int64
      +                    name:
      +                      type: string
      +                      maxLength: 50
      +                    category:
      +                      type: string
      +                      maxLength: 10
      +                    sub_category:
      +                      type: string
      +                      maxLength: 50
      +                    age:
      +                      type: integer
      +                      format: int32
      +                    sex:
      +                      type: string
      +                      maxLength: 6
      +                    note:
      +                      type: string
      +                      maxLength: 200
      +                    tag:
      +                      type: string
      +                      maxLength: 20
      +                  required:
      +                    - id
      +                    - name
      +                    - category
      +                    - age
      +                    - sex
      +              required:
      +                - pet
      +            examples:
      +              TestCase004:
      +                $ref: "#/components/examples/test_case_004"
      +        required: true
      +      responses:
      +        "200":
      +          description: OK
      +          content:
      +            application/json:
      +              schema:
      +                type: object
      +                properties:
      +                  id:
      +                    type: integer
      +                    format: int64
      +                  name:
      +                    type: string
      +                    maxLength: 50
      +                  category:
      +                    type: string
      +                    maxLength: 10
      +                  sub_category:
      +                    type: string
      +                    maxLength: 50
      +                  age:
      +                    type: integer
      +                    format: int32
      +                  sex:
      +                    type: string
      +                    maxLength: 6
      +                  note:
      +                    type: string
      +                    maxLength: 200
      +                  tag:
      +                    type: string
      +                    maxLength: 20
      +                required:
      +                  - id
      +                  - name
      +                  - category
      +                  - age
      +                  - sex
      +        "404":
      +          $ref: "#/components/responses/NotFound"
      +        "500":
      +          $ref: "#/components/responses/InternalServerError"
      +  /pets/{pet_id}:
      +    get:
      +      summary: Get details of a pet
      +      description: Get details of a pet by specifying its pet ID.
      +      operationId: getPetsPetId
      +      tags:
      +        - pets
      +      parameters:
      +        - name: pet_id
      +          in: path
      +          description: The id of the pet to retrieve
      +          schema:
      +            type: string
      +          required: true
      +      responses:
      +        "200":
      +          description: Expected response to a valid request
      +          content:
      +            application/json:
      +              schema:
      +                type: object
      +                properties:
      +                  pet_detail:
      +                    type: object
      +                    properties:
      +                      breeder:
      +                        type: string
      +                      date_of_birth:
      +                        type: string
      +                        format: date
      +                      pedigree:
      +                        type: object
      +                        properties:
      +                          registration_no:
      +                            type: integer
      +                            format: int64
      +                          date_of_registration:
      +                            type: string
      +                            format: date
      +                          pedigree_image:
      +                            type: string
      +                        required:
      +                          - registration_no
      +                          - date_of_registration
      +                          - pedigree_image
      +                required:
      +                  - pet_detail
      +              examples:
      +                TestCase003:
      +                  $ref: "#/components/examples/test_case_003"
      +        "404":
      +          $ref: "#/components/responses/NotFound"
      +        "500":
      +          $ref: "#/components/responses/InternalServerError"
      +components:
      +  securitySchemes:
      +    Bearer:
      +      type: http
      +      scheme: bearer
      +      bearerFormat: JWT
      +      description: Authenthicaiton with bearer token
      +  examples:
      +    test_case_001:
      +      value:
      +        pets:
      +          - id: 10001
      +            name: ToyPoodle
      +            category: dog
      +            sub_category: ToyPoodle
      +            age: 1
      +            sex: male
      +            note: friendly
      +            tag: dog10001
      +          - id: 10002
      +            name: Chihuahua
      +            category: dog
      +            sub_category: Chihuahua
      +            age: 1
      +            sex: female
      +            note: friendly
      +            tag: dog10002
      +          - id: 10003
      +            name: Shiba
      +            category: dog
      +            sub_category: Shiba
      +            age: 1
      +            sex: male
      +            note: friendly
      +            tag: dog10003
      +          - id: 10004
      +            name: MiniatureDachshund
      +            category: dog
      +            sub_category: MiniatureDachshund
      +            age: 1
      +            sex: female
      +            note: friendly
      +            tag: dog10004
      +    test_case_002:
      +      value:
      +        pets: []
      +    test_case_004:
      +      value:
      +        pet:
      +          id: 10005
      +          name: FrenchBulldog
      +          category: dog
      +          sub_category: FrenchBulldog
      +          age: 1
      +          sex: male
      +          note: friendly
      +          tag: dog10005
      +    test_case_003:
      +      value:
      +        pet_detail:
      +          breeder: BreederName
      +          date_of_birth: "2023-10-31"
      +          pedigree:
      +            registration_no: 11111111
      +            date_of_registration: "2023-10-31"
      +            pedigree_image: 9j2wBDAA...8QAPxAAAQQABAMGBAYDAAEDAg
      +  schemas:
      +    ProblemDetailError:
      +      type: object
      +      properties:
      +        code:
      +          type: integer
      +          format: int32
      +        message:
      +          type: string
      +      required:
      +        - code
      +        - message
      +  responses:
      +    NotFound:
      +      description: Not Found
      +      content:
      +        application/json:
      +          schema:
      +            $ref: "#/components/schemas/ProblemDetailError"
      +    InternalServerError:
      +      description: Internal Server Error
      +      content:
      +        application/json:
      +          schema:
      +            $ref: "#/components/schemas/ProblemDetailError"

    License

    CC-By-4.0


    1. https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/enable-cors-for-resource-using-swagger-importer-tool.html ↩︎

    `,66))])}const D=h(c,[["render",g]]);export{A as __pageData,D as default}; diff --git a/assets/documents_forOpenAPISpecification_OpenAPI_Specification_3.0.3.md.DkcvvhOI.lean.js b/assets/documents_forOpenAPISpecification_OpenAPI_Specification_3.0.3.md.DkcvvhOI.lean.js new file mode 100644 index 00000000..a6c75dd7 --- /dev/null +++ b/assets/documents_forOpenAPISpecification_OpenAPI_Specification_3.0.3.md.DkcvvhOI.lean.js @@ -0,0 +1,792 @@ +import{_ as h,c as k,G as i,a3 as a,b as r,w as n,a4 as E,B as p,o as l,a as d}from"./chunks/framework.BDUoXecB.js";const A=JSON.parse('{"title":"OpenAPI Specification 3.0.3規約","description":"","frontmatter":{"sidebarDepth":4,"title":"OpenAPI Specification 3.0.3規約","author":"フューチャー株式会社","head":[["meta",{"name":"keywords","content":"OpenAPI,命名規約,コーディング規約"}]]},"headers":[],"relativePath":"documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.md","filePath":"documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.md"}'),c={name:"documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.md"};function g(y,s,b,o,u,m){const e=p("page-title"),t=p("Mermaid");return l(),k("div",null,[i(e),s[1]||(s[1]=a(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    本ドキュメントは OpenAPI Specification 3.0.3に則った API ドキュメントを記述する際のコーディング規約をまとめている。 旧バージョンであるOpenAPI Specification 2.0 の規約も存在するため、v2 を使用している場合はそちらを参照されたい。

    本規約は前提条件に基づいて作成されており、ToC 向けの LSUDs(Large Set of Unknown Developers)向けの Web API には適合しない場合もあるのでご留意いただきたい。 Web API の設計自体はこの規約の範囲外であるが、API 設計標準 にステータスコード等の標準を記載しているため、必要に応じて参考にされたい。

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせた開発手法が採用されている。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している

    ファイルフォーマット

    ファイルフォーマット規約に従う。

    OpenAPI ドキュメントの構成要素

    OpenAPI ドキュメントを構成する要素はオブジェクトと呼ばれ、ルートオブジェクトは以下の要素で構成される。

    各種規約を理解する上で、これらの要素を大まかに把握しておくことが重要である。

    各オブジェクトの詳細については公式ドキュメントを参照されたい。

    フィールド名必須説明
    openapiOpenAPI ドキュメントが使用する OpenAPI 仕様のバージョン番号
    infoAPI に関するメタデータ
    serversAPI サーバへの接続情報
    pathsAPI の利用可能なパスと操作方法
    components複数の API における共通の定義
    securityAPI 全体で利用可能なセキュリティ(認証)機構
    tags各種 API をグルーピングするためのタグ
    externalDocs追加の外部ドキュメント

    要素規約

    先述した OpenAPI ドキュメントを構成する要素別に具体的なコーディング規約を記載する。

    openapi

    OpenAPI ドキュメントが使用する OpenAPI 仕様のセマンティックバージョン番号を記載する。

    本規約はバージョン3.0.3を対象としているため、3.0.3とする。

    良い例:

    yaml
    openapi: 3.0.3

    悪い例:

    yaml
    openapi: 3.0

    info

    infoオブジェクトには Web API に関するメタデータを記載する。

    title, description, version を必須項目とする。

    フィールド名必須記載内容
    titleWeb API の総称
    descriptionWeb API の簡単な説明
    versionOpenAPI ドキュメントのバージョン
    termsOfService利用規約の URL
    contact連絡先情報
    licenseライセンス情報

    info > title

    Web API の総称を記載する。

    システム名やサービス名 + API のような命名を推奨する。

    良い例:

    yaml
    info:
    +  title: X System API

    info > description

    Web API が提供する機能の概要・想定する利用者やユースケース・制約などを記載する。

    info > version

    この API 仕様のドキュメントのバージョンを記載する。

    アプリケーションのバージョン(git tag やリリースで管理するようなバージョン)とは別である。

    • major.minor 形式を推奨する

      • 0.1 固定で開発を進め、サービスのリリース時に 1.0 とし、その後の項目やオプション、パスの追加ごとにマイナーバージョンをインクリメントしていく

      良い例:

      yaml
      info:
      +  version: 1.0
    • 他チームへの API ドキュメントの頻繁な共有が必要な場合は YYYY.MM.DD の日付形式も許容する

      良い例:

      yaml
      info:
      +  version: 2023.03.26

    servers

    Web API を提供するサーバの情報を記載する。

    • url, description を必須項目とする
    • ステージ(local, develop, staging など)が複数ある場合は各ステージ分の情報を記載する。
    • SSKDs 向けの Web API 開発においては本番環境の URL を不用意に公開したくないケースが多く、記載は避けるべきである

    良い例:

    yaml
    servers:
    +  - url: http://localhost:8001/
    +    description: Localhost Server
    +  - url: https://dev.api.example.com/v1
    +    description: Development Server
    +  - url: https://staging.api.example.com/v1
    +    description: Staging Server

    悪い例:

    yaml
    servers:
    +  - url: https://prod.api.example.com/v1
    +    description: Production Server

    paths

    API の利用可能なエンドポイントと操作方法を記載する。

    • API ごとに機能 ID を定義している場合、paths 配下の各パスは機能 ID の昇順に定義する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      summary: API-101 ユーザ一覧取得
      +  /products:
      +    get:
      +      summary: API-201 商品一覧取得

      悪い例:

      yaml
      paths:
      +  /products:
      +    get:
      +      summary: API-201 商品一覧取得
      +  /users:
      +    get:
      +      summary: API-101 ユーザ一覧取得
    • URL パスが複数の単語からなる場合、ケバブケースで表現する

      良い例:

      yaml
      paths:
      +  /product-owners:
      +    get: ...

      悪い例:

      yaml
      paths:
      +  /productOwners:
      +    get: ...
    • HTTP メソッドは GET, POST, PUT, PATCH, DELETE の順に定義する

      良い例:

      yaml
      paths:
      +  /products:
      +    get: ...
      +    post: ...

      悪い例:

      yaml
      paths:
      +  /products:
      +    post: ...
      +    get: ...
    • HTTP メソッドの配下に定義されるオペレーションオブジェクトは、下記の項目を必須項目とする

    フィールド名必須記載内容
    tagsAPI の論理的なグループ
    summaryAPI の操作概要
    descriptionAPI の振る舞いの詳細や注意点
    externalDocsAPI に関する追加の文書
    operationIdAPI の利用可能なエンドポイントと操作方法
    parametersAPI のリクエストパラメータ
    requestBodyAPI のリクエストボディ
    responsesAPI のレスポンス
    callbacks
    deprecatedAPI が非推奨であることの宣言
    securityAPI のセキュリティ機構
    serversAPI に対応する代替サーバ

    paths > {path} > {method} > tags

    API の論理的なグループを指定する。

    • タグオブジェクトとして事前定義したタグの中から選択する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      tags:
      +        - users
      +      ...
      +tags:
      +  - name: users

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      tags:
      +        # タグオブジェクトとして定義されていないタグが指定されている
      +        - users
      +      ...
      +tags: []
    • 1 API につき 1つのタグを指定する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      tags:
      +        - users
      +      ...

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      # 複数のタグが指定されている
      +      tags:
      +        - users
      +        - admin
      +      ...

    paths > {path} > {method} > summary

    API の操作概要を記載する。

    • API ごとに機能 ID や機能名があるのであれば記載する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      summary: API-001 ユーザ一覧取得

    paths > {path} > {method} > description

    API の振る舞いの詳細や注意点を記載する。

    別途参照させるべき設計書があるのであれば、設計書へのリンクを記載しても良い。

    良い例:

    yaml
    paths:
    +  /users:
    +    get:
    +      description: [API詳細設計書(API-001)](https://example.com/API-001.md)

    paths > {path} > {method} > operationId

    API を識別するための一意な文字列を記載する。

    • HTTP メソッドと URL パスの組み合わせをキャメルケースで表現する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      operationId: getUsers
      +      ...
      +  /products/{product_id}:
      +    put:
      +      operationId: putProductsProductId
      +      ...

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      operationId: get_users
      +      ...
    • OpenAPI ドキュメントエディタとして広く使用される Stoplight が提供するLinterの定義としては、ケバブケースが標準になっているため、Stoplight を使用する場合はケバブケースで表現しても良い

    paths > {path} > {method} > parameters

    API のリクエストパラメータを記載する。

    • クエリパラメータはスネークケースで表現する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      parameters:
      +        - name: account_type
      +          in: query

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      parameters:
      +        - name: account-type
      +          in: query
    • クエリパラメータは HTTP メソッドが GET, DELETE の場合にのみ指定する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      parameters:
      +        - name: account_type
      +          in: query

      悪い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      parameters:
      +        - name: acaccount_type
      +          in: query
    • ヘッダはハイフンを区切り文字とするパスカルケースで表現する

      良い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      parameters:
      +        - name: Content-Type
      +          in: header

      悪い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      parameters:
      +        - name: ContentType
      +          in: header

    paths > {path} > {method} > requestBody

    API のリクエストボディを記載する。

    • 標準仕様の describing-request-body の章にも記載がある通り、リクエストボディは HTTP メソッドが POST, PUT, PATCH の場合のみ指定する

      良い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      requestBody:
      +        required: true
      +        content:
      +          application/json:
      +            ...

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      # HTTP メソッドが GET の場合にリクエストボディを指定
      +      requestBody:
      +        ...
    • リクエストボディそのものは通常複数の API を跨いで再利用されるものではないため、原則 components オブジェクトとして共通化(コンポーネント化)を行わない

      • openapi-generatorを使用する場合は、コンポーネント化をせず、title を指定することで名称の指定が可能となる
      • oapi-codegenを使用する場合は、名称を指定するためにコンポーネント化が必要となるが、極力コンポーネント化せずデフォルトの名称を使用することを推奨する

      良い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      requestBody:
      +        required: true
      +        content:
      +          application/json:
      +            ...

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      requestBody:
      +        # コンポーネント化したリクエストボディを参照
      +        $ref: '#/components/requestBodies/ReqPostProductsBody'
      +
      +components:
      +  requestBodies:
      +    ReqPostProductsBody:
      +      content:
      +        application/json:

    paths > {path} > {method} > responses

    API のレスポンスを記載する。

    • 正常系(2xx)のレスポンスは通常複数の API を跨いで再利用されるものではないため、原則 components オブジェクトとして共通化(コンポーネント化)を行わない

      • openapi-generatorを使用する場合は、コンポーネント化をせず、title を指定することで名称の指定が可能となる
      • oapi-codegenを使用する場合は、レスポンスの構造体を出力するために strict-server オプションを true に指定する必要がある。名称を指定するためにコンポーネント化が必要となるが、極力コンポーネント化せずデフォルトの名称を使用することを推奨する

      良い例:

      yaml
      paths:
      +  /products:
      +    post:
      +      responses:
      +        "200":
      +          description: 200 OK
      +          content:
      +            application/json: ...

      悪い例:

      yaml
      paths:
      +  /products:
      +    post:
      +      responses:
      +        "200":
      +          # コンポーネント化したレスポンスオブジェクトを参照
      +          $ref: "#/components/responses/RespPostProductsBody"
      +
      +components:
      +  responses:
      +    RespPostProductsBody:
      +      description: 200 OK
      +      content:
      +        application/json: ...
    • 異常系(4xx, 5xx)のレスポンスは個別に定義するのではなく、事前に components オブジェクトとして定義を行い $ref で参照する

      良い例:

      yaml
      paths:
      +  /products:
      +    post:
      +      responses:
      +        "400":
      +          # コンポーネント化したレスポンスオブジェクトを参照
      +          $ref: "#/components/responses/BadRequest"
      +
      +components:
      +  responses:
      +    BadRequest:
      +      description: 400 Bad Request
      +      content:
      +        application/json: ...

      悪い例:

      yaml
      paths:
      +  /products:
      +    post:
      +      responses:
      +        "400":
      +          # レスポンスオブジェクトを個別に定義
      +          description: 400 Bad Request
      +          content:
      +            application/json: ...

    paths > {path} > {method} > security

    API の認証方式を記載する。

    • 通常はルートレベルの security で API 共通的な認証方式を設定し、個々の API で個別に設定は行わない

    • ヘルスチェックのような認証を通す必要がない API のみ、上書きで定義する

      良い例:

      yaml
      paths:
      +  /session:
      +    post:
      +      ...
      +      # 認証しない場合のみ個別で定義
      +      security: []

    components

    API 定義で利用する共通のデータモデルを定義する。定義方針は下記の通りである。

    フィールド名方針
    schemasAPI 共通的なリソース(例. ユーザや商品など)やエラー等のドメインオブジェクトを定義する
    responsesAPI 共通的なレスポンス(例. 異常系(4xx, 5xx)のレスポンス)を定義する
    parametersAPI 共通的なリクエストパラメータ(HTTP ヘッダやクエリパラメータ等)を定義する
    examples原則何も定義しない
    requestBodies原則何も定義せず、リクエストボディは API 個別に定義する
    headersAPI 共通的なレスポンスヘッダを定義する
    securitySchemes標準で用いる API 認証のスキームを定義する
    links原則何も定義しない
    callbacks原則何も定義しない

    ※ リクエストボディやレスポンスボディにおいてオブジェクトがネストする場合、 API 固有のオブジェクトであっても schemas に定義する。 これは、定義するオブジェクトの properties 配下に更に type: object が定義される場合に、生成ツールによってはうまく型が生成されないためである。 生成ツール上問題ないのであれば、API 固有のオブジェクトを schemas に定義する必要はない。

    components > schemas

    API 共通的なリソースやエラー等のドメインオブジェクトを記載する。

    • 名称はアッパーキャメルケースで定義する
    • 名称は単数形で定義する
    • type に複数の型を定義しない
    • typenull は原則指定しない(null 値を用いる代わりに、キー自体を含めない)
    • allOf, anyOf, oneOf は利用しない

    良い例:

    yaml
    components:
    +  schemas:
    +    # 共通で使用するリソースを表すオブジェクト
    +    Product:
    +      type: object
    +      properties: ...
    +    User:
    +      type: object
    +      properties:
    +    # 共通で使用するエラーを表すオブジェクト
    +    ProblemDetailError:
    +      type: object
    +      properties: ...

    components > responses

    API 共通的なレスポンスを記載する。主に異常系(4xx, 5xx)のレスポンスを定義する。

    • 名称はアッパーキャメルケースで定義する
    • 異常系(4xx, 5xx)のレスポンスの場合、名称にステータスコードの名称(例. BadRequest, Unauthorized)を用いる

    良い例:

    yaml
    components:
    +  schemas:
    +    ProblemDetailError:
    +      type: object
    +      properties:
    +        ...
    +  responses:
    +    # HTTP ステータスコード 400 のレスポンスオブジェクト
    +    BadRequest:
    +      description: 400 Bad Request
    +      content:
    +        application/json:
    +          schema:
    +            "$ref": "#/components/schemas/ProblemDetailError"
    +    # HTTP ステータスコード 401 のレスポンスオブジェクト
    +    Unauthorized:
    +      description: 401 Unauthorized
    +      content:
    +        application/json:
    +          schema:
    +            "$ref": "#/components/schemas/ProblemDetailError"
    +    ...

    正常系のレスポンスの例としてはファイルアップロード・ダウンロードのレスポンスなどが該当する。
    個別のアプリケーション要件でブレが少なく、複数のエンドポイントで用いられる場合に定義する。オブジェクトのスキーマは、schemas に切り出して定義し、コード生成ツールのために型情報を付与させる。

    良い例:

    yaml
    components:
    +  schemas:
    +    SignedURL:
    +      type: object
    +      properties:
    +        signed_url:
    +          type: string
    +          format: uri
    +        expired_at:
    +          type: string
    +          format: date-time
    +  responses:
    +    BlobUpload:
    +      description: BLOB(Binary Large Object) upload using presigned url
    +      content:
    +        application/json:
    +          schema:
    +            "$ref": "#/components/schemas/SignedURL"
    +    BlobDownload:
    +      description: BLOB(Binary Large Object) download using presigned url
    +      content:
    +        application/json:
    +          schema:
    +            "$ref": "#/components/schemas/SignedURL"
    +    ImageBinary:
    +      description: An image
    +      content:
    +        image/*:
    +          schema:
    +            type: string
    +            format: binary

    components > parameters

    API 共通的なリクエストパラメータ(パスパラメータ、クエリパラメータ、ヘッダ, Cookie)を記載する。

    パスパラメータ
    • API 全体で利用されるパスパラメータが必要なケースが想定されないため、原則定義しない
      • 特定リソースの操作(例えば更新と削除)を行う際のリソース ID はパスパラメータとして再利用できるが、コンフリクトを避けるため原則共通化は行わない
    クエリパラメータ
    • API 全体で利用可能な共通のクエリパラメータ(例: 検索数の limit, offset)を定義する
    • 命名はクエリパラメータ名に Query というプレフィックスを付与する形式を推奨する

    良い例:

    yaml
    paths:
    +  get:
    +    /products:
    +      parameters:
    +        - $ref: "#/components/parameters/QueryLimit"
    +
    +components:
    +  parameters:
    +    QueryLimit:
    +      name: limit
    +      in: query
    +      required: false
    +      schema:
    +        type: integer
    +      description: 検索数上限
    ヘッダ
    • API 全体で利用可能な共通のリクエストヘッダを定義する
    • 命名はヘッダ名に Header というプレフィックスを付与する形式を推奨する

    良い例:

    yaml
    paths:
    +  post:
    +    /products:
    +      parameters:
    +        - $ref: "#/components/parameters/HeaderContentType"
    +
    +components:
    +  parameters:
    +    HeaderContentType:
    +      name: Content-Type
    +      in: header
    +      schema:
    +        type: string
    +      required: true
    • API 全体で利用可能な共通の Cookie(例: CSRF 用のトークン)を定義する
    • 命名は Cookie 名に Cookie というプレフィックスを付与する形式を推奨する
    • Cookie 認証を定義する場合は、APIKey を利用する

    良い例:

    yaml
    paths:
    +  get:
    +    /products:
    +      parameters:
    +        - $ref: "#/components/parameters/CookieCSRFToken"
    +
    +components:
    +  parameters:
    +    CookieCSRFToken:
    +      name: csrftoken
    +      in: cookie
    +      required: true
    +      schema:
    +        type: string
    +      description: CSRFトークン

    components > requestBodies

    原則何も定義せず、リクエストボディは API 個別に記載する。

    components > headers

    API 共通的なレスポンスヘッダを記載する。

    • 命名はヘッダ名からハイフンを除去した形式を推奨する

    良い例:

    yaml
    paths:
    +  get:
    +    /products:
    +      responses:
    +        "200":
    +          headers:
    +            XCacheInfo:
    +              $ref: "#/components/headers/XCacheInfo"
    +
    +components:
    +  headers:
    +    XCacheInfo:
    +      description: not cacheable; meta data too large
    +      schema:
    +        type: string

    components > securitySchemes

    標準で用いる API 認証の定義を行う。

    良い例:

    yaml
    components:
    +  securitySchemes:
    +    # Bearer トークンによる認証
    +    Bearer:
    +      type: http
    +      scheme: bearer
    +      bearerFormat: JWT
    +      description: "Bearer トークン認証"

    links は OpenAPI 3.0 の新機能の1つで、ある API レスポンスの値を用いて、別の API を呼び出す方法を明示できるセクションである。

    興味深い機能であり、API のセマンティクスを伝えるのに有用であるが、本規約では記載しないことを推奨とする。

    理由:

    • 業務システムでは、業務フローを抑えておけば、API 操作フローの理解はそこまで難しくないことが多い
      • 逆に、API 同士の関係だけを示すだけでは業務モデリング図とのダブルメンテナンスになったり、中途半端になりうる
    • OAS 3.0 Support Backlog にあるように、2023/12/15時点では Swagger-UI が対応していない
      • links を書いたと言って、API ドキュメントに影響しない

    components > callbacks

    callbacks は OpenAPI 3.0 の新機能の1つで、API サーバ側が指定されたコールバック URL を呼び出すという仕組みである。

    仕様書には、EC ショップで購入のたびにマネージャーに通知を送るといった、何かしらの処理をトリガーにコールバック URL を呼び出す例が示されている。

    利便性は高い仕様だが、本規約では記載しないことを推奨とする。

    理由:

    • コールバック URL 呼び出しの、エラーハンドリングが難しい
    • 業務システムでは欠損が許されない、または将来的に許されなくなる可能性があり、その場合にこの機能に頼ると想定以上の追加作業が発生する

    コールバックのような仕組みを実現するには、別途キューイングのメッセージサービスの利用などを検討する。

    security

    全 API に共通で適用されるセキュリティ設定を定義する。

    業務システムの Web API において認証が全く存在しないケースは考えにくいため、本規約ではルートレベルで認証を設定し、個々の API への適応漏れを無くす。

    良い例:

    yaml
    security:
    +  - Bearer: []

    tags

    API を論理的にグループ化するためのタグを定義する。

    • ドキュメントやツールにとって重要であるため 必須 で指定する
    • name, description を必須項目とする
    • 単数形 で、小文字かつ半角スペース区切りで記載する
      • 半角スペース区切りで記載する理由は HTML ドキュメントで参照する場合の可読性を上げるため
    • コード生成で利用される(Go においてはパッケージ、 TypeScript においてはクラスに相当する)ため、シンプルな命名にする

    良い例:

    yaml
    tags:
    +  - name: product
    +    description: 製品
    +  - name: user account
    +    description: ユーザーアカウント

    悪い例:

    yaml
    tags:
    +  - name: products
    +    description: 製品
    +  - name: user_account
    +    description: ユーザーアカウント

    externalDocs

    参照情報としての URL を記載できる。

    ただし、description にて参考情報となる URL を記載する方が、複数リンクを指定可能であるなど自由度が高く使いやすいため externalDocs は利用せず description の利用を推奨する。

    良い例:

    yaml
    info:
    +  description: |-
    +    Some useful links:
    +    - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
    +    - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
    +
    +# 特別な場合を除き非推奨
    +externalDocs:
    +  description: Find out more about Swagger
    +  url: http://swagger.io

    設計上のポイント

    OpenAPI ドキュメントを作成する上での設計上ポイントをいくつか記載する。

    ファイルアップロード

    Web API におけるファイルアップロードのよく利用される実装手段は、大きく分けて以下の 3 手法に分類できる。

    1. ファイルのコンテンツを Base64 などにエンコードして、JSON の項目として設定し、リクエストボディで送る
      • メリット: 通常の JSON を扱うのとほぼ変わらないため楽。サムネイルなど限定されたユースケースの場合に向く
      • デメリット: 巨大なファイルを扱う場合などサーバリソース負荷が懸念。Base64 に変換する分 CPU 負荷は余計にかかる。ペイロードが膨れるためモバイルなどのクライアントでは帯域利用での懸念がある
    2. multipart/form-data ファイルを送信する
      • メリット: ファイルを Base64 に変換するといった作業が不要
      • デメリット: ブラウザ以外のクライアントにとって手間がかかる
    3. アップロード用に用いる、オブジェクトストレージの Signed URL を発行し、クライアントから直接ファイルをアップロードしてもらう

    本規約でファイルアップロードについて上記の 3. Signed URL を推奨する。API 呼び出しとしては次のようなフローとする。

    `,152)),(l(),r(E,null,{default:n(()=>[i(t,{id:"mermaid-1319",class:"mermaid",graph:"sequenceDiagram%0Aparticipant%20A%20as%20%E3%82%AF%E3%83%A9%E3%82%A4%E3%82%A2%E3%83%B3%E3%83%88%0Aparticipant%20B%20as%20Web%20API%E3%82%B5%E3%83%BC%E3%83%90%0Aparticipant%20C%20as%20%E3%82%AA%E3%83%96%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%82%B9%E3%83%88%E3%83%AC%E3%83%BC%E3%82%B8%0A%0AA-%3E%3EB%3A%20%E2%91%A0%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E5%85%88URL%E5%8F%96%E5%BE%97%0A%20%20B-%3E%3EC%3A%20Signed%20URL%E7%99%BA%E8%A1%8C%0A%20%20C--%3E%3EB%3A%20Signed%20URL%0A%20%20B--%3E%3EA%3A%20%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89URL%E3%80%81%E5%8F%97%E4%BB%98ID%EF%BC%88%E5%8A%A0%E3%81%88%E3%81%A6%E3%80%81%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E3%81%A7%E6%8C%87%E5%AE%9A%E3%81%97%E3%81%9F%E3%81%84HTTP%20Method%E3%82%84%E5%BF%85%E8%A6%81%E3%81%AA%E3%83%AA%E3%82%AF%E3%82%A8%E3%82%B9%E3%83%88%E3%83%98%E3%83%83%E3%83%80%E3%81%8C%E3%81%82%E3%82%8C%E3%81%B0%E5%BF%9C%E7%AD%94%E3%81%AE%E9%A0%85%E7%9B%AE%E3%81%AB%E8%BF%BD%E5%8A%A0%E3%81%99%E3%82%8B%EF%BC%89%0A%0AA-%3E%3EC%3A%20%E2%91%A1%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%0A%0AA-%3E%3EB%3A%20%E2%91%A2%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%82%A2%E3%83%83%E3%83%97%E3%83%AD%E3%83%BC%E3%83%89%E5%AE%8C%E4%BA%86(%E5%8F%97%E4%BB%98ID%E3%80%81%E3%82%AD%E3%83%BC%E3%80%81%E5%B1%9E%E6%80%A7)%0A%20%20B--%3E%3EA%3A%20%E5%8F%97%E4%BB%98%E5%AE%8C%E4%BA%86%0A"})]),fallback:n(()=>s[0]||(s[0]=[d(" Loading... ")])),_:1})),s[2]||(s[2]=a(`

    フローの ①、② はアプリケーション固有の紐づけルールにおいて Web API を設計すれば良いため、本規約で YAML の設定例は記載しない。フロー ② については Signed URL を用いたアップロードであり、アプリケーションの Web API 定義を書く必要はない。もし、監査ログなどのガバナンス上、直接オブジェクトストレージへの書き込みを許容されないケースは、B で Signed URL に相当する書き込み先を提供し、B を経由してファイルをアップロードする。

    上記どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    ファイルダウンロード

    ファイルアップロードと同様、オブジェクトストレージの Signed URL 経由を経由してのダウンロードさせる手法を推奨する。Web API としてはオブジェクトストレージにダウンロード用のファイルを書き込み、クライアントが取得するための Signed URL をレスポンスの JSON 項目に渡す方式である。

    もし、サムネイルやアイコン画像など、ファイル容量がごく小さい場合は Base64 にエンコードして JSON に埋め込んで渡しても良い。線引をどこに設置するかは本規約で定義しない。

    どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    CORS

    CORS(Cross-Origin Resource Sharing)のために、options メソッドの追記は 原則不要 とする。

    理由:

    • サーバ側
      • options メソッド対応は、API 仕様ではなく実装レベルの機能横断的な処理(Java における Servlet Filter や Spring の Interceptor、Go における Middleware など)で行うことが大半であり、コード生成が不要
    • クライアント側
      • options メソッドを用いるのはクライアントがブラウザであり、クライアントのアプリケーションコードが明示的にアクセスしないため、コード生成が不要
    • 使用面として
      • Access-Control-Allow-Origin がどのような値を返すか、呼び出し元によって動的な値を返したい場合があり、記載が困難なケースがある

    ただし、Amazon API Gateway のようなサービスを利用する場合は、options メソッドの記載が必須である場合は除く[1]

    OpenTelemetry Traceparent HTTP Header

    OpenOpenTelemetry で用いるられるtraceparent のリクエストヘッダは OpenAPI で 原則不要 とする。

    理由:

    • OpenTelemetry が定めるヘッダ類は、API 横断的に設定されるべきものであり、ミドルウェアやフレームワーク側などでの一律の制御を推奨するため
    • 記載することにより、OpenOpenTelemetry に対応していることを明記し開発者に周知できるメリットより、各アプリ開発者が生成されたコードで悩んだり、誤解されることを回避したいため

    値が存在しないという状態の表現

    原則 null を用いず、パラメータのキー自体を含めないこと(undefined)による表現を行う。

    詳細はフューチャー技術ブログ記事を参照されたい

    バリデーション

    パラメータのバリデーションをどこまで厳密に定義すべきかという議論はしばしば行われる。

    リクエストパラメータの各項目に対して、必須・型・桁・区分値・日付・正規表現のチェックが行える。レスポンスで用いるモデルについても同様に設定でき、enum, pattern 以外は API の利用者(クライアント)側の DB 設計などに必要な型桁情報を渡すのに有用であるため、できる限り詳しく指定する。

    必須

    必須パラメータのみ required: true を定義する

    デフォルト値

    パラメータにデフォルト値がある場合はdefault を定義する。

    yaml
    # ex. enum
    +name: limit
    +type: number
    +format: integer
    +minimum: 1
    +maximum: 100
    +default: 20
    +description: 検索結果の項目数上限(1~100が指定可能)

    【注意】API 公開後に、default 値を変更してはならない(API の互換性が崩れるため)。もし変更する場合は、API のバージョンを上げること。

    型・フォーマット

    型(type)は string(文字列), number(数値), integer(整数値), boolean(真偽値) array(配列) のうちどれか指定する。

    フォーマット(format)は以下の型の詳細情報を示すもので、可能な限り設定する。

    • integer(整数)
      • int32, int64
    • number(数値)
      • float, double
    • string(バイナリ)
      • byte: Base64 でエンコードされた文字列
      • binary: バイト配列
    • string(日付)
      • date: RFC3339 full-date(例: 2023-07-21)
        • 項目名は _on を接尾辞につけることを推奨とする
      • date-time: RFC3339 date-time(例: 2023-07-21T17:32:28Z)
        • 項目名は _at を接尾辞につけることを推奨とする
    • string(その他)
      • password: Swagger UI で入力が隠される
      • その他、 email, uuid など Open API 仕様に存在しない任意のフォーマットを独自のドキュメント生成などのために記載しても良い

    OpenAPI 3.0 では 2.0 に存在した file type は存在しない。もし同等の指定をしたい場合は、以下の様に指定する。

    yaml
    type: string
    +format: binary # binary file contents

    データ型によって、利用できる桁を指定する項目が異なる。可能な限り設定する。

    • 文字列
      • 最大桁数:maxLength
      • 最小桁数:minLength
    • 数値または整数値
      • 最小値(境界値を含む):minimum
      • 最大値(境界値を含む):maximum
      • 境界値を含まない場合のみexclusiveMinimum: trueまたはexclusiveMaximum: trueを定義する。minimum, maximum で代用できる場合は利用しない
    • 配列:
      • 最大要素数:maxItems
      • 最小要素数:minItems
      • required: trueの場合は原則としてminItems: 1を定義する
      • uniqueItems は必須で指定する(通常は一意であるべき)

    【注意】API 公開後に、レスポンスの maxLength を以前より大きい値に変更してはならない。レスポンスの maxLength など API 利用者側システムの DB の ERD 定義のインプットになる事が多いため。もし行う場合は API のバージョンを上げることや、連携先に桁数変更の旨を調整するなどの考慮を行う。

    区分値

    区分値の場合は enum 属性を利用し、descriptionには区分値の論理名を記載する。

    yaml
    name: gender
    +type: string
    +enum: ["0", "1", "2", "9"]
    +description: |
    +  性別
    +    0: 不明
    +    1: 男
    +    2: 女
    +    9: 適用不能

    OpenAPI 3.0 では区分値の再利用ができるため、横断的に用いる区分値は components 側で定義する。

    yaml
    paths:
    +  /products:
    +    get:
    +      parameters:
    +        - in: query
    +          name: gender
    +          required: true
    +          schema:
    +            $ref: "#/components/schemas/Gender"
    +components:
    +  schemas:
    +    Gender:
    +      type: string
    +      enum: ["0", "1", "2", "9"]

    固定値

    固定値 の場合も enum を 1 つだけ指定して表現する。この場合もレスポンスで利用する場合は指定しない

    yaml
    name: file_layout
    +type: string
    +enum: ["json"]
    +description: ファイルレイアウト

    その他(正規表現)

    正規表現で表現できる文字列はpatternを利用して定義する。桁や区分値で代替できる場合は、pattern を用いない

    例:

    yaml
    remind_time:
    +  type: string
    +  description: リマインド時刻。(hh:mm)形式
    +  example: 23:59
    +  pattern: "^(2[0-3]|[01][0-9]):([0-5][0-9])$"

    ファイル分割

    OpenAPI ドキュメントは単一のファイルで構成することも複数の分割されたファイルで構成することもできるが、複数のファイルに分割することを推奨する。

    理由:

    • API path ごとに担当者を分けて設計する場合などに、複数人による編集によって意図しないコンフリクトが発生することを防ぐ
    • ファイルの肥大化による、可読性の低下を防ぐ

    分割方法の選定

    開発方針や OpenAPI の使用用途に合わせて、都合の良いファイルの分割方法を採用する。例えば、以下のような方法がある。

    1. API path ごとに設計担当者を分けて、それぞれに OpenAPI を編集する場合は、path の単位で分割する。
    2. テストツールとして stoplightio/prismを使用する場合、テストケースごとにデータファイルを作成して、examples にファイルパスを指定する。

    注意点:

    サンプル説明

    分割方法 1, 2 の両方に当てはまる場合のサンプルを用いて説明する。openapi.yaml とディレクトリ構成は下の通り。全量は sample_dividedを参照すること。

    • リソース単位にディレクトリを作成して、path ごとに定義ファイルを格納する。

    • components の schemas モデルの中身は別ファイルとして切り出すことが可能である。

      yaml
      # openapi.yaml(ファイル分割例)
      +openapi: "3.0.3"
      +info:
      +  version: 1.0.0
      +  title: Swagger Petstore
      +security:
      +  - Bearer: []
      +servers:
      +  - url: http://petstore.swagger.io/v1
      +tags:
      +  - name: pets
      +    description: Everything about your Pets
      +paths:
      +  /pets:
      +    $ref: "./pets/pets.yaml"
      +  /pets/{pet_id}:
      +    $ref: "./pets/pets_pet_id.yaml"
      +
      +components:
      +  securitySchemes:
      +    Bearer:
      +      type: http
      +      scheme: bearer
      +      bearerFormat: JWT
      +      description: "Authenthicaiton with bearer token"
      sh
      # ディレクトリ構成(ファイル分割例)
      +
      +├─openapi.gen.yaml
      +├─openapi.yaml
      +
      +├─examples
      +  ├─pets_get
      +    ├─test_case_001.yaml
      +    └─test_case_002.yaml
      +
      +  ├─pets_pet_id_get
      +    └─test_case_003.yaml
      +
      +  └─pets_post
      +       └─test_case_004.yaml
      +
      +└─pets
      +  ├─pets.yaml
      +  └─pets_pet_id.yaml
    • openapi.yamlpaths に記載した API ファイルは以下のように作成する(例: pets-pet-id.yaml)。

    • examples には、例えば各 API のテストケース ID をキーとして指定(TestCase003)し、該当するテストケースのデータファイルパスを参照させる。

      pets-pet-id.yamlを見る
      yaml
      # pets-pet-id.yaml(API path 別ファイルの記載例)
      +get:
      +  summary: Get details of a pet
      +  description: Get details of a pet by specifying its pet ID.
      +  operationId: getPetsPetId
      +  tags:
      +    - pets
      +  parameters:
      +    - name: pet_id
      +      in: path
      +      description: The id of the pet to retrieve
      +      schema:
      +        type: string
      +      required: true
      +  responses:
      +    "200":
      +      description: Expected response to a valid request
      +      content:
      +        application/json:
      +          schema:
      +            type: object
      +            properties:
      +              pet_detail:
      +                type: object
      +                properties:
      +                  breeder:
      +                    type: string
      +                  date_of_birth:
      +                    type: string
      +                    format: date
      +                  pedigree:
      +                    type: object
      +                    properties:
      +                      registration_no:
      +                        type: integer
      +                        format: int64
      +                      date_of_registration:
      +                        type: string
      +                        format: date
      +                      pedigree_image:
      +                        type: string
      +                    required:
      +                      - registration_no
      +                      - date_of_registration
      +                      - pedigree_image
      +            required:
      +              - pet_detail
      +          examples:
      +            TestCase003:
      +              $ref: "../examples/pets_pet_id_get/test_case_003.yaml"
      +    "404":
      +      $ref: "../common/responses.yaml#/components/responses/NotFound"
      +    "500":
      +      $ref: "../common/responses.yaml#/components/responses/InternalServerError"
    • OpenAPI の使用用途により、分割ファイルを1つのファイルにまとめる必要がある場合には、例えばRedocly CLIを使用して以下コマンドを実行する

    • まとめたファイルは、以下のようになる(例: openapi.gen.yaml)。

      bash
      redocly bundle openapi.yaml --output openapi.gen.yaml
      openapi.gen.yamlを見る
      yaml
      # openapi.gen.yaml(ファイルBundle後)
      +openapi: 3.0.3
      +info:
      +  version: 1.0.0
      +  title: Swagger Petstore
      +servers:
      +  - url: http://petstore.swagger.io/v1
      +security:
      +  - Bearer: []
      +tags:
      +  - name: pets
      +    description: Everything about your Pets
      +paths:
      +  /pets:
      +    get:
      +      summary: Search a pet list
      +      description: Search a list of registered pets up to 100.
      +      operationId: getPets
      +      tags:
      +        - pets
      +      parameters:
      +        - name: limit
      +          in: query
      +          description: How many items to return at one time (max 100)
      +          schema:
      +            type: integer
      +            maximum: 100
      +            format: int32
      +          required: false
      +      responses:
      +        "200":
      +          description: A paged array of pets
      +          headers:
      +            x-next:
      +              description: A link to the next page of responses
      +              schema:
      +                type: string
      +          content:
      +            application/json:
      +              schema:
      +                type: object
      +                properties:
      +                  pets:
      +                    type: array
      +                    maxItems: 100
      +                    items:
      +                      type: object
      +                      properties:
      +                        id:
      +                          type: integer
      +                          format: int64
      +                        name:
      +                          type: string
      +                          maxLength: 50
      +                        category:
      +                          type: string
      +                          maxLength: 10
      +                        sub_category:
      +                          type: string
      +                          maxLength: 50
      +                        age:
      +                          type: integer
      +                          format: int32
      +                        sex:
      +                          type: string
      +                          maxLength: 6
      +                        note:
      +                          type: string
      +                          maxLength: 200
      +                        tag:
      +                          type: string
      +                          maxLength: 20
      +                      required:
      +                        - id
      +                        - name
      +                        - category
      +                        - age
      +                        - sex
      +              examples:
      +                TestCase001:
      +                  $ref: "#/components/examples/test_case_001"
      +                TestCase002:
      +                  $ref: "#/components/examples/test_case_002"
      +        "404":
      +          $ref: "#/components/responses/NotFound"
      +        "500":
      +          $ref: "#/components/responses/InternalServerError"
      +    post:
      +      summary: Register a pet
      +      description: Reginster basic information of new pet.
      +      operationId: postPets
      +      tags:
      +        - pets
      +      requestBody:
      +        content:
      +          application/json:
      +            schema:
      +              type: object
      +              properties:
      +                pet:
      +                  type: object
      +                  properties:
      +                    id:
      +                      type: integer
      +                      format: int64
      +                    name:
      +                      type: string
      +                      maxLength: 50
      +                    category:
      +                      type: string
      +                      maxLength: 10
      +                    sub_category:
      +                      type: string
      +                      maxLength: 50
      +                    age:
      +                      type: integer
      +                      format: int32
      +                    sex:
      +                      type: string
      +                      maxLength: 6
      +                    note:
      +                      type: string
      +                      maxLength: 200
      +                    tag:
      +                      type: string
      +                      maxLength: 20
      +                  required:
      +                    - id
      +                    - name
      +                    - category
      +                    - age
      +                    - sex
      +              required:
      +                - pet
      +            examples:
      +              TestCase004:
      +                $ref: "#/components/examples/test_case_004"
      +        required: true
      +      responses:
      +        "200":
      +          description: OK
      +          content:
      +            application/json:
      +              schema:
      +                type: object
      +                properties:
      +                  id:
      +                    type: integer
      +                    format: int64
      +                  name:
      +                    type: string
      +                    maxLength: 50
      +                  category:
      +                    type: string
      +                    maxLength: 10
      +                  sub_category:
      +                    type: string
      +                    maxLength: 50
      +                  age:
      +                    type: integer
      +                    format: int32
      +                  sex:
      +                    type: string
      +                    maxLength: 6
      +                  note:
      +                    type: string
      +                    maxLength: 200
      +                  tag:
      +                    type: string
      +                    maxLength: 20
      +                required:
      +                  - id
      +                  - name
      +                  - category
      +                  - age
      +                  - sex
      +        "404":
      +          $ref: "#/components/responses/NotFound"
      +        "500":
      +          $ref: "#/components/responses/InternalServerError"
      +  /pets/{pet_id}:
      +    get:
      +      summary: Get details of a pet
      +      description: Get details of a pet by specifying its pet ID.
      +      operationId: getPetsPetId
      +      tags:
      +        - pets
      +      parameters:
      +        - name: pet_id
      +          in: path
      +          description: The id of the pet to retrieve
      +          schema:
      +            type: string
      +          required: true
      +      responses:
      +        "200":
      +          description: Expected response to a valid request
      +          content:
      +            application/json:
      +              schema:
      +                type: object
      +                properties:
      +                  pet_detail:
      +                    type: object
      +                    properties:
      +                      breeder:
      +                        type: string
      +                      date_of_birth:
      +                        type: string
      +                        format: date
      +                      pedigree:
      +                        type: object
      +                        properties:
      +                          registration_no:
      +                            type: integer
      +                            format: int64
      +                          date_of_registration:
      +                            type: string
      +                            format: date
      +                          pedigree_image:
      +                            type: string
      +                        required:
      +                          - registration_no
      +                          - date_of_registration
      +                          - pedigree_image
      +                required:
      +                  - pet_detail
      +              examples:
      +                TestCase003:
      +                  $ref: "#/components/examples/test_case_003"
      +        "404":
      +          $ref: "#/components/responses/NotFound"
      +        "500":
      +          $ref: "#/components/responses/InternalServerError"
      +components:
      +  securitySchemes:
      +    Bearer:
      +      type: http
      +      scheme: bearer
      +      bearerFormat: JWT
      +      description: Authenthicaiton with bearer token
      +  examples:
      +    test_case_001:
      +      value:
      +        pets:
      +          - id: 10001
      +            name: ToyPoodle
      +            category: dog
      +            sub_category: ToyPoodle
      +            age: 1
      +            sex: male
      +            note: friendly
      +            tag: dog10001
      +          - id: 10002
      +            name: Chihuahua
      +            category: dog
      +            sub_category: Chihuahua
      +            age: 1
      +            sex: female
      +            note: friendly
      +            tag: dog10002
      +          - id: 10003
      +            name: Shiba
      +            category: dog
      +            sub_category: Shiba
      +            age: 1
      +            sex: male
      +            note: friendly
      +            tag: dog10003
      +          - id: 10004
      +            name: MiniatureDachshund
      +            category: dog
      +            sub_category: MiniatureDachshund
      +            age: 1
      +            sex: female
      +            note: friendly
      +            tag: dog10004
      +    test_case_002:
      +      value:
      +        pets: []
      +    test_case_004:
      +      value:
      +        pet:
      +          id: 10005
      +          name: FrenchBulldog
      +          category: dog
      +          sub_category: FrenchBulldog
      +          age: 1
      +          sex: male
      +          note: friendly
      +          tag: dog10005
      +    test_case_003:
      +      value:
      +        pet_detail:
      +          breeder: BreederName
      +          date_of_birth: "2023-10-31"
      +          pedigree:
      +            registration_no: 11111111
      +            date_of_registration: "2023-10-31"
      +            pedigree_image: 9j2wBDAA...8QAPxAAAQQABAMGBAYDAAEDAg
      +  schemas:
      +    ProblemDetailError:
      +      type: object
      +      properties:
      +        code:
      +          type: integer
      +          format: int32
      +        message:
      +          type: string
      +      required:
      +        - code
      +        - message
      +  responses:
      +    NotFound:
      +      description: Not Found
      +      content:
      +        application/json:
      +          schema:
      +            $ref: "#/components/schemas/ProblemDetailError"
      +    InternalServerError:
      +      description: Internal Server Error
      +      content:
      +        application/json:
      +          schema:
      +            $ref: "#/components/schemas/ProblemDetailError"

    License

    CC-By-4.0


    1. https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/enable-cors-for-resource-using-swagger-importer-tool.html ↩︎

    `,66))])}const D=h(c,[["render",g]]);export{A as __pageData,D as default}; diff --git a/assets/documents_forOpenAPISpecification_file_standards.md.BenCgDHA.js b/assets/documents_forOpenAPISpecification_file_standards.md.BenCgDHA.js new file mode 100644 index 00000000..798c79d3 --- /dev/null +++ b/assets/documents_forOpenAPISpecification_file_standards.md.BenCgDHA.js @@ -0,0 +1,19 @@ +import{_ as a,c as i,a3 as n,o as e}from"./chunks/framework.BDUoXecB.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forOpenAPISpecification/file_standards.md","filePath":"documents/forOpenAPISpecification/file_standards.md"}'),l={name:"documents/forOpenAPISpecification/file_standards.md"};function p(t,s,r,h,d,o){return e(),i("div",null,s[0]||(s[0]=[n(`

    ファイルフォーマット規約

    フォーマット

    OpenAPI ドキュメントは JSON 形式、YAML 形式いずれかのフォーマットで記載できるが YAML 形式 を利用する。

    理由として、JSON と比較して YAML は視覚的に見やすく、レビューや差分管理が行いやすいためである。

    ファイル名

    ファイルの拡張子は yaml とする。通常ファイル名は api.yamlswagger.yaml(v2 の場合) を推奨する。

    もし、複数の Swagger 定義を管理するため区別したい場合は \${service}_api.yaml とする。

    \${service} にはサービス名を指定する

    YAML バージョン

    YAML v1.2を用いる。

    ファイルレイアウト

    • ファイルの最終行には空行を入れる
    • 文字コードは UTF-8 とする
    • タブは半角スペース 2 つとする

    クォート

    クォートは可読性を上げるために、できる限り利用しない。利用する場合はダブルクォートを利用する。

    yaml
    # OK
    +description: 何かしらの説明
    +
    +# NG(クォートでのラップは不要)
    +description: '何かしらの説明'
    +description: "何かしらの説明"

    以下の場合は必須で利用する

    • 文字列として認識させる必要のある数字("0123")
    • 60 進数と認識させたくない場合("12:34")
    • Bool として認識させたくない("true", "false", "yes", "no", "y", "n", "on", "off")
    • # で始まる文字列(# はコメントを示す記号のためである。例: #/definitions/Users

    YAML 配列スタイル

    • 複数項目を指定する場合は、 Flow style(配列スキーム) を用いることを推奨する

      yaml
      # OK(推奨: 配列リテラル構文)
      +required: [user_id, user_name, account_type, register_at]
      +
      +# NG(非推奨: リスト構文)
      +required:
      +  - user_id
      +  - user_name
      +  - account_type
      +  - register_at
      • YAML は項目定義がネストすることで縦長な定義になりやすい。情報密度を上げるために配列リテラルを推奨する

    改行の表現

    改行を含む場合は、パイプ(ブロックスカラー) | を用いる

    yaml
    description: |
    +  説明文1
    +  説明文2
    +     - 箇条書き1
    +     - 箇条書き2
    +     - 箇条書き3
    `,22)]))}const u=a(l,[["render",p]]);export{c as __pageData,u as default}; diff --git a/assets/documents_forOpenAPISpecification_file_standards.md.BenCgDHA.lean.js b/assets/documents_forOpenAPISpecification_file_standards.md.BenCgDHA.lean.js new file mode 100644 index 00000000..798c79d3 --- /dev/null +++ b/assets/documents_forOpenAPISpecification_file_standards.md.BenCgDHA.lean.js @@ -0,0 +1,19 @@ +import{_ as a,c as i,a3 as n,o as e}from"./chunks/framework.BDUoXecB.js";const c=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forOpenAPISpecification/file_standards.md","filePath":"documents/forOpenAPISpecification/file_standards.md"}'),l={name:"documents/forOpenAPISpecification/file_standards.md"};function p(t,s,r,h,d,o){return e(),i("div",null,s[0]||(s[0]=[n(`

    ファイルフォーマット規約

    フォーマット

    OpenAPI ドキュメントは JSON 形式、YAML 形式いずれかのフォーマットで記載できるが YAML 形式 を利用する。

    理由として、JSON と比較して YAML は視覚的に見やすく、レビューや差分管理が行いやすいためである。

    ファイル名

    ファイルの拡張子は yaml とする。通常ファイル名は api.yamlswagger.yaml(v2 の場合) を推奨する。

    もし、複数の Swagger 定義を管理するため区別したい場合は \${service}_api.yaml とする。

    \${service} にはサービス名を指定する

    YAML バージョン

    YAML v1.2を用いる。

    ファイルレイアウト

    • ファイルの最終行には空行を入れる
    • 文字コードは UTF-8 とする
    • タブは半角スペース 2 つとする

    クォート

    クォートは可読性を上げるために、できる限り利用しない。利用する場合はダブルクォートを利用する。

    yaml
    # OK
    +description: 何かしらの説明
    +
    +# NG(クォートでのラップは不要)
    +description: '何かしらの説明'
    +description: "何かしらの説明"

    以下の場合は必須で利用する

    • 文字列として認識させる必要のある数字("0123")
    • 60 進数と認識させたくない場合("12:34")
    • Bool として認識させたくない("true", "false", "yes", "no", "y", "n", "on", "off")
    • # で始まる文字列(# はコメントを示す記号のためである。例: #/definitions/Users

    YAML 配列スタイル

    • 複数項目を指定する場合は、 Flow style(配列スキーム) を用いることを推奨する

      yaml
      # OK(推奨: 配列リテラル構文)
      +required: [user_id, user_name, account_type, register_at]
      +
      +# NG(非推奨: リスト構文)
      +required:
      +  - user_id
      +  - user_name
      +  - account_type
      +  - register_at
      • YAML は項目定義がネストすることで縦長な定義になりやすい。情報密度を上げるために配列リテラルを推奨する

    改行の表現

    改行を含む場合は、パイプ(ブロックスカラー) | を用いる

    yaml
    description: |
    +  説明文1
    +  説明文2
    +     - 箇条書き1
    +     - 箇条書き2
    +     - 箇条書き3
    `,22)]))}const u=a(l,[["render",p]]);export{c as __pageData,u as default}; diff --git a/assets/documents_forOpenAPISpecification_index.md.Domo3uDK.js b/assets/documents_forOpenAPISpecification_index.md.Domo3uDK.js new file mode 100644 index 00000000..16d5c6fa --- /dev/null +++ b/assets/documents_forOpenAPISpecification_index.md.Domo3uDK.js @@ -0,0 +1 @@ +import{_ as e,c as a,a3 as r,o as d}from"./chunks/framework.BDUoXecB.js";const l=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"OpenAPI Specification規約","tagline":"Future Enterprise Naming Convention Standards for OpenAPI Specification","actions":[{"theme":"brand","text":"OAS 3.0.3 規約","link":"./OpenAPI_Specification_3.0.3.md"},{"theme":"brand","text":"OAS 2.0(Swagger 2.0)規約","link":"./OpenAPI_Specification_2.0.md"}]}},"headers":[],"relativePath":"documents/forOpenAPISpecification/index.md","filePath":"documents/forOpenAPISpecification/index.md"}'),i={name:"documents/forOpenAPISpecification/index.md"};function o(n,t,c,p,s,h){return d(),a("div",null,t[0]||(t[0]=[r('

    OpenAPI Specification(OAS)の規約を、設計・開発・テスト・可読性・保守性・ツールによるコード生成や静的解析の観点からまとめています。

    対応するバージョンについて

    OpenAPI Specification(OAS)の規約を設計、開発、テスト、可読性、保守性、ツールによるコード生成や静的解析の観点からまとめています。

    OAS は次のように複数のバージョンが存在します。

    VersionDateNotes
    3.1.02021-02-15Release of the OpenAPI Specification 3.1.0
    3.0.32020-02-20Patch release of the OpenAPI Specification 3.0.3
    3.0.22018-10-08Patch release of the OpenAPI Specification 3.0.2
    3.0.12017-12-06Patch release of the OpenAPI Specification 3.0.1
    3.0.02017-07-26Release of the OpenAPI Specification 3.0.0
    2.02014-09-08Release of Swagger 2.0
    1.22014-03-14Initial release of the formal document.
    1.12012-08-22Release of Swagger 1.1
    1.02011-08-10First release of the Swagger Specification

    本規約はコード生成などのエコシステムがよく対応している、 3.0.32.0 の 2 つに対応しています。2023 年 3 月時点における最新の 3.1.0 には対応していないのでご注意ください。

    もし、新規に OpenAPI Specification で Web API の設計開発をする方は、 3.0.3 系を利用することを推奨しています。 2.0 系の規約に関しては、既存で利用しているシステムの存在や、利用を想定しているツールの制限などで必要な場面が少なからずあるということで公開しています。

    どのツールがどのバージョンに対応しているかは、以下のサイトを参考ください。

    https://openapi.tools/

    OpenAPI Specification Standards

    Versionコーディング規約
    3.0.3OAS 3.0.3 規約
    2.0OAS 2.0(Swagger 2.0)規約

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。 (これらのファイルはPandocを利用して作成しています。)

    ',14)]))}const S=e(i,[["render",o]]);export{l as __pageData,S as default}; diff --git a/assets/documents_forOpenAPISpecification_index.md.Domo3uDK.lean.js b/assets/documents_forOpenAPISpecification_index.md.Domo3uDK.lean.js new file mode 100644 index 00000000..16d5c6fa --- /dev/null +++ b/assets/documents_forOpenAPISpecification_index.md.Domo3uDK.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,a3 as r,o as d}from"./chunks/framework.BDUoXecB.js";const l=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"OpenAPI Specification規約","tagline":"Future Enterprise Naming Convention Standards for OpenAPI Specification","actions":[{"theme":"brand","text":"OAS 3.0.3 規約","link":"./OpenAPI_Specification_3.0.3.md"},{"theme":"brand","text":"OAS 2.0(Swagger 2.0)規約","link":"./OpenAPI_Specification_2.0.md"}]}},"headers":[],"relativePath":"documents/forOpenAPISpecification/index.md","filePath":"documents/forOpenAPISpecification/index.md"}'),i={name:"documents/forOpenAPISpecification/index.md"};function o(n,t,c,p,s,h){return d(),a("div",null,t[0]||(t[0]=[r('

    OpenAPI Specification(OAS)の規約を、設計・開発・テスト・可読性・保守性・ツールによるコード生成や静的解析の観点からまとめています。

    対応するバージョンについて

    OpenAPI Specification(OAS)の規約を設計、開発、テスト、可読性、保守性、ツールによるコード生成や静的解析の観点からまとめています。

    OAS は次のように複数のバージョンが存在します。

    VersionDateNotes
    3.1.02021-02-15Release of the OpenAPI Specification 3.1.0
    3.0.32020-02-20Patch release of the OpenAPI Specification 3.0.3
    3.0.22018-10-08Patch release of the OpenAPI Specification 3.0.2
    3.0.12017-12-06Patch release of the OpenAPI Specification 3.0.1
    3.0.02017-07-26Release of the OpenAPI Specification 3.0.0
    2.02014-09-08Release of Swagger 2.0
    1.22014-03-14Initial release of the formal document.
    1.12012-08-22Release of Swagger 1.1
    1.02011-08-10First release of the Swagger Specification

    本規約はコード生成などのエコシステムがよく対応している、 3.0.32.0 の 2 つに対応しています。2023 年 3 月時点における最新の 3.1.0 には対応していないのでご注意ください。

    もし、新規に OpenAPI Specification で Web API の設計開発をする方は、 3.0.3 系を利用することを推奨しています。 2.0 系の規約に関しては、既存で利用しているシステムの存在や、利用を想定しているツールの制限などで必要な場面が少なからずあるということで公開しています。

    どのツールがどのバージョンに対応しているかは、以下のサイトを参考ください。

    https://openapi.tools/

    OpenAPI Specification Standards

    Versionコーディング規約
    3.0.3OAS 3.0.3 規約
    2.0OAS 2.0(Swagger 2.0)規約

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。 (これらのファイルはPandocを利用して作成しています。)

    ',14)]))}const S=e(i,[["render",o]]);export{l as __pageData,S as default}; diff --git a/assets/documents_forOpenAPISpecification_prerequisite.md.CpQ2zmO7.js b/assets/documents_forOpenAPISpecification_prerequisite.md.CpQ2zmO7.js new file mode 100644 index 00000000..8a6ea834 --- /dev/null +++ b/assets/documents_forOpenAPISpecification_prerequisite.md.CpQ2zmO7.js @@ -0,0 +1 @@ +import{_ as i,c as l,a3 as t,o}from"./chunks/framework.BDUoXecB.js";const S=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forOpenAPISpecification/prerequisite.md","filePath":"documents/forOpenAPISpecification/prerequisite.md"}'),a={name:"documents/forOpenAPISpecification/prerequisite.md"};function n(r,e,u,p,s,c){return o(),l("div",null,e[0]||(e[0]=[t('

    前提条件

    本規約は以下の前提で作成されたものである。

    • 業務システム向けの Web API 提供
      • サードパーティ向けに広く開発する Web API ではなく、限られたクライアントやシステムと連携すること
      • いわゆる、LSUDs(Large Set of Unknown Developers)ではなく、SSKDs(Small Set of Known Developers)を対象とする
    • RESTish な Web API
      • 原理的な REST を必ずしも守る必要はないが、例えば HTTP メソッドは、参照は GET、登録は POST、更新は PUT や PATCH、削除は DELETE で使い分けていたり、Web API の要求が成功すれば 200(OK)、204(No Content)を返し、リソースが無ければ 404(Not Found)、操作に失敗すれば 500 系のエラーを返すといったことを指す
      • 本規約を利用するに当たり必須条件ではないが、定義例などはそれに基づいて記載しているので注意する
    • スキーマファースト
      • OpenAPI Specification の定義ファイルを駆動に、クライアント・サーバサイドのコード生成やモック時の利用に用い、高速な Web API 開発につなげることを前提とする
        • Python における、FastAPI・Django REST Framework のように、アプリケーションコードから OpenAPI document を自動生成する開発手法も存在するが、本規約はこれは想定しない
      • 定義ファイルの完成度はできるかぎり高め、コード生成やドキュメントの価値を高める
        • OAS 定義からコードを生成し、通常は記載した型・項目長・最大~最小・enum・必須定義・正規表現フォーマットでバリデーションを行い、カバーできない部分のバリデーションをアプリケーション固有ロジックとして実装する方針とする。例えば、複数項目間のチェックや DB を確認しないと行えないチェックである
        • ドキュメントとしての価値を高めるため、その API 呼び出しで発生しうる全ての HTTP ステータスコードを記載する
          • API の振る舞いを読み手に伝えるものとして、どのような異常系があるかは有用な場合が多いからである
    • JavaScript/TypeScript、Java、Go のエコシステムがターゲット
      • OpenAPI Specification は広く受け入れられており、コレに対応する様々なツールやフレームワークといったエコシステムがあり、中には定義された設定がうまく認識されない場合がある。本規約では対応していないツールが多い場合、特定の記法を非推奨とすることがあり、同時にその理由も説明する
      • 全ての言語・フレームワーク・ツールの対応状況は調査しきれていないため、利用するプロダクトの対応状況は利用者側で確認をお願いする
    ',5)]))}const d=i(a,[["render",n]]);export{S as __pageData,d as default}; diff --git a/assets/documents_forOpenAPISpecification_prerequisite.md.CpQ2zmO7.lean.js b/assets/documents_forOpenAPISpecification_prerequisite.md.CpQ2zmO7.lean.js new file mode 100644 index 00000000..8a6ea834 --- /dev/null +++ b/assets/documents_forOpenAPISpecification_prerequisite.md.CpQ2zmO7.lean.js @@ -0,0 +1 @@ +import{_ as i,c as l,a3 as t,o}from"./chunks/framework.BDUoXecB.js";const S=JSON.parse('{"title":"","description":"","frontmatter":{},"headers":[],"relativePath":"documents/forOpenAPISpecification/prerequisite.md","filePath":"documents/forOpenAPISpecification/prerequisite.md"}'),a={name:"documents/forOpenAPISpecification/prerequisite.md"};function n(r,e,u,p,s,c){return o(),l("div",null,e[0]||(e[0]=[t('

    前提条件

    本規約は以下の前提で作成されたものである。

    • 業務システム向けの Web API 提供
      • サードパーティ向けに広く開発する Web API ではなく、限られたクライアントやシステムと連携すること
      • いわゆる、LSUDs(Large Set of Unknown Developers)ではなく、SSKDs(Small Set of Known Developers)を対象とする
    • RESTish な Web API
      • 原理的な REST を必ずしも守る必要はないが、例えば HTTP メソッドは、参照は GET、登録は POST、更新は PUT や PATCH、削除は DELETE で使い分けていたり、Web API の要求が成功すれば 200(OK)、204(No Content)を返し、リソースが無ければ 404(Not Found)、操作に失敗すれば 500 系のエラーを返すといったことを指す
      • 本規約を利用するに当たり必須条件ではないが、定義例などはそれに基づいて記載しているので注意する
    • スキーマファースト
      • OpenAPI Specification の定義ファイルを駆動に、クライアント・サーバサイドのコード生成やモック時の利用に用い、高速な Web API 開発につなげることを前提とする
        • Python における、FastAPI・Django REST Framework のように、アプリケーションコードから OpenAPI document を自動生成する開発手法も存在するが、本規約はこれは想定しない
      • 定義ファイルの完成度はできるかぎり高め、コード生成やドキュメントの価値を高める
        • OAS 定義からコードを生成し、通常は記載した型・項目長・最大~最小・enum・必須定義・正規表現フォーマットでバリデーションを行い、カバーできない部分のバリデーションをアプリケーション固有ロジックとして実装する方針とする。例えば、複数項目間のチェックや DB を確認しないと行えないチェックである
        • ドキュメントとしての価値を高めるため、その API 呼び出しで発生しうる全ての HTTP ステータスコードを記載する
          • API の振る舞いを読み手に伝えるものとして、どのような異常系があるかは有用な場合が多いからである
    • JavaScript/TypeScript、Java、Go のエコシステムがターゲット
      • OpenAPI Specification は広く受け入れられており、コレに対応する様々なツールやフレームワークといったエコシステムがあり、中には定義された設定がうまく認識されない場合がある。本規約では対応していないツールが多い場合、特定の記法を非推奨とすることがあり、同時にその理由も説明する
      • 全ての言語・フレームワーク・ツールの対応状況は調査しきれていないため、利用するプロダクトの対応状況は利用者側で確認をお願いする
    ',5)]))}const d=i(a,[["render",n]]);export{S as __pageData,d as default}; diff --git "a/assets/documents_forSQL_SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.md.DWD8TXZm.js" "b/assets/documents_forSQL_SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.md.DWD8TXZm.js" new file mode 100644 index 00000000..4b2acc87 --- /dev/null +++ "b/assets/documents_forSQL_SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.md.DWD8TXZm.js" @@ -0,0 +1,183 @@ +import{_ as a,c as n,G as l,a3 as p,B as e,o as h}from"./chunks/framework.BDUoXecB.js";const o=JSON.parse('{"title":"SQLコーディング規約(Oracle)","description":"","frontmatter":{"sidebarDepth":4,"title":"SQLコーディング規約(Oracle)","author":"Future Enterprise Coding Standards","head":[["meta",{"name":"keywords","content":"SQLコーディング規約,Oracle,コーディング規約,SQL"}]]},"headers":[],"relativePath":"documents/forSQL/SQLコーディング規約(Oracle).md","filePath":"documents/forSQL/SQLコーディング規約(Oracle).md"}'),t={name:"documents/forSQL/SQLコーディング規約(Oracle).md"};function k(r,s,d,E,c,b){const i=e("page-title");return h(),n("div",null,[l(i),s[0]||(s[0]=p(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    前提条件

    本書は、SQL コーディング規約についてまとめたものである。
    今回 RDBMS として採用する Oracle での SQL の使用を前提に記述している。

    SQL コーティング規約(可読性・管理性)

    本章では可読性・管理性を高めることを目的としたコーディング規約について記載する。

    書式全般

    書式全般についてのコーディング規約を下記に示す。

    • 1 行につき、1 文のみを記述する。
    • SQL 中のインデントは、Java コーディング規約にあわせて半角スペースではなくタブ文字とする。
    • ヘボン式ローマ字を使用する。
    • 外来語に関しては、原語の綴りを使用する。
    • 横は 80 文字を目安に改行する。
    • 定数を条件に用いる場合やインライン・ビューで取得したいデータなど開発者の意図はコメントにて記載する。

    予約語

    予約語に対しては、大文字を使用する。(例 : SELECTINSERTUPDATEDELETE 等)

    予約語以外

    予約語以外に対しても、予約語と同様に大文字を使用する。(例 : オブジェクト名、カラム名 等)

    短縮名称

    SQL 中に記述するエイリアス名など単語の短縮について示す。

    1. 外来語に関しては、原語の短縮形を使用する。短縮形が存在しない場合には、母音を抜かして表記する。
      例) corporation → corp / computer → cmptr

    2. ローマ字の短縮は、単語の区切れの頭文字、または母音を抜かした子音字等を利用する。
      例) nichijo → nchj

    • カラムには必ずテーブルエイリアスを付与する
    • テーブルのエイリアスは必ず付与すること。
      必要ない場合(単一テーブルへの SELECT 等)も必ず付与すること
      また、テーブルのエイリアス名は同 SQL 文の中で重複しないように命名すること。
      (副問い合わせで利用したエイリアス名をメインの SQL 中のエイリアス名に利用しない。など)

    文字コード

    SQL ファイルの文字コード(エンコーディング)は Java ソースファイルと同じく『 Unicode UTF-8 』で保存する。

    不要な空白文字(スペース)は除去する

    不要な空白文字(スペース)は除去すること。

    SQL 文の整形

    DML 文の節に対する予約語は左揃えにする。
    項目ごとに改行を入れ、項目の前にはインデントを挿入する。カンマは項目の前へ記入する。
    Java ソースファイルのようにファイルの先頭にコメント行を入れると DB 分析作業に支障があるため禁止とする。
    よって SQL ファイルの先頭は必ずSELECTUPDATEINSERTDELETEMERGEの何れかになる。

    物理カラム名、テーブル名に対応する論理名を入れる場合、その後ろに単数行コメント(-- )にて記述する。
    SQL 内に挿入する単数行コメントは、/*(半角スペース)コメント本文(半角スペース)*/ で行う。
    ,(カンマ)とANDについては各行の先頭に記述する。(以下の例を参照のこと)
    SQL フレームワークで実行する SQL の場合、SQL ステートメントの終わりを示す;(セミコロン)は記述しない。

    良い例:

    sql
    SELECT
    +/*
    +	処理名
    +*/
    +	TBL1.COLUMN1	AS	COLUMN1	-- カラム1
    +,	TBL1.COLUMN2	AS	COLUMN2	-- カラム2
    +FROM
    +	TABLE1	TBL1	-- テーブル1

    WHERE 句の=!=ISIS NULLIS)の縦位置は揃える。

    良い例:

    sql
    WHERE
    +	A.TEN_NO	=	B.TEN_NO
    +AND	A.KAMOKU_CD	!=	'1'
    +AND	A.ANKEN_NO	IS	NULL

    SELECT 文

    良い例:

    sql
    SELECT
    +	TBL1.COLUMN1	AS	COLUMN1	-- カラム1
    +,	TBL1.COLUMN2	AS	COLUMN2	-- カラム2
    +FROM
    +	TABLE1	TBL1	-- テーブル1
    +WHERE
    +	TBL1.COLUMN3	=	1
    +ORDER BY
    +	TBL1.COLUMN1
    +,	TBL1.COLUMN2

    INSERT 文

    良い例:

    sql
    INSERT
    +INTO
    +	TABLE1	-- テーブル1
    +(
    +	COLUMN1	-- カラム1
    +,	COLUMN2	-- カラム2
    +,	COLUMN3	-- カラム3
    +) VALUES (
    +	VALUE1
    +,	VALUE2
    +,	VALUE3
    +)

    UPDATE 文

    良い例:

    sql
    UPDATE
    +	TABLE1	TBL1	-- テーブル1
    +SET
    +	TBL1.COLUMN2	=	100	-- カラム2
    +,	TBL1.COLUMN3	=	100	-- カラム3
    +WHERE
    +	TBL1.COLUMN1	=	10

    DELETE 文

    良い例:

    sql
    DELETE
    +FROM
    +	TABLE1	TBL1	-- テーブル1
    +WHERE
    +	TBL1.VALUE	=	1

    MERGE 文

    DB 結合条件が一致した場合と不一致になった場合の、それぞれの SQL 文を記述する。

    良い例:

    sql
    MERGE
    +INTO
    +	PROFILE	P				-- PROFILEテーブル
    +USING
    +	NAME	N				-- NAMEテーブル
    +ON
    +	(
    +		P.NAME	= N.NAME		-- 条件
    +	)
    +WHEN MATCHED THEN			-- 条件が一致
    +	/*UPDATE文*/
    +WHEN NOT MATCHED THEN		-- 条件が不一致
    +	/*INSERT文*/

    AND(副問い合わせ)

    良い例:

    sql
    AND	XXX	=	(
    +		SELECT
    +			TBL1.COLUMN1
    +		,	TBL1.COLUMN2
    +		FROM
    +			TABLE1	TBL1
    +	)

    CASE 式

    CASE 式は下記のように記載すること。

    良い例:

    sql
    CASE
    +	WHEN
    +		XXX.HOGE	=	YYY.FUGA
    +	AND	XXX.FUGA	=	YYY.FUGA
    +	THEN
    +		1
    +	ELSE
    +		0
    +END

    CASEWHENTHENELSEの後に改行を挿入すること。
    CASEの後、ENDの前までは 1 インデント挿入すること。

    IN 句

    カンマの後にスペースを1文字入れる。

    比較演算子

    比較演算子の前後にタブ(またはスペース)を1文字入れる。

    改行位置

    SELECT 句、ORDER BY 句、GROUP BY 句等は最初に出現するカラムとカラムの区切りのカンマ前に改行を入れること。
    SELECT の FROM 句の最初に出現するテーブルと結合テーブルの区切りのカンマ前に改行を入れること。
    WHERE 句、MERGE の ON 句の各条件文の(AND や OR の)前に改行を入れること。
    命令句の後は、ヒント句が挿入できるように改行すること。

    良い例:

    sql
    SELECT
    +	T1.COLUMN1	AS	COLUMN1
    +,	T2.COLUMN2	AS	COLUMN2
    +FROM
    +	TABLE1	T1
    +,	TABLE2	T2
    +WHERE
    +	T1.COLUMN3	=	1
    +AND	T1.COLUMN4	=	T2.COLUMN4
    +ORDER BY
    +	T1.COLUMN1
    +,	T2.COLUMN2

    WITH 句

    WITH の前後に改行を挿入すること
    また、インデントは下記のように記述すること

    良い例:

    sql
    -- カラムエイリアスあり
    +WITH
    +    NAME1   (
    +        COL_ALIAS1  -- カラム1
    +    ,   COL_ALIAS2  -- カラム2
    +    )   AS  (
    +        SELECT
    +        ・・・
    +    )
    +,   NAME2   (
    +        COL_ALIAS1  -- カラム1
    +    ,   COL_ALIAS2  -- カラム2
    +    )   AS  (
    +        SELECT
    +        ・・・
    +    )
    +
    +-- カラムエイリアスなし
    +WITH
    +    NAME1   AS  (
    +        SELECT
    +        ・・・
    +    )
    +,   NAME2   AS  (
    +        SELECT
    +        ・・・
    +    )

    OFFSET 句 FETCH 句

    OFFSET、FETCH の前に改行を挿入すること

    良い例:

    sql
    SELECT
    +	TBL1.COLUMN1	AS	COLUMN1
    +FROM
    +	TABLE1	TBL1
    +ORDER BY
    +	TBL1.COLUMN2	DESC
    +OFFSET 5 ROWS
    +FETCH NEXT 5 ROWS ONLY

    HINT 句

    HINT 句は独立した行で記載すること
    HINT 内容にはインデントを付けること

    良い例:

    sql
    SELECT
    +/*+
    +	ここにHINTを記載
    +*/
    +	TBL1.COLUMN1	AS	COLUMN1
    +FROM
    +	TABLE1	TBL1
    +WHERE
    +	TBL1.COLUMN2	=	1

    コメント

    • 修正コメント

      (修正コメントが必要な場合、)
      処理追加の際、追加行の 1 行目の前と最終行の次の行にコメントを入れる。単一行の場合は、同一行の最後にコメントをつける。

      良い例:

      sql
      -- 2004/04/23 仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 S ← 修正開始点コメント
      +(追加処理)
      +-- 2004/04/23仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 E ← 修正終了点コメント
    • 単数行コメント

      SQL 内で使用する単数行コメント(カラムコメントなど)には、「 -- 」を使用する。

    • 複数行コメント

      /* */ 」を使用する。下記に例を示す。
      なお、前述で触れたとおり、SQL ファイルの先頭にコメントを記述することは禁止とする。

      良い例:

      sql
      /**********************************************************************/
      +/*
      + * コメントを始めるスラッシュとアスタリスクは、それだけを1行に置く。
      + * それから、コメント・ブロック内の各行は縦にアスタリスクを置き
      + * コメントがあることを強調する。
      + * 最後に、アスタリスクとスラッシュは、それだけを1行に置く。
      + */
      +/**********************************************************************/
    • 複数行コメントアウト

      複数行をコメントアウトする場合は、各行を「--」でコメントアウトする。
      /* */ 」を使用すると、その中に「 /* */ 」が存在した場合、コメントアウトが途中で切れてしまう恐れがあるため、
      使用しない。

    • 論理名の記載

      SELECTINSERTUPDATEMERGEのカラム名記述箇所には単数行コメントでカラムの論理名を記載する。
      SELECTINSERTUPDATEDELETEMERGEのテーブル名記述箇所には単数行コメントでテーブルの論理名を記載する。
      論理名は ERD 等で定義された論理名と必ず一致させること。

    外部結合

    結合方法は ANSI 形式(~outer join ~)ではなく Oracle 形式(+)を使用する。
    原則として(+)は条件文の右にくるカラムに付与する。

    良い例:

    sql
    T1.COL1	=	T2.COL2(+)

    型変換

    代入や WHERE 句の条件設定などでデータ・タイプが異なる場合、明示的にタイプ変換を行う。(暗黙の型変換は使用しない)

    比較演算子

    「等しくない」を示す演算子は「!=」を利用する。「<>」「^=」も動作するが統一の観点から利用しない。

    ORDER BY 句

    ORDER BY 数字の構文は使用せずに、カラム名を記載する。

    GROUP BY 句

    GROUP BY 数字の構文は使用せずに、カラム名を記載する。

    集約関数を利用する場合は必ず記載すること。(省略可能であっても省略しない)

    EXISTS 句

    EXISTS 句を記載する際、サブクエリになる SELECT 句の指定は定数「1」とする。
    *」(ワイルドカード)や「'X'」は統一の観点から利用しない。
    また「*」(ワイルドカード)についてはパフォーマンスの観点からも禁止とする。

    良い例:

    sql
    WHERE
    +	EXISTS(
    +		SELECT
    +			1
    +		FROM
    +			FOO	F
    +		WHERE
    +			F.COL1	=	M.KEY
    +	)

    AS 句

    トップレベルの SELECT 句には必ずAS句を記載し別名を付ける。
    同一の名前であっても AS 句を付与する。
    また、「AS」は省略可能であるが、省略はしないこと。

    WHERE 句

    • 論理名の記載
      WHERE 句でカラムと式を比較する際は左辺がカラムになるように記載すること。

      良い例:

      sql
      WHERE
      +	TBL.COLUMN1	=	1
      +AND	TBL.AMOUNT2	>	TBL.AMOUNT3	+	TBL.AMOUNT4
    • 条件式の順序
      原則として、WHERE 句で条件式を列挙する際、下記の順序を守ること。

      1. テーブル単位にまとめて順番に記述する
        この際、テーブルの順序は FROM 句に記述した順序に準ずること。
      2. 1.のテーブル単位の中で絞り込み条件をまず記述し、その後結合条件を記述する。

      良い例:

      sql
      FROM
      +	A_TABLE	A	-- A_TABLE
      +,	B_TABLE	B	-- B_TABLE
      +,	C_TABLE	C	-- C_TABLE
      +WHERE
      +-- A_TABLEの絞り込み
      +	A.KEY1		=	?
      +AND	A.KEY2		=	?
      +-- B_TABLEの絞り込み
      +AND	B.KEY1		=	?
      +AND	B.KEY2		=	?
      +-- B_TABLEの結合条件
      +AND	B.COL1		=	A.COL1
      +-- C_TABLEの絞り込み
      +AND	C.KEY1		=	?
      +AND	C.KEY2		=	?
      +-- C_TABLEの結合条件
      +AND	C.COL1		=	A.COL1
      +AND	C.COL2		=	A.COL2
      +AND	C.COL3		=	B.COL3

    COUNT 文

    レコード数を数える COUNT 文の記述はCOUNT(*)と記述する。
    COUNT(1)COUNT('X')COUNT(KEY1)という記載は NG。

    SQL コーディング規約(パフォーマンス性)

    本章ではパフォーマンス性を高めることを目的としたコーディング規約について記載する。

    検索

    検索処理におけるコーディング規約を下記に示す。

    • 中間一致、後方一致検索はインデックスを利用できないため避ける

    • 検索条件で=(等号)を使用できる場合は必ず使用する

      A=1 or A=2とする方がA>0 and A<3などと記述するのよりパフォーマンス上優位な場合が多い。
      これは A にインデックスがある場合、=であれば、インデックスが有効に使われるためである。

    • 可能な限り検索条件にパーティションキーの値を指定する

    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する

    • インデックスによる検索を指定したい場合、下記の記載を行わない

      • インデックスカラムを含む演算に対して条件指定

        悪い例:

        sql
        TBL1.COL1	+	1	>	100 /* NGパターン 右辺で演算してください */

        良い例:

        sql
        TBL1.COL1	>	100	-	1
      • インデックスカラムに関数を通した値に対して条件指定

        悪い例:

        sql
        /* NGパターン 右辺に関数を通してください */
        +TO_CHAR(TBL1.COL1, 'YYYYMMDD')	>	'20151231'

        良い例:

        sql
        TBL1.COL1	>=	TO_DATE('20160101', 'YYYYMMDD')
      • インデックスカラムをORで条件指定(禁止ではないが原則行わない)

        悪い例:

        sql
        (
        +	/* NGパターンINDEXが利用されない場合があります。他の方法を検討してください */
        +		TBL1.COL1	=	1
        +	OR	TBL1.COL1	=	2
        +	)

    挿入

    挿入処理におけるコーディング規約を下記に示す。

    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する。

    更新

    更新処理におけるコーディング規約を下記に示す。

    • 主キーの値の UPDATE は原則行わない。外部キーがあればエラーになる。
      外部キーが無い場合でも、事実上、主キーの値を利用して、検索、更新する場合は、リンクが切れてしまう。
    • パーティションキーの UPDATE は原則行わない。
    • VIEW を使用するデータ更新は禁止。更新は実表に対して行う。

    削除

    削除処理におけるコーディング規約を下記に示す。

    • 大量件数(数百万件レベル)の delete 文発行は避ける。

    WITH 句

    WITH 句の誤った使い方はパフォーマンスの劣化を招くため、WITH 句を利用する場合は DBA に相談する。

    DISTINCT 句

    DISTINCT は、暗黙のソート処理が行われる可能性があるため性能劣化につながる。
    EXISTS 句の使用・代替を検討すること。

    悪い例:

    sql
    SELECT
    +    DISTINCT
    +    D.NO    AS  DEPT_NO
    +,   D.NAME  AS  DEPT_NAME
    +FROM
    +    DEPARTMENT  D
    +,   EMPLOYEE    E
    +WHERE
    +    D.NO    =   E.DEPT_NO   -- 社員が一人以上属している部門を取得

    良い例:

    sql
    SELECT
    +    D.NO    AS  DEPT_NO
    +,   D.NAME  AS  DEPT_NAME
    +FROM
    +    DEPARTMENT  D
    +WHERE
    +    EXISTS(
    +        SELECT
    +            1
    +        FROM
    +            EMPLOYEE    E
    +        WHERE
    +            D.NO    =   E.DEPT_NO   -- 社員が一人以上属している部門を取得
    +    )

    IN 句

    IN 句は最大 1000 個まで指定できるが、200 個程度でも ORA エラーが発生するケースがある。
    また IN 句の少しだけ異なる SQL が大量に発行されると CPU 高騰やメモリ枯渇を招く。
    従って 100 を超えるような長い IN 句は使用せず、一時表を利用して IN (SELECT ・・・ FROM 一時表)のように書き換える。

    NOT IN 句

    原則NOT IN(SELECT~)は使用せずに、NOT EXISTS (SELECT~)を使用する。
    NOT IN句は、内部的にソートマージの結合をすることでテーブルをフルスキャンする場合があるため、性能が悪化する可能性がある。

    UNION 句

    UNIONDISTINCT処理が含まれパフォーマンス上問題があるため、UNION ALLを使用する。

    パラレルヒント句

    パラレルヒント句は DB 負荷が高いため、原則使用禁止とする。付与したい場合は DBA に相談する。

    SELECT FOR UPDATE

    • SELECT FOR UPDATENO WAITまたは「WAIT秒数指定」を必ず付ける。
      WAIT指定なしの場合はロックが解除されてもプログラムに制御が返らないことがある。
      ※WAIT 秒数指定を行う際の秒数は各開発者で決めるのではなくプロジェクトで決定した方針に従うこと。
      また、SQL ライブラリを利用していて定数が記述できる場合は定数で記述すること。
    • SELECT FOR UPDATEで複数行にロックをかける場合、同時実行されるとデットロックを起こす可能性があるため、1件のロックでない場合はORDER BYを指定する。

    分析関数

    分析関数の使用は可能だが、性能悪化を招く恐れがあるため、特性を知らない方は DBA に相談する。

    インデックス

    インデックスの必要性については DBA で最終判断するため、必要とする場合は DBA へ相談する。

    外部結合

    外部結合する際、内部表(駆動表)はなるべく想定件数の少ない表にする。


    License

    CC-By-4.0

    `,139))])}const y=a(t,[["render",k]]);export{o as __pageData,y as default}; diff --git "a/assets/documents_forSQL_SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.md.DWD8TXZm.lean.js" "b/assets/documents_forSQL_SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.md.DWD8TXZm.lean.js" new file mode 100644 index 00000000..4b2acc87 --- /dev/null +++ "b/assets/documents_forSQL_SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.md.DWD8TXZm.lean.js" @@ -0,0 +1,183 @@ +import{_ as a,c as n,G as l,a3 as p,B as e,o as h}from"./chunks/framework.BDUoXecB.js";const o=JSON.parse('{"title":"SQLコーディング規約(Oracle)","description":"","frontmatter":{"sidebarDepth":4,"title":"SQLコーディング規約(Oracle)","author":"Future Enterprise Coding Standards","head":[["meta",{"name":"keywords","content":"SQLコーディング規約,Oracle,コーディング規約,SQL"}]]},"headers":[],"relativePath":"documents/forSQL/SQLコーディング規約(Oracle).md","filePath":"documents/forSQL/SQLコーディング規約(Oracle).md"}'),t={name:"documents/forSQL/SQLコーディング規約(Oracle).md"};function k(r,s,d,E,c,b){const i=e("page-title");return h(),n("div",null,[l(i),s[0]||(s[0]=p(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    前提条件

    本書は、SQL コーディング規約についてまとめたものである。
    今回 RDBMS として採用する Oracle での SQL の使用を前提に記述している。

    SQL コーティング規約(可読性・管理性)

    本章では可読性・管理性を高めることを目的としたコーディング規約について記載する。

    書式全般

    書式全般についてのコーディング規約を下記に示す。

    • 1 行につき、1 文のみを記述する。
    • SQL 中のインデントは、Java コーディング規約にあわせて半角スペースではなくタブ文字とする。
    • ヘボン式ローマ字を使用する。
    • 外来語に関しては、原語の綴りを使用する。
    • 横は 80 文字を目安に改行する。
    • 定数を条件に用いる場合やインライン・ビューで取得したいデータなど開発者の意図はコメントにて記載する。

    予約語

    予約語に対しては、大文字を使用する。(例 : SELECTINSERTUPDATEDELETE 等)

    予約語以外

    予約語以外に対しても、予約語と同様に大文字を使用する。(例 : オブジェクト名、カラム名 等)

    短縮名称

    SQL 中に記述するエイリアス名など単語の短縮について示す。

    1. 外来語に関しては、原語の短縮形を使用する。短縮形が存在しない場合には、母音を抜かして表記する。
      例) corporation → corp / computer → cmptr

    2. ローマ字の短縮は、単語の区切れの頭文字、または母音を抜かした子音字等を利用する。
      例) nichijo → nchj

    • カラムには必ずテーブルエイリアスを付与する
    • テーブルのエイリアスは必ず付与すること。
      必要ない場合(単一テーブルへの SELECT 等)も必ず付与すること
      また、テーブルのエイリアス名は同 SQL 文の中で重複しないように命名すること。
      (副問い合わせで利用したエイリアス名をメインの SQL 中のエイリアス名に利用しない。など)

    文字コード

    SQL ファイルの文字コード(エンコーディング)は Java ソースファイルと同じく『 Unicode UTF-8 』で保存する。

    不要な空白文字(スペース)は除去する

    不要な空白文字(スペース)は除去すること。

    SQL 文の整形

    DML 文の節に対する予約語は左揃えにする。
    項目ごとに改行を入れ、項目の前にはインデントを挿入する。カンマは項目の前へ記入する。
    Java ソースファイルのようにファイルの先頭にコメント行を入れると DB 分析作業に支障があるため禁止とする。
    よって SQL ファイルの先頭は必ずSELECTUPDATEINSERTDELETEMERGEの何れかになる。

    物理カラム名、テーブル名に対応する論理名を入れる場合、その後ろに単数行コメント(-- )にて記述する。
    SQL 内に挿入する単数行コメントは、/*(半角スペース)コメント本文(半角スペース)*/ で行う。
    ,(カンマ)とANDについては各行の先頭に記述する。(以下の例を参照のこと)
    SQL フレームワークで実行する SQL の場合、SQL ステートメントの終わりを示す;(セミコロン)は記述しない。

    良い例:

    sql
    SELECT
    +/*
    +	処理名
    +*/
    +	TBL1.COLUMN1	AS	COLUMN1	-- カラム1
    +,	TBL1.COLUMN2	AS	COLUMN2	-- カラム2
    +FROM
    +	TABLE1	TBL1	-- テーブル1

    WHERE 句の=!=ISIS NULLIS)の縦位置は揃える。

    良い例:

    sql
    WHERE
    +	A.TEN_NO	=	B.TEN_NO
    +AND	A.KAMOKU_CD	!=	'1'
    +AND	A.ANKEN_NO	IS	NULL

    SELECT 文

    良い例:

    sql
    SELECT
    +	TBL1.COLUMN1	AS	COLUMN1	-- カラム1
    +,	TBL1.COLUMN2	AS	COLUMN2	-- カラム2
    +FROM
    +	TABLE1	TBL1	-- テーブル1
    +WHERE
    +	TBL1.COLUMN3	=	1
    +ORDER BY
    +	TBL1.COLUMN1
    +,	TBL1.COLUMN2

    INSERT 文

    良い例:

    sql
    INSERT
    +INTO
    +	TABLE1	-- テーブル1
    +(
    +	COLUMN1	-- カラム1
    +,	COLUMN2	-- カラム2
    +,	COLUMN3	-- カラム3
    +) VALUES (
    +	VALUE1
    +,	VALUE2
    +,	VALUE3
    +)

    UPDATE 文

    良い例:

    sql
    UPDATE
    +	TABLE1	TBL1	-- テーブル1
    +SET
    +	TBL1.COLUMN2	=	100	-- カラム2
    +,	TBL1.COLUMN3	=	100	-- カラム3
    +WHERE
    +	TBL1.COLUMN1	=	10

    DELETE 文

    良い例:

    sql
    DELETE
    +FROM
    +	TABLE1	TBL1	-- テーブル1
    +WHERE
    +	TBL1.VALUE	=	1

    MERGE 文

    DB 結合条件が一致した場合と不一致になった場合の、それぞれの SQL 文を記述する。

    良い例:

    sql
    MERGE
    +INTO
    +	PROFILE	P				-- PROFILEテーブル
    +USING
    +	NAME	N				-- NAMEテーブル
    +ON
    +	(
    +		P.NAME	= N.NAME		-- 条件
    +	)
    +WHEN MATCHED THEN			-- 条件が一致
    +	/*UPDATE文*/
    +WHEN NOT MATCHED THEN		-- 条件が不一致
    +	/*INSERT文*/

    AND(副問い合わせ)

    良い例:

    sql
    AND	XXX	=	(
    +		SELECT
    +			TBL1.COLUMN1
    +		,	TBL1.COLUMN2
    +		FROM
    +			TABLE1	TBL1
    +	)

    CASE 式

    CASE 式は下記のように記載すること。

    良い例:

    sql
    CASE
    +	WHEN
    +		XXX.HOGE	=	YYY.FUGA
    +	AND	XXX.FUGA	=	YYY.FUGA
    +	THEN
    +		1
    +	ELSE
    +		0
    +END

    CASEWHENTHENELSEの後に改行を挿入すること。
    CASEの後、ENDの前までは 1 インデント挿入すること。

    IN 句

    カンマの後にスペースを1文字入れる。

    比較演算子

    比較演算子の前後にタブ(またはスペース)を1文字入れる。

    改行位置

    SELECT 句、ORDER BY 句、GROUP BY 句等は最初に出現するカラムとカラムの区切りのカンマ前に改行を入れること。
    SELECT の FROM 句の最初に出現するテーブルと結合テーブルの区切りのカンマ前に改行を入れること。
    WHERE 句、MERGE の ON 句の各条件文の(AND や OR の)前に改行を入れること。
    命令句の後は、ヒント句が挿入できるように改行すること。

    良い例:

    sql
    SELECT
    +	T1.COLUMN1	AS	COLUMN1
    +,	T2.COLUMN2	AS	COLUMN2
    +FROM
    +	TABLE1	T1
    +,	TABLE2	T2
    +WHERE
    +	T1.COLUMN3	=	1
    +AND	T1.COLUMN4	=	T2.COLUMN4
    +ORDER BY
    +	T1.COLUMN1
    +,	T2.COLUMN2

    WITH 句

    WITH の前後に改行を挿入すること
    また、インデントは下記のように記述すること

    良い例:

    sql
    -- カラムエイリアスあり
    +WITH
    +    NAME1   (
    +        COL_ALIAS1  -- カラム1
    +    ,   COL_ALIAS2  -- カラム2
    +    )   AS  (
    +        SELECT
    +        ・・・
    +    )
    +,   NAME2   (
    +        COL_ALIAS1  -- カラム1
    +    ,   COL_ALIAS2  -- カラム2
    +    )   AS  (
    +        SELECT
    +        ・・・
    +    )
    +
    +-- カラムエイリアスなし
    +WITH
    +    NAME1   AS  (
    +        SELECT
    +        ・・・
    +    )
    +,   NAME2   AS  (
    +        SELECT
    +        ・・・
    +    )

    OFFSET 句 FETCH 句

    OFFSET、FETCH の前に改行を挿入すること

    良い例:

    sql
    SELECT
    +	TBL1.COLUMN1	AS	COLUMN1
    +FROM
    +	TABLE1	TBL1
    +ORDER BY
    +	TBL1.COLUMN2	DESC
    +OFFSET 5 ROWS
    +FETCH NEXT 5 ROWS ONLY

    HINT 句

    HINT 句は独立した行で記載すること
    HINT 内容にはインデントを付けること

    良い例:

    sql
    SELECT
    +/*+
    +	ここにHINTを記載
    +*/
    +	TBL1.COLUMN1	AS	COLUMN1
    +FROM
    +	TABLE1	TBL1
    +WHERE
    +	TBL1.COLUMN2	=	1

    コメント

    • 修正コメント

      (修正コメントが必要な場合、)
      処理追加の際、追加行の 1 行目の前と最終行の次の行にコメントを入れる。単一行の場合は、同一行の最後にコメントをつける。

      良い例:

      sql
      -- 2004/04/23 仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 S ← 修正開始点コメント
      +(追加処理)
      +-- 2004/04/23仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 E ← 修正終了点コメント
    • 単数行コメント

      SQL 内で使用する単数行コメント(カラムコメントなど)には、「 -- 」を使用する。

    • 複数行コメント

      /* */ 」を使用する。下記に例を示す。
      なお、前述で触れたとおり、SQL ファイルの先頭にコメントを記述することは禁止とする。

      良い例:

      sql
      /**********************************************************************/
      +/*
      + * コメントを始めるスラッシュとアスタリスクは、それだけを1行に置く。
      + * それから、コメント・ブロック内の各行は縦にアスタリスクを置き
      + * コメントがあることを強調する。
      + * 最後に、アスタリスクとスラッシュは、それだけを1行に置く。
      + */
      +/**********************************************************************/
    • 複数行コメントアウト

      複数行をコメントアウトする場合は、各行を「--」でコメントアウトする。
      /* */ 」を使用すると、その中に「 /* */ 」が存在した場合、コメントアウトが途中で切れてしまう恐れがあるため、
      使用しない。

    • 論理名の記載

      SELECTINSERTUPDATEMERGEのカラム名記述箇所には単数行コメントでカラムの論理名を記載する。
      SELECTINSERTUPDATEDELETEMERGEのテーブル名記述箇所には単数行コメントでテーブルの論理名を記載する。
      論理名は ERD 等で定義された論理名と必ず一致させること。

    外部結合

    結合方法は ANSI 形式(~outer join ~)ではなく Oracle 形式(+)を使用する。
    原則として(+)は条件文の右にくるカラムに付与する。

    良い例:

    sql
    T1.COL1	=	T2.COL2(+)

    型変換

    代入や WHERE 句の条件設定などでデータ・タイプが異なる場合、明示的にタイプ変換を行う。(暗黙の型変換は使用しない)

    比較演算子

    「等しくない」を示す演算子は「!=」を利用する。「<>」「^=」も動作するが統一の観点から利用しない。

    ORDER BY 句

    ORDER BY 数字の構文は使用せずに、カラム名を記載する。

    GROUP BY 句

    GROUP BY 数字の構文は使用せずに、カラム名を記載する。

    集約関数を利用する場合は必ず記載すること。(省略可能であっても省略しない)

    EXISTS 句

    EXISTS 句を記載する際、サブクエリになる SELECT 句の指定は定数「1」とする。
    *」(ワイルドカード)や「'X'」は統一の観点から利用しない。
    また「*」(ワイルドカード)についてはパフォーマンスの観点からも禁止とする。

    良い例:

    sql
    WHERE
    +	EXISTS(
    +		SELECT
    +			1
    +		FROM
    +			FOO	F
    +		WHERE
    +			F.COL1	=	M.KEY
    +	)

    AS 句

    トップレベルの SELECT 句には必ずAS句を記載し別名を付ける。
    同一の名前であっても AS 句を付与する。
    また、「AS」は省略可能であるが、省略はしないこと。

    WHERE 句

    • 論理名の記載
      WHERE 句でカラムと式を比較する際は左辺がカラムになるように記載すること。

      良い例:

      sql
      WHERE
      +	TBL.COLUMN1	=	1
      +AND	TBL.AMOUNT2	>	TBL.AMOUNT3	+	TBL.AMOUNT4
    • 条件式の順序
      原則として、WHERE 句で条件式を列挙する際、下記の順序を守ること。

      1. テーブル単位にまとめて順番に記述する
        この際、テーブルの順序は FROM 句に記述した順序に準ずること。
      2. 1.のテーブル単位の中で絞り込み条件をまず記述し、その後結合条件を記述する。

      良い例:

      sql
      FROM
      +	A_TABLE	A	-- A_TABLE
      +,	B_TABLE	B	-- B_TABLE
      +,	C_TABLE	C	-- C_TABLE
      +WHERE
      +-- A_TABLEの絞り込み
      +	A.KEY1		=	?
      +AND	A.KEY2		=	?
      +-- B_TABLEの絞り込み
      +AND	B.KEY1		=	?
      +AND	B.KEY2		=	?
      +-- B_TABLEの結合条件
      +AND	B.COL1		=	A.COL1
      +-- C_TABLEの絞り込み
      +AND	C.KEY1		=	?
      +AND	C.KEY2		=	?
      +-- C_TABLEの結合条件
      +AND	C.COL1		=	A.COL1
      +AND	C.COL2		=	A.COL2
      +AND	C.COL3		=	B.COL3

    COUNT 文

    レコード数を数える COUNT 文の記述はCOUNT(*)と記述する。
    COUNT(1)COUNT('X')COUNT(KEY1)という記載は NG。

    SQL コーディング規約(パフォーマンス性)

    本章ではパフォーマンス性を高めることを目的としたコーディング規約について記載する。

    検索

    検索処理におけるコーディング規約を下記に示す。

    • 中間一致、後方一致検索はインデックスを利用できないため避ける

    • 検索条件で=(等号)を使用できる場合は必ず使用する

      A=1 or A=2とする方がA>0 and A<3などと記述するのよりパフォーマンス上優位な場合が多い。
      これは A にインデックスがある場合、=であれば、インデックスが有効に使われるためである。

    • 可能な限り検索条件にパーティションキーの値を指定する

    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する

    • インデックスによる検索を指定したい場合、下記の記載を行わない

      • インデックスカラムを含む演算に対して条件指定

        悪い例:

        sql
        TBL1.COL1	+	1	>	100 /* NGパターン 右辺で演算してください */

        良い例:

        sql
        TBL1.COL1	>	100	-	1
      • インデックスカラムに関数を通した値に対して条件指定

        悪い例:

        sql
        /* NGパターン 右辺に関数を通してください */
        +TO_CHAR(TBL1.COL1, 'YYYYMMDD')	>	'20151231'

        良い例:

        sql
        TBL1.COL1	>=	TO_DATE('20160101', 'YYYYMMDD')
      • インデックスカラムをORで条件指定(禁止ではないが原則行わない)

        悪い例:

        sql
        (
        +	/* NGパターンINDEXが利用されない場合があります。他の方法を検討してください */
        +		TBL1.COL1	=	1
        +	OR	TBL1.COL1	=	2
        +	)

    挿入

    挿入処理におけるコーディング規約を下記に示す。

    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する。

    更新

    更新処理におけるコーディング規約を下記に示す。

    • 主キーの値の UPDATE は原則行わない。外部キーがあればエラーになる。
      外部キーが無い場合でも、事実上、主キーの値を利用して、検索、更新する場合は、リンクが切れてしまう。
    • パーティションキーの UPDATE は原則行わない。
    • VIEW を使用するデータ更新は禁止。更新は実表に対して行う。

    削除

    削除処理におけるコーディング規約を下記に示す。

    • 大量件数(数百万件レベル)の delete 文発行は避ける。

    WITH 句

    WITH 句の誤った使い方はパフォーマンスの劣化を招くため、WITH 句を利用する場合は DBA に相談する。

    DISTINCT 句

    DISTINCT は、暗黙のソート処理が行われる可能性があるため性能劣化につながる。
    EXISTS 句の使用・代替を検討すること。

    悪い例:

    sql
    SELECT
    +    DISTINCT
    +    D.NO    AS  DEPT_NO
    +,   D.NAME  AS  DEPT_NAME
    +FROM
    +    DEPARTMENT  D
    +,   EMPLOYEE    E
    +WHERE
    +    D.NO    =   E.DEPT_NO   -- 社員が一人以上属している部門を取得

    良い例:

    sql
    SELECT
    +    D.NO    AS  DEPT_NO
    +,   D.NAME  AS  DEPT_NAME
    +FROM
    +    DEPARTMENT  D
    +WHERE
    +    EXISTS(
    +        SELECT
    +            1
    +        FROM
    +            EMPLOYEE    E
    +        WHERE
    +            D.NO    =   E.DEPT_NO   -- 社員が一人以上属している部門を取得
    +    )

    IN 句

    IN 句は最大 1000 個まで指定できるが、200 個程度でも ORA エラーが発生するケースがある。
    また IN 句の少しだけ異なる SQL が大量に発行されると CPU 高騰やメモリ枯渇を招く。
    従って 100 を超えるような長い IN 句は使用せず、一時表を利用して IN (SELECT ・・・ FROM 一時表)のように書き換える。

    NOT IN 句

    原則NOT IN(SELECT~)は使用せずに、NOT EXISTS (SELECT~)を使用する。
    NOT IN句は、内部的にソートマージの結合をすることでテーブルをフルスキャンする場合があるため、性能が悪化する可能性がある。

    UNION 句

    UNIONDISTINCT処理が含まれパフォーマンス上問題があるため、UNION ALLを使用する。

    パラレルヒント句

    パラレルヒント句は DB 負荷が高いため、原則使用禁止とする。付与したい場合は DBA に相談する。

    SELECT FOR UPDATE

    • SELECT FOR UPDATENO WAITまたは「WAIT秒数指定」を必ず付ける。
      WAIT指定なしの場合はロックが解除されてもプログラムに制御が返らないことがある。
      ※WAIT 秒数指定を行う際の秒数は各開発者で決めるのではなくプロジェクトで決定した方針に従うこと。
      また、SQL ライブラリを利用していて定数が記述できる場合は定数で記述すること。
    • SELECT FOR UPDATEで複数行にロックをかける場合、同時実行されるとデットロックを起こす可能性があるため、1件のロックでない場合はORDER BYを指定する。

    分析関数

    分析関数の使用は可能だが、性能悪化を招く恐れがあるため、特性を知らない方は DBA に相談する。

    インデックス

    インデックスの必要性については DBA で最終判断するため、必要とする場合は DBA へ相談する。

    外部結合

    外部結合する際、内部表(駆動表)はなるべく想定件数の少ない表にする。


    License

    CC-By-4.0

    `,139))])}const y=a(t,[["render",k]]);export{o as __pageData,y as default}; diff --git "a/assets/documents_forSQL_SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.md.DViLWmpD.js" "b/assets/documents_forSQL_SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.md.DViLWmpD.js" new file mode 100644 index 00000000..a518ab1d --- /dev/null +++ "b/assets/documents_forSQL_SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.md.DViLWmpD.js" @@ -0,0 +1,177 @@ +import{_ as i,c as n,G as l,a3 as e,B as p,o as t}from"./chunks/framework.BDUoXecB.js";const g=JSON.parse('{"title":"SQLコーディング規約(PostgreSQL)","description":"","frontmatter":{"sidebarDepth":4,"title":"SQLコーディング規約(PostgreSQL)","author":"Future Enterprise Coding Standards","head":[["meta",{"name":"keywords","content":"SQLコーディング規約,PostgreSQL,コーディング規約,SQL"}]]},"headers":[],"relativePath":"documents/forSQL/SQLコーディング規約(PostgreSQL).md","filePath":"documents/forSQL/SQLコーディング規約(PostgreSQL).md"}'),h={name:"documents/forSQL/SQLコーディング規約(PostgreSQL).md"};function k(r,s,d,c,b,o){const a=p("page-title");return t(),n("div",null,[l(a),s[0]||(s[0]=e(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    前提条件

    本書は、SQL コーディング規約についてまとめたものである。
    今回 RDBMS として採用する PostgreSQL での SQL の使用を前提に記述している。

    SQL コーティング規約(可読性・管理性)

    本章では可読性・管理性を高めることを目的としたコーディング規約について記載する。

    書式全般

    書式全般についてのコーディング規約を下記に示す。

    • 1 行につき、1 文のみを記述する。
    • SQL 中のインデントは、Java コーディング規約にあわせて半角スペースではなくタブ文字とする。
    • ヘボン式ローマ字を使用する。
    • 外来語に関しては、原語の綴りを使用する。
    • 横は 80 文字を目安に改行する。
    • 定数を条件に用いる場合やインライン・ビューで取得したいデータなど開発者の意図はコメントにて記載する。

    予約語

    予約語に対しては、小文字を使用する。(例 : selectinsertupdatedelete 等)

    予約語以外

    予約語以外に対しても、予約語と同様に小文字を使用する。(例 : オブジェクト名、カラム名 等)

    短縮名称

    SQL 中に記述するエイリアス名など単語の短縮について示す。

    1. 外来語に関しては、原語の短縮形を使用する。短縮形が存在しない場合には、母音を抜かして表記する。
      例) corporation → corp / computer → cmptr

    2. ローマ字の短縮は、単語の区切れの頭文字、または母音を抜かした子音字等を利用する。
      例) nichijo → nchj

    • カラムには必ずテーブルエイリアスを付与する
    • テーブルのエイリアスは必ず付与すること。
      必要ない場合(単一テーブルへの SELECT 等)も必ず付与すること
      また、テーブルのエイリアス名は同 SQL 文の中で重複しないように命名すること。
      (副問い合わせで利用したエイリアス名をメインの SQL 中のエイリアス名に利用しない。など)

    文字コード

    SQL ファイルの文字コード(エンコーディング)は Java ソースファイルと同じく『 Unicode UTF-8 』で保存する。

    不要な空白文字(スペース)は除去する

    不要な空白文字(スペース)は除去すること。

    SQL 文の整形

    DML 文の節に対する予約語は左揃えにする。
    項目ごとに改行を入れ、項目の前にはインデントを挿入する。カンマは項目の前へ記入する。
    Java ソースファイルのようにファイルの先頭にコメント行を入れると DB 分析作業に支障があるため禁止とする。
    よって SQL ファイルの先頭は必ずselectupdateinsertdeleteの何れかになる。

    物理カラム名、テーブル名に対応する論理名を入れる場合、その後ろに単数行コメント(-- )にて記述する。
    SQL 内に挿入する単数行コメントは、/*(半角スペース)コメント本文(半角スペース)*/ で行う。
    ,(カンマ)とANDについては各行の先頭に記述する。(以下の例を参照のこと)
    SQL フレームワークで実行する SQL の場合、SQL ステートメントの終わりを示す;(セミコロン)は記述しない。

    良い例:

    sql
    select
    +/*
    +	処理名
    +*/
    +	tbl1.column1	as	column1	-- カラム1
    +,	tbl1.column2	as	column2	-- カラム2
    +from
    +	table1	tbl1	-- テーブル1

    WHERE 句の=!=isis nullis)の縦位置は揃える。

    良い例:

    sql
    where
    +	a.ten_no	=	b.ten_no
    +and	a.kamoku_cd	!=	'1'
    +and	a.anken_no	is	null

    SELECT 文

    良い例:

    sql
    select
    +	tbl1.column1	as	column1	-- カラム1
    +,	tbl1.column2	as	column2	-- カラム2
    +from
    +	table1	tbl1	-- テーブル1
    +where
    +	tbl1.column3	=	1
    +order by
    +	tbl1.column1
    +,	tbl1.column2

    INSERT 文

    良い例:

    sql
    insert
    +into
    +	table1	-- テーブル1
    +(
    +	column1	-- カラム1
    +,	column2	-- カラム2
    +,	column3	-- カラム3
    +) values (
    +	value1
    +,	value2
    +,	value3
    +)

    UPDATE 文

    良い例:

    sql
    update
    +	table1	tbl1	-- テーブル1
    +set
    +	tbl1.column2	=	100	-- カラム2
    +,	tbl1.column3	=	100	-- カラム3
    +where
    +	tbl1.column1	=	10

    DELETE 文

    良い例:

    sql
    delete
    +from
    +	table1	tbl1	-- テーブル1
    +where
    +	tbl1.value	=	1

    AND(副問い合わせ)

    良い例:

    sql
    and	xxx	=	(
    +		select
    +			tbl1.column1
    +		,	tbl1.column2
    +		from
    +			table1	tbl1
    +	)

    CASE 式

    CASE 式は下記のように記載すること。

    良い例:

    sql
    case
    +	when
    +		xxx.hoge	=	yyy.fuga
    +	and	xxx.fuga	=	yyy.fuga
    +	then
    +		1
    +	else
    +		0
    +end

    casewhenthenelseの後に改行を挿入すること。
    caseの後、endの前までは 1 インデント挿入すること。

    IN 句

    カンマの後にスペースを1文字入れる。

    比較演算子

    比較演算子の前後にタブ(またはスペース)を1文字入れる。

    改行位置

    select 句、order by 句、group by 句等は最初に出現するカラムとカラムの区切りのカンマ前に改行を入れること。
    select の from 句の最初に出現するテーブルと結合テーブルの区切りのカンマ前に改行を入れること。
    where 句の on 句の各条件文の(and や or の)前に改行を入れること。
    命令句の後は、ヒント句が挿入できるように改行すること。

    良い例:

    sql
    select
    +	t1.column1	as	column1
    +,	t2.column2	as	column2
    +from
    +	table1	t1
    +,	table2	t2
    +where
    +	t1.column3	=	1
    +and	t1.column4	=	t2.column4
    +order by
    +	t1.column1
    +,	t2.column2

    WITH 句

    with の前後に改行を挿入すること
    また、インデントは下記のように記述すること

    良い例:

    sql
    -- カラムエイリアスあり
    +with
    +    name1   (
    +        col_alias1  -- カラム1
    +    ,   col_alias2  -- カラム2
    +    )   as  (
    +        select
    +        ・・・
    +    )
    +,   name2   (
    +        col_alias1  -- カラム1
    +    ,   col_alias2  -- カラム2
    +    )   as  (
    +        select
    +        ・・・
    +    )
    +
    +-- カラムエイリアスなし
    +with
    +    name1   as  (
    +        select
    +        ・・・
    +    )
    +,   name2   as  (
    +        select
    +        ・・・
    +    )

    LIMIT 句 OFFSET 句

    LIMIT、OFFSET の前に改行を挿入すること

    良い例:

    sql
    select
    +    tbl1.column1    as  column1
    +from
    +    table1  tbl1
    +order by
    +    tbl1.column2    desc
    +limit 5
    +offset 5

    HINT 句

    HINT 句は独立した行で記載すること
    HINT 内容にはインデントを付けること

    良い例:

    sql
    select
    +/*+
    +	ここにhintを記載
    +*/
    +	tbl1.column1	as	column1
    +from
    +	table1	tbl1
    +where
    +	tbl1.column2	=	1

    コメント

    • 修正コメント

      (修正コメントが必要な場合、)
      処理追加の際、追加行の 1 行目の前と最終行の次の行にコメントを入れる。単一行の場合は、同一行の最後にコメントをつける。

      良い例:

      sql
      -- 2004/04/23 仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 S ← 修正開始点コメント
      +(追加処理)
      +-- 2004/04/23仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 E ← 修正終了点コメント
    • 単数行コメント

      SQL 内で使用する単数行コメント(カラムコメントなど)には、「 -- 」を使用する。

    • 複数行コメント

      /* */ 」を使用する。下記に例を示す。
      なお、前述で触れたとおり、SQL ファイルの先頭にコメントを記述することは禁止とする。

      良い例:

      sql
      /**********************************************************************/
      +/*
      + * コメントを始めるスラッシュとアスタリスクは、それだけを1行に置く。
      + * それから、コメント・ブロック内の各行は縦にアスタリスクを置き
      + * コメントがあることを強調する。
      + * 最後に、アスタリスクとスラッシュは、それだけを1行に置く。
      + */
      +/**********************************************************************/
    • 複数行コメントアウト

      複数行をコメントアウトする場合は、各行を「--」でコメントアウトする。
      /* */ 」を使用すると、その中に「 /* */ 」が存在した場合、コメントアウトが途中で切れてしまう恐れがあるため、
      使用しない。

    • 論理名の記載

      selectinsertupdatemergeのカラム名記述箇所には単数行コメントでカラムの論理名を記載する。
      selectinsertupdatedeletemergeのテーブル名記述箇所には単数行コメントでテーブルの論理名を記載する。
      論理名は ERD 等で定義された論理名と必ず一致させること。

    型変換

    代入や WHERE 句の条件設定などでデータ・タイプが異なる場合、明示的にタイプ変換を行う。(暗黙の型変換は使用しない)

    比較演算子

    「等しくない」を示す演算子は「!=」を利用する。「<>」も動作するが統一の観点から利用しない。

    ORDER BY 句

    order by 数字の構文は使用せずに、カラム名を記載する。

    GROUP BY 句

    group by 数字の構文は使用せずに、カラム名を記載する。

    集約関数を利用する場合は必ず記載すること。(省略可能であっても省略しない)

    EXISTS 句

    EXISTS 句を記載する際、サブクエリになる SELECT 句の指定は定数「1」とする。
    *」(ワイルドカード)や「'X'」は統一の観点から利用しない。
    また「*」(ワイルドカード)についてはパフォーマンスの観点からも禁止とする。

    良い例:

    sql
    where
    +	exists(
    +		select
    +			1
    +		from
    +			foo	f
    +		where
    +			f.col1	=	m.key
    +	)

    AS 句

    トップレベルの SELECT 句には必ずas句を記載し別名を付ける。
    同一の名前であっても AS 句を付与する。
    また、「as」は省略可能であるが、省略はしないこと。

    WHERE 句

    • 論理名の記載
      WHERE 句でカラムと式を比較する際は左辺がカラムになるように記載すること。

      良い例:

      sql
      where
      +	tbl.column1	=	1
      +and	tbl.amount2	>	tbl.amount3	+	tbl.amount4
    • 条件式の順序
      原則として、WHERE 句で条件式を列挙する際、下記の順序を守ること。

      1. テーブル単位にまとめて順番に記述する
        この際、テーブルの順序は FROM 句に記述した順序に準ずること。
      2. 1.のテーブル単位の中で絞り込み条件をまず記述し、その後結合条件を記述する。

      良い例:

      sql
      from
      +	a_table	a	-- a_table
      +,	b_table	b	-- b_table
      +,	c_table	c	-- c_table
      +where
      +-- a_tableの絞り込み
      +	a.key1		=	?
      +and	a.key2		=	?
      +-- b_tableの絞り込み
      +and	b.key1		=	?
      +and	b.key2		=	?
      +-- b_tableの結合条件
      +and	b.col1		=	a.col1
      +-- c_tableの絞り込み
      +and	c.key1		=	?
      +and	c.key2		=	?
      +-- c_tableの結合条件
      +and	c.col1		=	a.col1
      +and	c.col2		=	a.col2
      +and	c.col3		=	b.col3

    COUNT 文

    レコード数を数える COUNT 文の記述はcount(*)と記述する。
    count(1)count('x')count(key1)という記載は NG。

    文字列リテラル

    エスケープシーケンス

    文字列リテラル中のシングルクォーテーションのエスケープは「 '' 」とシングルクォーテーションを二つつなげた記述をする。
    \\' 」も同様の結果が得られるが円マーク(バックスラッシュ)によるエスケープは利用しない。
    円マークをエスケープせざるを得ないときのみ円マークによるエスケープ利用して良いが、
    円マークを文字列リテラルで表現する必要のある設計自体を避けること。

    ※PostgreSQL は設定によって円マーク(バックスラッシュ)によるエスケープを無効にできます。(デフォルト無効)
    円マークをエスケープするときは、自プロジェクトでどちらに設定されているか確認してください。

    良い例:

    sql
    update
    +    table_a
    +set
    +    text_data   =   'that''s right'

    悪い例:

    sql
    update
    +    table_a
    +set
    +    text_data   =   'that\\'s too bad'

    SQL コーディング規約(パフォーマンス性)

    本章ではパフォーマンス性を高めることを目的としたコーディング規約について記載する。

    検索

    検索処理におけるコーディング規約を下記に示す。

    • 中間一致、後方一致検索はインデックスを利用できないため避ける

    • 検索条件で=(等号)を使用できる場合は必ず使用する

      a=1 or a=2とする方がa>0 and a<3などと記述するのよりパフォーマンス上優位な場合が多い。
      これは a にインデックスがある場合、=であれば、インデックスが有効に使われるためである。

    • 可能な限り検索条件にパーティションキーの値を指定する

    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する

    • インデックスによる検索を指定したい場合、下記の記載を行わない

      • インデックスカラムを含む演算に対して条件指定

        悪い例:

        sql
        tbl1.col1	+	1	>	100 /* NGパターン 右辺で演算してください */

        良い例:

        sql
        tbl1.col1	>	100	-	1
      • インデックスカラムに関数を通した値に対して条件指定

        悪い例:

        sql
        /* NGパターン 右辺に関数を通してください */
        +to_char(tbl1.col1, 'YYYYMMDD')	>	'20151231'

        良い例:

        sql
        tbl1.col1	>=	to_date('20160101', 'YYYYMMDD')
      • インデックスカラムをORで条件指定(禁止ではないが原則行わない)

        悪い例:

        sql
        (
        +	/* NGパターンINDEXが利用されない場合があります。他の方法を検討してください */
        +		tbl1.col1	=	1
        +	or	tbl1.col1	=	2
        +	)

    挿入

    挿入処理におけるコーディング規約を下記に示す。

    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する。

    更新

    更新処理におけるコーディング規約を下記に示す。

    • 主キーの値の UPDATE は原則行わない。外部キーがあればエラーになる。
      外部キーが無い場合でも、事実上、主キーの値を利用して、検索、更新する場合は、リンクが切れてしまう。
    • パーティションキーの UPDATE は原則行わない。
    • VIEW を使用するデータ更新は禁止。更新は実表に対して行う。

    削除

    削除処理におけるコーディング規約を下記に示す。

    • 大量件数(数百万件レベル)の delete 文発行は避ける。

    DISTINCT 句

    DISTINCT は、暗黙のソート処理が行われる可能性があるため性能劣化につながる。
    EXISTS 句の使用・代替を検討すること。

    悪い例:

    sql
    select
    +    distinct
    +    d.no    as  dept_no
    +,   d.name  as  dept_name
    +from
    +    department  d
    +,   employee    e
    +where
    +    d.no    =   e.dept_no   -- 社員が一人以上属している部門を取得

    良い例:

    sql
    select
    +    d.no    as  dept_no
    +,   d.name  as  dept_name
    +from
    +    department  d
    +where
    +    exists(
    +        select
    +            1
    +        from
    +            employee    e
    +        where
    +            d.no    =   e.dept_no   -- 社員が一人以上属している部門を取得
    +    )

    IN 句

    IN 句は最大 1000 個まで指定できるが、200 個程度でも ORA エラーが発生するケースがある。
    また IN 句の少しだけ異なる SQL が大量に発行されると CPU 高騰やメモリ枯渇を招く。
    従って 100 を超えるような長い IN 句は使用せず、一時表を利用して in (select ・・・ from 一時表)のように書き換える。

    NOT IN 句

    原則not in(select~)は使用せずに、not exists (select~)を使用する。
    NOT IN句は、内部的にソートマージの結合をすることでテーブルをフルスキャンする場合があるため、性能が悪化する可能性がある。

    UNION 句

    uniondistinct処理が含まれパフォーマンス上問題があるため、union allを使用する。

    SELECT FOR UPDATE

    • select for updateで複数行にロックをかける場合、同時実行されるとデットロックを起こす可能性があるため、1件のロックでない場合はorder byを指定する。

    分析関数

    分析関数の使用は可能だが、性能悪化を招く恐れがあるため、特性を知らない方は DBA に相談する。

    インデックス

    インデックスの必要性については DBA で最終判断するため、必要とする場合は DBA へ相談する。

    外部結合

    外部結合する際、内部表(駆動表)はなるべく想定件数の少ない表にする。


    License

    CC-By-4.0

    `,135))])}const u=i(h,[["render",k]]);export{g as __pageData,u as default}; diff --git "a/assets/documents_forSQL_SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.md.DViLWmpD.lean.js" "b/assets/documents_forSQL_SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.md.DViLWmpD.lean.js" new file mode 100644 index 00000000..a518ab1d --- /dev/null +++ "b/assets/documents_forSQL_SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.md.DViLWmpD.lean.js" @@ -0,0 +1,177 @@ +import{_ as i,c as n,G as l,a3 as e,B as p,o as t}from"./chunks/framework.BDUoXecB.js";const g=JSON.parse('{"title":"SQLコーディング規約(PostgreSQL)","description":"","frontmatter":{"sidebarDepth":4,"title":"SQLコーディング規約(PostgreSQL)","author":"Future Enterprise Coding Standards","head":[["meta",{"name":"keywords","content":"SQLコーディング規約,PostgreSQL,コーディング規約,SQL"}]]},"headers":[],"relativePath":"documents/forSQL/SQLコーディング規約(PostgreSQL).md","filePath":"documents/forSQL/SQLコーディング規約(PostgreSQL).md"}'),h={name:"documents/forSQL/SQLコーディング規約(PostgreSQL).md"};function k(r,s,d,c,b,o){const a=p("page-title");return t(),n("div",null,[l(a),s[0]||(s[0]=e(`

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    前提条件

    本書は、SQL コーディング規約についてまとめたものである。
    今回 RDBMS として採用する PostgreSQL での SQL の使用を前提に記述している。

    SQL コーティング規約(可読性・管理性)

    本章では可読性・管理性を高めることを目的としたコーディング規約について記載する。

    書式全般

    書式全般についてのコーディング規約を下記に示す。

    • 1 行につき、1 文のみを記述する。
    • SQL 中のインデントは、Java コーディング規約にあわせて半角スペースではなくタブ文字とする。
    • ヘボン式ローマ字を使用する。
    • 外来語に関しては、原語の綴りを使用する。
    • 横は 80 文字を目安に改行する。
    • 定数を条件に用いる場合やインライン・ビューで取得したいデータなど開発者の意図はコメントにて記載する。

    予約語

    予約語に対しては、小文字を使用する。(例 : selectinsertupdatedelete 等)

    予約語以外

    予約語以外に対しても、予約語と同様に小文字を使用する。(例 : オブジェクト名、カラム名 等)

    短縮名称

    SQL 中に記述するエイリアス名など単語の短縮について示す。

    1. 外来語に関しては、原語の短縮形を使用する。短縮形が存在しない場合には、母音を抜かして表記する。
      例) corporation → corp / computer → cmptr

    2. ローマ字の短縮は、単語の区切れの頭文字、または母音を抜かした子音字等を利用する。
      例) nichijo → nchj

    • カラムには必ずテーブルエイリアスを付与する
    • テーブルのエイリアスは必ず付与すること。
      必要ない場合(単一テーブルへの SELECT 等)も必ず付与すること
      また、テーブルのエイリアス名は同 SQL 文の中で重複しないように命名すること。
      (副問い合わせで利用したエイリアス名をメインの SQL 中のエイリアス名に利用しない。など)

    文字コード

    SQL ファイルの文字コード(エンコーディング)は Java ソースファイルと同じく『 Unicode UTF-8 』で保存する。

    不要な空白文字(スペース)は除去する

    不要な空白文字(スペース)は除去すること。

    SQL 文の整形

    DML 文の節に対する予約語は左揃えにする。
    項目ごとに改行を入れ、項目の前にはインデントを挿入する。カンマは項目の前へ記入する。
    Java ソースファイルのようにファイルの先頭にコメント行を入れると DB 分析作業に支障があるため禁止とする。
    よって SQL ファイルの先頭は必ずselectupdateinsertdeleteの何れかになる。

    物理カラム名、テーブル名に対応する論理名を入れる場合、その後ろに単数行コメント(-- )にて記述する。
    SQL 内に挿入する単数行コメントは、/*(半角スペース)コメント本文(半角スペース)*/ で行う。
    ,(カンマ)とANDについては各行の先頭に記述する。(以下の例を参照のこと)
    SQL フレームワークで実行する SQL の場合、SQL ステートメントの終わりを示す;(セミコロン)は記述しない。

    良い例:

    sql
    select
    +/*
    +	処理名
    +*/
    +	tbl1.column1	as	column1	-- カラム1
    +,	tbl1.column2	as	column2	-- カラム2
    +from
    +	table1	tbl1	-- テーブル1

    WHERE 句の=!=isis nullis)の縦位置は揃える。

    良い例:

    sql
    where
    +	a.ten_no	=	b.ten_no
    +and	a.kamoku_cd	!=	'1'
    +and	a.anken_no	is	null

    SELECT 文

    良い例:

    sql
    select
    +	tbl1.column1	as	column1	-- カラム1
    +,	tbl1.column2	as	column2	-- カラム2
    +from
    +	table1	tbl1	-- テーブル1
    +where
    +	tbl1.column3	=	1
    +order by
    +	tbl1.column1
    +,	tbl1.column2

    INSERT 文

    良い例:

    sql
    insert
    +into
    +	table1	-- テーブル1
    +(
    +	column1	-- カラム1
    +,	column2	-- カラム2
    +,	column3	-- カラム3
    +) values (
    +	value1
    +,	value2
    +,	value3
    +)

    UPDATE 文

    良い例:

    sql
    update
    +	table1	tbl1	-- テーブル1
    +set
    +	tbl1.column2	=	100	-- カラム2
    +,	tbl1.column3	=	100	-- カラム3
    +where
    +	tbl1.column1	=	10

    DELETE 文

    良い例:

    sql
    delete
    +from
    +	table1	tbl1	-- テーブル1
    +where
    +	tbl1.value	=	1

    AND(副問い合わせ)

    良い例:

    sql
    and	xxx	=	(
    +		select
    +			tbl1.column1
    +		,	tbl1.column2
    +		from
    +			table1	tbl1
    +	)

    CASE 式

    CASE 式は下記のように記載すること。

    良い例:

    sql
    case
    +	when
    +		xxx.hoge	=	yyy.fuga
    +	and	xxx.fuga	=	yyy.fuga
    +	then
    +		1
    +	else
    +		0
    +end

    casewhenthenelseの後に改行を挿入すること。
    caseの後、endの前までは 1 インデント挿入すること。

    IN 句

    カンマの後にスペースを1文字入れる。

    比較演算子

    比較演算子の前後にタブ(またはスペース)を1文字入れる。

    改行位置

    select 句、order by 句、group by 句等は最初に出現するカラムとカラムの区切りのカンマ前に改行を入れること。
    select の from 句の最初に出現するテーブルと結合テーブルの区切りのカンマ前に改行を入れること。
    where 句の on 句の各条件文の(and や or の)前に改行を入れること。
    命令句の後は、ヒント句が挿入できるように改行すること。

    良い例:

    sql
    select
    +	t1.column1	as	column1
    +,	t2.column2	as	column2
    +from
    +	table1	t1
    +,	table2	t2
    +where
    +	t1.column3	=	1
    +and	t1.column4	=	t2.column4
    +order by
    +	t1.column1
    +,	t2.column2

    WITH 句

    with の前後に改行を挿入すること
    また、インデントは下記のように記述すること

    良い例:

    sql
    -- カラムエイリアスあり
    +with
    +    name1   (
    +        col_alias1  -- カラム1
    +    ,   col_alias2  -- カラム2
    +    )   as  (
    +        select
    +        ・・・
    +    )
    +,   name2   (
    +        col_alias1  -- カラム1
    +    ,   col_alias2  -- カラム2
    +    )   as  (
    +        select
    +        ・・・
    +    )
    +
    +-- カラムエイリアスなし
    +with
    +    name1   as  (
    +        select
    +        ・・・
    +    )
    +,   name2   as  (
    +        select
    +        ・・・
    +    )

    LIMIT 句 OFFSET 句

    LIMIT、OFFSET の前に改行を挿入すること

    良い例:

    sql
    select
    +    tbl1.column1    as  column1
    +from
    +    table1  tbl1
    +order by
    +    tbl1.column2    desc
    +limit 5
    +offset 5

    HINT 句

    HINT 句は独立した行で記載すること
    HINT 内容にはインデントを付けること

    良い例:

    sql
    select
    +/*+
    +	ここにhintを記載
    +*/
    +	tbl1.column1	as	column1
    +from
    +	table1	tbl1
    +where
    +	tbl1.column2	=	1

    コメント

    • 修正コメント

      (修正コメントが必要な場合、)
      処理追加の際、追加行の 1 行目の前と最終行の次の行にコメントを入れる。単一行の場合は、同一行の最後にコメントをつける。

      良い例:

      sql
      -- 2004/04/23 仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 S ← 修正開始点コメント
      +(追加処理)
      +-- 2004/04/23仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 E ← 修正終了点コメント
    • 単数行コメント

      SQL 内で使用する単数行コメント(カラムコメントなど)には、「 -- 」を使用する。

    • 複数行コメント

      /* */ 」を使用する。下記に例を示す。
      なお、前述で触れたとおり、SQL ファイルの先頭にコメントを記述することは禁止とする。

      良い例:

      sql
      /**********************************************************************/
      +/*
      + * コメントを始めるスラッシュとアスタリスクは、それだけを1行に置く。
      + * それから、コメント・ブロック内の各行は縦にアスタリスクを置き
      + * コメントがあることを強調する。
      + * 最後に、アスタリスクとスラッシュは、それだけを1行に置く。
      + */
      +/**********************************************************************/
    • 複数行コメントアウト

      複数行をコメントアウトする場合は、各行を「--」でコメントアウトする。
      /* */ 」を使用すると、その中に「 /* */ 」が存在した場合、コメントアウトが途中で切れてしまう恐れがあるため、
      使用しない。

    • 論理名の記載

      selectinsertupdatemergeのカラム名記述箇所には単数行コメントでカラムの論理名を記載する。
      selectinsertupdatedeletemergeのテーブル名記述箇所には単数行コメントでテーブルの論理名を記載する。
      論理名は ERD 等で定義された論理名と必ず一致させること。

    型変換

    代入や WHERE 句の条件設定などでデータ・タイプが異なる場合、明示的にタイプ変換を行う。(暗黙の型変換は使用しない)

    比較演算子

    「等しくない」を示す演算子は「!=」を利用する。「<>」も動作するが統一の観点から利用しない。

    ORDER BY 句

    order by 数字の構文は使用せずに、カラム名を記載する。

    GROUP BY 句

    group by 数字の構文は使用せずに、カラム名を記載する。

    集約関数を利用する場合は必ず記載すること。(省略可能であっても省略しない)

    EXISTS 句

    EXISTS 句を記載する際、サブクエリになる SELECT 句の指定は定数「1」とする。
    *」(ワイルドカード)や「'X'」は統一の観点から利用しない。
    また「*」(ワイルドカード)についてはパフォーマンスの観点からも禁止とする。

    良い例:

    sql
    where
    +	exists(
    +		select
    +			1
    +		from
    +			foo	f
    +		where
    +			f.col1	=	m.key
    +	)

    AS 句

    トップレベルの SELECT 句には必ずas句を記載し別名を付ける。
    同一の名前であっても AS 句を付与する。
    また、「as」は省略可能であるが、省略はしないこと。

    WHERE 句

    • 論理名の記載
      WHERE 句でカラムと式を比較する際は左辺がカラムになるように記載すること。

      良い例:

      sql
      where
      +	tbl.column1	=	1
      +and	tbl.amount2	>	tbl.amount3	+	tbl.amount4
    • 条件式の順序
      原則として、WHERE 句で条件式を列挙する際、下記の順序を守ること。

      1. テーブル単位にまとめて順番に記述する
        この際、テーブルの順序は FROM 句に記述した順序に準ずること。
      2. 1.のテーブル単位の中で絞り込み条件をまず記述し、その後結合条件を記述する。

      良い例:

      sql
      from
      +	a_table	a	-- a_table
      +,	b_table	b	-- b_table
      +,	c_table	c	-- c_table
      +where
      +-- a_tableの絞り込み
      +	a.key1		=	?
      +and	a.key2		=	?
      +-- b_tableの絞り込み
      +and	b.key1		=	?
      +and	b.key2		=	?
      +-- b_tableの結合条件
      +and	b.col1		=	a.col1
      +-- c_tableの絞り込み
      +and	c.key1		=	?
      +and	c.key2		=	?
      +-- c_tableの結合条件
      +and	c.col1		=	a.col1
      +and	c.col2		=	a.col2
      +and	c.col3		=	b.col3

    COUNT 文

    レコード数を数える COUNT 文の記述はcount(*)と記述する。
    count(1)count('x')count(key1)という記載は NG。

    文字列リテラル

    エスケープシーケンス

    文字列リテラル中のシングルクォーテーションのエスケープは「 '' 」とシングルクォーテーションを二つつなげた記述をする。
    \\' 」も同様の結果が得られるが円マーク(バックスラッシュ)によるエスケープは利用しない。
    円マークをエスケープせざるを得ないときのみ円マークによるエスケープ利用して良いが、
    円マークを文字列リテラルで表現する必要のある設計自体を避けること。

    ※PostgreSQL は設定によって円マーク(バックスラッシュ)によるエスケープを無効にできます。(デフォルト無効)
    円マークをエスケープするときは、自プロジェクトでどちらに設定されているか確認してください。

    良い例:

    sql
    update
    +    table_a
    +set
    +    text_data   =   'that''s right'

    悪い例:

    sql
    update
    +    table_a
    +set
    +    text_data   =   'that\\'s too bad'

    SQL コーディング規約(パフォーマンス性)

    本章ではパフォーマンス性を高めることを目的としたコーディング規約について記載する。

    検索

    検索処理におけるコーディング規約を下記に示す。

    • 中間一致、後方一致検索はインデックスを利用できないため避ける

    • 検索条件で=(等号)を使用できる場合は必ず使用する

      a=1 or a=2とする方がa>0 and a<3などと記述するのよりパフォーマンス上優位な場合が多い。
      これは a にインデックスがある場合、=であれば、インデックスが有効に使われるためである。

    • 可能な限り検索条件にパーティションキーの値を指定する

    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する

    • インデックスによる検索を指定したい場合、下記の記載を行わない

      • インデックスカラムを含む演算に対して条件指定

        悪い例:

        sql
        tbl1.col1	+	1	>	100 /* NGパターン 右辺で演算してください */

        良い例:

        sql
        tbl1.col1	>	100	-	1
      • インデックスカラムに関数を通した値に対して条件指定

        悪い例:

        sql
        /* NGパターン 右辺に関数を通してください */
        +to_char(tbl1.col1, 'YYYYMMDD')	>	'20151231'

        良い例:

        sql
        tbl1.col1	>=	to_date('20160101', 'YYYYMMDD')
      • インデックスカラムをORで条件指定(禁止ではないが原則行わない)

        悪い例:

        sql
        (
        +	/* NGパターンINDEXが利用されない場合があります。他の方法を検討してください */
        +		tbl1.col1	=	1
        +	or	tbl1.col1	=	2
        +	)

    挿入

    挿入処理におけるコーディング規約を下記に示す。

    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する。

    更新

    更新処理におけるコーディング規約を下記に示す。

    • 主キーの値の UPDATE は原則行わない。外部キーがあればエラーになる。
      外部キーが無い場合でも、事実上、主キーの値を利用して、検索、更新する場合は、リンクが切れてしまう。
    • パーティションキーの UPDATE は原則行わない。
    • VIEW を使用するデータ更新は禁止。更新は実表に対して行う。

    削除

    削除処理におけるコーディング規約を下記に示す。

    • 大量件数(数百万件レベル)の delete 文発行は避ける。

    DISTINCT 句

    DISTINCT は、暗黙のソート処理が行われる可能性があるため性能劣化につながる。
    EXISTS 句の使用・代替を検討すること。

    悪い例:

    sql
    select
    +    distinct
    +    d.no    as  dept_no
    +,   d.name  as  dept_name
    +from
    +    department  d
    +,   employee    e
    +where
    +    d.no    =   e.dept_no   -- 社員が一人以上属している部門を取得

    良い例:

    sql
    select
    +    d.no    as  dept_no
    +,   d.name  as  dept_name
    +from
    +    department  d
    +where
    +    exists(
    +        select
    +            1
    +        from
    +            employee    e
    +        where
    +            d.no    =   e.dept_no   -- 社員が一人以上属している部門を取得
    +    )

    IN 句

    IN 句は最大 1000 個まで指定できるが、200 個程度でも ORA エラーが発生するケースがある。
    また IN 句の少しだけ異なる SQL が大量に発行されると CPU 高騰やメモリ枯渇を招く。
    従って 100 を超えるような長い IN 句は使用せず、一時表を利用して in (select ・・・ from 一時表)のように書き換える。

    NOT IN 句

    原則not in(select~)は使用せずに、not exists (select~)を使用する。
    NOT IN句は、内部的にソートマージの結合をすることでテーブルをフルスキャンする場合があるため、性能が悪化する可能性がある。

    UNION 句

    uniondistinct処理が含まれパフォーマンス上問題があるため、union allを使用する。

    SELECT FOR UPDATE

    • select for updateで複数行にロックをかける場合、同時実行されるとデットロックを起こす可能性があるため、1件のロックでない場合はorder byを指定する。

    分析関数

    分析関数の使用は可能だが、性能悪化を招く恐れがあるため、特性を知らない方は DBA に相談する。

    インデックス

    インデックスの必要性については DBA で最終判断するため、必要とする場合は DBA へ相談する。

    外部結合

    外部結合する際、内部表(駆動表)はなるべく想定件数の少ない表にする。


    License

    CC-By-4.0

    `,135))])}const u=i(h,[["render",k]]);export{g as __pageData,u as default}; diff --git a/assets/documents_forSQL_index.md.DUGYZ5hg.js b/assets/documents_forSQL_index.md.DUGYZ5hg.js new file mode 100644 index 00000000..047d8678 --- /dev/null +++ b/assets/documents_forSQL_index.md.DUGYZ5hg.js @@ -0,0 +1 @@ +import{_ as e,c as t,a3 as a,o}from"./chunks/framework.BDUoXecB.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"SQLコーディング規約","tagline":"Future Enterprise Coding Standards for SQL","actions":[{"theme":"brand","text":"SQLコーディング規約(PostgreSQL)","link":"./SQLコーディング規約(PostgreSQL).md"},{"theme":"brand","text":"SQLコーディング規約(Oracle)","link":"./SQLコーディング規約(Oracle).md"}]}},"headers":[],"relativePath":"documents/forSQL/index.md","filePath":"documents/forSQL/index.md"}'),s={name:"documents/forSQL/index.md"};function l(n,r,d,i,c,E){return o(),t("div",null,r[0]||(r[0]=[a('

    可読性や保守性、拡張性、SQL 性能を考慮したコーディング規約をまとめています

    SQL Coding Standards

    次の SQL コーディング規約が利用できます。

    • PostgreSQL 向けのコーディング規約はこちらです。
    • Oracle 向けのコーディング規約はこちらです。

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。
    (これらのファイルはPandocを利用して作成しています。)

    ',7)]))}const B=e(s,[["render",l]]);export{u as __pageData,B as default}; diff --git a/assets/documents_forSQL_index.md.DUGYZ5hg.lean.js b/assets/documents_forSQL_index.md.DUGYZ5hg.lean.js new file mode 100644 index 00000000..047d8678 --- /dev/null +++ b/assets/documents_forSQL_index.md.DUGYZ5hg.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,a3 as a,o}from"./chunks/framework.BDUoXecB.js";const u=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"SQLコーディング規約","tagline":"Future Enterprise Coding Standards for SQL","actions":[{"theme":"brand","text":"SQLコーディング規約(PostgreSQL)","link":"./SQLコーディング規約(PostgreSQL).md"},{"theme":"brand","text":"SQLコーディング規約(Oracle)","link":"./SQLコーディング規約(Oracle).md"}]}},"headers":[],"relativePath":"documents/forSQL/index.md","filePath":"documents/forSQL/index.md"}'),s={name:"documents/forSQL/index.md"};function l(n,r,d,i,c,E){return o(),t("div",null,r[0]||(r[0]=[a('

    可読性や保守性、拡張性、SQL 性能を考慮したコーディング規約をまとめています

    SQL Coding Standards

    次の SQL コーディング規約が利用できます。

    • PostgreSQL 向けのコーディング規約はこちらです。
    • Oracle 向けのコーディング規約はこちらです。

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。
    (これらのファイルはPandocを利用して作成しています。)

    ',7)]))}const B=e(s,[["render",l]]);export{u as __pageData,B as default}; diff --git a/assets/documents_forSlack_index.md.DFutx_6v.js b/assets/documents_forSlack_index.md.DFutx_6v.js new file mode 100644 index 00000000..0835c865 --- /dev/null +++ b/assets/documents_forSlack_index.md.DFutx_6v.js @@ -0,0 +1 @@ +import{_ as a,c as t,a3 as r,o as l}from"./chunks/framework.BDUoXecB.js";const k=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"Slack利用ガイドライン","tagline":"Slack Usage Guidelines","actions":[{"theme":"brand","text":"Slack利用ガイドライン","link":"./slack_usage_guidelines.md"}]}},"headers":[],"relativePath":"documents/forSlack/index.md","filePath":"documents/forSlack/index.md"}'),s={name:"documents/forSlack/index.md"};function n(o,e,c,i,d,u){return l(),t("div",null,e[0]||(e[0]=[r('

    Slack利用ガイドライン

    チーム開発する上で必要となるGitブランチフローの規約です。

    次のリンクから単一ファイル版を取得できます。

    ファイルはPandocを利用して作成しています。

    ',6)]))}const m=a(s,[["render",n]]);export{k as __pageData,m as default}; diff --git a/assets/documents_forSlack_index.md.DFutx_6v.lean.js b/assets/documents_forSlack_index.md.DFutx_6v.lean.js new file mode 100644 index 00000000..0835c865 --- /dev/null +++ b/assets/documents_forSlack_index.md.DFutx_6v.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,a3 as r,o as l}from"./chunks/framework.BDUoXecB.js";const k=JSON.parse('{"title":"","description":"","frontmatter":{"sidebarDepth":4,"author":"フューチャー株式会社","layout":"home","hero":{"name":"Slack利用ガイドライン","tagline":"Slack Usage Guidelines","actions":[{"theme":"brand","text":"Slack利用ガイドライン","link":"./slack_usage_guidelines.md"}]}},"headers":[],"relativePath":"documents/forSlack/index.md","filePath":"documents/forSlack/index.md"}'),s={name:"documents/forSlack/index.md"};function n(o,e,c,i,d,u){return l(),t("div",null,e[0]||(e[0]=[r('

    Slack利用ガイドライン

    チーム開発する上で必要となるGitブランチフローの規約です。

    次のリンクから単一ファイル版を取得できます。

    ファイルはPandocを利用して作成しています。

    ',6)]))}const m=a(s,[["render",n]]);export{k as __pageData,m as default}; diff --git a/assets/documents_forSlack_slack_usage_guidelines.md.DOuxyerx.js b/assets/documents_forSlack_slack_usage_guidelines.md.DOuxyerx.js new file mode 100644 index 00000000..36c91e12 --- /dev/null +++ b/assets/documents_forSlack_slack_usage_guidelines.md.DOuxyerx.js @@ -0,0 +1 @@ +import{_ as e,c as i,G as t,a3 as r,B as o,o as s}from"./chunks/framework.BDUoXecB.js";const k=JSON.parse('{"title":"Slack利用ガイドライン","description":"","frontmatter":{"sidebarDepth":4,"title":"Slack利用ガイドライン","author":"フューチャー株式会社","head":[["meta",{"name":"keywords","content":"Slack"}]]},"headers":[],"relativePath":"documents/forSlack/slack_usage_guidelines.md","filePath":"documents/forSlack/slack_usage_guidelines.md"}'),c={name:"documents/forSlack/slack_usage_guidelines.md"};function n(p,a,h,d,u,b){const l=o("page-title");return s(),i("div",null,[t(l),a[0]||(a[0]=r('

    本規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    リモートワーク/ハイブリッドワーク前提の業務において、チャットなどの非同期コミュニケーションを円滑に進めることは、業務効率を向上させるだけではなく、従業員全員の満足度を向上させ、より良い職場づくりに繋げることができる。

    また、ユーザーの様々な要望に応えるため、現代のチャットサービスは豊富な機能が提供されている。しかし、各ユーザーの考え方/利用者の感覚が千差万別であるため、ある人によって問題ないとされる行動が、別の人にとっては良くない受け取り方をされることも多い。例えば次のような対立が考えられる。

    • 必要最低限の簡潔なメッセージを送る方が効率的だ/文面が冷たくならないように絵文字や感嘆符(!)を使うべきだ
    • 質問はDMで行うべき/チャンネルで行うべき
    • times(分報)チャンネルを活用すべき/ノイズなので個人のメモに閉じるべき

    これら運用方法は利用者の所属する部署やチームごとに自然と決めていくことが多いが、複数のチャンネルで異なった運用方針である場合に混乱をきたすことがしばしばである。また、トレードオフを理解せずに、メールのコミュニケーションモデルを引きずった方針を取ってしまうこともある。異なる文化圏のチームから移籍した時に、ハレーションが起きるケースも多い。

    本ガイドラインはSlackを対象に利用方針についてのベースとなる規約を設け、Slackを用いてより良いコミュニケーションを促進することを目的とする。

    適用範囲

    • 「はじめに」章で述べた、一般ユーザー視点での利活用を中心とする
    • 次のような特に管理者が関心を持つ事項については対象外とする
      • パスワードポリシー/多要素認証の強制
      • 社外メンバー招待/ゲストレベルの調整
      • 監査

    免責事項

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせて工夫された運営方針が存在する。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している
    • 自社のセキュリティポリシーや外部サービス利用ポリシーがある場合は、そちらを優先すること
    • Slack Enterprise Grid/Google Workspaceを利用しているため、それらの機能を前提にしている記述がある

    管理者向け推奨設定

    Workspace Access

    チーム、プロジェクトでの利用の場合は リクエスト制(By Request) もしくは招待性( Invite Only)の設定を推奨する。

    デフォルトチャンネル

    通常ワークスペースにメンバーを追加した際には #general へ自動参加するが、他にもメンバー全員に参加して欲しいチャンネルがある場合にはデフォルトチャンネルを追加する。

    TIP

    ユーザグループに対してもデフォルトチャンネルを設定できるため、用途に応じて使い分けると良い。

    表示名ガイドライン

    ワークスペースごとにガイドラインを設定することを推奨する。後述の表示名設定や、その他チームコミュニケーションにおけるルールを設定する。表示名のガイドラインを設定する権限があるのは、ワークスペースのオーナーだけなので注意する。

    ワークスペースの管理者

    ワークスペース内に複数のチームが混在する場合、それぞれのチームごとに管理者権限保持者を設定すること。

    理由:

    • 管理者権限を持った人しか実行できないオペレーションがあった際、チーム内で解決できる状態を作っておくことが望ましいため

    ユーザ向け推奨設定

    アカウントアイコンを設定する

    デフォルトのアイコン利用は極力避け、アカウント登録時に各自のアイコン画像を積極的に登録する

    理由:

    • チャットコミュニケーションにおいて、個人識別におけるアイコン画像の有用性が高いため

    また、GitHub/GitLab、Google Workspace、その他利用サービスも同様のアイコンを利用することで、個人を識別しやすくなる。

    検索性の高い氏名(Full name)を設定する

    表示名(Display name) もしくは氏名(Full name) にて、ローマ字及び漢字(無ければカタカナ)でのフルネームを登録すること。表示名はチームごとに記載文化や書き方が異なるケースが多いので、本ガイドラインでは氏名に記載することを推奨する。例えば「未来 太郎」の場合、「Taro Mirai (未来 太郎)」という記載を推奨する。

    理由:

    • Slackではアカウント名のインクリメンタルサーチが強力である。その際、ローマ字でも漢字でもサジェストされる状態にすることでユーザビリティの向上が期待できるため。

    ユーザーグループの推奨

    ユーザーグループの利用を推奨する。ゲストユーザーは追加できないため、もしチャンネルに該当するメンバーが在籍する場合は、その旨をメンバー全員が理解しコミュニケーションから除外してしまわないように注意すること。

    TIP

    ユーザーグループを作成できない状態(メンバーがワークスペース間にまたがっている場合等)の時、メンション先の対象者全員が個別に自分のSlack設定>Notification>My Keywordsに「@○○チーム」と予約語を登録することで、擬似的にグループメンションが可能

    チャンネル命名規則

    外部組織メンバーが在籍するチャンネルの命名

    Slack コネクト等でチャンネル内に社外のメンバーが含まれる場合には、チャンネル名の先頭に ---ext をつける

    理由:

    • 全社的に統一的なプレフィックスを定義することで、外部とのコミュニケーションにて予期しないミスが発生してしまうことを防ぐ目的がある。例えば、内部の進行について相談する発言を、取引先メンバーが在籍するチャンネルに誤投稿してしまう事態を避けるため
    • チャンネルはセクションという単位でグルーピング可能となり、従来のように、用途や組織を表現するプレフィックスで並び順を制御する必然性が薄れた

    投稿内容ポリシー

    敬称は不要

    敬称は省略して、 @mano メッセージ内容 といった形式でコメントすること。もし、どうしても敬称を付けて欲しい場合、表示名をさん付けにするハックも存在するため、受信者側で調整する。

    理由:

    • コミュニケーションを迅速・シンプルにするため

    絵文字や感嘆符を活用する

    積極的に活用することを推奨する。テキストコミュニケーションは、画像や音声が伝わらない分、冷たく捉えられがちである。特にリーダーなど上位のポジションにいる場合は、メンバーに威圧的に捉えられないように配慮するのが好ましい。

    「では、Aの方針でよろしくお願いします!」「では、Aの方針でよろしくお願いします:ganbatte:」 など付けることで、不機嫌でないことがわかり、心理的安全性が保たれる。

    積極的にカスタム絵文字を追加することを推奨する。チーム内でしか通用しない(例えば内輪ネタのような)カスタム絵文字であっても気軽に追加して良い。

    理由:

    • より良いコミュニケーション手段を模索すること自体が、コミュニケーションを活性化させ、価値を向上させるため

    注意:

    • なお、当然ながら他人の名誉を毀損するなど、社会人/プロフェッショナルとしてふさわしくない内容は登録しないこと

    絵文字リアクションによる積極応答

    非同期のコミュニケーションにおいて発信者が気になる点として、「投稿内容を見てくれたのかどうか」がある。特に確認依頼については見ていればOKで、回答は急がないケースは想像以上に多い。
    こういった場面では、::後で確認します:: といった絵文字リアクションを付けることで解決するため、積極的に活用する。

    また、参加者が多いチャンネルでの発信は勇気がいることなので、コミュニケーションを活性化させるためにも絵文字リアクションを積極的に行い推奨/礼賛することが望ましい。

    「〇〇してほしい」「〇〇について教えてほしい」(相談セクション)への対応は絵文字リアクションだけで済まさない

    「投稿内容を見てくれたのかどうか」ではなく、「投稿内容を理解して次のアクションをとってくれるのか」を知りたい場面も多い。 そのような場面では、絵文字リアクションのみで済まさず、対応可否をコメントでフィードバックする必要がある。

    DMはなるべく避ける

    基本的には、DMよりチャンネルでのやり取りを推奨する。チャンネルであっても、より参加人数が多い(よりオープンな)チャンネルでのやり取りを推奨する。

    理由:

    • 重複した質問を防ぐため
    • 質問事項がチーム/組織に共有されることで、全体の効率が上がるため
    • 後から類似の困りごとを持ったメンバーが、キーワード検索で見つけやすくするため

    DMの利用を推奨するケース:

    • 人事相談、機密事項を含む場合(「機密情報の流出に注意する」章を参照)
    • 限られたメンバーのみに、ファイル共有をしたい場合
    • 後から検索させる意味がないやり取り(「最近元気?」と同期に投げる場合など)

    timesの推奨

    timesとは、分報や作業スレッドとも呼ばれ、今取り組んでいることや困っていることを投稿することを指す。

    本規約の推奨は次のとおり:

    • timesの利用を推奨する
    • メンバーごとのtimesチャンネルではなく、スレッドでの利用を推奨する
    • timesスレッドは、他のメンバーは参照しても参照しなくてもどちらでも良い

    理由:

    • スレッド単位であれば、本チャンネル側のノイズになることはない。参加メンバーが多い場合は、times専用のチャンネルを作成すれば良い
    • メンバーごとの times チャンネルは、チャンネルが必要以上に増えるので推奨しない
    • 必要に応じて、作業状況を本人に確認(ポーリング)しなくても把握することができる
    • ハマったことや調べたことが、後々キーワード検索で見つかり、新規参画者の助けになることも多い

    timesスレッド作成者の注意事項:

    • times内とはいえ、他の人が不快になるような発言や不適切な利用は避ける(チームメンバーが閲覧可能であることを忘れない)

    timesスレッド内のメンション:

    • timesスレッドのコメント数は100以上になることもあり、途中で他メンバーに相談事などでメンションを飛ばすと、呼ばれたメンバーには「該当のスレッドの全コメントをチェックしたほうが良いのか」といった迷いが生じる。そのため、times内ではなく相談は別メッセージに切り出して行うことを推奨する
    • なお、timesの投稿を読んで欲しいときは、timesスレッドでメンションしても良い
    • timesのメンションを受けたユーザーが、その後の投稿の通知を受け取りたくない場合は、そのスレッドの通知を切ることで対応する

    timesスレッドでメンションを飛ばすと、その後の投稿によってメンション先のユーザーに通知が飛んでしまうのではないか?という懸念への考え方:

    • 該当スレッドのフォローを外せば良いので、上記観点でメンションを行う/行わないの判断は行わなくても良い。前述の通り、timesのコメントを(全て)読んで欲しい否かで決める

    メッセージ(スレッドのトップ)は具体的に書く

    チャンネルのメッセージ(スレッド先頭の投稿)では、話題を端的に表現する。ただし、返信スレッドの中を確認しないと内容が分からないようなメッセージ(タイトル)は非推奨とする。

    メッセージ(スレッド先頭の投稿)
    ✅推奨例@mirai チケット #4191 foo bar failed のビルドエラーの解消についての相談です。スタックトレースはスレッド内に記載します
    ❌非推奨例レビュー依頼

    なお、メンションはメッセージ(スレッド先頭)に付けるか、返信スレッド内に付けるかは任意とする。

    参考:

    メッセージのURLを活用する

    Slackは本来、フロー情報向けのツールである。しかしこれをWikiなどのストック情報向けツールに転記する労力は高く、運用が形骸化しがちである。そのため、例えばあるスレッドで設計方針について議論したのであれば、そのスレッドのURLをコピーして、作業チケットやWikiなどに記載し、トレース可能にするような運用にするチームも良く聞く。本規約もスレッドURLの活用を推奨する。

    なお、決定事項の経緯や議論内容を数年経過したのちに確認することもしばしば発生する。そのため議論があればスレッドを利用し、かつ同一スレッドで複数のテーマを混ぜないことが望ましい。関連議論がいくつかのスレッドに分かれる場合、相互に関連スレッドのURLを投稿しておくと良い。

    Slackにおける情報ストック機能

    Canvas、ブックマーク、ピン留め機能を活用することで、Slack内にてストック情報を取り扱うことも可能である。PJで利用している課題管理サービスのURLを共有したい場合にはブックマーク、PJメンバーに都度参照して欲しい特定のメッセージがある場合にはピン留め、情報量が多く章立てて整理をしたい場合にはCanvas、などといった形でユースケースに合わせて使い分ける。

    Also send to channelは乱発しない

    Also send to channel を利用することで、スレッド内の投稿をチャンネルのタイムライン側に重複投稿ができる。

    本規約の推奨は以下の通り:

    • 過去のスレッドでやり取りを再開した場合に、チャンネルに在籍するメンバーに通知する目的で用いる
    • スレッド内で重要な決定事項に至った場合は、メンバーに周知する目的で用いる
    • スレッド内のやり取りを細かくAlso send to channelすると、スレッドを用いる意味が薄れるので、利用頻度は抑えるように意識する

    広めの通知に注意する

    @channel

    緊急時を除き、原則利用を禁止する。

    理由:

    • @channel はSlackを見ていないユーザにも通知が飛ぶため、休暇中のメンバー等にも影響がある。受取側で制御すべきという考えもあるが、システム障害対応など優先度の高い問い合わせのために、あえてOFFにしていないメンバーも存在することを考えると、なるべく利用を避けた方が無難である

    利用して良い場合:

    • システム障害時など、重大かつ緊急度が高い場合は @channel を使っても良い

    @here

    メールのCCに似た意図で @here を使うことは禁止とする。

    推奨ケース

    txt
    @真野 @村田 ○○の件ですが\\~

    NG(メールのCC的な形で @here を追加)

    txt
    @真野 @村田 @here ○○の件ですが

    理由:

    • メールのCC的な参考情報であれば、@here を付けずに、チャンネルの未読通知で後で見ることができるため
    • 真に必要ではないときに通知が飛ぶことが常態化すると、@here の緊急性やアクションを求める意味合いが弱まり、真に必要なときに読み飛ばされてしまう可能性が上がるため(「狼少年」現象)

    利用して良い場合:

    • 全員にアクションを促す連絡事項を行う場合。例えば、チーム全体イベントへの出欠可否を確認する連絡など

    メンション範囲は適切に

    過剰なメンションの抑制

    原則、レビュー依頼や確認依頼など、行動してほしい時にメンションを付けるものとする。「@mirai ありがとうございます!」「@mirai 承知しました!」等の挨拶にメンションを付けると、通知が来てノイズになるため非推奨とする。メンションを付けず「ありがとうございます!」とすると良い。

    情報提供依頼系など善意やり取りはきちんとフィードバックする

    情報提供依頼はSlackと親和性が良いタスクである。この際、情報提供の依頼者は、回答してもらった人に対して、👍 絵文字だけのリアクションを取る場合があるが、フィードバック付きでコメントを返すことが望ましい。情報提供者としても、その情報が役立ったのか、またそうでないかの関心は強いためである。
    もし、フィードバックが難しい場合や、スレッド投稿数をなるべく減らしたいなどの意図がある場合は、複数のリアクションを返し感謝の意を強調すると良い。 👍️🎉☺[神] のようなイメージである。

    メンションの宛先をできる限り絞り込む

    単なる周知目的ではなく行動を促したい相手に絞ること。お見合いになってボールが浮いてしまう可能性がある。「@mirai @mano @murata @ozawa @tanimura AWSの設定で確認したいのですが~」などと広すぎる場合は、宛先メンバーは自分よりもっと詳しい人がいるかも知れないので、回答すべきかどうか逡巡してしまう。できれば1、2名に宛先を絞り、宛先メンバーから別の有識者メンバーにディスパッチしてもらう運用を考えると良い。

    予約投稿を活用する

    特にリーダーからメンバーに対して、深夜(22:00-6:00など)や休日など業務時間外の投稿は原則禁止とし、予約投稿を推奨する。

    理由:

    • 仕事とプライベートにメリハリを持たせることで、成果の向上を期待できるため
    • (システム障害等)緊急時の依頼と混同してしまうため。次回出勤時の対応で良いものと区別すること
    • Slackのアップデートにより、チャンネル投稿に閉じずスレッド投稿へも予約投稿が可能となった

    受け取り側で制御する方針

    システム障害時などの緊急時は電話連絡とし、メンションに対する即対応を求めない取り決めを行うのであれば、受け取り側で通知時間を設定し、送る側は送信時間に気を遣わない運用も可とする。ただし、時間外に通知を受け翌営業日に対応しようと考えたが翌営業日には忘れているような場合、受け取り側で通知を受けた時点でリマインダーを仕込んだり、アクティビティ > @メンション を定期的に確認するような工夫をする。

    不在の表明

    表示名に不在情報を記載(例:@sato_11/8休)しておくことを推奨する。受信側が不在時に緊急性の低い通知を防げたり、送信側が即レスを期待しなくて済む。不在情報がGoogleカレンダーなど別のスケジュールアプリで管理されていたとしても、Slackでの依頼時に気付けるため。

    ステータス機能で「休暇中🏝️」にすればよいのではないか

    ステータス機能でもチームメンバーに不在であるという状態を表明できる。しかし、次の観点で表示名での表明を推奨する。

    • いつから、いつまで休暇なのかステータスでは不明である
      • 期間が分かれば、予約投稿で休暇明けに投稿するなどのアクションがすぐ取れる
    • 休暇だけでなく出張中などの情報も提示できる
      • 例えば、海外出張なので時差があることが分かれば、チームメンバーにどれくらいでレスポンスが来そうか予想ができるようになる
    • ステータス変更に気が付きにくい
      • メンションを付けて投稿する時に常時表示されるわけではないので、ステータスは見過ごされる可能性が高い :::

    可読性を上げるための書式設定

    箇条書き、太字、引用などの装飾は、積極的に活用する。文章を構造化することで、読み手にとっての負荷が軽減されるため。Slackの書式以外にも、【すみかっこ】等の記号を使うことでセクションを表現することも同時に推奨する。

    エラーメッセージの画像添付非推奨、テキストスニペットの推奨

    有識者にスタックトレースなどのエラー内容を画像添付して問い合わせることは原則として非推奨とし、テキストで共有することを推奨する。また、共有内容が長文の場合にはテキストスニペット使用が好ましい。

    理由:

    • 相談相手も裏取りとしてスタックトレースの内容を検索することが多々あるため
    • 後から同様の困り事を持った人が、キーワード検索で見つけにくくなるため
    • 長いログをそのまま貼り付けるとスレッドを広く埋め尽くしてしまうが、テキストスニペットを使えば1投稿あたりのデフォルト表示域を制限できる

    次の場合は、スクリーンショットなどの画像で共有しても良い。

    • コピーできないエラー表示など、テキストでの情報提供が難しい場合
    • (相談相手が、コピー範囲などを独自判断で狭められることを防ぐなどの理由で)スクリーンショットでの共有を希望する場合

    テキストスニペット利用時は、タイトル(ファイル名)に拡張子をつける

    Slackはテキストスニペットに設定されたタイトルをそのままファイル名としてダウンロードするよう動作する。この際拡張子が設定されていないとSlack内でそのままファイルを開くことができなくなってしまう。

    機密情報の流出に注意する

    営業情報、個人情報、人事情報など機密情報は、「最小権限の原則」に従い、なるべく宛先を狭めるべきである。センシティブなやり取りを行う場合は、参加者を絞ったプライベートチャンネル/DMグループの活用を推奨する。

    メッセージ通知にも気をつける

    画面投影やWebミーティングでの画面共有時、意図しないメッセージ通知が見えてしまう事がある。Slackの通知設定にて次に示す設定を施すことで防ぐことが可能なので活用すると良い。

    • 通知自体をOFFにする
    • 通知はOFFにしないが、メッセージ内容は非表示にする

    ファイルの共有に注意する

    Slackのファイル共有は便利であるが、ファイルのオーナー(作成者)とチャンネルにメンバー追加できる担当者が必ずしも1:1ではない。そのため次の運用が望ましい。

    推奨する運用:

    • Google Driveなどにファイルをアップロードする
    • Google Drive側で適切な権限に絞り込む

    理由:

    • Google Drive側で権限設定が可能
    • Slack上にアップロードされたファイルが、別のチャンネルに再アップロードされて収集がつかなくなるといったケースを防ぎ、統制を図るため

    該当しないケース:

    • 社外勉強会の登壇資料など、一般に「公開済み/公開予定 」のファイルはアップロードして良い

    Google DriveのURL共有時プレビュー表示について:

    • 表紙がプレビューされるが、次の理由により問題ないという立場を取る。
      • プレビュー表示されるのは1枚目(1シート目)であり、通常は表紙ページが見られるのみ
      • ファイルが存在すること自体は知られて良い(チャンネルに投稿しているため)と考えられる
      • なにか問題があれば、プレビュー表示を行わない操作がSlack上で可能である

    プライベートチャンネルの投稿に対する引用

    プライベートチャンネルの投稿コメントを、別のチャンネルにURL引用で投稿すると、該当チャンネルの権限を有していないユーザーにも参照権限を与えてしまう。引用時にはセンシティブな内容が含まれていないか確認するよう注意する。

    さいごに

    本ガイドラインの策定にあたっては、すでにインターネットに公開されているSlack利用ガイドラインや記事等も参照させていただいた。本ガイドラインが皆様のSlack活用をより快適にする一助となれば幸いである。

    参考:

    ',140))])}const q=e(c,[["render",n]]);export{k as __pageData,q as default}; diff --git a/assets/documents_forSlack_slack_usage_guidelines.md.DOuxyerx.lean.js b/assets/documents_forSlack_slack_usage_guidelines.md.DOuxyerx.lean.js new file mode 100644 index 00000000..36c91e12 --- /dev/null +++ b/assets/documents_forSlack_slack_usage_guidelines.md.DOuxyerx.lean.js @@ -0,0 +1 @@ +import{_ as e,c as i,G as t,a3 as r,B as o,o as s}from"./chunks/framework.BDUoXecB.js";const k=JSON.parse('{"title":"Slack利用ガイドライン","description":"","frontmatter":{"sidebarDepth":4,"title":"Slack利用ガイドライン","author":"フューチャー株式会社","head":[["meta",{"name":"keywords","content":"Slack"}]]},"headers":[],"relativePath":"documents/forSlack/slack_usage_guidelines.md","filePath":"documents/forSlack/slack_usage_guidelines.md"}'),c={name:"documents/forSlack/slack_usage_guidelines.md"};function n(p,a,h,d,u,b){const l=o("page-title");return s(),i("div",null,[t(l),a[0]||(a[0]=r('

    本規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    リモートワーク/ハイブリッドワーク前提の業務において、チャットなどの非同期コミュニケーションを円滑に進めることは、業務効率を向上させるだけではなく、従業員全員の満足度を向上させ、より良い職場づくりに繋げることができる。

    また、ユーザーの様々な要望に応えるため、現代のチャットサービスは豊富な機能が提供されている。しかし、各ユーザーの考え方/利用者の感覚が千差万別であるため、ある人によって問題ないとされる行動が、別の人にとっては良くない受け取り方をされることも多い。例えば次のような対立が考えられる。

    • 必要最低限の簡潔なメッセージを送る方が効率的だ/文面が冷たくならないように絵文字や感嘆符(!)を使うべきだ
    • 質問はDMで行うべき/チャンネルで行うべき
    • times(分報)チャンネルを活用すべき/ノイズなので個人のメモに閉じるべき

    これら運用方法は利用者の所属する部署やチームごとに自然と決めていくことが多いが、複数のチャンネルで異なった運用方針である場合に混乱をきたすことがしばしばである。また、トレードオフを理解せずに、メールのコミュニケーションモデルを引きずった方針を取ってしまうこともある。異なる文化圏のチームから移籍した時に、ハレーションが起きるケースも多い。

    本ガイドラインはSlackを対象に利用方針についてのベースとなる規約を設け、Slackを用いてより良いコミュニケーションを促進することを目的とする。

    適用範囲

    • 「はじめに」章で述べた、一般ユーザー視点での利活用を中心とする
    • 次のような特に管理者が関心を持つ事項については対象外とする
      • パスワードポリシー/多要素認証の強制
      • 社外メンバー招待/ゲストレベルの調整
      • 監査

    免責事項

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせて工夫された運営方針が存在する。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している
    • 自社のセキュリティポリシーや外部サービス利用ポリシーがある場合は、そちらを優先すること
    • Slack Enterprise Grid/Google Workspaceを利用しているため、それらの機能を前提にしている記述がある

    管理者向け推奨設定

    Workspace Access

    チーム、プロジェクトでの利用の場合は リクエスト制(By Request) もしくは招待性( Invite Only)の設定を推奨する。

    デフォルトチャンネル

    通常ワークスペースにメンバーを追加した際には #general へ自動参加するが、他にもメンバー全員に参加して欲しいチャンネルがある場合にはデフォルトチャンネルを追加する。

    TIP

    ユーザグループに対してもデフォルトチャンネルを設定できるため、用途に応じて使い分けると良い。

    表示名ガイドライン

    ワークスペースごとにガイドラインを設定することを推奨する。後述の表示名設定や、その他チームコミュニケーションにおけるルールを設定する。表示名のガイドラインを設定する権限があるのは、ワークスペースのオーナーだけなので注意する。

    ワークスペースの管理者

    ワークスペース内に複数のチームが混在する場合、それぞれのチームごとに管理者権限保持者を設定すること。

    理由:

    • 管理者権限を持った人しか実行できないオペレーションがあった際、チーム内で解決できる状態を作っておくことが望ましいため

    ユーザ向け推奨設定

    アカウントアイコンを設定する

    デフォルトのアイコン利用は極力避け、アカウント登録時に各自のアイコン画像を積極的に登録する

    理由:

    • チャットコミュニケーションにおいて、個人識別におけるアイコン画像の有用性が高いため

    また、GitHub/GitLab、Google Workspace、その他利用サービスも同様のアイコンを利用することで、個人を識別しやすくなる。

    検索性の高い氏名(Full name)を設定する

    表示名(Display name) もしくは氏名(Full name) にて、ローマ字及び漢字(無ければカタカナ)でのフルネームを登録すること。表示名はチームごとに記載文化や書き方が異なるケースが多いので、本ガイドラインでは氏名に記載することを推奨する。例えば「未来 太郎」の場合、「Taro Mirai (未来 太郎)」という記載を推奨する。

    理由:

    • Slackではアカウント名のインクリメンタルサーチが強力である。その際、ローマ字でも漢字でもサジェストされる状態にすることでユーザビリティの向上が期待できるため。

    ユーザーグループの推奨

    ユーザーグループの利用を推奨する。ゲストユーザーは追加できないため、もしチャンネルに該当するメンバーが在籍する場合は、その旨をメンバー全員が理解しコミュニケーションから除外してしまわないように注意すること。

    TIP

    ユーザーグループを作成できない状態(メンバーがワークスペース間にまたがっている場合等)の時、メンション先の対象者全員が個別に自分のSlack設定>Notification>My Keywordsに「@○○チーム」と予約語を登録することで、擬似的にグループメンションが可能

    チャンネル命名規則

    外部組織メンバーが在籍するチャンネルの命名

    Slack コネクト等でチャンネル内に社外のメンバーが含まれる場合には、チャンネル名の先頭に ---ext をつける

    理由:

    • 全社的に統一的なプレフィックスを定義することで、外部とのコミュニケーションにて予期しないミスが発生してしまうことを防ぐ目的がある。例えば、内部の進行について相談する発言を、取引先メンバーが在籍するチャンネルに誤投稿してしまう事態を避けるため
    • チャンネルはセクションという単位でグルーピング可能となり、従来のように、用途や組織を表現するプレフィックスで並び順を制御する必然性が薄れた

    投稿内容ポリシー

    敬称は不要

    敬称は省略して、 @mano メッセージ内容 といった形式でコメントすること。もし、どうしても敬称を付けて欲しい場合、表示名をさん付けにするハックも存在するため、受信者側で調整する。

    理由:

    • コミュニケーションを迅速・シンプルにするため

    絵文字や感嘆符を活用する

    積極的に活用することを推奨する。テキストコミュニケーションは、画像や音声が伝わらない分、冷たく捉えられがちである。特にリーダーなど上位のポジションにいる場合は、メンバーに威圧的に捉えられないように配慮するのが好ましい。

    「では、Aの方針でよろしくお願いします!」「では、Aの方針でよろしくお願いします:ganbatte:」 など付けることで、不機嫌でないことがわかり、心理的安全性が保たれる。

    積極的にカスタム絵文字を追加することを推奨する。チーム内でしか通用しない(例えば内輪ネタのような)カスタム絵文字であっても気軽に追加して良い。

    理由:

    • より良いコミュニケーション手段を模索すること自体が、コミュニケーションを活性化させ、価値を向上させるため

    注意:

    • なお、当然ながら他人の名誉を毀損するなど、社会人/プロフェッショナルとしてふさわしくない内容は登録しないこと

    絵文字リアクションによる積極応答

    非同期のコミュニケーションにおいて発信者が気になる点として、「投稿内容を見てくれたのかどうか」がある。特に確認依頼については見ていればOKで、回答は急がないケースは想像以上に多い。
    こういった場面では、::後で確認します:: といった絵文字リアクションを付けることで解決するため、積極的に活用する。

    また、参加者が多いチャンネルでの発信は勇気がいることなので、コミュニケーションを活性化させるためにも絵文字リアクションを積極的に行い推奨/礼賛することが望ましい。

    「〇〇してほしい」「〇〇について教えてほしい」(相談セクション)への対応は絵文字リアクションだけで済まさない

    「投稿内容を見てくれたのかどうか」ではなく、「投稿内容を理解して次のアクションをとってくれるのか」を知りたい場面も多い。 そのような場面では、絵文字リアクションのみで済まさず、対応可否をコメントでフィードバックする必要がある。

    DMはなるべく避ける

    基本的には、DMよりチャンネルでのやり取りを推奨する。チャンネルであっても、より参加人数が多い(よりオープンな)チャンネルでのやり取りを推奨する。

    理由:

    • 重複した質問を防ぐため
    • 質問事項がチーム/組織に共有されることで、全体の効率が上がるため
    • 後から類似の困りごとを持ったメンバーが、キーワード検索で見つけやすくするため

    DMの利用を推奨するケース:

    • 人事相談、機密事項を含む場合(「機密情報の流出に注意する」章を参照)
    • 限られたメンバーのみに、ファイル共有をしたい場合
    • 後から検索させる意味がないやり取り(「最近元気?」と同期に投げる場合など)

    timesの推奨

    timesとは、分報や作業スレッドとも呼ばれ、今取り組んでいることや困っていることを投稿することを指す。

    本規約の推奨は次のとおり:

    • timesの利用を推奨する
    • メンバーごとのtimesチャンネルではなく、スレッドでの利用を推奨する
    • timesスレッドは、他のメンバーは参照しても参照しなくてもどちらでも良い

    理由:

    • スレッド単位であれば、本チャンネル側のノイズになることはない。参加メンバーが多い場合は、times専用のチャンネルを作成すれば良い
    • メンバーごとの times チャンネルは、チャンネルが必要以上に増えるので推奨しない
    • 必要に応じて、作業状況を本人に確認(ポーリング)しなくても把握することができる
    • ハマったことや調べたことが、後々キーワード検索で見つかり、新規参画者の助けになることも多い

    timesスレッド作成者の注意事項:

    • times内とはいえ、他の人が不快になるような発言や不適切な利用は避ける(チームメンバーが閲覧可能であることを忘れない)

    timesスレッド内のメンション:

    • timesスレッドのコメント数は100以上になることもあり、途中で他メンバーに相談事などでメンションを飛ばすと、呼ばれたメンバーには「該当のスレッドの全コメントをチェックしたほうが良いのか」といった迷いが生じる。そのため、times内ではなく相談は別メッセージに切り出して行うことを推奨する
    • なお、timesの投稿を読んで欲しいときは、timesスレッドでメンションしても良い
    • timesのメンションを受けたユーザーが、その後の投稿の通知を受け取りたくない場合は、そのスレッドの通知を切ることで対応する

    timesスレッドでメンションを飛ばすと、その後の投稿によってメンション先のユーザーに通知が飛んでしまうのではないか?という懸念への考え方:

    • 該当スレッドのフォローを外せば良いので、上記観点でメンションを行う/行わないの判断は行わなくても良い。前述の通り、timesのコメントを(全て)読んで欲しい否かで決める

    メッセージ(スレッドのトップ)は具体的に書く

    チャンネルのメッセージ(スレッド先頭の投稿)では、話題を端的に表現する。ただし、返信スレッドの中を確認しないと内容が分からないようなメッセージ(タイトル)は非推奨とする。

    メッセージ(スレッド先頭の投稿)
    ✅推奨例@mirai チケット #4191 foo bar failed のビルドエラーの解消についての相談です。スタックトレースはスレッド内に記載します
    ❌非推奨例レビュー依頼

    なお、メンションはメッセージ(スレッド先頭)に付けるか、返信スレッド内に付けるかは任意とする。

    参考:

    メッセージのURLを活用する

    Slackは本来、フロー情報向けのツールである。しかしこれをWikiなどのストック情報向けツールに転記する労力は高く、運用が形骸化しがちである。そのため、例えばあるスレッドで設計方針について議論したのであれば、そのスレッドのURLをコピーして、作業チケットやWikiなどに記載し、トレース可能にするような運用にするチームも良く聞く。本規約もスレッドURLの活用を推奨する。

    なお、決定事項の経緯や議論内容を数年経過したのちに確認することもしばしば発生する。そのため議論があればスレッドを利用し、かつ同一スレッドで複数のテーマを混ぜないことが望ましい。関連議論がいくつかのスレッドに分かれる場合、相互に関連スレッドのURLを投稿しておくと良い。

    Slackにおける情報ストック機能

    Canvas、ブックマーク、ピン留め機能を活用することで、Slack内にてストック情報を取り扱うことも可能である。PJで利用している課題管理サービスのURLを共有したい場合にはブックマーク、PJメンバーに都度参照して欲しい特定のメッセージがある場合にはピン留め、情報量が多く章立てて整理をしたい場合にはCanvas、などといった形でユースケースに合わせて使い分ける。

    Also send to channelは乱発しない

    Also send to channel を利用することで、スレッド内の投稿をチャンネルのタイムライン側に重複投稿ができる。

    本規約の推奨は以下の通り:

    • 過去のスレッドでやり取りを再開した場合に、チャンネルに在籍するメンバーに通知する目的で用いる
    • スレッド内で重要な決定事項に至った場合は、メンバーに周知する目的で用いる
    • スレッド内のやり取りを細かくAlso send to channelすると、スレッドを用いる意味が薄れるので、利用頻度は抑えるように意識する

    広めの通知に注意する

    @channel

    緊急時を除き、原則利用を禁止する。

    理由:

    • @channel はSlackを見ていないユーザにも通知が飛ぶため、休暇中のメンバー等にも影響がある。受取側で制御すべきという考えもあるが、システム障害対応など優先度の高い問い合わせのために、あえてOFFにしていないメンバーも存在することを考えると、なるべく利用を避けた方が無難である

    利用して良い場合:

    • システム障害時など、重大かつ緊急度が高い場合は @channel を使っても良い

    @here

    メールのCCに似た意図で @here を使うことは禁止とする。

    推奨ケース

    txt
    @真野 @村田 ○○の件ですが\\~

    NG(メールのCC的な形で @here を追加)

    txt
    @真野 @村田 @here ○○の件ですが

    理由:

    • メールのCC的な参考情報であれば、@here を付けずに、チャンネルの未読通知で後で見ることができるため
    • 真に必要ではないときに通知が飛ぶことが常態化すると、@here の緊急性やアクションを求める意味合いが弱まり、真に必要なときに読み飛ばされてしまう可能性が上がるため(「狼少年」現象)

    利用して良い場合:

    • 全員にアクションを促す連絡事項を行う場合。例えば、チーム全体イベントへの出欠可否を確認する連絡など

    メンション範囲は適切に

    過剰なメンションの抑制

    原則、レビュー依頼や確認依頼など、行動してほしい時にメンションを付けるものとする。「@mirai ありがとうございます!」「@mirai 承知しました!」等の挨拶にメンションを付けると、通知が来てノイズになるため非推奨とする。メンションを付けず「ありがとうございます!」とすると良い。

    情報提供依頼系など善意やり取りはきちんとフィードバックする

    情報提供依頼はSlackと親和性が良いタスクである。この際、情報提供の依頼者は、回答してもらった人に対して、👍 絵文字だけのリアクションを取る場合があるが、フィードバック付きでコメントを返すことが望ましい。情報提供者としても、その情報が役立ったのか、またそうでないかの関心は強いためである。
    もし、フィードバックが難しい場合や、スレッド投稿数をなるべく減らしたいなどの意図がある場合は、複数のリアクションを返し感謝の意を強調すると良い。 👍️🎉☺[神] のようなイメージである。

    メンションの宛先をできる限り絞り込む

    単なる周知目的ではなく行動を促したい相手に絞ること。お見合いになってボールが浮いてしまう可能性がある。「@mirai @mano @murata @ozawa @tanimura AWSの設定で確認したいのですが~」などと広すぎる場合は、宛先メンバーは自分よりもっと詳しい人がいるかも知れないので、回答すべきかどうか逡巡してしまう。できれば1、2名に宛先を絞り、宛先メンバーから別の有識者メンバーにディスパッチしてもらう運用を考えると良い。

    予約投稿を活用する

    特にリーダーからメンバーに対して、深夜(22:00-6:00など)や休日など業務時間外の投稿は原則禁止とし、予約投稿を推奨する。

    理由:

    • 仕事とプライベートにメリハリを持たせることで、成果の向上を期待できるため
    • (システム障害等)緊急時の依頼と混同してしまうため。次回出勤時の対応で良いものと区別すること
    • Slackのアップデートにより、チャンネル投稿に閉じずスレッド投稿へも予約投稿が可能となった

    受け取り側で制御する方針

    システム障害時などの緊急時は電話連絡とし、メンションに対する即対応を求めない取り決めを行うのであれば、受け取り側で通知時間を設定し、送る側は送信時間に気を遣わない運用も可とする。ただし、時間外に通知を受け翌営業日に対応しようと考えたが翌営業日には忘れているような場合、受け取り側で通知を受けた時点でリマインダーを仕込んだり、アクティビティ > @メンション を定期的に確認するような工夫をする。

    不在の表明

    表示名に不在情報を記載(例:@sato_11/8休)しておくことを推奨する。受信側が不在時に緊急性の低い通知を防げたり、送信側が即レスを期待しなくて済む。不在情報がGoogleカレンダーなど別のスケジュールアプリで管理されていたとしても、Slackでの依頼時に気付けるため。

    ステータス機能で「休暇中🏝️」にすればよいのではないか

    ステータス機能でもチームメンバーに不在であるという状態を表明できる。しかし、次の観点で表示名での表明を推奨する。

    • いつから、いつまで休暇なのかステータスでは不明である
      • 期間が分かれば、予約投稿で休暇明けに投稿するなどのアクションがすぐ取れる
    • 休暇だけでなく出張中などの情報も提示できる
      • 例えば、海外出張なので時差があることが分かれば、チームメンバーにどれくらいでレスポンスが来そうか予想ができるようになる
    • ステータス変更に気が付きにくい
      • メンションを付けて投稿する時に常時表示されるわけではないので、ステータスは見過ごされる可能性が高い :::

    可読性を上げるための書式設定

    箇条書き、太字、引用などの装飾は、積極的に活用する。文章を構造化することで、読み手にとっての負荷が軽減されるため。Slackの書式以外にも、【すみかっこ】等の記号を使うことでセクションを表現することも同時に推奨する。

    エラーメッセージの画像添付非推奨、テキストスニペットの推奨

    有識者にスタックトレースなどのエラー内容を画像添付して問い合わせることは原則として非推奨とし、テキストで共有することを推奨する。また、共有内容が長文の場合にはテキストスニペット使用が好ましい。

    理由:

    • 相談相手も裏取りとしてスタックトレースの内容を検索することが多々あるため
    • 後から同様の困り事を持った人が、キーワード検索で見つけにくくなるため
    • 長いログをそのまま貼り付けるとスレッドを広く埋め尽くしてしまうが、テキストスニペットを使えば1投稿あたりのデフォルト表示域を制限できる

    次の場合は、スクリーンショットなどの画像で共有しても良い。

    • コピーできないエラー表示など、テキストでの情報提供が難しい場合
    • (相談相手が、コピー範囲などを独自判断で狭められることを防ぐなどの理由で)スクリーンショットでの共有を希望する場合

    テキストスニペット利用時は、タイトル(ファイル名)に拡張子をつける

    Slackはテキストスニペットに設定されたタイトルをそのままファイル名としてダウンロードするよう動作する。この際拡張子が設定されていないとSlack内でそのままファイルを開くことができなくなってしまう。

    機密情報の流出に注意する

    営業情報、個人情報、人事情報など機密情報は、「最小権限の原則」に従い、なるべく宛先を狭めるべきである。センシティブなやり取りを行う場合は、参加者を絞ったプライベートチャンネル/DMグループの活用を推奨する。

    メッセージ通知にも気をつける

    画面投影やWebミーティングでの画面共有時、意図しないメッセージ通知が見えてしまう事がある。Slackの通知設定にて次に示す設定を施すことで防ぐことが可能なので活用すると良い。

    • 通知自体をOFFにする
    • 通知はOFFにしないが、メッセージ内容は非表示にする

    ファイルの共有に注意する

    Slackのファイル共有は便利であるが、ファイルのオーナー(作成者)とチャンネルにメンバー追加できる担当者が必ずしも1:1ではない。そのため次の運用が望ましい。

    推奨する運用:

    • Google Driveなどにファイルをアップロードする
    • Google Drive側で適切な権限に絞り込む

    理由:

    • Google Drive側で権限設定が可能
    • Slack上にアップロードされたファイルが、別のチャンネルに再アップロードされて収集がつかなくなるといったケースを防ぎ、統制を図るため

    該当しないケース:

    • 社外勉強会の登壇資料など、一般に「公開済み/公開予定 」のファイルはアップロードして良い

    Google DriveのURL共有時プレビュー表示について:

    • 表紙がプレビューされるが、次の理由により問題ないという立場を取る。
      • プレビュー表示されるのは1枚目(1シート目)であり、通常は表紙ページが見られるのみ
      • ファイルが存在すること自体は知られて良い(チャンネルに投稿しているため)と考えられる
      • なにか問題があれば、プレビュー表示を行わない操作がSlack上で可能である

    プライベートチャンネルの投稿に対する引用

    プライベートチャンネルの投稿コメントを、別のチャンネルにURL引用で投稿すると、該当チャンネルの権限を有していないユーザーにも参照権限を与えてしまう。引用時にはセンシティブな内容が含まれていないか確認するよう注意する。

    さいごに

    本ガイドラインの策定にあたっては、すでにインターネットに公開されているSlack利用ガイドラインや記事等も参照させていただいた。本ガイドラインが皆様のSlack活用をより快適にする一助となれば幸いである。

    参考:

    ',140))])}const q=e(c,[["render",n]]);export{k as __pageData,q as default}; diff --git a/assets/future_muscle_partner_abstract.CX2VLXG2.png b/assets/future_muscle_partner_abstract.CX2VLXG2.png new file mode 100644 index 00000000..2f816600 Binary files /dev/null and b/assets/future_muscle_partner_abstract.CX2VLXG2.png differ diff --git a/assets/index.md.CpvsHgwS.js b/assets/index.md.CpvsHgwS.js new file mode 100644 index 00000000..2c719dd5 --- /dev/null +++ b/assets/index.md.CpvsHgwS.js @@ -0,0 +1 @@ +import{_ as e,c as a,a3 as r,o as i}from"./chunks/framework.BDUoXecB.js";const h=JSON.parse('{"title":"Future Enterprise Coding Standards","description":"","frontmatter":{"layout":"home","title":"Future Enterprise Coding Standards","hero":{"name":"Future Enterprise Coding Standards","tagline":"フューチャー株式会社が作成するエンタープライズ領域に特化したコーディング規約","actions":[{"theme":"brand","text":"Javaコーディング規約","link":"./documents/forJava/"},{"theme":"brand","text":"SQL コーディング規約","link":"./documents/forSQL/"},{"theme":"alt","text":"AWS インフラリソース命名規約","link":"./documents/forAWSResource"},{"theme":"alt","text":"OpenAPI Specification 規約","link":"./documents/forOpenAPISpecification"},{"theme":"alt","text":"Markdown設計ドキュメント規約","link":"./documents/forMarkdown"}]},"features":[{"title":"Readability","details":"ソースコードの可読性を高く保つことで、保守性・拡張性の高いソフトウェアを作ることができます。 しかし、可読性の指標は複数あり、デベロッパーごとに判断がブレ、それぞれのスタイルで記述すると、ソフトウェア全体で見たときの可読性が下がってしまいます。 本コーディング規約は、コーディング時の判断のブレを防ぎます。"},{"title":"Enterprise","details":"エンタープライズ領域では、社員・パートナーの方々を合わせて、数百人が同時に開発することも珍しくありません。 ちょっとした悩み、失敗も、人数が集まれば大変なコスト・リスクになります。 誰もが引っかかる落とし穴、悩みの種をあらかじめ排除します。"},{"title":"Performance","details":"時に読みやすいソースコードはパフォーマンス劣化を招くことがあります。 しかし、常にパフォーマンスを優先したソースコードは人間の読めないソースコードになりがちです。 今、書こうとしているソースコードが、どの程度のパフォーマンスになるのか、指標を示すことで、ソフトウェア開発プロジェクトごとに最適なソースコードを選択することができます。"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),s={name:"index.md"};function n(o,t,c,d,l,u){return i(),a("div",null,t[0]||(t[0]=[r('

    GitHub last commitGitHub stars


    他の開発言語のコーディング規約も順次作成中です


    License

    CC-By-4.0

    ',6)]))}const p=e(s,[["render",n]]);export{h as __pageData,p as default}; diff --git a/assets/index.md.CpvsHgwS.lean.js b/assets/index.md.CpvsHgwS.lean.js new file mode 100644 index 00000000..2c719dd5 --- /dev/null +++ b/assets/index.md.CpvsHgwS.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,a3 as r,o as i}from"./chunks/framework.BDUoXecB.js";const h=JSON.parse('{"title":"Future Enterprise Coding Standards","description":"","frontmatter":{"layout":"home","title":"Future Enterprise Coding Standards","hero":{"name":"Future Enterprise Coding Standards","tagline":"フューチャー株式会社が作成するエンタープライズ領域に特化したコーディング規約","actions":[{"theme":"brand","text":"Javaコーディング規約","link":"./documents/forJava/"},{"theme":"brand","text":"SQL コーディング規約","link":"./documents/forSQL/"},{"theme":"alt","text":"AWS インフラリソース命名規約","link":"./documents/forAWSResource"},{"theme":"alt","text":"OpenAPI Specification 規約","link":"./documents/forOpenAPISpecification"},{"theme":"alt","text":"Markdown設計ドキュメント規約","link":"./documents/forMarkdown"}]},"features":[{"title":"Readability","details":"ソースコードの可読性を高く保つことで、保守性・拡張性の高いソフトウェアを作ることができます。 しかし、可読性の指標は複数あり、デベロッパーごとに判断がブレ、それぞれのスタイルで記述すると、ソフトウェア全体で見たときの可読性が下がってしまいます。 本コーディング規約は、コーディング時の判断のブレを防ぎます。"},{"title":"Enterprise","details":"エンタープライズ領域では、社員・パートナーの方々を合わせて、数百人が同時に開発することも珍しくありません。 ちょっとした悩み、失敗も、人数が集まれば大変なコスト・リスクになります。 誰もが引っかかる落とし穴、悩みの種をあらかじめ排除します。"},{"title":"Performance","details":"時に読みやすいソースコードはパフォーマンス劣化を招くことがあります。 しかし、常にパフォーマンスを優先したソースコードは人間の読めないソースコードになりがちです。 今、書こうとしているソースコードが、どの程度のパフォーマンスになるのか、指標を示すことで、ソフトウェア開発プロジェクトごとに最適なソースコードを選択することができます。"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),s={name:"index.md"};function n(o,t,c,d,l,u){return i(),a("div",null,t[0]||(t[0]=[r('

    GitHub last commitGitHub stars


    他の開発言語のコーディング規約も順次作成中です


    License

    CC-By-4.0

    ',6)]))}const p=e(s,[["render",n]]);export{h as __pageData,p as default}; diff --git a/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 b/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 new file mode 100644 index 00000000..b6b603d5 Binary files /dev/null and b/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 differ diff --git a/assets/inter-italic-cyrillic.By2_1cv3.woff2 b/assets/inter-italic-cyrillic.By2_1cv3.woff2 new file mode 100644 index 00000000..def40a4f Binary files /dev/null and b/assets/inter-italic-cyrillic.By2_1cv3.woff2 differ diff --git a/assets/inter-italic-greek-ext.1u6EdAuj.woff2 b/assets/inter-italic-greek-ext.1u6EdAuj.woff2 new file mode 100644 index 00000000..e070c3d3 Binary files /dev/null and b/assets/inter-italic-greek-ext.1u6EdAuj.woff2 differ diff --git a/assets/inter-italic-greek.DJ8dCoTZ.woff2 b/assets/inter-italic-greek.DJ8dCoTZ.woff2 new file mode 100644 index 00000000..a3c16ca4 Binary files /dev/null and b/assets/inter-italic-greek.DJ8dCoTZ.woff2 differ diff --git a/assets/inter-italic-latin-ext.CN1xVJS-.woff2 b/assets/inter-italic-latin-ext.CN1xVJS-.woff2 new file mode 100644 index 00000000..2210a899 Binary files /dev/null and b/assets/inter-italic-latin-ext.CN1xVJS-.woff2 differ diff --git a/assets/inter-italic-latin.C2AdPX0b.woff2 b/assets/inter-italic-latin.C2AdPX0b.woff2 new file mode 100644 index 00000000..790d62dc Binary files /dev/null and b/assets/inter-italic-latin.C2AdPX0b.woff2 differ diff --git a/assets/inter-italic-vietnamese.BSbpV94h.woff2 b/assets/inter-italic-vietnamese.BSbpV94h.woff2 new file mode 100644 index 00000000..1eec0775 Binary files /dev/null and b/assets/inter-italic-vietnamese.BSbpV94h.woff2 differ diff --git a/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 b/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 new file mode 100644 index 00000000..2cfe6153 Binary files /dev/null and b/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 differ diff --git a/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 b/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 new file mode 100644 index 00000000..e3886dd1 Binary files /dev/null and b/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 differ diff --git a/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 b/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 new file mode 100644 index 00000000..36d67487 Binary files /dev/null and b/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 differ diff --git a/assets/inter-roman-greek.BBVDIX6e.woff2 b/assets/inter-roman-greek.BBVDIX6e.woff2 new file mode 100644 index 00000000..2bed1e85 Binary files /dev/null and b/assets/inter-roman-greek.BBVDIX6e.woff2 differ diff --git a/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 b/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 new file mode 100644 index 00000000..9a8d1e2b Binary files /dev/null and b/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 differ diff --git a/assets/inter-roman-latin.Di8DUHzh.woff2 b/assets/inter-roman-latin.Di8DUHzh.woff2 new file mode 100644 index 00000000..07d3c53a Binary files /dev/null and b/assets/inter-roman-latin.Di8DUHzh.woff2 differ diff --git a/assets/inter-roman-vietnamese.BjW4sHH5.woff2 b/assets/inter-roman-vietnamese.BjW4sHH5.woff2 new file mode 100644 index 00000000..57bdc22a Binary files /dev/null and b/assets/inter-roman-vietnamese.BjW4sHH5.woff2 differ diff --git a/assets/merge_strategy_develop_to_feature_merge.drawio.Chi_3Oep.png b/assets/merge_strategy_develop_to_feature_merge.drawio.Chi_3Oep.png new file mode 100644 index 00000000..13ee6282 Binary files /dev/null and b/assets/merge_strategy_develop_to_feature_merge.drawio.Chi_3Oep.png differ diff --git a/assets/merge_strategy_develop_to_feature_rebase.drawio.Db0KPnu1.png b/assets/merge_strategy_develop_to_feature_rebase.drawio.Db0KPnu1.png new file mode 100644 index 00000000..415231d0 Binary files /dev/null and b/assets/merge_strategy_develop_to_feature_rebase.drawio.Db0KPnu1.png differ diff --git a/assets/merge_strategy_feature_to_develop_merge_commit.drawio.ClfglnSw.png b/assets/merge_strategy_feature_to_develop_merge_commit.drawio.ClfglnSw.png new file mode 100644 index 00000000..dee061da Binary files /dev/null and b/assets/merge_strategy_feature_to_develop_merge_commit.drawio.ClfglnSw.png differ diff --git a/assets/merge_strategy_feature_to_develop_rebase_and_merge.drawio.C4YTK8Ke.png b/assets/merge_strategy_feature_to_develop_rebase_and_merge.drawio.C4YTK8Ke.png new file mode 100644 index 00000000..a57b23fa Binary files /dev/null and b/assets/merge_strategy_feature_to_develop_rebase_and_merge.drawio.C4YTK8Ke.png differ diff --git a/assets/merge_strategy_feature_to_develop_squash_and_merge.drawio.DNfqg4i8.png b/assets/merge_strategy_feature_to_develop_squash_and_merge.drawio.DNfqg4i8.png new file mode 100644 index 00000000..54ac3816 Binary files /dev/null and b/assets/merge_strategy_feature_to_develop_squash_and_merge.drawio.DNfqg4i8.png differ diff --git a/assets/merge_strategy_feature_to_develop_squash_and_merge_gitlab.drawio.DUmvz-tJ.png b/assets/merge_strategy_feature_to_develop_squash_and_merge_gitlab.drawio.DUmvz-tJ.png new file mode 100644 index 00000000..cb99f085 Binary files /dev/null and b/assets/merge_strategy_feature_to_develop_squash_and_merge_gitlab.drawio.DUmvz-tJ.png differ diff --git a/assets/release_overtaking.drawio.DPjD4_z3.png b/assets/release_overtaking.drawio.DPjD4_z3.png new file mode 100644 index 00000000..32fef1a8 Binary files /dev/null and b/assets/release_overtaking.drawio.DPjD4_z3.png differ diff --git a/assets/release_overtaking_hotfix.drawio.BcV3VqPO.png b/assets/release_overtaking_hotfix.drawio.BcV3VqPO.png new file mode 100644 index 00000000..b2e76709 Binary files /dev/null and b/assets/release_overtaking_hotfix.drawio.BcV3VqPO.png differ diff --git a/assets/style.qeMpAvw_.css b/assets/style.qeMpAvw_.css new file mode 100644 index 00000000..d7edb9a6 --- /dev/null +++ b/assets/style.qeMpAvw_.css @@ -0,0 +1 @@ +@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-roman-cyrillic.C5lxZ8CY.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-roman-greek-ext.CqjqNYQ-.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-roman-greek.BBVDIX6e.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-roman-vietnamese.BjW4sHH5.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-roman-latin-ext.4ZJIpNVo.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-roman-latin.Di8DUHzh.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-italic-cyrillic-ext.r48I6akx.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-italic-cyrillic.By2_1cv3.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-italic-greek-ext.1u6EdAuj.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-italic-greek.DJ8dCoTZ.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-italic-vietnamese.BSbpV94h.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-italic-latin-ext.CN1xVJS-.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/coding-standards/assets/inter-italic-latin.C2AdPX0b.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Punctuation SC;font-weight:400;src:local("PingFang SC Regular"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:500;src:local("PingFang SC Medium"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:600;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:700;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white)}.dark{--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black)}:root{--vp-c-gray-1: #dddde3;--vp-c-gray-2: #e4e4e9;--vp-c-gray-3: #ebebef;--vp-c-gray-soft: rgba(142, 150, 170, .14);--vp-c-indigo-1: #3451b2;--vp-c-indigo-2: #3a5ccc;--vp-c-indigo-3: #5672cd;--vp-c-indigo-soft: rgba(100, 108, 255, .14);--vp-c-purple-1: #6f42c1;--vp-c-purple-2: #7e4cc9;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .14);--vp-c-green-1: #18794e;--vp-c-green-2: #299764;--vp-c-green-3: #30a46c;--vp-c-green-soft: rgba(16, 185, 129, .14);--vp-c-yellow-1: #915930;--vp-c-yellow-2: #946300;--vp-c-yellow-3: #9f6a00;--vp-c-yellow-soft: rgba(234, 179, 8, .14);--vp-c-red-1: #b8272c;--vp-c-red-2: #d5393e;--vp-c-red-3: #e0575b;--vp-c-red-soft: rgba(244, 63, 94, .14);--vp-c-sponsor: #db2777}.dark{--vp-c-gray-1: #515c67;--vp-c-gray-2: #414853;--vp-c-gray-3: #32363f;--vp-c-gray-soft: rgba(101, 117, 133, .16);--vp-c-indigo-1: #a8b1ff;--vp-c-indigo-2: #5c73e7;--vp-c-indigo-3: #3e63dd;--vp-c-indigo-soft: rgba(100, 108, 255, .16);--vp-c-purple-1: #c8abfa;--vp-c-purple-2: #a879e6;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .16);--vp-c-green-1: #3dd68c;--vp-c-green-2: #30a46c;--vp-c-green-3: #298459;--vp-c-green-soft: rgba(16, 185, 129, .16);--vp-c-yellow-1: #f9b44e;--vp-c-yellow-2: #da8b17;--vp-c-yellow-3: #a46a0a;--vp-c-yellow-soft: rgba(234, 179, 8, .16);--vp-c-red-1: #f66f81;--vp-c-red-2: #f14158;--vp-c-red-3: #b62a3c;--vp-c-red-soft: rgba(244, 63, 94, .16)}:root{--vp-c-bg: #ffffff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #ffffff;--vp-c-bg-soft: #f6f6f7}.dark{--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-bg-soft: #202127}:root{--vp-c-border: #c2c2c4;--vp-c-divider: #e2e2e3;--vp-c-gutter: #e2e2e3}.dark{--vp-c-border: #3c3f44;--vp-c-divider: #2e2e32;--vp-c-gutter: #000000}:root{--vp-c-text-1: rgba(60, 60, 67);--vp-c-text-2: rgba(60, 60, 67, .78);--vp-c-text-3: rgba(60, 60, 67, .56)}.dark{--vp-c-text-1: rgba(255, 255, 245, .86);--vp-c-text-2: rgba(235, 235, 245, .6);--vp-c-text-3: rgba(235, 235, 245, .38)}:root{--vp-c-default-1: var(--vp-c-gray-1);--vp-c-default-2: var(--vp-c-gray-2);--vp-c-default-3: var(--vp-c-gray-3);--vp-c-default-soft: var(--vp-c-gray-soft);--vp-c-brand-1: var(--vp-c-indigo-1);--vp-c-brand-2: var(--vp-c-indigo-2);--vp-c-brand-3: var(--vp-c-indigo-3);--vp-c-brand-soft: var(--vp-c-indigo-soft);--vp-c-brand: var(--vp-c-brand-1);--vp-c-tip-1: var(--vp-c-brand-1);--vp-c-tip-2: var(--vp-c-brand-2);--vp-c-tip-3: var(--vp-c-brand-3);--vp-c-tip-soft: var(--vp-c-brand-soft);--vp-c-note-1: var(--vp-c-brand-1);--vp-c-note-2: var(--vp-c-brand-2);--vp-c-note-3: var(--vp-c-brand-3);--vp-c-note-soft: var(--vp-c-brand-soft);--vp-c-success-1: var(--vp-c-green-1);--vp-c-success-2: var(--vp-c-green-2);--vp-c-success-3: var(--vp-c-green-3);--vp-c-success-soft: var(--vp-c-green-soft);--vp-c-important-1: var(--vp-c-purple-1);--vp-c-important-2: var(--vp-c-purple-2);--vp-c-important-3: var(--vp-c-purple-3);--vp-c-important-soft: var(--vp-c-purple-soft);--vp-c-warning-1: var(--vp-c-yellow-1);--vp-c-warning-2: var(--vp-c-yellow-2);--vp-c-warning-3: var(--vp-c-yellow-3);--vp-c-warning-soft: var(--vp-c-yellow-soft);--vp-c-danger-1: var(--vp-c-red-1);--vp-c-danger-2: var(--vp-c-red-2);--vp-c-danger-3: var(--vp-c-red-3);--vp-c-danger-soft: var(--vp-c-red-soft);--vp-c-caution-1: var(--vp-c-red-1);--vp-c-caution-2: var(--vp-c-red-2);--vp-c-caution-3: var(--vp-c-red-3);--vp-c-caution-soft: var(--vp-c-red-soft)}:root{--vp-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;font-optical-sizing:auto}:root:where(:lang(zh)){--vp-font-family-base: "Punctuation SC", "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-footer: 10;--vp-z-index-local-nav: 20;--vp-z-index-nav: 30;--vp-z-index-layout-top: 40;--vp-z-index-backdrop: 50;--vp-z-index-sidebar: 60}@media (min-width: 960px){:root{--vp-z-index-sidebar: 25}}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-code-color: var(--vp-c-brand-1);--vp-code-link-color: var(--vp-c-brand-1);--vp-code-link-hover-color: var(--vp-c-brand-2);--vp-code-bg: var(--vp-c-default-soft);--vp-code-block-color: var(--vp-c-text-2);--vp-code-block-bg: var(--vp-c-bg-alt);--vp-code-block-divider-color: var(--vp-c-gutter);--vp-code-lang-color: var(--vp-c-text-3);--vp-code-line-highlight-color: var(--vp-c-default-soft);--vp-code-line-number-color: var(--vp-c-text-3);--vp-code-line-diff-add-color: var(--vp-c-success-soft);--vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);--vp-code-line-diff-remove-color: var(--vp-c-danger-soft);--vp-code-line-diff-remove-symbol-color: var(--vp-c-danger-1);--vp-code-line-warning-color: var(--vp-c-warning-soft);--vp-code-line-error-color: var(--vp-c-danger-soft);--vp-code-copy-code-border-color: var(--vp-c-divider);--vp-code-copy-code-bg: var(--vp-c-bg-soft);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-c-bg);--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-copy-copied-text-content: "Copied";--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1);--vp-code-tab-active-bar-color: var(--vp-c-brand-1)}:root{--vp-button-brand-border: transparent;--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand-3);--vp-button-brand-hover-border: transparent;--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-2);--vp-button-brand-active-border: transparent;--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-1);--vp-button-alt-border: transparent;--vp-button-alt-text: var(--vp-c-text-1);--vp-button-alt-bg: var(--vp-c-default-3);--vp-button-alt-hover-border: transparent;--vp-button-alt-hover-text: var(--vp-c-text-1);--vp-button-alt-hover-bg: var(--vp-c-default-2);--vp-button-alt-active-border: transparent;--vp-button-alt-active-text: var(--vp-c-text-1);--vp-button-alt-active-bg: var(--vp-c-default-1);--vp-button-sponsor-border: var(--vp-c-text-2);--vp-button-sponsor-text: var(--vp-c-text-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: transparent;--vp-custom-block-info-text: var(--vp-c-text-1);--vp-custom-block-info-bg: var(--vp-c-default-soft);--vp-custom-block-info-code-bg: var(--vp-c-default-soft);--vp-custom-block-note-border: transparent;--vp-custom-block-note-text: var(--vp-c-text-1);--vp-custom-block-note-bg: var(--vp-c-default-soft);--vp-custom-block-note-code-bg: var(--vp-c-default-soft);--vp-custom-block-tip-border: transparent;--vp-custom-block-tip-text: var(--vp-c-text-1);--vp-custom-block-tip-bg: var(--vp-c-tip-soft);--vp-custom-block-tip-code-bg: var(--vp-c-tip-soft);--vp-custom-block-important-border: transparent;--vp-custom-block-important-text: var(--vp-c-text-1);--vp-custom-block-important-bg: var(--vp-c-important-soft);--vp-custom-block-important-code-bg: var(--vp-c-important-soft);--vp-custom-block-warning-border: transparent;--vp-custom-block-warning-text: var(--vp-c-text-1);--vp-custom-block-warning-bg: var(--vp-c-warning-soft);--vp-custom-block-warning-code-bg: var(--vp-c-warning-soft);--vp-custom-block-danger-border: transparent;--vp-custom-block-danger-text: var(--vp-c-text-1);--vp-custom-block-danger-bg: var(--vp-c-danger-soft);--vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);--vp-custom-block-caution-border: transparent;--vp-custom-block-caution-text: var(--vp-c-text-1);--vp-custom-block-caution-bg: var(--vp-c-caution-soft);--vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-switch-bg-color: var(--vp-c-default-soft)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg);--vp-nav-logo-height: 24px}.hide-nav{--vp-nav-height: 0px}.hide-nav .VPSidebar{--vp-nav-height: 22px}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand-1);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: transparent;--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-default-soft);--vp-badge-tip-border: transparent;--vp-badge-tip-text: var(--vp-c-tip-1);--vp-badge-tip-bg: var(--vp-c-tip-soft);--vp-badge-warning-border: transparent;--vp-badge-warning-text: var(--vp-c-warning-1);--vp-badge-warning-bg: var(--vp-c-warning-soft);--vp-badge-danger-border: transparent;--vp-badge-danger-text: var(--vp-c-danger-1);--vp-badge-danger-bg: var(--vp-c-danger-soft)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand-1);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand-1);--vp-local-search-highlight-bg: var(--vp-c-brand-1);--vp-local-search-highlight-text: var(--vp-c-neutral-inverse)}@media (prefers-reduced-motion: reduce){*,:before,:after{animation-delay:-1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important;background-attachment:initial!important;scroll-behavior:auto!important;transition-duration:0s!important;transition-delay:0s!important}}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}html.dark{color-scheme:dark}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:24px;font-family:var(--vp-font-family-base);font-size:16px;font-weight:400;color:var(--vp-c-text-1);background-color:var(--vp-c-bg);font-synthesis:style;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:24px;font-size:16px;font-weight:400}p{margin:0}strong,b{font-weight:600}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{color:inherit;text-decoration:inherit}ol,ul{list-style:none;margin:0;padding:0}blockquote{margin:0}pre,code,kbd,samp{font-family:var(--vp-font-family-mono)}img,svg,video,canvas,audio,iframe,embed,object{display:block}figure{margin:0}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{border:0;padding:0;line-height:inherit;color:inherit}button{padding:0;font-family:inherit;background-color:transparent;background-image:none}button:enabled,[role=button]:enabled{cursor:pointer}button:focus,button:focus-visible{outline:1px dotted;outline:4px auto -webkit-focus-ring-color}button:focus:not(:focus-visible){outline:none!important}input:focus,textarea:focus,select:focus{outline:none}table{border-collapse:collapse}input{background-color:transparent}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--vp-c-text-3)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--vp-c-text-3)}input::placeholder,textarea::placeholder{color:var(--vp-c-text-3)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}textarea{resize:vertical}select{-webkit-appearance:none}fieldset{margin:0;padding:0}h1,h2,h3,h4,h5,h6,li,p{overflow-wrap:break-word}vite-error-overlay{z-index:9999}mjx-container{overflow-x:auto}mjx-container>svg{display:inline-block;margin:auto}[class^=vpi-],[class*=" vpi-"],.vp-icon{width:1em;height:1em}[class^=vpi-].bg,[class*=" vpi-"].bg,.vp-icon.bg{background-size:100% 100%;background-color:transparent}[class^=vpi-]:not(.bg),[class*=" vpi-"]:not(.bg),.vp-icon:not(.bg){-webkit-mask:var(--icon) no-repeat;mask:var(--icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit}.vpi-align-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E")}.vpi-arrow-right,.vpi-arrow-down,.vpi-arrow-left,.vpi-arrow-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E")}.vpi-chevron-right,.vpi-chevron-down,.vpi-chevron-left,.vpi-chevron-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}.vpi-chevron-down,.vpi-arrow-down{transform:rotate(90deg)}.vpi-chevron-left,.vpi-arrow-left{transform:rotate(180deg)}.vpi-chevron-up,.vpi-arrow-up{transform:rotate(-90deg)}.vpi-square-pen{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z'/%3E%3C/svg%3E")}.vpi-plus{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E")}.vpi-sun{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E")}.vpi-moon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E")}.vpi-more-horizontal{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E")}.vpi-languages{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E")}.vpi-heart{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E")}.vpi-search{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")}.vpi-layout-list{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7M14 9h7M14 15h7M14 20h7'/%3E%3C/svg%3E")}.vpi-delete{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2ZM18 9l-6 6M12 9l6 6'/%3E%3C/svg%3E")}.vpi-corner-down-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 10-5 5 5 5'/%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E")}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E")}.visually-hidden{position:absolute;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}.custom-block{border:1px solid transparent;border-radius:8px;padding:16px 16px 8px;line-height:24px;font-size:var(--vp-custom-block-font-size);color:var(--vp-c-text-2)}.custom-block.info{border-color:var(--vp-custom-block-info-border);color:var(--vp-custom-block-info-text);background-color:var(--vp-custom-block-info-bg)}.custom-block.info a,.custom-block.info code{color:var(--vp-c-brand-1)}.custom-block.info a:hover,.custom-block.info a:hover>code{color:var(--vp-c-brand-2)}.custom-block.info code{background-color:var(--vp-custom-block-info-code-bg)}.custom-block.note{border-color:var(--vp-custom-block-note-border);color:var(--vp-custom-block-note-text);background-color:var(--vp-custom-block-note-bg)}.custom-block.note a,.custom-block.note code{color:var(--vp-c-brand-1)}.custom-block.note a:hover,.custom-block.note a:hover>code{color:var(--vp-c-brand-2)}.custom-block.note code{background-color:var(--vp-custom-block-note-code-bg)}.custom-block.tip{border-color:var(--vp-custom-block-tip-border);color:var(--vp-custom-block-tip-text);background-color:var(--vp-custom-block-tip-bg)}.custom-block.tip a,.custom-block.tip code{color:var(--vp-c-tip-1)}.custom-block.tip a:hover,.custom-block.tip a:hover>code{color:var(--vp-c-tip-2)}.custom-block.tip code{background-color:var(--vp-custom-block-tip-code-bg)}.custom-block.important{border-color:var(--vp-custom-block-important-border);color:var(--vp-custom-block-important-text);background-color:var(--vp-custom-block-important-bg)}.custom-block.important a,.custom-block.important code{color:var(--vp-c-important-1)}.custom-block.important a:hover,.custom-block.important a:hover>code{color:var(--vp-c-important-2)}.custom-block.important code{background-color:var(--vp-custom-block-important-code-bg)}.custom-block.warning{border-color:var(--vp-custom-block-warning-border);color:var(--vp-custom-block-warning-text);background-color:var(--vp-custom-block-warning-bg)}.custom-block.warning a,.custom-block.warning code{color:var(--vp-c-warning-1)}.custom-block.warning a:hover,.custom-block.warning a:hover>code{color:var(--vp-c-warning-2)}.custom-block.warning code{background-color:var(--vp-custom-block-warning-code-bg)}.custom-block.danger{border-color:var(--vp-custom-block-danger-border);color:var(--vp-custom-block-danger-text);background-color:var(--vp-custom-block-danger-bg)}.custom-block.danger a,.custom-block.danger code{color:var(--vp-c-danger-1)}.custom-block.danger a:hover,.custom-block.danger a:hover>code{color:var(--vp-c-danger-2)}.custom-block.danger code{background-color:var(--vp-custom-block-danger-code-bg)}.custom-block.caution{border-color:var(--vp-custom-block-caution-border);color:var(--vp-custom-block-caution-text);background-color:var(--vp-custom-block-caution-bg)}.custom-block.caution a,.custom-block.caution code{color:var(--vp-c-caution-1)}.custom-block.caution a:hover,.custom-block.caution a:hover>code{color:var(--vp-c-caution-2)}.custom-block.caution code{background-color:var(--vp-custom-block-caution-code-bg)}.custom-block.details{border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.custom-block.details a{color:var(--vp-c-brand-1)}.custom-block.details a:hover,.custom-block.details a:hover>code{color:var(--vp-c-brand-2)}.custom-block.details code{background-color:var(--vp-custom-block-details-code-bg)}.custom-block-title{font-weight:600}.custom-block p+p{margin:8px 0}.custom-block.details summary{margin:0 0 8px;font-weight:700;cursor:pointer;-webkit-user-select:none;user-select:none}.custom-block.details summary+p{margin:8px 0}.custom-block a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;transition:opacity .25s}.custom-block a:hover{opacity:.75}.custom-block code{font-size:var(--vp-custom-block-code-font-size)}.custom-block.custom-block th,.custom-block.custom-block blockquote>p{font-size:var(--vp-custom-block-font-size);color:inherit}.dark .vp-code span{color:var(--shiki-dark, inherit)}html:not(.dark) .vp-code span{color:var(--shiki-light, inherit)}.vp-code-group{margin-top:16px}.vp-code-group .tabs{position:relative;display:flex;margin-right:-24px;margin-left:-24px;padding:0 12px;background-color:var(--vp-code-tab-bg);overflow-x:auto;overflow-y:hidden;box-shadow:inset 0 -1px var(--vp-code-tab-divider)}@media (min-width: 640px){.vp-code-group .tabs{margin-right:0;margin-left:0;border-radius:8px 8px 0 0}}.vp-code-group .tabs input{position:fixed;opacity:0;pointer-events:none}.vp-code-group .tabs label{position:relative;display:inline-block;border-bottom:1px solid transparent;padding:0 12px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-code-tab-text-color);white-space:nowrap;cursor:pointer;transition:color .25s}.vp-code-group .tabs label:after{position:absolute;right:8px;bottom:-1px;left:8px;z-index:1;height:2px;border-radius:2px;content:"";background-color:transparent;transition:background-color .25s}.vp-code-group label:hover{color:var(--vp-code-tab-hover-text-color)}.vp-code-group input:checked+label{color:var(--vp-code-tab-active-text-color)}.vp-code-group input:checked+label:after{background-color:var(--vp-code-tab-active-bar-color)}.vp-code-group div[class*=language-],.vp-block{display:none;margin-top:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.vp-code-group div[class*=language-].active,.vp-block.active{display:block}.vp-block{padding:20px 24px}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{position:relative;font-weight:600;outline:none}.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:28px}.vp-doc h2{margin:48px 0 16px;border-top:1px solid var(--vp-c-divider);padding-top:24px;letter-spacing:-.02em;line-height:32px;font-size:24px}.vp-doc h3{margin:32px 0 0;letter-spacing:-.01em;line-height:28px;font-size:20px}.vp-doc h4{margin:24px 0 0;letter-spacing:-.01em;line-height:24px;font-size:18px}.vp-doc .header-anchor{position:absolute;top:0;left:0;margin-left:-.87em;font-weight:500;-webkit-user-select:none;user-select:none;opacity:0;text-decoration:none;transition:color .25s,opacity .25s}.vp-doc .header-anchor:before{content:var(--vp-header-anchor-symbol)}.vp-doc h1:hover .header-anchor,.vp-doc h1 .header-anchor:focus,.vp-doc h2:hover .header-anchor,.vp-doc h2 .header-anchor:focus,.vp-doc h3:hover .header-anchor,.vp-doc h3 .header-anchor:focus,.vp-doc h4:hover .header-anchor,.vp-doc h4 .header-anchor:focus,.vp-doc h5:hover .header-anchor,.vp-doc h5 .header-anchor:focus,.vp-doc h6:hover .header-anchor,.vp-doc h6 .header-anchor:focus{opacity:1}@media (min-width: 768px){.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:32px}}.vp-doc h2 .header-anchor{top:24px}.vp-doc p,.vp-doc summary{margin:16px 0}.vp-doc p{line-height:28px}.vp-doc blockquote{margin:16px 0;border-left:2px solid var(--vp-c-divider);padding-left:16px;transition:border-color .5s;color:var(--vp-c-text-2)}.vp-doc blockquote>p{margin:0;font-size:16px;transition:color .5s}.vp-doc a{font-weight:500;color:var(--vp-c-brand-1);text-decoration:underline;text-underline-offset:2px;transition:color .25s,opacity .25s}.vp-doc a:hover{color:var(--vp-c-brand-2)}.vp-doc strong{font-weight:600}.vp-doc ul,.vp-doc ol{padding-left:1.25rem;margin:16px 0}.vp-doc ul{list-style:disc}.vp-doc ol{list-style:decimal}.vp-doc li+li{margin-top:8px}.vp-doc li>ol,.vp-doc li>ul{margin:8px 0 0}.vp-doc table{display:block;border-collapse:collapse;margin:20px 0;overflow-x:auto}.vp-doc tr{background-color:var(--vp-c-bg);border-top:1px solid var(--vp-c-divider);transition:background-color .5s}.vp-doc tr:nth-child(2n){background-color:var(--vp-c-bg-soft)}.vp-doc th,.vp-doc td{border:1px solid var(--vp-c-divider);padding:8px 16px}.vp-doc th{text-align:left;font-size:14px;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-doc td{font-size:14px}.vp-doc hr{margin:16px 0;border:none;border-top:1px solid var(--vp-c-divider)}.vp-doc .custom-block{margin:16px 0}.vp-doc .custom-block p{margin:8px 0;line-height:24px}.vp-doc .custom-block p:first-child{margin:0}.vp-doc .custom-block div[class*=language-]{margin:8px 0;border-radius:8px}.vp-doc .custom-block div[class*=language-] code{font-weight:400;background-color:transparent}.vp-doc .custom-block .vp-code-group .tabs{margin:0;border-radius:8px 8px 0 0}.vp-doc :not(pre,h1,h2,h3,h4,h5,h6)>code{font-size:var(--vp-code-font-size);color:var(--vp-code-color)}.vp-doc :not(pre)>code{border-radius:4px;padding:3px 6px;background-color:var(--vp-code-bg);transition:color .25s,background-color .5s}.vp-doc a>code{color:var(--vp-code-link-color)}.vp-doc a:hover>code{color:var(--vp-code-link-hover-color)}.vp-doc h1>code,.vp-doc h2>code,.vp-doc h3>code,.vp-doc h4>code{font-size:.9em}.vp-doc div[class*=language-],.vp-block{position:relative;margin:16px -24px;background-color:var(--vp-code-block-bg);overflow-x:auto;transition:background-color .5s}@media (min-width: 640px){.vp-doc div[class*=language-],.vp-block{border-radius:8px;margin:16px 0}}@media (max-width: 639px){.vp-doc li div[class*=language-]{border-radius:8px 0 0 8px}}.vp-doc div[class*=language-]+div[class*=language-],.vp-doc div[class$=-api]+div[class*=language-],.vp-doc div[class*=language-]+div[class$=-api]>div[class*=language-]{margin-top:-8px}.vp-doc [class*=language-] pre,.vp-doc [class*=language-] code{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.vp-doc [class*=language-] pre{position:relative;z-index:1;margin:0;padding:20px 0;background:transparent;overflow-x:auto}.vp-doc [class*=language-] code{display:block;padding:0 24px;width:fit-content;min-width:100%;line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-block-color);transition:color .5s}.vp-doc [class*=language-] code .highlighted{background-color:var(--vp-code-line-highlight-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .highlighted.error{background-color:var(--vp-code-line-error-color)}.vp-doc [class*=language-] code .highlighted.warning{background-color:var(--vp-code-line-warning-color)}.vp-doc [class*=language-] code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .diff:before{position:absolute;left:10px}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.4;transition:filter .35s,opacity .35s}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){opacity:.7;transition:filter .35s,opacity .35s}.vp-doc [class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}.vp-doc [class*=language-] code .diff.remove{background-color:var(--vp-code-line-diff-remove-color);opacity:.7}.vp-doc [class*=language-] code .diff.remove:before{content:"-";color:var(--vp-code-line-diff-remove-symbol-color)}.vp-doc [class*=language-] code .diff.add{background-color:var(--vp-code-line-diff-add-color)}.vp-doc [class*=language-] code .diff.add:before{content:"+";color:var(--vp-code-line-diff-add-symbol-color)}.vp-doc div[class*=language-].line-numbers-mode{padding-left:32px}.vp-doc .line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid var(--vp-code-block-divider-color);padding-top:20px;width:32px;text-align:center;font-family:var(--vp-font-family-mono);line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-line-number-color);transition:border-color .5s,color .5s}.vp-doc [class*=language-]>button.copy{direction:ltr;position:absolute;top:12px;right:12px;z-index:3;border:1px solid var(--vp-code-copy-code-border-color);border-radius:4px;width:40px;height:40px;background-color:var(--vp-code-copy-code-bg);opacity:0;cursor:pointer;background-image:var(--vp-icon-copy);background-position:50%;background-size:20px;background-repeat:no-repeat;transition:border-color .25s,background-color .25s,opacity .25s}.vp-doc [class*=language-]:hover>button.copy,.vp-doc [class*=language-]>button.copy:focus{opacity:1}.vp-doc [class*=language-]>button.copy:hover,.vp-doc [class*=language-]>button.copy.copied{border-color:var(--vp-code-copy-code-hover-border-color);background-color:var(--vp-code-copy-code-hover-bg)}.vp-doc [class*=language-]>button.copy.copied,.vp-doc [class*=language-]>button.copy:hover.copied{border-radius:0 4px 4px 0;background-color:var(--vp-code-copy-code-hover-bg);background-image:var(--vp-icon-copied)}.vp-doc [class*=language-]>button.copy.copied:before,.vp-doc [class*=language-]>button.copy:hover.copied:before{position:relative;top:-1px;transform:translate(calc(-100% - 1px));display:flex;justify-content:center;align-items:center;border:1px solid var(--vp-code-copy-code-hover-border-color);border-right:0;border-radius:4px 0 0 4px;padding:0 10px;width:fit-content;height:40px;text-align:center;font-size:12px;font-weight:500;color:var(--vp-code-copy-code-active-text);background-color:var(--vp-code-copy-code-hover-bg);white-space:nowrap;content:var(--vp-code-copy-copied-text-content)}.vp-doc [class*=language-]>span.lang{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;-webkit-user-select:none;user-select:none;color:var(--vp-code-lang-color);transition:color .4s,opacity .4s}.vp-doc [class*=language-]:hover>button.copy+span.lang,.vp-doc [class*=language-]>button.copy:focus+span.lang{opacity:0}.vp-doc .VPTeamMembers{margin-top:24px}.vp-doc .VPTeamMembers.small.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-doc .VPTeamMembers.small.count-2 .container,.vp-doc .VPTeamMembers.small.count-3 .container{max-width:100%!important}.vp-doc .VPTeamMembers.medium.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}:is(.vp-external-link-icon,.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(.no-icon):after{display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:currentColor;color:var(--vp-c-text-3);flex-shrink:0;--icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");-webkit-mask-image:var(--icon);mask-image:var(--icon)}.vp-external-link-icon:after{content:""}.external-link-icon-enabled :is(.vp-doc a[href*="://"],.vp-doc a[target=_blank]):after{content:"";color:currentColor}.vp-sponsor{border-radius:16px;overflow:hidden}.vp-sponsor.aside{border-radius:12px}.vp-sponsor-section+.vp-sponsor-section{margin-top:4px}.vp-sponsor-tier{margin:0 0 4px!important;text-align:center;letter-spacing:1px!important;line-height:24px;width:100%;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-sponsor.normal .vp-sponsor-tier{padding:13px 0 11px;font-size:14px}.vp-sponsor.aside .vp-sponsor-tier{padding:9px 0 7px;font-size:12px}.vp-sponsor-grid+.vp-sponsor-tier{margin-top:4px}.vp-sponsor-grid{display:flex;flex-wrap:wrap;gap:4px}.vp-sponsor-grid.xmini .vp-sponsor-grid-link{height:64px}.vp-sponsor-grid.xmini .vp-sponsor-grid-image{max-width:64px;max-height:22px}.vp-sponsor-grid.mini .vp-sponsor-grid-link{height:72px}.vp-sponsor-grid.mini .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.small .vp-sponsor-grid-link{height:96px}.vp-sponsor-grid.small .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.medium .vp-sponsor-grid-link{height:112px}.vp-sponsor-grid.medium .vp-sponsor-grid-image{max-width:120px;max-height:36px}.vp-sponsor-grid.big .vp-sponsor-grid-link{height:184px}.vp-sponsor-grid.big .vp-sponsor-grid-image{max-width:192px;max-height:56px}.vp-sponsor-grid[data-vp-grid="2"] .vp-sponsor-grid-item{width:calc((100% - 4px)/2)}.vp-sponsor-grid[data-vp-grid="3"] .vp-sponsor-grid-item{width:calc((100% - 4px * 2) / 3)}.vp-sponsor-grid[data-vp-grid="4"] .vp-sponsor-grid-item{width:calc((100% - 12px)/4)}.vp-sponsor-grid[data-vp-grid="5"] .vp-sponsor-grid-item{width:calc((100% - 16px)/5)}.vp-sponsor-grid[data-vp-grid="6"] .vp-sponsor-grid-item{width:calc((100% - 4px * 5) / 6)}.vp-sponsor-grid-item{flex-shrink:0;width:100%;background-color:var(--vp-c-bg-soft);transition:background-color .25s}.vp-sponsor-grid-item:hover{background-color:var(--vp-c-default-soft)}.vp-sponsor-grid-item:hover .vp-sponsor-grid-image{filter:grayscale(0) invert(0)}.vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.dark .vp-sponsor-grid-item:hover{background-color:var(--vp-c-white)}.dark .vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.vp-sponsor-grid-link{display:flex}.vp-sponsor-grid-box{display:flex;justify-content:center;align-items:center;width:100%}.vp-sponsor-grid-image{max-width:100%;filter:grayscale(1);transition:filter .25s}.dark .vp-sponsor-grid-image{filter:grayscale(1) invert(1)}.VPBadge{display:inline-block;margin-left:2px;border:1px solid transparent;border-radius:12px;padding:0 10px;line-height:22px;font-size:12px;font-weight:500;transform:translateY(-2px)}.VPBadge.small{padding:0 6px;line-height:18px;font-size:10px;transform:translateY(-8px)}.VPDocFooter .VPBadge{display:none}.vp-doc h1>.VPBadge{margin-top:4px;vertical-align:top}.vp-doc h2>.VPBadge{margin-top:3px;padding:0 8px;vertical-align:top}.vp-doc h3>.VPBadge{vertical-align:middle}.vp-doc h4>.VPBadge,.vp-doc h5>.VPBadge,.vp-doc h6>.VPBadge{vertical-align:middle;line-height:18px}.VPBadge.info{border-color:var(--vp-badge-info-border);color:var(--vp-badge-info-text);background-color:var(--vp-badge-info-bg)}.VPBadge.tip{border-color:var(--vp-badge-tip-border);color:var(--vp-badge-tip-text);background-color:var(--vp-badge-tip-bg)}.VPBadge.warning{border-color:var(--vp-badge-warning-border);color:var(--vp-badge-warning-text);background-color:var(--vp-badge-warning-bg)}.VPBadge.danger{border-color:var(--vp-badge-danger-border);color:var(--vp-badge-danger-text);background-color:var(--vp-badge-danger-bg)}.VPBackdrop[data-v-54a304ca]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vp-z-index-backdrop);background:var(--vp-backdrop-bg-color);transition:opacity .5s}.VPBackdrop.fade-enter-from[data-v-54a304ca],.VPBackdrop.fade-leave-to[data-v-54a304ca]{opacity:0}.VPBackdrop.fade-leave-active[data-v-54a304ca]{transition-duration:.25s}@media (min-width: 1280px){.VPBackdrop[data-v-54a304ca]{display:none}}.NotFound[data-v-6ff51ddd]{padding:64px 24px 96px;text-align:center}@media (min-width: 768px){.NotFound[data-v-6ff51ddd]{padding:96px 32px 168px}}.code[data-v-6ff51ddd]{line-height:64px;font-size:64px;font-weight:600}.title[data-v-6ff51ddd]{padding-top:12px;letter-spacing:2px;line-height:20px;font-size:20px;font-weight:700}.divider[data-v-6ff51ddd]{margin:24px auto 18px;width:64px;height:1px;background-color:var(--vp-c-divider)}.quote[data-v-6ff51ddd]{margin:0 auto;max-width:256px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.action[data-v-6ff51ddd]{padding-top:20px}.link[data-v-6ff51ddd]{display:inline-block;border:1px solid var(--vp-c-brand-1);border-radius:16px;padding:3px 16px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:border-color .25s,color .25s}.link[data-v-6ff51ddd]:hover{border-color:var(--vp-c-brand-2);color:var(--vp-c-brand-2)}.root[data-v-53c99d69]{position:relative;z-index:1}.nested[data-v-53c99d69]{padding-right:16px;padding-left:16px}.outline-link[data-v-53c99d69]{display:block;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .5s}.outline-link[data-v-53c99d69]:hover,.outline-link.active[data-v-53c99d69]{color:var(--vp-c-text-1);transition:color .25s}.outline-link.nested[data-v-53c99d69]{padding-left:13px}.VPDocAsideOutline[data-v-f610f197]{display:none}.VPDocAsideOutline.has-outline[data-v-f610f197]{display:block}.content[data-v-f610f197]{position:relative;border-left:1px solid var(--vp-c-divider);padding-left:16px;font-size:13px;font-weight:500}.outline-marker[data-v-f610f197]{position:absolute;top:32px;left:-1px;z-index:0;opacity:0;width:2px;border-radius:2px;height:18px;background-color:var(--vp-c-brand-1);transition:top .25s cubic-bezier(0,1,.5,1),background-color .5s,opacity .25s}.outline-title[data-v-f610f197]{line-height:32px;font-size:14px;font-weight:600}.VPDocAside[data-v-cb998dce]{display:flex;flex-direction:column;flex-grow:1}.spacer[data-v-cb998dce]{flex-grow:1}.VPDocAside[data-v-cb998dce] .spacer+.VPDocAsideSponsors,.VPDocAside[data-v-cb998dce] .spacer+.VPDocAsideCarbonAds{margin-top:24px}.VPDocAside[data-v-cb998dce] .VPDocAsideSponsors+.VPDocAsideCarbonAds{margin-top:16px}.VPLastUpdated[data-v-1bb0c8a8]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 640px){.VPLastUpdated[data-v-1bb0c8a8]{line-height:32px;font-size:14px;font-weight:500}}.VPDocFooter[data-v-1bcd8184]{margin-top:64px}.edit-info[data-v-1bcd8184]{padding-bottom:18px}@media (min-width: 640px){.edit-info[data-v-1bcd8184]{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px}}.edit-link-button[data-v-1bcd8184]{display:flex;align-items:center;border:0;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.edit-link-button[data-v-1bcd8184]:hover{color:var(--vp-c-brand-2)}.edit-link-icon[data-v-1bcd8184]{margin-right:8px}.prev-next[data-v-1bcd8184]{border-top:1px solid var(--vp-c-divider);padding-top:24px;display:grid;grid-row-gap:8px}@media (min-width: 640px){.prev-next[data-v-1bcd8184]{grid-template-columns:repeat(2,1fr);grid-column-gap:16px}}.pager-link[data-v-1bcd8184]{display:block;border:1px solid var(--vp-c-divider);border-radius:8px;padding:11px 16px 13px;width:100%;height:100%;transition:border-color .25s}.pager-link[data-v-1bcd8184]:hover{border-color:var(--vp-c-brand-1)}.pager-link.next[data-v-1bcd8184]{margin-left:auto;text-align:right}.desc[data-v-1bcd8184]{display:block;line-height:20px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.title[data-v-1bcd8184]{display:block;line-height:20px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.VPDoc[data-v-e6f2a212]{padding:32px 24px 96px;width:100%}@media (min-width: 768px){.VPDoc[data-v-e6f2a212]{padding:48px 32px 128px}}@media (min-width: 960px){.VPDoc[data-v-e6f2a212]{padding:48px 32px 0}.VPDoc:not(.has-sidebar) .container[data-v-e6f2a212]{display:flex;justify-content:center;max-width:992px}.VPDoc:not(.has-sidebar) .content[data-v-e6f2a212]{max-width:752px}}@media (min-width: 1280px){.VPDoc .container[data-v-e6f2a212]{display:flex;justify-content:center}.VPDoc .aside[data-v-e6f2a212]{display:block}}@media (min-width: 1440px){.VPDoc:not(.has-sidebar) .content[data-v-e6f2a212]{max-width:784px}.VPDoc:not(.has-sidebar) .container[data-v-e6f2a212]{max-width:1104px}}.container[data-v-e6f2a212]{margin:0 auto;width:100%}.aside[data-v-e6f2a212]{position:relative;display:none;order:2;flex-grow:1;padding-left:32px;width:100%;max-width:256px}.left-aside[data-v-e6f2a212]{order:1;padding-left:unset;padding-right:32px}.aside-container[data-v-e6f2a212]{position:fixed;top:0;padding-top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 48px);width:224px;height:100vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.aside-container[data-v-e6f2a212]::-webkit-scrollbar{display:none}.aside-curtain[data-v-e6f2a212]{position:fixed;bottom:0;z-index:10;width:224px;height:32px;background:linear-gradient(transparent,var(--vp-c-bg) 70%)}.aside-content[data-v-e6f2a212]{display:flex;flex-direction:column;min-height:calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px));padding-bottom:32px}.content[data-v-e6f2a212]{position:relative;margin:0 auto;width:100%}@media (min-width: 960px){.content[data-v-e6f2a212]{padding:0 32px 128px}}@media (min-width: 1280px){.content[data-v-e6f2a212]{order:1;margin:0;min-width:640px}}.content-container[data-v-e6f2a212]{margin:0 auto}.VPDoc.has-aside .content-container[data-v-e6f2a212]{max-width:688px}.VPButton[data-v-93dc4167]{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;transition:color .25s,border-color .25s,background-color .25s}.VPButton[data-v-93dc4167]:active{transition:color .1s,border-color .1s,background-color .1s}.VPButton.medium[data-v-93dc4167]{border-radius:20px;padding:0 20px;line-height:38px;font-size:14px}.VPButton.big[data-v-93dc4167]{border-radius:24px;padding:0 24px;line-height:46px;font-size:16px}.VPButton.brand[data-v-93dc4167]{border-color:var(--vp-button-brand-border);color:var(--vp-button-brand-text);background-color:var(--vp-button-brand-bg)}.VPButton.brand[data-v-93dc4167]:hover{border-color:var(--vp-button-brand-hover-border);color:var(--vp-button-brand-hover-text);background-color:var(--vp-button-brand-hover-bg)}.VPButton.brand[data-v-93dc4167]:active{border-color:var(--vp-button-brand-active-border);color:var(--vp-button-brand-active-text);background-color:var(--vp-button-brand-active-bg)}.VPButton.alt[data-v-93dc4167]{border-color:var(--vp-button-alt-border);color:var(--vp-button-alt-text);background-color:var(--vp-button-alt-bg)}.VPButton.alt[data-v-93dc4167]:hover{border-color:var(--vp-button-alt-hover-border);color:var(--vp-button-alt-hover-text);background-color:var(--vp-button-alt-hover-bg)}.VPButton.alt[data-v-93dc4167]:active{border-color:var(--vp-button-alt-active-border);color:var(--vp-button-alt-active-text);background-color:var(--vp-button-alt-active-bg)}.VPButton.sponsor[data-v-93dc4167]{border-color:var(--vp-button-sponsor-border);color:var(--vp-button-sponsor-text);background-color:var(--vp-button-sponsor-bg)}.VPButton.sponsor[data-v-93dc4167]:hover{border-color:var(--vp-button-sponsor-hover-border);color:var(--vp-button-sponsor-hover-text);background-color:var(--vp-button-sponsor-hover-bg)}.VPButton.sponsor[data-v-93dc4167]:active{border-color:var(--vp-button-sponsor-active-border);color:var(--vp-button-sponsor-active-text);background-color:var(--vp-button-sponsor-active-bg)}html:not(.dark) .VPImage.dark[data-v-ab19afbb]{display:none}.dark .VPImage.light[data-v-ab19afbb]{display:none}.VPHero[data-v-b10c5094]{margin-top:calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px}@media (min-width: 640px){.VPHero[data-v-b10c5094]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px}}@media (min-width: 960px){.VPHero[data-v-b10c5094]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px}}.container[data-v-b10c5094]{display:flex;flex-direction:column;margin:0 auto;max-width:1152px}@media (min-width: 960px){.container[data-v-b10c5094]{flex-direction:row}}.main[data-v-b10c5094]{position:relative;z-index:10;order:2;flex-grow:1;flex-shrink:0}.VPHero.has-image .container[data-v-b10c5094]{text-align:center}@media (min-width: 960px){.VPHero.has-image .container[data-v-b10c5094]{text-align:left}}@media (min-width: 960px){.main[data-v-b10c5094]{order:1;width:calc((100% / 3) * 2)}.VPHero.has-image .main[data-v-b10c5094]{max-width:592px}}.name[data-v-b10c5094],.text[data-v-b10c5094]{max-width:392px;letter-spacing:-.4px;line-height:40px;font-size:32px;font-weight:700;white-space:pre-wrap}.VPHero.has-image .name[data-v-b10c5094],.VPHero.has-image .text[data-v-b10c5094]{margin:0 auto}.name[data-v-b10c5094]{color:var(--vp-home-hero-name-color)}.clip[data-v-b10c5094]{background:var(--vp-home-hero-name-background);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--vp-home-hero-name-color)}@media (min-width: 640px){.name[data-v-b10c5094],.text[data-v-b10c5094]{max-width:576px;line-height:56px;font-size:48px}}@media (min-width: 960px){.name[data-v-b10c5094],.text[data-v-b10c5094]{line-height:64px;font-size:56px}.VPHero.has-image .name[data-v-b10c5094],.VPHero.has-image .text[data-v-b10c5094]{margin:0}}.tagline[data-v-b10c5094]{padding-top:8px;max-width:392px;line-height:28px;font-size:18px;font-weight:500;white-space:pre-wrap;color:var(--vp-c-text-2)}.VPHero.has-image .tagline[data-v-b10c5094]{margin:0 auto}@media (min-width: 640px){.tagline[data-v-b10c5094]{padding-top:12px;max-width:576px;line-height:32px;font-size:20px}}@media (min-width: 960px){.tagline[data-v-b10c5094]{line-height:36px;font-size:24px}.VPHero.has-image .tagline[data-v-b10c5094]{margin:0}}.actions[data-v-b10c5094]{display:flex;flex-wrap:wrap;margin:-6px;padding-top:24px}.VPHero.has-image .actions[data-v-b10c5094]{justify-content:center}@media (min-width: 640px){.actions[data-v-b10c5094]{padding-top:32px}}@media (min-width: 960px){.VPHero.has-image .actions[data-v-b10c5094]{justify-content:flex-start}}.action[data-v-b10c5094]{flex-shrink:0;padding:6px}.image[data-v-b10c5094]{order:1;margin:-76px -24px -48px}@media (min-width: 640px){.image[data-v-b10c5094]{margin:-108px -24px -48px}}@media (min-width: 960px){.image[data-v-b10c5094]{flex-grow:1;order:2;margin:0;min-height:100%}}.image-container[data-v-b10c5094]{position:relative;margin:0 auto;width:320px;height:320px}@media (min-width: 640px){.image-container[data-v-b10c5094]{width:392px;height:392px}}@media (min-width: 960px){.image-container[data-v-b10c5094]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;transform:translate(-32px,-32px)}}.image-bg[data-v-b10c5094]{position:absolute;top:50%;left:50%;border-radius:50%;width:192px;height:192px;background-image:var(--vp-home-hero-image-background-image);filter:var(--vp-home-hero-image-filter);transform:translate(-50%,-50%)}@media (min-width: 640px){.image-bg[data-v-b10c5094]{width:256px;height:256px}}@media (min-width: 960px){.image-bg[data-v-b10c5094]{width:320px;height:320px}}[data-v-b10c5094] .image-src{position:absolute;top:50%;left:50%;max-width:192px;max-height:192px;transform:translate(-50%,-50%)}@media (min-width: 640px){[data-v-b10c5094] .image-src{max-width:256px;max-height:256px}}@media (min-width: 960px){[data-v-b10c5094] .image-src{max-width:320px;max-height:320px}}.VPFeature[data-v-bd37d1a2]{display:block;border:1px solid var(--vp-c-bg-soft);border-radius:12px;height:100%;background-color:var(--vp-c-bg-soft);transition:border-color .25s,background-color .25s}.VPFeature.link[data-v-bd37d1a2]:hover{border-color:var(--vp-c-brand-1)}.box[data-v-bd37d1a2]{display:flex;flex-direction:column;padding:24px;height:100%}.box[data-v-bd37d1a2]>.VPImage{margin-bottom:20px}.icon[data-v-bd37d1a2]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;background-color:var(--vp-c-default-soft);width:48px;height:48px;font-size:24px;transition:background-color .25s}.title[data-v-bd37d1a2]{line-height:24px;font-size:16px;font-weight:600}.details[data-v-bd37d1a2]{flex-grow:1;padding-top:8px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.link-text[data-v-bd37d1a2]{padding-top:8px}.link-text-value[data-v-bd37d1a2]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.link-text-icon[data-v-bd37d1a2]{margin-left:6px}.VPFeatures[data-v-b1eea84a]{position:relative;padding:0 24px}@media (min-width: 640px){.VPFeatures[data-v-b1eea84a]{padding:0 48px}}@media (min-width: 960px){.VPFeatures[data-v-b1eea84a]{padding:0 64px}}.container[data-v-b1eea84a]{margin:0 auto;max-width:1152px}.items[data-v-b1eea84a]{display:flex;flex-wrap:wrap;margin:-8px}.item[data-v-b1eea84a]{padding:8px;width:100%}@media (min-width: 640px){.item.grid-2[data-v-b1eea84a],.item.grid-4[data-v-b1eea84a],.item.grid-6[data-v-b1eea84a]{width:50%}}@media (min-width: 768px){.item.grid-2[data-v-b1eea84a],.item.grid-4[data-v-b1eea84a]{width:50%}.item.grid-3[data-v-b1eea84a],.item.grid-6[data-v-b1eea84a]{width:calc(100% / 3)}}@media (min-width: 960px){.item.grid-4[data-v-b1eea84a]{width:25%}}.container[data-v-c141a4bd]{margin:auto;width:100%;max-width:1280px;padding:0 24px}@media (min-width: 640px){.container[data-v-c141a4bd]{padding:0 48px}}@media (min-width: 960px){.container[data-v-c141a4bd]{width:100%;padding:0 64px}}.vp-doc[data-v-c141a4bd] .VPHomeSponsors,.vp-doc[data-v-c141a4bd] .VPTeamPage{margin-left:var(--vp-offset, calc(50% - 50vw) );margin-right:var(--vp-offset, calc(50% - 50vw) )}.vp-doc[data-v-c141a4bd] .VPHomeSponsors h2{border-top:none;letter-spacing:normal}.vp-doc[data-v-c141a4bd] .VPHomeSponsors a,.vp-doc[data-v-c141a4bd] .VPTeamPage a{text-decoration:none}.VPHome[data-v-07b1ad08]{margin-bottom:96px}@media (min-width: 768px){.VPHome[data-v-07b1ad08]{margin-bottom:128px}}.VPContent[data-v-9a6c75ad]{flex-grow:1;flex-shrink:0;margin:var(--vp-layout-top-height, 0px) auto 0;width:100%}.VPContent.is-home[data-v-9a6c75ad]{width:100%;max-width:100%}.VPContent.has-sidebar[data-v-9a6c75ad]{margin:0}@media (min-width: 960px){.VPContent[data-v-9a6c75ad]{padding-top:var(--vp-nav-height)}.VPContent.has-sidebar[data-v-9a6c75ad]{margin:var(--vp-layout-top-height, 0px) 0 0;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPContent.has-sidebar[data-v-9a6c75ad]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.VPFooter[data-v-566314d4]{position:relative;z-index:var(--vp-z-index-footer);border-top:1px solid var(--vp-c-gutter);padding:32px 24px;background-color:var(--vp-c-bg)}.VPFooter.has-sidebar[data-v-566314d4]{display:none}.VPFooter[data-v-566314d4] a{text-decoration-line:underline;text-underline-offset:2px;transition:color .25s}.VPFooter[data-v-566314d4] a:hover{color:var(--vp-c-text-1)}@media (min-width: 768px){.VPFooter[data-v-566314d4]{padding:32px}}.container[data-v-566314d4]{margin:0 auto;max-width:var(--vp-layout-max-width);text-align:center}.message[data-v-566314d4],.copyright[data-v-566314d4]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.VPLocalNavOutlineDropdown[data-v-883964e0]{padding:12px 20px 11px}@media (min-width: 960px){.VPLocalNavOutlineDropdown[data-v-883964e0]{padding:12px 36px 11px}}.VPLocalNavOutlineDropdown button[data-v-883964e0]{display:block;font-size:12px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;position:relative}.VPLocalNavOutlineDropdown button[data-v-883964e0]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPLocalNavOutlineDropdown button.open[data-v-883964e0]{color:var(--vp-c-text-1)}.icon[data-v-883964e0]{display:inline-block;vertical-align:middle;margin-left:2px;font-size:14px;transform:rotate(0);transition:transform .25s}@media (min-width: 960px){.VPLocalNavOutlineDropdown button[data-v-883964e0]{font-size:14px}.icon[data-v-883964e0]{font-size:16px}}.open>.icon[data-v-883964e0]{transform:rotate(90deg)}.items[data-v-883964e0]{position:absolute;top:40px;right:16px;left:16px;display:grid;gap:1px;border:1px solid var(--vp-c-border);border-radius:8px;background-color:var(--vp-c-gutter);max-height:calc(var(--vp-vh, 100vh) - 86px);overflow:hidden auto;box-shadow:var(--vp-shadow-3)}@media (min-width: 960px){.items[data-v-883964e0]{right:auto;left:calc(var(--vp-sidebar-width) + 32px);width:320px}}.header[data-v-883964e0]{background-color:var(--vp-c-bg-soft)}.top-link[data-v-883964e0]{display:block;padding:0 16px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.outline[data-v-883964e0]{padding:8px 0;background-color:var(--vp-c-bg-soft)}.flyout-enter-active[data-v-883964e0]{transition:all .2s ease-out}.flyout-leave-active[data-v-883964e0]{transition:all .15s ease-in}.flyout-enter-from[data-v-883964e0],.flyout-leave-to[data-v-883964e0]{opacity:0;transform:translateY(-16px)}.VPLocalNav[data-v-2488c25a]{position:sticky;top:0;left:0;z-index:var(--vp-z-index-local-nav);border-bottom:1px solid var(--vp-c-gutter);padding-top:var(--vp-layout-top-height, 0px);width:100%;background-color:var(--vp-local-nav-bg-color)}.VPLocalNav.fixed[data-v-2488c25a]{position:fixed}@media (min-width: 960px){.VPLocalNav[data-v-2488c25a]{top:var(--vp-nav-height)}.VPLocalNav.has-sidebar[data-v-2488c25a]{padding-left:var(--vp-sidebar-width)}.VPLocalNav.empty[data-v-2488c25a]{display:none}}@media (min-width: 1280px){.VPLocalNav[data-v-2488c25a]{display:none}}@media (min-width: 1440px){.VPLocalNav.has-sidebar[data-v-2488c25a]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.container[data-v-2488c25a]{display:flex;justify-content:space-between;align-items:center}.menu[data-v-2488c25a]{display:flex;align-items:center;padding:12px 24px 11px;line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.menu[data-v-2488c25a]:hover{color:var(--vp-c-text-1);transition:color .25s}@media (min-width: 768px){.menu[data-v-2488c25a]{padding:0 32px}}@media (min-width: 960px){.menu[data-v-2488c25a]{display:none}}.menu-icon[data-v-2488c25a]{margin-right:8px;font-size:14px}.VPOutlineDropdown[data-v-2488c25a]{padding:12px 24px 11px}@media (min-width: 768px){.VPOutlineDropdown[data-v-2488c25a]{padding:12px 32px 11px}}.VPSwitch[data-v-b4ccac88]{position:relative;border-radius:11px;display:block;width:40px;height:22px;flex-shrink:0;border:1px solid var(--vp-input-border-color);background-color:var(--vp-input-switch-bg-color);transition:border-color .25s!important}.VPSwitch[data-v-b4ccac88]:hover{border-color:var(--vp-c-brand-1)}.check[data-v-b4ccac88]{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:var(--vp-c-neutral-inverse);box-shadow:var(--vp-shadow-1);transition:transform .25s!important}.icon[data-v-b4ccac88]{position:relative;display:block;width:18px;height:18px;border-radius:50%;overflow:hidden}.icon[data-v-b4ccac88] [class^=vpi-]{position:absolute;top:3px;left:3px;width:12px;height:12px;color:var(--vp-c-text-2)}.dark .icon[data-v-b4ccac88] [class^=vpi-]{color:var(--vp-c-text-1);transition:opacity .25s!important}.sun[data-v-be9742d9]{opacity:1}.moon[data-v-be9742d9],.dark .sun[data-v-be9742d9]{opacity:0}.dark .moon[data-v-be9742d9]{opacity:1}.dark .VPSwitchAppearance[data-v-be9742d9] .check{transform:translate(18px)}.VPNavBarAppearance[data-v-3f90c1a5]{display:none}@media (min-width: 1280px){.VPNavBarAppearance[data-v-3f90c1a5]{display:flex;align-items:center}}.VPMenuGroup+.VPMenuLink[data-v-7eeeb2dc]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.link[data-v-7eeeb2dc]{display:block;border-radius:6px;padding:0 12px;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);white-space:nowrap;transition:background-color .25s,color .25s}.link[data-v-7eeeb2dc]:hover{color:var(--vp-c-brand-1);background-color:var(--vp-c-default-soft)}.link.active[data-v-7eeeb2dc]{color:var(--vp-c-brand-1)}.VPMenuGroup[data-v-a6b0397c]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.VPMenuGroup[data-v-a6b0397c]:first-child{margin-top:0;border-top:0;padding-top:0}.VPMenuGroup+.VPMenuGroup[data-v-a6b0397c]{margin-top:12px;border-top:1px solid var(--vp-c-divider)}.title[data-v-a6b0397c]{padding:0 12px;line-height:32px;font-size:14px;font-weight:600;color:var(--vp-c-text-2);white-space:nowrap;transition:color .25s}.VPMenu[data-v-20ed86d6]{border-radius:12px;padding:12px;min-width:128px;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);box-shadow:var(--vp-shadow-3);transition:background-color .5s;max-height:calc(100vh - var(--vp-nav-height));overflow-y:auto}.VPMenu[data-v-20ed86d6] .group{margin:0 -12px;padding:0 12px 12px}.VPMenu[data-v-20ed86d6] .group+.group{border-top:1px solid var(--vp-c-divider);padding:11px 12px 12px}.VPMenu[data-v-20ed86d6] .group:last-child{padding-bottom:0}.VPMenu[data-v-20ed86d6] .group+.item{border-top:1px solid var(--vp-c-divider);padding:11px 16px 0}.VPMenu[data-v-20ed86d6] .item{padding:0 16px;white-space:nowrap}.VPMenu[data-v-20ed86d6] .label{flex-grow:1;line-height:28px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.VPMenu[data-v-20ed86d6] .action{padding-left:24px}.VPFlyout[data-v-bfe7971f]{position:relative}.VPFlyout[data-v-bfe7971f]:hover{color:var(--vp-c-brand-1);transition:color .25s}.VPFlyout:hover .text[data-v-bfe7971f]{color:var(--vp-c-text-2)}.VPFlyout:hover .icon[data-v-bfe7971f]{fill:var(--vp-c-text-2)}.VPFlyout.active .text[data-v-bfe7971f]{color:var(--vp-c-brand-1)}.VPFlyout.active:hover .text[data-v-bfe7971f]{color:var(--vp-c-brand-2)}.button[aria-expanded=false]+.menu[data-v-bfe7971f]{opacity:0;visibility:hidden;transform:translateY(0)}.VPFlyout:hover .menu[data-v-bfe7971f],.button[aria-expanded=true]+.menu[data-v-bfe7971f]{opacity:1;visibility:visible;transform:translateY(0)}.button[data-v-bfe7971f]{display:flex;align-items:center;padding:0 12px;height:var(--vp-nav-height);color:var(--vp-c-text-1);transition:color .5s}.text[data-v-bfe7971f]{display:flex;align-items:center;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.option-icon[data-v-bfe7971f]{margin-right:0;font-size:16px}.text-icon[data-v-bfe7971f]{margin-left:4px;font-size:14px}.icon[data-v-bfe7971f]{font-size:20px;transition:fill .25s}.menu[data-v-bfe7971f]{position:absolute;top:calc(var(--vp-nav-height) / 2 + 20px);right:0;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s,transform .25s}.VPSocialLink[data-v-60a9a2d3]{display:flex;justify-content:center;align-items:center;width:36px;height:36px;color:var(--vp-c-text-2);transition:color .5s}.VPSocialLink[data-v-60a9a2d3]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPSocialLink[data-v-60a9a2d3]>svg,.VPSocialLink[data-v-60a9a2d3]>[class^=vpi-social-]{width:20px;height:20px;fill:currentColor}.VPSocialLinks[data-v-e71e869c]{display:flex;justify-content:center}.VPNavBarExtra[data-v-f953d92f]{display:none;margin-right:-12px}@media (min-width: 768px){.VPNavBarExtra[data-v-f953d92f]{display:block}}@media (min-width: 1280px){.VPNavBarExtra[data-v-f953d92f]{display:none}}.trans-title[data-v-f953d92f]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.item.appearance[data-v-f953d92f],.item.social-links[data-v-f953d92f]{display:flex;align-items:center;padding:0 12px}.item.appearance[data-v-f953d92f]{min-width:176px}.appearance-action[data-v-f953d92f]{margin-right:-2px}.social-links-list[data-v-f953d92f]{margin:-4px -8px}.VPNavBarHamburger[data-v-6bee1efd]{display:flex;justify-content:center;align-items:center;width:48px;height:var(--vp-nav-height)}@media (min-width: 768px){.VPNavBarHamburger[data-v-6bee1efd]{display:none}}.container[data-v-6bee1efd]{position:relative;width:16px;height:14px;overflow:hidden}.VPNavBarHamburger:hover .top[data-v-6bee1efd]{top:0;left:0;transform:translate(4px)}.VPNavBarHamburger:hover .middle[data-v-6bee1efd]{top:6px;left:0;transform:translate(0)}.VPNavBarHamburger:hover .bottom[data-v-6bee1efd]{top:12px;left:0;transform:translate(8px)}.VPNavBarHamburger.active .top[data-v-6bee1efd]{top:6px;transform:translate(0) rotate(225deg)}.VPNavBarHamburger.active .middle[data-v-6bee1efd]{top:6px;transform:translate(16px)}.VPNavBarHamburger.active .bottom[data-v-6bee1efd]{top:6px;transform:translate(0) rotate(135deg)}.VPNavBarHamburger.active:hover .top[data-v-6bee1efd],.VPNavBarHamburger.active:hover .middle[data-v-6bee1efd],.VPNavBarHamburger.active:hover .bottom[data-v-6bee1efd]{background-color:var(--vp-c-text-2);transition:top .25s,background-color .25s,transform .25s}.top[data-v-6bee1efd],.middle[data-v-6bee1efd],.bottom[data-v-6bee1efd]{position:absolute;width:16px;height:2px;background-color:var(--vp-c-text-1);transition:top .25s,background-color .5s,transform .25s}.top[data-v-6bee1efd]{top:0;left:0;transform:translate(0)}.middle[data-v-6bee1efd]{top:6px;left:0;transform:translate(8px)}.bottom[data-v-6bee1efd]{top:12px;left:0;transform:translate(4px)}.VPNavBarMenuLink[data-v-815115f5]{display:flex;align-items:center;padding:0 12px;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.VPNavBarMenuLink.active[data-v-815115f5],.VPNavBarMenuLink[data-v-815115f5]:hover{color:var(--vp-c-brand-1)}.VPNavBarMenu[data-v-afb2845e]{display:none}@media (min-width: 768px){.VPNavBarMenu[data-v-afb2845e]{display:flex}}/*! @docsearch/css 3.8.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 #0304094d;--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}.DocSearch-Button-Key--pressed{box-shadow:var(--docsearch-key-pressed-shadow);transform:translate3d(0,1px,0)}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[class*=DocSearch]{--docsearch-primary-color: var(--vp-c-brand-1);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vp-c-text-1);--docsearch-muted-color: var(--vp-c-text-2);--docsearch-searchbox-shadow: none;--docsearch-searchbox-background: transparent;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vp-c-bg-soft);--docsearch-footer-background: var(--vp-c-bg)}.dark [class*=DocSearch]{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: var(--vp-c-text-2);--docsearch-hit-background: var(--vp-c-default-soft);--docsearch-hit-color: var(--vp-c-text-2);--docsearch-hit-shadow: none}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;padding:0;width:48px;height:55px;background:transparent;transition:border-color .25s}.DocSearch-Button:hover{background:transparent}.DocSearch-Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.DocSearch-Button-Key--pressed{transform:none;box-shadow:none}.DocSearch-Button:focus:not(:focus-visible){outline:none!important}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;border:1px solid transparent;border-radius:8px;padding:0 10px 0 12px;width:100%;height:40px;background-color:var(--vp-c-bg-alt)}.DocSearch-Button:hover{border-color:var(--vp-c-brand-1);background:var(--vp-c-bg-alt)}}.DocSearch-Button .DocSearch-Button-Container{display:flex;align-items:center}.DocSearch-Button .DocSearch-Search-Icon{position:relative;width:16px;height:16px;color:var(--vp-c-text-1);fill:currentColor;transition:color .5s}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:8px;width:14px;height:14px;color:var(--vp-c-text-2)}}.DocSearch-Button .DocSearch-Button-Placeholder{display:none;margin-top:2px;padding:0 16px 0 0;font-size:13px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button .DocSearch-Button-Keys{direction:ltr;display:none;min-width:auto}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Keys{display:flex;align-items:center}}.DocSearch-Button .DocSearch-Button-Key{display:block;margin:2px 0 0;border:1px solid var(--vp-c-divider);border-right:none;border-radius:4px 0 0 4px;padding-left:6px;min-width:0;width:auto;height:22px;line-height:22px;font-family:var(--vp-font-family-base);font-size:12px;font-weight:500;transition:color .5s,border-color .5s}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vp-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button .DocSearch-Button-Key:first-child{font-size:0!important}.DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"Ctrl";font-size:12px;letter-spacing:normal;color:var(--docsearch-muted-color)}.mac .DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"⌘"}.DocSearch-Button .DocSearch-Button-Key:first-child>*{display:none}.DocSearch-Search-Icon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke-width='1.6' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='m14.386 14.386 4.088 4.088-4.088-4.088A7.533 7.533 0 1 1 3.733 3.733a7.533 7.533 0 0 1 10.653 10.653z'/%3E%3C/svg%3E")}.VPNavBarSearch{display:flex;align-items:center}@media (min-width: 768px){.VPNavBarSearch{flex-grow:1;padding-left:24px}}@media (min-width: 960px){.VPNavBarSearch{padding-left:32px}}.dark .DocSearch-Footer{border-top:1px solid var(--vp-c-divider)}.DocSearch-Form{border:1px solid var(--vp-c-brand-1);background-color:var(--vp-c-white)}.dark .DocSearch-Form{background-color:var(--vp-c-default-soft)}.DocSearch-Screen-Icon>svg{margin:auto}.VPNavBarSocialLinks[data-v-ef6192dc]{display:none}@media (min-width: 1280px){.VPNavBarSocialLinks[data-v-ef6192dc]{display:flex;align-items:center}}.title[data-v-9f43907a]{display:flex;align-items:center;border-bottom:1px solid transparent;width:100%;height:var(--vp-nav-height);font-size:16px;font-weight:600;color:var(--vp-c-text-1);transition:opacity .25s}@media (min-width: 960px){.title[data-v-9f43907a]{flex-shrink:0}.VPNavBarTitle.has-sidebar .title[data-v-9f43907a]{border-bottom-color:var(--vp-c-divider)}}[data-v-9f43907a] .logo{margin-right:8px;height:var(--vp-nav-logo-height)}.VPNavBarTranslations[data-v-acee064b]{display:none}@media (min-width: 1280px){.VPNavBarTranslations[data-v-acee064b]{display:flex;align-items:center}}.title[data-v-acee064b]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.VPNavBar[data-v-9fd4d1dd]{position:relative;height:var(--vp-nav-height);pointer-events:none;white-space:nowrap;transition:background-color .25s}.VPNavBar.screen-open[data-v-9fd4d1dd]{transition:none;background-color:var(--vp-nav-bg-color);border-bottom:1px solid var(--vp-c-divider)}.VPNavBar[data-v-9fd4d1dd]:not(.home){background-color:var(--vp-nav-bg-color)}@media (min-width: 960px){.VPNavBar[data-v-9fd4d1dd]:not(.home){background-color:transparent}.VPNavBar[data-v-9fd4d1dd]:not(.has-sidebar):not(.home.top){background-color:var(--vp-nav-bg-color)}}.wrapper[data-v-9fd4d1dd]{padding:0 8px 0 24px}@media (min-width: 768px){.wrapper[data-v-9fd4d1dd]{padding:0 32px}}@media (min-width: 960px){.VPNavBar.has-sidebar .wrapper[data-v-9fd4d1dd]{padding:0}}.container[data-v-9fd4d1dd]{display:flex;justify-content:space-between;margin:0 auto;max-width:calc(var(--vp-layout-max-width) - 64px);height:var(--vp-nav-height);pointer-events:none}.container>.title[data-v-9fd4d1dd],.container>.content[data-v-9fd4d1dd]{pointer-events:none}.container[data-v-9fd4d1dd] *{pointer-events:auto}@media (min-width: 960px){.VPNavBar.has-sidebar .container[data-v-9fd4d1dd]{max-width:100%}}.title[data-v-9fd4d1dd]{flex-shrink:0;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .title[data-v-9fd4d1dd]{position:absolute;top:0;left:0;z-index:2;padding:0 32px;width:var(--vp-sidebar-width);height:var(--vp-nav-height);background-color:transparent}}@media (min-width: 1440px){.VPNavBar.has-sidebar .title[data-v-9fd4d1dd]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}.content[data-v-9fd4d1dd]{flex-grow:1}@media (min-width: 960px){.VPNavBar.has-sidebar .content[data-v-9fd4d1dd]{position:relative;z-index:1;padding-right:32px;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .content[data-v-9fd4d1dd]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.content-body[data-v-9fd4d1dd]{display:flex;justify-content:flex-end;align-items:center;height:var(--vp-nav-height);transition:background-color .5s}@media (min-width: 960px){.VPNavBar:not(.home.top) .content-body[data-v-9fd4d1dd]{position:relative;background-color:var(--vp-nav-bg-color)}.VPNavBar:not(.has-sidebar):not(.home.top) .content-body[data-v-9fd4d1dd]{background-color:transparent}}@media (max-width: 767px){.content-body[data-v-9fd4d1dd]{column-gap:.5rem}}.menu+.translations[data-v-9fd4d1dd]:before,.menu+.appearance[data-v-9fd4d1dd]:before,.menu+.social-links[data-v-9fd4d1dd]:before,.translations+.appearance[data-v-9fd4d1dd]:before,.appearance+.social-links[data-v-9fd4d1dd]:before{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--vp-c-divider);content:""}.menu+.appearance[data-v-9fd4d1dd]:before,.translations+.appearance[data-v-9fd4d1dd]:before{margin-right:16px}.appearance+.social-links[data-v-9fd4d1dd]:before{margin-left:16px}.social-links[data-v-9fd4d1dd]{margin-right:-8px}.divider[data-v-9fd4d1dd]{width:100%;height:1px}@media (min-width: 960px){.VPNavBar.has-sidebar .divider[data-v-9fd4d1dd]{padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .divider[data-v-9fd4d1dd]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.divider-line[data-v-9fd4d1dd]{width:100%;height:1px;transition:background-color .5s}.VPNavBar:not(.home) .divider-line[data-v-9fd4d1dd]{background-color:var(--vp-c-gutter)}@media (min-width: 960px){.VPNavBar:not(.home.top) .divider-line[data-v-9fd4d1dd]{background-color:var(--vp-c-gutter)}.VPNavBar:not(.has-sidebar):not(.home.top) .divider[data-v-9fd4d1dd]{background-color:var(--vp-c-gutter)}}.VPNavScreenAppearance[data-v-a3e2920d]{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:12px 14px 12px 16px;background-color:var(--vp-c-bg-soft)}.text[data-v-a3e2920d]{line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.VPNavScreenMenuLink[data-v-fa963d97]{display:block;border-bottom:1px solid var(--vp-c-divider);padding:12px 0 11px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:border-color .25s,color .25s}.VPNavScreenMenuLink[data-v-fa963d97]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupLink[data-v-e04f3e85]{display:block;margin-left:12px;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-1);transition:color .25s}.VPNavScreenMenuGroupLink[data-v-e04f3e85]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupSection[data-v-f60dbfa7]{display:block}.title[data-v-f60dbfa7]{line-height:32px;font-size:13px;font-weight:700;color:var(--vp-c-text-2);transition:color .25s}.VPNavScreenMenuGroup[data-v-d99bfeec]{border-bottom:1px solid var(--vp-c-divider);height:48px;overflow:hidden;transition:border-color .5s}.VPNavScreenMenuGroup .items[data-v-d99bfeec]{visibility:hidden}.VPNavScreenMenuGroup.open .items[data-v-d99bfeec]{visibility:visible}.VPNavScreenMenuGroup.open[data-v-d99bfeec]{padding-bottom:10px;height:auto}.VPNavScreenMenuGroup.open .button[data-v-d99bfeec]{padding-bottom:6px;color:var(--vp-c-brand-1)}.VPNavScreenMenuGroup.open .button-icon[data-v-d99bfeec]{transform:rotate(45deg)}.button[data-v-d99bfeec]{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 11px 0;width:100%;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.button[data-v-d99bfeec]:hover{color:var(--vp-c-brand-1)}.button-icon[data-v-d99bfeec]{transition:transform .25s}.group[data-v-d99bfeec]:first-child{padding-top:0}.group+.group[data-v-d99bfeec],.group+.item[data-v-d99bfeec]{padding-top:4px}.VPNavScreenTranslations[data-v-516e4bc3]{height:24px;overflow:hidden}.VPNavScreenTranslations.open[data-v-516e4bc3]{height:auto}.title[data-v-516e4bc3]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-text-1)}.icon[data-v-516e4bc3]{font-size:16px}.icon.lang[data-v-516e4bc3]{margin-right:8px}.icon.chevron[data-v-516e4bc3]{margin-left:4px}.list[data-v-516e4bc3]{padding:4px 0 0 24px}.link[data-v-516e4bc3]{line-height:32px;font-size:13px;color:var(--vp-c-text-1)}.VPNavScreen[data-v-2dd6d0c7]{position:fixed;top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px));right:0;bottom:0;left:0;padding:0 32px;width:100%;background-color:var(--vp-nav-screen-bg-color);overflow-y:auto;transition:background-color .25s;pointer-events:auto}.VPNavScreen.fade-enter-active[data-v-2dd6d0c7],.VPNavScreen.fade-leave-active[data-v-2dd6d0c7]{transition:opacity .25s}.VPNavScreen.fade-enter-active .container[data-v-2dd6d0c7],.VPNavScreen.fade-leave-active .container[data-v-2dd6d0c7]{transition:transform .25s ease}.VPNavScreen.fade-enter-from[data-v-2dd6d0c7],.VPNavScreen.fade-leave-to[data-v-2dd6d0c7]{opacity:0}.VPNavScreen.fade-enter-from .container[data-v-2dd6d0c7],.VPNavScreen.fade-leave-to .container[data-v-2dd6d0c7]{transform:translateY(-8px)}@media (min-width: 768px){.VPNavScreen[data-v-2dd6d0c7]{display:none}}.container[data-v-2dd6d0c7]{margin:0 auto;padding:24px 0 96px;max-width:288px}.menu+.translations[data-v-2dd6d0c7],.menu+.appearance[data-v-2dd6d0c7],.translations+.appearance[data-v-2dd6d0c7]{margin-top:24px}.menu+.social-links[data-v-2dd6d0c7]{margin-top:16px}.appearance+.social-links[data-v-2dd6d0c7]{margin-top:16px}.VPNav[data-v-7ad780c2]{position:relative;top:var(--vp-layout-top-height, 0px);left:0;z-index:var(--vp-z-index-nav);width:100%;pointer-events:none;transition:background-color .5s}@media (min-width: 960px){.VPNav[data-v-7ad780c2]{position:fixed}}.VPSidebarItem.level-0[data-v-edd2eed8]{padding-bottom:24px}.VPSidebarItem.collapsed.level-0[data-v-edd2eed8]{padding-bottom:10px}.item[data-v-edd2eed8]{position:relative;display:flex;width:100%}.VPSidebarItem.collapsible>.item[data-v-edd2eed8]{cursor:pointer}.indicator[data-v-edd2eed8]{position:absolute;top:6px;bottom:6px;left:-17px;width:2px;border-radius:2px;transition:background-color .25s}.VPSidebarItem.level-2.is-active>.item>.indicator[data-v-edd2eed8],.VPSidebarItem.level-3.is-active>.item>.indicator[data-v-edd2eed8],.VPSidebarItem.level-4.is-active>.item>.indicator[data-v-edd2eed8],.VPSidebarItem.level-5.is-active>.item>.indicator[data-v-edd2eed8]{background-color:var(--vp-c-brand-1)}.link[data-v-edd2eed8]{display:flex;align-items:center;flex-grow:1}.text[data-v-edd2eed8]{flex-grow:1;padding:4px 0;line-height:24px;font-size:14px;transition:color .25s}.VPSidebarItem.level-0 .text[data-v-edd2eed8]{font-weight:700;color:var(--vp-c-text-1)}.VPSidebarItem.level-1 .text[data-v-edd2eed8],.VPSidebarItem.level-2 .text[data-v-edd2eed8],.VPSidebarItem.level-3 .text[data-v-edd2eed8],.VPSidebarItem.level-4 .text[data-v-edd2eed8],.VPSidebarItem.level-5 .text[data-v-edd2eed8]{font-weight:500;color:var(--vp-c-text-2)}.VPSidebarItem.level-0.is-link>.item>.link:hover .text[data-v-edd2eed8],.VPSidebarItem.level-1.is-link>.item>.link:hover .text[data-v-edd2eed8],.VPSidebarItem.level-2.is-link>.item>.link:hover .text[data-v-edd2eed8],.VPSidebarItem.level-3.is-link>.item>.link:hover .text[data-v-edd2eed8],.VPSidebarItem.level-4.is-link>.item>.link:hover .text[data-v-edd2eed8],.VPSidebarItem.level-5.is-link>.item>.link:hover .text[data-v-edd2eed8]{color:var(--vp-c-brand-1)}.VPSidebarItem.level-0.has-active>.item>.text[data-v-edd2eed8],.VPSidebarItem.level-1.has-active>.item>.text[data-v-edd2eed8],.VPSidebarItem.level-2.has-active>.item>.text[data-v-edd2eed8],.VPSidebarItem.level-3.has-active>.item>.text[data-v-edd2eed8],.VPSidebarItem.level-4.has-active>.item>.text[data-v-edd2eed8],.VPSidebarItem.level-5.has-active>.item>.text[data-v-edd2eed8],.VPSidebarItem.level-0.has-active>.item>.link>.text[data-v-edd2eed8],.VPSidebarItem.level-1.has-active>.item>.link>.text[data-v-edd2eed8],.VPSidebarItem.level-2.has-active>.item>.link>.text[data-v-edd2eed8],.VPSidebarItem.level-3.has-active>.item>.link>.text[data-v-edd2eed8],.VPSidebarItem.level-4.has-active>.item>.link>.text[data-v-edd2eed8],.VPSidebarItem.level-5.has-active>.item>.link>.text[data-v-edd2eed8]{color:var(--vp-c-text-1)}.VPSidebarItem.level-0.is-active>.item .link>.text[data-v-edd2eed8],.VPSidebarItem.level-1.is-active>.item .link>.text[data-v-edd2eed8],.VPSidebarItem.level-2.is-active>.item .link>.text[data-v-edd2eed8],.VPSidebarItem.level-3.is-active>.item .link>.text[data-v-edd2eed8],.VPSidebarItem.level-4.is-active>.item .link>.text[data-v-edd2eed8],.VPSidebarItem.level-5.is-active>.item .link>.text[data-v-edd2eed8]{color:var(--vp-c-brand-1)}.caret[data-v-edd2eed8]{display:flex;justify-content:center;align-items:center;margin-right:-7px;width:32px;height:32px;color:var(--vp-c-text-3);cursor:pointer;transition:color .25s;flex-shrink:0}.item:hover .caret[data-v-edd2eed8]{color:var(--vp-c-text-2)}.item:hover .caret[data-v-edd2eed8]:hover{color:var(--vp-c-text-1)}.caret-icon[data-v-edd2eed8]{font-size:18px;transform:rotate(90deg);transition:transform .25s}.VPSidebarItem.collapsed .caret-icon[data-v-edd2eed8]{transform:rotate(0)}.VPSidebarItem.level-1 .items[data-v-edd2eed8],.VPSidebarItem.level-2 .items[data-v-edd2eed8],.VPSidebarItem.level-3 .items[data-v-edd2eed8],.VPSidebarItem.level-4 .items[data-v-edd2eed8],.VPSidebarItem.level-5 .items[data-v-edd2eed8]{border-left:1px solid var(--vp-c-divider);padding-left:16px}.VPSidebarItem.collapsed .items[data-v-edd2eed8]{display:none}.no-transition[data-v-51288d80] .caret-icon{transition:none}.group+.group[data-v-51288d80]{border-top:1px solid var(--vp-c-divider);padding-top:10px}@media (min-width: 960px){.group[data-v-51288d80]{padding-top:10px;width:calc(var(--vp-sidebar-width) - 64px)}}.VPSidebar[data-v-42c4c606]{position:fixed;top:var(--vp-layout-top-height, 0px);bottom:0;left:0;z-index:var(--vp-z-index-sidebar);padding:32px 32px 96px;width:calc(100vw - 64px);max-width:320px;background-color:var(--vp-sidebar-bg-color);opacity:0;box-shadow:var(--vp-c-shadow-3);overflow-x:hidden;overflow-y:auto;transform:translate(-100%);transition:opacity .5s,transform .25s ease;overscroll-behavior:contain}.VPSidebar.open[data-v-42c4c606]{opacity:1;visibility:visible;transform:translate(0);transition:opacity .25s,transform .5s cubic-bezier(.19,1,.22,1)}.dark .VPSidebar[data-v-42c4c606]{box-shadow:var(--vp-shadow-1)}@media (min-width: 960px){.VPSidebar[data-v-42c4c606]{padding-top:var(--vp-nav-height);width:var(--vp-sidebar-width);max-width:100%;background-color:var(--vp-sidebar-bg-color);opacity:1;visibility:visible;box-shadow:none;transform:translate(0)}}@media (min-width: 1440px){.VPSidebar[data-v-42c4c606]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}@media (min-width: 960px){.curtain[data-v-42c4c606]{position:sticky;top:-64px;left:0;z-index:1;margin-top:calc(var(--vp-nav-height) * -1);margin-right:-32px;margin-left:-32px;height:var(--vp-nav-height);background-color:var(--vp-sidebar-bg-color)}}.nav[data-v-42c4c606]{outline:0}.VPSkipLink[data-v-c8291ffa]{top:8px;left:8px;padding:8px 16px;z-index:999;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;color:var(--vp-c-brand-1);box-shadow:var(--vp-shadow-3);background-color:var(--vp-c-bg)}.VPSkipLink[data-v-c8291ffa]:focus{height:auto;width:auto;clip:auto;clip-path:none}@media (min-width: 1280px){.VPSkipLink[data-v-c8291ffa]{top:14px;left:16px}}.Layout[data-v-d8b57b2d]{display:flex;flex-direction:column;min-height:100vh}.VPHomeSponsors[data-v-3dc26e1d]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPHomeSponsors[data-v-3dc26e1d]{margin:96px 0}@media (min-width: 768px){.VPHomeSponsors[data-v-3dc26e1d]{margin:128px 0}}.VPHomeSponsors[data-v-3dc26e1d]{padding:0 24px}@media (min-width: 768px){.VPHomeSponsors[data-v-3dc26e1d]{padding:0 48px}}@media (min-width: 960px){.VPHomeSponsors[data-v-3dc26e1d]{padding:0 64px}}.container[data-v-3dc26e1d]{margin:0 auto;max-width:1152px}.love[data-v-3dc26e1d]{margin:0 auto;width:fit-content;font-size:28px;color:var(--vp-c-text-3)}.icon[data-v-3dc26e1d]{display:inline-block}.message[data-v-3dc26e1d]{margin:0 auto;padding-top:10px;max-width:320px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.sponsors[data-v-3dc26e1d]{padding-top:32px}.action[data-v-3dc26e1d]{padding-top:40px;text-align:center}.VPTeamPage[data-v-a5329171]{margin:96px 0}@media (min-width: 768px){.VPTeamPage[data-v-a5329171]{margin:128px 0}}.VPHome .VPTeamPageTitle[data-v-a5329171-s]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPTeamPageSection+.VPTeamPageSection[data-v-a5329171-s],.VPTeamMembers+.VPTeamPageSection[data-v-a5329171-s]{margin-top:64px}.VPTeamMembers+.VPTeamMembers[data-v-a5329171-s]{margin-top:24px}@media (min-width: 768px){.VPTeamPageTitle+.VPTeamPageSection[data-v-a5329171-s]{margin-top:16px}.VPTeamPageSection+.VPTeamPageSection[data-v-a5329171-s],.VPTeamMembers+.VPTeamPageSection[data-v-a5329171-s]{margin-top:96px}}.VPTeamMembers[data-v-a5329171-s]{padding:0 24px}@media (min-width: 768px){.VPTeamMembers[data-v-a5329171-s]{padding:0 48px}}@media (min-width: 960px){.VPTeamMembers[data-v-a5329171-s]{padding:0 64px}}.VPTeamPageTitle[data-v-46c5e327]{padding:48px 32px;text-align:center}@media (min-width: 768px){.VPTeamPageTitle[data-v-46c5e327]{padding:64px 48px 48px}}@media (min-width: 960px){.VPTeamPageTitle[data-v-46c5e327]{padding:80px 64px 48px}}.title[data-v-46c5e327]{letter-spacing:0;line-height:44px;font-size:36px;font-weight:500}@media (min-width: 768px){.title[data-v-46c5e327]{letter-spacing:-.5px;line-height:56px;font-size:48px}}.lead[data-v-46c5e327]{margin:0 auto;max-width:512px;padding-top:12px;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 768px){.lead[data-v-46c5e327]{max-width:592px;letter-spacing:.15px;line-height:28px;font-size:20px}}.VPTeamPageSection[data-v-3bf2e850]{padding:0 32px}@media (min-width: 768px){.VPTeamPageSection[data-v-3bf2e850]{padding:0 48px}}@media (min-width: 960px){.VPTeamPageSection[data-v-3bf2e850]{padding:0 64px}}.title[data-v-3bf2e850]{position:relative;margin:0 auto;max-width:1152px;text-align:center;color:var(--vp-c-text-2)}.title-line[data-v-3bf2e850]{position:absolute;top:16px;left:0;width:100%;height:1px;background-color:var(--vp-c-divider)}.title-text[data-v-3bf2e850]{position:relative;display:inline-block;padding:0 24px;letter-spacing:0;line-height:32px;font-size:20px;font-weight:500;background-color:var(--vp-c-bg)}.lead[data-v-3bf2e850]{margin:0 auto;max-width:480px;padding-top:12px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.members[data-v-3bf2e850]{padding-top:40px}.VPTeamMembersItem[data-v-acff304e]{display:flex;flex-direction:column;gap:2px;border-radius:12px;width:100%;height:100%;overflow:hidden}.VPTeamMembersItem.small .profile[data-v-acff304e]{padding:32px}.VPTeamMembersItem.small .data[data-v-acff304e]{padding-top:20px}.VPTeamMembersItem.small .avatar[data-v-acff304e]{width:64px;height:64px}.VPTeamMembersItem.small .name[data-v-acff304e]{line-height:24px;font-size:16px}.VPTeamMembersItem.small .affiliation[data-v-acff304e]{padding-top:4px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .desc[data-v-acff304e]{padding-top:12px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .links[data-v-acff304e]{margin:0 -16px -20px;padding:10px 0 0}.VPTeamMembersItem.medium .profile[data-v-acff304e]{padding:48px 32px}.VPTeamMembersItem.medium .data[data-v-acff304e]{padding-top:24px;text-align:center}.VPTeamMembersItem.medium .avatar[data-v-acff304e]{width:96px;height:96px}.VPTeamMembersItem.medium .name[data-v-acff304e]{letter-spacing:.15px;line-height:28px;font-size:20px}.VPTeamMembersItem.medium .affiliation[data-v-acff304e]{padding-top:4px;font-size:16px}.VPTeamMembersItem.medium .desc[data-v-acff304e]{padding-top:16px;max-width:288px;font-size:16px}.VPTeamMembersItem.medium .links[data-v-acff304e]{margin:0 -16px -12px;padding:16px 12px 0}.profile[data-v-acff304e]{flex-grow:1;background-color:var(--vp-c-bg-soft)}.data[data-v-acff304e]{text-align:center}.avatar[data-v-acff304e]{position:relative;flex-shrink:0;margin:0 auto;border-radius:50%;box-shadow:var(--vp-shadow-3)}.avatar-img[data-v-acff304e]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;object-fit:cover}.name[data-v-acff304e]{margin:0;font-weight:600}.affiliation[data-v-acff304e]{margin:0;font-weight:500;color:var(--vp-c-text-2)}.org.link[data-v-acff304e]{color:var(--vp-c-text-2);transition:color .25s}.org.link[data-v-acff304e]:hover{color:var(--vp-c-brand-1)}.desc[data-v-acff304e]{margin:0 auto}.desc[data-v-acff304e] a{font-weight:500;color:var(--vp-c-brand-1);text-decoration-style:dotted;transition:color .25s}.links[data-v-acff304e]{display:flex;justify-content:center;height:56px}.sp-link[data-v-acff304e]{display:flex;justify-content:center;align-items:center;text-align:center;padding:16px;font-size:14px;font-weight:500;color:var(--vp-c-sponsor);background-color:var(--vp-c-bg-soft);transition:color .25s,background-color .25s}.sp .sp-link.link[data-v-acff304e]:hover,.sp .sp-link.link[data-v-acff304e]:focus{outline:none;color:var(--vp-c-white);background-color:var(--vp-c-sponsor)}.sp-icon[data-v-acff304e]{margin-right:8px;font-size:16px}.VPTeamMembers.small .container[data-v-bf782009]{grid-template-columns:repeat(auto-fit,minmax(224px,1fr))}.VPTeamMembers.small.count-1 .container[data-v-bf782009]{max-width:276px}.VPTeamMembers.small.count-2 .container[data-v-bf782009]{max-width:576px}.VPTeamMembers.small.count-3 .container[data-v-bf782009]{max-width:876px}.VPTeamMembers.medium .container[data-v-bf782009]{grid-template-columns:repeat(auto-fit,minmax(256px,1fr))}@media (min-width: 375px){.VPTeamMembers.medium .container[data-v-bf782009]{grid-template-columns:repeat(auto-fit,minmax(288px,1fr))}}.VPTeamMembers.medium.count-1 .container[data-v-bf782009]{max-width:368px}.VPTeamMembers.medium.count-2 .container[data-v-bf782009]{max-width:760px}.container[data-v-bf782009]{display:grid;gap:24px;margin:0 auto;max-width:1152px}:root{--vp-home-hero-name-color: transparent;--vp-home-hero-name-background: -webkit-linear-gradient( 120deg, #0a1561 30%, #e5004f )}.dark{--vp-home-hero-name-background: -webkit-linear-gradient( 120deg, #fff 30%, #e5004f )}.image-src{opacity:.1}@media (min-width: 960px){.VPNavBarTitle .title{font-size:14px;line-height:18px}}.VPHero .main>.name{white-space:nowrap}#app .VPDoc.has-aside .content-container{max-width:1280px}@media (min-width: 1440px) and (max-width: 1920px){#app .VPNavBar.has-sidebar .container>.title{padding-left:32px;width:var(--vp-sidebar-width)}#app .VPSidebar{padding-left:32px;width:var(--vp-sidebar-width)}#app .VPContent.has-sidebar{padding-right:0;padding-left:var(--vp-sidebar-width)}#app .VPNavBar.has-sidebar .content{padding-right:32px;padding-left:var(--vp-sidebar-width)}#app .VPNavBar.has-sidebar .divider{padding-left:var(--vp-sidebar-width)}}@media (min-width: 1920px){:root{--vp-layout-max-width: 1920px}}@media print{.VPNav,.VPLocalNav,.VPSidebar,.VPDocFooter{display:none}.VPContent.has-sidebar{padding-left:0}}.print-test .VPNav,.print-test .VPLocalNav,.print-test .VPSidebar,.print-test .VPDocFooter{display:none}.print-test .VPContent.has-sidebar{padding-left:0}h1,h2{page-break-before:always}h1,h2,h3,h4,h5,h6{page-break-after:avoid}.page-info[data-v-b1e769ab]{display:inline-flex;align-items:flex-end}.page-info[data-v-b1e769ab] .hatena-bookmark-button-frame{margin-left:4px}.share-buttons[data-v-ba3c56d6]{display:flex;justify-content:flex-end;flex-wrap:wrap}.vitepress-page-title[data-v-ba3c56d6] .share-buttons>*{padding-left:5px}.vitepress-page-title__author[data-v-ba3c56d6]{padding-bottom:8px;margin-bottom:18px;font-size:12px;border:none;color:initial;text-align:right;page-break-after:always;font-weight:600;line-height:1.25;border-bottom:1px solid #eaecef}@media print{.share-buttons[data-v-ba3c56d6]{display:none}.vitepress-page-title__title[data-v-ba3c56d6]{text-align:center;margin-top:50%;page-break-before:auto}.vitepress-page-title__author[data-v-ba3c56d6]{page-break-after:always}}.VPLocalSearchBox[data-v-68e678c9]{position:fixed;z-index:100;top:0;right:0;bottom:0;left:0;display:flex}.backdrop[data-v-68e678c9]{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--vp-backdrop-bg-color);transition:opacity .5s}.shell[data-v-68e678c9]{position:relative;padding:12px;margin:64px auto;display:flex;flex-direction:column;gap:16px;background:var(--vp-local-search-bg);width:min(100vw - 60px,900px);height:min-content;max-height:min(100vh - 128px,900px);border-radius:6px}@media (max-width: 767px){.shell[data-v-68e678c9]{margin:0;width:100vw;height:100vh;max-height:none;border-radius:0}}.search-bar[data-v-68e678c9]{border:1px solid var(--vp-c-divider);border-radius:4px;display:flex;align-items:center;padding:0 12px;cursor:text}@media (max-width: 767px){.search-bar[data-v-68e678c9]{padding:0 8px}}.search-bar[data-v-68e678c9]:focus-within{border-color:var(--vp-c-brand-1)}.local-search-icon[data-v-68e678c9]{display:block;font-size:18px}.navigate-icon[data-v-68e678c9]{display:block;font-size:14px}.search-icon[data-v-68e678c9]{margin:8px}@media (max-width: 767px){.search-icon[data-v-68e678c9]{display:none}}.search-input[data-v-68e678c9]{padding:6px 12px;font-size:inherit;width:100%}@media (max-width: 767px){.search-input[data-v-68e678c9]{padding:6px 4px}}.search-actions[data-v-68e678c9]{display:flex;gap:4px}@media (any-pointer: coarse){.search-actions[data-v-68e678c9]{gap:8px}}@media (min-width: 769px){.search-actions.before[data-v-68e678c9]{display:none}}.search-actions button[data-v-68e678c9]{padding:8px}.search-actions button[data-v-68e678c9]:not([disabled]):hover,.toggle-layout-button.detailed-list[data-v-68e678c9]{color:var(--vp-c-brand-1)}.search-actions button.clear-button[data-v-68e678c9]:disabled{opacity:.37}.search-keyboard-shortcuts[data-v-68e678c9]{font-size:.8rem;opacity:75%;display:flex;flex-wrap:wrap;gap:16px;line-height:14px}.search-keyboard-shortcuts span[data-v-68e678c9]{display:flex;align-items:center;gap:4px}@media (max-width: 767px){.search-keyboard-shortcuts[data-v-68e678c9]{display:none}}.search-keyboard-shortcuts kbd[data-v-68e678c9]{background:#8080801a;border-radius:4px;padding:3px 6px;min-width:24px;display:inline-block;text-align:center;vertical-align:middle;border:1px solid rgba(128,128,128,.15);box-shadow:0 2px 2px #0000001a}.results[data-v-68e678c9]{display:flex;flex-direction:column;gap:6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}.result[data-v-68e678c9]{display:flex;align-items:center;gap:8px;border-radius:4px;transition:none;line-height:1rem;border:solid 2px var(--vp-local-search-result-border);outline:none}.result>div[data-v-68e678c9]{margin:12px;width:100%;overflow:hidden}@media (max-width: 767px){.result>div[data-v-68e678c9]{margin:8px}}.titles[data-v-68e678c9]{display:flex;flex-wrap:wrap;gap:4px;position:relative;z-index:1001;padding:2px 0}.title[data-v-68e678c9]{display:flex;align-items:center;gap:4px}.title.main[data-v-68e678c9]{font-weight:500}.title-icon[data-v-68e678c9]{opacity:.5;font-weight:500;color:var(--vp-c-brand-1)}.title svg[data-v-68e678c9]{opacity:.5}.result.selected[data-v-68e678c9]{--vp-local-search-result-bg: var(--vp-local-search-result-selected-bg);border-color:var(--vp-local-search-result-selected-border)}.excerpt-wrapper[data-v-68e678c9]{position:relative}.excerpt[data-v-68e678c9]{opacity:50%;pointer-events:none;max-height:140px;overflow:hidden;position:relative;margin-top:4px}.result.selected .excerpt[data-v-68e678c9]{opacity:1}.excerpt[data-v-68e678c9] *{font-size:.8rem!important;line-height:130%!important}.titles[data-v-68e678c9] mark,.excerpt[data-v-68e678c9] mark{background-color:var(--vp-local-search-highlight-bg);color:var(--vp-local-search-highlight-text);border-radius:2px;padding:0 2px}.excerpt[data-v-68e678c9] .vp-code-group .tabs{display:none}.excerpt[data-v-68e678c9] .vp-code-group div[class*=language-]{border-radius:8px!important}.excerpt-gradient-bottom[data-v-68e678c9]{position:absolute;bottom:-1px;left:0;width:100%;height:8px;background:linear-gradient(transparent,var(--vp-local-search-result-bg));z-index:1000}.excerpt-gradient-top[data-v-68e678c9]{position:absolute;top:-1px;left:0;width:100%;height:8px;background:linear-gradient(var(--vp-local-search-result-bg),transparent);z-index:1000}.result.selected .titles[data-v-68e678c9],.result.selected .title-icon[data-v-68e678c9]{color:var(--vp-c-brand-1)!important}.no-results[data-v-68e678c9]{font-size:.9rem;text-align:center;padding:12px}svg[data-v-68e678c9]{flex:none} diff --git a/assets/vscode_git_branch1.l8tVcgzj.png b/assets/vscode_git_branch1.l8tVcgzj.png new file mode 100644 index 00000000..a4a33907 Binary files /dev/null and b/assets/vscode_git_branch1.l8tVcgzj.png differ diff --git a/assets/vscode_git_branch2.Cwy7x_5O.png b/assets/vscode_git_branch2.Cwy7x_5O.png new file mode 100644 index 00000000..d5d72572 Binary files /dev/null and b/assets/vscode_git_branch2.Cwy7x_5O.png differ diff --git a/assets/vscode_git_clone1.qDoYJxim.png b/assets/vscode_git_clone1.qDoYJxim.png new file mode 100644 index 00000000..a9dacc08 Binary files /dev/null and b/assets/vscode_git_clone1.qDoYJxim.png differ diff --git a/assets/vscode_git_clone2.CEP9JvgJ.png b/assets/vscode_git_clone2.CEP9JvgJ.png new file mode 100644 index 00000000..872adf5a Binary files /dev/null and b/assets/vscode_git_clone2.CEP9JvgJ.png differ diff --git a/assets/vscode_git_commit.BYQAFQn8.png b/assets/vscode_git_commit.BYQAFQn8.png new file mode 100644 index 00000000..1b5e19ae Binary files /dev/null and b/assets/vscode_git_commit.BYQAFQn8.png differ diff --git a/assets/vscode_git_fetch1.DRikG15J.png b/assets/vscode_git_fetch1.DRikG15J.png new file mode 100644 index 00000000..80018ddc Binary files /dev/null and b/assets/vscode_git_fetch1.DRikG15J.png differ diff --git a/assets/vscode_git_fetch2.DAVY-Tc0.png b/assets/vscode_git_fetch2.DAVY-Tc0.png new file mode 100644 index 00000000..55c46887 Binary files /dev/null and b/assets/vscode_git_fetch2.DAVY-Tc0.png differ diff --git a/assets/vscode_git_graph1.B-QqvDRT.png b/assets/vscode_git_graph1.B-QqvDRT.png new file mode 100644 index 00000000..2a4c41a6 Binary files /dev/null and b/assets/vscode_git_graph1.B-QqvDRT.png differ diff --git a/assets/vscode_git_graph2.004hjEVr.png b/assets/vscode_git_graph2.004hjEVr.png new file mode 100644 index 00000000..f9125fd4 Binary files /dev/null and b/assets/vscode_git_graph2.004hjEVr.png differ diff --git a/assets/vscode_git_push1.BlFN6oO1.png b/assets/vscode_git_push1.BlFN6oO1.png new file mode 100644 index 00000000..e14596e2 Binary files /dev/null and b/assets/vscode_git_push1.BlFN6oO1.png differ diff --git a/assets/vscode_git_push2.BhX_AasB.png b/assets/vscode_git_push2.BhX_AasB.png new file mode 100644 index 00000000..7021a219 Binary files /dev/null and b/assets/vscode_git_push2.BhX_AasB.png differ diff --git a/assets/vscode_git_push3.DjxvPuCO.png b/assets/vscode_git_push3.DjxvPuCO.png new file mode 100644 index 00000000..bc43dab5 Binary files /dev/null and b/assets/vscode_git_push3.DjxvPuCO.png differ diff --git a/assets/vscode_git_stage.BcG6O3Ku.png b/assets/vscode_git_stage.BcG6O3Ku.png new file mode 100644 index 00000000..d7065430 Binary files /dev/null and b/assets/vscode_git_stage.BcG6O3Ku.png differ diff --git "a/documents/forAWSResource/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.html" "b/documents/forAWSResource/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.html" new file mode 100644 index 00000000..5e01092e --- /dev/null +++ "b/documents/forAWSResource/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.html" @@ -0,0 +1,228 @@ + + + + + + AWSインフラ命名規約 | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    AWSインフラ命名規約

    フューチャー株式会社

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。 ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。 また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    免責事項

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせた開発手法が採用されている。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している

    前提条件

    • 開発チームが 3 ~ 30 名程度で構築する規模での利用を想定している
    • 本規約をそのままプロジェクトに導入することを推奨する
      • そのままの導入ができない場合は、一部を抜粋、拡張して用いられることを想定している
    • AWS の構成はマネージドサービスを活用するベストプラクティスに従うものとする
      • 例えば、1 台の EC2 上で DB とアプリのように複数のサービスを稼働させるといった構成は考慮しない
    • 一部のリージョンでのみ利用可能な機能は想定していない

    名前の構成要素

    各リソースの名前に用いる要素を次の一覧に示す。

    CategoryItemNameUsage
    Common{env}環境環境の区別
    {product}製品名構築する製品名またはシステム名。稼働するマイクロサービス名もこれに当たる
    {role}役割役割を示す。場合によっては具体的な製品名 postgres, jenkins などを指定する
    {usage}用途利用目的やリソースの動作 (action) を示す。user_master, fileupload など識別したい値を指定する
    {target}対象操作の対象。usage が複数の対象があり区別したいときに利用する。
    Network{region}リージョンリージョンコード の略称を用いる
    {az}アベイラビリティーゾーンマルチ AZ 構成などで、明示的に AZ を意識する場合に用いる
    {access}アクセス修飾子access modifier. ネットワークでの public, private を区別したいときに利用する
    {permission}権限allow または deny を指定する。Security Group での利用を想定
    Organization{company}会社名会社の特定に利用。複数の会社による構築や、運用に複数社関わる場合などに必要となる
    {project}プロジェクトプロジェクト制でプロダクトを開発する際のプロジェクト名または、プロジェクトコード

    環境 ({env})

    ソフトウェア開発では複数の環境を用意し、dev, stg, prod などの名前をつけて互いに完全に分離・区別する運用を行うことが多い。そういった環境分離のために AWS インフラは次のいずれか、もしくは組み合わせで設計される。

    1. 環境単位で AWS アカウントを作成する
    2. 環境単位で AWS リージョンを分ける
    3. 命名で分ける

    いずれの方法でも、 各リソース名に環境名を付与することを推奨 する。冗長な命名となる場合もあるが、以下が理由である。

    • 同一 AWS アカウントかつ同一リージョン内には、同じ名前のリソースを作成できない
    • AWS リソース名のみで環境を特定できるようにする事で、誤った環境のリソースを操作してしまうミスを低減する
    • メンバー間の認識齟齬を無くし生産性を高める
      • チームメンバーなどの問い合わせやトラブルシュートの際に、リソース名のみでどの環境にあるか素早く判断できるようにする
      • メンバーの役割によっては AWS アカウント構成を完全には理解できていない可能性がある
    環境識別子

    主要な環境名と識別子 (Identifier) は以下である。AWS リソースの命名には識別子を用いる。

    NameIdentifierMemo
    Productionprodエンドユーザーが使う環境、本番運用環境
    Stagingstg本番と同じ構成でテストするための環境
    User Acceptance Testuatユーザーがシステムのレビュー、または操作を学習するための環境
    Performance Testperf性能検証を行うための環境
    Developmentdev開発チームが開発するための環境
    Locallocalローカル環境

    prod についてはよく用いる dev, stg と見間違えを防ぐため 4 文字にしている。

    デプロイメント環境 の考え方では、User Acceptance Test 環境を単にテスト環境 (Test) 呼ぶが、テストという単語は汎用的であるため複数の環境にあてはまる。したがって容易に認識齟齬が生じるため本規約では非推奨とする。

    名前には必ず識別子を用いる。環境名をそのまま利用しない (例: production-example-s3bucket とは命名しない)。

    理由:

    • AWS リソースによっては名前の文字数の制限が厳しい (例: ELB は最大 32 文字である)
    • AWS コンソールや設計ドキュメントなどで一覧化した場合に見切れる可能性を減らして可読性を高める
    • 識別子に採用した単語は一般的に用いられている略称である
    • その他の環境についても、環境識別子の数は通常そこまで多くならないず、またよく用いられるため、利用者にとっての認識負荷は少なく覚えるコストも低い
    同一目的の複数環境

    同一目的の環境が複数必要な場合は、識別子の末尾に連番をつける。

    例:

    • dev1, dev2, dev3
    • stg1, stg2

    役割 ({role})

    アプリケーションを構成する要素には役割がある。それを AWS リソース名に含めることで、開発者の理解を助け、操作ミスを低減する。

    主要なロール名と識別子は以下である。

    NameIdentifierMemo
    Web Serverwebapache や nginx などの Web サーバとしての役割
    Web ApplicationappWeb アプリケーションとしての役割
    Web APIapiHTTP(s) API を提供する
    Jobjob時間やある特定のイベントをもとにバックグラウンドの処理(バッチ処理など)を行う
    I/Fifファイル入出力を行う
    DBdbデータベース
    Cachecacheキャッシュ
    CI/CDciCI/CD サーバ

    名前を一般化せず、プロダクト名をそのまま利用しても問題ない。例えば、Web アプリサーバに tomcat、CI/CD サーバに jenkins といった名称を使っても良い。

    用途 ({usage})

    利用目的やリソースの動作 (action) を示す。user_master, fileupload といった形式や、認証(auth)や BFF(Backend For Frontend)など。

    役割 ({role}) と合わせてリソースが一意に特定できる名称を設定する。

    リージョン ({region})

    マルチリージョン構成を取り、リージョンを意識する必要のある場合に利用する。リージョンコード そのものではなく略称を識別子として用いる。

    NameRegion CodeIdentifier
    米国東部 (バージニア北部)us-east-1ue1
    米国東部 (オハイオ)us-east-2ue2
    米国西部 (北カリフォルニア)us-west-1uw1
    米国西部 (オレゴン)us-west-2uw2
    アジアパシフィック (東京)ap-northeast-1an1
    アジアパシフィック (ソウル)ap-northeast-2an2
    アジアパシフィック (大阪)ap-northeast-3an3
    アジアパシフィック (シンガポール)ap-southeast-1as1

    シングルリージョン構成または、リージョン間のリソースの関係が疎である場合はリージョン識別子を付与しない。

    アベイラビリティゾーン ({az})

    AZ 名にはリージョンコードを含めず、末尾のアルファベットだけとする。

    AZ IDIdentifier
    ap-northeast-1aa
    ap-northeast-1cc
    ap-northeast-1dd
    • 利用可能な文字: [a-d]{1}

    アクセス修飾子 ({access})

    VPC のサブネットは、パブリックサブネットの場合インターネットに直接アクセスできる。パブリックサブネットを区別したい場合はリソース名にアクセス修飾子を付与する。

    NameIdentifier
    パブリックサブネットpublic
    プライベートサブネットprivate

    全体ポリシー

    命名規約

    次のように各要素を使ってケバブケース (kebab-case) で命名する。パスカルケース (PascalCase) やスネークケース (snake_case) は利用しない。なお、サービス名自体にパスカルケースを用いることは許容する

    properties
    # 命名規約の基本形
    +{env}-{product}-{role}-{usage}

    理由:

    • ほぼ全ての AWS サービスではリソース名にハイフンを許容する。一方で、アンダースコアを許容しない WebACL のようなサービスがある
    • 環境名、サービス名などの単位で区切りを明確にできる

    利用可能な文字

    利用する文字は、半角英数字とハイフンに限定する。また、 小文字を推奨 する。

    • 推奨: [a-z0-9\-]+

    また、先頭文字には半角英字を用い (ハイフン、数値を先頭にしない)、ハイフンは 2 文字以上連続させないこととする。

    AWS サービス名を含めない

    リソース名に AWS サービス名を含めない。

    良い例:

    properties
    stg-fuga-web-fileupload
    +stg-fuga-web-fileupload

    悪い例:

    properties
    stg-fuga-web-fileupload-s3
    +stg-fuga-web-fileupload-bucket

    理由:

    • AWS コンソールで見たときにどの AWS サービスのリソースを見ているか自明である
    • Terraform の命名規則 にリソース名を繰り返さないという記載があり、整合性を持たせるため

    Resource and data source arguments Do not repeat resource type in resource name (not partially, nor completely):

    ただし、VPC エンドポイントやセキュリティグループのように、どの AWS サービスの何で利用されているかを示す場合には利用することがある。

    プロジェクト名を含めない

    プロジェクト制を取っている場合、その開発チームの持ち物であることを示すためプロジェクト名をリソース名に含めたくなるが非推奨である。

    理由:

    • 必ずしも開発しているプロダクトと、プロジェクトの粒度・ライフサイクルは一致しない
    • プロジェクトが解散すると管理主管が曖昧になる

    プロジェクト名の替わりにプロダクト名を含めることとする。

    マルチクラウドを考慮し、aws 識別子を追加するかどうか

    AWS だけではなく、Azure や GCP などを組み合わせたマルチクラウド運用を行っている、あるいは行う予定がある場合を考慮し、リソース名に aws といったプレフィックス/サフィックスを付与する考えもある。

    本規約では、aws キーワードをリソース名に含めることは非推奨とする。

    理由:

    • 同一 product を異なるクラウドサービスで運用することは稀
    • 一部のサービス (例えば DWH のみ Google BigQuery を利用するようなケース) だけの使用であれば、{usage} で区別すれば十分である

    サービス別の命名規約

    サービスによって異なる命名規約と例を記載する。

    以下ではプロダクト名を fuga とした場合の例をあげる。

    VPC

    VPC に関わるリソースの命名について記載する。

    Resource NameNaming ConventionExampleNote
    VPC{env}-{product}stg-fuga
    Subnet{env}-{product}-{access}-{az}stg-fuga-public-aAZ: どこのゾーンかを識別するため
    EIP{env}-{product}-{usage}stg-fuga-nat
    Route Table{env}-{product}-{access}stg-fuga-public
    Internet Gateway{env}-{product}stg-fuga
    NAT Gateway{env}-{product}stg-fuga
    Endpoint{env}-{product}-{aws_service}stg-fuga-s3様々なサービスが利用するため AWS サービス名を含めている
    Security Group{env}-{product}-{aws_service}-{usage}stg-fuga-ec2-bastion様々なサービスが利用するため AWS サービス名を含めている

    API Gateway

    AWS上の命名制約
    • ドキュメントは確認できなかったら、リソース名は 1024 文字まで指定可能。システム上は一意である必要はない

    API Gateway は 全体ポリシーの命名規約 に則る。管理上、一意となるように命名する

    properties
    # 命名規約の基本形
    +{env}-{product}-{role}-{usage}-{access}
    +
    +# 例
    +stg-fuga-web-portal-private
    +stg-fuga-web-fileupload-public
    • API Gateway には複数の機能種別 (REST, HTTP) が存在するが、命名には含めない
    • private/public を名前に含めることで、public は認証が入っているかなどをチェックできる

    EC2

    インスタンス名の制限=タグの制限のため、名前は Amazon EC2 リソースのタグ付け に従う必要がある。

    properties
    # 命名規約の基本形
    +{env}-{product}-{role}
    +
    +# 例
    +stg-fuga-web

    オートスケーリング、オートヒーリング構成をする場合にどこの AZ に配置するかを意識させないため、リソース名に AZ は基本的に含めない。そのような構成をしないという方針は、アンチパターンのため構成を見直すべきと考える。

    LB

    AWS上の命名制約

    LB には ALB/NLB/CLB などの種類があるが、いずれも以下の命名規約に従う。また、Internal LB に関しては、{usage} 部に含める。

    properties
    # 命名規約
    +{env}-{product}-{role}-{usage}-{access}
    +
    +# 例
    +stg-fuga-web-api-public

    ターゲットグループ名は、基本的には LB と同じである。

    ただし、Blue/Green デプロイを行う場合は、ターゲットグループ名をユニークにし、どちら (Blue/Green) に所属しているかをわかるようにする。

    properties
    # Target group name (Blue/Green) の命名規約
    +{env}-{product}-{role}-{usage}-{access}-blue
    +
    +# 例
    +stg-fuga-web-public-blue

    ECS

    AWS上の命名制約
    • クラスター
      • 最大文字数: 255
      • 利用可能文字種: A-z, 0-9, -, _
      • その他制約: 先頭の文字は A-z のみ利用可能
    • サービス、タスク定義
      • 最大文字数: 255
      • 利用可能文字種: A-z, 0-9, -, _

    ECS の命名規約は以下のとおりである

    properties
    # クラスターの命名規約
    +{env}-{product}
    +
    +# 例
    +stg-fuga
    +
    +# サービスの命名規約
    +{env}-{product}-{role}-{usage}
    +
    +# 例
    +stg-fuga-api-auth
    +stg-fuga-web-frontend
    +
    +# タスク定義の命名規約
    +{env}-{product}-{role}-{usage}
    +
    +# 例
    +stg-fuga-batch-import-address

    Lambda

    Lambda Function
    AWS上の命名制約

    CreateFunction によると以下の制約である。

    • 1 ~ 64 文字
    • 利用可能文字: [a-zA-Z0-9-_]+

    Lambda は運用を経てリソース数が増えやすいサービスの一つである。そのため個別の機能名の前に {role} を含めてグルーピングしやすい名前にする。

    properties
    # 命名規約
    +{env}-{product}-{role}-{usage}
    +
    +# 例
    +stg-fuga-import-userprofile
    +stg-fuga-job-checkconsistency
    +stg-fuga-report-successrate

    もし、Scatter-Gather パターンを用いる場合は次のようにサフィックスに追加して区別する。

    properties
    # 命名規約
    +{env}-{product}-{role}-{usage}-scatter
    +{env}-{product}-{role}-{usage}-segment
    +{env}-{product}-{role}-{usage}-gather
    Lambda Layer
    AWS上の命名制約
    • 1 ~ 64 文字
    • 利用可能文字: [a-zA-Z0-9-_]+

    Lambda Layers は実行環境が重要であるため、 {runtime} で言語バージョンを指定する。

    properties
    # 命名規約
    +{env}-{product}-{runtime}-{usage}
    +
    +# 例
    +stg-fuga-python310-auth
    +stg-fuga-nodejs18-frontend

    RDS/Aurora

    AWS上の命名制約

    Amazon RDS の命名に関する制約 によると以下の制約である。

    • 1 ~ 63 個の英数字またはハイフンを使用する必要があります
    • 1 字目は文字である必要があります
    • 文字列の最後にハイフンを使用したり、ハイフンを 2 つ続けて使用したりすることはできません
    • 1 つの AWS アカウント、1 つの AWS リージョンにつき、すべての DB インスタンスにおいて一意である必要があります
    properties
    # クラスターの命名規約
    +{env}-{product}-{role}
    +
    +# 例
    +stg-fuga-auth
    +
    +# インスタンスの命名規約
    +{env}-{product}-{role}-{serial}
    +
    +# 例
    +stg-fuga-auth-01
    +
    +# DBパラメータグループの命名規約
    +{env}-{product}-{role}
    +{env}-{product}
    +
    +# 手動スナップショットの命名規約
    +{env}-{product}-{role}-{yyyy}-{mm}-{dd}

    AZ は含めない。

    理由:

    • RDS はマルチ AZ 構成をとることが推奨のため
    • Aurora は自動でマルチ AZ 構成をとっているため

    DB パラメータグループは、role 単位での設定を推奨する。product を跨いでの設定は行わない。

    • 設定値の変更はパラメータグループを適用している全ての DB に変更が反映される。同じパラメータグループを複数の DB で共有し過ぎることにより意図しない DB にまで設定変更が反映されるリスクを避けるため

    クラスター/インスタンスに適用する IAM ロール

    DB サブネット

    • VPC のサブネットを参照

    DynamoDB

    AWS上の命名制約

    Amazon DynamoDB でサポートされるデータ型と命名規則 によると以下の制約である。

    • すべての名前は UTF-8 を使用してエンコードする必要があり、大文字と小文字が区別される
    • 3 ~ 255 文字
    • 利用可能な文字: [a-zA-Z0-9_.-]+

    DynamoDB のテーブル名には、環境、プロダクト名、用途を用いる。データは長く残り、かつ変更しにくいため会社名などの変化しやすい項目は含めない。

    properties
    # DynamoDB の命名規約
    +{env}-{product}-{usage}
    +
    +# 例
    +stg-fuga-user
    +stg-fuga-user-accesslog

    なお、インデックス名は idx-1, idx-2 のような連番での管理を推奨する。RDB とは異なりアカウント単位での一意性は不要なため、テーブル名は含めなくても良いため、 idx_{テーブル名}_{連番} としなくても良い。DynamoDB は 最大で 20 のグローバルセカンダリインデックス を持つことができるが、インデックスの数は最小限に抑えることが鉄則であるため、0 埋めしない。ただし、要件上どうしても多用が避けられないことが判明している場合は idx-01, idx-02 と 0 埋めする。

    S3 Bucket

    AWS上の命名制約

    Amazon S3 バケットの命名要件 によると以下の制約である。

    • 1 ~ 63 文字
    • 半角英数字、ピリオド、ダッシュのみを使用可能
    • バケット名の各ラベルは、小文字または数字で始まっている必要がある
    • バケット名では、アンダースコア、末尾のダッシュ、連続するピリオド、隣接するピリオドとダッシュは使用できない
    • バケット名を IP アドレス (198.51.100.24) として書式設定することはできない

    S3 は非常に多くの用途で用いることがあるため、利用形態に応じて規則を変えて対応する。

    properties
    # 通常の命名規約
    +{env}-{product}-{use}
    +
    +# 例
    +stg-fuga-fileupload
    +
    +# ログを保管するバケットの命名規約
    +{env}-{product}-{service}-logs
    +
    +# 例
    +stg-fuga-alb-logs
    +
    +# データ授受で利用する場合の命名規約
    +{env}-{product}-{use}-{dest}-if
    +
    +# 例
    +stg-fuga-userinfo-fis-if

    Kinesis Data Streams

    AWS上の命名制約

    CreateStream によると以下の制約である。

    • 異なる AWS アカウントであれば同名が許容
    • 異なるリージョンであれば同名が許容
    • 1 ~ 128 文字
    • [a-zA-Z0-9_.-]+

    IoT のセンシングを始めとしたイベントデータの場合は、次の命名規約を用いる。{role} には import や export など、どのような処理を行うかを規定する。

    設計によっては、データ種別 (スキーマ) 毎に分離することもあるため、デバイス名やセンサー名などの発生源の名前を持たせる。

    properties
    # 命名規約
    +{env}-{product}-{role}-{usage}-{schema}
    +
    +# 例
    +stg-fuga-import-iotsensor-devicetype
    +stg-fuga-import-iotsensor-toggle

    ジョブキューとして用いる場合は、どのジョブを利用するかが重要であるため、呼び出し用であることが明確になるように命名する。

    properties
    # 命名規約
    +{env}-{product}-call-{呼び出したいジョブ名}
    +
    +# 例
    +stg-fuga-call-job-arrival-check

    SQS

    AWS上の命名制約

    Amazon SQS キューとメッセージの識別子 によると以下の制約である。

    • 最大 80 文字
    • [a-zA-Z0-9_-]
    • FIFO キューの場合には .fifo のサフィックスで終わる必要がある
    • 1 つの AWS アカウント、1 つの AWS リージョンにつき一意である必要がある

    1 つのキューに対し、複数のプロデューサー、コンシューマーを取りうるため、プロデューサー、コンシューマーを名前に含めることは推奨しない。

    properties
    # 標準キューの命名規約
    +{env}-{company}-{product}-{usage}
    +
    +# 例
    +stg-future-fuga-processresult
    +
    +# FIFOキューの命名規約
    +{env}-{company}-{product}-{usage}.fifo
    +
    +# 例
    +stg-future-fuga-processresult.fifo

    Event Bridge Rule

    AWS上の命名制約
    • 最大 64 文字
    • 数字、小文字/大文字、 . (ピリオド)、 - (ハイフン)、 _ (アンダーバー) が使用可能
    • 同じリージョン内および同じイベントバス上の別のルールと同じ名前を付けることは不可
    properties
    # 命名規約
    +{env}-{product}-{usage}-{source}-{target}
    +
    +# 例
    +stg-fuga-deploy-s3-codepipeline
    +stg-fuga-archive-auth0-s3
    +stg-fuga-polling-schedule-lambda

    ※スケジュールタイプのルールの場合は {source}schedule と記載する。

    IAM

    IAM に関わるリソースの命名について記載する。IAM グループ、IAM ユーザー、IAM ロール、IAM ポリシーの 4 点について述べる。

    IAM ユーザー

    IAM ユーザーについては、誰 (人またはシステム) が利用するのかを識別することを目的とする。同じユーザーを複数の人やシステムで使いまわすと、誰が操作したのかといった証跡を追えなくなってしまうため、個別に発行することを推奨する。 また、役割や権限といった情報は名前に含めない。そのような名前はユーザーに紐づけるロールが増えた際などに名前と役割や権限の実態が乖離してしまうためである。

    IAM ユーザー名については全体ポリシーから外れ、アンダースコア区切りを推奨する。

    理由:

    • 多くのサービスでユーザー名には慣習的にアンダースコアを用いることが多いため

    人が利用する IAM ユーザー:

    properties
    # 命名規約
    +{company}_{username}
    +
    +# 例
    +future_taro_mirai

    ※AWS アカウントに関与する人が単一の会社に属する人だけである場合は {company}_ を省略しても良い。

    システムが利用する IAM ユーザー:

    properties
    # 命名規約
    +{product}_{usage}
    +
    +# 例
    +fuga_api
    +fuga_auth0

    AWS サービスに権限付与する場合は IAM ロールで付与することを想定している。システムが利用する IAM ユーザーは、別のクラウドや SaaS 等への権限付与に使うことを想定している。

    全体ポリシーの命名規約 とは異なり、環境名 {env} を Prefix につけない理由は次である。

    • ある AWS アカウントに対して、Switch Role などで別の環境にアクセスする際に混乱が生じる
    • ブラウザのパスワード管理などのために ID 名を分けたいという考えもあるかもしれないが、パスワード管理アプリなどの利用を推奨する
    IAM グループ

    IAM グループに IAM ユーザーを追加することで複数ユーザーの権限を一括管理できる。IAM ユーザーは複数の IAM グループに追加可能だが、所属可能なグループ数は最大で 10 という制約があるため注意が必要である。

    この制約を踏まえ、各役職ごとに基本となるグループを作成し、基本グループで対応できない例外的な権限の付与を個別のグループで対応することを想定した命名としている。

    また、グループ数をむやみに増やさないためにグループ名に環境名 {env} はつけない。仮に future-developer というグループが dev 環境のみにアクセスできるといったような制御をする場合でも、グループ名には dev をつけず、dev 環境にアクセス可能なポリシーをグループにアタッチする方針としている。

    基本となるグループ:

    properties
    # 命名規約
    +{company}-{role}
    +
    +# 例
    +future-developer
    +future-maintainer

    ここでの {role} はユーザーが担う役割を表す。

    個別のグループ:

    properties
    # 命名規約
    +{target}-{usage}
    +
    +# 例
    +bastion-access

    個別のグループは Session Manager で EC2 にアクセスするグループといった使い方を想定している。

    例外的に特定のユーザーにのみ権限を付与する、会社を超えて共通のグループを付与するといったユースケースも考えられる。

    IAM ロール

    IAM ロールは、AWS サービスに権限を付与する目的で利用する。IAM ロールに複数の IAM ポリシーをアタッチできるため、IAM ロールの命名では細かい権限を表現することは避け、IAM ロールを誰が使うのかを明確にすることを主目的とする。

    properties
    # 命名規約
    +{env}-{product}-{aws_service}-{usage}
    +
    +# 例
    +stg-fuga-ec2-bastion
    +stg-fuga-lambda-api

    ※場合によっては {usage} 部に詳細情報を追加しても良い

    IAM ポリシー

    IAM ポリシーの命名に入る前に、ポリシーの設計方針について記載する。 ここでは、ポリシー設計方針の代表例として、以下の 2 パターンについて説明する。

    • 細かく設定し再利用するパターン
    • 特定のリソースに付与するポリシーを書き出すパターン

    それぞれの設計方針にはメリット・デメリットがあり開発規模などで使い分けが想定されるため、それぞれの場合の命名方法について記載する。

    細かく設定する場合:

    json
    {
    +  "Version": "2012-10-17",
    +  "Statement": [
    +    {
    +      "Action": "s3:*",
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    }
    +  ]
    +}
    properties
    # 命名規約
    +{env}-{product}-{permission}-{aws_service}-{usage}
    +
    +# 例
    +stg-fuga-allow-s3-full
    +stg-fuga-allow-ses-send

    特定のリソースに付与するポリシーを書き出す場合:

    json
    {
    +  "Version": "2012-10-17",
    +  "Statement": [
    +    {
    +      "Action": "s3:*",
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    },
    +    {
    +      "Action": ["ses:SendEmail", "ses:SendRawEmail"],
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    },
    +    {
    +      "Action": "sqs:*",
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    }
    +  ]
    +}
    properties
    # 命名規約
    +{env}-{product}-{aws_service}-{usage}
    +
    +# 例
    +stg-fuga-ec2-bastion
    +stg-fuga-iam-group-future-develop

    IAM グループ用のポリシーを作成する例では、company を含めた future-develop といった名前を {usage} としている。

    この場合は命名粒度が IAM ロールと等しくなるため、命名規約も同じ方針にしている。

    予め用意されているポリシーの名前は PascalCase 形式であるが (例: AmazonS3FullAccess)、ユーザーが作成したことを明確にするため snake_case で命名する。

    タグの命名

    AWS上の命名制約

    Tag naming and usage conventions によれば以下の制約である。

    • 最大 50 個のタグを設定できる
    • タグキーは一意でなければならない
    • タグキーは最長 128 Unicode 文字、タグ値は最長 256 Unicode 文字
    • 使用可能文字
      • UTF-8 で表現できる文字、数字、スペース、. : + = @ _ / -
    • タグのキーと値では大文字と小文字が区別されます
    • タグに aws: プレフィックスは禁止

    AWS リソースのタグ付け によれば、タグ付けのベストプラクティスは以下である。

    • 個人情報 (PII) などの機密情報や秘匿性の高い情報をタグに設定しない
    • すべてのリソースタイプに一貫して適用する
    • リソースアクセスコントロールの管理、コスト追跡、オートメーション、整理など、複数の目的に対応したタグガイドラインを考慮する
    • 自動化ツールを使用してリソースタグを管理する
    • タグは、多めに使用する
    • 将来の変更の影響を考慮する
    • AWS Organizations のタグポリシーを利用することで、組織が採用するタグ付け標準を自動的に適用する

    より詳しいタグ付けのベストプラクティスも存在するが、本紙の範囲を超えるため紹介のみに留める。 https://docs.aws.amazon.com/whitepapers/latest/tagging-best-practices/tagging-best-practices.html

    タグキー

    • 使用する文字は英数字に限定する。基本的には パスカルケース (PascalCase) 形式を推奨する
      • リソース作成時に自動生成される Name タグと平仄を合わせるため
    • 以下の観点でタグを使い分ける
      • リソース整理
      • コスト管理
        • AWS Billing にてコスト配分タグの設定が必要
      • オートメーション
        • EC2 の自動起動停止の管理など
      • アクセス制御
        • タグ値を利用した IAM ポリシーのアクセス制御など

    主要なタグ項目

    CategoryTag KeyRequiredNote
    CommonEnv環境識別子
    Systemシステム名
    Nameリソースの識別子として機能名などを設定
    費用按分Ownerリソースの管理主管部署。費用の負担先を想定
    Project開発担当チーム。どのチームがどれくらい利用したかをトレースするために設定
    ツールで利用StartAt起動時刻。自動化ツールなどで必要があれば設定
    EndAt停止時刻

    タグ値

    • 各タグキーごとに原則、タグ値の元となる命名規約に従う
    • 元となる命名規約がない場合、以下を推奨する
      • リソースの命名規約に従う
      • 頭文字のみの略語の場合は大文字のみ
    • 値の取りうるパターンが決まっている場合には、タグポリシーで値を設定する

    タグポリシー

    AWS Organizations を利用している場合、タグの標準化を促進するタグポリシーの設定が可能となる。 タグポリシーにより実現できることは以下。

    • タグキーの大文字小文字の組み合わせを強制する
      • 例: Name を指定した場合、 name, NAME, nAME などはタグキーとして設定できなくなる
    • 任意のタグキーに対して、設定可能なタグ値を指定する
      • Env など、予め取りうるタグ値のパターンが決まっている場合に利用
    • タグポリシーを適用するリソースタイプを指定

    License

    CC-By-4.0

    + + + + \ No newline at end of file diff --git a/documents/forAWSResource/index.html b/documents/forAWSResource/index.html new file mode 100644 index 00000000..945d841f --- /dev/null +++ b/documents/forAWSResource/index.html @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    AWSインフラ命名規約

    Future Enterprise Naming Convention Standards for AWS infrastructure resource

    可読性や保守性、拡張性を考慮した AWS インフラ命名規則です。

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。

    ファイルはPandocを利用して作成しています。

    + + + + \ No newline at end of file diff --git a/documents/forGitBranch/commit_message_rule.html b/documents/forGitBranch/commit_message_rule.html new file mode 100644 index 00000000..19d9501f --- /dev/null +++ b/documents/forGitBranch/commit_message_rule.html @@ -0,0 +1,69 @@ + + + + + + コミットメッセージ規約 | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    コミットメッセージ規約

    Gitのコミットメッセージにの書式についてルール化することで、コミットの目的がわかりやすくなる、履歴からのトラッキングの容易になる利点がある。

    本規約のコミットメッセージの書式としては、Conventional Commitsをベースとした規約としている。

    以下の形式でコミットメッセージを記載することとする。

    md
    <type>: <subject> <gitmoji>

    コミットメッセージは type、subject、gitmojiの最大3つの要素から構成され、それぞれは後述する書式に従うものとする。 この中でも、type、subjectについては必須とし、ほかの要素についてはプロジェクトの運用にしたがい任意とする。

    type

    typeについては必須の要素となり、以下のいずれかを選択するものとする。

    type説明
    feat新機能の追加
    fixバグの修正
    docsドキュメンテーションの更新
    refactorリファクタリング

    subject

    subjectについては必須の要素となり、変更内容を簡潔に記載するものとする。 issue idについては、PRから参照する運用を想定し、コミットメッセージの必須要素とはしないこととする。

    gitmoji

    gitmojiについては任意の要素となり、変更内容を視認しやすい絵文字の使用を可能とする。

    変更内容と選択される絵文字の対応については厳密とせず、開発者が任意に選択するものとする。

    type(feat, fix, docs, refactorなど)に基づく、選択例を以下に示す。

    txt
     ==== Emojis ====
    + :ambulance:  🚑致命的なバグ修正(fix)
    + :bug:  🐛バグ修正(fix)
    + :+1: 👍機能改善・機能修正(fix)
    + :cop: 👮セキュリティ関連の修正(fix)
    + :art: 🎨レイアウト関連の修正(fix)
    + :green_heart: 💚テストやCIの修正・改善(fix)
    + :wrench: 🔧設定ファイルの修正(fix)
    + :building_construction: 🏗️アーキテクチャの変更(fix)
    + :tada: 🎉大きな機能追加(feat)
    + :sparkles: ✨部分的な機能追加(feat)
    + :up:   🆙依存パッケージ等のアップデート(feat)
    + :memo: 📝ドキュメント修正(docs)
    + :bulb: 💡ソースコードへのコメント追加や修正(docs)
    + :lipstick: 💄Lintエラーの修正やコードスタイルの修正(refactor)
    + :recycle: ♻️リファクタリング(refactor)
    + :fire: 🔥コードやファイルの削除(refactor)
    + :rocket: 🚀パフォーマンス改善(refactor)

    コミットメッセージ例

    上記のルールに従った、コミットメッセージのサンプルは以下のようなものとなる。 以下のようなコミットをルールとすることで、変更内容を視覚的に把握しやすくなる利点がある。

    txt
    feat: カレンダー機能の追加 🎉
    txt
    fix: メモリリークの修正 🚑
    txt
    docs: デプロイフローをドキュメント化 📝
    txt
    refactor: Lintエラーの修正 💄
    + + + + \ No newline at end of file diff --git a/documents/forGitBranch/git_branch_standards.html b/documents/forGitBranch/git_branch_standards.html new file mode 100644 index 00000000..d05c734a --- /dev/null +++ b/documents/forGitBranch/git_branch_standards.html @@ -0,0 +1,123 @@ + + + + + + Gitブランチフロー規約 | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Gitブランチフロー規約

    フューチャー株式会社

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。

    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。

    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    本規約はGitブランチ管理の標準的な運用ルールをまとめている。以下の想定で作成されているため留意すること。

    • GitHub / GitLab の利用
    • トランクベース開発(フィーチャーフラグ)を 採用しない
    • ライブラリではなく、アプリケーション(CLIツール、Webアプリケーションなどの)開発で利用する

    免責事項

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせて工夫された設計開発の方針が存在する。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している

    基本方針

    一般的なGitブランチ運用のプラクティスに従い、本規約も以下の方針に則る。

    • すべての機能開発や不具合修正に、featureブランチを使用する
    • プルリクエストを経由してfeatureブランチの修正内容をマージする
    • 永続ブランチは各環境にデプロイ可能となるよう整合性を保つ

    ブランチの種類

    本規約で想定する、ブランチの種類とその役割を説明する。

    ブランチ名称役割ライフサイクル派生元ブランチ命名規則直プッシュ
    mainプロダクション環境との同期永続的-main 固定❌️
    feature特定機能の追加/変更短命maindevelopfeature/${チケット番号}: 詳細はfeatureブランチ を参照✅️※1
    develop開発の大元永続的maindevelop 固定。複数必要な場合は develop2 と連番にする❌️
    releaseリリース作業用途短命developrelease/${yyyymmdd}release/${リリースバージョン} など❌️
    hotfixmainブランチに対する即時修正短命mainhotfix/${チケット番号}: featureブランチに準じる✅️
    topic複数人での機能開発用途短命featuretopic/${チケット番号}: featureブランチに準じる✅️

    ※1: topicブランチを利用する場合は、派生させたfeatureブランチへの直プッシュはNGとなる

    mainブランチ

    Gitリポジトリを新規作成するとデフォルトで作成されるブランチ。masterからmainに改名された経緯を持つ[1]

    マージ毎にプロダクション環境へデプロイし同期を取る。

    featureブランチ

    機能追加や変更を行うブランチで、主な特徴は以下である。

    • ひとつの変更に対してひとつのfeatureブランチを作成し、作業完了後に削除するため、開発中で最も使われる短命なブランチである
    • 基本的に1人の開発者のみが利用する

    feature branch

    以下の命名に従う。

    • feature/ のプレフィックスを付ける
    • 課題管理システムと紐付けられるようなブランチ名にする
    sh
    # OK(課題管理システムの課題番号をブランチ名に利用)
    +feature/#12345
    +
    +# OK(GitHub Issue や JIRA や Backlog のプロジェクトIDをブランチ名に利用)
    +feature/<PROJECTID>-9403
    +
    +# NG(プレフィックスが無い)
    +fixtypo

    developブランチ

    開発の中心となるブランチである。

    develop branch

    releaseブランチ

    リリースするために使用するブランチで、主な特徴は以下である。

    • リリース前の検証を開発と並行して実施する場合に利用する
    • releaseブランチではバグ修正、ドキュメント生成、その他のリリースに伴うタスクのみを実施する
    • masterブランチのマージコミットにリリースタグを打ち、mainブランチをdevelopブランチへマージ後、releaseブランチを削除する

    release branch

    hotfixブランチ

    本番リリースに対して迅速にパッチを当てて修正する場合に使用するブランチで、主な特徴は以下である。

    • 修正が完了するとmainとdevelopの両方(あるいは進行中のreleaseブランチ)にマージされる
    • main/developブランチがあると必要になる可能性がある。main/featureブランチのみの運用では必須ではない(管理上の目的でfeatureとhotfixを分けることはあり得る)

    hotfix branch

    topicブランチ

    featureブランチで実現する機能を複数人で開発する場合に使用するブランチである。

    • topicブランチが必要なケースでは、featureブランチへの直接プッシュを行ってはならない
    • GitHub Flowではfeatureブランチのことをtopicブランチと呼称する場合があるが、本規約ではfeatureブランチから派生するブランチをtopicブランチと定義する

    topic branch

    ブランチ戦略の選定

    ブランチ戦略は以下の方針で選定する。

    • できるかぎりシンプルなモデルを選択し、運用コストを下げる
    • プロジェクトのフェーズや体制に応じて、変更を許容する

    有名なブランチ戦略として以下がある。

    本規約で推奨するブランチ戦略は次の2パターンであり、これをベースとして選択する。

    名称利用ブランチデフォルトブランチリリース作業ブランチ備考
    Lite GitLab Flow
    ※1
    main
    develop
    feature
    topic
    hotfix
    developdevelop・GitLab Flowからreleaseブランチを除いたパターン
    ・リリース作業時にdevelopマージを止められる場合に利用する
    GitLab Flowmain
    develop
    release
    feature
    topic
    hotfix
    ※2
    developrelease・リリース作業と開発作業が並行して行う必要があるか、
    断面を指定して複数テスト環境にデプロイしたい場合に利用する
    • ※1: 特定の呼称はないためLite GitLab FLowと命名する
    • ※2: 本規約では、本来のGitLab Flowの呼称である productionmainpre productionreleaseに言い換えている

    ブランチ戦略とデプロイメント環境

    各ブランチ戦略ごとに、デプロイメント環境に対応するブランチを整理する。プロダクション環境リリース前には、mainブランチでタグを打つこととする。

    名称開発環境ステージング環境プロダクション環境備考
    Lite GitLab Flowdevelopdevelopmain・開発環境へはdevelopマージをトリガーにCI/CDでデプロイを推奨する
    ・開発環境へのデプロイ漏れを防ぐため定期的にCI/CDでdevelop断面をリリースすることを推奨する
    ・動作確認など理由がある場合はfeatureブランチから直接開発環境へのデプロイも許容する
    ・ステージング環境は日次など定期的なCI/CDによるデプロイを推奨する
    GitLab Flowdevelopreleasemain・開発環境へはdevelopマージをトリガーにCI/CDでデプロイを推奨する
    ・検証期間が長引きそうな場合は、PRレビュー承認後にfeatureブランチから開発環境へのデプロイを許容する

    ブランチ戦略の拡張

    次のような要件があった場合には、ベースとなるブランチ戦略を拡張する必要がある。

    1. developブランチを複数作成する場合
    2. 過去バージョンをサポートする場合

    1. developブランチを複数作成する場合

    multi develop branch

    日々のエンハンス開発と並行して、数カ月後に大型リリースを行いたい場合がある。このときは複数リリースバージョンを並行して開発するため、 developdevelop2 といった複数のdevelopブランチを作る必要がある。

    概要:

    • develop の変更にはバグフィックスや軽微なUI向上が含まれ、日次/週次などの頻度でプロダクション環境へリリースされる
    • develop2develop ブランチの変更をすべて取り込んだ上で、大型機能の準備を行う必要がある

    develop2 同期の注意点:

    • リベースすると develop2 を元にfeatureブランチを作成して開発している開発者が混乱することになるため、マージコミットをお用いる
    • 誤操作を避ける目的でcherry-pickは行わない
    • devleop2 への同期は、 develop -> main ブランチに反映されるタイミングで同期を行う(これにより、品質保証済みの変更のみ取り入れることができる9

    release multi develop branch

    develop2のリリース手順

    1. developからdevelop2へマージコミットする(2でコンフリクトが起こらないよう、前準備の意味合いで実施する。)
    2. develop2からdevelopにマージを行い、その後は通常のリリースフローに従う
    3. 問題なくリリースが完了し次第、develop2を削除する

    developからdevelop2へマージ後、develop2mainブランチに反映させる手順も考えられるが、develop2からdevelopへのマージとすると以下のメリットがある。

    • プロダクション環境(=develop)との差分を把握することができる
    • より一般的な名称である develop ブランチのみ残るため、新規参画者フレンドリーである

    2. 過去バージョンをサポートする場合

    multi version branch

    (社内外の)ライブラリでインターフェースの大型改善や仕様変更を受けて、メジャーバージョンを1→2に上げることがる。この時に過去バージョンもサポートする必要があると、バージョン別にsupportブランチを作成する。

    概要:

    • メインの更新はversion2(mainブランチ)に対して行っていくが、version1の利用ユーザーが存在する場合、バグfixやセキュリティアップデートを並行して行う
      • version1を示すブランチ(support/v1)を別途作成、そのブランチからfeatureブランチを作成する
    • featureブランチのマージ後、マイナーバージョン(あるいはパッチバージョン)を上げたタグをコミットし、リリースする
      • ※この例ではversion1とversion2が別リソースとして動いていることを前提としている。同一リソースで複数バージョンが稼働する場合はversion2のブランチで対応を行う必要がある。

    マージ戦略の選定

    マージ戦略とは、複数のブランチ間で生じた変更の取り込み方針を指す。

    具体的には次の3ケースそれぞれで、「マージコミット」「リベース」「スカッシュマージ」のどれを採用するか判断する。

    1. developブランチからfeatureブランチへ変更を取り込む
    2. featureブランチからdevelopブランチへ変更を取り込む
    3. 永続ブランチ間で変更を取り込む

    以下に影響を与えるため、Gitの利用開始前に決めチームで統制を図ることが重要である。

    • プロジェクトのコミット履歴の管理
    • 開発プロセスの円滑な進行
    • 最終的なソフトウェア品質

    1. developブランチからfeatureブランチへ変更を取り込む

    featureブランチでの作業中に、developブランチが更新された場合、品質保証の観点でdevelopブランチの変更をfeatureブランチに取り込んだ上で、テストなどの検証作業を行う必要がある。

    developブランチの変更をfeatureブランチに取り込む方法に記載した2つの方法のうち、「リベース」による方法を推奨する。

    リベース

    理由は次の通り。

    • マージコミットが作成されると履歴が複雑になり、レビューアの負荷が高まる
    • スカッシュマージはこのケースでは選択できない
    • コンフリクトリスクは、マージ・リベース問わず発生するもので、リベースの選択による悪影響は存在しない

    この選択にあたり、以下の設定を行う。

    1. git pull 時の挙動がリベースになるよう git config pull.rebase true を実行する
    2. developブランチの変更を取り込む場合、同じコンフリクトの解消を何度も求められることを解消するため、git config rerere.enabled true を実行する

    マージによる変更の取り込みが既存のブランチを変更しないのに対し、リベースは全く新しい(元のコミットIDとは別のコミットIDで)コミットを作成するため、次の1点に注意すること。

    1. リモートにプッシュ済のブランチがあり、developブランチからさらに変更をリベースで取り込んだ場合、強制プッシュ(Force Push)が必要になる
      • git push origin HEAD --force-with-lease --force-if-includes とすることで、意図せずリモートブランチの変更を上書きしないようにする
        • --force-with-lease: ローカルのリモート追跡ブランチの ref とリモートの ref を比較し、ローカルの状態が最新でない場合(プッシュ先のリモートブランチに変更が入ったが、ローカルで git fetch していない場合)は、プッシュに失敗する。逆にいうと、プッシュ前に git fetch を実行済みの場合は、リモートの変更を上書きする形で強制プッシュができてしまうため、これを防ぐには --force-if-includes フラグを併用する
        • --force-if-includes: リモート追跡ブランチの変更がローカルに全て取り込まれていない場合は、プッシュに失敗する。これにより意図せず他の人のコミットを上書きすることを防ぎつつ、必要な変更を強制的にプッシュすることができる

    強制プッシュでレビューコメントは消えるのか?

    強制プッシュすることにより、レビューコメントが消えてしまわないかという懸念を聞くことがある。2024年7月に実施した調査結果では問題なかった。

    • a.履歴保持: 強制プッシュを行い、GitHub投稿したレビューコメントが履歴として何かしらのページで取得できるかどうか。GitHubではConversationタブで確認
    • b.行単位の紐づけ(該当行の変更なし): レビューコメントが付けられた行とは別の変更を行い、強制プッシュしたときにレビューコメントの紐づけが残るかどうか。GitHubではFile chagedタブで確認
    • c.行単位の紐づけ(該当行の変更あり): レビューコメントで付けられた行を修正し、強制プッシュ時の挙動。レビュー対応をしたとみなしレビューコメントのひも付きは解除されているべきである。GitHubではFile chagedタブで確認
    サービスa.履歴保持b.行単位の紐づけ(該当行の変更なし)c.行単位の紐づけ(該当行の変更あり)
    GitHub残る残る消える
    GitLab残る残る消える

    2. featureブランチからdevelopブランチへ変更を取り込む

    プルリクエスト(以下、PR)を経由して、開発が完了したfeatureブランチをメインのdevelopブランチに取り込むためには、GitHub(GitLab)上でPRを経由する運用を行うこと。

    developブランチにfeatureブランチの変更を取り込む方法に記載した3パターンのうち、「スカッシュマージ」による方法を推奨する。

    Squash and Merge

    理由は次の通り。

    • featureブランチのコミットログが、汚れることは許容したいため
    • developブランチの履歴をクリーンに保てるため
    • PRをよりシンプルに保つインセンティブとしたいため(単一のコミットメッセージで表現できる程度の方がレビューコストも小さいため)

    「スカッシュマージ」を行うと、変更元のfeatureブランチのコミットをまとめたコミットが新たに作成されるめ、元のfeatureブランチを再利用しPRを作成するとコンフリクトが発生する。そのためマージ後はリモート/ローカルの双方で速やかにfeatureブランチを削除させるため、以下の設定を加える。

    • マージ後にfeatureブランチを自動削除する設定
      • リモート側: GitHubでは「Automatically delete head branches」を選択することで、マージ後に自動でブランチの削除が行われる(GitLabではプロジェクト設定で「Enable "Delete source branch" option by default」を選択する)
      • ローカル側: git config --global fetch.prune true: リモート側で削除されたブランチをローカル側でも削除する

    「スカッシュマージ」による変更の取り込みを行う場合、次の2点に注意すること。

    1. 部分的なコミットの取り消しができない
      • 履歴上は1つのコミットになるため、マージ後に一部の変更だけの取り消しが不可能。そのためPRをなるべく小さなまとまりにする
    2. Authorが失われる
      • featureブランチにコミットを行った人がAuthorになるのではなく、「スカッシュマージ」を行った人がAuthorになる。OSS開発を行う場合など、厳密にコントリビューションを管理する必要がある場合は注意する
      • GitHubでは「スカッシュマージ」を行う場合、デフォルトでコミットメッセージに co-authored-by トレーラーが追加され、1つのコミットが複数の作成者に帰属するようにするようになっている[2]。この記述は削除しないようにする

    3. 永続ブランチ間で変更を取り込む

    永続ブランチ同士の変更を取り込むケースとして、develop ブランチを main ブランチや releaseブランチにマージするといった場合がある。

    ブランチ間の同期が取れないため「リベース」「スカッシュマージ」は選択できないため、「マージコミット」を採用する。

    ブランチ運用アンチパターン

    ブランチ運用でよく課題に上がるパターンとその対応を紹介する。

    追い抜きリリース

    以下のような状況とする。

    • 2つのチケット(issue-312、issue-394とする)があり、どちらも同じファイルの修正を含む
    • 先にissue-312がdevelopにマージされ、その後に着手されたissue-394がマージされた
    • 以下のような条件があるため、issue-394分を先にリリースしたい
      • issue-312のリリースは業務上の合意が得られていない(エンドユーザ操作に影響があるため、事前告知した日時でリリースしたいなど)
      • issue-394は不具合修正であり業務上の優先度が高いため、なるべく早くリリースしたい

    同一ファイルを複数

    よく陥りがちな対策としては次の2点が考えられる。

    1. issue-312をリバートする
    2. issue-394のコミットのみをcherry pick してmainブランチにマージする

    1のリバートはGitHubの機能で提供されていることもあり簡単に行えるが、手戻りであることは間違いないし、コミットの履歴が汚れるため、保守運用の視点ではマイナスである。2のcherry pickは操作、管理ともに煩雑でミスが出やすいという課題がある。

    処方箋だが、前提条件によって別の対応策が考えられる。

    1. issue-312のマージがおかしいとするケース
      • 本来想定していたリリーススケジュールから見て、issue-312がdevelopにマージされている状態が正しくないのであれば、issue-312はdevelopにマージせず待機しておくべきだった
      • 誤ってissue-312をマージしてしまったことが原因であれば、リバートを行うことが正しい
    2. issue-394のマージがおかしいとするケース
      • 本来想定していたリリーススケジュールを破って、issue-394を優先してリリースしたいというのであれば、feature ではなく hotfix ブランチで対応すべきであった

    2の例を以下に図示する

    hotfixで追い抜き

    コミットメッセージ規則

    Gitのコミットメッセージは原則自由とする。理由は以下である。

    • 通常、作業はチケット管理システムを駆動に開発するため、情報が重複する
    • リリースノートの自動生成での扱いは、どちらかといえばラベルとPRのタイトルが重要
    • メンバーによっては粒度の小さいコミットを好む場合も多く、運用の徹底化を図る負荷が高い

    チーム規模や特性によっては、Gitのコミットメッセージをルール化する方ことにより、メリットがある場合は Conventional Commits をベースとした以下の規約を推奨する。

    ブランチ命名規則

    ブランチ名の命名規則は、ブランチの種類 章に従うこと。

    タグ規則

    Gitにはタグ機能があり、リリースポイントとしてタグを作成する運用とする。

    これにより、リリースしたアプリケーションやライブラリに何か不具合があれば、切り戻しや原因追求が容易になる利点がある。

    タグの運用ルール

    • リリースごとに新しいバージョンを示したタグを発行する
    • (推奨) GitHubなどの画面経由でタグを作成する
    • mainブランチにてタグを作成する
    • 入力間違えなどのケースを除き、一度タグをつけた後は削除しない
    • 後述する「タグの命名規則」に従う

    GitHub画面でbackend/v1.6.0のタグを作成する

    何かしらの理由で、コマンドラインからタグを作成する必要がある場合は、以下に注意する。画面経由・コマンドライン経由でのタグ作成は混ぜないようにし、運用手順は統一する。

    • 軽量 (lightweight) 版ではなく、注釈付き (annotated) 版のタグを利用する
    sh
    # OK(注釈付きタグを利用する)
    +$ git tag "v1.0.4" -m "v1.0.4 🐛Fix item api log"
    +
    +# NG(軽量タグは利用しない)
    +$ git tag "v1.0.4"

    タグの命名規則

    • v1.2.4 などの セマンティックバージョニング を基本とする
    • モノリポの場合は frontend/v1.0.0backend/v2.0.1 など領域ごとにプレフィックスを付与する形式を取る
      • プレフィックスにすることで、タグをリスト表示した場合に視認性を上げることができる

    命名に従うと、次のようなコマンドで絞り込みで表示できる。

    sh
    $ git tag -l --sort=-version:refname "frontend/v*"
    +frontend/v2.0.0
    +frontend/v1.3.0
    +frontend/v1.2.0
    +frontend/v1.1.0
    +...

    また、Gitクライアントによっては / を使うことでフォルダのように階層表示ができるため、プレフィックスの区切り文字は - ハイフンではなく、スラッシュとする。

    タグメッセージの規則

    • (推奨) GitHubを利用中の場合、「Generate release notes」を用いて、タイトルや本文を自動生成する
    • フロントエンド・バックエンドで整合性を保っているのであれば、メモ目的でバージョンを記載する運用を推奨とする
    • 実用的な利用用途が思いつかない場合は、開発者視点での楽しみリリースの大きなマイルストーンの名称など、チームの関心事を記入することを推奨とする

    create new tag

    何かしらの理由で、コマンドラインからタグを作成する必要がある場合は、GitHub利用時の規則に合わせて次のように作成する。

    入力例:

    sh
    # OK
    +$ git tag -a backend/v1.8.0 -m "backend/v1.8.0"
    +$ git tag -a backend/v1.9.0 -m "backend/v1.9.0 🚀Release with frontend-v3.0.1"
    +$ git tag -a backend/v2.0.0 -m "backend/v2.0.0 ✨Android版アプリリリース対応"
    +
    +# NG
    +$ git tag -a backend/v3.0.0 -m "🚀Release version v2.0.0"

    バージョンアップ規則

    • 開発しているプロダクトがライブラリの場合、セマンティックバージョニングに厳密に従う
    • 開発しているプロダクトがシステム(アプリケーション)の場合、その成熟度や初回リリースの区切りでバージョンアップを行うことを推奨する。適切なバージョンアップを行うことで視認性が上がり、運用負荷を下げることができる
      • 例1: 初回リリース、カットオーバーで v1.0.0 に上げる
      • 例2: 稼働後1年以上経過し、中規模以上の大きな機能アップデートがあったので、 v2.0.0 に上げる

    ラベル規則

    IssueやPRを分類することができるラベルについての利用は自由とする。

    PRに適切なラベルを設定し、 自動生成リリースノート - GitHub Docs に記載があるように .github/release.yml への設定を行うことで、リリースノートの生成をラベル単位にグルーピングできる。

    PRを後で探しやすくするための検索キーとしての位置づけと、リリースノート自動生成という観点でラベルを準備すること。

    ローカルでのGit操作

    gitコマンド

    sh
    # 変更作業
    +git checkout -b <branchname>
    +git add
    +git commit -a
    +
    +# リモートブランチの変更を同期
    +git pull origin develop
    +
    +# コンフリクト対応
    +git add <file1> <file2> ...
    +git commit -a
    +
    +# リモートブランチへプッシュ(pullした際にリベースしているため、オプションは必須である)
    +git push origin HEAD --force-with-lease --force-if-includes

    VS Code

    利用頻度が高いとされるGitクライアントである、VS Code上でのGit操作を紹介する。

    推奨設定

    GitやGitHubb/GitLabの推奨設定をまとめる。本規約にあるGitブランチ運用は、以下の設定が行われている前提で説明している箇所がある。

    git config推奨設定

    git config の推奨設定を紹介する。特にGitワークフローの設定が重要である。

    sh
    # 基礎
    +git config --global user.name "Your Name"
    +git config --global user.email "your_email@example.com"
    +
    +# プロキシ設定(存在する場合)
    +git config --global http.proxy http://id:password@proxy.example.co.jp:8000/
    +git config --global https.proxy http://id:password@proxy.example.co.jp:8000/
    +
    +# プロキシが独自の証明書を持っている場合は、git config http.sslVerify false ではなく、証明書を設定する
    +git config --global http.sslCAInfo ~/custom_ca_sha2.cer
    +
    +# Gitワークフロー
    +git config --global pull.rebase true
    +git config --global rerere.enabled true
    +git config --global fetch.prune true
    +
    +# エイリアス(メンバーそれぞれで別のエイリアスを登録されると、チャットなどのトラブルシュート時に混乱をきすため、ベーシックなものはチームで統一して、認識齟齬を減らす目的で設定を推奨する)
    +git config --global alias.st status
    +git config --global alias.co checkout
    +git config --global alias.ci commit
    +git config --global alias.br branch

    git workflowの補足説明

    • pull.rebase: pull時にリベースする
    • rerere.enabled: コンフリクトの解決を記録しておき、再び同様のコンフリクトが発生した場合に自動適用する
    • fetch.prune: リモートリポジトリで削除されたブランチを削除する

    git-secrets

    git-secretsを用いることで、ユーザーパスワードや AWS アクセスキーなどの機密情報が含まれる可能性のあるコードなどをGit リポジトリに追加されないようにできる。

    本規約の推奨は以下。

    • チームメンバー全員にgit-secretsを導入する

    GitHub推奨設定

    業務利用でのチーム開発を想定しており、リポジトリは以下の条件を満たす前提とする。

    • プライベートリポジトリ
    • Organization配下に作成
    • Teamsプラン以上の有料契約(※プロテクトブランチの機能などを利用するために必要)

    General

    CategoryItemValueMemo
    GeneralRequire contributors to sign off on web-based commitsチェックなし著作権・ライセンス承諾の場合に用いるが、業務アプリ開発では不要
    Default branchdevelop
    Pull RequestsAllow merge commits✅️main <- developなどのマージ時に必要
    Allow squash merging✅️develop <- feature はSquash mergeを推奨
    Allow rebase merging-利用しないため、チェックを外す
    Allow suggest updating pull request branches✅️Pull Request作成後、ベースブランチが更新された場合、ソースブランチの更新を提案してくれる
    Automatically delete head branches✅️マージ後にfeature branchを削除するため有効にする
    PushesLimit how many branches and tags can be updated in a single push5git push origin –mirrorで誤ってリモートブランチを破壊しないようにする。推奨値の5を設定する

    Access

    CategoryItemValueMemo
    Collaborators and teamsChoose a role任意の権限※後述
    • 各ロールの権限については、公式ドキュメントを参照
    • 通常、開発者には「Write」ロールを付与する
    • 開発を行わない、例えばスキーマファイルの参照のみ必要であれば、「Read」権限を、Issueの起票などのみ実施するマネージャーであれば「Triage」ロールを付与する
    • 「Maintain」権限は、付与しない
    • 「Admin」権限は、マネージャークラスに対して合計2~3名を付与し、属人化しないようにする
      • 1名でも、4名以上でもNGとする

    Code and automation

    Branches

    Branch protection rules にdevelop, mainなど永続的なブランチに保護設定を追加する。

    CategoryItemValueMemo
    Protect matching branchesRequire a pull request before merging✅️プルリクエストを必須とする
    Require approvals✅️レビューを必須とする
    Required number of approvals before merging1最低1名以上の承認を必須とする
    Dismiss stale pull request approvals when new commits are pushed-レビュー承認後のPushで再承認を必要とするかだが、レビュー運用上に支障となることも多く、チェックを外す
    Require status checks to pass before merging✅️CIの成功を条件とする
    Require branches to be up to date before merging任意CIパイプラインのワークフロー名を指定
    Require conversation resolution before merging✅️レビューコメントがすべて解決していることを条件とする
    Require signed commits✅️署名付きコミットを必須化し、セキュアな設定にする
    Require linear history✅️/-mainブランチの場合はOFFとするが、developの場合はSquash mergeを求めるため有効にする
    Do not allow bypassing the above settings✅️パイパスを許容しない

    developブランチに対し「require linear history」を選択することを推奨することで、「Create a merge commit」が選択できないようにする。

    また、意図しない方法でのマージを避けるためにブランチごとにマージ戦略を設定しておき、想定外のマージ戦略が選択された時に警告色を表示するというサードパーティ製のChrome拡張[3]も存在する。必要に応じて導入を検討する。

    Tags
    CategoryItemValueMemo
    Protect tagsv[0-9]+.[0-9]+.[0-9]セマンティックバージョニングに則ったタグのみ、削除を防ぐ
    GitHub Actions
    CategoryItemValueMemo
    Actions permissionsAllow asset-taskforce, and select non-asset-taskforce, actions and reusable workflows > Allow actions created by GitHub✅️
    Allow asset-taskforce, and select non-asset-taskforce, actions and reusable workflows > Allow actions Marketplace verified creators✅️
    Code security and analysis
    CategoryItemValueMemo
    DependabotDependabot alerts✅️依存パッケージのアップデートを検知するため
    Dependabot security updates✅️
    Dependabot version updates✅️

    GitLab推奨設定

    • GitHubの「Automatically delete head branches」
      • マージリクエストから「Delete source branch」オプションを有効にすることが該当
      • プロジェクトの設定で「Enable "Delete source branch" option by default」を選択しておくとデフォルトで有効になる

    設定ファイル

    .gitattribute

    チーム開発において開発環境がWindows/Macなど複数存在することは少なくなく、また、Gitリポジトリ上の改行コードは統一した方が余計な差分が生じず扱いやすくなる。このときよく用いるのが、 core.autocrlf という設定である。

    名称設定値チェックアウト時の挙動コミット時の挙動
    core.autocrlftrue改行コードをCRLFに変換改行コードをLFに変換
    input何もしない改行コードをLFに変換
    false何もしない何もしない

    特にWindowsでの開発者の作業ミスを防ぐため、 git config --global core.autocrlf input のような設定を行うチームも多い。

    しかし、上記の設定漏れや手順が増えてしまうため、本規約では .gitattributes での対応を推奨する。

    .gitattributes というファイルをGitリポジトリのルートにコミットしておけば、そのGitリポジトリを使う全員で改行コードの扱いをLFに統一できる。

    sh
    * text=auto eol=lf

    通常、改行コードやインデントの設定はEditorConfigで行うことが多く、 .gitattributes の設定とは重複する。しかし、環境構築ミスなど何らかのトラブルで動作しなかった場合に改行コードミスで特にジュニアクラスのメンバーが困る状況もゼロとは言えないため、本規約では .gitattributes も作成しておくことを推奨する。

    .gitignore

    Gitで管理したくないファイル名のルールを定義する.gitignoreファイルも入れる。ウェブフロントエンドであれば新規プロジェクトを作成すると大抵作成されるのでそれを登録すれば良いが、もしない場合、あるいは複数の言語を使っている場合などはGitHubが提供するテンプレートを元に作成すると良い。GlobalフォルダにはWindows/macOSのOS固有設定や、エディタ設定などもある。

    環境設定を.envで行うのが一般的になってきているが、.env.local.env.dev.localといった.localがついたファイルはクレデンシャルなどの機微な情報を扱うファイルとして定着しているため、 *.localも追加すると良い。

    個人用のファイルをGit管理対象外とする

    .gitignore を用いると、チームでGit対象外とするファイルを一律で設定できる。

    一方で、動作確認用のちょっとしたスクリプトなどで以下の要件が出てくることがある。

    • 個人的にGitリポジトリ配下のフォルダに格納したいが、コミットしたくない(≒自分のローカルリポジトリのみ必要である)
    • あくまで個人用途であるため .gitignore に追記したくない

    上記の場合は、.git/info/exclude を利用することを推奨する。

    参考:

    Pull Request / Merge Request テンプレート

    GitHubやGitLabでは、プルリクエスト作成時のテンプレートを作ることができる。チームでプルリクエストで書いてほしいことを明示的にすることで、レビュー効率の向上や障害調査に役立てることができる。

    GitHubでは .github/PULL_REQUEST_TEMPLATE.md に記載する。(GitLabでは .gitlab/merge_request_templates/{your_template}.md を配置する。)

    テンプレートの例を以下にあげる。

    md
    ## チケットURL
    +
    +## 特に見てほしいレビューポイント
    +
    +## 残課題(別チケットで対応予定の内容、別プルリクエストで対応予定の内容)
    +
    +## 動作確認内容(画面キャプチャなど)
    +
    +## セルフチェックリスト
    +
    +- [ ] 開発規約(DEVELOPMENT.md) を確認した
    +- [ ] Files changed を開き、変更内容を確認した
    +- [ ] コードの変更に伴い、同期必要な設計ドキュメントを更新した
    +- [ ] 今回のPRでは未対応の残課題があればIssueに起票した

    1. https://github.com/github/renaming ↩︎

    2. https://docs.github.com/ja/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors ↩︎

    3. https://zenn.dev/daku10/articles/github-merge-guardian ↩︎

    + + + + \ No newline at end of file diff --git a/documents/forGitBranch/img/branch_strategy_develop.drawio.png b/documents/forGitBranch/img/branch_strategy_develop.drawio.png new file mode 100644 index 00000000..81b0dc88 Binary files /dev/null and b/documents/forGitBranch/img/branch_strategy_develop.drawio.png differ diff --git a/documents/forGitBranch/img/branch_strategy_feature.drawio.png b/documents/forGitBranch/img/branch_strategy_feature.drawio.png new file mode 100644 index 00000000..bd503ec5 Binary files /dev/null and b/documents/forGitBranch/img/branch_strategy_feature.drawio.png differ diff --git a/documents/forGitBranch/img/branch_strategy_hotfix.drawio.png b/documents/forGitBranch/img/branch_strategy_hotfix.drawio.png new file mode 100644 index 00000000..37b4cccb Binary files /dev/null and b/documents/forGitBranch/img/branch_strategy_hotfix.drawio.png differ diff --git a/documents/forGitBranch/img/branch_strategy_multi_develop.drawio.png b/documents/forGitBranch/img/branch_strategy_multi_develop.drawio.png new file mode 100644 index 00000000..70657692 Binary files /dev/null and b/documents/forGitBranch/img/branch_strategy_multi_develop.drawio.png differ diff --git a/documents/forGitBranch/img/branch_strategy_multi_version.drawio.png b/documents/forGitBranch/img/branch_strategy_multi_version.drawio.png new file mode 100644 index 00000000..47e46d3f Binary files /dev/null and b/documents/forGitBranch/img/branch_strategy_multi_version.drawio.png differ diff --git a/documents/forGitBranch/img/branch_strategy_release.drawio.png b/documents/forGitBranch/img/branch_strategy_release.drawio.png new file mode 100644 index 00000000..e77e8d71 Binary files /dev/null and b/documents/forGitBranch/img/branch_strategy_release.drawio.png differ diff --git a/documents/forGitBranch/img/branch_strategy_release_multi_develop.drawio.png b/documents/forGitBranch/img/branch_strategy_release_multi_develop.drawio.png new file mode 100644 index 00000000..fa87e2bf Binary files /dev/null and b/documents/forGitBranch/img/branch_strategy_release_multi_develop.drawio.png differ diff --git a/documents/forGitBranch/img/branch_strategy_topic.drawio.png b/documents/forGitBranch/img/branch_strategy_topic.drawio.png new file mode 100644 index 00000000..2b7daf1b Binary files /dev/null and b/documents/forGitBranch/img/branch_strategy_topic.drawio.png differ diff --git a/documents/forGitBranch/img/create_new_tag.png b/documents/forGitBranch/img/create_new_tag.png new file mode 100644 index 00000000..42b46c5d Binary files /dev/null and b/documents/forGitBranch/img/create_new_tag.png differ diff --git a/documents/forGitBranch/img/create_new_tag_title.png b/documents/forGitBranch/img/create_new_tag_title.png new file mode 100644 index 00000000..b943d45f Binary files /dev/null and b/documents/forGitBranch/img/create_new_tag_title.png differ diff --git a/documents/forGitBranch/img/lightweight_gitbranch_flow.drawio.png b/documents/forGitBranch/img/lightweight_gitbranch_flow.drawio.png new file mode 100644 index 00000000..bfe151ee Binary files /dev/null and b/documents/forGitBranch/img/lightweight_gitbranch_flow.drawio.png differ diff --git "a/documents/forGitBranch/img/lightweight_gitbranch_flow_\345\220\214\346\234\237.drawio.png" "b/documents/forGitBranch/img/lightweight_gitbranch_flow_\345\220\214\346\234\237.drawio.png" new file mode 100644 index 00000000..c0572495 Binary files /dev/null and "b/documents/forGitBranch/img/lightweight_gitbranch_flow_\345\220\214\346\234\237.drawio.png" differ diff --git a/documents/forGitBranch/img/merge_strategy_develop_to_feature.drawio.png b/documents/forGitBranch/img/merge_strategy_develop_to_feature.drawio.png new file mode 100644 index 00000000..cf22db9f Binary files /dev/null and b/documents/forGitBranch/img/merge_strategy_develop_to_feature.drawio.png differ diff --git a/documents/forGitBranch/img/merge_strategy_develop_to_feature_merge.drawio.png b/documents/forGitBranch/img/merge_strategy_develop_to_feature_merge.drawio.png new file mode 100644 index 00000000..13ee6282 Binary files /dev/null and b/documents/forGitBranch/img/merge_strategy_develop_to_feature_merge.drawio.png differ diff --git a/documents/forGitBranch/img/merge_strategy_develop_to_feature_rebase.drawio.png b/documents/forGitBranch/img/merge_strategy_develop_to_feature_rebase.drawio.png new file mode 100644 index 00000000..415231d0 Binary files /dev/null and b/documents/forGitBranch/img/merge_strategy_develop_to_feature_rebase.drawio.png differ diff --git a/documents/forGitBranch/img/merge_strategy_feature_to_develop_merge_commit.drawio.png b/documents/forGitBranch/img/merge_strategy_feature_to_develop_merge_commit.drawio.png new file mode 100644 index 00000000..dee061da Binary files /dev/null and b/documents/forGitBranch/img/merge_strategy_feature_to_develop_merge_commit.drawio.png differ diff --git a/documents/forGitBranch/img/merge_strategy_feature_to_develop_rebase_and_merge.drawio.png b/documents/forGitBranch/img/merge_strategy_feature_to_develop_rebase_and_merge.drawio.png new file mode 100644 index 00000000..a57b23fa Binary files /dev/null and b/documents/forGitBranch/img/merge_strategy_feature_to_develop_rebase_and_merge.drawio.png differ diff --git a/documents/forGitBranch/img/merge_strategy_feature_to_develop_squash_and_merge.drawio.png b/documents/forGitBranch/img/merge_strategy_feature_to_develop_squash_and_merge.drawio.png new file mode 100644 index 00000000..54ac3816 Binary files /dev/null and b/documents/forGitBranch/img/merge_strategy_feature_to_develop_squash_and_merge.drawio.png differ diff --git a/documents/forGitBranch/img/merge_strategy_feature_to_develop_squash_and_merge_gitlab.drawio.png b/documents/forGitBranch/img/merge_strategy_feature_to_develop_squash_and_merge_gitlab.drawio.png new file mode 100644 index 00000000..cb99f085 Binary files /dev/null and b/documents/forGitBranch/img/merge_strategy_feature_to_develop_squash_and_merge_gitlab.drawio.png differ diff --git a/documents/forGitBranch/img/release_overtaking.drawio.png b/documents/forGitBranch/img/release_overtaking.drawio.png new file mode 100644 index 00000000..32fef1a8 Binary files /dev/null and b/documents/forGitBranch/img/release_overtaking.drawio.png differ diff --git a/documents/forGitBranch/img/release_overtaking_hotfix.drawio.png b/documents/forGitBranch/img/release_overtaking_hotfix.drawio.png new file mode 100644 index 00000000..b2e76709 Binary files /dev/null and b/documents/forGitBranch/img/release_overtaking_hotfix.drawio.png differ diff --git a/documents/forGitBranch/img/vscode_git_branch1.png b/documents/forGitBranch/img/vscode_git_branch1.png new file mode 100644 index 00000000..a4a33907 Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_branch1.png differ diff --git a/documents/forGitBranch/img/vscode_git_branch2.png b/documents/forGitBranch/img/vscode_git_branch2.png new file mode 100644 index 00000000..d5d72572 Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_branch2.png differ diff --git a/documents/forGitBranch/img/vscode_git_clone1.png b/documents/forGitBranch/img/vscode_git_clone1.png new file mode 100644 index 00000000..a9dacc08 Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_clone1.png differ diff --git a/documents/forGitBranch/img/vscode_git_clone2.png b/documents/forGitBranch/img/vscode_git_clone2.png new file mode 100644 index 00000000..872adf5a Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_clone2.png differ diff --git a/documents/forGitBranch/img/vscode_git_commit.png b/documents/forGitBranch/img/vscode_git_commit.png new file mode 100644 index 00000000..1b5e19ae Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_commit.png differ diff --git a/documents/forGitBranch/img/vscode_git_fetch1.png b/documents/forGitBranch/img/vscode_git_fetch1.png new file mode 100644 index 00000000..80018ddc Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_fetch1.png differ diff --git a/documents/forGitBranch/img/vscode_git_fetch2.png b/documents/forGitBranch/img/vscode_git_fetch2.png new file mode 100644 index 00000000..55c46887 Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_fetch2.png differ diff --git a/documents/forGitBranch/img/vscode_git_graph1.png b/documents/forGitBranch/img/vscode_git_graph1.png new file mode 100644 index 00000000..2a4c41a6 Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_graph1.png differ diff --git a/documents/forGitBranch/img/vscode_git_graph2.png b/documents/forGitBranch/img/vscode_git_graph2.png new file mode 100644 index 00000000..f9125fd4 Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_graph2.png differ diff --git a/documents/forGitBranch/img/vscode_git_push1.png b/documents/forGitBranch/img/vscode_git_push1.png new file mode 100644 index 00000000..e14596e2 Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_push1.png differ diff --git a/documents/forGitBranch/img/vscode_git_push2.png b/documents/forGitBranch/img/vscode_git_push2.png new file mode 100644 index 00000000..7021a219 Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_push2.png differ diff --git a/documents/forGitBranch/img/vscode_git_push3.png b/documents/forGitBranch/img/vscode_git_push3.png new file mode 100644 index 00000000..bc43dab5 Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_push3.png differ diff --git a/documents/forGitBranch/img/vscode_git_stage.png b/documents/forGitBranch/img/vscode_git_stage.png new file mode 100644 index 00000000..d7065430 Binary files /dev/null and b/documents/forGitBranch/img/vscode_git_stage.png differ diff --git a/documents/forGitBranch/index.html b/documents/forGitBranch/index.html new file mode 100644 index 00000000..5598f5ac --- /dev/null +++ b/documents/forGitBranch/index.html @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Gitブランチフロー規約

    Future Enterprise Standards for Git branch flow

    Gitブランチフロー規約

    チーム開発する上で必要となるGitブランチフローの規約です。

    次のリンクから単一ファイル版を取得できます。

    ファイルはPandocを利用して作成しています。

    + + + + \ No newline at end of file diff --git a/documents/forGitBranch/merge_develop_to_feature.html b/documents/forGitBranch/merge_develop_to_feature.html new file mode 100644 index 00000000..ed911d48 --- /dev/null +++ b/documents/forGitBranch/merge_develop_to_feature.html @@ -0,0 +1,71 @@ + + + + + + 機能ブランチに開発ブランチの変更を取り込む方法 | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    機能ブランチに開発ブランチの変更を取り込む方法

    機能ブランチに対して開発ブランチの変更を取り込む方法は「マージ」「リベース」2つの方法が考えられる。

    1. マージコミット

    マージとは get fetch & git merge コマンド( = git pull コマンド)を使用して、開発ブランチの変更を機能ブランチに取り込む方法を指す。 マージを行った場合は下記の通り、「マージコミット」が作成される。

    マージ

    bash
    # 現在のブランチは 機能(feature/A)ブランチ
    +$ git branch
    +  develop
    +* feature/A
    +
    +# リモート追跡ブランチの最新化
    +$ git fetch
    +
    +# 開発(develop)ブランチの変更を機能(feature/A)ブランチにマージ
    +$ git merge develop

    2. リベース

    リベースとは get fetch & git rebase コマンド( = git pull --rebase コマンド)を使用して、開発ブランチの変更を機能ブランチに取り込む方法を指す。 最新の開発ブランチの先頭から新たにコミットを作りなおす動きになるので、マージによる方法と異なり「マージコミット」は作成されない。

    リベース

    bash
    # 現在のブランチは 機能(feature/A)ブランチ
    +$ git branch
    +  develop
    +* feature/A
    +
    +# リモート追跡ブランチの最新化
    +$ git fetch
    +
    +# 機能(feature/A)ブランチを開発(develop)ブランチにリベース
    +$ git rebase develop
    + + + + \ No newline at end of file diff --git a/documents/forGitBranch/merge_feature_to_develop.html b/documents/forGitBranch/merge_feature_to_develop.html new file mode 100644 index 00000000..6b12dc1b --- /dev/null +++ b/documents/forGitBranch/merge_feature_to_develop.html @@ -0,0 +1,58 @@ + + + + + + 開発ブランチに機能ブランチの変更を取り込む方法 | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    開発ブランチに機能ブランチの変更を取り込む方法

    GitHubの場合

    プルリクエストを経由して、開発が完了した機能ブランチをメインの開発ブランチに取り込むためには、GitHub(GitLab)上でプルリクエスト(マージリクエスト)を経由する運用を前提とする。

    GitHubを利用する場合、開発ブランチに機能ブランチの変更を取り込む方法は3種類ある。

    1. スカッシュ マージ(Create a merge commit)
    2. リベース(Rebase and merge)
    3. スカッシュマージ(Squash and merge)

    1. マージコミット

    動作としては git merge --no-ff コマンドを使用して、機能ブランチの変更を取り込む形になる。
    この方法を選択した場合は、下記のとおり、メインの開発ブランチにマージコミットが作成される。

    Merge Commit

    2. リベース

    動作としては機能ブランチを最新の開発ブランチにリベースした後に、git merge --ff コマンドを使用して、機能ブランチの変更を取り込む形になる。
    この方法を選択した場合は、下記のとおり、メインの開発ブランチにマージコミットは作成されず、履歴が一直線になる。

    Rebase and Merge

    3. スカッシュマージ

    動作としては git merge --squash コマンドを使用して、機能ブランチの変更を取り込む形になる。
    この方法では、機能ブランチで行った変更YとZを1つにまとめたコミットがメインの開発ブランチに作成されます。

    Squash and Merge

    GitLabを利用するの手順

    開発ブランチに機能ブランチの変更を取り込む方法は3種類ある。
    ただし、マージリクエスト上のオプションによってコミット履歴が変わるため、別途記載する。

    1. Merge commit
    2. Merge commit with semi-linear history
    3. Fast-forward merge

    1. Merge commit

    動作としては、GitHubにおける Create a merge commit と同様のマージ方法になる。
    ただし、マージリクエスト上で Squash commits を選択してマージした場合、squash commitmerge commit の2つのコミットが作成されるため注意する。

    Merge commit with squash commits

    bash
    # マージ方法で Merge commit を選択して、マージリクエスト上で Squash commits オプションを選択してマージした場合
    +git checkout `git merge-base feature/A develop`
    +git merge --squash feature/A
    +SOURCE_SHA=`git rev-parse HEAD`
    +git checkout develop
    +git merge --no-ff $SOURCE_SHA

    2. Merge commit with semi-linear history

    動作としては、前述の Merge commit と同じコマンドを使用して、機能ブランチの変更を取り込む形になる。
    この方法を選択した場合は、ソースブランチがターゲットブランチより古い場合はリベースしないとマージできない。

    3. Fast-forward merge

    動作としては、GitHubにおける Rebase and merge と同様のマージ方法になる。
    ただし、マージリクエスト上で Squash commits を選択してマージした場合、GitHubにおける Squash and merge と同様のマージ方法になる。

    + + + + \ No newline at end of file diff --git a/documents/forGitBranch/vscode_git_ope.html b/documents/forGitBranch/vscode_git_ope.html new file mode 100644 index 00000000..8e5ce2eb --- /dev/null +++ b/documents/forGitBranch/vscode_git_ope.html @@ -0,0 +1,52 @@ + + + + + + VSCode上でのGit操作 | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    VSCode上でのGit操作

    利用頻度が高いとされるVS CodeでのGit操作を紹介する。

    VSCode上でのGit操作は、サイドバーの "Source Control" から行うことができる。ほとんど全ての操作はコマンドパレットからも実行可能だが、説明は割愛する。

    推奨する拡張機能

    GUIでのGit操作にあたり、次の2つの拡張機能をインストールしておくと利便性が高い。業務上はほぼ必須と見て良い。

    以降では、これらの拡張機能がインストールされていることを前提に説明を行う。

    リポジトリのクローン (git clone)

    サイドバー > Explorer か Source Control > Clone Repository ボタンをクリックし、URLを入力すると、リポジトリをクローンできる。

    Clone1 Clone2

    コミットグラフの表示

    SOURCE CONTROL パネル > 黒丸のグラフアイコン (View Git Graph (git log)) をクリックすると、コミットグラフを表示できる。

    白丸のグラフアイコン (Show Commit Graph) はGitLensのコミットグラフだが、冒頭の記述通り、Pro版でのみの提供となる。

    Graph1 Graph2

    リモートのフェッチ/プル (git fetch / git pull)

    以下のいずれかの操作を実行すると、リモートリポジトリをフェッチできる。

    • SOURCE CONTROL パネル > 三点リーダーアイコン (More Actions...) をクリックし、 Fetch を選択
    • コミットグラフ > 雲アイコン (Fetch from Remote(s)) をクリック

    Fetch1

    なお、フェッチ後に以下のようなダイアログが表示される場合があるが、 "Yes" を選択すると、自動で定期的にフェッチを行う。

    Fetch2

    [TODO] プルを追記する。

    ブランチの作成/チェックアウト (git branch / git checkout)

    以下のいずれかの操作を実行すると、ブランチを作成できる。

    • SOURCE CONTROL パネル > 三点リーダーアイコン (More Actions...) をクリックし、Branch > Create Branch... を選択
      • 現在チェックアウトしているブランチから新規ブランチが作成されますが、Create Branch From... を選択すると、作成元のブランチを選択することができる
      • 作成したブランチに自動的にチェックアウトする
    • コミットグラフ > 作成元コミットの行上で右クリックし、Create Branch... を選択
      • "Check out" にチェックを入れると、作成したブランチにチェックアウトする

    Branch1 Branch2

    [TODO] チェックアウトを追記する。

    ステージ/コミット/プッシュ (git add / git commit / git push)

    SOURCE CONTROL パネル > 変更ファイルの行 > +アイコン (Stage Changes) をクリックすると、対象ファイルをステージできる。(Changes > +アイコン (Stage All Changes) をクリックすると、すべての変更をステージする)

    Stage

    必要な変更をステージ後、 SOURCE CONTROL パネル内でコミットメッセージを入力し、 Commit ボタンをクリックすると、コミットを作成できる。

    Commit

    以下のいずれかの操作を実行すると、作成したコミットをリモートリポジトリにプッシュできる。

    • SOURCE CONTROL パネル > 三点リーダーアイコン (More Actions...) をクリックし、Push を選択
    • BRANCHES パネル > 対象ブランチの行 > 雲アイコン (Publish Branch) をクリック
    • コミットグラフ > 対象ブランチの上で右クリックし、Push Branch... を選択

    push1 push2 push3

    リバート (git revert)

    TODO

    マージ (git merge)

    TODO

    リベース (git rebase)

    TODO

    スタッシュ (git stash)

    TODO

    + + + + \ No newline at end of file diff --git "a/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.html" "b/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.html" new file mode 100644 index 00000000..cc371bd9 --- /dev/null +++ "b/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.html" @@ -0,0 +1,813 @@ + + + + + + Javaコーディング規約 | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Javaコーディング規約

    Future Enterprise Coding Standards

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    一般に利用・参照されている Java コーディング規約やガイドラインを以下に示す。本規約の作成においても、下記規約類を参照・抜粋している。

    規約著作者URL
    Code Conventions for the Java Programming LanguageSun Microsystemshttp://www.oracle.com/technetwork/java/codeconvtoc-136057.html
    Writing Robust Java CodeScott W. Amblerhttp://www.ambysoft.com/downloads/javaCodingStandards.pdf
    オブジェクト倶楽部版 Java コーディング標準オブジェクト倶楽部http://objectclub.jp/community/codingstandard/CodingStd.pdf
    電通国際情報際サービス版 Java コーディング規約 2004電通国際情報サービスhttp://objectclub.jp/community/codingstandard/JavaCodingStandard2004.pdf
    JJGuideline (Java - J2EE Conventions and Guidelines)Stephan.J & JCS Teamhttp://www.fedict.belgium.be/sites/default/files/downloads/Java_J2EE_conventions_and_guidelines_EN.pdf
    Google Java Style (非公式和訳)Googlehttps://kazurof.github.io/GoogleJavaStyle-ja/
    Acroquest Technology Java コーディング規約Acroquest Technologyhttps://www.acroquest.co.jp/webworkshop/javacordingrule/Acroquest_JavaCodingStandard_6_7.pdf
    ※現在は削除されています

    ※ Sun Microsystems の規約は Java 草創期から一応の標準という位置づけだったが、オブジェクト指向、及び、その開発環境の普及・発展によって、設計やコーディングにおいて、直接的に有用な知識や豊富な指針を含むような優れた規約や、ツールなどによる機械的な準拠チェックと連携する規約が普及してきている。

    規約の重要性

    標準としての規約を定義し、遵守することの重要性を以下に示す。

    • ソフトウェアメンテナンスにおける、可読性・保守性・拡張性の向上
    • 問題を起こしやすい実装を未然に回避することによる、品質・生産性の向上
    • 標準規約を通して得られる一般的な実装知識やノウハウ(=学習効果)

    コーディングの心得

    長いプログラムを記述すること(ステップ数)によって生産性が評価されたのは、過去の時代の出来事である。現在は、クラスやメソッドの役割が明確で、ロジックが読みやすく、保守性に優れたプログラムを記述することが評価される。コーディング規約は、コードの書き方に関する一種のパターンと考えることもでき、コードの保守性を向上させる具体的な方法を示している。したがって、規約の一つ一つの意図を理解し、守ることが重要になる。しかし、保守性に優れたコードを作成するためには、コーディング規約を守ることに加えて、良いコードを記述するための基本的な心構えをしっかり心に留めておく必要がある。以下では、その心得について述べる。

    【コーディングの心得 5 か条】

    1. 見やすさを重視せよ
    2. ネーミングはわかりやすく
    3. サンプルを鵜呑みにしない
    4. 同じコードを二度書かない
    5. 役割は一つに

    見やすさを重視せよ

    「良いコード」の基本は、「他の人が読んでもわかりやすいと感じられるコード」。コードの見やすさは、フォーマットはもちろん、ロジックの簡潔さや API の常識的な使い方などから生まれる。コーディングにあたっては、常に他の人の視点を意識しながら、見やすさに気を配って記述する必要がある。例えば、自分で記述したコードであっても、しばらくたってから読み返してみると理解に時間がかかった経験は誰にもあるはず。「3 日前に書いたコードは他人のコードと同じ」ということもよく言われる。見やすさを重視することは、他の人のためだけでなく自分のためにもなる。コードを読んでもすぐに理解できないような実装は、再考(リファクタリング)の必要がある。

    ネーミングはわかりやすく

    コーディングでは、様々な変数やメソッドなどにネーミング(名前付け)する必要がある。ネーミングとは、本来、その対象の本質を表すような名前を考える作業である。大変難易度の高い作業だが、一方で適当に行ってもコードの動作は変わらないため、人によっては手を抜きがちとなる。しかし、ネーミングの良し悪しは、コードの可読性に非常に大きな影響を及ぼす。例えば、「C0001」というクラス名があるとする。これでは、何を表すクラスなのかすぐにはわからないだろう。また、「int p = 5000;」という記述があるとする。プログラマに聞くと、変数名 p は価格(Price)の略だと言うのだが、それならば略さずに、「int price = 5000;」としたほうが分かりやすいはずである。「ネーミングはわかりやすく」の背景には、読んで内容が理解できるという意味で、文章のようなプログラミングを行う、という考え方に基づく。

    サンプルを鵜呑みにしない

    サンプルコードを活用すること自体は、著作権等を侵害しなければ問題ない。問題なのは、その内容や背景を理解しないまま、サンプルコードだけを鵜呑みにして、「おまじない」として表面的に適用してしまうことである。コードを「おまじない」ととらえていては、サンプルコードの間違いを気づかないまま適用してしまうこともある。例えば、ストリームのクローズ処理を行っていないサンプルコードであっても、それに気づかずに自分のコードに適用してしまい、後で思わぬ障害を引き起こすという可能性がある。サンプルコードは、そこで説明する内容に絞ったコードが多いため、このような例はよく見られる。また、サンプルコードをそのまま適用した結果、自分が記述すべきコードには必要のないコードが含まれてしまう場合もある。その場合、コードの可読性を下げる原因となる。自分のコードは、自分で深く理解して記述すべきである。

    同じコードは二度書かない

    コードをコピー・ペーストしていませんか?コピー・ペーストしてしまうと、何らかの修正をする際に、全ての個所に同じ修正をする羽目になる。同じコードが現れるようならまとめて一つにし、外に出してコールするような書き方にすべきである。同じコードをまとめる作業は、どちらかといえば、コーディング時よりリファクタリング(ソフトウェアの外部的振る舞いを変更せずに内部構造を改善する作業)で行われることが多い。しかし、コーディング時からできるだけ気をつけておきたいことでもある。

    役割は一つに

    メソッドの役割が明確で、かつ 1 つであれば単体テストが行いやすくなる。つまり、コードの「試験性」が高まる。また、役割が一つであれば、後でコードを変更する際に修正箇所がわかりやすいため、障害修正に要する時間が短くなる。つまり、コードの「保守性」があがることになる。例えば、「チェックをして実行する」機能を実現するために、checkAndDo()メソッドが存在したとする。この場合、このメソッドは check()メソッドと do()メソッドに分割すべきである。なぜなら、checkAndDo()メソッドの check()ロジックに誤りがあった場合、do()メソッドに書かれる内容まで把握する必要が生じるためである。分割してあれば、check()メソッドだけの変更で済む。このことはクラスの設計にもあてはまる。

    ネーミング規約

    全般

    • 大文字・小文字の違いで名前を区別しない。

      良い例:

      java
      private int carNumber;
      +private int trainNumber;

      悪い例:

      java
      private int num;
      +private int Num;

    パッケージ

    • パッケージ名はすべて小文字にする
    • パッケージ名は意味のある名前にする
    • サブパッケージ名の重複は可能

    クラス

    • クラス名は単語の先頭を大文字にする
      良い例:

      java
      public class Entry {

      悪い例:

      java
      public class entry {
    • インターフェース名、Enum 名、Record 名はクラス名に準ずる

    メソッド

    • コンストラクタと同じ名前のメソッドはつくらない

    • メソッド名は区切りのみ大文字にする
      良い例:

      java
      public String getName() {
      +    //・・・
      +}

      悪い例:

      java
      public String getname() {
      +    //・・・
      +}
      +public String GETNAME() {
      +    //・・・
      +}
    • 変換メソッド名は「"to"+オブジェクト名」にする
      良い例:

      java
      public String toString() {

      悪い例:

      java
      public String string() {
    • ゲッターメソッド名は「"get"+属性名」にする
      型がbooleanの場合は「"is"+属性名」にする

    • セッターメソッド名は「"set"+属性名」にする

    • boolean変数を返すメソッド名はtrue/falseの状態がわかるようにする

      良い例:

      java
      public boolean isAsleep() {
      +}
      +public boolean exists() {
      +}
      +public boolean hasExpired() {
      +}

    引数

    • メソッドのパラメータ名とインスタンス変数名を一緒にしない
      ただし、アクセサメソッドやコンストラクタなど、統合開発環境の機能により自動生成するものに関しては可とする。
      アンダースコア _ をつけての区別は原則禁止とする。

      良い例:

      java
      public double calc(double rate) {
      +    return this.value * rate;
      +}

      悪い例:

      java
      public double calc(double value) {
      +    return this.value * value;
      +}
      +
      +public double calc(double _value) {
      +    return this.value * _value;
      +}

    変数全般

    • boolean変数はtrue/false の状態がわかるようにする

      良い例:

      java
      private boolean isOpen;

      悪い例:

      java
      private boolean flag;
    • 定数は全てstatic finalとし、すべて大文字、区切りは"_"

      良い例:

      java
      private static final String SYSTEM_NAME = "販売管理システム";
    • 変数名は小文字とし、単語の区切りのみ大文字にする

      良い例:

      java
      private String thisIsString;

      変数名に固有名詞が含まれる場合、先頭をのぞき、単語の区切り以外に大文字を使用してもよい

      良い例:

      java
      private String thisIsIPAddress;

    ローカル変数

    • スコープが狭い変数名は省略した名前でもよい
      良い例:

      java
      if (・・・) {
      +    String s = "・・・・";
      +   //変数sを利用した処理 数行
      +}

      悪い例:

      java
      String s = "・・・・";
      +if (・・・) {
      +   //変数sを利用した処理
      +}
      +・・・
      +if (・・・) {
      +   //変数sを利用した処理
      +}

      変数sの利用範囲が広いので役割が明確になる変数名に変更する。

    • for 文のループカウンタは、ネストごとに"i","j","k"・・・を使う

    Enum

    • Enum 名はクラス名と同じく、単語の先頭を大文字にする

    • 列挙定数は定数と同じく、すべて大文字、区切りは"_"

      良い例:

      java
      enum Season {
      +    WINTER,
      +    SPRING,
      +    SUMMER,
      +    FALL
      +}

      悪い例:

      java
      enum Season {
      +    winter,
      +    spring,
      +    summer,
      +    fall
      +}

    コーディング規約

    全般

    • 原則としてオブジェクトの参照にはインターフェースを利用する
      オブジェクトを参照する際は、そのオブジェクトの実装クラスを用いて宣言できるが、実装クラスに適切なインターフェースが存在している場合は、必ずインターフェースを用いて宣言すること。

      良い例:

      java
      List<Entry> list = new ArrayList<>();
      +Map<String, String> map = new HashMap<>();

      悪い例:

      java
      ArrayList<Entry> list = new ArrayList<>();
      +HashMap<String, String> map = new HashMap<>();
    • 推奨されない API を使用しない
      アノテーション@Deprecatedで指定されたメソッドは利用しないこと。

    • 使われないコードは書かない

    • 宣言は適切な権限で行うこと(public, protected, private

    • final を適切に利用する
      継承されないクラス、オーバーライドされないメソッド、値の変わらない変数(つまり定数)等、変化のないもの/変化させたくないものについてはfinal で宣言する。

      良い例:

      java
      //継承されないクラス
      +public final class CalculateUtils {
      +    //・・・
      +}
      +
      +//値の変わらない変数(定数)
      +private static final String MESSAGE = "・・・";
      +
      +//オーバーライドされないメソッド
      +public final int sum(/*変化させたくない値*/final int... values) {
      +    int sumValue = 0;
      +    for (/*変化させたくない値*/final int value : values) {
      +        sumValue += value;
      +    }
      +    return sumValue;
      +}

    フォーマット

    • インデントは空白文字 4 文字分の Tab を使用する

    • 長すぎる行は避ける

    • { の後にステートメントを記述しない
      良い例:

      java
      if (s == null) {
      +    return 0;
      +}

      悪い例:

      java
      if (s == null) {return 0;}
    • 1 行に 2 つ以上のステートメントを記述しない
      悪い例:

      java
      } catch (Exception e) {
      +    log.error("Error", e);return null;
      +}
    • カンマの後には空白文字を
      良い例:

      java
      process(x, y, z);

      悪い例:

      java
      process(x,y,z);
    • 代入演算子( = , += , -= , …)の前後には空白文字を挿入する
      良い例:

      java
      int a = x;
      +a += 10;

      悪い例:

      java
      int a=x;
      +a+= 10;
    • for 文内のセミコロンの後には空白文字を挿入する
      良い例:

      java
      for (int i = 0; i < array.length; i++) {
      +    //・・・
      +}

      悪い例:

      java
      for (int i = 0;i < array.length ;i++) {
      +    //・・・
      +}
    • ++-- とオペランドの間には空白文字を入れない
      良い例:

      java
      i++;

      悪い例:

      java
      i ++;
    • ビット演算子( |&^<<>> )の前後には空白文字を挿入する

    • 論理演算子( ||&&)の前後には空白文字を挿入する

    • 関係演算子( <>>=<===!= )の前後には空白文字を挿入する

    • 算術演算子( /% )の前後には空白文字を挿入する

    • return 文ではカッコを使わない
      良い例:

      java
      int answer = (a + b + c) * d;
      +return answer;

      悪い例:

      java
      return ((a + b + c) * d);
    • if などの条件式で boolean の変数を比較しない

      良い例:

      java
      if (hasStock)

      悪い例:

      java
      if (hasStock == true)
    • 不等号の向きは左向き( <<= )にする
      良い例:

      java
      if (from <= x && x <= to) {

      悪い例:

      java
      if (x >= from && x <= to) {

    コメント

    • ファイルの先頭への Copyright の表記について
      ソースのファイルヘッダにコピーライト標記は法的拘束力がないため、不要とする。
      ただし、顧客からの要求があった場合を除く。

    • Javadoc コメントには、少なくとも author と version(クラス)、param と return と exception(メソッド)を記述する

      • 今後もバージョンアップのリリースが予定されているソースでは、上記に加えて since(バージョン)を記述する
      • @Overrideのあるメソッドでは、上記に加えて{@Inherit}を記述する
    • Javadoc  クラスヘッダコメントのフォーマットは以下の通り

      良い例:

      java
      /**
      + * Action(or Bean)クラス メニュー名称
      + *
      + * @author 姓 名
      + * @version バージョン YYYY/MM/DD 説明
      + */
    • コメントは必要なものだけを簡潔に
      悪い例:

      java
      /**
      + * 文字列に変換
      + */
      +@Override
      +public String toString() {
      +
      +/**
      + * コピー
      + *
      + * @return コピーしたインスタンス
      + */
      +public Entry copy() {
    • 不要なコメントは記載しない

      • コードからすぐわかること・冗長なコメント
      • 名前の説明
        コメントではなくわかりやすい名前を付ける。
      • 別システムで管理している内容
        ソースコード管理システム、バグトラッキングシステムで管理している内容はソースコードにコメントで記載する必要はない。
        • コメントアウトされたコード
          ソースコード管理システムで管理されている

    インポート

    • java.langパッケージはインポートしない

      悪い例:

      java
      import java.lang.String;//必要のない記述
    • 原則として static インポートしない
      JUnit の作成やフレームワークとして static インポートが推奨されるような場合は利用してもよい

    • 原則としてオンデマンドのインポート宣言(type-import-on-demand declaration)(アスタリスク*によるインポート) は行わない

      悪い例:

      java
      import java.util.*;

    コンストラクタ

    • public 宣言していないクラスにはpublic権限のコンストラクタを作らない
      良い例:

      java
      class Entry {
      +    //・・・
      +    Entry(int id) {
      +        //・・・
      +    }

      悪い例:

      java
      class Entry {
      +    //・・・
      +    public Entry(int id) {
      +        //・・・
      +    }
    • インスタンスメンバを持たない(static メンバのみの)クラスは、private権限のコンストラクタを作成する

    メソッド

    • オーバーライドさせたくないメソッドはfinalを利用する

    • 戻り値が配列のメソッドで、戻る配列のサイズが 0 の場合、メソッドを使用するクライアントの余計な null チェックのロジックを回避するため、null ではなく長さゼロの配列を戻すようにする。 良い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return ArrayUtils.EMPTY_STRING_ARRAY;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return Collections.emptyList();
      +    }
      +    return List.of(s);
      +}

      悪い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return List.of(s);
      +}
    • メソッドは 1 つの役割にする

    クラスメソッド

    • クラスメソッドを利用するときは、クラス名を使って呼び出す
      良い例:

      java
      int comp = Integer.compare(x, y);

      悪い例:

      java
      Integer a = //
      +int comp = a.compare(x, y);

    変数全般

    • 1 つのステートメントには 1 つの変数宣言
      良い例:

      java
      /** 科目コード */
      +private String code;
      +/** 科目名 */
      +private String name;
      +/** 科目略名 */
      +private String shortName;

      悪い例:

      java
      private String code, name, shortName;
    • リテラルは使用しない
      リテラルとは、コード中に、表現が定数として直接現れており、記号やリストで表現することができないものを指す(数値、文字列両方含む 通称マジックナンバー)。コードの可読性・保守性の低下を防ぐために、リテラル定数(static final フィールド)を使用すること。
      例外:-1,0,1 等をカウント値としてループ処理等で使用するような場合

      良い例:

      java
      private static final double ONE_MILE_METRE = 1609.344;
      +
      +public double mileToMetre(double mi) {
      +    return mi * ONE_MILE_METRE;
      +}

      悪い例:

      java
      public double mileToMetre(double mi) {
      +    return mi * 1609.344;
      +}
      • リテラル定数の名前はその値の意味を正しく表現したものにする

        悪い例:

        java
        private static final int ZERO = 0;
    • 配列宣言は「型名[]」にする

      良い例:

      java
      private int[] sampleArray = new int[10];

      悪い例:

      java
      private int sampleArray[] = new int[10];
    • できるだけローカル変数を利用する
      ローカル変数で事足りるものをインスタンス変数として利用するなど、必要のないインスタンス変数を定義すると、パフォーマンスや可読性の低下やの大きな要因となる上、マルチスレッドを意識した際に不整合がおきる可能性があるので、インスタンス変数は必要性を充分に考慮してから使用すること。

    • 定数はfinalで宣言する

    • ローカル変数とインスタンス変数を使いわける

    定数

    • public で宣言するクラス変数とインスタンス変数は、定数のみとし、 static final で定義する
      final ではない static な定数は作成しない。

      良い例:

      java
      public static final String PROTOCOL_HTTP = "http";
    • 定数( static フィールド)に、 static ではないメソッドから書き込まない

    • 定数は、プリミティブ型もしくは、不変(Immutable)オブジェクトで参照する

      • 不変Listの生成にはList.of()を利用する

        良い例:

        java
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);

        悪い例:

        java
        public static final List<Integer> VALUES = Arrays.asList(1, 2, 3, 4, 5);
      • 不変Setの生成にはSet.of()を利用する

      • 不変Mapの生成にはMap.of()を利用する

        良い例:

        java
        public static final Map<Integer, String> VALUES_MAP = Map.of(1, "A", 2, "B", 3, "C");

        悪い例:

        java
        public static final Map<Integer, String> VALUES_MAP = new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +};
      • 不変な配列インスタンスは長さ 0 の配列以外は生成不可能なため、外部から参照される(public)定数では利用せず、List等への置き換えをすること

        良い例:

        java
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);

        悪い例:

        java
        public static final int[] VALUES = { 1, 2, 3, 4, 5 };

    インスタンス変数

    • インスタンス変数はprivateにする

      良い例:

      java
      public class Employee {
      +    private long id;
      +
      +    //・・・
      +    //getter/setter
      +}

      悪い例:

      java
      public class Employee {
      +    public long id;
      +
      +    //・・・
      +    //getter/setter
      +}

    クラス変数

    • public static final 宣言した配列を利用しない
      ※「定数」を参照

    • クラス変数にはクラス名を使用してアクセスすること

      良い例:

      java
      BigDecimal b = BigDecimal.ZERO;

      悪い例:

      java
      BigDecimal a = //
      +BigDecimal b = a.ZERO;

    ローカル変数

    • ローカル変数は利用する直前で宣言する
      行間の程度にもよるが、ある程度まとめて宣言するのは OK とする。

      良い例:

      java
      for (int i = 0; i < lines.length; i++) {
      +    String line = lines[i];
      +    //lineの処理
      +}

      悪い例:

      java
      String line;
      +for (int i = 0; i < lines.length; i++) {
      +    line = lines[i];
      +    //lineの処理
      +}
    • ローカル変数は安易に再利用しない
      一度宣言したローカル変数を、複数の目的で安易に使いまわさないこと。ローカル変数は、役割ごとに新しいものを宣言して初期化することにより、コードの可読性・保守性の向上、及びコンパイラの最適化の促進をはかる。

    引数

    • メソッド引数への代入は行わない
      原則としてfinalで宣言する。

      良い例:

      java
      public void add(final int value) {
      +    //・・・
      +}

    継承

    • スーパークラスのインスタンス変数をサブクラスでオーバーライドしない
      スーパークラスと同じ名前のフィールドをサブクラスで宣言しないこと。 同じ名前のフィールドを宣言すると、スーパークラスのフィールドはサブクラスで宣言されたフィールドによって隠ぺいされてしまうので、他の人の混乱を招くことを防ぐため重複する名前は付けないこと。

      悪い例:

      java
      public class Abs {
      +    protected String name;
      +}
      +
      +public class Sub extends Abs {
      +    protected String name;//Abs#nameは隠ぺいされる
      +}
    • スーパークラスのメソッドをオーバーライドするときは@Override アノテーションを指定する。

      良い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    @Override
      +    protected void process() {
      +
      +    }
      +}

      悪い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    //@Overrideアノテーションの指定がない
      +    protected void process() {
      +
      +    }
      +}
    • スーパークラスで private 宣言されているメソッドと同じ名前のメソッドをサブクラスで定義しない
      スーパークラスにある private メソッドと同じ名前のメソッドをサブクラスで定義しないこと。private メソッドはオーバーライドされず全く別のメソッドとして扱われ、他の人の混乱を招き、バグにつながる恐れがある。

    インナークラス

    • 原則としてインナークラスは利用しない
      一つの java ファイルに複数のクラスを記載するのは NG とする。また無名クラスを利用するのも原則として NG とする。
      Enum の定数固有メソッド実装(constant-specific method implementation)、Java8 のラムダ式は内部的にインナークラスとされるがこれらは許可する。

    メンバー順序

    • 以下の順で記述する

      1. static フィールド
      2. static イニシャライザー
      3. static メソッド
      4. フィールド
      5. イニシャライザー
      6. コンストラクター
      7. メソッド
    • 同一カテゴリー内では以下の可視性の順で記述する

      1. public
      2. protected
      3. パッケージ private
      4. private

    インスタンス

    • オブジェクト同士はequals()メソッドで比較する

      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}

      ただし Enum の場合は==演算子を利用して比較する

      equals()メソッドで比較する際、左辺のオブジェクトが null にならないように制御すること。

    • Class 名を利用した比較をおこなわない

      良い例:

      java
      if (o instanceof Foo f) {
      +    // ...
      +}

      悪い例:

      java
      if ("my.Foo".equals(o.getClass().getName())) {
      +    Foo f = (Foo)o;
      +    // ...
      +}
    • インスタンスの型キャスト(Class キャスト)が必要な場合はパターンマッチングを使用する

      良い例:

      java
      if (o instanceof String s) {
      +    // ...
      +}
      +
      +var str = (o instanceof BigDecimal b) ? b.toPlainString() : String.valueOf(o);
      +
      +var empty = o == null ||
      +  (o instanceof String s && s.isEmpty()) ||
      +  (o instanceof Collection c && c.isEmpty());

      悪い例:

      java
      if (o instanceof String) {
      +    String s = (String)o;
      +    // ...
      +}
      +
      +var str = (o instanceof BigDecimal) ? ((BigDecimal)o).toPlainString() : String.valueOf(o);
      +
      +var empty = o == null ||
      +  (o instanceof String && ((String)o).isEmpty()) ||
      +  (o instanceof Collection && ((Collection)o).isEmpty());

    制御構造

    • 制御文( if , else , while , for , do while )の { } は省略しない

      良い例:

      java
      if (s == null) {
      +    return;
      +}

      悪い例:

      java
      if (s == null)
      +    return;
    • ステートメントが無い {} ブロックを利用しない
      悪い例:

      java
      //{}内の記述が無い
      +if (s == null) {
      +}
    • if / while の条件式で = は利用しない
      良い例:

      java
      boolean a =//
      +if (!a) {
      +    //・・・
      +}

      悪い例:

      java
      boolean a =//
      +if (a = false) {//コーディングミス
      +    //・・・
      +}
      +
      +
      +boolean a =//
      +boolean b =//
      +if (a = b) {//おそらくコーディングミス
      +    //・・・
      +}
    • forwhile の使い分けを意識する

    • for 文を利用した繰り返し処理中でループ変数の値を変更しない
      悪い例:

      java
      String[] array = { /*・・・*/ };
      +for (int i = 0; i < array.length; i++) {
      +    //・・・
      +    i += 2;//NG
      +}
      +
      +for (String s : array) {
      +    //・・・
      +    s = "string";//NG
      +}
    • for 文のカウンタは特別な事情がない限り、0 から始める

    • 配列やリストなどの全要素に対するループ処理は拡張 for 文を使用する。
      良い例:

      java
      for (int value : array) {
      +    //・・・
      +}
      +
      +for (String value : list) {
      +    //・・・
      +}
    • 配列をコピーするときはArrays.copyOf()メソッドを利用する

      良い例:

      java
      int[] newArray = Arrays.copyOf(array, array.length);

      悪い例:

      java
      int[] newArray = new int[array.length];
      +System.arraycopy(array, 0, newArray, 0, array.length);
    • 繰り返し処理中のオブジェクトの生成は最小限にする

    • if 文と else 文の繰り返しや switch 文の利用はなるべく避け、オブジェクト指向の手法を利用する
      良い例:

      java
      CodingKind codingKind = toCodingKind(kind);
      +d = codingKind.encode(s);
      +
      +//---
      +
      +CodingKind codingKind = toCodingKind(kind);
      +s = codingKind.decode(d);

      悪い例:

      java
      switch (kind) {
      +case 1 ->
      +    d = encode1(s);
      +case 2 ->
      +    d = encode2(s);
      +}
      +
      +//---
      +
      +switch (kind) {
      +case 1 ->
      +    s = decode1(d);
      +case 2 ->
      +    s = decode2(d);
      +}
    • 繰り返し処理の内部で try ブロックを利用しない
      特に理由がない場合は繰り返し処理の外にtryブロックを記載する。
      ただし、繰り返し処理内部で例外をキャッチし処理を行いたい場合は繰り返し処理の内部でtryブロックを利用してもよい。

      良い例:

      java
      for (String s : array) {
      +    BigDecimal num;
      +    try {
      +        num = new BigDecimal(s);
      +    } catch (NumberFormatException e) {
      +        num = BigDecimal.ZERO;
      +    }
      +    //・・・
      +}

    文字列操作

    • 文字列同士が同じ値かを比較するときは、equals()メソッドを利用する
      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}
    • 文字列リテラルはnew しない
      良い例:

      java
      String s = "";

      悪い例:

      java
      String s = new String();
    • 更新される文字列にはStringBuilder クラスを利用する
      良い例:

      java
      StringBuilder builder = new StringBuilder();
      +for (String s : array) {
      +    builder.append(s);
      +}
      +System.out.println(builder.toString());

      悪い例:

      java
      String string = "";
      +for (String s : array) {
      +    string += s;
      +}
      +System.out.println(string);

      スレッドセーフ性が保証されていない箇所では`StringBuffer`クラスを利用する

      ※パフォーマンスについても記載しているので参考にしてください

    • 1ステートメントのみで行われる文字列の連結には+演算子を利用する

      良い例:

      java
      String s = s1 + s2;
      +
      +return s1 + s2 + s3 + s4 + s5;

      悪い例:

      java
      String s = new StringBuilder(s1).append(s2).toString();
      +
      +return new StringBuilder(s1).append(s2).append(s3).append(s4).append(s5).toString();
    • 更新されない文字列にはString クラスを利用する

    • 文字列リテラルと定数を比較するときは、文字列リテラルのequals()メソッドを利用する
      良い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (PROTOCOL_HTTP.equals(url.getProtocol())) {
      +
      +}

      悪い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (url.getProtocol().equals(PROTOCOL_HTTP)) {
      +
      +}
    • プリミティブ型とString オブジェクトの変換には、変換用のメソッドを利用する
      良い例:

      java
      int i = 1000;
      +String s = String.valueOf(i);// "1000"
      +s = NumberFormat.getNumberInstance().format(i);// 3桁区切り "1,000"
      +
      +boolean b = true;
      +s = String.valueOf(b);// true/false
      +s = BooleanUtils.toStringOnOff(b);// on/off
    • 文字列の中に、ある文字が含まれているか調べるには、contains()メソッドを利用する

    • システム依存記号( \n\r など)は使用しない。
      悪い例:

      java
      String text = Arrays.stream(array)
      +    .collect(Collectors.joining("\n"));

    数値

    • 誤差の無い計算をするときは、BigDecimal クラスを使う
      浮動小数点演算は科学技術計算に利用するもので、誤差が発生する。これに対して、クラス「BigDecimal」は、文字列で数値の計算を行うので、金額などの正確な計算に適している。BigDecimal ではインスタンス生成時に指定された桁数での精度が保証される。

    • 数値の比較は精度に気をつける
      良い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +if (a.compareTo(b) == 0) {
      +    System.out.println("一致");
      +}

      悪い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +
      +if (a.equals(b)) {
      +    System.out.println("精度が違うためこの分岐には入らない");
      +}
    • 低精度なプリミティブ型にキャストしない

    • BigDecimalString変換する際はtoString()ではなくtoPlainString()を利用すること
      toString()を利用した場合、指数表記になることがあります。

    日付

    • 日付の文字列のフォーマットには、SimpleDateFormatまたはDateTimeFormatterを使う
      良い例:

      java
      Date date = new Date();
      +SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
      +String s = dateFormat.format(date);

    三項演算子

    • 入れ子の三項演算子の利用は禁止
      可読性が悪くなるので三項演算子を入れ子で行うのは禁止。

    switch 式

    • 一つの値を変数に代入するための if-else 文は代わりに switch 式の使用を推奨する
      switch 式の値を使用することで変数を不変(実質的 final)にでき、代入箇所が分散することによる可読性の低下を防げます。

      良い例:

      java
      var value = switch (op) {
      +    case "add" -> a + b;
      +    default -> a - b;
      +};

      悪い例:

      java
      int value;
      +if (op.equals("add")) {
      +    value = a + b;
      +} else {
      +    value = a - b;
      +}
    • case 句はなるべく一つの式での記述を推奨する
      複雑な式や複雑なステートメントを記述しなければならない場合は、メソッドに分割することを検討してください。

    • switch 式は、コーディングミスによるフォールスルーを避けるため、常にアロー構文を使用する
      https://docs.oracle.com/javase/jp/16/language/switch-expressions.htmlからの引用:

      ノート:case L ->ラベルの使用をお薦めします。case L:ラベルの使用時は、break文またはyield文の挿入を忘れがちです。これを忘れると、コード内で思いがけないフォール・スルーが発生する場合があります。 case L ->ラベルで、複数の文または式でないコード、あるいはthrow文を指定するには、それらをブロック内に囲みます。caseラベルが生成する値をyield文で指定します。

      良い例:

      java
      var date = LocalDate.now();
      +var off = switch (date.getDayOfWeek()) {
      +    case MONDAY -> {
      +        if (myCalendar.isOff(date) || localCalendar.isHoliday(date)) {
      +            yield true;
      +        }
      +        yield localCalendar.isHoliday(date.minusDays(1));
      +    }
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY ->
      +        myCalendar.isOff(date) || localCalendar.isHoliday(date);
      +    case SUNDAY, SATURDAY -> true;
      +};

      悪い例:

      java
      var date = LocalDate.now();
      +var off = switch (date.getDayOfWeek()) {
      +    case MONDAY:
      +        if (myCalendar.isOff(date) || localCalendar.isHoliday(date)) {
      +            yield true;
      +        }
      +        yield localCalendar.isHoliday(date.minusDays(1));
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY:
      +        yield myCalendar.isOff(date) || localCalendar.isHoliday(date);
      +    case SUNDAY, SATURDAY:
      +        yield true;
      +};
    • アロー構文の、中カッコ、yieldを省略できる場合は必ず省略する
      良い例:

      java
      var day = DayOfWeek.SUNDAY;
      +var shortDay = switch (day) {
      +    case MONDAY -> "M";
      +    case WEDNESDAY -> "W";
      +    case FRIDAY -> "F";
      +    case TUESDAY, THURSDAY -> "T";
      +    case SUNDAY, SATURDAY -> "S";
      +};

      悪い例:

      java
      var day = DayOfWeek.SUNDAY;
      +var shortDay = switch (day) {
      +    case MONDAY -> {
      +        yield "M";
      +    }
      +    case WEDNESDAY -> {
      +        yield "W";
      +    }
      +    case FRIDAY -> {
      +        yield "F";
      +    }
      +    case TUESDAY, THURSDAY -> {
      +        yield "T";
      +    }
      +    case SUNDAY, SATURDAY -> {
      +        yield "S";
      +    }
      +};
    • Enum 値の switch 式で case 句が全ての Enum 値をカバーする場合は default 句はデッドコードとなるため記述しない
      良い例:

      java
      var day = DayOfWeek.SUNDAY;
      +var off = switch (day) {
      +    case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> false;
      +    case SUNDAY, SATURDAY -> true;
      +};
      +
      +var day = DayOfWeek.SUNDAY;
      +var off = switch (day) {
      +    case SUNDAY, SATURDAY -> true;
      +    default -> false;
      +};

      悪い例:

      java
      var day = DayOfWeek.SUNDAY;
      +var off = switch (day) {
      +    case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> false;
      +    case SUNDAY, SATURDAY -> true;
      +    default -> false;
      +};

    switch 文

    • 代わりに switch 式が使用できる箇所は switch 式を使用する

      • case 句でreturnを記述する場合は switch 文を使用して良い
    • case 句はなるべく 1 行のステートメントでの記述を推奨する
      複雑なステートメントを記述しなければならない場合は、メソッドに分割することを検討してください。

    • switch 文は、コーディングミスによるフォールスルーを避けるため、なるべくアロー構文を使用することを推奨する
      https://docs.oracle.com/javase/jp/16/language/switch-expressions.htmlからの引用:

      ノート:case L ->ラベルの使用をお薦めします。case L:ラベルの使用時は、break文またはyield文の挿入を忘れがちです。これを忘れると、コード内で思いがけないフォール・スルーが発生する場合があります。 case L ->ラベルで、複数の文または式でないコード、あるいはthrow文を指定するには、それらをブロック内に囲みます。caseラベルが生成する値をyield文で指定します。

      良い例:

      java
      var date = LocalDate.now();
      +switch (date.getDayOfWeek()) {
      +    case MONDAY -> {
      +        if (
      +            !myCalendar.isOff(date) && !localCalendar.isHoliday(date) &&
      +            !localCalendar.isHoliday(date.minusDays(1))
      +        ) {
      +            work();
      +        }
      +    }
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> {
      +        if (!myCalendar.isOff(date) && !localCalendar.isHoliday(date)) {
      +            work();
      +        }
      +    }
      +}

      悪い例:

      java
      var date = LocalDate.now();
      +switch (date.getDayOfWeek()) {
      +    case MONDAY:
      +        if (
      +            !myCalendar.isOff(date) && !localCalendar.isHoliday(date) &&
      +            !localCalendar.isHoliday(date.minusDays(1))
      +        ) {
      +            work();
      +        }
      +        break;
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY:
      +        if (!myCalendar.isOff(date) && !localCalendar.isHoliday(date)) {
      +            work();
      +        }
      +        break;
      +}
    • アロー構文を使用しない(コロンを使用する)場合、複数の値をマッチさせるときの case 句はカンマを使用して列挙する
      良い例:

      java
      var day = DayOfWeek.SUNDAY;
      +boolean off = false;
      +switch (day) {
      +    case SUNDAY, SATURDAY:
      +      off = true;
      +      break;
      +};

      悪い例:

      java
      var day = DayOfWeek.SUNDAY;
      +boolean off = false;
      +switch (day) {
      +    case SUNDAY:
      +    case SATURDAY:
      +      off = true;
      +      break;
      +};

    コレクション

    • Java2 以降のコレクションクラスを利用する
      Vector クラス、Hashtable クラス、Enumeration 等は、特にこれらを利用する理由がなければ、インターフェースを統一する目的で、これらの代わりにList(ArrayList クラス)、Map(HashMap クラス)、Iterator を使用すること。List などのインターフェースを利用することで JDK1.2 で整理されたわかりやすいメソッドを利用でき、また、インターフェースの特性から呼び出し元を変更せずに実装クラスを変更することができる。

    • 特定の型のオブジェクトだけを受け入れるコレクションクラスを利用する

      良い例:

      java
      List<Map<String, String>> list = new ArrayList<>();
    • ListのソートはList.sort()を利用する
      Listクラスの要素をソートする際は Java8 で追加されたList.sort()を利用すること。
      Java 7 以前で利用されていたCollections.sort()は利用しないこと。

    • Collection.forEach()は利用しない。拡張 for 文の利用を検討する
      Java8 で追加されたメソッド。
      拡張 for 文を利用したほうが多くの場合でデバッグに有利であり、可読性においてもforEachの優位性は少ないため、forEachは原則利用しない。拡張 for 文を利用する。
      具体的には下記のメソッドを利用しないこと。

      • Collection#forEach
      • Set#forEach
      • List#forEach

      Map#forEachはこの限りではない

      良い例:

      java
      for (String s : List.of("A", "B")) {
      +    //処理
      +}

      悪い例:

      java
      List.of("A", "B").forEach(s -> {
      +    //処理
      +});

      ただし、メソッド参照で処理できる場合はforEachを利用する。
      (デバッグのデメリットがほとんどなく、他と比較して処理効率が良いため)

      良い例:

      java
      List.of("A", "B").forEach(this::process);

      悪い例:

      java
      for (String s : List.of("A", "B")) {
      +    this.process(s);
      +}
    • Arrays.asList()は利用せず、List.of()を利用する
      Java9 で追加されたメソッド。
      配列をListに置き換える場合や、単純な固定のListを生成する際にはList.of()を利用する。

      • Arrays.asList()List.of()の違い
        List.of()で生成したListは、完全に不変(Immutable)なListで、
        Arrays.asList()で生成したListは、サイズのみ不変で、set等による値の操作が可能なListです。
        また、setを行った場合、Arrays.asList()に与えられた配列インスタンスにも影響します。

    ラムダ式・メソッド参照・コンストラクタ参照

    • ラムダ式が利用できる箇所はラムダ式を利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • ただし、メソッド参照・コンストラクタ参照が利用できる場合はメソッド参照・コンストラクタ参照を利用する

      良い例:

      java
      String::compareToIgnoreCase

      悪い例:

      java
      (s1, s2) -> s1.compareToIgnoreCase(s2)

      良い例:

      java
      BigDecimal::add

      悪い例:

      java
      (b1, b2) -> b1.add(b2)
    • ラムダ式記述の際、型宣言は省略記法で記述する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (String s1, String s2) -> s1 + "=" + s2
    • 原則ラムダ式内の行数は 1 行とする
      複数行で利用したい場合は、privateメソッドを作成しメソッド参照を利用する

      良い例:

      java
      this::getMax
      +
      +private int getMax(int i1, int i2) {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}

      悪い例:

      java
      (i1, i2) -> {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}
    • 原則ラムダ式は 1 行記述に限定するので、中カッコ、returnは必ず省略する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (s1, s2) -> {
      +    return s1 + "=" + s2;
      +}

    実質的 final(effectively final)

    • 実質的 final を利用する
      変数宣言にfinalを記載しなくてよい。

    Stream API

    • 利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • 並列ストリームは利用しないこと
      悪い例:

      java
      Stream<?> s = list.parallelStream();
      +Stream<?> s = list.stream().parallel();
    • StreamAPI 記述の際の改行位置は、各中間処理・末端処理前のピリオドの前で改行する

      良い例:

      java
      List<Character> alphabetLower = list.stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .toList();

      悪い例:

      java
      List<Character> alphabetLower = list.stream().filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase).toList();
      +
      +List<Character> alphabetLower = list
      +    .stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .toList();
    • インデントは統合開発環境の提供するフォーマッタに合わせる

    • 中間処理の数は 3 つ(3 行)程度までを推奨する
      中間処理の記述が多くなると可読性も悪くなり、デバッグも難しくなるため、3 行程度を目安にロジックを検討すること。

    • コメントは、原則として処理中には記載しない
      難解になってしまった場合のみ処理中の記載を認める

      良い例:

      java
      // クラスFooのフィールドStrの値で昇順にソートし、フィールドStrの要素を取得して処理する。
      +fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    .map(Foo::getStr)
      +    .forEach(this::proc);

      悪い例:

      java
      fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr)) //クラスFooのフィールドStrの値で昇順にソート
      +    .map (Foo::getStr) //フィールドStrの要素を取得
      +    .forEach(this::proc); //処理
      +
      +
      +fooList.stream()
      +    //クラスFooのフィールドStrの値で昇順にソート
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    //フィールドStrの要素を取得
      +    .map (Foo::getStr)
      +    //処理
      +    .forEach(this::proc);
    • Stream は極力変数代入しないこと
      Stream は中間処理、末端処理を行うと使用済みとなり、以降同じインスタンスは利用できない。
      変数代入はほとんどの場合意味をなさず、むしろミスの元となるため極力変数代入はしないこと。

      良い例:

      java
      List<String> list1 = Stream.of("A", "B", "C")
      +        .map(String::toLowerCase)
      +        .toList();
      +
      +List<String> list2 = Stream.of("A", "B", "C")
      +        .map(s -> s + s)
      +        .toList();

      悪い例:

      java
      Stream<String> stream = Stream.of("A", "B", "C");
      +Stream<String> stream1 = stream.map(String::toLowerCase);
      +List<String> list1 = stream1.toList();
      +
      +Stream<String> stream2 = stream.map(s -> s + s);//コーディングミス streamは使用済のためエラーになる
      +List<String> list2 = stream2.toList();

    Optional

    • Optional は同メソッド内で値を取り出す場合は極力変数代入しないこと
      Optional とその値の変数は同じものを示す名前となり、同じ意味の変数名が複数現れることで可読性が下がるため、Optional の変数代入は行わないこととする。

      良い例:

      java
      Employee employee = findEmployee(employeeId)
      +        .orElseThrow(IllegalArgumentException::new);

      悪い例:

      java
      Optional<Employee> employeeOpt = findEmployee(employeeId);
      +Employee employee = employeeOpt.orElseThrow(IllegalArgumentException::new);

      直接、値を取り出すことなくOptionalでのみ扱う場合はOptionalを変数代入してもよい。

      良い例:

      java
      Optional<Employee> employee = findEmployee(employeeId);
      +
      +Dept dept = employee.map(Employee::getDivision)
      +        .map(Division::getDept)
      +        .orElse(null);
      +
      +Role role = employee.map(Employee::getRole)
      +        .orElse(null);
      +
      +//-----
      +
      +Optional<Employee> employee = findEmployee(employeeId);
      +//・・・処理
      +return employee;

    var (Local-Variable Type Inference)

    次のリンクも参考にしてください。
    Style Guidelines for Local Variable Type Inference in Java

    • 明確な方針で、利用する・利用しないを統一すること
      方針無く、varを混在させるとソースコードの見通しと保守性が悪くなります。
      各プロジェクトで、例えば以下ののような方針で統一してください。

      1. varを利用しない
      2. 原則varを利用する
      3. 右辺で、明確に型がわかる場合はvarを利用する

      以下で23について例を示します。

      • 原則varを利用する

        利用できる箇所は全てvarを利用します。

        良い例:

        java
        var a = "";
        +var b = 123;
        +var c = new ArrayList<String>();

        悪い例:

        java
        var a = "";
        +int b = 123;
        +List<String> c = new ArrayList<>();
        java
        void methodA() {
        +    var a = "";
        +}
        +void methodB() {
        +    String a = "";
        +}
      • 右辺で、明確に型がわかる場合はvarを利用する

        右辺をみて型がわかる場合は、全てvarを利用します。 それ以外はvarを利用してはいけません。

        良い例:

        java
        var s = ""; // リテラルによって型が明確に判断できます
        +var list1 = new ArrayList<String>(); // newによって型が明確に判断できます
        +var list2 = (List<String>) map.get("p"); // キャストによって型が明確に判断できます
        +var list3 = List.of("A", "B", "C"); // ファクトリーによって型が明確に判断できます

        プロジェクトで観点を決めるべき例:

        java
        var b1 = s.isEmpty(); // `is`で始まるメソッドは通例としてbooleanを返します
        +var b2 = Objects.equals(s1, s2); // `equals`メソッドは通例としてbooleanを返します
        +var i1 = Objects.hash(s); // `hash`、`hashCode`メソッドは通例としてintを返します
        +var i2 = Objects.compare(s1, s2); // `compare`、`compareTo`メソッドは通例としてintを返します

        悪い例:

        java
        var a = e.getData(); // `e`の型と、メソッド定義がわからなければ型が判断できません

    レコード

    • 明確な方針で、利用する・利用しないを統一すること
      方針無く、recordとクラスと JavaBeans 形式のクラスや Lombok の @Data の使用を混在させるとソースコードの見通しと保守性が悪くなります。
      各プロジェクトで、recordを利用しないか、recordの使用しても良い箇所について方針を決めた上で使用するようにしてください。 また、recordは JavaBeans とは互換性がないため使用している各種ライブラリの対応状況にも注意する必要があります。

      方針例: クラス内で処理する一時的なデータを表現するためだけにrecordを使用しても良い。

      java
      // parentId と id をキーとして、重複を排除した uniqueItems を作成します。
      +record Key(int parentId, int id) {
      +}
      +var map = new HashMap<Key, Item>();
      +for (Item item : items) {
      +  var key = new Key(item.getParenId(), item.getId());
      +  map.putIfAbsent(key, item);
      +}
      +var uniqueItems = map.values();
    • 次の記述スタイルを標準とする
      ただし、フォーマッタを導入している場合はフォーマッタに合わせます。

      良い例:

      java
      /**
      + * 矩形を表すクラス
      + *
      + * @param x      矩形の左上隅の x 座標
      + * @param y      矩形の左上隅の y 座標
      + * @param width  矩形の幅
      + * @param height 矩形の高さ
      + */
      +public record Rect(
      +    /* 矩形の左上隅の x 座標 */
      +    double x,
      +    /* 矩形の左上隅の y 座標 */
      +    double y,
      +    /* 矩形の幅 */
      +    double width,
      +    /* 矩形の高さ */
      +    double height) {
      +}

      次にポイントを説明します。

      • {の後、}の前に改行する

      • レコードコンポーネント(パラメータ)のカンマの後に改行することを推奨する
        レコードコンポーネントが少なく、レコードコンポーネント名からでも意味が理解でき、改行がなくても可読性が低下しない場合は、改行を必要としません。
        改行を推奨する理由は以下です。

        • アノテーションを付与したときでも比較的読みやすい(アノテーション引数との混在による可読性の低下の回避)
        • レコードコンポーネントが多い場合も比較的読みやすい
      • レコードコンポーネントが多い場合、レコードコンポーネントへ直接コメントをつけることを検討する
        レコードコンポーネントの JavaDoc としては@param形式でレコード名の上部に記述しますが、このソースコードをテキストとしてみた場合、レコードコンポーネントの定義と@paramの説明とで距離が空いてしまう場合があり、型と説明を読むのに時間がかかってしまう可能性があります。
        また、使用する IDE によっては、アクセサから宣言へのジャンプを使用すると、レコードコンポーネント(パラメータ)の定義へジャンプするものがあります。レコードコンポーネントにコメントがあればすぐに説明を読むことができますが、JavaDoc しか記述しない場合は、ファイル上部へ移動して対応するレコードコンポーネントの説明を探さなければなりません。

        java
        public record Rect(
        +    /* 矩形の左上隅の x 座標 */
        +    double x,
        +    /* 矩形の左上隅の y 座標 */
        +    double y,
        +    /* 矩形の幅 */
        +    double width,
        +    /* 矩形の高さ */
        +    double height) {
        +}
    • レコードのアクセサを上書きしない

      悪い例:

      java
      public record Rect(
      +    double x,
      +    double y,
      +    double width,
      +    double height) {
      +
      +    public double x() {
      +        return x;
      +    }
      +}

    テキストブロック

    次のリンクも参考にしてください。
    Programmer's Guide To Text Blocks > Style Guidelines For Text Blocks

    • 複数行の文字列を定義する際、文字列連結よりもテキストブロックを使用する

      良い例:

      java
      String message = """
      +        複数行の文字列はテキストブロックを使用しましょう。
      +        文字列連結と違い、プラス記号や改行コードのエスケープシーケンスのような無駄を排除でき、
      +        より読みやすいソースコードで書くことができます。
      +        """;

      悪い例:

      java
      String message =
      +        "複数行の文字列はテキストブロックを使用しましょう。\n" +
      +        "文字列連結と違い、プラス記号や改行コードのエスケープシーケンスのような無駄を排除でき、\n" +
      +        "より読みやすいソースコードで書くことができます。\n";
    • 単一行の文字列を定義する際、テキストブロックは使用せず文字列リテラルを使用する
      ただし、二重引用符(")のエスケープを避ける目的ではテキストブロックを使用しても良い。

      良い例:

      java
      String singleLine = "単一行の文字列です。";
      +
      +String message = """
      +        テキストブロックでは単一の二重引用符「"」にエスケープを使用する必要がありません。""";

      悪い例:

      java
      String singleLine = """
      +        単一行の文字列です。""";
    • テキストブロック内では基本的に改行コードのエスケープシーケンス(\n)を使用しないが、読みやすさ向上の目的で改行コードのエスケープシーケンス(\n)を使用しても良い

      良い例:

      java
      String multiLine = """
      +        複数行の、
      +        文字列です。
      +        """;
      +
      +String csv = """
      +        名前,説明,MIMEタイプ
      +        CSV,"Comma-Separated Valuesの略\nCharacter-Separated Valuesの意味で使用されることもある","text/csv"
      +        TSV,"Tab-Separated Valuesの略","text/tab-separated-values"
      +        """;

      悪い例:

      java
      String multiLine = """
      +        複数行の、\n文字列です。
      +        """;
    • テキストブロックで定義した文字列を処理する場合は、テキストブロックをローカル変数やフィールドへ代入してから使用することを推奨する

      良い例:

      java
      String selectX = """
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_X
      +        """;
      +String selectY = """
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_Y
      +        """;
      +processValues(fetch(selectX, Entity1.class), fetch(selectY, Entity2.class));

      悪い例:

      java
      processValues(fetch("""
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_X
      +        """, Entity1.class), fetch("""
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_Y
      +        """, Entity2.class));

      複雑な処理に直接テキストブロックを使用すると可読性を下げる可能性があります。

    • 3 つ以上続く二重引用符(")をエスケープする際は、最初の二重引用符にエスケープシーケンスを使用する

      良い例:

      java
      String javaCode = """
      +        String message = \"""
      +                テキストブロックです。
      +                \""";
      +        System.out.println(message);
      +        """;

      悪い例:

      java
      String javaCode = """
      +        String message = \"\"\"
      +                テキストブロックです。
      +                \"\"\";
      +        System.out.println(message);
      +        """;
      +
      +String javaCode = """
      +        String message = ""\"
      +                テキストブロックです。
      +                ""\";
      +        System.out.println(message);
      +        """;
    • テキストブロックの開始引用符(""")は前の行の右端に記述する

      良い例:

      java
      String message = """
      +        テキストブロックです。
      +        """;

      悪い例:

      java
      String message =
      +        """
      +        テキストブロックです。
      +        """;
    • テキストブロックのインデントは開始引用符(""")に合わせる必要はない

      良い例:

      java
      String message = """
      +        テキストブロックです。
      +        """;

      悪い例:

      java
      String message = """
      +                 テキストブロックです。
      +                 """;

      一見すると、読みやすく見えるかもしれませんが、変数名の変更によって簡単に崩れてしまい、修正するために多くの行の変更を強制することになるため、メンテナンス性が低下します。

    • テキストブロックで定義する文字列のインデントは基本的に周辺の Java コードに合わせてインデントする
      ただし、横に長い文字列などの可読性向上の目的で左端に揃えるのは良い。

      良い例:

      java
      public class Foo {
      +    public void process() {
      +        String message = """
      +                テキストブロックです。
      +                """;
      +    }
      +}

      悪い例:

      java
      public class Foo {
      +    public void process() {
      +        String message = """
      +    テキストブロックです。
      +    """;
      +    }
      +}

      良い例:

      java
      public class Foo {
      +    public void process() {
      +        if (foo) {
      +            String message = """
      +それはもう長い長いテキストブロックのためインデントするとエディタ上でテキストを見るためには横スクロールが必要になるかもしれません。
      +""";
      +        }
      +    }
      +}

      悪い例:

      java
      public class Foo {
      +    public void process() {
      +        if (foo) {
      +            String message = """
      +                    それはもう長い長いテキストブロックのためインデントするとエディタ上でテキストを見るためには横スクロールが必要になるかもしれません。
      +                    """;
      +        }
      +    }
      +}
    • テキストブロックのインデントにスペース文字とタブ文字を混在させない

    • 文字列の最後に改行コードを入れずに、意図的にインデントした文字列を定義するとき終了引用符(""")の前の行の右端に\を使用する

      良い例:

      java
      String text = """
      +            ABC
      +            DEF
      +            GHI\
      +        """;

      悪い例:

      java
      String text = """
      +        ABC
      +        DEF
      +        GHI""".indent(4);

    ストリーム(InputStream OutputStream)

    • ストリームを扱う API を利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • ObjectOutputStream ではreset()を利用する

    リソースの解放

    • リソース解放を必要とするクラスを利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • リソース解放を必要とするクラスを作成する場合はAutoCloseableimplementsする
      AutoCloseableimplementsすることで try-with-resources 文が利用できるようになります。

    例外

    • catch 文で受け取る例外は、詳細な例外クラスで受け取る

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (IOException e) {
      +    log.error("Error", e);
      +    throw e;
      +}

      悪い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (Exception e) {//範囲が広すぎる例外クラスの利用はNG
      +    log.error("Error", e);
      +    throw e;
      +}
    • Exception クラスのオブジェクトを生成してスローしない

    • catch ブロックでは基本、例外処理をする。ただし処理を書いてはいけない部分もあるので、その部分については、"// ignore" というコメントを記述すること。

    • 例外クラスは無駄に定義しない

    ガベージコレクション

    • 原則finalize()のオーバーライド実装は禁止
    • もしfinalize()をオーバーライドした場合はsuper.finalize() を呼び出す
    • アプリケーションからfinalize()を呼び出さない

    コメント規約

    よいコメントの鉄則

    • コードを明確化するコメントを書く
      コードにコメントを書く理由は、自分自身、一緒に仕事をしている人、後に関わる開発者にとってコードをより理解しやすいものにするためである。

    • コメント化する価値がないプログラムならば、実行するに値しない
      有用な格言。コメントは必須。

    • 過剰な装飾は使わない (例:見出し状のコメント)
      1960 年代から 1970 年代の典型的な COBOL プログラマにはアスタリスク( * )でコメントを囲った箱を書く習慣があった。彼らの芸術的な主張を表わしているのかもしれないが、率直に言えばそれは製品に加わるちょっとした価値に比べれば大きな時間の無駄である。かわいいコードではなくきれいなコードを書くはずである。さらに、コードを表示するディスプレイや印刷するプリントに使われるフォントはプロポーショナルだったりそうでなかったりして、箱をきれいに整列させることは難しい。

    • コメントはシンプルに
      かつて見たもっとも最良のコメントは、シンプルな要点をまとめた注釈であった。なにも本を書く必要はなく、他の人がコードを理解するに十分な情報を提供するだけでよいのである。

    • コードを書く前に先にコメントを記述する
      コードをコメント化する最良の方法は、コードを書く前にコメントを書くことである。それが、コードを書く前にコードがどのように動作するかについて考えるよい機会となり、コメントの存在を保障することにもつながる。少なくともコードを書いた時にコメントすべきである。コメントによってコードが理解しやすくなることで、コードの開発中にアドバンテージを得ることができる。コードにコメントを書く時間を費やせば、それによって得られるものがある。

    • コメントには、なぜそうなのかを書く。コードを読めば分かることを書かない
      基本的に、コードの一部分を見ればそれが何かを理解することはできる。例えば、以下のコードを見て、$1000 以上の注文については 5%ディスカウントされることは理解できる。なぜそうなのか?大きな注文ではディスカウントがつきものだというビジネスルールがあるのだろうか?大きな注文に時間限定サービスがあるのか、それともずっとサービスがあるのか?これを書いたプログラマの気前がよかったのか?
      どこかソースコード中か別な文書にコメントされていない限り、それがなぜなのかを知ることはできない。

      java
      if (grandTotal >= 1000.00) {
      +    grandTotal = grandTotal * 0.95;
      +}

      なお、メソッドコメントには、適切な javadoc コメント(タグ)のほかに、以下の内容も可能な限り明記すること。

      • 副作用のある処理の場合は、その内容 (→ メソッドの引数オブジェクトがメソッド内で変更されるケースなど)
      • 既知のバグ (→ 判明しているが修正しないことにした場合など)
      • 影響のある事前条件、事後条件 (→ メソッドが正しく動作するための前提について)
      • 並行性 (→  マルチスレッドでアクセスされた場合の動作について)
      • 該当メソッドの使用例やサンプルコード
    • TODO コメント
      設計者確認待ち、共通処理の作成待ちなどの理由により、実装時に TODO がある場合、下記のようにコメントを記述する。
      (Eclipse の TODO コメント形式を採用)
      例)

      //TODO:ワークフローの仕様決定待ち 関連チケット#12345

    Java コメント(3 種類)の使い分け

    Java では 3 種類のコメントが使える。javadoc コメントは/**で開始され、*/で終わる。C 風コメントは/*で開始され*/で終わる。単一行コメントは//で開始され、そのソースコード行が終わるまで続く。以下の表ではコメントの使い方とその例を示す。(コメントのスタイルに関しては、前述の「標準規約に準拠したコーディング例」を参照)

    コメント種類使用方法
    javadoc コメント
    /** comment */
    interface、class、メソッド、フィールドの直前に書く。コメントは javadoc によって処理され、外部ドキュメント(HTML)として生成される。(この形式以外のコメントはドキュメントとして出力されないことに注意)/*_
    _ 顧客(Customer)-
    _ 顧客はわれわれがサービスまたは製品を売った人物
    _ もしくは組織のいずれかである。
    _ @author 開発太郎
    _/
    C 風コメント
    /* comment */
    特定のコードを無効化したいが、後で使用するかもしれないので残しておくためにコメント化する時や、デバッグ時に一時的に無効化するときに使用する。/_
    このコードは J.T.Kirk によって 1997.12.9 に前述のコードと置き換えたためコメント化した。2 年間不要であるならば削除せよ。
    ... (ソースコード)
    _/
    単一行コメント
    // comment
    メソッド内にて、ビジネスロジック、コードの概要、一時変数の定義内容などを記述する。// 1995 年 2 月に開始された X 氏の寛大なキャンペーンで
    // 定められた通り 1000$を超える請求には、全て 5%割引を
    // 適用する。

    ※ ロジック中に、頻繁に C 風コメントでコメントを書くとまとめてコメントアウトする場合に不便なため、基本的にロジック中では単一行コメントを利用すること。

    パフォーマンス

    パフォーマンスを考慮した Java のコーディングについて以下に示す。

    ※ パフォーマンスは jre のバージョンやスペックによって変化します。本内容は jre1.8.0_74 での検証結果を元にした内容です。

    ※ 性能計測結果についての記載がありますが、あくまでも参考値です。性能を保証するものではありません。

    Stream API

    Java8 で追加された Stream API での記述は、可読性も高く、簡潔に書けますが、パフォーマンス・性能面で注意が必要な場合があります。

    List の処理を行う際、拡張 for 文で処理する場合は Iterator インスタンスが 1 つだけ生成されますが、Stream API で処理する場合、最初の Stream インスタンスに加え、各中間処理ごとにも Stream インスタンスが生成され、その分の性能劣化が懸念されます。
    以下に処理例と計測結果を記載します。

    • 拡張 for 文

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = new ArrayList<>();
      +for (String string : list) {
      +    if (string.endsWith("0")) {
      +        resultList.add(string);
      +    }
      +}
      +return resultList;
    • Stream API

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = list.stream()
      +    .filter(s -> s.endsWith("0"))
      +    .toList();
      +return resultList;
    • 計測結果

      処理する List の件数拡張 for 文 (ms)StreamAPI (ms)
      100 万件79
      1,000 万件88114
      1 億件9491,026
      2 億件1,8222,081

    小中規模の処理量であれば考慮するほどの性能差はありませんが、大量の処理が見込まれる場合は考慮が必要です。
    また、Stream API は並列処理(スレッド処理)の機能をサポートしていますので、利用できる場合は並列処理も含めての検証が必要です。

    ラムダ式・メソッド参照・コンストラクタ参照

    Java8 で追加されたラムダ式・メソッド参照・コンストラクタ参照は、匿名クラスを利用するよりも効率的です。
    積極的な利用を推奨します。

    以下に Comparator を生成した場合の計測結果を記載します。

    • 匿名クラス

      java
      Comparator<String> c = new Comparator<String>() {
      +    @Override
      +    public int compare(String o1, String o2) {
      +        return o1.compareToIgnoreCase(o2);
      +    }
      +};
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> o1.compareToIgnoreCase(o2);
    • メソッド参照

      java
      Comparator<String> c = String::compareToIgnoreCase;
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)メソッド参照 (ms)
      10 億回3800(計測不能)0(計測不能)
      100 億回6,3740(計測不能)0(計測不能)
      1 京回(30 秒以上)1410

    ラムダ式は外部の変数を利用する場合、匿名クラスとほぼ同じ動作をします。

    • 匿名クラス

      java
      new Comparator<String>() {
      +        @Override
      +        public int compare(String o1, String o2) {
      +            return arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                            : o1.compareToIgnoreCase(o2);
      +        }
      +    }
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                    : o1.compareToIgnoreCase(o2);
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)
      10 億回(パラメータあり)571572
      100 億回(パラメータあり)9,9009,864

    文字列連結

    文字列連結(繰り返し)

    文字列連結を繰り返し処理中で行う際、+演算子で処理することはアンチパターンとして知られています。
    繰り返し処理中の文字列連結は、 StringBuilderStringJoinerStringBuffer を利用します。
    また、コレクション要素の結合であればString#joinが利用できます。

    以下に処理例と計測結果を記載します。

    • +演算子

      java
      String s = "";
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        s += ",";
      +    }
      +    s += string;
      +}
      +return s;
    • StringBuilder

      java
      StringBuilder sb = new StringBuilder();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • StringBuffer

      java
      StringBuffer sb = new StringBuffer();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • String#join

      java
      return String.join(",", list);
    • 計測結果

      処理する List の件数+演算子 (ms)StringBuilder (ms)StringBuffer (ms)String#join (ms)
      1,000 件50(計測不能)0(計測不能)0(計測不能)
      1 万件1,016111
      10 万件(30 秒以上)255
      100 万件(30 秒以上)294251

    文字列連結(定数)

    基本的に処理中の文字列連結では+演算子は使わないで処理するほうがパフォーマンスが高くなりますが、定数の場合は+演算子で定義するほうがパフォーマンスが高いです。

    たとえば以下のように、処理したい場合、

    java
    private static final String CONST_A = "A";
    +private static final String CONST_B = "B";
    +private static final String CONST_AB = CONST_A + CONST_B;

    StringBuilder で処理しようとすると以下のようになります。

    java
    private static final String CONST_AB = new StringBuilder(CONST_A).append(CONST_B).toString();

    しかし、これらをバイトコード上で確認するとそれぞれ以下のようになります。

    • +演算子

      java
      private static final java.lang.String CONST_AB = "AB";
    • StringBuilder

      java
      private static final java.lang.String CONST_AB;
      +
      +static {};
      +   0  new java.lang.StringBuilder [20]
      +   3  dup
      +   4  ldc <String "A"> [8]
      +   6  invokespecial java.lang.StringBuilder(java.lang.String) [22]
      +   9  ldc <String "B"> [11]
      +  11  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [26]
      +  14  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [30]
      +  17  putstatic jp.co.packagename.ClassName.CONST_AB : java.lang.String [34]
      +  20  return

    +演算子を利用した場合コンパイル時に最適化され、文字列"A""B"をあらかじめ結合して class が作成されます。
    StringBuilderを利用した場合は最適化はされず、記述した通りの処理が行われます。

    計測した場合、下記のようになります。

    • 計測結果

      処理回数StringBuilder (ms)+演算子 (ms)
      5,000 万回5590(計測不能)
      1 億回1,0590(計測不能)

    通常、定数処理を大量に処理することは考えられないので性能問題になることはありませんが、+演算子を利用したほうがパフォーマンスが高いこともあるということを理解してください。

    List の種類

    ListにはArrayListのようなRandomAccessを implements した、ランダムアクセスをサポートしているクラスと、
    LinkedListのようなランダムアクセスをサポートしていない(シーケンシャルアクセス)クラスが存在します。
    RandomAccessではないListは、List#getなどインデックスを利用するような操作のパフォーマンスが低いので注意してください。

    以下に処理例と計測結果を記載します。

    • for 文(List#get(int)によるループ)

      java
      int size = list.size();
      +for (int i = 0; i < size; i++) {
      +    String s = list.get(i);
      +    //処理
      +}
    • 拡張 for 文

      java
      for (String s : list) {
      +    //処理
      +}
    • forEach

      java
      list.forEach(this::処理);
    • 計測結果

      処理する List の件数ArrayList
      for 文(List#get(int)によるループ) (ms)
      LinkedList
      for 文(List#get(int)によるループ) (ms)
      ArrayList
      拡張 for 文 (ms)
      LinkedList
      拡張 for 文 (ms)
      ArrayList
      forEach (ms)
      LinkedList
      forEach (ms)
      1 万件0(計測不能)730(計測不能)0(計測不能)0(計測不能)0(計測不能)
      10 万件0(計測不能)7,5760(計測不能)0(計測不能)12
      20 万件0(計測不能)17,7400(計測不能)0(計測不能)0(計測不能)0(計測不能)
      50 万件0(計測不能)(30 秒以上)0(計測不能)20(計測不能)2
      100 万件1(30 秒以上)0(計測不能)40(計測不能)4
      1,000 万件16(30 秒以上)845644

    ランダムアクセスをサポートしているListがシーケンシャルアクセス(iterator を利用した処理など)で遅いということはないので、
    ループの処理は拡張 for 文等、Iterator によるループで記述するのが無難です。
    List#getでの処理をすべて禁止することはできませんが、高いパフォーマンスが求められる場合はListの種類にも注目してみてください。

    BigDecimal の ZERO との比較

    BigDecimal の正・負・ZERO の判定はBigDecimal#signumを利用します。
    compareToを利用してBigDecimal.ZEROと比較しても同じことができますが、signumを利用したほうが効率的です。

    以下に処理例と計測結果を記載します。

    • compareTo 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.compareTo(BigDecimal.ZERO) == 0) {
    • signum 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.signum() == 0) {
    • 計測結果

      (単位:マイクロ秒)

      処理回数compareTo 利用 (マイクロ秒)signum 利用 (マイクロ秒)
      1 京回527
      max:26,367
      min:0
      424
      max:21,213
      min:0

    性能差が少ないので、必ずしも signum を利用する必要はありませんが、大量に処理する場合など、高いパフォーマンスが求められる場合は意識してください。


    License

    CC-By-4.0

    + + + + \ No newline at end of file diff --git "a/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.html" "b/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.html" new file mode 100644 index 00000000..f3d8f11e --- /dev/null +++ "b/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_11.html" @@ -0,0 +1,544 @@ + + + + + + Javaコーディング規約 for Java11 | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Javaコーディング規約 for Java11

    Future Enterprise Coding Standards

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    一般に利用・参照されている Java コーディング規約やガイドラインを以下に示す。本規約の作成においても、下記規約類を参照・抜粋している。

    規約著作者URL
    Code Conventions for the Java Programming LanguageSun Microsystemshttp://www.oracle.com/technetwork/java/codeconvtoc-136057.html
    Writing Robust Java CodeScott W. Amblerhttp://www.ambysoft.com/downloads/javaCodingStandards.pdf
    オブジェクト倶楽部版 Java コーディング標準オブジェクト倶楽部http://objectclub.jp/community/codingstandard/CodingStd.pdf
    電通国際情報際サービス版 Java コーディング規約 2004電通国際情報サービスhttp://objectclub.jp/community/codingstandard/JavaCodingStandard2004.pdf
    JJGuideline (Java - J2EE Conventions and Guidelines)Stephan.J & JCS Teamhttp://www.fedict.belgium.be/sites/default/files/downloads/Java_J2EE_conventions_and_guidelines_EN.pdf
    Google Java Style (非公式和訳)Googlehttps://kazurof.github.io/GoogleJavaStyle-ja/
    Acroquest Technology Java コーディング規約Acroquest Technologyhttps://www.acroquest.co.jp/webworkshop/javacordingrule/Acroquest_JavaCodingStandard_6_7.pdf
    ※現在は削除されています

    ※ Sun Microsystems の規約は Java 草創期から一応の標準という位置づけだったが、オブジェクト指向、及び、その開発環境の普及・発展によって、設計やコーディングにおいて、直接的に有用な知識や豊富な指針を含むような優れた規約や、ツールなどによる機械的な準拠チェックと連携する規約が普及してきている。

    規約の重要性

    標準としての規約を定義し、遵守することの重要性を以下に示す。

    • ソフトウェアメンテナンスにおける、可読性・保守性・拡張性の向上
    • 問題を起こしやすい実装を未然に回避することによる、品質・生産性の向上
    • 標準規約を通して得られる一般的な実装知識やノウハウ(=学習効果)

    コーディングの心得

    長いプログラムを記述すること(ステップ数)によって生産性が評価されたのは、過去の時代の出来事である。現在は、クラスやメソッドの役割が明確で、ロジックが読みやすく、保守性に優れたプログラムを記述することが評価される。コーディング規約は、コードの書き方に関する一種のパターンと考えることもでき、コードの保守性を向上させる具体的な方法を示している。したがって、規約の一つ一つの意図を理解し、守ることが重要になる。しかし、保守性に優れたコードを作成するためには、コーディング規約を守ることに加えて、良いコードを記述するための基本的な心構えをしっかり心に留めておく必要がある。以下では、その心得について述べる。

    【コーディングの心得 5 か条】

    1. 見やすさを重視せよ
    2. ネーミングはわかりやすく
    3. サンプルを鵜呑みにしない
    4. 同じコードを二度書かない
    5. 役割は一つに

    見やすさを重視せよ

    「良いコード」の基本は、「他の人が読んでもわかりやすいと感じられるコード」。コードの見やすさは、フォーマットはもちろん、ロジックの簡潔さや API の常識的な使い方などから生まれる。コーディングにあたっては、常に他の人の視点を意識しながら、見やすさに気を配って記述する必要がある。例えば、自分で記述したコードであっても、しばらくたってから読み返してみると理解に時間がかかった経験は誰にもあるはず。「3 日前に書いたコードは他人のコードと同じ」ということもよく言われる。見やすさを重視することは、他の人のためだけでなく自分のためにもなる。コードを読んでもすぐに理解できないような実装は、再考(リファクタリング)の必要がある。

    ネーミングはわかりやすく

    コーディングでは、様々な変数やメソッドなどにネーミング(名前付け)する必要がある。ネーミングとは、本来、その対象の本質を表すような名前を考える作業である。大変難易度の高い作業だが、一方で適当に行ってもコードの動作は変わらないため、人によっては手を抜きがちとなる。しかし、ネーミングの良し悪しは、コードの可読性に非常に大きな影響を及ぼす。例えば、「C0001」というクラス名があるとする。これでは、何を表すクラスなのかすぐにはわからないだろう。また、「int p = 5000;」という記述があるとする。プログラマに聞くと、変数名 p は価格(Price)の略だと言うのだが、それならば略さずに、「int price = 5000;」としたほうが分かりやすいはずである。「ネーミングはわかりやすく」の背景には、読んで内容が理解できるという意味で、文章のようなプログラミングを行う、という考え方に基づく。

    サンプルを鵜呑みにしない

    サンプルコードを活用すること自体は、著作権等を侵害しなければ問題ない。問題なのは、その内容や背景を理解しないまま、サンプルコードだけを鵜呑みにして、「おまじない」として表面的に適用してしまうことである。コードを「おまじない」ととらえていては、サンプルコードの間違いを気づかないまま適用してしまうこともある。例えば、ストリームのクローズ処理を行っていないサンプルコードであっても、それに気づかずに自分のコードに適用してしまい、後で思わぬ障害を引き起こすという可能性がある。サンプルコードは、そこで説明する内容に絞ったコードが多いため、このような例はよく見られる。また、サンプルコードをそのまま適用した結果、自分が記述すべきコードには必要のないコードが含まれてしまう場合もある。その場合、コードの可読性を下げる原因となる。自分のコードは、自分で深く理解して記述すべきである。

    同じコードは二度書かない

    コードをコピー・ペーストしていませんか?コピー・ペーストしてしまうと、何らかの修正をする際に、全ての個所に同じ修正をする羽目になる。同じコードが現れるようならまとめて一つにし、外に出してコールするような書き方にすべきである。同じコードをまとめる作業は、どちらかといえば、コーディング時よりリファクタリング(ソフトウェアの外部的振る舞いを変更せずに内部構造を改善する作業)で行われることが多い。しかし、コーディング時からできるだけ気をつけておきたいことでもある。

    役割は一つに

    メソッドの役割が明確で、かつ 1 つであれば単体テストが行いやすくなる。つまり、コードの「試験性」が高まる。また、役割が一つであれば、後でコードを変更する際に修正箇所がわかりやすいため、障害修正に要する時間が短くなる。つまり、コードの「保守性」があがることになる。例えば、「チェックをして実行する」機能を実現するために、checkAndDo()メソッドが存在したとする。この場合、このメソッドは check()メソッドと do()メソッドに分割すべきである。なぜなら、checkAndDo()メソッドの check()ロジックに誤りがあった場合、do()メソッドに書かれる内容まで把握する必要が生じるためである。分割してあれば、check()メソッドだけの変更で済む。このことはクラスの設計にもあてはまる。

    ネーミング規約

    全般

    • 大文字・小文字の違いで名前を区別しない。

      良い例:

      java
      private int carNumber;
      +private int trainNumber;

      悪い例:

      java
      private int num;
      +private int Num;

    パッケージ

    • パッケージ名はすべて小文字にする
    • パッケージ名は意味のある名前にする
    • サブパッケージ名の重複は可能

    クラス

    • クラス名は単語の先頭を大文字にする
      良い例:

      java
      public class Entry {

      悪い例:

      java
      public class entry {
    • インターフェース名、Enum 名はクラス名に準ずる

    メソッド

    • コンストラクタと同じ名前のメソッドはつくらない

    • メソッド名は区切りのみ大文字にする
      良い例:

      java
      public String getName() {
      +    //・・・
      +}

      悪い例:

      java
      public String getname() {
      +    //・・・
      +}
      +public String GETNAME() {
      +    //・・・
      +}
    • 変換メソッド名は「"to"+オブジェクト名」にする
      良い例:

      java
      public String toString() {

      悪い例:

      java
      public String string() {
    • ゲッターメソッド名は「"get"+属性名」にする
      型がbooleanの場合は「"is"+属性名」にする

    • セッターメソッド名は「"set"+属性名」にする

    • boolean変数を返すメソッド名はtrue/falseの状態がわかるようにする

      良い例:

      java
      public boolean isAsleep() {
      +}
      +public boolean exists() {
      +}
      +public boolean hasExpired() {
      +}

    引数

    • メソッドのパラメータ名とインスタンス変数名を一緒にしない
      ただし、アクセサメソッドやコンストラクタなど、統合開発環境の機能により自動生成するものに関しては可とする。
      アンダースコア _ をつけての区別は原則禁止とする。

      良い例:

      java
      public double calc(double rate) {
      +    return this.value * rate;
      +}

      悪い例:

      java
      public double calc(double value) {
      +    return this.value * value;
      +}
      +
      +public double calc(double _value) {
      +    return this.value * _value;
      +}

    変数全般

    • boolean変数はtrue/false の状態がわかるようにする

      良い例:

      java
      private boolean isOpen;

      悪い例:

      java
      private boolean flag;
    • 定数は全てstatic finalとし、すべて大文字、区切りは"_"

      良い例:

      java
      private static final String SYSTEM_NAME = "販売管理システム";
    • 変数名は小文字とし、単語の区切りのみ大文字にする

      良い例:

      java
      private String thisIsString;

      変数名に固有名詞が含まれる場合、先頭をのぞき、単語の区切り以外に大文字を使用してもよい

      良い例:

      java
      private String thisIsIPAddress;

    ローカル変数

    • スコープが狭い変数名は省略した名前でもよい
      良い例:

      java
      if (・・・) {
      +    String s = "・・・・";
      +   //変数sを利用した処理 数行
      +}

      悪い例:

      java
      String s = "・・・・";
      +if (・・・) {
      +   //変数sを利用した処理
      +}
      +・・・
      +if (・・・) {
      +   //変数sを利用した処理
      +}

      変数sの利用範囲が広いので役割が明確になる変数名に変更する。

    • for 文のループカウンタは、ネストごとに"i","j","k"・・・を使う

    Enum

    • Enum 名はクラス名と同じく、単語の先頭を大文字にする

    • 列挙定数は定数と同じく、すべて大文字、区切りは"_"

      良い例:

      java
      enum Season {
      +    WINTER,
      +    SPRING,
      +    SUMMER,
      +    FALL
      +}

      悪い例:

      java
      enum Season {
      +    winter,
      +    spring,
      +    summer,
      +    fall
      +}

    コーディング規約

    全般

    • 原則としてオブジェクトの参照にはインターフェースを利用する
      オブジェクトを参照する際は、そのオブジェクトの実装クラスを用いて宣言できるが、実装クラスに適切なインターフェースが存在している場合は、必ずインターフェースを用いて宣言すること。

      良い例:

      java
      List<Entry> list = new ArrayList<>();
      +Map<String, String> map = new HashMap<>();

      悪い例:

      java
      ArrayList<Entry> list = new ArrayList<>();
      +HashMap<String, String> map = new HashMap<>();
    • 推奨されない API を使用しない
      アノテーション@Deprecatedで指定されたメソッドは利用しないこと。

    • 使われないコードは書かない

    • 宣言は適切な権限で行うこと(public, protected, private

    • final を適切に利用する
      継承されないクラス、オーバーライドされないメソッド、値の変わらない変数(つまり定数)等、変化のないもの/変化させたくないものについてはfinal で宣言する。

      良い例:

      java
      //継承されないクラス
      +public final class CalculateUtils {
      +    //・・・
      +}
      +
      +//値の変わらない変数(定数)
      +private static final String MESSAGE = "・・・";
      +
      +//オーバーライドされないメソッド
      +public final int sum(/*変化させたくない値*/final int... values) {
      +    int sumValue = 0;
      +    for (/*変化させたくない値*/final int value : values) {
      +        sumValue += value;
      +    }
      +    return sumValue;
      +}

    フォーマット

    • インデントは空白文字 4 文字分の Tab を使用する

    • 長すぎる行は避ける

    • { の後にステートメントを記述しない
      良い例:

      java
      if (s == null) {
      +    return 0;
      +}

      悪い例:

      java
      if (s == null) {return 0;}
    • 1 行に 2 つ以上のステートメントを記述しない
      悪い例:

      java
      } catch (Exception e) {
      +    log.error("Error", e);return null;
      +}
    • カンマの後には空白文字を
      良い例:

      java
      process(x, y, z);

      悪い例:

      java
      process(x,y,z);
    • 代入演算子( = , += , -= , …)の前後には空白文字を挿入する
      良い例:

      java
      int a = x;
      +a += 10;

      悪い例:

      java
      int a=x;
      +a+= 10;
    • for 文内のセミコロンの後には空白文字を挿入する
      良い例:

      java
      for (int i = 0; i < array.length; i++) {
      +    //・・・
      +}

      悪い例:

      java
      for (int i = 0;i < array.length ;i++) {
      +    //・・・
      +}
    • ++-- とオペランドの間には空白文字を入れない
      良い例:

      java
      i++;

      悪い例:

      java
      i ++;
    • ビット演算子( |&^<<>> )の前後には空白文字を挿入する

    • 論理演算子( ||&&)の前後には空白文字を挿入する

    • 関係演算子( <>>=<===!= )の前後には空白文字を挿入する

    • 算術演算子( /% )の前後には空白文字を挿入する

    • return 文ではカッコを使わない
      良い例:

      java
      int answer = (a + b + c) * d;
      +return answer;

      悪い例:

      java
      return ((a + b + c) * d);
    • if などの条件式で boolean の変数を比較しない

      良い例:

      java
      if (hasStock)

      悪い例:

      java
      if (hasStock == true)
    • 不等号の向きは左向き( <<= )にする
      良い例:

      java
      if (from <= x && x <= to) {

      悪い例:

      java
      if (x >= from && x <= to) {

    コメント

    • ファイルの先頭への Copyright の表記について
      ソースのファイルヘッダにコピーライト標記は法的拘束力がないため、不要とする。
      ただし、顧客からの要求があった場合を除く。

    • Javadoc コメントには、少なくとも author と version(クラス)、param と return と exception(メソッド)を記述する

      • 今後もバージョンアップのリリースが予定されているソースでは、上記に加えて since(バージョン)を記述する
      • @Overrideのあるメソッドでは、上記に加えて{@Inherit}を記述する
    • Javadoc  クラスヘッダコメントのフォーマットは以下の通り

      良い例:

      java
      /**
      + * Action(or Bean)クラス メニュー名称
      + *
      + * @author 姓 名
      + * @version バージョン YYYY/MM/DD 説明
      + */
    • コメントは必要なものだけを簡潔に
      悪い例:

      java
      /**
      + * 文字列に変換
      + */
      +@Override
      +public String toString() {
      +
      +/**
      + * コピー
      + *
      + * @return コピーしたインスタンス
      + */
      +public Entry copy() {
    • 不要なコメントは記載しない

      • コードからすぐわかること・冗長なコメント
      • 名前の説明
        コメントではなくわかりやすい名前を付ける。
      • 別システムで管理している内容
        ソースコード管理システム、バグトラッキングシステムで管理している内容はソースコードにコメントで記載する必要はない。
        • コメントアウトされたコード
          ソースコード管理システムで管理されている

    インポート

    • java.langパッケージはインポートしない

      悪い例:

      java
      import java.lang.String;//必要のない記述
    • 原則として static インポートしない
      JUnit の作成やフレームワークとして static インポートが推奨されるような場合は利用してもよい

    • 原則としてオンデマンドのインポート宣言(type-import-on-demand declaration)(アスタリスク*によるインポート) は行わない

      悪い例:

      java
      import java.util.*;

    コンストラクタ

    • public 宣言していないクラスにはpublic権限のコンストラクタを作らない
      良い例:

      java
      class Entry {
      +    //・・・
      +    Entry(int id) {
      +        //・・・
      +    }

      悪い例:

      java
      class Entry {
      +    //・・・
      +    public Entry(int id) {
      +        //・・・
      +    }
    • インスタンスメンバを持たない(static メンバのみの)クラスは、private権限のコンストラクタを作成する

    メソッド

    • オーバーライドさせたくないメソッドはfinalを利用する

    • 戻り値が配列のメソッドで、戻る配列のサイズが 0 の場合、メソッドを使用するクライアントの余計な null チェックのロジックを回避するため、null ではなく長さゼロの配列を戻すようにする。 良い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return ArrayUtils.EMPTY_STRING_ARRAY;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return Collections.emptyList();
      +    }
      +    return List.of(s);
      +}

      悪い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return List.of(s);
      +}
    • メソッドは 1 つの役割にする

    クラスメソッド

    • クラスメソッドを利用するときは、クラス名を使って呼び出す
      良い例:

      java
      int comp = Integer.compare(x, y);

      悪い例:

      java
      Integer a = //
      +int comp = a.compare(x, y);

    変数全般

    • 1 つのステートメントには 1 つの変数宣言
      良い例:

      java
      /** 科目コード */
      +private String code;
      +/** 科目名 */
      +private String name;
      +/** 科目略名 */
      +private String shortName;

      悪い例:

      java
      private String code, name, shortName;
    • リテラルは使用しない
      リテラルとは、コード中に、表現が定数として直接現れており、記号やリストで表現することができないものを指す(数値、文字列両方含む 通称マジックナンバー)。コードの可読性・保守性の低下を防ぐために、リテラル定数(static final フィールド)を使用すること。
      例外:-1,0,1 等をカウント値としてループ処理等で使用するような場合

      良い例:

      java
      private static final double ONE_MILE_METRE = 1609.344;
      +
      +public double mileToMetre(double mi) {
      +    return mi * ONE_MILE_METRE;
      +}

      悪い例:

      java
      public double mileToMetre(double mi) {
      +    return mi * 1609.344;
      +}
      • リテラル定数の名前はその値の意味を正しく表現したものにする

        悪い例:

        java
        private static final int ZERO = 0;
    • 配列宣言は「型名[]」にする

      良い例:

      java
      private int[] sampleArray = new int[10];

      悪い例:

      java
      private int sampleArray[] = new int[10];
    • できるだけローカル変数を利用する
      ローカル変数で事足りるものをインスタンス変数として利用するなど、必要のないインスタンス変数を定義すると、パフォーマンスや可読性の低下やの大きな要因となる上、マルチスレッドを意識した際に不整合がおきる可能性があるので、インスタンス変数は必要性を充分に考慮してから使用すること。

    • 定数はfinalで宣言する

    • ローカル変数とインスタンス変数を使いわける

    定数

    • public で宣言するクラス変数とインスタンス変数は、定数のみとし、 static final で定義する
      final ではない static な定数は作成しない。

      良い例:

      java
      public static final String PROTOCOL_HTTP = "http";
    • 定数( static フィールド)に、 static ではないメソッドから書き込まない

    • 定数は、プリミティブ型もしくは、不変(Immutable)オブジェクトで参照する

      • 不変Listの生成にはList.of()を利用する

        良い例:

        java
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);

        悪い例:

        java
        public static final List<Integer> VALUES = Arrays.asList(1, 2, 3, 4, 5);
      • 不変Setの生成にはSet.of()を利用する

      • 不変Mapの生成にはMap.of()を利用する

        良い例:

        java
        public static final Map<Integer, String> VALUES_MAP = Map.of(1, "A", 2, "B", 3, "C");

        悪い例:

        java
        public static final Map<Integer, String> VALUES_MAP = new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +};
      • 不変な配列インスタンスは長さ 0 の配列以外は生成不可能なため、外部から参照される(public)定数では利用せず、List等への置き換えをすること

        良い例:

        java
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);

        悪い例:

        java
        public static final int[] VALUES = { 1, 2, 3, 4, 5 };

    インスタンス変数

    • インスタンス変数はprivateにする

      良い例:

      java
      public class Employee {
      +    private long id;
      +
      +    //・・・
      +    //getter/setter
      +}

      悪い例:

      java
      public class Employee {
      +    public long id;
      +
      +    //・・・
      +    //getter/setter
      +}

    クラス変数

    • public static final 宣言した配列を利用しない
      ※「定数」を参照

    • クラス変数にはクラス名を使用してアクセスすること

      良い例:

      java
      BigDecimal b = BigDecimal.ZERO;

      悪い例:

      java
      BigDecimal a = //
      +BigDecimal b = a.ZERO;

    ローカル変数

    • ローカル変数は利用する直前で宣言する
      行間の程度にもよるが、ある程度まとめて宣言するのは OK とする。

      良い例:

      java
      for (int i = 0; i < lines.length; i++) {
      +    String line = lines[i];
      +    //lineの処理
      +}

      悪い例:

      java
      String line;
      +for (int i = 0; i < lines.length; i++) {
      +    line = lines[i];
      +    //lineの処理
      +}
    • ローカル変数は安易に再利用しない
      一度宣言したローカル変数を、複数の目的で安易に使いまわさないこと。ローカル変数は、役割ごとに新しいものを宣言して初期化することにより、コードの可読性・保守性の向上、及びコンパイラの最適化の促進をはかる。

    引数

    • メソッド引数への代入は行わない
      原則としてfinalで宣言する。

      良い例:

      java
      public void add(final int value) {
      +    //・・・
      +}

    継承

    • スーパークラスのインスタンス変数をサブクラスでオーバーライドしない
      スーパークラスと同じ名前のフィールドをサブクラスで宣言しないこと。 同じ名前のフィールドを宣言すると、スーパークラスのフィールドはサブクラスで宣言されたフィールドによって隠ぺいされてしまうので、他の人の混乱を招くことを防ぐため重複する名前は付けないこと。

      悪い例:

      java
      public class Abs {
      +    protected String name;
      +}
      +
      +public class Sub extends Abs {
      +    protected String name;//Abs#nameは隠ぺいされる
      +}
    • スーパークラスのメソッドをオーバーライドするときは@Override アノテーションを指定する。

      良い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    @Override
      +    protected void process() {
      +
      +    }
      +}

      悪い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    //@Overrideアノテーションの指定がない
      +    protected void process() {
      +
      +    }
      +}
    • スーパークラスで private 宣言されているメソッドと同じ名前のメソッドをサブクラスで定義しない
      スーパークラスにある private メソッドと同じ名前のメソッドをサブクラスで定義しないこと。private メソッドはオーバーライドされず全く別のメソッドとして扱われ、他の人の混乱を招き、バグにつながる恐れがある。

    インナークラス

    • 原則としてインナークラスは利用しない
      一つの java ファイルに複数のクラスを記載するのは NG とする。また無名クラスを利用するのも原則として NG とする。
      Enum の定数固有メソッド実装(constant-specific method implementation)、Java8 のラムダ式は内部的にインナークラスとされるがこれらは許可する。

    メンバー順序

    • 以下の順で記述する

      1. static フィールド
      2. static イニシャライザー
      3. static メソッド
      4. フィールド
      5. イニシャライザー
      6. コンストラクター
      7. メソッド
    • 同一カテゴリー内では以下の可視性の順で記述する

      1. public
      2. protected
      3. パッケージ private
      4. private

    インスタンス

    • オブジェクト同士はequals()メソッドで比較する

      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}

      ただし Enum の場合は==演算子を利用して比較する

      equals()メソッドで比較する際、左辺のオブジェクトが null にならないように制御すること。

    • Class 名を利用した比較をおこなわない

      良い例:

      java
      if (o instanceof Foo) {
      +    // ...
      +}

      悪い例:

      java
      if ("my.Foo".equals(o.getClass().getName())) {
      +    // ...
      +}

    制御構造

    • 制御文( if , else , while , for , do while )の { } は省略しない

      良い例:

      java
      if (s == null) {
      +    return;
      +}

      悪い例:

      java
      if (s == null)
      +    return;
    • ステートメントが無い {} ブロックを利用しない
      悪い例:

      java
      //{}内の記述が無い
      +if (s == null) {
      +}
    • if / while の条件式で = は利用しない
      良い例:

      java
      boolean a =//
      +if (!a) {
      +    //・・・
      +}

      悪い例:

      java
      boolean a =//
      +if (a = false) {//コーディングミス
      +    //・・・
      +}
      +
      +
      +boolean a =//
      +boolean b =//
      +if (a = b) {//おそらくコーディングミス
      +    //・・・
      +}
    • forwhile の使い分けを意識する

    • for 文を利用した繰り返し処理中でループ変数の値を変更しない
      悪い例:

      java
      String[] array = { /*・・・*/ };
      +for (int i = 0; i < array.length; i++) {
      +    //・・・
      +    i += 2;//NG
      +}
      +
      +for (String s : array) {
      +    //・・・
      +    s = "string";//NG
      +}
    • for 文のカウンタは特別な事情がない限り、0 から始める

    • 配列やリストなどの全要素に対するループ処理は拡張 for 文を使用する。
      良い例:

      java
      for (int value : array) {
      +    //・・・
      +}
      +
      +for (String value : list) {
      +    //・・・
      +}
    • 配列をコピーするときはArrays.copyOf()メソッドを利用する

      良い例:

      java
      int[] newArray = Arrays.copyOf(array, array.length);

      悪い例:

      java
      int[] newArray = new int[array.length];
      +System.arraycopy(array, 0, newArray, 0, array.length);
    • 繰り返し処理中のオブジェクトの生成は最小限にする

    • if 文と else 文の繰り返しや switch 文の利用はなるべく避け、オブジェクト指向の手法を利用する
      良い例:

      java
      CodingKind codingKind = toCodingKind(kind);
      +d = codingKind.encode(s);
      +
      +//---
      +
      +CodingKind codingKind = toCodingKind(kind);
      +s = codingKind.decode(d);

      悪い例:

      java
      switch (kind) {
      +case 1:
      +    d = encode1(s);
      +    break;
      +case 2:
      +    d = encode2(s);
      +    break;
      +default:
      +    break;
      +}
      +
      +//---
      +
      +switch (kind) {
      +case 1:
      +    s = decode1(d);
      +    break;
      +case 2:
      +    s = decode2(d);
      +    break;
      +default:
      +    break;
      +}
    • 繰り返し処理の内部で try ブロックを利用しない
      特に理由がない場合は繰り返し処理の外にtryブロックを記載する。
      ただし、繰り返し処理内部で例外をキャッチし処理を行いたい場合は繰り返し処理の内部でtryブロックを利用してもよい。

      良い例:

      java
      for (String s : array) {
      +    BigDecimal num;
      +    try {
      +        num = new BigDecimal(s);
      +    } catch (NumberFormatException e) {
      +        num = BigDecimal.ZERO;
      +    }
      +    //・・・
      +}

    文字列操作

    • 文字列同士が同じ値かを比較するときは、equals()メソッドを利用する
      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}
    • 文字列リテラルはnew しない
      良い例:

      java
      String s = "";

      悪い例:

      java
      String s = new String();
    • 更新される文字列にはStringBuilder クラスを利用する
      良い例:

      java
      StringBuilder builder = new StringBuilder();
      +for (String s : array) {
      +    builder.append(s);
      +}
      +System.out.println(builder.toString());

      悪い例:

      java
      String string = "";
      +for (String s : array) {
      +    string += s;
      +}
      +System.out.println(string);

      スレッドセーフ性が保証されていない箇所では`StringBuffer`クラスを利用する

      ※パフォーマンスについても記載しているので参考にしてください

    • 1ステートメントのみで行われる文字列の連結には+演算子を利用する

      良い例:

      java
      String s = s1 + s2;
      +
      +return s1 + s2 + s3 + s4 + s5;

      悪い例:

      java
      String s = new StringBuilder(s1).append(s2).toString();
      +
      +return new StringBuilder(s1).append(s2).append(s3).append(s4).append(s5).toString();
    • 更新されない文字列にはString クラスを利用する

    • 文字列リテラルと定数を比較するときは、文字列リテラルのequals()メソッドを利用する
      良い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (PROTOCOL_HTTP.equals(url.getProtocol())) {
      +
      +}

      悪い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (url.getProtocol().equals(PROTOCOL_HTTP)) {
      +
      +}
    • プリミティブ型とString オブジェクトの変換には、変換用のメソッドを利用する
      良い例:

      java
      int i = 1000;
      +String s = String.valueOf(i);// "1000"
      +s = NumberFormat.getNumberInstance().format(i);// 3桁区切り "1,000"
      +
      +boolean b = true;
      +s = String.valueOf(b);// true/false
      +s = BooleanUtils.toStringOnOff(b);// on/off
    • 文字列の中に、ある文字が含まれているか調べるには、contains()メソッドを利用する

    • システム依存記号( \n\r など)は使用しない。
      悪い例:

      java
      String text = Arrays.stream(array)
      +    .collect(Collectors.joining("\n"));

    数値

    • 誤差の無い計算をするときは、BigDecimal クラスを使う
      浮動小数点演算は科学技術計算に利用するもので、誤差が発生する。これに対して、クラス「BigDecimal」は、文字列で数値の計算を行うので、金額などの正確な計算に適している。BigDecimal ではインスタンス生成時に指定された桁数での精度が保証される。

    • 数値の比較は精度に気をつける
      良い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +if (a.compareTo(b) == 0) {
      +    System.out.println("一致");
      +}

      悪い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +
      +if (a.equals(b)) {
      +    System.out.println("精度が違うためこの分岐には入らない");
      +}
    • 低精度なプリミティブ型にキャストしない

    • BigDecimalString変換する際はtoString()ではなくtoPlainString()を利用すること
      toString()を利用した場合、指数表記になることがあります。

    日付

    • 日付の文字列のフォーマットには、SimpleDateFormatまたはDateTimeFormatterを使う
      良い例:

      java
      Date date = new Date();
      +SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
      +String s = dateFormat.format(date);

    三項演算子

    • 入れ子の三項演算子の利用は禁止
      可読性が悪くなるので三項演算子を入れ子で行うのは禁止。

    コレクション

    • Java2 以降のコレクションクラスを利用する
      Vector クラス、Hashtable クラス、Enumeration 等は、特にこれらを利用する理由がなければ、インターフェースを統一する目的で、これらの代わりにList(ArrayList クラス)、Map(HashMap クラス)、Iterator を使用すること。List などのインターフェースを利用することで JDK1.2 で整理されたわかりやすいメソッドを利用でき、また、インターフェースの特性から呼び出し元を変更せずに実装クラスを変更することができる。

    • 特定の型のオブジェクトだけを受け入れるコレクションクラスを利用する

      良い例:

      java
      List<Map<String, String>> list = new ArrayList<>();
    • ListのソートはList.sort()を利用する
      Listクラスの要素をソートする際は Java8 で追加されたList.sort()を利用すること。
      Java 7 以前で利用されていたCollections.sort()は利用しないこと。

    • Collection.forEach()は利用しない。拡張 for 文の利用を検討する
      Java8 で追加されたメソッド。
      拡張 for 文を利用したほうが多くの場合でデバッグに有利であり、可読性においてもforEachの優位性は少ないため、forEachは原則利用しない。拡張 for 文を利用する。
      具体的には下記のメソッドを利用しないこと。

      • Collection#forEach
      • Set#forEach
      • List#forEach

      Map#forEachはこの限りではない

      良い例:

      java
      for (String s : List.of("A", "B")) {
      +    //処理
      +}

      悪い例:

      java
      List.of("A", "B").forEach(s -> {
      +    //処理
      +});

      ただし、メソッド参照で処理できる場合はforEachを利用する。
      (デバッグのデメリットがほとんどなく、他と比較して処理効率が良いため)

      良い例:

      java
      List.of("A", "B").forEach(this::process);

      悪い例:

      java
      for (String s : List.of("A", "B")) {
      +    this.process(s);
      +}
    • Arrays.asList()は利用せず、List.of()を利用する
      Java9 で追加されたメソッド。
      配列をListに置き換える場合や、単純な固定のListを生成する際にはList.of()を利用する。

      • Arrays.asList()List.of()の違い
        List.of()で生成したListは、完全に不変(Immutable)なListで、
        Arrays.asList()で生成したListは、サイズのみ不変で、set等による値の操作が可能なListです。
        また、setを行った場合、Arrays.asList()に与えられた配列インスタンスにも影響します。

    ラムダ式・メソッド参照・コンストラクタ参照

    • ラムダ式が利用できる箇所はラムダ式を利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • ただし、メソッド参照・コンストラクタ参照が利用できる場合はメソッド参照・コンストラクタ参照を利用する

      良い例:

      java
      String::compareToIgnoreCase

      悪い例:

      java
      (s1, s2) -> s1.compareToIgnoreCase(s2)

      良い例:

      java
      BigDecimal::add

      悪い例:

      java
      (b1, b2) -> b1.add(b2)
    • ラムダ式記述の際、型宣言は省略記法で記述する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (String s1, String s2) -> s1 + "=" + s2
    • 原則ラムダ式内の行数は 1 行とする
      複数行で利用したい場合は、privateメソッドを作成しメソッド参照を利用する

      良い例:

      java
      this::getMax
      +
      +private int getMax(int i1, int i2) {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}

      悪い例:

      java
      (i1, i2) -> {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}
    • 原則ラムダ式は 1 行記述に限定するので、中カッコ、returnは必ず省略する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (s1, s2) -> {
      +    return s1 + "=" + s2;
      +}

    実質的 final(effectively final)

    • 実質的 final を利用する
      変数宣言にfinalを記載しなくてよい。

    Stream API

    • 利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • 並列ストリームは利用しないこと
      悪い例:

      java
      Stream<?> s = list.parallelStream();
      +Stream<?> s = list.stream().parallel();
    • StreamAPI 記述の際の改行位置は、各中間処理・末端処理前のピリオドの前で改行する

      良い例:

      java
      List<Character> alphabetLower = list.stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .collect(Collectors.toList());

      悪い例:

      java
      List<Character> alphabetLower = list.stream().filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase).collect(Collectors.toList());
      +
      +List<Character> alphabetLower = list
      +    .stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .collect(Collectors.toList());
    • インデントは統合開発環境の提供するフォーマッタに合わせる

    • 中間処理の数は 3 つ(3 行)程度までを推奨する
      中間処理の記述が多くなると可読性も悪くなり、デバッグも難しくなるため、3 行程度を目安にロジックを検討すること。

    • コメントは、原則として処理中には記載しない
      難解になってしまった場合のみ処理中の記載を認める

      良い例:

      java
      // クラスFooのフィールドStrの値で昇順にソートし、フィールドStrの要素を取得して処理する。
      +hogeList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    .map(Foo::getStr)
      +    .forEach(this::proc);

      悪い例:

      java
      hogeList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr)) //クラスFooのフィールドStrの値で昇順にソート
      +    .map (Foo::getStr) //フィールドStrの要素を取得
      +    .forEach(this::proc); //処理
      +
      +
      +hogeList.stream()
      +    //クラスFooのフィールドStrの値で昇順にソート
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    //フィールドStrの要素を取得
      +    .map (Foo::getStr)
      +    //処理
      +    .forEach(this::proc);
    • Stream は極力変数代入しないこと
      Stream は中間処理、末端処理を行うと使用済みとなり、以降同じインスタンスは利用できない。
      変数代入はほとんどの場合意味をなさず、むしろミスの元となるため極力変数代入はしないこと。

      良い例:

      java
      List<String> list1 = Stream.of("A", "B", "C")
      +        .map(String::toLowerCase)
      +        .collect(Collectors.toList());
      +
      +List<String> list2 = Stream.of("A", "B", "C")
      +        .map(s -> s + s)
      +        .collect(Collectors.toList());

      悪い例:

      java
      Stream<String> stream = Stream.of("A", "B", "C");
      +Stream<String> stream1 = stream.map(String::toLowerCase);
      +List<String> list1 = stream1.collect(Collectors.toList());
      +
      +Stream<String> stream2 = stream.map(s -> s + s);//コーディングミス streamは使用済のためエラーになる
      +List<String> list2 = stream2.collect(Collectors.toList());

    Optional

    • Optional は同メソッド内で値を取り出す場合は極力変数代入しないこと
      Optional とその値の変数は同じものを示す名前となり、同じ意味の変数名が複数現れることで可読性が下がるため、Optional の変数代入は行わないこととする。

      良い例:

      java
      Employee employee = findEmployee(employeeId)
      +        .orElseThrow(IllegalArgumentException::new);

      悪い例:

      java
      Optional<Employee> employeeOpt = findEmployee(employeeId);
      +Employee employee = employeeOpt.orElseThrow(IllegalArgumentException::new);

      直接、値を取り出すことなくOptionalでのみ扱う場合はOptionalを変数代入してもよい。

      良い例:

      java
      Optional<Employee> employee = findEmployee(employeeId);
      +
      +Dept dept = employee.map(Employee::getDivision)
      +        .map(Division::getDept)
      +        .orElse(null);
      +
      +Role role = employee.map(Employee::getRole)
      +        .orElse(null);
      +
      +//-----
      +
      +Optional<Employee> employee = findEmployee(employeeId);
      +//・・・処理
      +return employee;

    var (Local-Variable Type Inference)

    次のリンクも参考にしてください。
    Style Guidelines for Local Variable Type Inference in Java

    • 明確な方針で、利用する・利用しないを統一すること
      方針無く、varを混在させるとソースコードの見通しと保守性が悪くなります。
      各プロジェクトで、例えば以下ののような方針で統一してください。

      1. varを利用しない
      2. 原則varを利用する
      3. 右辺で、明確に型がわかる場合はvarを利用する

      以下で23について例を示します。

      • 原則varを利用する

        利用できる箇所は全てvarを利用します。

        良い例:

        java
        var a = "";
        +var b = 123;
        +var c = new ArrayList<String>();

        悪い例:

        java
        var a = "";
        +int b = 123;
        +List<String> c = new ArrayList<>();
        java
        void methodA() {
        +    var a = "";
        +}
        +void methodB() {
        +    String a = "";
        +}
      • 右辺で、明確に型がわかる場合はvarを利用する

        右辺をみて型がわかる場合は、全てvarを利用します。 それ以外はvarを利用してはいけません。

        良い例:

        java
        var s = ""; // リテラルによって型が明確に判断できます
        +var list1 = new ArrayList<String>(); // newによって型が明確に判断できます
        +var list2 = (List<String>) map.get("p"); // キャストによって型が明確に判断できます
        +var list3 = List.of("A", "B", "C"); // ファクトリーによって型が明確に判断できます

        プロジェクトで観点を決めるべき例:

        java
        var b1 = s.isEmpty(); // `is`で始まるメソッドは通例としてbooleanを返します
        +var b2 = Objects.equals(s1, s2); // `equals`メソッドは通例としてbooleanを返します
        +var i1 = Objects.hash(s); // `hash`、`hashCode`メソッドは通例としてintを返します
        +var i2 = Objects.compare(s1, s2); // `compare`、`compareTo`メソッドは通例としてintを返します

        悪い例:

        java
        var a = e.getData(); // `e`の型と、メソッド定義がわからなければ型が判断できません

    ストリーム(InputStream OutputStream)

    • ストリームを扱う API を利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • ObjectOutputStream ではreset()を利用する

    リソースの解放

    • リソース解放を必要とするクラスを利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • リソース解放を必要とするクラスを作成する場合はAutoCloseableimplementsする
      AutoCloseableimplementsすることで try-with-resources 文が利用できるようになります。

    例外

    • catch 文で受け取る例外は、詳細な例外クラスで受け取る

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (IOException e) {
      +    log.error("Error", e);
      +    throw e;
      +}

      悪い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (Exception e) {//範囲が広すぎる例外クラスの利用はNG
      +    log.error("Error", e);
      +    throw e;
      +}
    • Exception クラスのオブジェクトを生成してスローしない

    • catch ブロックでは基本、例外処理をする。ただし処理を書いてはいけない部分もあるので、その部分については、"// ignore" というコメントを記述すること。

    • 例外クラスは無駄に定義しない

    ガベージコレクション

    • 原則finalize()のオーバーライド実装は禁止
    • もしfinalize()をオーバーライドした場合はsuper.finalize() を呼び出す
    • アプリケーションからfinalize()を呼び出さない

    コメント規約

    よいコメントの鉄則

    • コードを明確化するコメントを書く
      コードにコメントを書く理由は、自分自身、一緒に仕事をしている人、後に関わる開発者にとってコードをより理解しやすいものにするためである。

    • コメント化する価値がないプログラムならば、実行するに値しない
      有用な格言。コメントは必須。

    • 過剰な装飾は使わない (例:見出し状のコメント)
      1960 年代から 1970 年代の典型的な COBOL プログラマにはアスタリスク( * )でコメントを囲った箱を書く習慣があった。彼らの芸術的な主張を表わしているのかもしれないが、率直に言えばそれは製品に加わるちょっとした価値に比べれば大きな時間の無駄である。かわいいコードではなくきれいなコードを書くはずである。さらに、コードを表示するディスプレイや印刷するプリントに使われるフォントはプロポーショナルだったりそうでなかったりして、箱をきれいに整列させることは難しい。

    • コメントはシンプルに
      かつて見たもっとも最良のコメントは、シンプルな要点をまとめた注釈であった。なにも本を書く必要はなく、他の人がコードを理解するに十分な情報を提供するだけでよいのである。

    • コードを書く前に先にコメントを記述する
      コードをコメント化する最良の方法は、コードを書く前にコメントを書くことである。それが、コードを書く前にコードがどのように動作するかについて考えるよい機会となり、コメントの存在を保障することにもつながる。少なくともコードを書いた時にコメントすべきである。コメントによってコードが理解しやすくなることで、コードの開発中にアドバンテージを得ることができる。コードにコメントを書く時間を費やせば、それによって得られるものがある。

    • コメントには、なぜそうなのかを書く。コードを読めば分かることを書かない
      基本的に、コードの一部分を見ればそれが何かを理解することはできる。例えば、以下のコードを見て、$1000 以上の注文については 5%ディスカウントされることは理解できる。なぜそうなのか?大きな注文ではディスカウントがつきものだというビジネスルールがあるのだろうか?大きな注文に時間限定サービスがあるのか、それともずっとサービスがあるのか?これを書いたプログラマの気前がよかったのか?
      どこかソースコード中か別な文書にコメントされていない限り、それがなぜなのかを知ることはできない。

      java
      if (grandTotal >= 1000.00) {
      +    grandTotal = grandTotal * 0.95;
      +}

      なお、メソッドコメントには、適切な javadoc コメント(タグ)のほかに、以下の内容も可能な限り明記すること。

      • 副作用のある処理の場合は、その内容 (→ メソッドの引数オブジェクトがメソッド内で変更されるケースなど)
      • 既知のバグ (→ 判明しているが修正しないことにした場合など)
      • 影響のある事前条件、事後条件 (→ メソッドが正しく動作するための前提について)
      • 並行性 (→  マルチスレッドでアクセスされた場合の動作について)
      • 該当メソッドの使用例やサンプルコード
    • TODO コメント
      設計者確認待ち、共通処理の作成待ちなどの理由により、実装時に TODO がある場合、下記のようにコメントを記述する。
      (Eclipse の TODO コメント形式を採用)
      例)

      //TODO:ワークフローの仕様決定待ち 関連チケット#12345

    Java コメント(3 種類)の使い分け

    Java では 3 種類のコメントが使える。javadoc コメントは/**で開始され、*/で終わる。C 風コメントは/*で開始され*/で終わる。単一行コメントは//で開始され、そのソースコード行が終わるまで続く。以下の表ではコメントの使い方とその例を示す。(コメントのスタイルに関しては、前述の「標準規約に準拠したコーディング例」を参照)

    コメント種類使用方法
    javadoc コメント
    /** comment */
    interface、class、メソッド、フィールドの直前に書く。コメントは javadoc によって処理され、外部ドキュメント(HTML)として生成される。(この形式以外のコメントはドキュメントとして出力されないことに注意)/*_
    _ 顧客(Customer)-
    _ 顧客はわれわれがサービスまたは製品を売った人物
    _ もしくは組織のいずれかである。
    _ @author 開発太郎
    _/
    C 風コメント
    /* comment */
    特定のコードを無効化したいが、後で使用するかもしれないので残しておくためにコメント化する時や、デバッグ時に一時的に無効化するときに使用する。/_
    このコードは J.T.Kirk によって 1997.12.9 に前述のコードと置き換えたためコメント化した。2 年間不要であるならば削除せよ。
    ... (ソースコード)
    _/
    単一行コメント
    // comment
    メソッド内にて、ビジネスロジック、コードの概要、一時変数の定義内容などを記述する。// 1995 年 2 月に開始された X 氏の寛大なキャンペーンで
    // 定められた通り 1000$を超える請求には、全て 5%割引を
    // 適用する。

    ※ ロジック中に、頻繁に C 風コメントでコメントを書くとまとめてコメントアウトする場合に不便なため、基本的にロジック中では単一行コメントを利用すること。

    パフォーマンス

    パフォーマンスを考慮した Java のコーディングについて以下に示す。

    ※ パフォーマンスは jre のバージョンやスペックによって変化します。本内容は jre1.8.0_74 での検証結果を元にした内容です。

    ※ 性能計測結果についての記載がありますが、あくまでも参考値です。性能を保証するものではありません。

    Stream API

    Java8 で追加された Stream API での記述は、可読性も高く、簡潔に書けますが、パフォーマンス・性能面で注意が必要な場合があります。

    List の処理を行う際、拡張 for 文で処理する場合は Iterator インスタンスが 1 つだけ生成されますが、Stream API で処理する場合、最初の Stream インスタンスに加え、各中間処理ごとにも Stream インスタンスが生成され、その分の性能劣化が懸念されます。
    以下に処理例と計測結果を記載します。

    • 拡張 for 文

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = new ArrayList<>();
      +for (String string : list) {
      +    if (string.endsWith("0")) {
      +        resultList.add(string);
      +    }
      +}
      +return resultList;
    • Stream API

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = list.stream()
      +    .filter(s -> s.endsWith("0"))
      +    .collect(Collectors.toList());
      +return resultList;
    • 計測結果

      処理する List の件数拡張 for 文 (ms)StreamAPI (ms)
      100 万件79
      1,000 万件88114
      1 億件9491,026
      2 億件1,8222,081

    小中規模の処理量であれば考慮するほどの性能差はありませんが、大量の処理が見込まれる場合は考慮が必要です。
    また、Stream API は並列処理(スレッド処理)の機能をサポートしていますので、利用できる場合は並列処理も含めての検証が必要です。

    ラムダ式・メソッド参照・コンストラクタ参照

    Java8 で追加されたラムダ式・メソッド参照・コンストラクタ参照は、匿名クラスを利用するよりも効率的です。
    積極的な利用を推奨します。

    以下に Comparator を生成した場合の計測結果を記載します。

    • 匿名クラス

      java
      Comparator<String> c = new Comparator<String>() {
      +    @Override
      +    public int compare(String o1, String o2) {
      +        return o1.compareToIgnoreCase(o2);
      +    }
      +};
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> o1.compareToIgnoreCase(o2);
    • メソッド参照

      java
      Comparator<String> c = String::compareToIgnoreCase;
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)メソッド参照 (ms)
      10 億回3800(計測不能)0(計測不能)
      100 億回6,3740(計測不能)0(計測不能)
      1 京回(30 秒以上)1410

    ラムダ式は外部の変数を利用する場合、匿名クラスとほぼ同じ動作をします。

    • 匿名クラス

      java
      new Comparator<String>() {
      +        @Override
      +        public int compare(String o1, String o2) {
      +            return arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                            : o1.compareToIgnoreCase(o2);
      +        }
      +    }
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                    : o1.compareToIgnoreCase(o2);
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)
      10 億回(パラメータあり)571572
      100 億回(パラメータあり)9,9009,864

    文字列連結

    文字列連結(繰り返し)

    文字列連結を繰り返し処理中で行う際、+演算子で処理することはアンチパターンとして知られています。
    繰り返し処理中の文字列連結は、 StringBuilderStringJoinerStringBuffer を利用します。
    また、コレクション要素の結合であればString#joinが利用できます。

    以下に処理例と計測結果を記載します。

    • +演算子

      java
      String s = "";
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        s += ",";
      +    }
      +    s += string;
      +}
      +return s;
    • StringBuilder

      java
      StringBuilder sb = new StringBuilder();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • StringBuffer

      java
      StringBuffer sb = new StringBuffer();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • String#join

      java
      return String.join(",", list);
    • 計測結果

      処理する List の件数+演算子 (ms)StringBuilder (ms)StringBuffer (ms)String#join (ms)
      1,000 件50(計測不能)0(計測不能)0(計測不能)
      1 万件1,016111
      10 万件(30 秒以上)255
      100 万件(30 秒以上)294251

    文字列連結(定数)

    基本的に処理中の文字列連結では+演算子は使わないで処理するほうがパフォーマンスが高くなりますが、定数の場合は+演算子で定義するほうがパフォーマンスが高いです。

    たとえば以下のように、処理したい場合、

    java
    private static final String CONST_A = "A";
    +private static final String CONST_B = "B";
    +private static final String CONST_AB = CONST_A + CONST_B;

    StringBuilder で処理しようとすると以下のようになります。

    java
    private static final String CONST_AB = new StringBuilder(CONST_A).append(CONST_B).toString();

    しかし、これらをバイトコード上で確認するとそれぞれ以下のようになります。

    • +演算子

      java
      private static final java.lang.String CONST_AB = "AB";
    • StringBuilder

      java
      private static final java.lang.String CONST_AB;
      +
      +static {};
      +   0  new java.lang.StringBuilder [20]
      +   3  dup
      +   4  ldc <String "A"> [8]
      +   6  invokespecial java.lang.StringBuilder(java.lang.String) [22]
      +   9  ldc <String "B"> [11]
      +  11  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [26]
      +  14  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [30]
      +  17  putstatic jp.co.packagename.ClassName.CONST_AB : java.lang.String [34]
      +  20  return

    +演算子を利用した場合コンパイル時に最適化され、文字列"A""B"をあらかじめ結合して class が作成されます。
    StringBuilderを利用した場合は最適化はされず、記述した通りの処理が行われます。

    計測した場合、下記のようになります。

    • 計測結果

      処理回数StringBuilder (ms)+演算子 (ms)
      5,000 万回5590(計測不能)
      1 億回1,0590(計測不能)

    通常、定数処理を大量に処理することは考えられないので性能問題になることはありませんが、+演算子を利用したほうがパフォーマンスが高いこともあるということを理解してください。

    List の種類

    ListにはArrayListのようなRandomAccessを implements した、ランダムアクセスをサポートしているクラスと、
    LinkedListのようなランダムアクセスをサポートしていない(シーケンシャルアクセス)クラスが存在します。
    RandomAccessではないListは、List#getなどインデックスを利用するような操作のパフォーマンスが低いので注意してください。

    以下に処理例と計測結果を記載します。

    • for 文(List#get(int)によるループ)

      java
      int size = list.size();
      +for (int i = 0; i < size; i++) {
      +    String s = list.get(i);
      +    //処理
      +}
    • 拡張 for 文

      java
      for (String s : list) {
      +    //処理
      +}
    • forEach

      java
      list.forEach(this::処理);
    • 計測結果

      処理する List の件数ArrayList
      for 文(List#get(int)によるループ) (ms)
      LinkedList
      for 文(List#get(int)によるループ) (ms)
      ArrayList
      拡張 for 文 (ms)
      LinkedList
      拡張 for 文 (ms)
      ArrayList
      forEach (ms)
      LinkedList
      forEach (ms)
      1 万件0(計測不能)730(計測不能)0(計測不能)0(計測不能)0(計測不能)
      10 万件0(計測不能)7,5760(計測不能)0(計測不能)12
      20 万件0(計測不能)17,7400(計測不能)0(計測不能)0(計測不能)0(計測不能)
      50 万件0(計測不能)(30 秒以上)0(計測不能)20(計測不能)2
      100 万件1(30 秒以上)0(計測不能)40(計測不能)4
      1,000 万件16(30 秒以上)845644

    ランダムアクセスをサポートしているListがシーケンシャルアクセス(iterator を利用した処理など)で遅いということはないので、
    ループの処理は拡張 for 文等、Iterator によるループで記述するのが無難です。
    List#getでの処理をすべて禁止することはできませんが、高いパフォーマンスが求められる場合はListの種類にも注目してみてください。

    String から Integer・Long への変換

    数値文字列のStringIntegerに変換するには、Integer#valueOf(String)を利用して下記のように記述します。

    java
    String s = "1";
    +Integer value = Integer.valueOf(s);

    しかし、下記のようにも記述できます。

    java
    String s = "1";
    +Integer value = new Integer(s);

    これらの違いは、
    new Integer(s)とした場合、必ず Integer インスタンスが生成されますが、
    Integer.valueOf(s)とした場合は -128 から 127 の間の数値であればキャッシュから取り出すためインスタンスを生成しません。

    このため、前者のInteger#valueOf(String)を利用した記述のほうが効率的です。
    Long#valueOf(String)も同様です。

    性能差が少ないため、ほとんど問題にはなりませんが、FindBugs 等、静的解析で検出される問題のため、理解が必要です。

    また、String からの変換だけでなく、int や long からの変換も#valueOfが効率的ですが、オートボクシングを利用した場合、コンパイルで自動的にこれらの処理に変換されるため、記述することはありません。

    String から int・long への変換

    数値文字列のStringintに変換するには、Integer#parseInt(String)を利用して下記のように記述します。

    java
    String s = "1";
    +int value = Integer.parseInt(s);

    しかし、オートボクシングが利用できるため、意図せず下記のように記述ミスをする場合があります。

    java
    String s = "1";
    +int value = Integer.valueOf(s);//取得したIntegerインスタンスをオートボクシングでintにcastしている
    java
    String s = "1";
    +int value = new Integer(s);//生成したIntegerインスタンスをオートボクシングでintにcastしている

    「オートボクシング」の説明に記載した通り、性能に差が出るだけでなく、
    記述から明らかにミスであることが解るため、FindBugs 等、静的解析で検出されるコードです。

    longへの変換の場合はLong#parseLong(String)を利用します

    以下に計測結果を記載します。

    • 計測結果

      処理回数Integer.valueOf(String) (ms)Integer#parseInt(String) (ms)
      1,000 万回396318
      1 億回4,0603,077

    BigDecimal の ZERO との比較

    BigDecimal の正・負・ZERO の判定はBigDecimal#signumを利用します。
    compareToを利用してBigDecimal.ZEROと比較しても同じことができますが、signumを利用したほうが効率的です。

    以下に処理例と計測結果を記載します。

    • compareTo 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.compareTo(BigDecimal.ZERO) == 0) {
    • signum 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.signum() == 0) {
    • 計測結果

      (単位:マイクロ秒)

      処理回数compareTo 利用 (マイクロ秒)signum 利用 (マイクロ秒)
      1 京回527
      max:26,367
      min:0
      424
      max:21,213
      min:0

    性能差が少ないので、必ずしも signum を利用する必要はありませんが、大量に処理する場合など、高いパフォーマンスが求められる場合は意識してください。


    License

    CC-By-4.0

    + + + + \ No newline at end of file diff --git "a/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.html" "b/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.html" new file mode 100644 index 00000000..50606f5f --- /dev/null +++ "b/documents/forJava/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204_for_8.html" @@ -0,0 +1,531 @@ + + + + + + Javaコーディング規約 for Java8 | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Javaコーディング規約 for Java8

    Future Enterprise Coding Standards

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    一般に利用・参照されている Java コーディング規約やガイドラインを以下に示す。本規約の作成においても、下記規約類を参照・抜粋している。

    規約著作者URL
    Code Conventions for the Java Programming LanguageSun Microsystemshttp://www.oracle.com/technetwork/java/codeconvtoc-136057.html
    Writing Robust Java CodeScott W. Amblerhttp://www.ambysoft.com/downloads/javaCodingStandards.pdf
    オブジェクト倶楽部版 Java コーディング標準オブジェクト倶楽部http://objectclub.jp/community/codingstandard/CodingStd.pdf
    電通国際情報際サービス版 Java コーディング規約 2004電通国際情報サービスhttp://objectclub.jp/community/codingstandard/JavaCodingStandard2004.pdf
    JJGuideline (Java - J2EE Conventions and Guidelines)Stephan.J & JCS Teamhttp://www.fedict.belgium.be/sites/default/files/downloads/Java_J2EE_conventions_and_guidelines_EN.pdf
    Google Java Style (非公式和訳)Googlehttps://kazurof.github.io/GoogleJavaStyle-ja/
    Acroquest Technology Java コーディング規約Acroquest Technologyhttps://www.acroquest.co.jp/webworkshop/javacordingrule/Acroquest_JavaCodingStandard_6_7.pdf
    ※現在は削除されています

    ※ Sun Microsystems の規約は Java 草創期から一応の標準という位置づけだったが、オブジェクト指向、及び、その開発環境の普及・発展によって、設計やコーディングにおいて、直接的に有用な知識や豊富な指針を含むような優れた規約や、ツールなどによる機械的な準拠チェックと連携する規約が普及してきている。

    規約の重要性

    標準としての規約を定義し、遵守することの重要性を以下に示す。

    • ソフトウェアメンテナンスにおける、可読性・保守性・拡張性の向上
    • 問題を起こしやすい実装を未然に回避することによる、品質・生産性の向上
    • 標準規約を通して得られる一般的な実装知識やノウハウ(=学習効果)

    コーディングの心得

    長いプログラムを記述すること(ステップ数)によって生産性が評価されたのは、過去の時代の出来事である。現在は、クラスやメソッドの役割が明確で、ロジックが読みやすく、保守性に優れたプログラムを記述することが評価される。コーディング規約は、コードの書き方に関する一種のパターンと考えることもでき、コードの保守性を向上させる具体的な方法を示している。したがって、規約の一つ一つの意図を理解し、守ることが重要になる。しかし、保守性に優れたコードを作成するためには、コーディング規約を守ることに加えて、良いコードを記述するための基本的な心構えをしっかり心に留めておく必要がある。以下では、その心得について述べる。

    【コーディングの心得 5 か条】

    1. 見やすさを重視せよ
    2. ネーミングはわかりやすく
    3. サンプルを鵜呑みにしない
    4. 同じコードを二度書かない
    5. 役割は一つに

    見やすさを重視せよ

    「良いコード」の基本は、「他の人が読んでもわかりやすいと感じられるコード」。コードの見やすさは、フォーマットはもちろん、ロジックの簡潔さや API の常識的な使い方などから生まれる。コーディングにあたっては、常に他の人の視点を意識しながら、見やすさに気を配って記述する必要がある。例えば、自分で記述したコードであっても、しばらくたってから読み返してみると理解に時間がかかった経験は誰にもあるはず。「3 日前に書いたコードは他人のコードと同じ」ということもよく言われる。見やすさを重視することは、他の人のためだけでなく自分のためにもなる。コードを読んでもすぐに理解できないような実装は、再考(リファクタリング)の必要がある。

    ネーミングはわかりやすく

    コーディングでは、様々な変数やメソッドなどにネーミング(名前付け)する必要がある。ネーミングとは、本来、その対象の本質を表すような名前を考える作業である。大変難易度の高い作業だが、一方で適当に行ってもコードの動作は変わらないため、人によっては手を抜きがちとなる。しかし、ネーミングの良し悪しは、コードの可読性に非常に大きな影響を及ぼす。例えば、「C0001」というクラス名があるとする。これでは、何を表すクラスなのかすぐにはわからないだろう。また、「int p = 5000;」という記述があるとする。プログラマに聞くと、変数名 p は価格(Price)の略だと言うのだが、それならば略さずに、「int price = 5000;」としたほうが分かりやすいはずである。「ネーミングはわかりやすく」の背景には、読んで内容が理解できるという意味で、文章のようなプログラミングを行う、という考え方に基づく。

    サンプルを鵜呑みにしない

    サンプルコードを活用すること自体は、著作権等を侵害しなければ問題ない。問題なのは、その内容や背景を理解しないまま、サンプルコードだけを鵜呑みにして、「おまじない」として表面的に適用してしまうことである。コードを「おまじない」ととらえていては、サンプルコードの間違いを気づかないまま適用してしまうこともある。例えば、ストリームのクローズ処理を行っていないサンプルコードであっても、それに気づかずに自分のコードに適用してしまい、後で思わぬ障害を引き起こすという可能性がある。サンプルコードは、そこで説明する内容に絞ったコードが多いため、このような例はよく見られる。また、サンプルコードをそのまま適用した結果、自分が記述すべきコードには必要のないコードが含まれてしまう場合もある。その場合、コードの可読性を下げる原因となる。自分のコードは、自分で深く理解して記述すべきである。

    同じコードは二度書かない

    コードをコピー・ペーストしていませんか?コピー・ペーストしてしまうと、何らかの修正をする際に、全ての個所に同じ修正をする羽目になる。同じコードが現れるようならまとめて一つにし、外に出してコールするような書き方にすべきである。同じコードをまとめる作業は、どちらかといえば、コーディング時よりリファクタリング(ソフトウェアの外部的振る舞いを変更せずに内部構造を改善する作業)で行われることが多い。しかし、コーディング時からできるだけ気をつけておきたいことでもある。

    役割は一つに

    メソッドの役割が明確で、かつ 1 つであれば単体テストが行いやすくなる。つまり、コードの「試験性」が高まる。また、役割が一つであれば、後でコードを変更する際に修正箇所がわかりやすいため、障害修正に要する時間が短くなる。つまり、コードの「保守性」があがることになる。例えば、「チェックをして実行する」機能を実現するために、checkAndDo()メソッドが存在したとする。この場合、このメソッドは check()メソッドと do()メソッドに分割すべきである。なぜなら、checkAndDo()メソッドの check()ロジックに誤りがあった場合、do()メソッドに書かれる内容まで把握する必要が生じるためである。分割してあれば、check()メソッドだけの変更で済む。このことはクラスの設計にもあてはまる。

    ネーミング規約

    全般

    • 大文字・小文字の違いで名前を区別しない。

      良い例:

      java
      private int carNumber;
      +private int trainNumber;

      悪い例:

      java
      private int num;
      +private int Num;

    パッケージ

    • パッケージ名はすべて小文字にする
    • パッケージ名は意味のある名前にする
    • サブパッケージ名の重複は可能

    クラス

    • クラス名は単語の先頭を大文字にする
      良い例:

      java
      public class Entry {

      悪い例:

      java
      public class entry {
    • インターフェース名、Enum 名はクラス名に準ずる

    メソッド

    • コンストラクタと同じ名前のメソッドはつくらない

    • メソッド名は区切りのみ大文字にする
      良い例:

      java
      public String getName() {
      +    //・・・
      +}

      悪い例:

      java
      public String getname() {
      +    //・・・
      +}
      +public String GETNAME() {
      +    //・・・
      +}
    • 変換メソッド名は「"to"+オブジェクト名」にする
      良い例:

      java
      public String toString() {

      悪い例:

      java
      public String string() {
    • ゲッターメソッド名は「"get"+属性名」にする
      型がbooleanの場合は「"is"+属性名」にする

    • セッターメソッド名は「"set"+属性名」にする

    • boolean変数を返すメソッド名はtrue/falseの状態がわかるようにする

      良い例:

      java
      public boolean isAsleep() {
      +}
      +public boolean exists() {
      +}
      +public boolean hasExpired() {
      +}

    引数

    • メソッドのパラメータ名とインスタンス変数名を一緒にしない
      ただし、アクセサメソッドやコンストラクタなど、統合開発環境の機能により自動生成するものに関しては可とする。
      アンダースコア _ をつけての区別は原則禁止とする。

      良い例:

      java
      public double calc(double rate) {
      +    return this.value * rate;
      +}

      悪い例:

      java
      public double calc(double value) {
      +    return this.value * value;
      +}
      +
      +public double calc(double _value) {
      +    return this.value * _value;
      +}

    変数全般

    • boolean変数はtrue/false の状態がわかるようにする

      良い例:

      java
      private boolean isOpen;

      悪い例:

      java
      private boolean flag;
    • 定数は全てstatic finalとし、すべて大文字、区切りは"_"

      良い例:

      java
      private static final String SYSTEM_NAME = "販売管理システム";
    • 変数名は小文字とし、単語の区切りのみ大文字にする

      良い例:

      java
      private String thisIsString;

      変数名に固有名詞が含まれる場合、先頭をのぞき、単語の区切り以外に大文字を使用してもよい

      良い例:

      java
      private String thisIsIPAddress;

    ローカル変数

    • スコープが狭い変数名は省略した名前でもよい
      良い例:

      java
      if (・・・) {
      +    String s = "・・・・";
      +   //変数sを利用した処理 数行
      +}

      悪い例:

      java
      String s = "・・・・";
      +if (・・・) {
      +   //変数sを利用した処理
      +}
      +・・・
      +if (・・・) {
      +   //変数sを利用した処理
      +}

      変数sの利用範囲が広いので役割が明確になる変数名に変更する。

    • for 文のループカウンタは、ネストごとに"i","j","k"・・・を使う

    Enum

    • Enum 名はクラス名と同じく、単語の先頭を大文字にする

    • 列挙定数は定数と同じく、すべて大文字、区切りは"_"

      良い例:

      java
      enum Season {
      +    WINTER,
      +    SPRING,
      +    SUMMER,
      +    FALL
      +}

      悪い例:

      java
      enum Season {
      +    winter,
      +    spring,
      +    summer,
      +    fall
      +}

    コーディング規約

    全般

    • 原則としてオブジェクトの参照にはインターフェースを利用する
      オブジェクトを参照する際は、そのオブジェクトの実装クラスを用いて宣言できるが、実装クラスに適切なインターフェースが存在している場合は、必ずインターフェースを用いて宣言すること。

      良い例:

      java
      List<Entry> list = new ArrayList<>();
      +Map<String, String> map = new HashMap<>();

      悪い例:

      java
      ArrayList<Entry> list = new ArrayList<>();
      +HashMap<String, String> map = new HashMap<>();
    • 推奨されない API を使用しない
      アノテーション@Deprecatedで指定されたメソッドは利用しないこと。

    • 使われないコードは書かない

    • 宣言は適切な権限で行うこと(public, protected, private

    • final を適切に利用する
      継承されないクラス、オーバーライドされないメソッド、値の変わらない変数(つまり定数)等、変化のないもの/変化させたくないものについてはfinal で宣言する。

      良い例:

      java
      //継承されないクラス
      +public final class CalculateUtils {
      +    //・・・
      +}
      +
      +//値の変わらない変数(定数)
      +private static final String MESSAGE = "・・・";
      +
      +//オーバーライドされないメソッド
      +public final int sum(/*変化させたくない値*/final int... values) {
      +    int sumValue = 0;
      +    for (/*変化させたくない値*/final int value : values) {
      +        sumValue += value;
      +    }
      +    return sumValue;
      +}

    フォーマット

    • インデントは空白文字 4 文字分の Tab を使用する

    • 長すぎる行は避ける

    • { の後にステートメントを記述しない
      良い例:

      java
      if (s == null) {
      +    return 0;
      +}

      悪い例:

      java
      if (s == null) {return 0;}
    • 1 行に 2 つ以上のステートメントを記述しない
      悪い例:

      java
      } catch (Exception e) {
      +    log.error("Error", e);return null;
      +}
    • カンマの後には空白文字を
      良い例:

      java
      process(x, y, z);

      悪い例:

      java
      process(x,y,z);
    • 代入演算子( = , += , -= , …)の前後には空白文字を挿入する
      良い例:

      java
      int a = x;
      +a += 10;

      悪い例:

      java
      int a=x;
      +a+= 10;
    • for 文内のセミコロンの後には空白文字を挿入する
      良い例:

      java
      for (int i = 0; i < array.length; i++) {
      +    //・・・
      +}

      悪い例:

      java
      for (int i = 0;i < array.length ;i++) {
      +    //・・・
      +}
    • ++-- とオペランドの間には空白文字を入れない
      良い例:

      java
      i++;

      悪い例:

      java
      i ++;
    • ビット演算子( |&^<<>> )の前後には空白文字を挿入する

    • 論理演算子( ||&&)の前後には空白文字を挿入する

    • 関係演算子( <>>=<===!= )の前後には空白文字を挿入する

    • 算術演算子( /% )の前後には空白文字を挿入する

    • return 文ではカッコを使わない
      良い例:

      java
      int answer = (a + b + c) * d;
      +return answer;

      悪い例:

      java
      return ((a + b + c) * d);
    • if などの条件式で boolean の変数を比較しない

      良い例:

      java
      if (hasStock)

      悪い例:

      java
      if (hasStock == true)
    • 不等号の向きは左向き( <<= )にする
      良い例:

      java
      if (from <= x && x <= to) {

      悪い例:

      java
      if (x >= from && x <= to) {

    コメント

    • ファイルの先頭への Copyright の表記について
      ソースのファイルヘッダにコピーライト標記は法的拘束力がないため、不要とする。
      ただし、顧客からの要求があった場合を除く。

    • Javadoc コメントには、少なくとも author と version(クラス)、param と return と exception(メソッド)を記述する

      • 今後もバージョンアップのリリースが予定されているソースでは、上記に加えて since(バージョン)を記述する
      • @Overrideのあるメソッドでは、上記に加えて{@Inherit}を記述する
    • Javadoc  クラスヘッダコメントのフォーマットは以下の通り

      良い例:

      java
      /**
      + * Action(or Bean)クラス メニュー名称
      + *
      + * @author 姓 名
      + * @version バージョン YYYY/MM/DD 説明
      + */
    • コメントは必要なものだけを簡潔に
      悪い例:

      java
      /**
      + * 文字列に変換
      + */
      +@Override
      +public String toString() {
      +
      +/**
      + * コピー
      + *
      + * @return コピーしたインスタンス
      + */
      +public Entry copy() {
    • 不要なコメントは記載しない

      • コードからすぐわかること・冗長なコメント
      • 名前の説明
        コメントではなくわかりやすい名前を付ける。
      • 別システムで管理している内容
        ソースコード管理システム、バグトラッキングシステムで管理している内容はソースコードにコメントで記載する必要はない。
        • コメントアウトされたコード
          ソースコード管理システムで管理されている

    インポート

    • java.langパッケージはインポートしない

      悪い例:

      java
      import java.lang.String;//必要のない記述
    • 原則として static インポートしない
      JUnit の作成やフレームワークとして static インポートが推奨されるような場合は利用してもよい

    • 原則としてオンデマンドのインポート宣言(type-import-on-demand declaration)(アスタリスク*によるインポート) は行わない

      悪い例:

      java
      import java.util.*;

    コンストラクタ

    • public 宣言していないクラスにはpublic権限のコンストラクタを作らない
      良い例:

      java
      class Entry {
      +    //・・・
      +    Entry(int id) {
      +        //・・・
      +    }

      悪い例:

      java
      class Entry {
      +    //・・・
      +    public Entry(int id) {
      +        //・・・
      +    }
    • インスタンスメンバを持たない(static メンバのみの)クラスは、private権限のコンストラクタを作成する

    メソッド

    • オーバーライドさせたくないメソッドはfinalを利用する

    • 戻り値が配列のメソッドで、戻る配列のサイズが 0 の場合、メソッドを使用するクライアントの余計な null チェックのロジックを回避するため、null ではなく長さゼロの配列を戻すようにする。 良い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return ArrayUtils.EMPTY_STRING_ARRAY;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return Collections.emptyList();
      +    }
      +    return Arrays.asList(s);
      +}

      悪い例:

      java
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return Arrays.asList(s);
      +}
    • メソッドは 1 つの役割にする

    クラスメソッド

    • クラスメソッドを利用するときは、クラス名を使って呼び出す
      良い例:

      java
      int comp = Integer.compare(x, y);

      悪い例:

      java
      Integer a = //
      +int comp = a.compare(x, y);

    変数全般

    • 1 つのステートメントには 1 つの変数宣言
      良い例:

      java
      /** 科目コード */
      +private String code;
      +/** 科目名 */
      +private String name;
      +/** 科目略名 */
      +private String shortName;

      悪い例:

      java
      private String code, name, shortName;
    • リテラルは使用しない
      リテラルとは、コード中に、表現が定数として直接現れており、記号やリストで表現することができないものを指す(数値、文字列両方含む 通称マジックナンバー)。コードの可読性・保守性の低下を防ぐために、リテラル定数(static final フィールド)を使用すること。
      例外:-1,0,1 等をカウント値としてループ処理等で使用するような場合

      良い例:

      java
      private static final double ONE_MILE_METRE = 1609.344;
      +
      +public double mileToMetre(double mi) {
      +    return mi * ONE_MILE_METRE;
      +}

      悪い例:

      java
      public double mileToMetre(double mi) {
      +    return mi * 1609.344;
      +}
      • リテラル定数の名前はその値の意味を正しく表現したものにする

        悪い例:

        java
        private static final int ZERO = 0;
    • 配列宣言は「型名[]」にする

      良い例:

      java
      private int[] sampleArray = new int[10];

      悪い例:

      java
      private int sampleArray[] = new int[10];
    • できるだけローカル変数を利用する
      ローカル変数で事足りるものをインスタンス変数として利用するなど、必要のないインスタンス変数を定義すると、パフォーマンスや可読性の低下やの大きな要因となる上、マルチスレッドを意識した際に不整合がおきる可能性があるので、インスタンス変数は必要性を充分に考慮してから使用すること。

    • 定数はfinalで宣言する

    • ローカル変数とインスタンス変数を使いわける

    定数

    • public で宣言するクラス変数とインスタンス変数は、定数のみとし、 static final で定義する
      final ではない static な定数は作成しない。

      良い例:

      java
      public static final String PROTOCOL_HTTP = "http";
    • 定数( static フィールド)に、 static ではないメソッドから書き込まない

    • 定数は、プリミティブ型もしくは、不変(Immutable)オブジェクトで参照する

      • 不変Listの生成にはCollectionsクラスのunmodifiableList()メソッドを利用する

        良い例:

        java
        public static final List<Integer> VALUES = Collections.unmodifiableList(Arrays.asList(1, 2, 3, 4, 5));

        悪い例:

        java
        public static final List<Integer> VALUES = Arrays.asList(1, 2, 3, 4, 5);
      • 不変Setの生成にはCollectionsクラスのunmodifiableSet()メソッドを利用する

      • 不変Mapの生成にはCollectionsクラスのunmodifiableMap()メソッドを利用する

        良い例:

        java
        public static final Map<Integer, String> VALUES_MAP = Collections.unmodifiableMap(new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +});

        悪い例:

        java
        public static final Map<Integer, String> VALUES_MAP = new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +};
      • 不変な配列インスタンスは長さ 0 の配列以外は生成不可能なため、外部から参照される(public)定数では利用せず、List等への置き換えをすること

        良い例:

        java
        public static final List<Integer> VALUES = Collections.unmodifiableList(Arrays.asList(1, 2, 3, 4, 5));

        悪い例:

        java
        public static final int[] VALUES = { 1, 2, 3, 4, 5 };

    インスタンス変数

    • インスタンス変数はprivateにする

      良い例:

      java
      public class Employee {
      +    private long id;
      +
      +    //・・・
      +    //getter/setter
      +}

      悪い例:

      java
      public class Employee {
      +    public long id;
      +
      +    //・・・
      +    //getter/setter
      +}

    クラス変数

    • public static final 宣言した配列を利用しない
      ※「定数」を参照

    • クラス変数にはクラス名を使用してアクセスすること

      良い例:

      java
      BigDecimal b = BigDecimal.ZERO;

      悪い例:

      java
      BigDecimal a = //
      +BigDecimal b = a.ZERO;

    ローカル変数

    • ローカル変数は利用する直前で宣言する
      行間の程度にもよるが、ある程度まとめて宣言するのは OK とする。

      良い例:

      java
      for (int i = 0; i < lines.length; i++) {
      +    String line = lines[i];
      +    //lineの処理
      +}

      悪い例:

      java
      String line;
      +for (int i = 0; i < lines.length; i++) {
      +    line = lines[i];
      +    //lineの処理
      +}
    • ローカル変数は安易に再利用しない
      一度宣言したローカル変数を、複数の目的で安易に使いまわさないこと。ローカル変数は、役割ごとに新しいものを宣言して初期化することにより、コードの可読性・保守性の向上、及びコンパイラの最適化の促進をはかる。

    引数

    • メソッド引数への代入は行わない
      原則としてfinalで宣言する。

      良い例:

      java
      public void add(final int value) {
      +    //・・・
      +}

    継承

    • スーパークラスのインスタンス変数をサブクラスでオーバーライドしない
      スーパークラスと同じ名前のフィールドをサブクラスで宣言しないこと。 同じ名前のフィールドを宣言すると、スーパークラスのフィールドはサブクラスで宣言されたフィールドによって隠ぺいされてしまうので、他の人の混乱を招くことを防ぐため重複する名前は付けないこと。

      悪い例:

      java
      public class Abs {
      +    protected String name;
      +}
      +
      +public class Sub extends Abs {
      +    protected String name;//Abs#nameは隠ぺいされる
      +}
    • スーパークラスのメソッドをオーバーライドするときは@Override アノテーションを指定する。

      良い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    @Override
      +    protected void process() {
      +
      +    }
      +}

      悪い例:

      java
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    //@Overrideアノテーションの指定がない
      +    protected void process() {
      +
      +    }
      +}
    • スーパークラスで private 宣言されているメソッドと同じ名前のメソッドをサブクラスで定義しない
      スーパークラスにある private メソッドと同じ名前のメソッドをサブクラスで定義しないこと。private メソッドはオーバーライドされず全く別のメソッドとして扱われ、他の人の混乱を招き、バグにつながる恐れがある。

    インナークラス

    • 原則としてインナークラスは利用しない
      一つの java ファイルに複数のクラスを記載するのは NG とする。また無名クラスを利用するのも原則として NG とする。
      Enum の定数固有メソッド実装(constant-specific method implementation)、Java8 のラムダ式は内部的にインナークラスとされるがこれらは許可する。

    メンバー順序

    • 以下の順で記述する

      1. static フィールド
      2. static イニシャライザー
      3. static メソッド
      4. フィールド
      5. イニシャライザー
      6. コンストラクター
      7. メソッド
    • 同一カテゴリー内では以下の可視性の順で記述する

      1. public
      2. protected
      3. パッケージ private
      4. private

    インスタンス

    • オブジェクト同士はequals()メソッドで比較する

      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}

      ただし Enum の場合は==演算子を利用して比較する

      equals()メソッドで比較する際、左辺のオブジェクトが null にならないように制御すること。

    • Class 名を利用した比較をおこなわない

      良い例:

      java
      if (o instanceof Foo) {
      +    // ...
      +}

      悪い例:

      java
      if ("my.Foo".equals(o.getClass().getName())) {
      +    // ...
      +}

    制御構造

    • 制御文( if , else , while , for , do while )の { } は省略しない

      良い例:

      java
      if (s == null) {
      +    return;
      +}

      悪い例:

      java
      if (s == null)
      +    return;
    • ステートメントが無い {} ブロックを利用しない
      悪い例:

      java
      //{}内の記述が無い
      +if (s == null) {
      +}
    • if / while の条件式で = は利用しない
      良い例:

      java
      boolean a =//
      +if (!a) {
      +    //・・・
      +}

      悪い例:

      java
      boolean a =//
      +if (a = false) {//コーディングミス
      +    //・・・
      +}
      +
      +
      +boolean a =//
      +boolean b =//
      +if (a = b) {//おそらくコーディングミス
      +    //・・・
      +}
    • forwhile の使い分けを意識する

    • for 文を利用した繰り返し処理中でループ変数の値を変更しない
      悪い例:

      java
      String[] array = { /*・・・*/ };
      +for (int i = 0; i < array.length; i++) {
      +    //・・・
      +    i += 2;//NG
      +}
      +
      +for (String s : array) {
      +    //・・・
      +    s = "string";//NG
      +}
    • for 文のカウンタは特別な事情がない限り、0 から始める

    • 配列やリストなどの全要素に対するループ処理は拡張 for 文を使用する。
      良い例:

      java
      for (int value : array) {
      +    //・・・
      +}
      +
      +for (String value : list) {
      +    //・・・
      +}
    • 配列をコピーするときはArrays.copyOf()メソッドを利用する

      良い例:

      java
      int[] newArray = Arrays.copyOf(array, array.length);

      悪い例:

      java
      int[] newArray = new int[array.length];
      +System.arraycopy(array, 0, newArray, 0, array.length);
    • 繰り返し処理中のオブジェクトの生成は最小限にする

    • if 文と else 文の繰り返しや switch 文の利用はなるべく避け、オブジェクト指向の手法を利用する
      良い例:

      java
      CodingKind codingKind = toCodingKind(kind);
      +d = codingKind.encode(s);
      +
      +//---
      +
      +CodingKind codingKind = toCodingKind(kind);
      +s = codingKind.decode(d);

      悪い例:

      java
      switch (kind) {
      +case 1:
      +    d = encode1(s);
      +    break;
      +case 2:
      +    d = encode2(s);
      +    break;
      +default:
      +    break;
      +}
      +
      +//---
      +
      +switch (kind) {
      +case 1:
      +    s = decode1(d);
      +    break;
      +case 2:
      +    s = decode2(d);
      +    break;
      +default:
      +    break;
      +}
    • 繰り返し処理の内部で try ブロックを利用しない
      特に理由がない場合は繰り返し処理の外にtryブロックを記載する。
      ただし、繰り返し処理内部で例外をキャッチし処理を行いたい場合は繰り返し処理の内部でtryブロックを利用してもよい。

      良い例:

      java
      for (String s : array) {
      +    BigDecimal num;
      +    try {
      +        num = new BigDecimal(s);
      +    } catch (NumberFormatException e) {
      +        num = BigDecimal.ZERO;
      +    }
      +    //・・・
      +}

    文字列操作

    • 文字列同士が同じ値かを比較するときは、equals()メソッドを利用する
      良い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}

      悪い例:

      java
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}
    • 文字列リテラルはnew しない
      良い例:

      java
      String s = "";

      悪い例:

      java
      String s = new String();
    • 更新される文字列にはStringBuilder クラスを利用する
      良い例:

      java
      StringBuilder builder = new StringBuilder();
      +for (String s : array) {
      +    builder.append(s);
      +}
      +System.out.println(builder.toString());

      悪い例:

      java
      String string = "";
      +for (String s : array) {
      +    string += s;
      +}
      +System.out.println(string);

      スレッドセーフ性が保証されていない箇所では`StringBuffer`クラスを利用する

      ※パフォーマンスについても記載しているので参考にしてください

    • 更新されない文字列にはString クラスを利用する

    • 文字列リテラルと定数を比較するときは、文字列リテラルのequals()メソッドを利用する
      良い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (PROTOCOL_HTTP.equals(url.getProtocol())) {
      +
      +}

      悪い例:

      java
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (url.getProtocol().equals(PROTOCOL_HTTP)) {
      +
      +}
    • プリミティブ型とString オブジェクトの変換には、変換用のメソッドを利用する
      良い例:

      java
      int i = 1000;
      +String s = String.valueOf(i);// "1000"
      +s = NumberFormat.getNumberInstance().format(i);// 3桁区切り "1,000"
      +
      +boolean b = true;
      +s = String.valueOf(b);// true/false
      +s = BooleanUtils.toStringOnOff(b);// on/off
    • 文字列の中に、ある文字が含まれているか調べるには、contains()メソッドを利用する

    • システム依存記号( \n\r など)は使用しない。
      悪い例:

      java
      String text = Arrays.stream(array)
      +    .collect(Collectors.joining("\n"));

    数値

    • 誤差の無い計算をするときは、BigDecimal クラスを使う
      浮動小数点演算は科学技術計算に利用するもので、誤差が発生する。これに対して、クラス「BigDecimal」は、文字列で数値の計算を行うので、金額などの正確な計算に適している。BigDecimal ではインスタンス生成時に指定された桁数での精度が保証される。

    • 数値の比較は精度に気をつける
      良い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +if (a.compareTo(b) == 0) {
      +    System.out.println("一致");
      +}

      悪い例:

      java
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +
      +if (a.equals(b)) {
      +    System.out.println("精度が違うためこの分岐には入らない");
      +}
    • 低精度なプリミティブ型にキャストしない

    • BigDecimalString変換する際はtoString()ではなくtoPlainString()を利用すること
      toString()を利用した場合、指数表記になることがあります。

    日付

    • 日付の文字列のフォーマットには、SimpleDateFormatまたはDateTimeFormatterを使う
      良い例:

      java
      Date date = new Date();
      +SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
      +String s = dateFormat.format(date);

    三項演算子

    • 入れ子の三項演算子の利用は禁止
      可読性が悪くなるので三項演算子を入れ子で行うのは禁止。

    コレクション

    • Java2 以降のコレクションクラスを利用する
      Vector クラス、Hashtable クラス、Enumeration 等は、特にこれらを利用する理由がなければ、インターフェースを統一する目的で、これらの代わりにList(ArrayList クラス)、Map(HashMap クラス)、Iterator を使用すること。List などのインターフェースを利用することで JDK1.2 で整理されたわかりやすいメソッドを利用でき、また、インターフェースの特性から呼び出し元を変更せずに実装クラスを変更することができる。

    • 特定の型のオブジェクトだけを受け入れるコレクションクラスを利用する

      良い例:

      java
      List<Map<String, String>> list = new ArrayList<>();
    • ListのソートはList.sort()を利用する
      Listクラスの要素をソートする際は Java8 で追加されたList.sort()を利用すること。
      Java 7 以前で利用されていたCollections.sort()は利用しないこと。

    • Collection.forEach()は利用しない。拡張 for 文の利用を検討する
      Java8 で追加されたメソッド。
      拡張 for 文を利用したほうが多くの場合でデバッグに有利であり、可読性においてもforEachの優位性は少ないため、forEachは原則利用しない。拡張 for 文を利用する。
      具体的には下記のメソッドを利用しないこと。

      • Collection#forEach
      • Set#forEach
      • List#forEach

      Map#forEachはこの限りではない

      良い例:

      java
      for (String s : Arrays.asList("A", "B")) {
      +    //処理
      +}

      悪い例:

      java
      Arrays.asList("A", "B").forEach(s -> {
      +    //処理
      +});

      ただし、メソッド参照で処理できる場合はforEachを利用する。
      (デバッグのデメリットがほとんどなく、他と比較して処理効率が良いため)

      良い例:

      java
      Arrays.asList("A", "B").forEach(this::process);

      悪い例:

      java
      for (String s : Arrays.asList("A", "B")) {
      +    this.process(s);
      +}

    ラムダ式・メソッド参照・コンストラクタ参照

    • ラムダ式が利用できる箇所はラムダ式を利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • ただし、メソッド参照・コンストラクタ参照が利用できる場合はメソッド参照・コンストラクタ参照を利用する

      良い例:

      java
      String::compareToIgnoreCase

      悪い例:

      java
      (s1, s2) -> s1.compareToIgnoreCase(s2)

      良い例:

      java
      BigDecimal::add

      悪い例:

      java
      (b1, b2) -> b1.add(b2)
    • ラムダ式記述の際、型宣言は省略記法で記述する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (String s1, String s2) -> s1 + "=" + s2
    • 原則ラムダ式内の行数は 1 行とする
      複数行で利用したい場合は、privateメソッドを作成しメソッド参照を利用する

      良い例:

      java
      this::getMax
      +
      +private int getMax(int i1, int i2) {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}

      悪い例:

      java
      (i1, i2) -> {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}
    • 原則ラムダ式は 1 行記述に限定するので、中カッコ、returnは必ず省略する

      良い例:

      java
      (s1, s2) -> s1 + "=" + s2

      悪い例:

      java
      (s1, s2) -> {
      +    return s1 + "=" + s2;
      +}

    実質的 final(effectively final)

    • 実質的 final を利用する
      変数宣言にfinalを記載しなくてよい。

    Stream API

    • 利用してよい
      ※パフォーマンスについても記載しているので参考にしてください

    • 並列ストリームは利用しないこと
      悪い例:

      java
      Stream<?> s = list.parallelStream();
      +Stream<?> s = list.stream().parallel();
    • StreamAPI 記述の際の改行位置は、各中間処理・末端処理前のピリオドの前で改行する

      良い例:

      java
      List<Character> alphabetLower = list.stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .collect(Collectors.toList());

      悪い例:

      java
      List<Character> alphabetLower = list.stream().filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase).collect(Collectors.toList());
      +
      +List<Character> alphabetLower = list
      +    .stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .collect(Collectors.toList());
    • インデントは統合開発環境の提供するフォーマッタに合わせる

    • 中間処理の数は 3 つ(3 行)程度までを推奨する
      中間処理の記述が多くなると可読性も悪くなり、デバッグも難しくなるため、3 行程度を目安にロジックを検討すること。

    • コメントは、原則として処理中には記載しない
      難解になってしまった場合のみ処理中の記載を認める

      良い例:

      java
      // クラスFooのフィールドStrの値で昇順にソートし、フィールドStrの要素を取得して処理する。
      +fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    .map(Foo::getStr)
      +    .forEach(this::proc);

      悪い例:

      java
      fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr)) //クラスFooのフィールドStrの値で昇順にソート
      +    .map (Foo::getStr) //フィールドStrの要素を取得
      +    .forEach(this::proc); //処理
      +
      +
      +fooList.stream()
      +    //クラスFooのフィールドStrの値で昇順にソート
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    //フィールドStrの要素を取得
      +    .map (Foo::getStr)
      +    //処理
      +    .forEach(this::proc);
    • Stream は極力変数代入しないこと
      Stream は中間処理、末端処理を行うと使用済みとなり、以降同じインスタンスは利用できない。
      変数代入はほとんどの場合意味をなさず、むしろミスの元となるため極力変数代入はしないこと。

      良い例:

      java
      List<String> list1 = Stream.of("A", "B", "C")
      +        .map(String::toLowerCase)
      +        .collect(Collectors.toList());
      +
      +List<String> list2 = Stream.of("A", "B", "C")
      +        .map(s -> s + s)
      +        .collect(Collectors.toList());

      悪い例:

      java
      Stream<String> stream = Stream.of("A", "B", "C");
      +Stream<String> stream1 = stream.map(String::toLowerCase);
      +List<String> list1 = stream1.collect(Collectors.toList());
      +
      +Stream<String> stream2 = stream.map(s -> s + s);//コーディングミス streamは使用済のためエラーになる
      +List<String> list2 = stream2.collect(Collectors.toList());

    Optional

    • Optional は同メソッド内で値を取り出す場合は極力変数代入しないこと
      Optional とその値の変数は同じものを示す名前となり、同じ意味の変数名が複数現れることで可読性が下がるため、Optional の変数代入は行わないこととする。

      良い例:

      java
      Employee employee = findEmployee(employeeId)
      +        .orElseThrow(IllegalArgumentException::new);

      悪い例:

      java
      Optional<Employee> employeeOpt = findEmployee(employeeId);
      +Employee employee = employeeOpt.orElseThrow(IllegalArgumentException::new);

      直接、値を取り出すことなくOptionalでのみ扱う場合はOptionalを変数代入してもよい。

      良い例:

      java
      Optional<Employee> employee = findEmployee(employeeId);
      +
      +Dept dept = employee.map(Employee::getDivision)
      +        .map(Division::getDept)
      +        .orElse(null);
      +
      +Role role = employee.map(Employee::getRole)
      +        .orElse(null);
      +
      +//-----
      +
      +Optional<Employee> employee = findEmployee(employeeId);
      +//・・・処理
      +return employee;

    ストリーム(InputStream OutputStream)

    • ストリームを扱う API を利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • ObjectOutputStream ではreset()を利用する

    リソースの解放

    • リソース解放を必要とするクラスを利用するときは、try-with-resources 文で後処理をする

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • リソース解放を必要とするクラスを作成する場合はAutoCloseableimplementsする
      AutoCloseableimplementsすることで try-with-resources 文が利用できるようになります。

    例外

    • catch 文で受け取る例外は、詳細な例外クラスで受け取る

      良い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (IOException e) {
      +    log.error("Error", e);
      +    throw e;
      +}

      悪い例:

      java
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (Exception e) {//範囲が広すぎる例外クラスの利用はNG
      +    log.error("Error", e);
      +    throw e;
      +}
    • Exception クラスのオブジェクトを生成してスローしない

    • catch ブロックでは基本、例外処理をする。ただし処理を書いてはいけない部分もあるので、その部分については、"// ignore" というコメントを記述すること。

    • 例外クラスは無駄に定義しない

    ガベージコレクション

    • 原則finalize()のオーバーライド実装は禁止
    • もしfinalize()をオーバーライドした場合はsuper.finalize() を呼び出す
    • アプリケーションからfinalize()を呼び出さない

    コメント規約

    よいコメントの鉄則

    • コードを明確化するコメントを書く
      コードにコメントを書く理由は、自分自身、一緒に仕事をしている人、後に関わる開発者にとってコードをより理解しやすいものにするためである。

    • コメント化する価値がないプログラムならば、実行するに値しない
      有用な格言。コメントは必須。

    • 過剰な装飾は使わない (例:見出し状のコメント)
      1960 年代から 1970 年代の典型的な COBOL プログラマにはアスタリスク( * )でコメントを囲った箱を書く習慣があった。彼らの芸術的な主張を表わしているのかもしれないが、率直に言えばそれは製品に加わるちょっとした価値に比べれば大きな時間の無駄である。かわいいコードではなくきれいなコードを書くはずである。さらに、コードを表示するディスプレイや印刷するプリントに使われるフォントはプロポーショナルだったりそうでなかったりして、箱をきれいに整列させることは難しい。

    • コメントはシンプルに
      かつて見たもっとも最良のコメントは、シンプルな要点をまとめた注釈であった。なにも本を書く必要はなく、他の人がコードを理解するに十分な情報を提供するだけでよいのである。

    • コードを書く前に先にコメントを記述する
      コードをコメント化する最良の方法は、コードを書く前にコメントを書くことである。それが、コードを書く前にコードがどのように動作するかについて考えるよい機会となり、コメントの存在を保障することにもつながる。少なくともコードを書いた時にコメントすべきである。コメントによってコードが理解しやすくなることで、コードの開発中にアドバンテージを得ることができる。コードにコメントを書く時間を費やせば、それによって得られるものがある。

    • コメントには、なぜそうなのかを書く。コードを読めば分かることを書かない
      基本的に、コードの一部分を見ればそれが何かを理解することはできる。例えば、以下のコードを見て、$1000 以上の注文については 5%ディスカウントされることは理解できる。なぜそうなのか?大きな注文ではディスカウントがつきものだというビジネスルールがあるのだろうか?大きな注文に時間限定サービスがあるのか、それともずっとサービスがあるのか?これを書いたプログラマの気前がよかったのか?
      どこかソースコード中か別な文書にコメントされていない限り、それがなぜなのかを知ることはできない。

      java
      if (grandTotal >= 1000.00) {
      +    grandTotal = grandTotal * 0.95;
      +}

      なお、メソッドコメントには、適切な javadoc コメント(タグ)のほかに、以下の内容も可能な限り明記すること。

      • 副作用のある処理の場合は、その内容 (→ メソッドの引数オブジェクトがメソッド内で変更されるケースなど)
      • 既知のバグ (→ 判明しているが修正しないことにした場合など)
      • 影響のある事前条件、事後条件 (→ メソッドが正しく動作するための前提について)
      • 並行性 (→  マルチスレッドでアクセスされた場合の動作について)
      • 該当メソッドの使用例やサンプルコード
    • TODO コメント
      設計者確認待ち、共通処理の作成待ちなどの理由により、実装時に TODO がある場合、下記のようにコメントを記述する。
      (Eclipse の TODO コメント形式を採用)
      例)

      //TODO:ワークフローの仕様決定待ち 関連チケット#12345

    Java コメント(3 種類)の使い分け

    Java では 3 種類のコメントが使える。javadoc コメントは/**で開始され、*/で終わる。C 風コメントは/*で開始され*/で終わる。単一行コメントは//で開始され、そのソースコード行が終わるまで続く。以下の表ではコメントの使い方とその例を示す。(コメントのスタイルに関しては、前述の「標準規約に準拠したコーディング例」を参照)

    コメント種類使用方法
    javadoc コメント
    /** comment */
    interface、class、メソッド、フィールドの直前に書く。コメントは javadoc によって処理され、外部ドキュメント(HTML)として生成される。(この形式以外のコメントはドキュメントとして出力されないことに注意)/*_
    _ 顧客(Customer)-
    _ 顧客はわれわれがサービスまたは製品を売った人物
    _ もしくは組織のいずれかである。
    _ @author 開発太郎
    _/
    C 風コメント
    /* comment */
    特定のコードを無効化したいが、後で使用するかもしれないので残しておくためにコメント化する時や、デバッグ時に一時的に無効化するときに使用する。/_
    このコードは J.T.Kirk によって 1997.12.9 に前述のコードと置き換えたためコメント化した。2 年間不要であるならば削除せよ。
    ... (ソースコード)
    _/
    単一行コメント
    // comment
    メソッド内にて、ビジネスロジック、コードの概要、一時変数の定義内容などを記述する。// 1995 年 2 月に開始された X 氏の寛大なキャンペーンで
    // 定められた通り 1000$を超える請求には、全て 5%割引を
    // 適用する。

    ※ ロジック中に、頻繁に C 風コメントでコメントを書くとまとめてコメントアウトする場合に不便なため、基本的にロジック中では単一行コメントを利用すること。

    パフォーマンス

    パフォーマンスを考慮した Java のコーディングについて以下に示す。

    ※ パフォーマンスは jre のバージョンやスペックによって変化します。本内容は jre1.8.0_74 での検証結果を元にした内容です。

    ※ 性能計測結果についての記載がありますが、あくまでも参考値です。性能を保証するものではありません。

    Stream API

    Java8 で追加された Stream API での記述は、可読性も高く、簡潔に書けますが、パフォーマンス・性能面で注意が必要な場合があります。

    List の処理を行う際、拡張 for 文で処理する場合は Iterator インスタンスが 1 つだけ生成されますが、Stream API で処理する場合、最初の Stream インスタンスに加え、各中間処理ごとにも Stream インスタンスが生成され、その分の性能劣化が懸念されます。
    以下に処理例と計測結果を記載します。

    • 拡張 for 文

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = new ArrayList<>();
      +for (String string : list) {
      +    if (string.endsWith("0")) {
      +        resultList.add(string);
      +    }
      +}
      +return resultList;
    • Stream API

      java
      List<String> list = //数値文字列のList
      +List<String> resultList = list.stream()
      +    .filter(s -> s.endsWith("0"))
      +    .collect(Collectors.toList());
      +return resultList;
    • 計測結果

      処理する List の件数拡張 for 文 (ms)StreamAPI (ms)
      100 万件79
      1,000 万件88114
      1 億件9491,026
      2 億件1,8222,081

    小中規模の処理量であれば考慮するほどの性能差はありませんが、大量の処理が見込まれる場合は考慮が必要です。
    また、Stream API は並列処理(スレッド処理)の機能をサポートしていますので、利用できる場合は並列処理も含めての検証が必要です。

    ラムダ式・メソッド参照・コンストラクタ参照

    Java8 で追加されたラムダ式・メソッド参照・コンストラクタ参照は、匿名クラスを利用するよりも効率的です。
    積極的な利用を推奨します。

    以下に Comparator を生成した場合の計測結果を記載します。

    • 匿名クラス

      java
      Comparator<String> c = new Comparator<String>() {
      +    @Override
      +    public int compare(String o1, String o2) {
      +        return o1.compareToIgnoreCase(o2);
      +    }
      +};
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> o1.compareToIgnoreCase(o2);
    • メソッド参照

      java
      Comparator<String> c = String::compareToIgnoreCase;
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)メソッド参照 (ms)
      10 億回3800(計測不能)0(計測不能)
      100 億回6,3740(計測不能)0(計測不能)
      1 京回(30 秒以上)1410

    ラムダ式は外部の変数を利用する場合、匿名クラスとほぼ同じ動作をします。

    • 匿名クラス

      java
      new Comparator<String>() {
      +        @Override
      +        public int compare(String o1, String o2) {
      +            return arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                            : o1.compareToIgnoreCase(o2);
      +        }
      +    }
    • ラムダ式

      java
      Comparator<String> c = (o1, o2) -> arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                    : o1.compareToIgnoreCase(o2);
    • 計測結果

      処理件数匿名クラス (ms)ラムダ式 (ms)
      10 億回(パラメータあり)571572
      100 億回(パラメータあり)9,9009,864

    文字列連結

    文字列連結(繰り返し)

    文字列連結を繰り返し処理中で行う際、+演算子で処理することはアンチパターンとして知られています。
    繰り返し処理中の文字列連結は、 StringBuilderStringJoinerStringBuffer を利用します。
    また、コレクション要素の結合であればString#joinが利用できます。

    以下に処理例と計測結果を記載します。

    • +演算子

      java
      String s = "";
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        s += ",";
      +    }
      +    s += string;
      +}
      +return s;
    • StringBuilder

      java
      StringBuilder sb = new StringBuilder();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • StringBuffer

      java
      StringBuffer sb = new StringBuffer();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • String#join

      java
      return String.join(",", list);
    • 計測結果

      処理する List の件数+演算子 (ms)StringBuilder (ms)StringBuffer (ms)String#join (ms)
      1,000 件50(計測不能)0(計測不能)0(計測不能)
      1 万件1,016111
      10 万件(30 秒以上)255
      100 万件(30 秒以上)294251

    文字列連結(定数)

    基本的に処理中の文字列連結では+演算子は使わないで処理するほうがパフォーマンスが高くなりますが、定数の場合は+演算子で定義するほうがパフォーマンスが高いです。

    たとえば以下のように、処理したい場合、

    java
    private static final String CONST_A = "A";
    +private static final String CONST_B = "B";
    +private static final String CONST_AB = CONST_A + CONST_B;

    StringBuilder で処理しようとすると以下のようになります。

    java
    private static final String CONST_AB = new StringBuilder(CONST_A).append(CONST_B).toString();

    しかし、これらをバイトコード上で確認するとそれぞれ以下のようになります。

    • +演算子

      java
      private static final java.lang.String CONST_AB = "AB";
    • StringBuilder

      java
      private static final java.lang.String CONST_AB;
      +
      +static {};
      +   0  new java.lang.StringBuilder [20]
      +   3  dup
      +   4  ldc <String "A"> [8]
      +   6  invokespecial java.lang.StringBuilder(java.lang.String) [22]
      +   9  ldc <String "B"> [11]
      +  11  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [26]
      +  14  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [30]
      +  17  putstatic jp.co.packagename.ClassName.CONST_AB : java.lang.String [34]
      +  20  return

    +演算子を利用した場合コンパイル時に最適化され、文字列"A""B"をあらかじめ結合して class が作成されます。
    StringBuilderを利用した場合は最適化はされず、記述した通りの処理が行われます。

    計測した場合、下記のようになります。

    • 計測結果

      処理回数StringBuilder (ms)+演算子 (ms)
      5,000 万回5590(計測不能)
      1 億回1,0590(計測不能)

    通常、定数処理を大量に処理することは考えられないので性能問題になることはありませんが、+演算子を利用したほうがパフォーマンスが高いこともあるということを理解してください。

    List の種類

    ListにはArrayListのようなRandomAccessを implements した、ランダムアクセスをサポートしているクラスと、
    LinkedListのようなランダムアクセスをサポートしていない(シーケンシャルアクセス)クラスが存在します。
    RandomAccessではないListは、List#getなどインデックスを利用するような操作のパフォーマンスが低いので注意してください。

    以下に処理例と計測結果を記載します。

    • for 文(List#get(int)によるループ)

      java
      int size = list.size();
      +for (int i = 0; i < size; i++) {
      +    String s = list.get(i);
      +    //処理
      +}
    • 拡張 for 文

      java
      for (String s : list) {
      +    //処理
      +}
    • forEach

      java
      list.forEach(this::処理);
    • 計測結果

      処理する List の件数ArrayList
      for 文(List#get(int)によるループ) (ms)
      LinkedList
      for 文(List#get(int)によるループ) (ms)
      ArrayList
      拡張 for 文 (ms)
      LinkedList
      拡張 for 文 (ms)
      ArrayList
      forEach (ms)
      LinkedList
      forEach (ms)
      1 万件0(計測不能)730(計測不能)0(計測不能)0(計測不能)0(計測不能)
      10 万件0(計測不能)7,5760(計測不能)0(計測不能)12
      20 万件0(計測不能)17,7400(計測不能)0(計測不能)0(計測不能)0(計測不能)
      50 万件0(計測不能)(30 秒以上)0(計測不能)20(計測不能)2
      100 万件1(30 秒以上)0(計測不能)40(計測不能)4
      1,000 万件16(30 秒以上)845644

    ランダムアクセスをサポートしているListがシーケンシャルアクセス(iterator を利用した処理など)で遅いということはないので、
    ループの処理は拡張 for 文等、Iterator によるループで記述するのが無難です。
    List#getでの処理をすべて禁止することはできませんが、高いパフォーマンスが求められる場合はListの種類にも注目してみてください。

    String から Integer・Long への変換

    数値文字列のStringIntegerに変換するには、Integer#valueOf(String)を利用して下記のように記述します。

    java
    String s = "1";
    +Integer value = Integer.valueOf(s);

    しかし、下記のようにも記述できます。

    java
    String s = "1";
    +Integer value = new Integer(s);

    これらの違いは、
    new Integer(s)とした場合、必ず Integer インスタンスが生成されますが、
    Integer.valueOf(s)とした場合は -128 から 127 の間の数値であればキャッシュから取り出すためインスタンスを生成しません。

    このため、前者のInteger#valueOf(String)を利用した記述のほうが効率的です。
    Long#valueOf(String)も同様です。

    性能差が少ないため、ほとんど問題にはなりませんが、FindBugs 等、静的解析で検出される問題のため、理解が必要です。

    また、String からの変換だけでなく、int や long からの変換も#valueOfが効率的ですが、オートボクシングを利用した場合、コンパイルで自動的にこれらの処理に変換されるため、記述することはありません。

    String から int・long への変換

    数値文字列のStringintに変換するには、Integer#parseInt(String)を利用して下記のように記述します。

    java
    String s = "1";
    +int value = Integer.parseInt(s);

    しかし、オートボクシングが利用できるため、意図せず下記のように記述ミスをする場合があります。

    java
    String s = "1";
    +int value = Integer.valueOf(s);//取得したIntegerインスタンスをオートボクシングでintにcastしている
    java
    String s = "1";
    +int value = new Integer(s);//生成したIntegerインスタンスをオートボクシングでintにcastしている

    「オートボクシング」の説明に記載した通り、性能に差が出るだけでなく、
    記述から明らかにミスであることが解るため、FindBugs 等、静的解析で検出されるコードです。

    longへの変換の場合はLong#parseLong(String)を利用します

    以下に計測結果を記載します。

    • 計測結果

      処理回数Integer.valueOf(String) (ms)Integer#parseInt(String) (ms)
      1,000 万回396318
      1 億回4,0603,077

    BigDecimal の ZERO との比較

    BigDecimal の正・負・ZERO の判定はBigDecimal#signumを利用します。
    compareToを利用してBigDecimal.ZEROと比較しても同じことができますが、signumを利用したほうが効率的です。

    以下に処理例と計測結果を記載します。

    • compareTo 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.compareTo(BigDecimal.ZERO) == 0) {
    • signum 利用

      java
      BigDecimal value = new BigDecimal("0.0");
      +if (value.signum() == 0) {
    • 計測結果

      (単位:マイクロ秒)

      処理回数compareTo 利用 (マイクロ秒)signum 利用 (マイクロ秒)
      1 京回527
      max:26,367
      min:0
      424
      max:21,213
      min:0

    性能差が少ないので、必ずしも signum を利用する必要はありませんが、大量に処理する場合など、高いパフォーマンスが求められる場合は意識してください。


    License

    CC-By-4.0

    + + + + \ No newline at end of file diff --git a/documents/forJava/index.html b/documents/forJava/index.html new file mode 100644 index 00000000..b690acf4 --- /dev/null +++ b/documents/forJava/index.html @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Javaコーディング規約

    Future Enterprise Coding Standards for Java

    Logo

    一般的に行われているコーディング規約から、Stream API やラムダ式、最新の Java17 で追加された構文にも対応しています。

    For Java17

    Java17 向けのコーディング規約はこちらです。

    For Old Versions

    • Java11 向けのコーディング規約はこちらです。
    • Java8 向けのコーディング規約はこちらです。

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。
    (これらのファイルはPandocを利用して作成しています。)

    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/IF\345\256\232\347\276\251\346\233\270.html" "b/documents/forMarkdown/IF\345\256\232\347\276\251\346\233\270.html" new file mode 100644 index 00000000..0c93a858 --- /dev/null +++ "b/documents/forMarkdown/IF\345\256\232\347\276\251\346\233\270.html" @@ -0,0 +1,84 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    IF01 設備有効開始受信

    設備有効開始の取り込みを行う。

    対向システム

    連携元連携先
    A システムFuture

    環境情報

    Input

    ItemValue
    連携 S3 バケット${env}-example-import
    プレフィックスactivate/year=${yyyy}/month=${MM}/day=${dd}/
    ファイル名${yyyy}-${mm}-${dd}-${hh}-${MM}-${SS}.csv
    保持期限3 年

    Output

    ItemValue
    連携 S3 バケット${env}-example-import
    プレフィックスactivate/year=${yyyy}/month=${MM}/day=${dd}/
    ファイル名${yyyy}-${mm}-${dd}-${hh}-${MM}-${SS}.csv
    保持期限3 年

    連携元定義

    CategoryItemValueMemo
    Protocol連携方式(ファイル/API/ストリーム)ファイル
    連携タイミング(随時/定時)定時
    頻度1 回/日
    起動時間16:00
    処理完了期限16:00
    未着チェック(なし/WARN/ERROR)WARN
    全件/差分差分
    0 件時連携あり
    Formatファイル種別CSV
    レイアウトRFC 8259
    文字コードUTF-8
    改行コードLF
    圧縮-
    暗号化-
    ヘッダ行あり
    項目順固定項目順は入れ替え不可
    機密情報-

    項目定義

    NamePhysical NameTypeLengthPrecisionEnumFormatSensitiveExampleMemo
    会社コードcompany_cdstring5----00001
    設備コードdevice_cdstring8----00000052
    有効開始日activation_datestring10--YYYY-MM-DD-2022-10-16[1]
    サンプル
    csv
    company_cd,device_cd,activation_date
    +12121,00000052,2022-03-01
    +12121,00000053,2022-03-30

    連携先定義

    CategoryItemValueMemo
    Protocol連携方式(ファイル/API/ストリーム)ファイル
    連携タイミング(随時/定時)定時
    頻度1 回/日
    起動時間16:00
    処理完了期限16:00
    未着チェック(なし/WARN/ERROR)WARN
    全件/差分差分
    0 件時連携あり
    Formatファイル種別CSV
    レイアウトRFC 8259
    文字コードUTF-8
    改行コードLF
    圧縮-
    暗号化-
    ヘッダ行あり
    項目順固定項目順は入れ替え不可
    機密情報-

    処理概要

    • ファイル定義に則ったバリデーションを実施
    • 次の項目変換定義に従い加工し、出力先テーブルに Merge する
    • 受信完了後、 Completed: YYYY-MM-DDTHH:MI:SS.SSS のタグを追加する

    処理シーケンス

    plantuml
    @startuml
    +!theme toy
    +
    +participant システム
    +participant S3
    +database DB
    +
    +システム -> DB: 処理日付取得\n[日付管理]
    +
    +システム -> S3: 対象ファイルの存在チェック
    +
    +alt ファイルが存在しなかった場合
    +   システム -> システム: 処理終了して、次の処理を待機
    +end
    +
    +システム -> DB: シーケンスの取得\n[シーケンスオブジェクト]
    +
    +システム -> DB: 1.実行開始レコード追加\n[IF受信管理]
    +
    +システム -> S3: 対象ファイルを取得
    +
    +システム -> DB: 対象マスタのTruncate
    +
    +システム -> DB: ファイル連携処理
    +
    +システム -> システム: 連携件数確認
    +
    +システム -> S3: 処理済対象ファイルを格納
    +
    +システム -> DB: 2.実行終了状態の更新\n[IF受信管理]
    +@enduml

    DB 項目

    参照

    なし

    登録

    リストワークに以下のカラムでレコードを登録する

    • xxx ワーク.会社コード
    • xxx ワーク.処理日付
    • xxx ワーク.yyy 区分

    更新

    なし

    ビジネスロジック

    特記事項なし

    エラー処理

    PatternDescriptionrecovery
    フォーマットエラー連携元から提供されているデータ形式が想定外連携元またはIFの処理内容の修正と再実行

    1. 現在日以降である必要があるが、受信ではテスト観点で過去日も許容する ↩︎

    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM01/index.html" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM01/index.html" new file mode 100644 index 00000000..1c5b81fd --- /dev/null +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM01/index.html" @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    [UIM01] ログイン

    概要

    機能目的:

    • ログインや会員登録導線を提供する

    機能概要:

    • ログイン処理
    • 会員登録への導線

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示
    2ログインするボタン押下
    3会員登録ボタン押下

    イベント詳細

    1. 初期表示

    モーダルを起動。初期パラメータは無し。

    2. ログインする

    利用API:

    IDURLParameter
    API001POST /login入力フォームの値を取得

    画面表示制御:

    • HTTPステータスが400系
      • 「IDまたはパスワードが異なります」を表示
    • HTTPステータスが500系
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200

    3. 会員登録

    ...

    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM02/index.html" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM02/index.html" new file mode 100644 index 00000000..abdb76e6 --- /dev/null +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM02/index.html" @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    [UIM02] トレーナー検索

    概要

    機能目的:

    • パーソナルトレーナーを検索する

    機能概要:

    • 行きつけのジムの絞り込み
    • 店舗名の検索
    • トレーニング時間/予算の絞り込み
    • トレーニングコースの絞り込み

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示
    2検索ボタン押下

    イベント詳細

    1. 初期表示

    モーダルを起動。初期パラメータは無し。

    2. 検索

    利用API:

    IDURLParameter
    API007GET /trainersモーダルに指定された値をクエリパラメータに設定する

    画面表示制御:

    • 入力チェック
      • favorite_gym_name, store_nameが未設定の場合は、フロントエンド側でチェックし「行きつけのジム名・店舗名は必須項目です」と表示する
    • 応答が0件の場合
      • 「条件に一致するコーチは存在しませんでした」と表示する
    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM03/index.html" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM03/index.html" new file mode 100644 index 00000000..a894d839 --- /dev/null +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM03/index.html" @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    [UIM03] カレンダー予約

    概要

    機能目的:

    • トレーニーやパーソナルトレーナの空き時間を表示し、予約を行えるようにする

    機能概要:

    • 本日以降の週間カレンダーを表示する
    • すでに予約済みの時間がわかるようにする

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示指定されたトレーナーと、ログイン中のトレーニーのスケジュールを表示
    2日時設定カレンダーを選択ドラッグ&ドロップで範囲指定
    3日時指定設定された日時で予約を指定する

    イベント詳細

    1. 初期表示

    起動パラメータ:

    NameValueMemo
    trainer_id
    trainee_id

    利用API:

    IDURLParameter
    API011GET /trainers/{trainer_id}/schedule初期パラメータを設定
    API013GET /bookings/初期パラメータを設定

    画面表示制御:

    • API011
      • 0件の場合は何もしない
      • 1件以上存在した場合は、カレンダーには「ブロック」と表示する
    • API026
      • 0件の場合は何もしない
      • 1件以上存在した場合は、カレンダーに「予約あり」と表示する

    2. 日時設定

    選択された日付がカレンダーに追加される。

    3. 日時指定

    UIM04 を起動する。

    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM04/index.html" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM04/index.html" new file mode 100644 index 00000000..3183fd40 --- /dev/null +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIM04/index.html" @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    [UIM04] 決済

    概要

    機能目的:

    • トレーニング予約内容を表示し、決済によって確定する

    機能概要:

    • トレーニングのコース/日時/料金を表示
    • クレジット決済に必要な項目の入力
    • 決済の確定

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示
    2日時指定に戻るボタン押下UIM003に遷移
    2決済するボタン押下

    イベント詳細

    1. 初期表示

    起動パラメータ:

    NameValueMemo
    trainer_id
    menu_id

    利用API:

    IDURLParameter
    APIxxxトレーニングメニュー取得初期パラメータを設定

    2. 日時指定に戻る

    UIM03に遷移

    3. 決済

    ...

    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS01/index.html" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS01/index.html" new file mode 100644 index 00000000..b5ba284e --- /dev/null +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS01/index.html" @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    [UIS01] トップページ

    概要

    機能目的:

    • トップページ

    機能概要:

    • ログインへの導線
    • パーソナルトレーナーの検索への導線

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示ログイン済みである場合、「会員登録/ログイン」が「マイページ」に変わる
    2トレーナーを探すボタン押下パーソナルトレーナー検索モーダル起動
    3会員登録/ログインボタン押下ログインモーダル起動

    イベント詳細

    1. 初期表示

    起動パラメータ:

    NameValueMemo
    userStateログイン状態

    初期表示イベント:

    • ログイン済み判定

    利用API:

    IDURLParameter
    API-005GET /profile/trainee_id=userState.user_id

    画面表示制御:

    • HTTPステータスが500系
      • 何もしない(無視で良い)、初期表示のまま
    • HTTPステータスが400系
      • 未ログインとして、初期表示のまま
    • HTTPステータスが200
      • すでにログイン中と判断し、(画面表示制御1)へ

    画面表示制御1:

    • 「会員登録/ログイン」表示を、サムネイル画像(thumbnail_url)に書き換える

    2. トレーナーを探す

    UIM002 呼び出し

    3. 会員登録/ログイン

    UIM001 呼び出し

    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS02/index.html" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS02/index.html" new file mode 100644 index 00000000..84b53520 --- /dev/null +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS02/index.html" @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    [UIS02] マイページ

    概要

    機能目的:

    • トレーニーのマイページを表示し、受講予定・受講済みのトレーニング一覧を表示する

    機能概要:

    • 受講状況の表示
    • パーソナルトレーナーの検索への導線

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示初期検索条件に従いAPIを実行し、履歴表示する
    2トレーナーを探すボタン押下パーソナルトレーナー検索モーダル起動
    3受講完了確認ボタン押下予約済みトレーニングを受講完了に切り替えるためのモーダル起動
    4受講完了ボタン押下予約済みトレーニングを完了済みのトレーニングに更新

    イベント詳細

    1. 初期表示

    起動パラメータ:

    NameValueMemo
    userStateログイン状態

    初期表示イベント:

    • マイページ表示

    利用API:

    IDURLParameter
    API-005GET /profile/trainee_id=userState.user_id

    画面表示制御:

    • HTTPステータスが500系
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが400系
      • トップページにリダイレクト

    利用API:

    IDURLParameter
    API013GET /bookings/trainee_id=userState.user_id

    画面表示制御:

    • 起動条件
      • API016が有効な場合
    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示

    2. トレーナーを探す

    UIM002 を起動。

    3. 受講完了確認

    ${トレーニングメニュー} は完了しましたか?」ダイアログを表示する。

    キャンセルの場合は閉じる。

    4. 受講完了

    ${トレーニングメニュー} は完了しましたか?」ダイアログがOKの場合。

    利用API:

    IDURLParameter
    API016PUT /booking/{booking_id}/status選択されたトレーニング予約ID

    画面表示制御:

    • クリック可否判定
      • 予約済み+現在時間<=受講時間になっている場合に、クリック可能とする
    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
      • 次のAPIを呼び出し

    利用API:

    IDURLParameter
    API-012GET /bookings/trainee_id=userState.user_id

    画面表示制御:

    • 起動条件
      • API016が有効な場合
    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS03/index.html" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS03/index.html" new file mode 100644 index 00000000..d9ba4149 --- /dev/null +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS03/index.html" @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    [UIS03] トレーナー一覧

    概要

    機能目的:

    • 検索条件に一致する順にパーソナルトレーナーを表示する

    機能概要:

    • パーソナルトレーナーの一覧表示
    • パーソナルトレーナーの再検索を指定可能とする
    • 興味が湧いたパーソナルトレーナーについて、詳細画面への導線

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示検索条件に従いAPIを実行し、一覧表示する
    2トレーナー詳細ボタン押下UIS04に遷移
    3トレーナー検索ボタン押下入力された条件で検索

    イベント詳細

    1. 初期表示

    利用API:

    IDURLParameter
    API007GET /trainersfavorite_gym_nameなど、各クエリパラメータ指定されたパラメータを設定

    画面表示制御:

    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • 応答結果が0件の場合
      • 「条件に一致するパーソナルトレーナーが見つかりませんでした。」を表示する
    • 応答結果が1件以上の場合
      • リスト表示する(ページングは不要。応答順に最大100件表示する)

    2. トレーナー詳細

    UIS04に遷移

    3. トレーナー検索

    初期表示と同等の処理を実行する。

    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS04/index.html" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS04/index.html" new file mode 100644 index 00000000..e98ff45e --- /dev/null +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/UIS04/index.html" @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    [UIS04] トレーナー詳細

    概要

    機能目的:

    • パーソナルトレーナーが提供するトレーニング一覧を表示する

    機能概要:

    • パーソナルトレーナー情報を表示
    • トレーニング一覧を表示する

    イベント概要

    Noイベント名イベント分類処理説明
    1初期表示初期表示初期検索条件に従いAPIを実行し、履歴表示する
    2トレーニングコース決定ボタン押下予約のためカレンダーモーダルを起動

    イベント詳細

    1. 初期表示

    起動パラメータ:

    NameValueMemo
    trainer_id

    利用API:

    IDURLParameter
    API009GET /trainers/{trainer_id}/profile起動パラメータを設定

    画面表示制御:

    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
      • プロフィールを更新
      • API008を呼び出し

    利用API:

    IDURLParameter
    API008GET /trainers/{trainer_id}/menus起動パラメータを設定

    画面表示制御:

    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
      • メニューを一覧表示
      • 0件の場合は「現在、提供できるメニューが存在しません。」と表示
      • API010を呼び出し

    利用API:

    IDURLParameter
    API010/trainers/{trainer_id}/reviews起動パラメータを設定

    画面表示制御:

    • HTTPステータスが200以外
      • メッセージID(MSG_BIZ_111)表示
    • HTTPステータスが200
      • 0件の場合は、「レビューがありません」を表示する
      • 1件以上存在する場合は、最大5件まで表示する

    2. トレーニングコース決定

    UIM03 を起動する。

    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/index.html" "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/index.html" new file mode 100644 index 00000000..dd9ad522 --- /dev/null +++ "b/documents/forMarkdown/future_muscle_partner/docs/01_\347\224\273\351\235\242/index.html" @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    画面

    標準画面

    ID論理名備考
    UIS01トップページ
    UIS02マイページ
    UIS03トレーナー一覧
    UIS04トレーナー詳細

    モーダル画面

    ID論理名備考
    UIM01ログイン
    UIM02トレーナー検索
    UIM03カレンダー予約
    UIM04決済
    + + + + \ No newline at end of file diff --git a/documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/index.html b/documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/index.html new file mode 100644 index 00000000..86d6bd1d --- /dev/null +++ b/documents/forMarkdown/future_muscle_partner/docs/02_WebAPI/index.html @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content
    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/index.html" "b/documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/index.html" new file mode 100644 index 00000000..7e086368 --- /dev/null +++ "b/documents/forMarkdown/future_muscle_partner/docs/03_\343\203\207\343\203\274\343\202\277/index.html" @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    テーブル一覧

    A5:SQL Mk-2 で管理している。

    + + + + \ No newline at end of file diff --git a/documents/forMarkdown/future_muscle_partner/docs/README.html b/documents/forMarkdown/future_muscle_partner/docs/README.html new file mode 100644 index 00000000..6cf3d36f --- /dev/null +++ b/documents/forMarkdown/future_muscle_partner/docs/README.html @@ -0,0 +1,57 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    docs

    設計ドキュメントを管理する。

    フォルダ階層

    sh
    docs
    +├── 01_画面      # Figma、画面アクション
    +├── 02_WebAPI   # openapi.yaml、API処理設計
    +├── 03_データ    # erd.a5er(ERD)、区分値
    +├── ...
    +└── README.md

    設計書

    コード体系

    機能IDのコード体系は以下に従う。

    種別種別備考
    UIS通常画面UIS01、UIS02UI Standard から
    UIMモーダル画面UIM01、UIM02UI Mordal から
    APIWeb APIAPI01、API02
    IFSシステムI/F 送信IFS01、IFS02InterFace Send から
    IFRシステムI/F 受信IFR01、IFR02InterFace Receive から
    BATバッチBAT01、BAT02BATch から
    RPT帳票RPT01、RPT02RePorT から

    コード体系について補足:

    • UISであれば、 UIS(0[1-9]{1}|[0-9]{2} といったフォーマットに従うこと
    • Future Muscle Partnerのプロダクト規模であれば、機能数が爆発しないという想定で2桁とする
      • 万が一あぶれた場合、16進数と見なしてA~Fを導入する拡張を行う

    機能IDの採番について注意点:

    • 採番後の変更は許可しない
    • 連番とする(数字部分に新しい体系を作らない)

    画面設計書の記載方針

    • Web API の応答項目が、画面項目のどこにマッピングすべきかという情報は、多くの業務画面で重要である
      • 理由は、類似名称の項目がWeb API応答項目にも画面項目多く、紐づけの認識の齟齬が生じやすいからである
    • future muscle partnerにおいては、項目数は多くなくFigmaを見れば自明であるため、画面項目定義を省略する
    + + + + \ No newline at end of file diff --git a/documents/forMarkdown/future_muscle_partner/docs/future_muscle_partner_abstract.png b/documents/forMarkdown/future_muscle_partner/docs/future_muscle_partner_abstract.png new file mode 100644 index 00000000..2f816600 Binary files /dev/null and b/documents/forMarkdown/future_muscle_partner/docs/future_muscle_partner_abstract.png differ diff --git a/documents/forMarkdown/future_muscle_partner/index.html b/documents/forMarkdown/future_muscle_partner/index.html new file mode 100644 index 00000000..27a41c6d --- /dev/null +++ b/documents/forMarkdown/future_muscle_partner/index.html @@ -0,0 +1,56 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Future Muscle Partner

    「いきつけのジムでパーソナルトレーニングを受けよう」のFuture Muscle Partnerのリポジトリ。

    サービスコンセプト

    パーソナルトレーナーを身近なものにして、質が高く安全で楽しいフィットネス体験を提供する。

    アプリを通してトレーニがトレーナに予約し、トレーニングを実施するフロー

    サービス概要:

    • アプリ上でジム公認のトレーナーを検索&予約し、いきつけのジムでトレーニングを受けることができる

    主なアクターとメリット:

    • トレーニー
      • 自分が通っているジムでパーソナル受けられる
      • トレーナーの得意分野ごとにトレーナーを使い分けられる
    • パーソナルトレーニー
      • 24H型ジムでサービスを提供できる
      • いつ/誰に/どんなメニューでトレーニングしたかを管理できる

    フォルダ階層

    sh
    .
    +├── backend    # バックエンド系のコード
    +├── docs       # 設計書
    +├── frontend   # フロントエンド系のコード
    +├── infra      # インフラ系のコード

    設計書

    docs を参照。

    + + + + \ No newline at end of file diff --git a/documents/forMarkdown/index.html b/documents/forMarkdown/index.html new file mode 100644 index 00000000..87e8f4e5 --- /dev/null +++ b/documents/forMarkdown/index.html @@ -0,0 +1,89 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Markdown設計ドキュメント規約

    Future Enterprise Markdown Design Document Standards

    Markdown ベースの設計ドキュメントの規約をまとめる。

    システム開発にて利用する設計ドキュメントを Markdown ベースにすることで、コーディングと同じ慣れたツールを用いて、Git によるバージョン管理、レビュープロセス、CI/CD などに自動化(静的解析、自動生成)を行いやすくし、ドキュメントを陳腐化させず、俊敏な設計開発を目指す。

    Markdown に限った話では無いが、どういった内容を設計書に記載すべきかは悩むポイントは多い。

    本規約では、アプリケーションの種別ごとに記載すべき内容と、それをどのような Markdown の構造で記載するかを規約化し、各チームで悩む余地を減らし、注力すべきことに集中できる環境を提供することを目的とする。

    前提

    本規約は以下の前提で作成されている

    • チーム/プロジェクトが 3 ~ 10 名程度の規模
    • Git(GitHub, GitLab)で管理され、コードと設計書が同一リポジトリで管理される
    • システム開発で必要なアプリケーション開発

    本規約で紹介する設計ドキュメントの位置付け

    設計ドキュメントは様々な前提条件/制約/経緯で作成され、Excel/Word/パワーポイントなどのファイル形式で作成することが多い。

    本規約はそれらを否定するものではなく、様々な利害関係者の要求に応え洗練され続けた上記の設計ドキュメントのテンプレートには、強く敬意を表する。

    一方で、設計ドキュメントを精緻に管理していく優先度より、プロダクト開発の効率とビジネスピードをより重視する場合もあり、それらの開発チームでは設計ドキュメントが存在さえない、あっても設計書が実装と乖離しているなどの問題が世間で課題提起されることも多い。

    本規約では、後者のプロダクト開発の効率性を重視し、設計ドキュメントが開発以外の観点から求められない場合において、必要最低限必要だと思われるレベルの記載のサンプルを提供する。

    また、設計ドキュメントのファイル形式に制約は無いという前提に立つため、設計ドキュメントの陳腐化を防ぐのに有効だと思われる、テキストベース(Markdown)でGit管理するという思想を採用する。

    本規約で紹介した各設計ドキュメントの記載内容を参考にしつつ、各開発チームにおいて必要な情報を追加/削除して利用するという、テンプレートとしての利用を想定する。

    テキストベースにおける設計書の注意点

    特に扱いで留意すべき点として、列数が多い表形式で設計ドキュメントを記載するケースがある。

    Markdownで表を記載することは可能ですが、列数が多い場合は保守性が非常に低くなり、git diffを用いた差分が見れるメリットも下がる。

    例えば、1つの画面の利用項目数が数十以上になり得る場合は、Excelなどのファイル形式を利用することを推奨する。

    フォルダ階層の推奨

    リポジトリ直下に docs フォルダを作成し、その配下に設計ドキュメントとなる Markdown ファイルを配備する。

    次はバックエンド、フロントエンド、インフラのコードをモノリポで管理している例である。

    sh
    .
    +├── backend # バックエンド系のコード
    +├── docs
    +├── frontend # フロントエンド系のコード
    +├── infrastructure # インフラ系のコード

    docs 配下は以下のルールにしたがった構造を取る。

    • 01_02_ といったプレフィックスを持つ
    • 番号には体系をもたせず、必要になったタイミングでインクリメントさせる
    • オンボーディングコストを抑えるため、なるべく先頭に新規参画者が欲する情報を配備する

    構成例を次にあげる。

    sh
    docs
    +├── 01_キャッチアップ # ドメイン知識など抑えておくべき前提知識
    +├── 02_環境構築     #
    +├── 03_開発規約     # GitFlowなど、リリース方式、CI/CD周り
    +├── 04_ユーザーストーリー
    +├── 05_UI設計      # Figmaのパスなど
    +├── 06_画面設計書
    +├── 07_API設計書   # OpenAPIのパス+各BL設計
    +├── 08_データモデル # ERD, テーブル定義
    +├── 09_IF設計書    # I/F定義+受信/送信BL設計
    +├── 10_バッチ設計書 # タイマー、イベント起動の非同期処理のBL設計
    +├── 11_インフラ設計 # 監視、キャパシティサイジング、コスト
    +├── ...
    +└── README.md

    システム構成図

    図は基本的に変更差分がGitと相性が良い、PlantUML(またはMermaid.js)で作成すること。PlantUMLの場合、テーマは toy を指定すること。

    plantuml
    @startuml
    +!theme toy
    +
    +participant Participant as Foo
    +note over Foo: Event
    +actor       Actor       as Foo1
    +boundary    Boundary    as Foo2
    +control     Control     as Foo3
    +entity      Entity      as Foo4
    +database    Database    as Foo5
    +collections Collections as Foo6
    +queue       Queue       as Foo7
    +Foo -> Foo1 : To actor
    +Foo -> Foo2 : To boundary
    +Foo -> Foo3 : To control
    +Foo -> Foo4 : To entity
    +Foo -> Foo5 : To database
    +Foo -> Foo6 : To collections
    +Foo -> Foo7: To queue
    +
    +@enduml

    システム構成図などは上記では対応しにくいことが多いため、diagrams.net(draw.io)で作成する。

    diagrams.netの場合は、拡張子は以下のいずれかで作成する。

    • .drawio.png
    • .drawio.jpg
    • .drawio.svg

    フロントエンド

    以下の方針を取る。

    • Figmaを用いて、画面遷移、画面表示項目を定義する
    • Markdown設計書には、Figmaで判断可能な見た目の情報は 記載しない
    • Markdown設計書には、Web APIの呼び出しやイベントの定義、パラメータの受け渡し、バリデーションロジックなどを定義する。

    サンプル設計書を参考にする。

    バックエンド

    テーブル定義書

    A5:SQL Mk-2を用い、erd.a5er という名称で管理する。

    以下の情報の管理は erd.a5er で行えないため、別で定義する。

    • 保持期限
    • 個人情報有無

    区分値

    区分値設計書 を参考にする。

    Web API 設計書

    API 定義書は openapi.yaml で記載すること。

    詳細はOpenAPI Specification 3.0.3規約 を参考にする。

    プログラム設計書(バッチ、非同期タスクなど)

    プログラム設計書を参考にする。

    プログラム設計書(Web API)

    Web APIについても、プログラム設計書(バッチ、非同期タスクなど)と同様に機能ID単位で作成する。

    ただし、Web APIにおいては openapi.yaml と重複する部分で自明な内容(例えば、リクエストパラメータの定義や、レスポンス項目)については、重複するため記載を省略する。

    もし、検索APIで複数のテーブルを参照して結果を応答する場合に、項目の由来を示すため、下表のような形式を定義すること。

    Web API応答例
    ParameterDescriptionSettingsNote
    last_name氏名 (姓)m_user
    first_name氏名 (名)m_user
    last_name_kana氏名カナ (姓)m_user
    first_name_kana氏名カナ (名)m_user
    date_of_birth生年月日m_user_detail
    gender_type性別区分m_user_detail
    tel電話番号m_user_detail
    occupation_type職業区分m_user_detail
    zipcode郵便番号m_user_detail

    ※Descriptionは openapi.yaml 側の description で記載済みであれば、省略すること ※Noteは何かしら加工処理により生み出された項目であれば、計算ロジックを記載する

    I/F 定義書

    I/F 定義書は、システム間の連携について定義と、その受信/配信処理の設計書です。

    システム I/F は連携先の対向システムが存在するため、認識齟齬が無いように、どのようなプロトコル・項目であるかを定義する必要がある。

    IF定義書を参考にする。

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。 (これらのファイルはPandocを利用して作成しています。)

    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/\343\203\227\343\203\255\343\202\260\343\203\251\343\203\240\350\250\255\350\250\210\346\233\270.html" "b/documents/forMarkdown/\343\203\227\343\203\255\343\202\260\343\203\251\343\203\240\350\250\255\350\250\210\346\233\270.html" new file mode 100644 index 00000000..06284553 --- /dev/null +++ "b/documents/forMarkdown/\343\203\227\343\203\255\343\202\260\343\203\251\343\203\240\350\250\255\350\250\210\346\233\270.html" @@ -0,0 +1,70 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    BAT01 xxx 計算

    処理概要

    • xxx(なぜこれが必要なのか)
    • xxx受信の後続処理で起動し、xxx計算を行いxxxトランに登録する(処理の概略)

    処理シーケンス

    plantuml
    @startuml
    +!theme toy
    +
    +participant システム
    +database DB
    +
    +note over システム: 各種インプット取得
    +
    +システム -> DB: 業務日付取得 [日付マスタ]
    +システム -> DB: 計算対象抽出xxx\n[xxx受信管理トラン]\n[xxx受信ワーク]\n[xxxマスタ]\n[yyyマスタ]\n[zzzマスタ]
    +システム -> システム: 支払い差し引き金額計算(※ビジネスロジック1)
    +システム -> DB: 登録\n[xxxトラン]
    +システム -> DB: 更新\n[xxx予測ワーク]
    +
    +@enduml

    ビジネスロジック

    ビジネスロジック1

    txt
    支払金額 = 受信ワーク.商品コード * xxx * xxx - yyyy
    +
    +IF xxx 区分
    +  支払金額 = 支払金額 * 支払い係数 + (支払金額 - 前回発注金額)/2
    +END

    DB 項目

    取得

    • xxxマスタ.支払い金額
    • xxxマスタ.特定商品区分
    • yyyマスタ.新古品フラグ
    • zzzマスタ.前回発注金額

    抽出条件:

    • xxx受信管理トラン.業務日付 = 業務日付
    • xxx受信管理トラン.処理連番 = xxx受信管理トラン の最新の処理連番

    登録

    • xxxトラン.会社コード = xxx
    • xxxトラン.処理日付 = xxx
    • xxxトラン.xxx区分 = xxx
    • xxxトラン.支払金額 = ビジネスロジック1計算結果

    更新

    xxx 予測ワーク:

    • xxx 予測ワーク.優先度
    • xxx 予測ワーク.処理予定日
    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/\343\203\241\343\203\203\343\202\273\343\203\274\343\202\270\350\250\255\350\250\210\346\233\270.html" "b/documents/forMarkdown/\343\203\241\343\203\203\343\202\273\343\203\274\343\202\270\350\250\255\350\250\210\346\233\270.html" new file mode 100644 index 00000000..5c1cf8ed --- /dev/null +++ "b/documents/forMarkdown/\343\203\241\343\203\203\343\202\273\343\203\274\343\202\270\350\250\255\350\250\210\346\233\270.html" @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    MSG01

    メッセージ概要

    • 目的: ログイン処理周りでのエラー
    • スコープ: frontend, backend

    メッセージ定義

    識別子レベルステータスメッセージコメント
    10001E400ユーザー名またはパスワードが間違っていますログイン画面で発生
    10002W文字数オーバーですログイン画面で発生
    10003E500{domain}は無効なユーザードメインですユーザーの所属が異なっている
    10004F500EntraIDに接続できませんログインのバックエンドで発生
    + + + + \ No newline at end of file diff --git "a/documents/forMarkdown/\345\214\272\345\210\206\345\200\244\350\250\255\350\250\210\346\233\270.html" "b/documents/forMarkdown/\345\214\272\345\210\206\345\200\244\350\250\255\350\250\210\346\233\270.html" new file mode 100644 index 00000000..213029a7 --- /dev/null +++ "b/documents/forMarkdown/\345\214\272\345\210\206\345\200\244\350\250\255\350\250\210\346\233\270.html" @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    ENUM01 ユーザー権限

    区分値概要

    • 目的: 画面のモードの切り替えに利用する
    • 物理名: user permission level
    • 型: string
    • スコープ: frontend, backend
    • マスターテーブル: m_user_role

    区分値定義

    論理名物理名バージョンコメント
    ゲストguest011
    未認証ユーザーunauthenticated021
    登録ユーザーuser031
    プレミアムユーザーpremium_user042
    開発者developer050
    テスターtester060
    管理者administrator070
    + + + + \ No newline at end of file diff --git a/documents/forOpenAPISpecification/API_Design.html b/documents/forOpenAPISpecification/API_Design.html new file mode 100644 index 00000000..e83b2364 --- /dev/null +++ b/documents/forOpenAPISpecification/API_Design.html @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Web API 設計標準

    OpenAPI Specification 規約を利用するに当たり、想定する Web API の設計ルールをまとめる。このルールに必ずしも準じる必要は無いが、このような設計を暗黙的に考慮し OpenAPI Specification 規約を作成している。

    HTTP メソッド

    実現したい操作により、以下のような使い分けを想定する。HEAD(リソースの存在チェック)、GET(参照)、POST(新規作成)、PUT(更新)、PATCH(一部更新)、DELETE(削除)。

    HTTP ステータス

    RFC 7231で定義されているレスポンスステータスコードを利用します。

    RFC9205日本語訳)の方針に原則則る。ユースケース別に利用すべき HTTP ステータスコードを記載します。

    共通

    • バリデーションエラー:400 Bad Request
    • 業務エラー:400 Bad Request
    • 認証エラー:401 Unauthorized
    • 認可エラー:403 Forbidden
    • システムエラー:500 Internal Server Error

    GET

    • 正常系:200 OK
      • 検索系 API で結果 0 件の場合も、 200 OK を返すとする
    • パスキー検索系 API で対象リソースが存在しないエラー:404 Not Found

    POST

    • 正常系(同期):201 Created
    • 正常系(非同期):202 Accepted
    • 一意制約違反エラー:409 Conflict
    • 親リソースが存在しないエラー:404 Not Found

    PUT

    • 正常系(同期):200 OK
    • 正常系(非同期):202 Accepted
    • 対象リソースが存在しないエラー:404 Not Found

    DELETE

    • 正常系:204 No Content
      • もし、削除した項目の情報を応答する場合は 200 OK とする
    • 対象リソースが存在しないエラー:404 Not Found

    API バージョン管理

    • /v1, /v2 といったパスで表現する
    • 型名変更、必須パラメータの追加、レスポンスの桁数変更、などをするときはバージョンを上げることを検討する

    パラメータの命名

    boolean 型である場合、 [a-zA-Z0-9-_]+_flag という命名は非推奨とする。

    is_[a-zA-Z0-9-_]+has_[a-zA-Z0-9-_]+ などの命名を代わりに検討する

    + + + + \ No newline at end of file diff --git a/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html b/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html new file mode 100644 index 00000000..4b066e49 --- /dev/null +++ b/documents/forOpenAPISpecification/OpenAPI_Specification_2.0.html @@ -0,0 +1,478 @@ + + + + + + OpenAPI Specification 2.0規約 | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    OpenAPI Specification 2.0規約

    フューチャー株式会社

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。 ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。 また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    OpenAPI Specification 2.0(Swagger, OAS2)定義についてのコーディング規約をまとめます。より新しいバージョンとして OAS 3.0.3 規約(作成中)がありますので、ご注意ください。

    本規約の前提条件に従い作成されています。ToC 向けの LSUDs(Large Set of Unknown Developers)な Web API にはマッチしない可能性があります。

    Web API 自体の設計については範囲外としますが、API 設計標準に利用するステータスコードなどは記載しています。

    免責事項

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせた開発手法が採用されている。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している

    ファイルフォーマット

    ファイルフォーマット規約に準じる。

    要素規約

    Swagger の基本構造は以下の、swagger・info・host・basePath・schemes・paths・definitions から構成される。

    要素の並び順は、原則 OpenAPI Specification 2.0(Swagger, OAS2) に記載された順番に記載する。

    yaml
    swagger: "2.0"
    +info:
    +  title: サンプルAPI
    +  description: サンプルAPIはシステムにおけるユーザーのアカウント、契約、支払い、注文履歴などを管理できます
    +  version: 1.0.0
    +host: api.example.com
    +basePath: /v1
    +schemes:
    +  - https
    +consumes:
    +  - application/json
    +produces:
    +  - application/json
    +tags:
    +  - name: user
    +    description: ユーザー
    +paths:
    +  /users/{user_id}/account:
    +    get:
    +      tags:
    +        - user
    +      summary: API-001 ユーザーアカウント取得
    +      description: ユーザーのアカウント情報を取得します
    +      operationId: getUserAccount
    +      parameters:
    +        - name: user_id
    +          in: path
    +          type: string
    +          pattern: ^[0-9a-zA-Z_-]*$
    +          minLength: 4
    +          maxLength: 16
    +          required: true
    +          description: 登録時に設定されたユーザーID
    +      responses:
    +        "200":
    +          description: OK
    +          schema:
    +            $ref: "#/definitions/UserAccount"
    +        "400":
    +          description: パラメータ不正
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "404":
    +          description: リソースが存在しない
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "500":
    +          description: 内部エラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +        default:
    +          description: その他予期せぬエラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +definitions:
    +  UserAccount:
    +    required: [user_id, user_name, account_type, register_at]
    +    properties:
    +      user_id:
    +        type: string
    +        description: ユーザーID
    +        minLength: 4
    +        maxLength: 16
    +        example: 32AB1aaad100eavV
    +      user_name:
    +        type: string
    +        description: ユーザー名
    +        minLength: 1
    +        maxLength: 128
    +        example: 未来太郎
    +      account_type:
    +        type: string
    +        description: アカウント種別(1:ゲスト 2:登録済み 3:プレミアム 4:管理者)
    +        minLength: 1
    +        maxLength: 1
    +        example: "1"
    +      register_at:
    +        type: string
    +        description: 登録日時
    +        format: date-time
    +        example: "2023-04-01T11:30:45.000Z"

    swagger

    • 2.0 固定とする

    info

    info オブジェクトには Web API に関するメタデータを記載する。 title, description, version を必須項目とする。

    フィールド名必須記載内容
    titleWeb API の総称
    descriptionWeb API の簡単な説明
    versionOpenAPI ドキュメントのバージョン
    termsOfService利用規約の URL
    contact連絡先情報
    licenseライセンス情報

    title

    WebAPI の総称を記載する。システム名やサービス名 + API のような命名とすることを推奨する。 例. X System API

    desctiption

    Web API が提供する機能の概要・想定する利用者やユースケース・制約などを記載する。

    version

    この API 仕様のドキュメントのバージョンを記載する。アプリケーションのバージョン(git tag やリリースで管理するようなバージョン)とは別である。

    本規約の推奨は major.minor 形式である。 0.1 固定で開発を進め、サービスのリリース時に 1.0 とし、その後の項目やオプション、パスの追加ごとに 1.1 などインクリメントしていく。もし他チームへのドキュメントの頻繁な共有が必要だれば、1.0 のかわりに 2023.03.26 といった形式も許容する。

    host

    OpenAPI 3 系と異なり、 Swagger では複数のホストを指定できない。そのため host には開発環境(local, develop, staging, production というステージ区別であれば、develop)で用いる IP、ポート番号を指定する。他チームに提供するサンドボックス環境を用意する場合は、そのエンドポイントを指定しても良い。localhost などのローカル開発への向き先変更は、ツール側で対応している事が多く上書き可能なため記載しない。API 定義書は予期せぬタイミングで他チームに展開する必要がしばしばあり、お試しで触っても良い環境があることを示すことで情報量を増やし、円滑なコミュニケーションを促進することを狙いとする。

    yaml
    # OK
    +host: dev.api.example.com:80
    +host: sandbox.api.example.com:80
    +
    +# NG(ローカル開発で用いる環境を指定する)
    +host: localhost:8001
    +
    +# NG(LSUDs向けのWeb API開発では不用意に本番環境を触られたくないときが多く、避けるべきである)
    +host: prod.api.example.com:80

    basePath

    作成する Swagger 定義の URL パスの全てで、共通するプレフィックスを持つ場合に指定する。Swagger の仕様上、先頭には / が必須であるため、以下のように定義する。

    yaml
    # OK
    +basePath: /v1
    +basePAth: /api/v2
    +
    +# NG
    +basePath: v2

    schemes

    最終的に利用するスキーマのみを記載する。通常、HTTP 通信での Web API 提供は行わないと考えられるため、 https 固定で設定する。ローカル開発では http を指定することも多いが、ツールで生成されたコードのオプションで通常書き換えが可能なため、http の併記は許可しない。ただし、サーバサイドのマイクロサービス同士の通信で、VPC(プライベートセグメント)内であり、SSL 通信を本当に利用しない場合は http と記載する。

    yaml
    # OK
    +schemes:
    +  - https
    +
    +# NG(httpの指定は通常、Web APIサーバアプリケーションの開発時を除いて不要であるためわざわざ追加しない)
    +schemes:
    +  - http
    +  - https

    もし、WebSocket スキームを提供するサービスの定義である場合は、wss を(追加で)指定する。定義上は https 側との共存ができないため、ファイル定義を分けるようにする。

    security, securityDefinitions

    Swagger では、次の認証タイプを記載できる(詳細)。

    1. ベーシック認証
    2. API キー(リクエストヘッダ, クエリパラメータ)
    3. OAuth2

    もし、認証が必須であれば記載する。全ての Web API で未認証を受け入れる場合は記載しない。認証の要否が API ごとに異なる場合は、各 API 側で security: [] と記載しして上書き定義する必要がある。

    yaml
    # OK
    +securityDefinitions:
    +  OAuth2:
    +    type: oauth2
    +    flow: accessCode
    +    authorizationUrl: https://example.com/authorize
    +    tokenUrl: https://example.com/.well-known/jwks.json
    +
    +# OK(OAuth2認証ありの場合)
    +paths:
    +  /users/{user_id}/account:
    +    get:
    +      ...
    +      security:      # 認証が不要な場合は security: [] と記載する
    +        - OAuth2: []

    produces

    Web API が応答する際の MIME タイプを指定します。未指定の場合に、コード生成などツール側で予期しない動作をすることがあるため、固定で指定する。新規構築の Web API であれば application/xml は不要と通常は考えられるので、application/json を記載する。また、RFC 7807 Problem Details for HTTP APIs では Content-Type に application/problem+json を設定するとあるが、一部のコード生成ツールにおいて、 application/problemapplication/problem+json の使い分けが難しいため、併記を必須としない。OpenAPI Specification の 3 系ではステータスコードごとに Content-Type を指定できるため、3 系への移行も検討する。

    yaml
    # OK(applicaton/problem+json 無しでも良い)
    +produces:
    +  - application/json
    +
    +# OK(利用するツールで複数のContent-Typeの使い分けが実現しやすい場合は以下でも良い)
    +produces:
    +  - application/json
    +  - application/problem+json

    ある API のみ、バイナリ(画像データなど)を返すなどのケースがあれば、 paths 配下で上書き指定する。

    yaml
    paths:
    +  /logo:
    +    get:
    +      summary: API-002 ロゴ画像を取得する
    +      description: サービスのロゴ画像をpng形式で取得します
    +      operationId: getLogoImage
    +      produces:
    +        - image/png
    +      responses:
    +        "200":
    +          description: OK
    +          schema:
    +            type: file

    consumes

    Web API が要求を受け入れる際の MIME タイプを指定する。未指定の場合に、コード生成などツール側で予期しない動作をすることがあるため、固定で指定する。新規構築の Web API であれば application/xml は不要と通常は考えらえるので、application/json だけ記載する。

    仕様上、 consumes は POST, PUT, PATCH を利用した操作のみに影響し、GET などリクエストボディが無い操作では無視される。

    yaml
    # OK
    +consumes:
    +  - application/json

    tags

    タグを用いて、API 操作をグループ化することができる。ドキュメントやツールにとって非常に重要であるため、 必須 で指定する。

    • Swagger UI(HTML ドキュメント)の順序を制御できる
      • 未指定の場合は、登場順で生成されてしまう
    • 命名は、 単数形 で、小文字かつ半角スペース区切り で記載する
      • コード生成で利用され、Go ではパッケージ名や TypeScript の Class 単位となるため、シンプルな命名にする
      • HTML ドキュメントで参照する場合の可読性を上げるため、単語を半角スペース区切りとする
    • タグごとに description も必須で記載する
    yaml
    # NG
    +tags:
    +  - name: product
    +    description: 製品
    +  - name: store
    +    description: 店舗
    +  - name: user account
    +    description: ユーザーアカウント
    +
    +# NG
    +tags:
    +  - name: products
    +  - name: stores
    +  - name: user_account
    +  - name: UserAccount

    paths

    paths 配下に個々の API エンドポイントを記載する。

    paths は根幹となる定義部分であり、以下のように重要な定義が続く。それぞれ重要な要素ごとに規約を示す。

    sh
    Paths              # API定義全体
    + Path           # URLパス
    + Operation    # HTTPメソッド
    + Parameter  # リクエストパラメータ
    + Responses  # レスポンス
    + Response # ステータスコードに応じたレスポンス

    Paths > Path

    記載順は以下のルールである。

    • トップレベルの tags でグルーピングした順番に記載する
    • URL は短いものから並べる
    • HTTP メソッドは、 head, get, post, put, patch, delete の順にする
    yaml
    # 並び順の例(HTTPメソッドの子要素はtags以外を省略)
    +tags:
    +  - user
    +  - item
    +paths:
    +  /users:
    +    get:
    +      tags:
    +        - user
    +      ...
    +  /users/{user_id}/account:
    +    get:
    +      tags:
    +        - user
    +      ...
    +  /users/{user_id}/account:
    +    patch:
    +      tags:
    +        - user
    +      ...
    +  /items:
    +    get:
    +      tags:
    +        - item
    +      ...

    Paths > Path > Operation

    URL に紐づく HTTP メソッドで、1 つの操作を定義します。

    • summary
      • API の操作概要を summary に記載する
      • 機能 ID があるのでれば、ここに記載する
      • 例: API-001 ユーザアカウント取得
    • description
      • API の振る舞いの詳細や注意点(ある条件で区分の値が変わったり、権限についての注意、要素が空になるなど)を記載する
    • operationId
      • コード生成で利用される項目なので、必須で指定する
      • 原則、camelCase${HTTPメソッド}${機能物理名} で記載する(例: getUser, postUser, deleteUser)
        • ただし、HTTP メソッドに紐づかない操作であれば、HTTP メソッドの代わりに個別の動詞(例: searchUser, moveItemList, addPermission)を当てはめる
        • コード生成対象によっては、get_user(Python)、GetUser(Go)といった命名規約にしたくなるが、通常はコード生成側で配慮してくれる
    • consumes, produces
      • トップレベルに application/json を記載しているため、同様であれば記載しない
    yaml
    /users:
    +  get:
    +    tags:
    +      - user
    +    summary: API-001 ユーザーアカウント取得
    +    description: |
    +      ユーザーのアカウント情報を取得します。
    +      ログイン情報が不正の場合はアカウントが存在しても404を返すことがあります。
    +      アカウント種別については【別紙】X_定数一覧 を参照ください。
    +    operationId: getUser
    +    parameters: ...
    +    responses: ...

    Paths > Path > Parameter

    リクエストの定義を記載する。

    • name

      • snake_case で物理名を記載します
      • HTTP メソッドが POST/PUT/HTTP の場合は body に固定する
    • in

      • 仕様上、必須で query, header, path, formData, body のどれかを指定する
      • HTTP メソッドが HEAD/GET/DELETE の場合
        • path, query のみの利用を推奨する
      • HTTP メソッドが POST/PUT/HTTP の場合
        • body のみの利用を推奨する
    • required

      • 必須の場合のみ記載する。デフォルト false であるため、任意項目の場合は記載しない
      • POST, PUT で用いるリクエストボディに対しては、 required: true を必ず指定する
        • リクエストボディ自体が未指定だった場合、各項目の required: true を指定していてもサーバサイドのチェックが有効に働かないことがあるため
    • pattern, minLength, maxLength などの条件について

    • schema

      • リクエストボディは、$ref を用いて、#/definitions 配下に記載する。$ref を用いない記載は許可しない。
      yaml
        # OK
      +  - name: body
      +    in: body
      +    required: true
      +    schema:
      +      $ref: "#/definitions/PutUserAccount"
      +
      +  # NG
      +  - name: body
      +    in: body
      +    required: true
      +    type: object
      +    required: [user_name, account_type, register_at, point]
      +    properties:
      +      user_name:
      +        type: string
      +        ...
      +      account_type:
      +        type: string
      +        ...
      • モデル名は、 {HTTPメソッド名}{物理名} の PascalCase で記載する
        • 例: PutUserAccount、PostUserAccount, PatchUserAccount
    • desription

      • 項目の論理名や補足説明を記載する
    yaml
      /users/{user_id}/account:
    +    get:
    +      ...
    +      parameters:
    +        - name: user_id
    +          in: path
    +          type: string
    +          pattern: ^[0-9a-zA-Z_-]*$
    +          minLength: 4
    +          maxLength: 16
    +          required: true
    +          description: 登録時に設定されたユーザーID
    +      responses:
    +        ...
    +    put:
    +      ...
    +      parameters:
    +        - name: user_id
    +          in: path
    +          type: string
    +          pattern: ^[0-9a-zA-Z_-]*$
    +          minLength: 4
    +          maxLength: 16
    +          required: true
    +          description: 登録時に設定されたユーザーID
    +        - name: body
    +          in: body
    +          required: true
    +          schema:
    +            $ref: "#/definitions/PutUserAccount"
    +      responses:
    +        ...

    Paths > Path > Responses

    レスポンスの定義を記載する。

    • description
      • 必須で記載する
    • ステータスコードは発生し得る全てのパターンを列挙する
      • 正常系の 200 OK201 Created202 Accepted 204 No Content 以外の、異常系も忘れず記載する
      • 通常発生しない、サーバサイドの内部的な予期せぬエラー 500 Internal Server Error は必須で記載する
      • リクエストパラメータが存在する場合は 400 Bad Request が、認証がある場合は 401 Unauthorized403 Forbiddend が考えられる
      • default は必須で指定する
        • 例えば、URL 自体が存在しない場合の 404 NotFound や、提供していない HTTP メソッドを呼び出した場合に 405 Method Not Allowed を、自動生成したサーバサイドの実装が返すことがある。この場合、 default を指定していないとフロントエンド側でパースエラーとなることがあるため。各 API エンドポイントのサーバサイド側の実装が応答しないコードは、 default でまとめて指定させる
    yaml
      /users/{user_id}/account:
    +    get:
    +      ...
    +      parameters:
    +        ...
    +      responses:
    +        "200":
    +          description: OK
    +          schema:
    +            $ref: "#/definitions/Users"
    +        "400":
    +          description: パラメータ不正
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "404":
    +          description: リソースが存在しない
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "500":
    +          description: 内部エラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +        default:
    +          description: その他予期せぬエラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +    post:
    +      ...
    +      parameters:
    +        ...
    +      responses:
    +        "201":
    +          description: 新規登録に成功
    +          schema:
    +            $ref: "#/definitions/UserAccount"
    +        "400":
    +          description: パラメータ不正
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "409":
    +          description: すでに登録済みのユーザーIDを用いている
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "500":
    +          description: Internal Server Error
    +          schema:
    +            $ref: "#/definitions/Error"
    +        default:
    +          description: "その他予期せぬエラー"
    +          schema:
    +            $ref: "#/definitions/Error"

    definitions

    • モデル名は、PascalCase で記載する

    • 種別が配列の場合、ネストして定義するのではなく、 $ref を活用する

    • もし、リソース名が単複同形で type: array と区別できない場合、 List を末尾に付けて区別する

      • そうではない場合は s を付けて表現する
      yml
      # OK
      +- in: query
      +  name: product_types
      +  type: array
      +  description: プロダクト種別
      +
      +# NG
      +- in: query
      +  name: product_type_list # xxx_listはNG
      +  type: array
      +  description: プロダクト種別
    • リクエストボディ

      • 必須項目は required で項目を全て指定する
      • その他、項目定義として可能であればできる限り細かく指定する
    • レスポンスボディ

      • type, description, exampleが必須。
      • format, minLength, maxLength などの型桁はできる限り細かく指定する
        • 多くのクライアントは RDB をデータストアに持ち、それらの型定義の参考にするためである
      • enum指定してはならない
        • 一部のクライアント側のコード生成で、存在しない区分値を指定するとエラーになる(レスポンスを受信できない)。これはサーバサイドで区分値を増やす必要があるケースで、サーバ・クライアントの同期をとる必要があり困難なケースが多い。例えばクライアントがモバイルである場合、サーバサイドで区分値を追加した場合には、全端末でアプリアップデートが必要となリ、事実上 API 互換性がなくなるため、v1 を保持しつつ、区分値を追加した v2 の Path を追加する必要が出てくる
      • pattern の指定は不要
        • pattern も enum と同様に、サーバサイドが当初よりリクエストのバリデーションを緩めた場合に、古い pattern でクライアントがレスポンスを検証すると動作しなくなるため。クライアントサイドが RDB など書き込み時のスキーマが厳密であったとしても、正規表現レベルの厳格さで書き込みチェックをすることは無いと考えられる
      • example の値は、 例えば Prism でサーバのモックとして動かす場合に返される値になるため、できる限り具体的な値にする
      • 空文字、false, 0 値を返しうる項目に、x-omitempty :false を付与する
        • ツールの実装によっては、0 値や false を返した場合に JSON フィールドから除外される(omit される)ことがある
    • 日付は 2023-04-02 といった ISO 8601 date フォーマットを推奨する。この場合は fromat: date を指定する

    • 日時は 2023-04-02T15:04:05+09:00 といった ISO 8601 datetime フォーマットを推奨する。この場合は、 format: date-time を指定する

    • エラーについて

      • API 全体で一貫したエラーを返すことを推奨とし、そのために "#/definitions/Error" といった共通のエラーモデルを利用を推奨する
      • RFC 7807 Problem Details for HTTP APIs があるため、レイアウトを参考にする
    yaml
    definitions:
    +  UserAccounts:
    +    type: array
    +    items:
    +      $ref: "#/definitions/UserAccount"
    +  UserAccount:
    +    required: [user_id, user_name, account_type, register_at, point]
    +    properties:
    +      user_id:
    +        type: string
    +        description: ユーザーID
    +        minLength: 4
    +        maxLength: 16
    +        example: 32AB1aaad100eavV
    +      user_name:
    +        type: string
    +        description: ユーザー名
    +        minLength: 1
    +        maxLength: 128
    +        example: 未来太郎
    +      account_type: # enumは指定しないこと
    +        type: string
    +        description: アカウント種別(1:ゲスト 2:登録済み 3:プレミアム 4:管理者)
    +        minLength: 1
    +        maxLength: 1
    +        example: "1"
    +      register_at:
    +        type: string
    +        format: date-time
    +        description: 登録日時
    +        example: "2023-04-01T11:30:45.000Z"
    +      point:
    +        type: integer
    +        format: int64
    +        description: ポイント(0ポイント以上)
    +        exampe: 421
    +  PostUserAccount:
    +    required: [user_id, user_name, account_type, register_at]
    +    properties:
    +      user_id:
    +        type: string
    +        minLength: 4
    +        maxLength: 16
    +        pattern: ^[0-9a-zA-Z_-]*$
    +        description: ユーザーID
    +        example: 32AB1aaad100eavV
    +      user_name:
    +        type: string
    +        minLength: 1
    +        maxLength: 128
    +        description: ユーザー名
    +        example: 未来太郎
    +      account_type:
    +        type: string
    +        minLength: 1
    +        maxLength: 1
    +        enum: ["1", "2", "3", "4"]
    +        description: アカウント種別(1:ゲスト 2:登録済み 3:プレミアム 4:管理者)
    +        example: "1"
    +      register_at:
    +        type: string
    +        format: date-time
    +        description: 登録日時
    +        example: "2023-04-01T11:30:45.000Z"
    +  Error:
    +    description: エラー (RFC 7807)
    +    type: object
    +    required: [title, status, detail]
    +    properties:
    +      title:
    +        type: string
    +        description: タイトル
    +        minLength: 1
    +        maxLength: 64
    +        example: request validation error
    +      status:
    +        type: integer
    +        format: int32
    +        description: HTTPステータスコード
    +        minimum: 400
    +        maximum: 600
    +        exclusiveMaximum: true
    +        example: 503
    +      message_cd:
    +        type: string
    +        description: 状態の切り分けとアクションが一意に特定できるメッセージコード
    +        minLength: 1
    +        maxLength: 16
    +        example: APPERR-0001
    +      detail:
    +        type: string
    +        description: エラーメッセージ詳細
    +        minLength: 1
    +        maxLength: 128
    +        example: user name is too long

    バリデーションについて

    OpenAPI 定義を記載するにあたり、バリデーションをどこまで厳密に定義すべきかという議論はよく行いがちである。

    リクエストパラメータの各項目に対して、必須・型・桁・区分値・日付・正規表現のチェックが行える。レスポンスで用いるモデルについても同様に設定でき、enum, pattern 以外は API の利用者(クライアント)側の DB 設計などに必要な型桁情報を渡すのに有用であるため、できる限り詳しく指定する。

    必須

    必須パラメータのみ required: true を定義する

    デフォルト値

    パラメータにデフォルト値がある場合はdefault を定義する。

    yaml
    # ex. enum
    +name: limit
    +type: number
    +format: integer
    +minimum: 1
    +maximum: 100
    +default: 20
    +description: 検索結果の項目数上限(1~100が指定可能)

    【注意】API 公開後に、default 値を変更してはならない(API の互換性が崩れるため)。もし変更する場合は、API のバージョンを上げること。

    型・フォーマット

    型(type)は string(文字列), number(数値), integer(整数値), boolean(真偽値) array(配列), file(ファイル) のうちどれか指定する.

    フォーマット(format) は以下の型の詳細情報を示すもので、可能な限り設定する。

    • integer (整数)
      • int32, int64
    • number (数値)
      • float, double
    • string (バイナリ)
      • byte: Base64 でエンコードされた文字列
      • binary: バイト配列
    • string (日付)
      • date: RFC3339 full-date(例: 2023-07-21)
        • 項目名は _on を接尾辞につけることを推奨とする
      • date-time: RFC3339 date-time(例: 2023-07-21T17:32:28Z)
        • 項目名は _at を接尾辞につけることを推奨とする
    • string (その他)
      • password: Swagger UI で入力が隠される
      • その他、 email, uuid など Open API 仕様に存在しない任意のフォーマットを独自のドキュメント生成などのために記載しても良い

    データ型によって、利用できる桁を指定する項目が異なる。可能な限り設定する。

    • 文字列
      • 最大桁数:maxLength
      • 最小桁数:minLength
    • 数値または整数値
      • 最小値(境界値を含む):minimum
      • 最大値(境界値を含む):maximum
      • 境界値を含まない場合のみexclusiveMinimum: trueまたはexclusiveMaximum: trueを定義する。minimum, maximum で代用できる場合は利用しない
    • 配列:
      • 最大要素数:maxItems
      • 最小要素数:minItems
      • required: trueの場合は原則としてminItems: 1を定義する
      • uniqueItems は必須で指定する(通常は一意であるべき)

    【注意】API 公開後に、レスポンスの maxLength を以前より大きい値に変更してはならない。レスポンスの maxLength など API 利用者側システムの DB の ERD 定義のインプットになる事が多いため。もし行う場合は API のバージョンを上げることや、連携先に桁数変更の旨を調整するなどの考慮を行う。

    区分値

    区分値の場合は enum 属性を利用し、descriptionには区分値の論理名を記載する。

    yaml
    name: gender
    +type: string
    +enum: ["0", "1", "2", "9"]
    +description: |
    +  性別
    +    0: 不明
    +    1: 男
    +    2: 女
    +    9: 適用不能

    固定値

    固定値 の場合も enum を 1 つだけ指定して表現する。この場合もレスポンスで利用する場合は指定しない

    yaml
    name: file_layout
    +type: string
    +enum: ["json"]
    +description: ファイルレイアウト

    その他(正規表現)

    正規表現で表現できる文字列はpatternを利用して定義する。桁や区分値で代替できる場合は、pattern を用いない

    例:

    yaml
    remind_time:
    +  type: string
    +  description: リマインド時刻。(hh:mm)形式
    +  example: 23:59
    +  pattern: "^(2[0-3]|[01][0-9]):([0-5][0-9])$"

    ファイルアップロード

    Web API におけるファイルアップロードのよく利用される実装手段は、大きく分けて以下の 3 手法に分類できます

    1. ファイルのコンテンツを Base64 などにエンコードして、JSON の項目として設定し、リクエストボディで送る
      • メリット: 通常の JSON を扱うのとほぼ変わらないため楽。サムネイルなど限定されたユースケースの場合に向く
      • デメリット: 巨大なファイルを扱う場合などサーバリソース負荷が懸念。Base64 に変換する分 CPU 負荷は余計にかかる。ペイロードが膨れるためモバイルなどのクライアントでは帯域利用での懸念がある
    2. multipart/form-data ファイルを送信する
      • メリット: ファイルを Base64 に変換するといった作業が不要
      • デメリット: ブラウザ以外のクライアントにとって手間がかかる
    3. アップロード用に用いる、オブジェクトストレージの Signed URL を発行し、クライアントから直接ファイルをアップロードしてもらう

    本規約でファイルアップロードについて上記の 3. Signed URL を推奨する。API 呼び出しとしては次のようなフローとする。

    フローの ①、② はアプリケーション固有の紐づけルールにおいて Web API を設計すれば良いため、本規約で YAML の設定例は記載しない。フロー ② については Signed URL を用いたアップロードであり、アプリケーションの Web API 定義を書く必要はない。もし、監査ログなどのガバナンス上、直接オブジェクトストレージへの書き込みを許容されないケースは、B で Signed URL に相当する書き込み先を提供し、B を経由してファイルをアップロードする。

    上記どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    ファイルダウンロード

    ファイルアップロードと同様、オブジェクトストレージの Signed URL 経由を経由してのダウンロードさせる手法を推奨する。Web API としてはオブジェクトストレージにダウンロード用のファイルを書き込み、クライアントが取得するための Signed URL をレスポンスの JSON 項目に渡す方式である。

    もし、サムネイルやアイコン画像など、ファイル容量がごく小さい場合は Base64 にエンコードして JSON に埋め込んで渡しても良い。線引をどこに設置するかは本規約で定義しない。

    どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    CORS

    CORS(Cross-Origin Resource Sharing)のために、options メソッドの追記は 原則不要 とする。

    理由は以下である。

    • サーバ側
      • options メソッド対応は、API 使用ではなく実装レベルの機能横断的な処理(Java における Servlet Filter や Spring の Interceptor、Go における Middleware など)で行うことが大半であり、コード生成が不要
    • クライアント側
      • options メソッドを用いるのはクライアントがブラウザであり、クライアントのアプリケーションコードが明示的にアクセスしないため、コード生成が不要
    • 使用面として
      • Access-Control-Allow-Origin がどのような値を返すか、呼び出し元によって動的な値を返したい場合があり、記載が困難なケースがある

    ただし、Amazon API Gateway のようなサービスを利用する場合は、options メソッドの記載が必須である場合は除く[1]

    OpenTelemetry Traceparent HTTP Header

    OpenOpenTelemetry で用いるられるtraceparent のリクエストヘッダーは OpenAPI で 原則不要 とする。

    理由は以下である。

    • OpenTelemetry が定めるヘッダー類は、API 横断的に設定されるべきものであり、ミドルウェアやフレームワーク側などでの一律の制御を推奨するため
    • 記載することにより、OpenOpenTelemetry に対応していることを明記し開発者に周知できるメリットより、各アプリ開発者が生成されたコードで悩んだり、誤解されることを回避したいため

    API のバージョン管理

    Swagger 定義で以下の変更を行う場合は、利用するコード生成の動作によってはクライアントにとって互換性を失う破壊的変更であることがあるため、変更は調整の上で行うか、バージョンを上げることを考える。

    • リクエスト項目
      • フィールドの型を変更する
      • 桁数を小さくする
      • enum の種類を減らす
      • 正規表現のチェックを厳しくする
      • 必須フィールドを後から追加する
      • デフォルト値を後から変更する
    • レスポンス項目
      • フィールドの型を変更する
      • 桁数を大きくする
      • デフォルト値を後から変更する

    ファイル単位

    TODO v3 の作成タイミングと合わせて追記する

    推奨ツール

    本当に使ってよかった OpenAPI (Swagger) ツール にあるように、様々なツールで開発ができる。VS Code を用いる場合は以下のプラグインを推奨する。

    editorconfig を用いる場合は、以下の定義を推奨する。

    ini
    root = true
    +
    +[*]
    +charset = utf-8
    +insert_final_newline = true
    +trim_trailing_whitespace = true
    +end_of_line = lf
    +
    +[*.{json,yaml}]
    +indent_size = 2
    +indent_style = space

    License

    CC-By-4.0


    1. https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/enable-cors-for-resource-using-swagger-importer-tool.html ↩︎

    + + + + \ No newline at end of file diff --git a/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html b/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html new file mode 100644 index 00000000..0e1be2a6 --- /dev/null +++ b/documents/forOpenAPISpecification/OpenAPI_Specification_3.0.3.html @@ -0,0 +1,844 @@ + + + + + + OpenAPI Specification 3.0.3規約 | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    OpenAPI Specification 3.0.3規約

    フューチャー株式会社

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    本ドキュメントは OpenAPI Specification 3.0.3に則った API ドキュメントを記述する際のコーディング規約をまとめている。 旧バージョンであるOpenAPI Specification 2.0 の規約も存在するため、v2 を使用している場合はそちらを参照されたい。

    本規約は前提条件に基づいて作成されており、ToC 向けの LSUDs(Large Set of Unknown Developers)向けの Web API には適合しない場合もあるのでご留意いただきたい。 Web API の設計自体はこの規約の範囲外であるが、API 設計標準 にステータスコード等の標準を記載しているため、必要に応じて参考にされたい。

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせた開発手法が採用されている。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している

    ファイルフォーマット

    ファイルフォーマット規約に従う。

    OpenAPI ドキュメントの構成要素

    OpenAPI ドキュメントを構成する要素はオブジェクトと呼ばれ、ルートオブジェクトは以下の要素で構成される。

    各種規約を理解する上で、これらの要素を大まかに把握しておくことが重要である。

    各オブジェクトの詳細については公式ドキュメントを参照されたい。

    フィールド名必須説明
    openapiOpenAPI ドキュメントが使用する OpenAPI 仕様のバージョン番号
    infoAPI に関するメタデータ
    serversAPI サーバへの接続情報
    pathsAPI の利用可能なパスと操作方法
    components複数の API における共通の定義
    securityAPI 全体で利用可能なセキュリティ(認証)機構
    tags各種 API をグルーピングするためのタグ
    externalDocs追加の外部ドキュメント

    要素規約

    先述した OpenAPI ドキュメントを構成する要素別に具体的なコーディング規約を記載する。

    openapi

    OpenAPI ドキュメントが使用する OpenAPI 仕様のセマンティックバージョン番号を記載する。

    本規約はバージョン3.0.3を対象としているため、3.0.3とする。

    良い例:

    yaml
    openapi: 3.0.3

    悪い例:

    yaml
    openapi: 3.0

    info

    infoオブジェクトには Web API に関するメタデータを記載する。

    title, description, version を必須項目とする。

    フィールド名必須記載内容
    titleWeb API の総称
    descriptionWeb API の簡単な説明
    versionOpenAPI ドキュメントのバージョン
    termsOfService利用規約の URL
    contact連絡先情報
    licenseライセンス情報

    info > title

    Web API の総称を記載する。

    システム名やサービス名 + API のような命名を推奨する。

    良い例:

    yaml
    info:
    +  title: X System API

    info > description

    Web API が提供する機能の概要・想定する利用者やユースケース・制約などを記載する。

    info > version

    この API 仕様のドキュメントのバージョンを記載する。

    アプリケーションのバージョン(git tag やリリースで管理するようなバージョン)とは別である。

    • major.minor 形式を推奨する

      • 0.1 固定で開発を進め、サービスのリリース時に 1.0 とし、その後の項目やオプション、パスの追加ごとにマイナーバージョンをインクリメントしていく

      良い例:

      yaml
      info:
      +  version: 1.0
    • 他チームへの API ドキュメントの頻繁な共有が必要な場合は YYYY.MM.DD の日付形式も許容する

      良い例:

      yaml
      info:
      +  version: 2023.03.26

    servers

    Web API を提供するサーバの情報を記載する。

    • url, description を必須項目とする
    • ステージ(local, develop, staging など)が複数ある場合は各ステージ分の情報を記載する。
    • SSKDs 向けの Web API 開発においては本番環境の URL を不用意に公開したくないケースが多く、記載は避けるべきである

    良い例:

    yaml
    servers:
    +  - url: http://localhost:8001/
    +    description: Localhost Server
    +  - url: https://dev.api.example.com/v1
    +    description: Development Server
    +  - url: https://staging.api.example.com/v1
    +    description: Staging Server

    悪い例:

    yaml
    servers:
    +  - url: https://prod.api.example.com/v1
    +    description: Production Server

    paths

    API の利用可能なエンドポイントと操作方法を記載する。

    • API ごとに機能 ID を定義している場合、paths 配下の各パスは機能 ID の昇順に定義する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      summary: API-101 ユーザ一覧取得
      +  /products:
      +    get:
      +      summary: API-201 商品一覧取得

      悪い例:

      yaml
      paths:
      +  /products:
      +    get:
      +      summary: API-201 商品一覧取得
      +  /users:
      +    get:
      +      summary: API-101 ユーザ一覧取得
    • URL パスが複数の単語からなる場合、ケバブケースで表現する

      良い例:

      yaml
      paths:
      +  /product-owners:
      +    get: ...

      悪い例:

      yaml
      paths:
      +  /productOwners:
      +    get: ...
    • HTTP メソッドは GET, POST, PUT, PATCH, DELETE の順に定義する

      良い例:

      yaml
      paths:
      +  /products:
      +    get: ...
      +    post: ...

      悪い例:

      yaml
      paths:
      +  /products:
      +    post: ...
      +    get: ...
    • HTTP メソッドの配下に定義されるオペレーションオブジェクトは、下記の項目を必須項目とする

    フィールド名必須記載内容
    tagsAPI の論理的なグループ
    summaryAPI の操作概要
    descriptionAPI の振る舞いの詳細や注意点
    externalDocsAPI に関する追加の文書
    operationIdAPI の利用可能なエンドポイントと操作方法
    parametersAPI のリクエストパラメータ
    requestBodyAPI のリクエストボディ
    responsesAPI のレスポンス
    callbacks
    deprecatedAPI が非推奨であることの宣言
    securityAPI のセキュリティ機構
    serversAPI に対応する代替サーバ

    paths > {path} > {method} > tags

    API の論理的なグループを指定する。

    • タグオブジェクトとして事前定義したタグの中から選択する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      tags:
      +        - users
      +      ...
      +tags:
      +  - name: users

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      tags:
      +        # タグオブジェクトとして定義されていないタグが指定されている
      +        - users
      +      ...
      +tags: []
    • 1 API につき 1つのタグを指定する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      tags:
      +        - users
      +      ...

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      # 複数のタグが指定されている
      +      tags:
      +        - users
      +        - admin
      +      ...

    paths > {path} > {method} > summary

    API の操作概要を記載する。

    • API ごとに機能 ID や機能名があるのであれば記載する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      summary: API-001 ユーザ一覧取得

    paths > {path} > {method} > description

    API の振る舞いの詳細や注意点を記載する。

    別途参照させるべき設計書があるのであれば、設計書へのリンクを記載しても良い。

    良い例:

    yaml
    paths:
    +  /users:
    +    get:
    +      description: [API詳細設計書(API-001)](https://example.com/API-001.md)

    paths > {path} > {method} > operationId

    API を識別するための一意な文字列を記載する。

    • HTTP メソッドと URL パスの組み合わせをキャメルケースで表現する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      operationId: getUsers
      +      ...
      +  /products/{product_id}:
      +    put:
      +      operationId: putProductsProductId
      +      ...

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      operationId: get_users
      +      ...
    • OpenAPI ドキュメントエディタとして広く使用される Stoplight が提供するLinterの定義としては、ケバブケースが標準になっているため、Stoplight を使用する場合はケバブケースで表現しても良い

    paths > {path} > {method} > parameters

    API のリクエストパラメータを記載する。

    • クエリパラメータはスネークケースで表現する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      parameters:
      +        - name: account_type
      +          in: query

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      parameters:
      +        - name: account-type
      +          in: query
    • クエリパラメータは HTTP メソッドが GET, DELETE の場合にのみ指定する

      良い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      parameters:
      +        - name: account_type
      +          in: query

      悪い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      parameters:
      +        - name: acaccount_type
      +          in: query
    • ヘッダはハイフンを区切り文字とするパスカルケースで表現する

      良い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      parameters:
      +        - name: Content-Type
      +          in: header

      悪い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      parameters:
      +        - name: ContentType
      +          in: header

    paths > {path} > {method} > requestBody

    API のリクエストボディを記載する。

    • 標準仕様の describing-request-body の章にも記載がある通り、リクエストボディは HTTP メソッドが POST, PUT, PATCH の場合のみ指定する

      良い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      requestBody:
      +        required: true
      +        content:
      +          application/json:
      +            ...

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      # HTTP メソッドが GET の場合にリクエストボディを指定
      +      requestBody:
      +        ...
    • リクエストボディそのものは通常複数の API を跨いで再利用されるものではないため、原則 components オブジェクトとして共通化(コンポーネント化)を行わない

      • openapi-generatorを使用する場合は、コンポーネント化をせず、title を指定することで名称の指定が可能となる
      • oapi-codegenを使用する場合は、名称を指定するためにコンポーネント化が必要となるが、極力コンポーネント化せずデフォルトの名称を使用することを推奨する

      良い例:

      yaml
      paths:
      +  /users:
      +    post:
      +      ...
      +      requestBody:
      +        required: true
      +        content:
      +          application/json:
      +            ...

      悪い例:

      yaml
      paths:
      +  /users:
      +    get:
      +      ...
      +      requestBody:
      +        # コンポーネント化したリクエストボディを参照
      +        $ref: '#/components/requestBodies/ReqPostProductsBody'
      +
      +components:
      +  requestBodies:
      +    ReqPostProductsBody:
      +      content:
      +        application/json:

    paths > {path} > {method} > responses

    API のレスポンスを記載する。

    • 正常系(2xx)のレスポンスは通常複数の API を跨いで再利用されるものではないため、原則 components オブジェクトとして共通化(コンポーネント化)を行わない

      • openapi-generatorを使用する場合は、コンポーネント化をせず、title を指定することで名称の指定が可能となる
      • oapi-codegenを使用する場合は、レスポンスの構造体を出力するために strict-server オプションを true に指定する必要がある。名称を指定するためにコンポーネント化が必要となるが、極力コンポーネント化せずデフォルトの名称を使用することを推奨する

      良い例:

      yaml
      paths:
      +  /products:
      +    post:
      +      responses:
      +        "200":
      +          description: 200 OK
      +          content:
      +            application/json: ...

      悪い例:

      yaml
      paths:
      +  /products:
      +    post:
      +      responses:
      +        "200":
      +          # コンポーネント化したレスポンスオブジェクトを参照
      +          $ref: "#/components/responses/RespPostProductsBody"
      +
      +components:
      +  responses:
      +    RespPostProductsBody:
      +      description: 200 OK
      +      content:
      +        application/json: ...
    • 異常系(4xx, 5xx)のレスポンスは個別に定義するのではなく、事前に components オブジェクトとして定義を行い $ref で参照する

      良い例:

      yaml
      paths:
      +  /products:
      +    post:
      +      responses:
      +        "400":
      +          # コンポーネント化したレスポンスオブジェクトを参照
      +          $ref: "#/components/responses/BadRequest"
      +
      +components:
      +  responses:
      +    BadRequest:
      +      description: 400 Bad Request
      +      content:
      +        application/json: ...

      悪い例:

      yaml
      paths:
      +  /products:
      +    post:
      +      responses:
      +        "400":
      +          # レスポンスオブジェクトを個別に定義
      +          description: 400 Bad Request
      +          content:
      +            application/json: ...

    paths > {path} > {method} > security

    API の認証方式を記載する。

    • 通常はルートレベルの security で API 共通的な認証方式を設定し、個々の API で個別に設定は行わない

    • ヘルスチェックのような認証を通す必要がない API のみ、上書きで定義する

      良い例:

      yaml
      paths:
      +  /session:
      +    post:
      +      ...
      +      # 認証しない場合のみ個別で定義
      +      security: []

    components

    API 定義で利用する共通のデータモデルを定義する。定義方針は下記の通りである。

    フィールド名方針
    schemasAPI 共通的なリソース(例. ユーザや商品など)やエラー等のドメインオブジェクトを定義する
    responsesAPI 共通的なレスポンス(例. 異常系(4xx, 5xx)のレスポンス)を定義する
    parametersAPI 共通的なリクエストパラメータ(HTTP ヘッダやクエリパラメータ等)を定義する
    examples原則何も定義しない
    requestBodies原則何も定義せず、リクエストボディは API 個別に定義する
    headersAPI 共通的なレスポンスヘッダを定義する
    securitySchemes標準で用いる API 認証のスキームを定義する
    links原則何も定義しない
    callbacks原則何も定義しない

    ※ リクエストボディやレスポンスボディにおいてオブジェクトがネストする場合、 API 固有のオブジェクトであっても schemas に定義する。 これは、定義するオブジェクトの properties 配下に更に type: object が定義される場合に、生成ツールによってはうまく型が生成されないためである。 生成ツール上問題ないのであれば、API 固有のオブジェクトを schemas に定義する必要はない。

    components > schemas

    API 共通的なリソースやエラー等のドメインオブジェクトを記載する。

    • 名称はアッパーキャメルケースで定義する
    • 名称は単数形で定義する
    • type に複数の型を定義しない
    • typenull は原則指定しない(null 値を用いる代わりに、キー自体を含めない)
    • allOf, anyOf, oneOf は利用しない

    良い例:

    yaml
    components:
    +  schemas:
    +    # 共通で使用するリソースを表すオブジェクト
    +    Product:
    +      type: object
    +      properties: ...
    +    User:
    +      type: object
    +      properties:
    +    # 共通で使用するエラーを表すオブジェクト
    +    ProblemDetailError:
    +      type: object
    +      properties: ...

    components > responses

    API 共通的なレスポンスを記載する。主に異常系(4xx, 5xx)のレスポンスを定義する。

    • 名称はアッパーキャメルケースで定義する
    • 異常系(4xx, 5xx)のレスポンスの場合、名称にステータスコードの名称(例. BadRequest, Unauthorized)を用いる

    良い例:

    yaml
    components:
    +  schemas:
    +    ProblemDetailError:
    +      type: object
    +      properties:
    +        ...
    +  responses:
    +    # HTTP ステータスコード 400 のレスポンスオブジェクト
    +    BadRequest:
    +      description: 400 Bad Request
    +      content:
    +        application/json:
    +          schema:
    +            "$ref": "#/components/schemas/ProblemDetailError"
    +    # HTTP ステータスコード 401 のレスポンスオブジェクト
    +    Unauthorized:
    +      description: 401 Unauthorized
    +      content:
    +        application/json:
    +          schema:
    +            "$ref": "#/components/schemas/ProblemDetailError"
    +    ...

    正常系のレスポンスの例としてはファイルアップロード・ダウンロードのレスポンスなどが該当する。
    個別のアプリケーション要件でブレが少なく、複数のエンドポイントで用いられる場合に定義する。オブジェクトのスキーマは、schemas に切り出して定義し、コード生成ツールのために型情報を付与させる。

    良い例:

    yaml
    components:
    +  schemas:
    +    SignedURL:
    +      type: object
    +      properties:
    +        signed_url:
    +          type: string
    +          format: uri
    +        expired_at:
    +          type: string
    +          format: date-time
    +  responses:
    +    BlobUpload:
    +      description: BLOB(Binary Large Object) upload using presigned url
    +      content:
    +        application/json:
    +          schema:
    +            "$ref": "#/components/schemas/SignedURL"
    +    BlobDownload:
    +      description: BLOB(Binary Large Object) download using presigned url
    +      content:
    +        application/json:
    +          schema:
    +            "$ref": "#/components/schemas/SignedURL"
    +    ImageBinary:
    +      description: An image
    +      content:
    +        image/*:
    +          schema:
    +            type: string
    +            format: binary

    components > parameters

    API 共通的なリクエストパラメータ(パスパラメータ、クエリパラメータ、ヘッダ, Cookie)を記載する。

    パスパラメータ
    • API 全体で利用されるパスパラメータが必要なケースが想定されないため、原則定義しない
      • 特定リソースの操作(例えば更新と削除)を行う際のリソース ID はパスパラメータとして再利用できるが、コンフリクトを避けるため原則共通化は行わない
    クエリパラメータ
    • API 全体で利用可能な共通のクエリパラメータ(例: 検索数の limit, offset)を定義する
    • 命名はクエリパラメータ名に Query というプレフィックスを付与する形式を推奨する

    良い例:

    yaml
    paths:
    +  get:
    +    /products:
    +      parameters:
    +        - $ref: "#/components/parameters/QueryLimit"
    +
    +components:
    +  parameters:
    +    QueryLimit:
    +      name: limit
    +      in: query
    +      required: false
    +      schema:
    +        type: integer
    +      description: 検索数上限
    ヘッダ
    • API 全体で利用可能な共通のリクエストヘッダを定義する
    • 命名はヘッダ名に Header というプレフィックスを付与する形式を推奨する

    良い例:

    yaml
    paths:
    +  post:
    +    /products:
    +      parameters:
    +        - $ref: "#/components/parameters/HeaderContentType"
    +
    +components:
    +  parameters:
    +    HeaderContentType:
    +      name: Content-Type
    +      in: header
    +      schema:
    +        type: string
    +      required: true
    • API 全体で利用可能な共通の Cookie(例: CSRF 用のトークン)を定義する
    • 命名は Cookie 名に Cookie というプレフィックスを付与する形式を推奨する
    • Cookie 認証を定義する場合は、APIKey を利用する

    良い例:

    yaml
    paths:
    +  get:
    +    /products:
    +      parameters:
    +        - $ref: "#/components/parameters/CookieCSRFToken"
    +
    +components:
    +  parameters:
    +    CookieCSRFToken:
    +      name: csrftoken
    +      in: cookie
    +      required: true
    +      schema:
    +        type: string
    +      description: CSRFトークン

    components > requestBodies

    原則何も定義せず、リクエストボディは API 個別に記載する。

    components > headers

    API 共通的なレスポンスヘッダを記載する。

    • 命名はヘッダ名からハイフンを除去した形式を推奨する

    良い例:

    yaml
    paths:
    +  get:
    +    /products:
    +      responses:
    +        "200":
    +          headers:
    +            XCacheInfo:
    +              $ref: "#/components/headers/XCacheInfo"
    +
    +components:
    +  headers:
    +    XCacheInfo:
    +      description: not cacheable; meta data too large
    +      schema:
    +        type: string

    components > securitySchemes

    標準で用いる API 認証の定義を行う。

    良い例:

    yaml
    components:
    +  securitySchemes:
    +    # Bearer トークンによる認証
    +    Bearer:
    +      type: http
    +      scheme: bearer
    +      bearerFormat: JWT
    +      description: "Bearer トークン認証"

    links は OpenAPI 3.0 の新機能の1つで、ある API レスポンスの値を用いて、別の API を呼び出す方法を明示できるセクションである。

    興味深い機能であり、API のセマンティクスを伝えるのに有用であるが、本規約では記載しないことを推奨とする。

    理由:

    • 業務システムでは、業務フローを抑えておけば、API 操作フローの理解はそこまで難しくないことが多い
      • 逆に、API 同士の関係だけを示すだけでは業務モデリング図とのダブルメンテナンスになったり、中途半端になりうる
    • OAS 3.0 Support Backlog にあるように、2023/12/15時点では Swagger-UI が対応していない
      • links を書いたと言って、API ドキュメントに影響しない

    components > callbacks

    callbacks は OpenAPI 3.0 の新機能の1つで、API サーバ側が指定されたコールバック URL を呼び出すという仕組みである。

    仕様書には、EC ショップで購入のたびにマネージャーに通知を送るといった、何かしらの処理をトリガーにコールバック URL を呼び出す例が示されている。

    利便性は高い仕様だが、本規約では記載しないことを推奨とする。

    理由:

    • コールバック URL 呼び出しの、エラーハンドリングが難しい
    • 業務システムでは欠損が許されない、または将来的に許されなくなる可能性があり、その場合にこの機能に頼ると想定以上の追加作業が発生する

    コールバックのような仕組みを実現するには、別途キューイングのメッセージサービスの利用などを検討する。

    security

    全 API に共通で適用されるセキュリティ設定を定義する。

    業務システムの Web API において認証が全く存在しないケースは考えにくいため、本規約ではルートレベルで認証を設定し、個々の API への適応漏れを無くす。

    良い例:

    yaml
    security:
    +  - Bearer: []

    tags

    API を論理的にグループ化するためのタグを定義する。

    • ドキュメントやツールにとって重要であるため 必須 で指定する
    • name, description を必須項目とする
    • 単数形 で、小文字かつ半角スペース区切りで記載する
      • 半角スペース区切りで記載する理由は HTML ドキュメントで参照する場合の可読性を上げるため
    • コード生成で利用される(Go においてはパッケージ、 TypeScript においてはクラスに相当する)ため、シンプルな命名にする

    良い例:

    yaml
    tags:
    +  - name: product
    +    description: 製品
    +  - name: user account
    +    description: ユーザーアカウント

    悪い例:

    yaml
    tags:
    +  - name: products
    +    description: 製品
    +  - name: user_account
    +    description: ユーザーアカウント

    externalDocs

    参照情報としての URL を記載できる。

    ただし、description にて参考情報となる URL を記載する方が、複数リンクを指定可能であるなど自由度が高く使いやすいため externalDocs は利用せず description の利用を推奨する。

    良い例:

    yaml
    info:
    +  description: |-
    +    Some useful links:
    +    - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
    +    - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
    +
    +# 特別な場合を除き非推奨
    +externalDocs:
    +  description: Find out more about Swagger
    +  url: http://swagger.io

    設計上のポイント

    OpenAPI ドキュメントを作成する上での設計上ポイントをいくつか記載する。

    ファイルアップロード

    Web API におけるファイルアップロードのよく利用される実装手段は、大きく分けて以下の 3 手法に分類できる。

    1. ファイルのコンテンツを Base64 などにエンコードして、JSON の項目として設定し、リクエストボディで送る
      • メリット: 通常の JSON を扱うのとほぼ変わらないため楽。サムネイルなど限定されたユースケースの場合に向く
      • デメリット: 巨大なファイルを扱う場合などサーバリソース負荷が懸念。Base64 に変換する分 CPU 負荷は余計にかかる。ペイロードが膨れるためモバイルなどのクライアントでは帯域利用での懸念がある
    2. multipart/form-data ファイルを送信する
      • メリット: ファイルを Base64 に変換するといった作業が不要
      • デメリット: ブラウザ以外のクライアントにとって手間がかかる
    3. アップロード用に用いる、オブジェクトストレージの Signed URL を発行し、クライアントから直接ファイルをアップロードしてもらう

    本規約でファイルアップロードについて上記の 3. Signed URL を推奨する。API 呼び出しとしては次のようなフローとする。

    フローの ①、② はアプリケーション固有の紐づけルールにおいて Web API を設計すれば良いため、本規約で YAML の設定例は記載しない。フロー ② については Signed URL を用いたアップロードであり、アプリケーションの Web API 定義を書く必要はない。もし、監査ログなどのガバナンス上、直接オブジェクトストレージへの書き込みを許容されないケースは、B で Signed URL に相当する書き込み先を提供し、B を経由してファイルをアップロードする。

    上記どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    ファイルダウンロード

    ファイルアップロードと同様、オブジェクトストレージの Signed URL 経由を経由してのダウンロードさせる手法を推奨する。Web API としてはオブジェクトストレージにダウンロード用のファイルを書き込み、クライアントが取得するための Signed URL をレスポンスの JSON 項目に渡す方式である。

    もし、サムネイルやアイコン画像など、ファイル容量がごく小さい場合は Base64 にエンコードして JSON に埋め込んで渡しても良い。線引をどこに設置するかは本規約で定義しない。

    どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    CORS

    CORS(Cross-Origin Resource Sharing)のために、options メソッドの追記は 原則不要 とする。

    理由:

    • サーバ側
      • options メソッド対応は、API 仕様ではなく実装レベルの機能横断的な処理(Java における Servlet Filter や Spring の Interceptor、Go における Middleware など)で行うことが大半であり、コード生成が不要
    • クライアント側
      • options メソッドを用いるのはクライアントがブラウザであり、クライアントのアプリケーションコードが明示的にアクセスしないため、コード生成が不要
    • 使用面として
      • Access-Control-Allow-Origin がどのような値を返すか、呼び出し元によって動的な値を返したい場合があり、記載が困難なケースがある

    ただし、Amazon API Gateway のようなサービスを利用する場合は、options メソッドの記載が必須である場合は除く[1]

    OpenTelemetry Traceparent HTTP Header

    OpenOpenTelemetry で用いるられるtraceparent のリクエストヘッダは OpenAPI で 原則不要 とする。

    理由:

    • OpenTelemetry が定めるヘッダ類は、API 横断的に設定されるべきものであり、ミドルウェアやフレームワーク側などでの一律の制御を推奨するため
    • 記載することにより、OpenOpenTelemetry に対応していることを明記し開発者に周知できるメリットより、各アプリ開発者が生成されたコードで悩んだり、誤解されることを回避したいため

    値が存在しないという状態の表現

    原則 null を用いず、パラメータのキー自体を含めないこと(undefined)による表現を行う。

    詳細はフューチャー技術ブログ記事を参照されたい

    バリデーション

    パラメータのバリデーションをどこまで厳密に定義すべきかという議論はしばしば行われる。

    リクエストパラメータの各項目に対して、必須・型・桁・区分値・日付・正規表現のチェックが行える。レスポンスで用いるモデルについても同様に設定でき、enum, pattern 以外は API の利用者(クライアント)側の DB 設計などに必要な型桁情報を渡すのに有用であるため、できる限り詳しく指定する。

    必須

    必須パラメータのみ required: true を定義する

    デフォルト値

    パラメータにデフォルト値がある場合はdefault を定義する。

    yaml
    # ex. enum
    +name: limit
    +type: number
    +format: integer
    +minimum: 1
    +maximum: 100
    +default: 20
    +description: 検索結果の項目数上限(1~100が指定可能)

    【注意】API 公開後に、default 値を変更してはならない(API の互換性が崩れるため)。もし変更する場合は、API のバージョンを上げること。

    型・フォーマット

    型(type)は string(文字列), number(数値), integer(整数値), boolean(真偽値) array(配列) のうちどれか指定する。

    フォーマット(format)は以下の型の詳細情報を示すもので、可能な限り設定する。

    • integer(整数)
      • int32, int64
    • number(数値)
      • float, double
    • string(バイナリ)
      • byte: Base64 でエンコードされた文字列
      • binary: バイト配列
    • string(日付)
      • date: RFC3339 full-date(例: 2023-07-21)
        • 項目名は _on を接尾辞につけることを推奨とする
      • date-time: RFC3339 date-time(例: 2023-07-21T17:32:28Z)
        • 項目名は _at を接尾辞につけることを推奨とする
    • string(その他)
      • password: Swagger UI で入力が隠される
      • その他、 email, uuid など Open API 仕様に存在しない任意のフォーマットを独自のドキュメント生成などのために記載しても良い

    OpenAPI 3.0 では 2.0 に存在した file type は存在しない。もし同等の指定をしたい場合は、以下の様に指定する。

    yaml
    type: string
    +format: binary # binary file contents

    データ型によって、利用できる桁を指定する項目が異なる。可能な限り設定する。

    • 文字列
      • 最大桁数:maxLength
      • 最小桁数:minLength
    • 数値または整数値
      • 最小値(境界値を含む):minimum
      • 最大値(境界値を含む):maximum
      • 境界値を含まない場合のみexclusiveMinimum: trueまたはexclusiveMaximum: trueを定義する。minimum, maximum で代用できる場合は利用しない
    • 配列:
      • 最大要素数:maxItems
      • 最小要素数:minItems
      • required: trueの場合は原則としてminItems: 1を定義する
      • uniqueItems は必須で指定する(通常は一意であるべき)

    【注意】API 公開後に、レスポンスの maxLength を以前より大きい値に変更してはならない。レスポンスの maxLength など API 利用者側システムの DB の ERD 定義のインプットになる事が多いため。もし行う場合は API のバージョンを上げることや、連携先に桁数変更の旨を調整するなどの考慮を行う。

    区分値

    区分値の場合は enum 属性を利用し、descriptionには区分値の論理名を記載する。

    yaml
    name: gender
    +type: string
    +enum: ["0", "1", "2", "9"]
    +description: |
    +  性別
    +    0: 不明
    +    1: 男
    +    2: 女
    +    9: 適用不能

    OpenAPI 3.0 では区分値の再利用ができるため、横断的に用いる区分値は components 側で定義する。

    yaml
    paths:
    +  /products:
    +    get:
    +      parameters:
    +        - in: query
    +          name: gender
    +          required: true
    +          schema:
    +            $ref: "#/components/schemas/Gender"
    +components:
    +  schemas:
    +    Gender:
    +      type: string
    +      enum: ["0", "1", "2", "9"]

    固定値

    固定値 の場合も enum を 1 つだけ指定して表現する。この場合もレスポンスで利用する場合は指定しない

    yaml
    name: file_layout
    +type: string
    +enum: ["json"]
    +description: ファイルレイアウト

    その他(正規表現)

    正規表現で表現できる文字列はpatternを利用して定義する。桁や区分値で代替できる場合は、pattern を用いない

    例:

    yaml
    remind_time:
    +  type: string
    +  description: リマインド時刻。(hh:mm)形式
    +  example: 23:59
    +  pattern: "^(2[0-3]|[01][0-9]):([0-5][0-9])$"

    ファイル分割

    OpenAPI ドキュメントは単一のファイルで構成することも複数の分割されたファイルで構成することもできるが、複数のファイルに分割することを推奨する。

    理由:

    • API path ごとに担当者を分けて設計する場合などに、複数人による編集によって意図しないコンフリクトが発生することを防ぐ
    • ファイルの肥大化による、可読性の低下を防ぐ

    分割方法の選定

    開発方針や OpenAPI の使用用途に合わせて、都合の良いファイルの分割方法を採用する。例えば、以下のような方法がある。

    1. API path ごとに設計担当者を分けて、それぞれに OpenAPI を編集する場合は、path の単位で分割する。
    2. テストツールとして stoplightio/prismを使用する場合、テストケースごとにデータファイルを作成して、examples にファイルパスを指定する。

    注意点:

    サンプル説明

    分割方法 1, 2 の両方に当てはまる場合のサンプルを用いて説明する。openapi.yaml とディレクトリ構成は下の通り。全量は sample_dividedを参照すること。

    • リソース単位にディレクトリを作成して、path ごとに定義ファイルを格納する。

    • components の schemas モデルの中身は別ファイルとして切り出すことが可能である。

      yaml
      # openapi.yaml(ファイル分割例)
      +openapi: "3.0.3"
      +info:
      +  version: 1.0.0
      +  title: Swagger Petstore
      +security:
      +  - Bearer: []
      +servers:
      +  - url: http://petstore.swagger.io/v1
      +tags:
      +  - name: pets
      +    description: Everything about your Pets
      +paths:
      +  /pets:
      +    $ref: "./pets/pets.yaml"
      +  /pets/{pet_id}:
      +    $ref: "./pets/pets_pet_id.yaml"
      +
      +components:
      +  securitySchemes:
      +    Bearer:
      +      type: http
      +      scheme: bearer
      +      bearerFormat: JWT
      +      description: "Authenthicaiton with bearer token"
      sh
      # ディレクトリ構成(ファイル分割例)
      +
      +├─openapi.gen.yaml
      +├─openapi.yaml
      +
      +├─examples
      +  ├─pets_get
      +    ├─test_case_001.yaml
      +    └─test_case_002.yaml
      +
      +  ├─pets_pet_id_get
      +    └─test_case_003.yaml
      +
      +  └─pets_post
      +       └─test_case_004.yaml
      +
      +└─pets
      +  ├─pets.yaml
      +  └─pets_pet_id.yaml
    • openapi.yamlpaths に記載した API ファイルは以下のように作成する(例: pets-pet-id.yaml)。

    • examples には、例えば各 API のテストケース ID をキーとして指定(TestCase003)し、該当するテストケースのデータファイルパスを参照させる。

      pets-pet-id.yamlを見る
      yaml
      # pets-pet-id.yaml(API path 別ファイルの記載例)
      +get:
      +  summary: Get details of a pet
      +  description: Get details of a pet by specifying its pet ID.
      +  operationId: getPetsPetId
      +  tags:
      +    - pets
      +  parameters:
      +    - name: pet_id
      +      in: path
      +      description: The id of the pet to retrieve
      +      schema:
      +        type: string
      +      required: true
      +  responses:
      +    "200":
      +      description: Expected response to a valid request
      +      content:
      +        application/json:
      +          schema:
      +            type: object
      +            properties:
      +              pet_detail:
      +                type: object
      +                properties:
      +                  breeder:
      +                    type: string
      +                  date_of_birth:
      +                    type: string
      +                    format: date
      +                  pedigree:
      +                    type: object
      +                    properties:
      +                      registration_no:
      +                        type: integer
      +                        format: int64
      +                      date_of_registration:
      +                        type: string
      +                        format: date
      +                      pedigree_image:
      +                        type: string
      +                    required:
      +                      - registration_no
      +                      - date_of_registration
      +                      - pedigree_image
      +            required:
      +              - pet_detail
      +          examples:
      +            TestCase003:
      +              $ref: "../examples/pets_pet_id_get/test_case_003.yaml"
      +    "404":
      +      $ref: "../common/responses.yaml#/components/responses/NotFound"
      +    "500":
      +      $ref: "../common/responses.yaml#/components/responses/InternalServerError"
    • OpenAPI の使用用途により、分割ファイルを1つのファイルにまとめる必要がある場合には、例えばRedocly CLIを使用して以下コマンドを実行する

    • まとめたファイルは、以下のようになる(例: openapi.gen.yaml)。

      bash
      redocly bundle openapi.yaml --output openapi.gen.yaml
      openapi.gen.yamlを見る
      yaml
      # openapi.gen.yaml(ファイルBundle後)
      +openapi: 3.0.3
      +info:
      +  version: 1.0.0
      +  title: Swagger Petstore
      +servers:
      +  - url: http://petstore.swagger.io/v1
      +security:
      +  - Bearer: []
      +tags:
      +  - name: pets
      +    description: Everything about your Pets
      +paths:
      +  /pets:
      +    get:
      +      summary: Search a pet list
      +      description: Search a list of registered pets up to 100.
      +      operationId: getPets
      +      tags:
      +        - pets
      +      parameters:
      +        - name: limit
      +          in: query
      +          description: How many items to return at one time (max 100)
      +          schema:
      +            type: integer
      +            maximum: 100
      +            format: int32
      +          required: false
      +      responses:
      +        "200":
      +          description: A paged array of pets
      +          headers:
      +            x-next:
      +              description: A link to the next page of responses
      +              schema:
      +                type: string
      +          content:
      +            application/json:
      +              schema:
      +                type: object
      +                properties:
      +                  pets:
      +                    type: array
      +                    maxItems: 100
      +                    items:
      +                      type: object
      +                      properties:
      +                        id:
      +                          type: integer
      +                          format: int64
      +                        name:
      +                          type: string
      +                          maxLength: 50
      +                        category:
      +                          type: string
      +                          maxLength: 10
      +                        sub_category:
      +                          type: string
      +                          maxLength: 50
      +                        age:
      +                          type: integer
      +                          format: int32
      +                        sex:
      +                          type: string
      +                          maxLength: 6
      +                        note:
      +                          type: string
      +                          maxLength: 200
      +                        tag:
      +                          type: string
      +                          maxLength: 20
      +                      required:
      +                        - id
      +                        - name
      +                        - category
      +                        - age
      +                        - sex
      +              examples:
      +                TestCase001:
      +                  $ref: "#/components/examples/test_case_001"
      +                TestCase002:
      +                  $ref: "#/components/examples/test_case_002"
      +        "404":
      +          $ref: "#/components/responses/NotFound"
      +        "500":
      +          $ref: "#/components/responses/InternalServerError"
      +    post:
      +      summary: Register a pet
      +      description: Reginster basic information of new pet.
      +      operationId: postPets
      +      tags:
      +        - pets
      +      requestBody:
      +        content:
      +          application/json:
      +            schema:
      +              type: object
      +              properties:
      +                pet:
      +                  type: object
      +                  properties:
      +                    id:
      +                      type: integer
      +                      format: int64
      +                    name:
      +                      type: string
      +                      maxLength: 50
      +                    category:
      +                      type: string
      +                      maxLength: 10
      +                    sub_category:
      +                      type: string
      +                      maxLength: 50
      +                    age:
      +                      type: integer
      +                      format: int32
      +                    sex:
      +                      type: string
      +                      maxLength: 6
      +                    note:
      +                      type: string
      +                      maxLength: 200
      +                    tag:
      +                      type: string
      +                      maxLength: 20
      +                  required:
      +                    - id
      +                    - name
      +                    - category
      +                    - age
      +                    - sex
      +              required:
      +                - pet
      +            examples:
      +              TestCase004:
      +                $ref: "#/components/examples/test_case_004"
      +        required: true
      +      responses:
      +        "200":
      +          description: OK
      +          content:
      +            application/json:
      +              schema:
      +                type: object
      +                properties:
      +                  id:
      +                    type: integer
      +                    format: int64
      +                  name:
      +                    type: string
      +                    maxLength: 50
      +                  category:
      +                    type: string
      +                    maxLength: 10
      +                  sub_category:
      +                    type: string
      +                    maxLength: 50
      +                  age:
      +                    type: integer
      +                    format: int32
      +                  sex:
      +                    type: string
      +                    maxLength: 6
      +                  note:
      +                    type: string
      +                    maxLength: 200
      +                  tag:
      +                    type: string
      +                    maxLength: 20
      +                required:
      +                  - id
      +                  - name
      +                  - category
      +                  - age
      +                  - sex
      +        "404":
      +          $ref: "#/components/responses/NotFound"
      +        "500":
      +          $ref: "#/components/responses/InternalServerError"
      +  /pets/{pet_id}:
      +    get:
      +      summary: Get details of a pet
      +      description: Get details of a pet by specifying its pet ID.
      +      operationId: getPetsPetId
      +      tags:
      +        - pets
      +      parameters:
      +        - name: pet_id
      +          in: path
      +          description: The id of the pet to retrieve
      +          schema:
      +            type: string
      +          required: true
      +      responses:
      +        "200":
      +          description: Expected response to a valid request
      +          content:
      +            application/json:
      +              schema:
      +                type: object
      +                properties:
      +                  pet_detail:
      +                    type: object
      +                    properties:
      +                      breeder:
      +                        type: string
      +                      date_of_birth:
      +                        type: string
      +                        format: date
      +                      pedigree:
      +                        type: object
      +                        properties:
      +                          registration_no:
      +                            type: integer
      +                            format: int64
      +                          date_of_registration:
      +                            type: string
      +                            format: date
      +                          pedigree_image:
      +                            type: string
      +                        required:
      +                          - registration_no
      +                          - date_of_registration
      +                          - pedigree_image
      +                required:
      +                  - pet_detail
      +              examples:
      +                TestCase003:
      +                  $ref: "#/components/examples/test_case_003"
      +        "404":
      +          $ref: "#/components/responses/NotFound"
      +        "500":
      +          $ref: "#/components/responses/InternalServerError"
      +components:
      +  securitySchemes:
      +    Bearer:
      +      type: http
      +      scheme: bearer
      +      bearerFormat: JWT
      +      description: Authenthicaiton with bearer token
      +  examples:
      +    test_case_001:
      +      value:
      +        pets:
      +          - id: 10001
      +            name: ToyPoodle
      +            category: dog
      +            sub_category: ToyPoodle
      +            age: 1
      +            sex: male
      +            note: friendly
      +            tag: dog10001
      +          - id: 10002
      +            name: Chihuahua
      +            category: dog
      +            sub_category: Chihuahua
      +            age: 1
      +            sex: female
      +            note: friendly
      +            tag: dog10002
      +          - id: 10003
      +            name: Shiba
      +            category: dog
      +            sub_category: Shiba
      +            age: 1
      +            sex: male
      +            note: friendly
      +            tag: dog10003
      +          - id: 10004
      +            name: MiniatureDachshund
      +            category: dog
      +            sub_category: MiniatureDachshund
      +            age: 1
      +            sex: female
      +            note: friendly
      +            tag: dog10004
      +    test_case_002:
      +      value:
      +        pets: []
      +    test_case_004:
      +      value:
      +        pet:
      +          id: 10005
      +          name: FrenchBulldog
      +          category: dog
      +          sub_category: FrenchBulldog
      +          age: 1
      +          sex: male
      +          note: friendly
      +          tag: dog10005
      +    test_case_003:
      +      value:
      +        pet_detail:
      +          breeder: BreederName
      +          date_of_birth: "2023-10-31"
      +          pedigree:
      +            registration_no: 11111111
      +            date_of_registration: "2023-10-31"
      +            pedigree_image: 9j2wBDAA...8QAPxAAAQQABAMGBAYDAAEDAg
      +  schemas:
      +    ProblemDetailError:
      +      type: object
      +      properties:
      +        code:
      +          type: integer
      +          format: int32
      +        message:
      +          type: string
      +      required:
      +        - code
      +        - message
      +  responses:
      +    NotFound:
      +      description: Not Found
      +      content:
      +        application/json:
      +          schema:
      +            $ref: "#/components/schemas/ProblemDetailError"
      +    InternalServerError:
      +      description: Internal Server Error
      +      content:
      +        application/json:
      +          schema:
      +            $ref: "#/components/schemas/ProblemDetailError"

    License

    CC-By-4.0


    1. https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/enable-cors-for-resource-using-swagger-importer-tool.html ↩︎

    + + + + \ No newline at end of file diff --git a/documents/forOpenAPISpecification/file_standards.html b/documents/forOpenAPISpecification/file_standards.html new file mode 100644 index 00000000..4f5ce11c --- /dev/null +++ b/documents/forOpenAPISpecification/file_standards.html @@ -0,0 +1,70 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    ファイルフォーマット規約

    フォーマット

    OpenAPI ドキュメントは JSON 形式、YAML 形式いずれかのフォーマットで記載できるが YAML 形式 を利用する。

    理由として、JSON と比較して YAML は視覚的に見やすく、レビューや差分管理が行いやすいためである。

    ファイル名

    ファイルの拡張子は yaml とする。通常ファイル名は api.yamlswagger.yaml(v2 の場合) を推奨する。

    もし、複数の Swagger 定義を管理するため区別したい場合は ${service}_api.yaml とする。

    ${service} にはサービス名を指定する

    YAML バージョン

    YAML v1.2を用いる。

    ファイルレイアウト

    • ファイルの最終行には空行を入れる
    • 文字コードは UTF-8 とする
    • タブは半角スペース 2 つとする

    クォート

    クォートは可読性を上げるために、できる限り利用しない。利用する場合はダブルクォートを利用する。

    yaml
    # OK
    +description: 何かしらの説明
    +
    +# NG(クォートでのラップは不要)
    +description: '何かしらの説明'
    +description: "何かしらの説明"

    以下の場合は必須で利用する

    • 文字列として認識させる必要のある数字("0123")
    • 60 進数と認識させたくない場合("12:34")
    • Bool として認識させたくない("true", "false", "yes", "no", "y", "n", "on", "off")
    • # で始まる文字列(# はコメントを示す記号のためである。例: #/definitions/Users

    YAML 配列スタイル

    • 複数項目を指定する場合は、 Flow style(配列スキーム) を用いることを推奨する

      yaml
      # OK(推奨: 配列リテラル構文)
      +required: [user_id, user_name, account_type, register_at]
      +
      +# NG(非推奨: リスト構文)
      +required:
      +  - user_id
      +  - user_name
      +  - account_type
      +  - register_at
      • YAML は項目定義がネストすることで縦長な定義になりやすい。情報密度を上げるために配列リテラルを推奨する

    改行の表現

    改行を含む場合は、パイプ(ブロックスカラー) | を用いる

    yaml
    description: |
    +  説明文1
    +  説明文2
    +     - 箇条書き1
    +     - 箇条書き2
    +     - 箇条書き3
    + + + + \ No newline at end of file diff --git a/documents/forOpenAPISpecification/index.html b/documents/forOpenAPISpecification/index.html new file mode 100644 index 00000000..60f3dd62 --- /dev/null +++ b/documents/forOpenAPISpecification/index.html @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    OpenAPI Specification規約

    Future Enterprise Naming Convention Standards for OpenAPI Specification

    OpenAPI Specification(OAS)の規約を、設計・開発・テスト・可読性・保守性・ツールによるコード生成や静的解析の観点からまとめています。

    対応するバージョンについて

    OpenAPI Specification(OAS)の規約を設計、開発、テスト、可読性、保守性、ツールによるコード生成や静的解析の観点からまとめています。

    OAS は次のように複数のバージョンが存在します。

    VersionDateNotes
    3.1.02021-02-15Release of the OpenAPI Specification 3.1.0
    3.0.32020-02-20Patch release of the OpenAPI Specification 3.0.3
    3.0.22018-10-08Patch release of the OpenAPI Specification 3.0.2
    3.0.12017-12-06Patch release of the OpenAPI Specification 3.0.1
    3.0.02017-07-26Release of the OpenAPI Specification 3.0.0
    2.02014-09-08Release of Swagger 2.0
    1.22014-03-14Initial release of the formal document.
    1.12012-08-22Release of Swagger 1.1
    1.02011-08-10First release of the Swagger Specification

    本規約はコード生成などのエコシステムがよく対応している、 3.0.32.0 の 2 つに対応しています。2023 年 3 月時点における最新の 3.1.0 には対応していないのでご注意ください。

    もし、新規に OpenAPI Specification で Web API の設計開発をする方は、 3.0.3 系を利用することを推奨しています。 2.0 系の規約に関しては、既存で利用しているシステムの存在や、利用を想定しているツールの制限などで必要な場面が少なからずあるということで公開しています。

    どのツールがどのバージョンに対応しているかは、以下のサイトを参考ください。

    https://openapi.tools/

    OpenAPI Specification Standards

    Versionコーディング規約
    3.0.3OAS 3.0.3 規約
    2.0OAS 2.0(Swagger 2.0)規約

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。 (これらのファイルはPandocを利用して作成しています。)

    + + + + \ No newline at end of file diff --git a/documents/forOpenAPISpecification/prerequisite.html b/documents/forOpenAPISpecification/prerequisite.html new file mode 100644 index 00000000..fb04e52f --- /dev/null +++ b/documents/forOpenAPISpecification/prerequisite.html @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    前提条件

    本規約は以下の前提で作成されたものである。

    • 業務システム向けの Web API 提供
      • サードパーティ向けに広く開発する Web API ではなく、限られたクライアントやシステムと連携すること
      • いわゆる、LSUDs(Large Set of Unknown Developers)ではなく、SSKDs(Small Set of Known Developers)を対象とする
    • RESTish な Web API
      • 原理的な REST を必ずしも守る必要はないが、例えば HTTP メソッドは、参照は GET、登録は POST、更新は PUT や PATCH、削除は DELETE で使い分けていたり、Web API の要求が成功すれば 200(OK)、204(No Content)を返し、リソースが無ければ 404(Not Found)、操作に失敗すれば 500 系のエラーを返すといったことを指す
      • 本規約を利用するに当たり必須条件ではないが、定義例などはそれに基づいて記載しているので注意する
    • スキーマファースト
      • OpenAPI Specification の定義ファイルを駆動に、クライアント・サーバサイドのコード生成やモック時の利用に用い、高速な Web API 開発につなげることを前提とする
        • Python における、FastAPI・Django REST Framework のように、アプリケーションコードから OpenAPI document を自動生成する開発手法も存在するが、本規約はこれは想定しない
      • 定義ファイルの完成度はできるかぎり高め、コード生成やドキュメントの価値を高める
        • OAS 定義からコードを生成し、通常は記載した型・項目長・最大~最小・enum・必須定義・正規表現フォーマットでバリデーションを行い、カバーできない部分のバリデーションをアプリケーション固有ロジックとして実装する方針とする。例えば、複数項目間のチェックや DB を確認しないと行えないチェックである
        • ドキュメントとしての価値を高めるため、その API 呼び出しで発生しうる全ての HTTP ステータスコードを記載する
          • API の振る舞いを読み手に伝えるものとして、どのような異常系があるかは有用な場合が多いからである
    • JavaScript/TypeScript、Java、Go のエコシステムがターゲット
      • OpenAPI Specification は広く受け入れられており、コレに対応する様々なツールやフレームワークといったエコシステムがあり、中には定義された設定がうまく認識されない場合がある。本規約では対応していないツールが多い場合、特定の記法を非推奨とすることがあり、同時にその理由も説明する
      • 全ての言語・フレームワーク・ツールの対応状況は調査しきれていないため、利用するプロダクトの対応状況は利用者側で確認をお願いする
    + + + + \ No newline at end of file diff --git "a/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.html" "b/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.html" new file mode 100644 index 00000000..7375a500 --- /dev/null +++ "b/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.html" @@ -0,0 +1,235 @@ + + + + + + SQLコーディング規約(Oracle) | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    SQLコーディング規約(Oracle)

    Future Enterprise Coding Standards

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    前提条件

    本書は、SQL コーディング規約についてまとめたものである。
    今回 RDBMS として採用する Oracle での SQL の使用を前提に記述している。

    SQL コーティング規約(可読性・管理性)

    本章では可読性・管理性を高めることを目的としたコーディング規約について記載する。

    書式全般

    書式全般についてのコーディング規約を下記に示す。

    • 1 行につき、1 文のみを記述する。
    • SQL 中のインデントは、Java コーディング規約にあわせて半角スペースではなくタブ文字とする。
    • ヘボン式ローマ字を使用する。
    • 外来語に関しては、原語の綴りを使用する。
    • 横は 80 文字を目安に改行する。
    • 定数を条件に用いる場合やインライン・ビューで取得したいデータなど開発者の意図はコメントにて記載する。

    予約語

    予約語に対しては、大文字を使用する。(例 : SELECTINSERTUPDATEDELETE 等)

    予約語以外

    予約語以外に対しても、予約語と同様に大文字を使用する。(例 : オブジェクト名、カラム名 等)

    短縮名称

    SQL 中に記述するエイリアス名など単語の短縮について示す。

    1. 外来語に関しては、原語の短縮形を使用する。短縮形が存在しない場合には、母音を抜かして表記する。
      例) corporation → corp / computer → cmptr

    2. ローマ字の短縮は、単語の区切れの頭文字、または母音を抜かした子音字等を利用する。
      例) nichijo → nchj

    • カラムには必ずテーブルエイリアスを付与する
    • テーブルのエイリアスは必ず付与すること。
      必要ない場合(単一テーブルへの SELECT 等)も必ず付与すること
      また、テーブルのエイリアス名は同 SQL 文の中で重複しないように命名すること。
      (副問い合わせで利用したエイリアス名をメインの SQL 中のエイリアス名に利用しない。など)

    文字コード

    SQL ファイルの文字コード(エンコーディング)は Java ソースファイルと同じく『 Unicode UTF-8 』で保存する。

    不要な空白文字(スペース)は除去する

    不要な空白文字(スペース)は除去すること。

    SQL 文の整形

    DML 文の節に対する予約語は左揃えにする。
    項目ごとに改行を入れ、項目の前にはインデントを挿入する。カンマは項目の前へ記入する。
    Java ソースファイルのようにファイルの先頭にコメント行を入れると DB 分析作業に支障があるため禁止とする。
    よって SQL ファイルの先頭は必ずSELECTUPDATEINSERTDELETEMERGEの何れかになる。

    物理カラム名、テーブル名に対応する論理名を入れる場合、その後ろに単数行コメント(-- )にて記述する。
    SQL 内に挿入する単数行コメントは、/*(半角スペース)コメント本文(半角スペース)*/ で行う。
    ,(カンマ)とANDについては各行の先頭に記述する。(以下の例を参照のこと)
    SQL フレームワークで実行する SQL の場合、SQL ステートメントの終わりを示す;(セミコロン)は記述しない。

    良い例:

    sql
    SELECT
    +/*
    +	処理名
    +*/
    +	TBL1.COLUMN1	AS	COLUMN1	-- カラム1
    +,	TBL1.COLUMN2	AS	COLUMN2	-- カラム2
    +FROM
    +	TABLE1	TBL1	-- テーブル1

    WHERE 句の=!=ISIS NULLIS)の縦位置は揃える。

    良い例:

    sql
    WHERE
    +	A.TEN_NO	=	B.TEN_NO
    +AND	A.KAMOKU_CD	!=	'1'
    +AND	A.ANKEN_NO	IS	NULL

    SELECT 文

    良い例:

    sql
    SELECT
    +	TBL1.COLUMN1	AS	COLUMN1	-- カラム1
    +,	TBL1.COLUMN2	AS	COLUMN2	-- カラム2
    +FROM
    +	TABLE1	TBL1	-- テーブル1
    +WHERE
    +	TBL1.COLUMN3	=	1
    +ORDER BY
    +	TBL1.COLUMN1
    +,	TBL1.COLUMN2

    INSERT 文

    良い例:

    sql
    INSERT
    +INTO
    +	TABLE1	-- テーブル1
    +(
    +	COLUMN1	-- カラム1
    +,	COLUMN2	-- カラム2
    +,	COLUMN3	-- カラム3
    +) VALUES (
    +	VALUE1
    +,	VALUE2
    +,	VALUE3
    +)

    UPDATE 文

    良い例:

    sql
    UPDATE
    +	TABLE1	TBL1	-- テーブル1
    +SET
    +	TBL1.COLUMN2	=	100	-- カラム2
    +,	TBL1.COLUMN3	=	100	-- カラム3
    +WHERE
    +	TBL1.COLUMN1	=	10

    DELETE 文

    良い例:

    sql
    DELETE
    +FROM
    +	TABLE1	TBL1	-- テーブル1
    +WHERE
    +	TBL1.VALUE	=	1

    MERGE 文

    DB 結合条件が一致した場合と不一致になった場合の、それぞれの SQL 文を記述する。

    良い例:

    sql
    MERGE
    +INTO
    +	PROFILE	P				-- PROFILEテーブル
    +USING
    +	NAME	N				-- NAMEテーブル
    +ON
    +	(
    +		P.NAME	= N.NAME		-- 条件
    +	)
    +WHEN MATCHED THEN			-- 条件が一致
    +	/*UPDATE文*/
    +WHEN NOT MATCHED THEN		-- 条件が不一致
    +	/*INSERT文*/

    AND(副問い合わせ)

    良い例:

    sql
    AND	XXX	=	(
    +		SELECT
    +			TBL1.COLUMN1
    +		,	TBL1.COLUMN2
    +		FROM
    +			TABLE1	TBL1
    +	)

    CASE 式

    CASE 式は下記のように記載すること。

    良い例:

    sql
    CASE
    +	WHEN
    +		XXX.HOGE	=	YYY.FUGA
    +	AND	XXX.FUGA	=	YYY.FUGA
    +	THEN
    +		1
    +	ELSE
    +		0
    +END

    CASEWHENTHENELSEの後に改行を挿入すること。
    CASEの後、ENDの前までは 1 インデント挿入すること。

    IN 句

    カンマの後にスペースを1文字入れる。

    比較演算子

    比較演算子の前後にタブ(またはスペース)を1文字入れる。

    改行位置

    SELECT 句、ORDER BY 句、GROUP BY 句等は最初に出現するカラムとカラムの区切りのカンマ前に改行を入れること。
    SELECT の FROM 句の最初に出現するテーブルと結合テーブルの区切りのカンマ前に改行を入れること。
    WHERE 句、MERGE の ON 句の各条件文の(AND や OR の)前に改行を入れること。
    命令句の後は、ヒント句が挿入できるように改行すること。

    良い例:

    sql
    SELECT
    +	T1.COLUMN1	AS	COLUMN1
    +,	T2.COLUMN2	AS	COLUMN2
    +FROM
    +	TABLE1	T1
    +,	TABLE2	T2
    +WHERE
    +	T1.COLUMN3	=	1
    +AND	T1.COLUMN4	=	T2.COLUMN4
    +ORDER BY
    +	T1.COLUMN1
    +,	T2.COLUMN2

    WITH 句

    WITH の前後に改行を挿入すること
    また、インデントは下記のように記述すること

    良い例:

    sql
    -- カラムエイリアスあり
    +WITH
    +    NAME1   (
    +        COL_ALIAS1  -- カラム1
    +    ,   COL_ALIAS2  -- カラム2
    +    )   AS  (
    +        SELECT
    +        ・・・
    +    )
    +,   NAME2   (
    +        COL_ALIAS1  -- カラム1
    +    ,   COL_ALIAS2  -- カラム2
    +    )   AS  (
    +        SELECT
    +        ・・・
    +    )
    +
    +-- カラムエイリアスなし
    +WITH
    +    NAME1   AS  (
    +        SELECT
    +        ・・・
    +    )
    +,   NAME2   AS  (
    +        SELECT
    +        ・・・
    +    )

    OFFSET 句 FETCH 句

    OFFSET、FETCH の前に改行を挿入すること

    良い例:

    sql
    SELECT
    +	TBL1.COLUMN1	AS	COLUMN1
    +FROM
    +	TABLE1	TBL1
    +ORDER BY
    +	TBL1.COLUMN2	DESC
    +OFFSET 5 ROWS
    +FETCH NEXT 5 ROWS ONLY

    HINT 句

    HINT 句は独立した行で記載すること
    HINT 内容にはインデントを付けること

    良い例:

    sql
    SELECT
    +/*+
    +	ここにHINTを記載
    +*/
    +	TBL1.COLUMN1	AS	COLUMN1
    +FROM
    +	TABLE1	TBL1
    +WHERE
    +	TBL1.COLUMN2	=	1

    コメント

    • 修正コメント

      (修正コメントが必要な場合、)
      処理追加の際、追加行の 1 行目の前と最終行の次の行にコメントを入れる。単一行の場合は、同一行の最後にコメントをつける。

      良い例:

      sql
      -- 2004/04/23 仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 S ← 修正開始点コメント
      +(追加処理)
      +-- 2004/04/23仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 E ← 修正終了点コメント
    • 単数行コメント

      SQL 内で使用する単数行コメント(カラムコメントなど)には、「 -- 」を使用する。

    • 複数行コメント

      /* */ 」を使用する。下記に例を示す。
      なお、前述で触れたとおり、SQL ファイルの先頭にコメントを記述することは禁止とする。

      良い例:

      sql
      /**********************************************************************/
      +/*
      + * コメントを始めるスラッシュとアスタリスクは、それだけを1行に置く。
      + * それから、コメント・ブロック内の各行は縦にアスタリスクを置き
      + * コメントがあることを強調する。
      + * 最後に、アスタリスクとスラッシュは、それだけを1行に置く。
      + */
      +/**********************************************************************/
    • 複数行コメントアウト

      複数行をコメントアウトする場合は、各行を「--」でコメントアウトする。
      /* */ 」を使用すると、その中に「 /* */ 」が存在した場合、コメントアウトが途中で切れてしまう恐れがあるため、
      使用しない。

    • 論理名の記載

      SELECTINSERTUPDATEMERGEのカラム名記述箇所には単数行コメントでカラムの論理名を記載する。
      SELECTINSERTUPDATEDELETEMERGEのテーブル名記述箇所には単数行コメントでテーブルの論理名を記載する。
      論理名は ERD 等で定義された論理名と必ず一致させること。

    外部結合

    結合方法は ANSI 形式(~outer join ~)ではなく Oracle 形式(+)を使用する。
    原則として(+)は条件文の右にくるカラムに付与する。

    良い例:

    sql
    T1.COL1	=	T2.COL2(+)

    型変換

    代入や WHERE 句の条件設定などでデータ・タイプが異なる場合、明示的にタイプ変換を行う。(暗黙の型変換は使用しない)

    比較演算子

    「等しくない」を示す演算子は「!=」を利用する。「<>」「^=」も動作するが統一の観点から利用しない。

    ORDER BY 句

    ORDER BY 数字の構文は使用せずに、カラム名を記載する。

    GROUP BY 句

    GROUP BY 数字の構文は使用せずに、カラム名を記載する。

    集約関数を利用する場合は必ず記載すること。(省略可能であっても省略しない)

    EXISTS 句

    EXISTS 句を記載する際、サブクエリになる SELECT 句の指定は定数「1」とする。
    *」(ワイルドカード)や「'X'」は統一の観点から利用しない。
    また「*」(ワイルドカード)についてはパフォーマンスの観点からも禁止とする。

    良い例:

    sql
    WHERE
    +	EXISTS(
    +		SELECT
    +			1
    +		FROM
    +			FOO	F
    +		WHERE
    +			F.COL1	=	M.KEY
    +	)

    AS 句

    トップレベルの SELECT 句には必ずAS句を記載し別名を付ける。
    同一の名前であっても AS 句を付与する。
    また、「AS」は省略可能であるが、省略はしないこと。

    WHERE 句

    • 論理名の記載
      WHERE 句でカラムと式を比較する際は左辺がカラムになるように記載すること。

      良い例:

      sql
      WHERE
      +	TBL.COLUMN1	=	1
      +AND	TBL.AMOUNT2	>	TBL.AMOUNT3	+	TBL.AMOUNT4
    • 条件式の順序
      原則として、WHERE 句で条件式を列挙する際、下記の順序を守ること。

      1. テーブル単位にまとめて順番に記述する
        この際、テーブルの順序は FROM 句に記述した順序に準ずること。
      2. 1.のテーブル単位の中で絞り込み条件をまず記述し、その後結合条件を記述する。

      良い例:

      sql
      FROM
      +	A_TABLE	A	-- A_TABLE
      +,	B_TABLE	B	-- B_TABLE
      +,	C_TABLE	C	-- C_TABLE
      +WHERE
      +-- A_TABLEの絞り込み
      +	A.KEY1		=	?
      +AND	A.KEY2		=	?
      +-- B_TABLEの絞り込み
      +AND	B.KEY1		=	?
      +AND	B.KEY2		=	?
      +-- B_TABLEの結合条件
      +AND	B.COL1		=	A.COL1
      +-- C_TABLEの絞り込み
      +AND	C.KEY1		=	?
      +AND	C.KEY2		=	?
      +-- C_TABLEの結合条件
      +AND	C.COL1		=	A.COL1
      +AND	C.COL2		=	A.COL2
      +AND	C.COL3		=	B.COL3

    COUNT 文

    レコード数を数える COUNT 文の記述はCOUNT(*)と記述する。
    COUNT(1)COUNT('X')COUNT(KEY1)という記載は NG。

    SQL コーディング規約(パフォーマンス性)

    本章ではパフォーマンス性を高めることを目的としたコーディング規約について記載する。

    検索

    検索処理におけるコーディング規約を下記に示す。

    • 中間一致、後方一致検索はインデックスを利用できないため避ける

    • 検索条件で=(等号)を使用できる場合は必ず使用する

      A=1 or A=2とする方がA>0 and A<3などと記述するのよりパフォーマンス上優位な場合が多い。
      これは A にインデックスがある場合、=であれば、インデックスが有効に使われるためである。

    • 可能な限り検索条件にパーティションキーの値を指定する

    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する

    • インデックスによる検索を指定したい場合、下記の記載を行わない

      • インデックスカラムを含む演算に対して条件指定

        悪い例:

        sql
        TBL1.COL1	+	1	>	100 /* NGパターン 右辺で演算してください */

        良い例:

        sql
        TBL1.COL1	>	100	-	1
      • インデックスカラムに関数を通した値に対して条件指定

        悪い例:

        sql
        /* NGパターン 右辺に関数を通してください */
        +TO_CHAR(TBL1.COL1, 'YYYYMMDD')	>	'20151231'

        良い例:

        sql
        TBL1.COL1	>=	TO_DATE('20160101', 'YYYYMMDD')
      • インデックスカラムをORで条件指定(禁止ではないが原則行わない)

        悪い例:

        sql
        (
        +	/* NGパターンINDEXが利用されない場合があります。他の方法を検討してください */
        +		TBL1.COL1	=	1
        +	OR	TBL1.COL1	=	2
        +	)

    挿入

    挿入処理におけるコーディング規約を下記に示す。

    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する。

    更新

    更新処理におけるコーディング規約を下記に示す。

    • 主キーの値の UPDATE は原則行わない。外部キーがあればエラーになる。
      外部キーが無い場合でも、事実上、主キーの値を利用して、検索、更新する場合は、リンクが切れてしまう。
    • パーティションキーの UPDATE は原則行わない。
    • VIEW を使用するデータ更新は禁止。更新は実表に対して行う。

    削除

    削除処理におけるコーディング規約を下記に示す。

    • 大量件数(数百万件レベル)の delete 文発行は避ける。

    WITH 句

    WITH 句の誤った使い方はパフォーマンスの劣化を招くため、WITH 句を利用する場合は DBA に相談する。

    DISTINCT 句

    DISTINCT は、暗黙のソート処理が行われる可能性があるため性能劣化につながる。
    EXISTS 句の使用・代替を検討すること。

    悪い例:

    sql
    SELECT
    +    DISTINCT
    +    D.NO    AS  DEPT_NO
    +,   D.NAME  AS  DEPT_NAME
    +FROM
    +    DEPARTMENT  D
    +,   EMPLOYEE    E
    +WHERE
    +    D.NO    =   E.DEPT_NO   -- 社員が一人以上属している部門を取得

    良い例:

    sql
    SELECT
    +    D.NO    AS  DEPT_NO
    +,   D.NAME  AS  DEPT_NAME
    +FROM
    +    DEPARTMENT  D
    +WHERE
    +    EXISTS(
    +        SELECT
    +            1
    +        FROM
    +            EMPLOYEE    E
    +        WHERE
    +            D.NO    =   E.DEPT_NO   -- 社員が一人以上属している部門を取得
    +    )

    IN 句

    IN 句は最大 1000 個まで指定できるが、200 個程度でも ORA エラーが発生するケースがある。
    また IN 句の少しだけ異なる SQL が大量に発行されると CPU 高騰やメモリ枯渇を招く。
    従って 100 を超えるような長い IN 句は使用せず、一時表を利用して IN (SELECT ・・・ FROM 一時表)のように書き換える。

    NOT IN 句

    原則NOT IN(SELECT~)は使用せずに、NOT EXISTS (SELECT~)を使用する。
    NOT IN句は、内部的にソートマージの結合をすることでテーブルをフルスキャンする場合があるため、性能が悪化する可能性がある。

    UNION 句

    UNIONDISTINCT処理が含まれパフォーマンス上問題があるため、UNION ALLを使用する。

    パラレルヒント句

    パラレルヒント句は DB 負荷が高いため、原則使用禁止とする。付与したい場合は DBA に相談する。

    SELECT FOR UPDATE

    • SELECT FOR UPDATENO WAITまたは「WAIT秒数指定」を必ず付ける。
      WAIT指定なしの場合はロックが解除されてもプログラムに制御が返らないことがある。
      ※WAIT 秒数指定を行う際の秒数は各開発者で決めるのではなくプロジェクトで決定した方針に従うこと。
      また、SQL ライブラリを利用していて定数が記述できる場合は定数で記述すること。
    • SELECT FOR UPDATEで複数行にロックをかける場合、同時実行されるとデットロックを起こす可能性があるため、1件のロックでない場合はORDER BYを指定する。

    分析関数

    分析関数の使用は可能だが、性能悪化を招く恐れがあるため、特性を知らない方は DBA に相談する。

    インデックス

    インデックスの必要性については DBA で最終判断するため、必要とする場合は DBA へ相談する。

    外部結合

    外部結合する際、内部表(駆動表)はなるべく想定件数の少ない表にする。


    License

    CC-By-4.0

    + + + + \ No newline at end of file diff --git "a/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.html" "b/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.html" new file mode 100644 index 00000000..20591f1e --- /dev/null +++ "b/documents/forSQL/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.html" @@ -0,0 +1,229 @@ + + + + + + SQLコーディング規約(PostgreSQL) | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    SQLコーディング規約(PostgreSQL)

    Future Enterprise Coding Standards

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    前提条件

    本書は、SQL コーディング規約についてまとめたものである。
    今回 RDBMS として採用する PostgreSQL での SQL の使用を前提に記述している。

    SQL コーティング規約(可読性・管理性)

    本章では可読性・管理性を高めることを目的としたコーディング規約について記載する。

    書式全般

    書式全般についてのコーディング規約を下記に示す。

    • 1 行につき、1 文のみを記述する。
    • SQL 中のインデントは、Java コーディング規約にあわせて半角スペースではなくタブ文字とする。
    • ヘボン式ローマ字を使用する。
    • 外来語に関しては、原語の綴りを使用する。
    • 横は 80 文字を目安に改行する。
    • 定数を条件に用いる場合やインライン・ビューで取得したいデータなど開発者の意図はコメントにて記載する。

    予約語

    予約語に対しては、小文字を使用する。(例 : selectinsertupdatedelete 等)

    予約語以外

    予約語以外に対しても、予約語と同様に小文字を使用する。(例 : オブジェクト名、カラム名 等)

    短縮名称

    SQL 中に記述するエイリアス名など単語の短縮について示す。

    1. 外来語に関しては、原語の短縮形を使用する。短縮形が存在しない場合には、母音を抜かして表記する。
      例) corporation → corp / computer → cmptr

    2. ローマ字の短縮は、単語の区切れの頭文字、または母音を抜かした子音字等を利用する。
      例) nichijo → nchj

    • カラムには必ずテーブルエイリアスを付与する
    • テーブルのエイリアスは必ず付与すること。
      必要ない場合(単一テーブルへの SELECT 等)も必ず付与すること
      また、テーブルのエイリアス名は同 SQL 文の中で重複しないように命名すること。
      (副問い合わせで利用したエイリアス名をメインの SQL 中のエイリアス名に利用しない。など)

    文字コード

    SQL ファイルの文字コード(エンコーディング)は Java ソースファイルと同じく『 Unicode UTF-8 』で保存する。

    不要な空白文字(スペース)は除去する

    不要な空白文字(スペース)は除去すること。

    SQL 文の整形

    DML 文の節に対する予約語は左揃えにする。
    項目ごとに改行を入れ、項目の前にはインデントを挿入する。カンマは項目の前へ記入する。
    Java ソースファイルのようにファイルの先頭にコメント行を入れると DB 分析作業に支障があるため禁止とする。
    よって SQL ファイルの先頭は必ずselectupdateinsertdeleteの何れかになる。

    物理カラム名、テーブル名に対応する論理名を入れる場合、その後ろに単数行コメント(-- )にて記述する。
    SQL 内に挿入する単数行コメントは、/*(半角スペース)コメント本文(半角スペース)*/ で行う。
    ,(カンマ)とANDについては各行の先頭に記述する。(以下の例を参照のこと)
    SQL フレームワークで実行する SQL の場合、SQL ステートメントの終わりを示す;(セミコロン)は記述しない。

    良い例:

    sql
    select
    +/*
    +	処理名
    +*/
    +	tbl1.column1	as	column1	-- カラム1
    +,	tbl1.column2	as	column2	-- カラム2
    +from
    +	table1	tbl1	-- テーブル1

    WHERE 句の=!=isis nullis)の縦位置は揃える。

    良い例:

    sql
    where
    +	a.ten_no	=	b.ten_no
    +and	a.kamoku_cd	!=	'1'
    +and	a.anken_no	is	null

    SELECT 文

    良い例:

    sql
    select
    +	tbl1.column1	as	column1	-- カラム1
    +,	tbl1.column2	as	column2	-- カラム2
    +from
    +	table1	tbl1	-- テーブル1
    +where
    +	tbl1.column3	=	1
    +order by
    +	tbl1.column1
    +,	tbl1.column2

    INSERT 文

    良い例:

    sql
    insert
    +into
    +	table1	-- テーブル1
    +(
    +	column1	-- カラム1
    +,	column2	-- カラム2
    +,	column3	-- カラム3
    +) values (
    +	value1
    +,	value2
    +,	value3
    +)

    UPDATE 文

    良い例:

    sql
    update
    +	table1	tbl1	-- テーブル1
    +set
    +	tbl1.column2	=	100	-- カラム2
    +,	tbl1.column3	=	100	-- カラム3
    +where
    +	tbl1.column1	=	10

    DELETE 文

    良い例:

    sql
    delete
    +from
    +	table1	tbl1	-- テーブル1
    +where
    +	tbl1.value	=	1

    AND(副問い合わせ)

    良い例:

    sql
    and	xxx	=	(
    +		select
    +			tbl1.column1
    +		,	tbl1.column2
    +		from
    +			table1	tbl1
    +	)

    CASE 式

    CASE 式は下記のように記載すること。

    良い例:

    sql
    case
    +	when
    +		xxx.hoge	=	yyy.fuga
    +	and	xxx.fuga	=	yyy.fuga
    +	then
    +		1
    +	else
    +		0
    +end

    casewhenthenelseの後に改行を挿入すること。
    caseの後、endの前までは 1 インデント挿入すること。

    IN 句

    カンマの後にスペースを1文字入れる。

    比較演算子

    比較演算子の前後にタブ(またはスペース)を1文字入れる。

    改行位置

    select 句、order by 句、group by 句等は最初に出現するカラムとカラムの区切りのカンマ前に改行を入れること。
    select の from 句の最初に出現するテーブルと結合テーブルの区切りのカンマ前に改行を入れること。
    where 句の on 句の各条件文の(and や or の)前に改行を入れること。
    命令句の後は、ヒント句が挿入できるように改行すること。

    良い例:

    sql
    select
    +	t1.column1	as	column1
    +,	t2.column2	as	column2
    +from
    +	table1	t1
    +,	table2	t2
    +where
    +	t1.column3	=	1
    +and	t1.column4	=	t2.column4
    +order by
    +	t1.column1
    +,	t2.column2

    WITH 句

    with の前後に改行を挿入すること
    また、インデントは下記のように記述すること

    良い例:

    sql
    -- カラムエイリアスあり
    +with
    +    name1   (
    +        col_alias1  -- カラム1
    +    ,   col_alias2  -- カラム2
    +    )   as  (
    +        select
    +        ・・・
    +    )
    +,   name2   (
    +        col_alias1  -- カラム1
    +    ,   col_alias2  -- カラム2
    +    )   as  (
    +        select
    +        ・・・
    +    )
    +
    +-- カラムエイリアスなし
    +with
    +    name1   as  (
    +        select
    +        ・・・
    +    )
    +,   name2   as  (
    +        select
    +        ・・・
    +    )

    LIMIT 句 OFFSET 句

    LIMIT、OFFSET の前に改行を挿入すること

    良い例:

    sql
    select
    +    tbl1.column1    as  column1
    +from
    +    table1  tbl1
    +order by
    +    tbl1.column2    desc
    +limit 5
    +offset 5

    HINT 句

    HINT 句は独立した行で記載すること
    HINT 内容にはインデントを付けること

    良い例:

    sql
    select
    +/*+
    +	ここにhintを記載
    +*/
    +	tbl1.column1	as	column1
    +from
    +	table1	tbl1
    +where
    +	tbl1.column2	=	1

    コメント

    • 修正コメント

      (修正コメントが必要な場合、)
      処理追加の際、追加行の 1 行目の前と最終行の次の行にコメントを入れる。単一行の場合は、同一行の最後にコメントをつける。

      良い例:

      sql
      -- 2004/04/23 仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 S ← 修正開始点コメント
      +(追加処理)
      +-- 2004/04/23仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 E ← 修正終了点コメント
    • 単数行コメント

      SQL 内で使用する単数行コメント(カラムコメントなど)には、「 -- 」を使用する。

    • 複数行コメント

      /* */ 」を使用する。下記に例を示す。
      なお、前述で触れたとおり、SQL ファイルの先頭にコメントを記述することは禁止とする。

      良い例:

      sql
      /**********************************************************************/
      +/*
      + * コメントを始めるスラッシュとアスタリスクは、それだけを1行に置く。
      + * それから、コメント・ブロック内の各行は縦にアスタリスクを置き
      + * コメントがあることを強調する。
      + * 最後に、アスタリスクとスラッシュは、それだけを1行に置く。
      + */
      +/**********************************************************************/
    • 複数行コメントアウト

      複数行をコメントアウトする場合は、各行を「--」でコメントアウトする。
      /* */ 」を使用すると、その中に「 /* */ 」が存在した場合、コメントアウトが途中で切れてしまう恐れがあるため、
      使用しない。

    • 論理名の記載

      selectinsertupdatemergeのカラム名記述箇所には単数行コメントでカラムの論理名を記載する。
      selectinsertupdatedeletemergeのテーブル名記述箇所には単数行コメントでテーブルの論理名を記載する。
      論理名は ERD 等で定義された論理名と必ず一致させること。

    型変換

    代入や WHERE 句の条件設定などでデータ・タイプが異なる場合、明示的にタイプ変換を行う。(暗黙の型変換は使用しない)

    比較演算子

    「等しくない」を示す演算子は「!=」を利用する。「<>」も動作するが統一の観点から利用しない。

    ORDER BY 句

    order by 数字の構文は使用せずに、カラム名を記載する。

    GROUP BY 句

    group by 数字の構文は使用せずに、カラム名を記載する。

    集約関数を利用する場合は必ず記載すること。(省略可能であっても省略しない)

    EXISTS 句

    EXISTS 句を記載する際、サブクエリになる SELECT 句の指定は定数「1」とする。
    *」(ワイルドカード)や「'X'」は統一の観点から利用しない。
    また「*」(ワイルドカード)についてはパフォーマンスの観点からも禁止とする。

    良い例:

    sql
    where
    +	exists(
    +		select
    +			1
    +		from
    +			foo	f
    +		where
    +			f.col1	=	m.key
    +	)

    AS 句

    トップレベルの SELECT 句には必ずas句を記載し別名を付ける。
    同一の名前であっても AS 句を付与する。
    また、「as」は省略可能であるが、省略はしないこと。

    WHERE 句

    • 論理名の記載
      WHERE 句でカラムと式を比較する際は左辺がカラムになるように記載すること。

      良い例:

      sql
      where
      +	tbl.column1	=	1
      +and	tbl.amount2	>	tbl.amount3	+	tbl.amount4
    • 条件式の順序
      原則として、WHERE 句で条件式を列挙する際、下記の順序を守ること。

      1. テーブル単位にまとめて順番に記述する
        この際、テーブルの順序は FROM 句に記述した順序に準ずること。
      2. 1.のテーブル単位の中で絞り込み条件をまず記述し、その後結合条件を記述する。

      良い例:

      sql
      from
      +	a_table	a	-- a_table
      +,	b_table	b	-- b_table
      +,	c_table	c	-- c_table
      +where
      +-- a_tableの絞り込み
      +	a.key1		=	?
      +and	a.key2		=	?
      +-- b_tableの絞り込み
      +and	b.key1		=	?
      +and	b.key2		=	?
      +-- b_tableの結合条件
      +and	b.col1		=	a.col1
      +-- c_tableの絞り込み
      +and	c.key1		=	?
      +and	c.key2		=	?
      +-- c_tableの結合条件
      +and	c.col1		=	a.col1
      +and	c.col2		=	a.col2
      +and	c.col3		=	b.col3

    COUNT 文

    レコード数を数える COUNT 文の記述はcount(*)と記述する。
    count(1)count('x')count(key1)という記載は NG。

    文字列リテラル

    エスケープシーケンス

    文字列リテラル中のシングルクォーテーションのエスケープは「 '' 」とシングルクォーテーションを二つつなげた記述をする。
    \' 」も同様の結果が得られるが円マーク(バックスラッシュ)によるエスケープは利用しない。
    円マークをエスケープせざるを得ないときのみ円マークによるエスケープ利用して良いが、
    円マークを文字列リテラルで表現する必要のある設計自体を避けること。

    ※PostgreSQL は設定によって円マーク(バックスラッシュ)によるエスケープを無効にできます。(デフォルト無効)
    円マークをエスケープするときは、自プロジェクトでどちらに設定されているか確認してください。

    良い例:

    sql
    update
    +    table_a
    +set
    +    text_data   =   'that''s right'

    悪い例:

    sql
    update
    +    table_a
    +set
    +    text_data   =   'that\'s too bad'

    SQL コーディング規約(パフォーマンス性)

    本章ではパフォーマンス性を高めることを目的としたコーディング規約について記載する。

    検索

    検索処理におけるコーディング規約を下記に示す。

    • 中間一致、後方一致検索はインデックスを利用できないため避ける

    • 検索条件で=(等号)を使用できる場合は必ず使用する

      a=1 or a=2とする方がa>0 and a<3などと記述するのよりパフォーマンス上優位な場合が多い。
      これは a にインデックスがある場合、=であれば、インデックスが有効に使われるためである。

    • 可能な限り検索条件にパーティションキーの値を指定する

    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する

    • インデックスによる検索を指定したい場合、下記の記載を行わない

      • インデックスカラムを含む演算に対して条件指定

        悪い例:

        sql
        tbl1.col1	+	1	>	100 /* NGパターン 右辺で演算してください */

        良い例:

        sql
        tbl1.col1	>	100	-	1
      • インデックスカラムに関数を通した値に対して条件指定

        悪い例:

        sql
        /* NGパターン 右辺に関数を通してください */
        +to_char(tbl1.col1, 'YYYYMMDD')	>	'20151231'

        良い例:

        sql
        tbl1.col1	>=	to_date('20160101', 'YYYYMMDD')
      • インデックスカラムをORで条件指定(禁止ではないが原則行わない)

        悪い例:

        sql
        (
        +	/* NGパターンINDEXが利用されない場合があります。他の方法を検討してください */
        +		tbl1.col1	=	1
        +	or	tbl1.col1	=	2
        +	)

    挿入

    挿入処理におけるコーディング規約を下記に示す。

    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する。

    更新

    更新処理におけるコーディング規約を下記に示す。

    • 主キーの値の UPDATE は原則行わない。外部キーがあればエラーになる。
      外部キーが無い場合でも、事実上、主キーの値を利用して、検索、更新する場合は、リンクが切れてしまう。
    • パーティションキーの UPDATE は原則行わない。
    • VIEW を使用するデータ更新は禁止。更新は実表に対して行う。

    削除

    削除処理におけるコーディング規約を下記に示す。

    • 大量件数(数百万件レベル)の delete 文発行は避ける。

    DISTINCT 句

    DISTINCT は、暗黙のソート処理が行われる可能性があるため性能劣化につながる。
    EXISTS 句の使用・代替を検討すること。

    悪い例:

    sql
    select
    +    distinct
    +    d.no    as  dept_no
    +,   d.name  as  dept_name
    +from
    +    department  d
    +,   employee    e
    +where
    +    d.no    =   e.dept_no   -- 社員が一人以上属している部門を取得

    良い例:

    sql
    select
    +    d.no    as  dept_no
    +,   d.name  as  dept_name
    +from
    +    department  d
    +where
    +    exists(
    +        select
    +            1
    +        from
    +            employee    e
    +        where
    +            d.no    =   e.dept_no   -- 社員が一人以上属している部門を取得
    +    )

    IN 句

    IN 句は最大 1000 個まで指定できるが、200 個程度でも ORA エラーが発生するケースがある。
    また IN 句の少しだけ異なる SQL が大量に発行されると CPU 高騰やメモリ枯渇を招く。
    従って 100 を超えるような長い IN 句は使用せず、一時表を利用して in (select ・・・ from 一時表)のように書き換える。

    NOT IN 句

    原則not in(select~)は使用せずに、not exists (select~)を使用する。
    NOT IN句は、内部的にソートマージの結合をすることでテーブルをフルスキャンする場合があるため、性能が悪化する可能性がある。

    UNION 句

    uniondistinct処理が含まれパフォーマンス上問題があるため、union allを使用する。

    SELECT FOR UPDATE

    • select for updateで複数行にロックをかける場合、同時実行されるとデットロックを起こす可能性があるため、1件のロックでない場合はorder byを指定する。

    分析関数

    分析関数の使用は可能だが、性能悪化を招く恐れがあるため、特性を知らない方は DBA に相談する。

    インデックス

    インデックスの必要性については DBA で最終判断するため、必要とする場合は DBA へ相談する。

    外部結合

    外部結合する際、内部表(駆動表)はなるべく想定件数の少ない表にする。


    License

    CC-By-4.0

    + + + + \ No newline at end of file diff --git a/documents/forSQL/index.html b/documents/forSQL/index.html new file mode 100644 index 00000000..dfc91381 --- /dev/null +++ b/documents/forSQL/index.html @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    SQLコーディング規約

    Future Enterprise Coding Standards for SQL

    可読性や保守性、拡張性、SQL 性能を考慮したコーディング規約をまとめています

    SQL Coding Standards

    次の SQL コーディング規約が利用できます。

    • PostgreSQL 向けのコーディング規約はこちらです。
    • Oracle 向けのコーディング規約はこちらです。

    Resources

    次のリンクから単一ファイルで作成されたコーディング規約を取得できます。
    (これらのファイルはPandocを利用して作成しています。)

    + + + + \ No newline at end of file diff --git a/documents/forSlack/index.html b/documents/forSlack/index.html new file mode 100644 index 00000000..823994f6 --- /dev/null +++ b/documents/forSlack/index.html @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Slack利用ガイドライン

    Slack Usage Guidelines

    Slack利用ガイドライン

    チーム開発する上で必要となるGitブランチフローの規約です。

    次のリンクから単一ファイル版を取得できます。

    ファイルはPandocを利用して作成しています。

    + + + + \ No newline at end of file diff --git a/documents/forSlack/slack_usage_guidelines.html b/documents/forSlack/slack_usage_guidelines.html new file mode 100644 index 00000000..a8159aac --- /dev/null +++ b/documents/forSlack/slack_usage_guidelines.html @@ -0,0 +1,53 @@ + + + + + + Slack利用ガイドライン | Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Slack利用ガイドライン

    フューチャー株式会社

    本規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    はじめに

    リモートワーク/ハイブリッドワーク前提の業務において、チャットなどの非同期コミュニケーションを円滑に進めることは、業務効率を向上させるだけではなく、従業員全員の満足度を向上させ、より良い職場づくりに繋げることができる。

    また、ユーザーの様々な要望に応えるため、現代のチャットサービスは豊富な機能が提供されている。しかし、各ユーザーの考え方/利用者の感覚が千差万別であるため、ある人によって問題ないとされる行動が、別の人にとっては良くない受け取り方をされることも多い。例えば次のような対立が考えられる。

    • 必要最低限の簡潔なメッセージを送る方が効率的だ/文面が冷たくならないように絵文字や感嘆符(!)を使うべきだ
    • 質問はDMで行うべき/チャンネルで行うべき
    • times(分報)チャンネルを活用すべき/ノイズなので個人のメモに閉じるべき

    これら運用方法は利用者の所属する部署やチームごとに自然と決めていくことが多いが、複数のチャンネルで異なった運用方針である場合に混乱をきたすことがしばしばである。また、トレードオフを理解せずに、メールのコミュニケーションモデルを引きずった方針を取ってしまうこともある。異なる文化圏のチームから移籍した時に、ハレーションが起きるケースも多い。

    本ガイドラインはSlackを対象に利用方針についてのベースとなる規約を設け、Slackを用いてより良いコミュニケーションを促進することを目的とする。

    適用範囲

    • 「はじめに」章で述べた、一般ユーザー視点での利活用を中心とする
    • 次のような特に管理者が関心を持つ事項については対象外とする
      • パスワードポリシー/多要素認証の強制
      • 社外メンバー招待/ゲストレベルの調整
      • 監査

    免責事項

    有志で作成したドキュメントである

    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせて工夫された運営方針が存在する。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している
    • 自社のセキュリティポリシーや外部サービス利用ポリシーがある場合は、そちらを優先すること
    • Slack Enterprise Grid/Google Workspaceを利用しているため、それらの機能を前提にしている記述がある

    管理者向け推奨設定

    Workspace Access

    チーム、プロジェクトでの利用の場合は リクエスト制(By Request) もしくは招待性( Invite Only)の設定を推奨する。

    デフォルトチャンネル

    通常ワークスペースにメンバーを追加した際には #general へ自動参加するが、他にもメンバー全員に参加して欲しいチャンネルがある場合にはデフォルトチャンネルを追加する。

    TIP

    ユーザグループに対してもデフォルトチャンネルを設定できるため、用途に応じて使い分けると良い。

    表示名ガイドライン

    ワークスペースごとにガイドラインを設定することを推奨する。後述の表示名設定や、その他チームコミュニケーションにおけるルールを設定する。表示名のガイドラインを設定する権限があるのは、ワークスペースのオーナーだけなので注意する。

    ワークスペースの管理者

    ワークスペース内に複数のチームが混在する場合、それぞれのチームごとに管理者権限保持者を設定すること。

    理由:

    • 管理者権限を持った人しか実行できないオペレーションがあった際、チーム内で解決できる状態を作っておくことが望ましいため

    ユーザ向け推奨設定

    アカウントアイコンを設定する

    デフォルトのアイコン利用は極力避け、アカウント登録時に各自のアイコン画像を積極的に登録する

    理由:

    • チャットコミュニケーションにおいて、個人識別におけるアイコン画像の有用性が高いため

    また、GitHub/GitLab、Google Workspace、その他利用サービスも同様のアイコンを利用することで、個人を識別しやすくなる。

    検索性の高い氏名(Full name)を設定する

    表示名(Display name) もしくは氏名(Full name) にて、ローマ字及び漢字(無ければカタカナ)でのフルネームを登録すること。表示名はチームごとに記載文化や書き方が異なるケースが多いので、本ガイドラインでは氏名に記載することを推奨する。例えば「未来 太郎」の場合、「Taro Mirai (未来 太郎)」という記載を推奨する。

    理由:

    • Slackではアカウント名のインクリメンタルサーチが強力である。その際、ローマ字でも漢字でもサジェストされる状態にすることでユーザビリティの向上が期待できるため。

    ユーザーグループの推奨

    ユーザーグループの利用を推奨する。ゲストユーザーは追加できないため、もしチャンネルに該当するメンバーが在籍する場合は、その旨をメンバー全員が理解しコミュニケーションから除外してしまわないように注意すること。

    TIP

    ユーザーグループを作成できない状態(メンバーがワークスペース間にまたがっている場合等)の時、メンション先の対象者全員が個別に自分のSlack設定>Notification>My Keywordsに「@○○チーム」と予約語を登録することで、擬似的にグループメンションが可能

    チャンネル命名規則

    外部組織メンバーが在籍するチャンネルの命名

    Slack コネクト等でチャンネル内に社外のメンバーが含まれる場合には、チャンネル名の先頭に ---ext をつける

    理由:

    • 全社的に統一的なプレフィックスを定義することで、外部とのコミュニケーションにて予期しないミスが発生してしまうことを防ぐ目的がある。例えば、内部の進行について相談する発言を、取引先メンバーが在籍するチャンネルに誤投稿してしまう事態を避けるため
    • チャンネルはセクションという単位でグルーピング可能となり、従来のように、用途や組織を表現するプレフィックスで並び順を制御する必然性が薄れた

    投稿内容ポリシー

    敬称は不要

    敬称は省略して、 @mano メッセージ内容 といった形式でコメントすること。もし、どうしても敬称を付けて欲しい場合、表示名をさん付けにするハックも存在するため、受信者側で調整する。

    理由:

    • コミュニケーションを迅速・シンプルにするため

    絵文字や感嘆符を活用する

    積極的に活用することを推奨する。テキストコミュニケーションは、画像や音声が伝わらない分、冷たく捉えられがちである。特にリーダーなど上位のポジションにいる場合は、メンバーに威圧的に捉えられないように配慮するのが好ましい。

    「では、Aの方針でよろしくお願いします!」「では、Aの方針でよろしくお願いします:ganbatte:」 など付けることで、不機嫌でないことがわかり、心理的安全性が保たれる。

    積極的にカスタム絵文字を追加することを推奨する。チーム内でしか通用しない(例えば内輪ネタのような)カスタム絵文字であっても気軽に追加して良い。

    理由:

    • より良いコミュニケーション手段を模索すること自体が、コミュニケーションを活性化させ、価値を向上させるため

    注意:

    • なお、当然ながら他人の名誉を毀損するなど、社会人/プロフェッショナルとしてふさわしくない内容は登録しないこと

    絵文字リアクションによる積極応答

    非同期のコミュニケーションにおいて発信者が気になる点として、「投稿内容を見てくれたのかどうか」がある。特に確認依頼については見ていればOKで、回答は急がないケースは想像以上に多い。
    こういった場面では、::後で確認します:: といった絵文字リアクションを付けることで解決するため、積極的に活用する。

    また、参加者が多いチャンネルでの発信は勇気がいることなので、コミュニケーションを活性化させるためにも絵文字リアクションを積極的に行い推奨/礼賛することが望ましい。

    「〇〇してほしい」「〇〇について教えてほしい」(相談セクション)への対応は絵文字リアクションだけで済まさない

    「投稿内容を見てくれたのかどうか」ではなく、「投稿内容を理解して次のアクションをとってくれるのか」を知りたい場面も多い。 そのような場面では、絵文字リアクションのみで済まさず、対応可否をコメントでフィードバックする必要がある。

    DMはなるべく避ける

    基本的には、DMよりチャンネルでのやり取りを推奨する。チャンネルであっても、より参加人数が多い(よりオープンな)チャンネルでのやり取りを推奨する。

    理由:

    • 重複した質問を防ぐため
    • 質問事項がチーム/組織に共有されることで、全体の効率が上がるため
    • 後から類似の困りごとを持ったメンバーが、キーワード検索で見つけやすくするため

    DMの利用を推奨するケース:

    • 人事相談、機密事項を含む場合(「機密情報の流出に注意する」章を参照)
    • 限られたメンバーのみに、ファイル共有をしたい場合
    • 後から検索させる意味がないやり取り(「最近元気?」と同期に投げる場合など)

    timesの推奨

    timesとは、分報や作業スレッドとも呼ばれ、今取り組んでいることや困っていることを投稿することを指す。

    本規約の推奨は次のとおり:

    • timesの利用を推奨する
    • メンバーごとのtimesチャンネルではなく、スレッドでの利用を推奨する
    • timesスレッドは、他のメンバーは参照しても参照しなくてもどちらでも良い

    理由:

    • スレッド単位であれば、本チャンネル側のノイズになることはない。参加メンバーが多い場合は、times専用のチャンネルを作成すれば良い
    • メンバーごとの times チャンネルは、チャンネルが必要以上に増えるので推奨しない
    • 必要に応じて、作業状況を本人に確認(ポーリング)しなくても把握することができる
    • ハマったことや調べたことが、後々キーワード検索で見つかり、新規参画者の助けになることも多い

    timesスレッド作成者の注意事項:

    • times内とはいえ、他の人が不快になるような発言や不適切な利用は避ける(チームメンバーが閲覧可能であることを忘れない)

    timesスレッド内のメンション:

    • timesスレッドのコメント数は100以上になることもあり、途中で他メンバーに相談事などでメンションを飛ばすと、呼ばれたメンバーには「該当のスレッドの全コメントをチェックしたほうが良いのか」といった迷いが生じる。そのため、times内ではなく相談は別メッセージに切り出して行うことを推奨する
    • なお、timesの投稿を読んで欲しいときは、timesスレッドでメンションしても良い
    • timesのメンションを受けたユーザーが、その後の投稿の通知を受け取りたくない場合は、そのスレッドの通知を切ることで対応する

    timesスレッドでメンションを飛ばすと、その後の投稿によってメンション先のユーザーに通知が飛んでしまうのではないか?という懸念への考え方:

    • 該当スレッドのフォローを外せば良いので、上記観点でメンションを行う/行わないの判断は行わなくても良い。前述の通り、timesのコメントを(全て)読んで欲しい否かで決める

    メッセージ(スレッドのトップ)は具体的に書く

    チャンネルのメッセージ(スレッド先頭の投稿)では、話題を端的に表現する。ただし、返信スレッドの中を確認しないと内容が分からないようなメッセージ(タイトル)は非推奨とする。

    メッセージ(スレッド先頭の投稿)
    ✅推奨例@mirai チケット #4191 foo bar failed のビルドエラーの解消についての相談です。スタックトレースはスレッド内に記載します
    ❌非推奨例レビュー依頼

    なお、メンションはメッセージ(スレッド先頭)に付けるか、返信スレッド内に付けるかは任意とする。

    参考:

    メッセージのURLを活用する

    Slackは本来、フロー情報向けのツールである。しかしこれをWikiなどのストック情報向けツールに転記する労力は高く、運用が形骸化しがちである。そのため、例えばあるスレッドで設計方針について議論したのであれば、そのスレッドのURLをコピーして、作業チケットやWikiなどに記載し、トレース可能にするような運用にするチームも良く聞く。本規約もスレッドURLの活用を推奨する。

    なお、決定事項の経緯や議論内容を数年経過したのちに確認することもしばしば発生する。そのため議論があればスレッドを利用し、かつ同一スレッドで複数のテーマを混ぜないことが望ましい。関連議論がいくつかのスレッドに分かれる場合、相互に関連スレッドのURLを投稿しておくと良い。

    Slackにおける情報ストック機能

    Canvas、ブックマーク、ピン留め機能を活用することで、Slack内にてストック情報を取り扱うことも可能である。PJで利用している課題管理サービスのURLを共有したい場合にはブックマーク、PJメンバーに都度参照して欲しい特定のメッセージがある場合にはピン留め、情報量が多く章立てて整理をしたい場合にはCanvas、などといった形でユースケースに合わせて使い分ける。

    Also send to channelは乱発しない

    Also send to channel を利用することで、スレッド内の投稿をチャンネルのタイムライン側に重複投稿ができる。

    本規約の推奨は以下の通り:

    • 過去のスレッドでやり取りを再開した場合に、チャンネルに在籍するメンバーに通知する目的で用いる
    • スレッド内で重要な決定事項に至った場合は、メンバーに周知する目的で用いる
    • スレッド内のやり取りを細かくAlso send to channelすると、スレッドを用いる意味が薄れるので、利用頻度は抑えるように意識する

    広めの通知に注意する

    @channel

    緊急時を除き、原則利用を禁止する。

    理由:

    • @channel はSlackを見ていないユーザにも通知が飛ぶため、休暇中のメンバー等にも影響がある。受取側で制御すべきという考えもあるが、システム障害対応など優先度の高い問い合わせのために、あえてOFFにしていないメンバーも存在することを考えると、なるべく利用を避けた方が無難である

    利用して良い場合:

    • システム障害時など、重大かつ緊急度が高い場合は @channel を使っても良い

    @here

    メールのCCに似た意図で @here を使うことは禁止とする。

    推奨ケース

    txt
    @真野 @村田 ○○の件ですが\~

    NG(メールのCC的な形で @here を追加)

    txt
    @真野 @村田 @here ○○の件ですが

    理由:

    • メールのCC的な参考情報であれば、@here を付けずに、チャンネルの未読通知で後で見ることができるため
    • 真に必要ではないときに通知が飛ぶことが常態化すると、@here の緊急性やアクションを求める意味合いが弱まり、真に必要なときに読み飛ばされてしまう可能性が上がるため(「狼少年」現象)

    利用して良い場合:

    • 全員にアクションを促す連絡事項を行う場合。例えば、チーム全体イベントへの出欠可否を確認する連絡など

    メンション範囲は適切に

    過剰なメンションの抑制

    原則、レビュー依頼や確認依頼など、行動してほしい時にメンションを付けるものとする。「@mirai ありがとうございます!」「@mirai 承知しました!」等の挨拶にメンションを付けると、通知が来てノイズになるため非推奨とする。メンションを付けず「ありがとうございます!」とすると良い。

    情報提供依頼系など善意やり取りはきちんとフィードバックする

    情報提供依頼はSlackと親和性が良いタスクである。この際、情報提供の依頼者は、回答してもらった人に対して、👍 絵文字だけのリアクションを取る場合があるが、フィードバック付きでコメントを返すことが望ましい。情報提供者としても、その情報が役立ったのか、またそうでないかの関心は強いためである。
    もし、フィードバックが難しい場合や、スレッド投稿数をなるべく減らしたいなどの意図がある場合は、複数のリアクションを返し感謝の意を強調すると良い。 👍️🎉☺[神] のようなイメージである。

    メンションの宛先をできる限り絞り込む

    単なる周知目的ではなく行動を促したい相手に絞ること。お見合いになってボールが浮いてしまう可能性がある。「@mirai @mano @murata @ozawa @tanimura AWSの設定で確認したいのですが~」などと広すぎる場合は、宛先メンバーは自分よりもっと詳しい人がいるかも知れないので、回答すべきかどうか逡巡してしまう。できれば1、2名に宛先を絞り、宛先メンバーから別の有識者メンバーにディスパッチしてもらう運用を考えると良い。

    予約投稿を活用する

    特にリーダーからメンバーに対して、深夜(22:00-6:00など)や休日など業務時間外の投稿は原則禁止とし、予約投稿を推奨する。

    理由:

    • 仕事とプライベートにメリハリを持たせることで、成果の向上を期待できるため
    • (システム障害等)緊急時の依頼と混同してしまうため。次回出勤時の対応で良いものと区別すること
    • Slackのアップデートにより、チャンネル投稿に閉じずスレッド投稿へも予約投稿が可能となった

    受け取り側で制御する方針

    システム障害時などの緊急時は電話連絡とし、メンションに対する即対応を求めない取り決めを行うのであれば、受け取り側で通知時間を設定し、送る側は送信時間に気を遣わない運用も可とする。ただし、時間外に通知を受け翌営業日に対応しようと考えたが翌営業日には忘れているような場合、受け取り側で通知を受けた時点でリマインダーを仕込んだり、アクティビティ > @メンション を定期的に確認するような工夫をする。

    不在の表明

    表示名に不在情報を記載(例:@sato_11/8休)しておくことを推奨する。受信側が不在時に緊急性の低い通知を防げたり、送信側が即レスを期待しなくて済む。不在情報がGoogleカレンダーなど別のスケジュールアプリで管理されていたとしても、Slackでの依頼時に気付けるため。

    ステータス機能で「休暇中🏝️」にすればよいのではないか

    ステータス機能でもチームメンバーに不在であるという状態を表明できる。しかし、次の観点で表示名での表明を推奨する。

    • いつから、いつまで休暇なのかステータスでは不明である
      • 期間が分かれば、予約投稿で休暇明けに投稿するなどのアクションがすぐ取れる
    • 休暇だけでなく出張中などの情報も提示できる
      • 例えば、海外出張なので時差があることが分かれば、チームメンバーにどれくらいでレスポンスが来そうか予想ができるようになる
    • ステータス変更に気が付きにくい
      • メンションを付けて投稿する時に常時表示されるわけではないので、ステータスは見過ごされる可能性が高い :::

    可読性を上げるための書式設定

    箇条書き、太字、引用などの装飾は、積極的に活用する。文章を構造化することで、読み手にとっての負荷が軽減されるため。Slackの書式以外にも、【すみかっこ】等の記号を使うことでセクションを表現することも同時に推奨する。

    エラーメッセージの画像添付非推奨、テキストスニペットの推奨

    有識者にスタックトレースなどのエラー内容を画像添付して問い合わせることは原則として非推奨とし、テキストで共有することを推奨する。また、共有内容が長文の場合にはテキストスニペット使用が好ましい。

    理由:

    • 相談相手も裏取りとしてスタックトレースの内容を検索することが多々あるため
    • 後から同様の困り事を持った人が、キーワード検索で見つけにくくなるため
    • 長いログをそのまま貼り付けるとスレッドを広く埋め尽くしてしまうが、テキストスニペットを使えば1投稿あたりのデフォルト表示域を制限できる

    次の場合は、スクリーンショットなどの画像で共有しても良い。

    • コピーできないエラー表示など、テキストでの情報提供が難しい場合
    • (相談相手が、コピー範囲などを独自判断で狭められることを防ぐなどの理由で)スクリーンショットでの共有を希望する場合

    テキストスニペット利用時は、タイトル(ファイル名)に拡張子をつける

    Slackはテキストスニペットに設定されたタイトルをそのままファイル名としてダウンロードするよう動作する。この際拡張子が設定されていないとSlack内でそのままファイルを開くことができなくなってしまう。

    機密情報の流出に注意する

    営業情報、個人情報、人事情報など機密情報は、「最小権限の原則」に従い、なるべく宛先を狭めるべきである。センシティブなやり取りを行う場合は、参加者を絞ったプライベートチャンネル/DMグループの活用を推奨する。

    メッセージ通知にも気をつける

    画面投影やWebミーティングでの画面共有時、意図しないメッセージ通知が見えてしまう事がある。Slackの通知設定にて次に示す設定を施すことで防ぐことが可能なので活用すると良い。

    • 通知自体をOFFにする
    • 通知はOFFにしないが、メッセージ内容は非表示にする

    ファイルの共有に注意する

    Slackのファイル共有は便利であるが、ファイルのオーナー(作成者)とチャンネルにメンバー追加できる担当者が必ずしも1:1ではない。そのため次の運用が望ましい。

    推奨する運用:

    • Google Driveなどにファイルをアップロードする
    • Google Drive側で適切な権限に絞り込む

    理由:

    • Google Drive側で権限設定が可能
    • Slack上にアップロードされたファイルが、別のチャンネルに再アップロードされて収集がつかなくなるといったケースを防ぎ、統制を図るため

    該当しないケース:

    • 社外勉強会の登壇資料など、一般に「公開済み/公開予定 」のファイルはアップロードして良い

    Google DriveのURL共有時プレビュー表示について:

    • 表紙がプレビューされるが、次の理由により問題ないという立場を取る。
      • プレビュー表示されるのは1枚目(1シート目)であり、通常は表紙ページが見られるのみ
      • ファイルが存在すること自体は知られて良い(チャンネルに投稿しているため)と考えられる
      • なにか問題があれば、プレビュー表示を行わない操作がSlack上で可能である

    プライベートチャンネルの投稿に対する引用

    プライベートチャンネルの投稿コメントを、別のチャンネルにURL引用で投稿すると、該当チャンネルの権限を有していないユーザーにも参照権限を与えてしまう。引用時にはセンシティブな内容が含まれていないか確認するよう注意する。

    さいごに

    本ガイドラインの策定にあたっては、すでにインターネットに公開されているSlack利用ガイドラインや記事等も参照させていただいた。本ガイドラインが皆様のSlack活用をより快適にする一助となれば幸いである。

    参考:

    + + + + \ No newline at end of file diff --git a/example-resources/erd.a5er b/example-resources/erd.a5er new file mode 100644 index 00000000..bce2a89f --- /dev/null +++ b/example-resources/erd.a5er @@ -0,0 +1,429 @@ +# A5:ER FORMAT:18 +# A5:ER ENCODING:UTF8 +# A5:ER Mk-1 Copyright © 2007 m.matsubara +# A5:SQL Mk-2 Version 2.19.2 Copyright © 1997 - 2024 m.matsubara +# https://a5m2.mmatsubara.com + +[Manager] +ProjectName=フューチャーマッスルパートナー +Author= +MaxEntityRowShow=1000 +ReadOnlyRecommend=0 +Page=Main +PageInfo="Main",2,"A3Landscape",$FFFFFF +LogicalView=1 +DecodeDomain=0 +ViewModePageIndividually=1 +ViewMode=2 +ViewFormat=0 +UseNondependenceDashLine=0 +FontName=Tahoma +FontSize=6 +PaperSize=A4Landscape +HeaderLeft= +HeaderCenter= +HeaderRight= +FooterLeft= +FooterCenter= +FooterRight= +ShowPageoutRelation=1 +RDBMSTypeName=Oracle Database +DefaultPkName=%0:s_PKC +DefaultPkIndexName=%0:s_PKI +DefaultIndexName=%0:s_IX%1:d +DefaultFkName=%0:s_FK%1:d +SqlSeparator=0 +UpperCaseKeyword=0 +ShowTag=1 +ShowCommonAttributes=0 +BugFixEntityWidth=1 + +[Entity] +PName=trainee +LName=トレーニー +Comment= +TableInnerOption= +TableOption= +Page=MAIN +Left=900 +Top=400 +Field="トレーニーID","trainee_id","",,,"","",$FFFFFFFF,"" +Field="トレーニー名","trainee_name","",,,"","",$FFFFFFFF,"" +Field="表示氏名","display_name","",,,"","",$FFFFFFFF,"" +Field="自己紹介","self_introduction","",,,"","",$FFFFFFFF,"" +EffectMode=None +Color=$000000 +BkColor=$FFFFFF +ModifiedDateTime=20240711124838 +Position="MAIN",900,400,254,275 +ZOrder=1 + +[Entity] +PName=booking +LName=予約 +Comment= +TableInnerOption= +TableOption= +Page=MAIN +Left=1100 +Top=950 +Field="予約ID","booking_id","",,,"","",$FFFFFFFF,"" +Field="メニューID","menu_id","",,,"","",$FFFFFFFF,"" +Field="トレーニーID","trainee_id","",,,"","",$FFFFFFFF,"" +Field="開始日時","start_at","",,,"","",$FFFFFFFF,"" +Field="終了日時","end_at","",,,"","",$FFFFFFFF,"" +Field="予約ステータス区分","booking_status_typ","",,,"","",$FFFFFFFF,"" +Field="予約受付日時","booking_reception_at","",,,"","",$FFFFFFFF,"" +Field="トレーニング開始日時","training_start_at","",,,"","",$FFFFFFFF,"" +Field="トレーニング終了日時","training_end_at","",,,"","",$FFFFFFFF,"" +EffectMode=None +Color=$000000 +BkColor=$FFFFFF +ModifiedDateTime=20240419165003 +Position="MAIN",1100,950,283,349 +ZOrder=2 + +[Entity] +PName=menu +LName=メニュー +Comment= +TableInnerOption= +TableOption= +Page=MAIN +Left=1300 +Top=400 +Field="メニューID","menu_id","",,,"","",$FFFFFFFF,"" +Field="トレーナーID","trainer_id","",,,"","",$FFFFFFFF,"" +Field="表示順序","display_order","",,,"","",$FFFFFFFF,"" +Field="メニュー名","menu_name","",,,"","",$FFFFFFFF,"" +Field="メニュー説明","menu_description","",,,"","",$FFFFFFFF,"" +Field="所要時間","required_time","",,,"","",$FFFFFFFF,"" +Field="料金","price","",,,"","",$FFFFFFFF,"" +EffectMode=None +Color=$000000 +BkColor=$FFFFFF +ModifiedDateTime=20240711142913 +Position="MAIN",1300,400,238,333 +ZOrder=3 + +[Entity] +PName=trainer +LName=トレーナー +Comment= +TableInnerOption= +TableOption= +Page=MAIN +Left=1650 +Top=400 +Field="トレーナーID","trainer_id","",,,"","",$FFFFFFFF,"" +Field="トレーナー名","trainer_name","",,,"","",$FFFFFFFF,"" +Field="単価","unit_price","",,,"","",$FFFFFFFF,"" +Field="営業開始時間","business_start_at","",,,"","",$FFFFFFFF,"" +Field="営業終了時間","business_end_at","",,,"","",$FFFFFFFF,"" +Field="公開メールアドレス","public_mail_addr","",,,"","",$FFFFFFFF,"" +Field="公開電話番号","public_tel","",,,"","",$FFFFFFFF,"" +EffectMode=None +Color=$000000 +BkColor=$FFFFFF +ModifiedDateTime=20240711124858 +Position="MAIN",1650,400,426,296 +ZOrder=4 + +[Entity] +PName=calendar +LName=カレンダー +Comment= +TableInnerOption= +TableOption= +Page=MAIN +Left=1650 +Top=850 +Field="トレーナーID","trainer_id","",,,"","",$FFFFFFFF,"" +Field="日付","date","",,,"","",$FFFFFFFF,"" +Field="予約区分0000","booking_typ_0000","",,,"","",$FFFFFFFF,"" +Field="予約区分0030","予約区分0030","",,,"","",$FFFFFFFF,"" +Field="予約区分0100","予約区分0100","",,,"","",$FFFFFFFF,"" +Field="予約区分0130","予約区分0130","",,,"","",$FFFFFFFF,"" +Field="予約区分0200","予約区分0200","",,,"","",$FFFFFFFF,"" +Field="予約区分0230","予約区分0230","",,,"","",$FFFFFFFF,"" +Field="予約区分0300","予約区分0300","",,,"","",$FFFFFFFF,"" +Field="予約区分0330","予約区分0330","",,,"","",$FFFFFFFF,"" +Field="予約区分0400","予約区分0400","",,,"","",$FFFFFFFF,"" +Field="予約区分0430","予約区分0430","",,,"","",$FFFFFFFF,"" +Field="予約区分0500","予約区分0500","",,,"","",$FFFFFFFF,"" +Field="予約区分0530","予約区分0530","",,,"","",$FFFFFFFF,"" +Field="予約区分0600","予約区分0600","",,,"","",$FFFFFFFF,"" +Field="予約区分0630","予約区分0630","",,,"","",$FFFFFFFF,"" +Field="予約区分0700","予約区分0700","",,,"","",$FFFFFFFF,"" +Field="予約区分0730","予約区分0730","",,,"","",$FFFFFFFF,"" +Field="予約区分0800","予約区分0800","",,,"","",$FFFFFFFF,"" +Field="予約区分0830","予約区分0830","",,,"","",$FFFFFFFF,"" +Field="予約区分0900","予約区分0900","",,,"","",$FFFFFFFF,"" +Field="予約区分0930","予約区分0930","",,,"","",$FFFFFFFF,"" +Field="予約区分1000","予約区分1000","",,,"","",$FFFFFFFF,"" +Field="予約区分1030","予約区分1030","",,,"","",$FFFFFFFF,"" +Field="予約区分1100","予約区分1100","",,,"","",$FFFFFFFF,"" +Field="予約区分1130","予約区分1130","",,,"","",$FFFFFFFF,"" +Field="予約区分1200","予約区分1200","",,,"","",$FFFFFFFF,"" +Field="予約区分1230","予約区分1230","",,,"","",$FFFFFFFF,"" +Field="予約区分1300","予約区分1300","",,,"","",$FFFFFFFF,"" +Field="予約区分1330","予約区分1330","",,,"","",$FFFFFFFF,"" +Field="予約区分1400","予約区分1400","",,,"","",$FFFFFFFF,"" +Field="予約区分1430","予約区分1430","",,,"","",$FFFFFFFF,"" +Field="予約区分1500","予約区分1500","",,,"","",$FFFFFFFF,"" +Field="予約区分1530","予約区分1530","",,,"","",$FFFFFFFF,"" +Field="予約区分1600","予約区分1600","",,,"","",$FFFFFFFF,"" +Field="予約区分1630","予約区分1630","",,,"","",$FFFFFFFF,"" +Field="予約区分1700","予約区分1700","",,,"","",$FFFFFFFF,"" +Field="予約区分1730","予約区分1730","",,,"","",$FFFFFFFF,"" +Field="予約区分1800","予約区分1800","",,,"","",$FFFFFFFF,"" +Field="予約区分1830","予約区分1830","",,,"","",$FFFFFFFF,"" +Field="予約区分1900","予約区分1900","",,,"","",$FFFFFFFF,"" +Field="予約区分1930","予約区分1930","",,,"","",$FFFFFFFF,"" +Field="予約区分2000","予約区分2000","",,,"","",$FFFFFFFF,"" +Field="予約区分2030","予約区分2030","",,,"","",$FFFFFFFF,"" +Field="予約区分2100","予約区分2100","",,,"","",$FFFFFFFF,"" +Field="予約区分2130","予約区分2130","",,,"","",$FFFFFFFF,"" +Field="予約区分2200","予約区分2200","",,,"","",$FFFFFFFF,"" +Field="予約区分2230","予約区分2230","",,,"","",$FFFFFFFF,"" +Field="予約区分2300","予約区分2300","",,,"","",$FFFFFFFF,"" +Field="予約区分2330","予約区分2330","",,,"","",$FFFFFFFF,"" +EffectMode=None +Color=$000000 +BkColor=$FFFFFF +ModifiedDateTime=20240419162555 +Position="MAIN",1650,850 +ZOrder=5 + +[Entity] +PName=trainer_workspace +LName=トレーナー勤務先 +Comment= +TableInnerOption= +TableOption= +Page=MAIN +Left=2200 +Top=450 +Field="トレーナーID","trainer_id","",,,"","",$FFFFFFFF,"" +Field="店舗ID","store_id","",,,"","",$FFFFFFFF,"" +Field="店舗名","store_name","",,,"","",$FFFFFFFF,"" +Field="ジムID","gym_id","",,,"","",$FFFFFFFF,"" +EffectMode=None +Color=$000000 +BkColor=$FFFFFF +ModifiedDateTime=20240419163344 +Position="MAIN",2200,450 +ZOrder=6 + +[Entity] +PName=gym +LName=ジム +Comment= +TableInnerOption= +TableOption= +Page=MAIN +Left=2350 +Top=200 +Field="ジムID","gym_id","",,,"","",$FFFFFFFF,"" +Field="ジム名","ジム名","",,,"","",$FFFFFFFF,"" +EffectMode=None +Color=$000000 +BkColor=$FFFFFF +ModifiedDateTime=20240419163332 +Position="MAIN",2350,200 +ZOrder=7 + +[Relation] +Entity1=trainee +Entity2=booking +RelationType1=2 +RelationType2=3 +Fields1= +Fields2= +Cardinarity1= +Cardinarity2= +Position="MAIN",0,4131,5869,3628,R,R,"" +Dependence=1 +Caption= +PName= +ModifiedDateTime=20240419165039 +LineMode=0 +Bar1=413 +Bar2=587 +Bar3=363 +TermPos1=R +TermPos2=R +ZOrder=8 + +[Relation] +Entity1=trainer +Entity2=menu +RelationType1=2 +RelationType2=3 +Fields1= +Fields2= +Cardinarity1= +Cardinarity2= +Position="MAIN",0,4675,5325,2864,R,R,"" +Dependence=1 +Caption= +PName= +ModifiedDateTime=20240419165118 +LineMode=0 +Bar1=468 +Bar2=532 +Bar3=286 +TermPos1=R +TermPos2=R +ZOrder=9 + +[Relation] +Entity1=menu +Entity2=booking +RelationType1=2 +RelationType2=3 +Fields1= +Fields2= +Cardinarity1= +Cardinarity2= +Position="MAIN",0,5580,4420,4675,R,R,"" +Dependence=1 +Caption= +PName= +ModifiedDateTime=20240419165146 +LineMode=0 +Bar1=558 +Bar2=442 +Bar3=468 +TermPos1=R +TermPos2=R +ZOrder=10 + +[Relation] +Entity1=trainer +Entity2=calendar +RelationType1=2 +RelationType2=3 +Fields1= +Fields2= +Cardinarity1= +Cardinarity2= +Position="MAIN",0,7800,2200,7644,R,R,"" +Dependence=1 +Caption= +PName= +ModifiedDateTime=20240419165237 +LineMode=0 +Bar1=780 +Bar2=220 +Bar3=764 +TermPos1=R +TermPos2=R +ZOrder=11 + +[Relation] +Entity1=trainer_workspace +Entity2=gym +RelationType1=3 +RelationType2=2 +Fields1= +Fields2= +Cardinarity1= +Cardinarity2= +Position="MAIN",0,4440,5560,4238,R,R,"" +Dependence=0 +Caption= +PName= +ModifiedDateTime=20240419165300 +LineMode=0 +Bar1=444 +Bar2=556 +Bar3=424 +TermPos1=R +TermPos2=R +ZOrder=12 + +[Relation] +Entity1=trainer +Entity2=trainer_workspace +RelationType1=2 +RelationType2=3 +Fields1= +Fields2= +Cardinarity1= +Cardinarity2= +Position="MAIN",0,4585,5415,2851,R,R,"" +Dependence=1 +Caption= +PName= +ModifiedDateTime=20240419165327 +LineMode=0 +Bar1=458 +Bar2=542 +Bar3=285 +TermPos1=R +TermPos2=R +ZOrder=13 + +[Entity] +PName=review +LName=レビュー +Comment= +TableInnerOption= +TableOption= +Page=MAIN +Left=1650 +Top=100 +Field="レビューID","review_id","",,,"","",$FFFFFFFF,"" +Field="トレーナーID","trainer_id","",,,"","",$FFFFFFFF,"" +Field="トレーニーID","トレーニーID","",,,"","",$FFFFFFFF,"" +Field="コメント","comment","",,,"","",$FFFFFFFF,"" +Field="投稿日時","posted_at","",,,"","",$FFFFFFFF,"" +EffectMode=None +Color=$000000 +BkColor=$FFFFFF +ModifiedDateTime=20240711123631 +Position="MAIN",1650,100,132,141 +ZOrder=14 + +[Relation] +Entity1=trainee +Entity2=review +RelationType1=1 +RelationType2=3 +Fields1= +Fields2= +Cardinarity1= +Cardinarity2= +Position="MAIN",0,1183,1379,2885,R,R,"" +Dependence=1 +Caption= +PName= +LineMode=0 +Bar1=118 +Bar2=138 +Bar3=288 +TermPos1=R +TermPos2=R +ZOrder=17 + +[Relation] +Entity1=trainer +Entity2=review +RelationType1=1 +RelationType2=3 +Fields1= +Fields2= +Cardinarity1= +Cardinarity2= +Position="MAIN",0,6333,4889,5822,R,R,"" +Dependence=1 +Caption= +PName= +LineMode=0 +Bar1=633 +Bar2=489 +Bar3=582 +TermPos1=R +TermPos2=R +ZOrder=18 diff --git a/hashmap.json b/hashmap.json new file mode 100644 index 00000000..985e6fca --- /dev/null +++ b/hashmap.json @@ -0,0 +1 @@ +{"documents_forawsresource_awsインフラリソース命名規約.md":"DgKzw8SL","documents_forawsresource_index.md":"BirY3q_E","documents_forgitbranch_commit_message_rule.md":"DI5kmJni","documents_forgitbranch_git_branch_standards.md":"DSwGA5sV","documents_forgitbranch_index.md":"B55H9nHJ","documents_forgitbranch_merge_develop_to_feature.md":"DppWFrFb","documents_forgitbranch_merge_feature_to_develop.md":"Badw-1gI","documents_forgitbranch_vscode_git_ope.md":"EwXmig8W","documents_forjava_index.md":"DlReBA-G","documents_forjava_javaコーディング規約.md":"BwEbWD0S","documents_forjava_javaコーディング規約_for_11.md":"CtnIBNB8","documents_forjava_javaコーディング規約_for_8.md":"CNbXdYCI","documents_formarkdown_future_muscle_partner_docs_01_画面_index.md":"CLdWSZO-","documents_formarkdown_future_muscle_partner_docs_01_画面_uim01_index.md":"CRCgMTjO","documents_formarkdown_future_muscle_partner_docs_01_画面_uim02_index.md":"BvNTz8Vk","documents_formarkdown_future_muscle_partner_docs_01_画面_uim03_index.md":"QlIlXJ1q","documents_formarkdown_future_muscle_partner_docs_01_画面_uim04_index.md":"roT3YPrn","documents_formarkdown_future_muscle_partner_docs_01_画面_uis01_index.md":"ZxY0b2PV","documents_formarkdown_future_muscle_partner_docs_01_画面_uis02_index.md":"CtjQqWe_","documents_formarkdown_future_muscle_partner_docs_01_画面_uis03_index.md":"f8FmFsMR","documents_formarkdown_future_muscle_partner_docs_01_画面_uis04_index.md":"BqRZPnn-","documents_formarkdown_future_muscle_partner_docs_02_webapi_index.md":"opMYqqJ4","documents_formarkdown_future_muscle_partner_docs_03_データ_index.md":"Dm_lmVb0","documents_formarkdown_future_muscle_partner_docs_readme.md":"BAGNGqZo","documents_formarkdown_future_muscle_partner_index.md":"CCGpmIQT","documents_formarkdown_if定義書.md":"BuJHNFYH","documents_formarkdown_index.md":"Bz-unPiS","documents_formarkdown_プログラム設計書.md":"qu2nuHwH","documents_formarkdown_メッセージ設計書.md":"BS8c2YMp","documents_formarkdown_区分値設計書.md":"CnQxW1-D","documents_foropenapispecification_api_design.md":"DePo1nOn","documents_foropenapispecification_file_standards.md":"BenCgDHA","documents_foropenapispecification_index.md":"Domo3uDK","documents_foropenapispecification_openapi_specification_2.0.md":"CL9CUyuq","documents_foropenapispecification_openapi_specification_3.0.3.md":"DkcvvhOI","documents_foropenapispecification_prerequisite.md":"CpQ2zmO7","documents_forslack_index.md":"DFutx_6v","documents_forslack_slack_usage_guidelines.md":"DOuxyerx","documents_forsql_index.md":"DUGYZ5hg","documents_forsql_sqlコーディング規約(oracle).md":"DWD8TXZm","documents_forsql_sqlコーディング規約(postgresql).md":"DViLWmpD","index.md":"CpvsHgwS"} diff --git a/images/JBee.png b/images/JBee.png new file mode 100644 index 00000000..448260cc Binary files /dev/null and b/images/JBee.png differ diff --git a/images/JBee100.png b/images/JBee100.png new file mode 100644 index 00000000..b9cd566a Binary files /dev/null and b/images/JBee100.png differ diff --git a/images/JBeeBlack.png b/images/JBeeBlack.png new file mode 100644 index 00000000..19ae1894 Binary files /dev/null and b/images/JBeeBlack.png differ diff --git a/images/background3.jpg b/images/background3.jpg new file mode 100644 index 00000000..4f0441db Binary files /dev/null and b/images/background3.jpg differ diff --git a/images/logo-dark.svg b/images/logo-dark.svg new file mode 100644 index 00000000..339af494 --- /dev/null +++ b/images/logo-dark.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/logo-system.svg b/images/logo-system.svg new file mode 100644 index 00000000..afceb2d5 --- /dev/null +++ b/images/logo-system.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/logo.svg b/images/logo.svg new file mode 100644 index 00000000..c870bbc2 --- /dev/null +++ b/images/logo.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 00000000..531c7118 --- /dev/null +++ b/index.html @@ -0,0 +1,52 @@ + + + + + + Future Enterprise Coding Standards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Skip to content

    Future Enterprise Coding Standards

    フューチャー株式会社が作成するエンタープライズ領域に特化したコーディング規約

    GitHub last commitGitHub stars


    他の開発言語のコーディング規約も順次作成中です


    License

    CC-By-4.0

    + + + + \ No newline at end of file diff --git a/resources/.gitkeep b/resources/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git "a/resources/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.docx" "b/resources/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.docx" new file mode 100644 index 00000000..2aa46a16 Binary files /dev/null and "b/resources/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.docx" differ diff --git "a/resources/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.html" "b/resources/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.html" new file mode 100644 index 00000000..7cce318b --- /dev/null +++ "b/resources/AWS\343\202\244\343\203\263\343\203\225\343\203\251\343\203\252\343\202\275\343\203\274\343\202\271\345\221\275\345\220\215\350\246\217\347\264\204.html" @@ -0,0 +1,1456 @@ + + + + + + + + AWSインフラ命名規約 + + + + + +
    +

    AWSインフラ命名規約

    +

    フューチャー株式会社

    +
    + +

    +

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。 ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。 また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    +
    +

    1 免責事項

    +

    ::: warning 有志で作成したドキュメントである

    +
      +
    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせた開発手法が採用されている。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している
    • +
    +

    :::

    +
    +

    1.1 前提条件

    +
      +
    • 開発チームが 3 ~ 30 名程度で構築する規模での利用を想定している
    • +
    • 本規約をそのままプロジェクトに導入することを推奨する +
        +
      • そのままの導入ができない場合は、一部を抜粋、拡張して用いられることを想定している
      • +
    • +
    • AWS の構成はマネージドサービスを活用するベストプラクティスに従うものとする +
        +
      • 例えば、1 台の EC2 上で DB とアプリのように複数のサービスを稼働させるといった構成は考慮しない
      • +
    • +
    • 一部のリージョンでのみ利用可能な機能は想定していない +
    • +
    +
    +
    +

    1.2 名前の構成要素

    +

    各リソースの名前に用いる要素を次の一覧に示す。

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CategoryItemNameUsage
    Common{env}環境環境の区別
    {product}製品名構築する製品名またはシステム名。稼働するマイクロサービス名もこれに当たる
    {role}役割役割を示す。場合によっては具体的な製品名 postgres, jenkins などを指定する
    {usage}用途利用目的やリソースの動作 (action) を示す。user_master, fileupload など識別したい値を指定する
    {target}対象操作の対象。usage が複数の対象があり区別したいときに利用する。
    Network{region}リージョンリージョンコード の略称を用いる
    {az}アベイラビリティーゾーンマルチ AZ 構成などで、明示的に AZ を意識する場合に用いる
    {access}アクセス修飾子access modifier. ネットワークでの public, private を区別したいときに利用する
    {permission}権限allow または deny を指定する。Security Group での利用を想定
    Organization{company}会社名会社の特定に利用。複数の会社による構築や、運用に複数社関わる場合などに必要となる
    {project}プロジェクトプロジェクト制でプロダクトを開発する際のプロジェクト名または、プロジェクトコード
    +
    +

    1.2.1 環境 ({env})

    +

    ソフトウェア開発では複数の環境を用意し、dev, stg, prod などの名前をつけて互いに完全に分離・区別する運用を行うことが多い。そういった環境分離のために AWS インフラは次のいずれか、もしくは組み合わせで設計される。

    +
      +
    1. 環境単位で AWS アカウントを作成する
    2. +
    3. 環境単位で AWS リージョンを分ける
    4. +
    5. 命名で分ける
    6. +
    +

    いずれの方法でも、 各リソース名に環境名を付与することを推奨 する。冗長な命名となる場合もあるが、以下が理由である。

    +
      +
    • 同一 AWS アカウントかつ同一リージョン内には、同じ名前のリソースを作成できない
    • +
    • AWS リソース名のみで環境を特定できるようにする事で、誤った環境のリソースを操作してしまうミスを低減する
    • +
    • メンバー間の認識齟齬を無くし生産性を高める +
        +
      • チームメンバーなどの問い合わせやトラブルシュートの際に、リソース名のみでどの環境にあるか素早く判断できるようにする
      • +
      • メンバーの役割によっては AWS アカウント構成を完全には理解できていない可能性がある
      • +
    • +
    +
    +

    1.2.1.1 環境識別子

    +

    主要な環境名と識別子 (Identifier) は以下である。AWS リソースの命名には識別子を用いる。

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameIdentifierMemo
    Productionprodエンドユーザーが使う環境、本番運用環境
    Stagingstg本番と同じ構成でテストするための環境
    User Acceptance Testuatユーザーがシステムのレビュー、または操作を学習するための環境
    Performance Testperf性能検証を行うための環境
    Developmentdev開発チームが開発するための環境
    Locallocalローカル環境
    +

    prod についてはよく用いる dev, stg と見間違えを防ぐため 4 文字にしている。

    +

    デプロイメント環境 の考え方では、User Acceptance Test 環境を単にテスト環境 (Test) 呼ぶが、テストという単語は汎用的であるため複数の環境にあてはまる。したがって容易に認識齟齬が生じるため本規約では非推奨とする。

    +

    名前には必ず識別子を用いる。環境名をそのまま利用しない (例: production-example-s3bucket とは命名しない)。

    +

    理由:

    +
      +
    • AWS リソースによっては名前の文字数の制限が厳しい (例: ELB は最大 32 文字である)
    • +
    • AWS コンソールや設計ドキュメントなどで一覧化した場合に見切れる可能性を減らして可読性を高める
    • +
    • 識別子に採用した単語は一般的に用いられている略称である
    • +
    • その他の環境についても、環境識別子の数は通常そこまで多くならないず、またよく用いられるため、利用者にとっての認識負荷は少なく覚えるコストも低い
    • +
    +
    +
    +

    1.2.1.2 同一目的の複数環境

    +

    同一目的の環境が複数必要な場合は、識別子の末尾に連番をつける。

    +

    例:

    +
      +
    • dev1, dev2, dev3
    • +
    • stg1, stg2
    • +
    +
    +
    +
    +

    1.2.2 役割 ({role})

    +

    アプリケーションを構成する要素には役割がある。それを AWS リソース名に含めることで、開発者の理解を助け、操作ミスを低減する。

    +

    主要なロール名と識別子は以下である。

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameIdentifierMemo
    Web Serverwebapache や nginx などの Web サーバとしての役割
    Web ApplicationappWeb アプリケーションとしての役割
    Web APIapiHTTP(s) API を提供する
    Jobjob時間やある特定のイベントをもとにバックグラウンドの処理(バッチ処理など)を行う
    I/Fifファイル入出力を行う
    DBdbデータベース
    Cachecacheキャッシュ
    CI/CDciCI/CD サーバ
    +

    名前を一般化せず、プロダクト名をそのまま利用しても問題ない。例えば、Web アプリサーバに tomcat、CI/CD サーバに jenkins といった名称を使っても良い。

    +
    +
    +

    1.2.3 用途 ({usage})

    +

    利用目的やリソースの動作 (action) を示す。user_master, fileupload といった形式や、認証(auth)や BFF(Backend For Frontend)など。

    +

    役割 ({role}) と合わせてリソースが一意に特定できる名称を設定する。

    +
    +
    +

    1.2.4 リージョン ({region})

    +

    マルチリージョン構成を取り、リージョンを意識する必要のある場合に利用する。リージョンコード そのものではなく略称を識別子として用いる。

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameRegion CodeIdentifier
    米国東部 (バージニア北部)us-east-1ue1
    米国東部 (オハイオ)us-east-2ue2
    米国西部 (北カリフォルニア)us-west-1uw1
    米国西部 (オレゴン)us-west-2uw2
    アジアパシフィック (東京)ap-northeast-1an1
    アジアパシフィック (ソウル)ap-northeast-2an2
    アジアパシフィック (大阪)ap-northeast-3an3
    アジアパシフィック (シンガポール)ap-southeast-1as1
    +

    シングルリージョン構成または、リージョン間のリソースの関係が疎である場合はリージョン識別子を付与しない。

    +
    +
    +

    1.2.5 アベイラビリティゾーン ({az})

    +

    AZ 名にはリージョンコードを含めず、末尾のアルファベットだけとする。

    + + + + + + + + + + + + + + + + + + + + + +
    AZ IDIdentifier
    ap-northeast-1aa
    ap-northeast-1cc
    ap-northeast-1dd
    +
      +
    • 利用可能な文字: [a-d]{1}
    • +
    +
    +
    +

    1.2.6 アクセス修飾子 ({access})

    +

    VPC のサブネットは、パブリックサブネットの場合インターネットに直接アクセスできる。パブリックサブネットを区別したい場合はリソース名にアクセス修飾子を付与する。

    + + + + + + + + + + + + + + + + + +
    NameIdentifier
    パブリックサブネットpublic
    プライベートサブネットprivate
    +
    +
    +
    +

    1.3 全体ポリシー

    +
    +

    1.3.1 命名規約

    +

    次のように各要素を使ってケバブケース (kebab-case) で命名する。パスカルケース (PascalCase) やスネークケース (snake_case) は利用しない。なお、サービス名自体にパスカルケースを用いることは許容する

    +
    # 命名規約の基本形
    +{env}-{product}-{role}-{usage}
    +

    理由:

    +
      +
    • ほぼ全ての AWS サービスではリソース名にハイフンを許容する。一方で、アンダースコアを許容しない WebACL のようなサービスがある
    • +
    • 環境名、サービス名などの単位で区切りを明確にできる
    • +
    +
    +
    +

    1.3.2 利用可能な文字

    +

    利用する文字は、半角英数字とハイフンに限定する。また、 小文字を推奨 する。

    +
      +
    • 推奨: [a-z0-9\-]+
    • +
    +

    また、先頭文字には半角英字を用い (ハイフン、数値を先頭にしない)、ハイフンは 2 文字以上連続させないこととする。

    +
    +
    +

    1.3.3 AWS サービス名を含めない

    +

    リソース名に AWS サービス名を含めない。

    +

    良い例:

    +
    stg-fuga-web-fileupload
    +stg-fuga-web-fileupload
    +

    悪い例:

    +
    stg-fuga-web-fileupload-s3
    +stg-fuga-web-fileupload-bucket
    +

    理由:

    +
      +
    • AWS コンソールで見たときにどの AWS サービスのリソースを見ているか自明である
    • +
    • Terraform の命名規則 にリソース名を繰り返さないという記載があり、整合性を持たせるため
    • +
    +
    +

    Resource and data source arguments Do not repeat resource type in resource name (not partially, nor completely):

    +
    +

    ただし、VPC エンドポイントやセキュリティグループのように、どの AWS サービスの何で利用されているかを示す場合には利用することがある。

    +
    +
    +

    1.3.4 プロジェクト名を含めない

    +

    プロジェクト制を取っている場合、その開発チームの持ち物であることを示すためプロジェクト名をリソース名に含めたくなるが非推奨である。

    +

    理由:

    +
      +
    • 必ずしも開発しているプロダクトと、プロジェクトの粒度・ライフサイクルは一致しない
    • +
    • プロジェクトが解散すると管理主管が曖昧になる
    • +
    +

    プロジェクト名の替わりにプロダクト名を含めることとする。

    +
    +
    +

    1.3.5 マルチクラウドを考慮し、aws 識別子を追加するかどうか

    +

    AWS だけではなく、Azure や GCP などを組み合わせたマルチクラウド運用を行っている、あるいは行う予定がある場合を考慮し、リソース名に aws といったプレフィックス/サフィックスを付与する考えもある。

    +

    本規約では、aws キーワードをリソース名に含めることは非推奨とする。

    +

    理由:

    +
      +
    • 同一 product を異なるクラウドサービスで運用することは稀
    • +
    • 一部のサービス (例えば DWH のみ Google BigQuery を利用するようなケース) だけの使用であれば、{usage} で区別すれば十分である
    • +
    +
    +
    +
    +

    1.4 サービス別の命名規約

    +

    サービスによって異なる命名規約と例を記載する。

    +

    以下ではプロダクト名を fuga とした場合の例をあげる。

    +
    +

    1.4.1 VPC

    +

    VPC に関わるリソースの命名について記載する。

    + ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Resource NameNaming ConventionExampleNote
    VPC{env}-{product}stg-fuga
    Subnet{env}-{product}-{access}-{az}stg-fuga-public-aAZ: どこのゾーンかを識別するため
    EIP{env}-{product}-{usage}stg-fuga-nat
    Route Table{env}-{product}-{access}stg-fuga-public
    Internet Gateway{env}-{product}stg-fuga
    NAT Gateway{env}-{product}stg-fuga
    Endpoint{env}-{product}-{aws_service}stg-fuga-s3様々なサービスが利用するため AWS サービス名を含めている
    Security Group{env}-{product}-{aws_service}-{usage}stg-fuga-ec2-bastion様々なサービスが利用するため AWS サービス名を含めている
    +
    +
    +

    1.4.2 API Gateway

    +
    +

    AWS上の命名制約

    +
      +
    • ドキュメントは確認できなかったら、リソース名は 1024 文字まで指定可能。システム上は一意である必要はない
    • +
    +
    +

    API Gateway は 全体ポリシーの命名規約 に則る。管理上、一意となるように命名する

    +
    # 命名規約の基本形
    +{env}-{product}-{role}-{usage}-{access}
    +
    +# 例
    +stg-fuga-web-portal-private
    +stg-fuga-web-fileupload-public
    +
      +
    • API Gateway には複数の機能種別 (REST, HTTP) が存在するが、命名には含めない
    • +
    • private/public を名前に含めることで、public は認証が入っているかなどをチェックできる
    • +
    +
    +
    +

    1.4.3 EC2

    +

    インスタンス名の制限=タグの制限のため、名前は Amazon EC2 リソースのタグ付け に従う必要がある。

    +
    # 命名規約の基本形
    +{env}-{product}-{role}
    +
    +# 例
    +stg-fuga-web
    +

    オートスケーリング、オートヒーリング構成をする場合にどこの AZ に配置するかを意識させないため、リソース名に AZ は基本的に含めない。そのような構成をしないという方針は、アンチパターンのため構成を見直すべきと考える。

    +
    +
    +

    1.4.4 LB

    +
    +

    AWS上の命名制約

    + +
    +

    LB には ALB/NLB/CLB などの種類があるが、いずれも以下の命名規約に従う。また、Internal LB に関しては、{usage} 部に含める。

    +
    # 命名規約
    +{env}-{product}-{role}-{usage}-{access}
    +
    +# 例
    +stg-fuga-web-api-public
    +

    ターゲットグループ名は、基本的には LB と同じである。

    +

    ただし、Blue/Green デプロイを行う場合は、ターゲットグループ名をユニークにし、どちら (Blue/Green) に所属しているかをわかるようにする。

    +
    # Target group name (Blue/Green) の命名規約
    +{env}-{product}-{role}-{usage}-{access}-blue
    +
    +# 例
    +stg-fuga-web-public-blue
    +
    +
    +

    1.4.5 ECS

    +
    +

    AWS上の命名制約

    +
      +
    • クラスター +
        +
      • 最大文字数: 255
      • +
      • 利用可能文字種: A-z, 0-9, -, _
      • +
      • その他制約: 先頭の文字は A-z のみ利用可能
      • +
    • +
    • サービス、タスク定義 +
        +
      • 最大文字数: 255
      • +
      • 利用可能文字種: A-z, 0-9, -, _
      • +
    • +
    +
    +

    ECS の命名規約は以下のとおりである

    +
    # クラスターの命名規約
    +{env}-{product}
    +
    +# 例
    +stg-fuga
    +
    +# サービスの命名規約
    +{env}-{product}-{role}-{usage}
    +
    +# 例
    +stg-fuga-api-auth
    +stg-fuga-web-frontend
    +
    +# タスク定義の命名規約
    +{env}-{product}-{role}-{usage}
    +
    +# 例
    +stg-fuga-batch-import-address
    +
    +
    +

    1.4.6 Lambda

    +
    +

    1.4.6.1 Lambda Function

    +
    +

    AWS上の命名制約

    +

    CreateFunction によると以下の制約である。

    +
      +
    • 1 ~ 64 文字
    • +
    • 利用可能文字: [a-zA-Z0-9-_]+
    • +
    +
    +

    Lambda は運用を経てリソース数が増えやすいサービスの一つである。そのため個別の機能名の前に {role} を含めてグルーピングしやすい名前にする。

    +
    # 命名規約
    +{env}-{product}-{role}-{usage}
    +
    +# 例
    +stg-fuga-import-userprofile
    +stg-fuga-job-checkconsistency
    +stg-fuga-report-successrate
    +

    もし、Scatter-Gather パターンを用いる場合は次のようにサフィックスに追加して区別する。

    +
    # 命名規約
    +{env}-{product}-{role}-{usage}-scatter
    +{env}-{product}-{role}-{usage}-segment
    +{env}-{product}-{role}-{usage}-gather
    +
    +
    +

    1.4.6.2 Lambda Layer

    +
    +

    AWS上の命名制約

    +
      +
    • 1 ~ 64 文字
    • +
    • 利用可能文字: [a-zA-Z0-9-_]+
    • +
    +
    +

    Lambda Layers は実行環境が重要であるため、 {runtime} で言語バージョンを指定する。

    +
    # 命名規約
    +{env}-{product}-{runtime}-{usage}
    +
    +# 例
    +stg-fuga-python310-auth
    +stg-fuga-nodejs18-frontend
    +
    +
    +
    +

    1.4.7 RDS/Aurora

    +
    +

    AWS上の命名制約

    +

    Amazon RDS の命名に関する制約 によると以下の制約である。

    +
      +
    • 1 ~ 63 個の英数字またはハイフンを使用する必要があります
    • +
    • 1 字目は文字である必要があります
    • +
    • 文字列の最後にハイフンを使用したり、ハイフンを 2 つ続けて使用したりすることはできません
    • +
    • 1 つの AWS アカウント、1 つの AWS リージョンにつき、すべての DB インスタンスにおいて一意である必要があります
    • +
    +
    +
    # クラスターの命名規約
    +{env}-{product}-{role}
    +
    +# 例
    +stg-fuga-auth
    +
    +# インスタンスの命名規約
    +{env}-{product}-{role}-{serial}
    +
    +# 例
    +stg-fuga-auth-01
    +
    +# DBパラメータグループの命名規約
    +{env}-{product}-{role}
    +{env}-{product}
    +
    +# 手動スナップショットの命名規約
    +{env}-{product}-{role}-{yyyy}-{mm}-{dd}
    +

    AZ は含めない。

    +

    理由:

    +
      +
    • RDS はマルチ AZ 構成をとることが推奨のため
    • +
    • Aurora は自動でマルチ AZ 構成をとっているため
    • +
    +

    DB パラメータグループは、role 単位での設定を推奨する。product を跨いでの設定は行わない。

    +
      +
    • 設定値の変更はパラメータグループを適用している全ての DB に変更が反映される。同じパラメータグループを複数の DB で共有し過ぎることにより意図しない DB にまで設定変更が反映されるリスクを避けるため
    • +
    +

    クラスター/インスタンスに適用する IAM ロール

    + +

    DB サブネット

    +
      +
    • VPC のサブネットを参照
    • +
    +
    +
    +

    1.4.8 DynamoDB

    +
    +

    AWS上の命名制約

    +

    Amazon DynamoDB でサポートされるデータ型と命名規則 によると以下の制約である。

    +
      +
    • すべての名前は UTF-8 を使用してエンコードする必要があり、大文字と小文字が区別される
    • +
    • 3 ~ 255 文字
    • +
    • 利用可能な文字: [a-zA-Z0-9_.-]+
    • +
    +
    +

    DynamoDB のテーブル名には、環境、プロダクト名、用途を用いる。データは長く残り、かつ変更しにくいため会社名などの変化しやすい項目は含めない。

    +
    # DynamoDB の命名規約
    +{env}-{product}-{usage}
    +
    +# 例
    +stg-fuga-user
    +stg-fuga-user-accesslog
    +

    なお、インデックス名は idx-1, idx-2 のような連番での管理を推奨する。RDB とは異なりアカウント単位での一意性は不要なため、テーブル名は含めなくても良いため、 idx_{テーブル名}_{連番} としなくても良い。DynamoDB は 最大で 20 のグローバルセカンダリインデックス を持つことができるが、インデックスの数は最小限に抑えることが鉄則であるため、0 埋めしない。ただし、要件上どうしても多用が避けられないことが判明している場合は idx-01, idx-02 と 0 埋めする。

    +
    +
    +

    1.4.9 S3 Bucket

    +
    +

    AWS上の命名制約

    +

    Amazon S3 バケットの命名要件 によると以下の制約である。

    +
      +
    • 1 ~ 63 文字
    • +
    • 半角英数字、ピリオド、ダッシュのみを使用可能
    • +
    • バケット名の各ラベルは、小文字または数字で始まっている必要がある
    • +
    • バケット名では、アンダースコア、末尾のダッシュ、連続するピリオド、隣接するピリオドとダッシュは使用できない
    • +
    • バケット名を IP アドレス (198.51.100.24) として書式設定することはできない
    • +
    +
    +

    S3 は非常に多くの用途で用いることがあるため、利用形態に応じて規則を変えて対応する。

    +
    # 通常の命名規約
    +{env}-{product}-{use}
    +
    +# 例
    +stg-fuga-fileupload
    +
    +# ログを保管するバケットの命名規約
    +{env}-{product}-{service}-logs
    +
    +# 例
    +stg-fuga-alb-logs
    +
    +# データ授受で利用する場合の命名規約
    +{env}-{product}-{use}-{dest}-if
    +
    +# 例
    +stg-fuga-userinfo-fis-if
    +
    +
    +

    1.4.10 Kinesis Data Streams

    +
    +

    AWS上の命名制約

    +

    CreateStream によると以下の制約である。

    +
      +
    • 異なる AWS アカウントであれば同名が許容
    • +
    • 異なるリージョンであれば同名が許容
    • +
    • 1 ~ 128 文字
    • +
    • [a-zA-Z0-9_.-]+
    • +
    +
    +

    IoT のセンシングを始めとしたイベントデータの場合は、次の命名規約を用いる。{role} には import や export など、どのような処理を行うかを規定する。

    +

    設計によっては、データ種別 (スキーマ) 毎に分離することもあるため、デバイス名やセンサー名などの発生源の名前を持たせる。

    +
    # 命名規約
    +{env}-{product}-{role}-{usage}-{schema}
    +
    +# 例
    +stg-fuga-import-iotsensor-devicetype
    +stg-fuga-import-iotsensor-toggle
    +

    ジョブキューとして用いる場合は、どのジョブを利用するかが重要であるため、呼び出し用であることが明確になるように命名する。

    +
    # 命名規約
    +{env}-{product}-call-{呼び出したいジョブ名}
    +
    +# 例
    +stg-fuga-call-job-arrival-check
    +
    +
    +

    1.4.11 SQS

    +
    +

    AWS上の命名制約

    +

    Amazon SQS キューとメッセージの識別子 によると以下の制約である。

    +
      +
    • 最大 80 文字
    • +
    • [a-zA-Z0-9_-]
    • +
    • FIFO キューの場合には .fifo のサフィックスで終わる必要がある
    • +
    • 1 つの AWS アカウント、1 つの AWS リージョンにつき一意である必要がある
    • +
    +
    +

    1 つのキューに対し、複数のプロデューサー、コンシューマーを取りうるため、プロデューサー、コンシューマーを名前に含めることは推奨しない。

    +
    # 標準キューの命名規約
    +{env}-{company}-{product}-{usage}
    +
    +# 例
    +stg-future-fuga-processresult
    +
    +# FIFOキューの命名規約
    +{env}-{company}-{product}-{usage}.fifo
    +
    +# 例
    +stg-future-fuga-processresult.fifo
    +
    +
    +

    1.4.12 Event Bridge Rule

    +
    +

    AWS上の命名制約

    +
      +
    • 最大 64 文字
    • +
    • 数字、小文字/大文字、 . (ピリオド)、 - (ハイフン)、 _ (アンダーバー) が使用可能
    • +
    • 同じリージョン内および同じイベントバス上の別のルールと同じ名前を付けることは不可
    • +
    +
    +
    # 命名規約
    +{env}-{product}-{usage}-{source}-{target}
    +
    +# 例
    +stg-fuga-deploy-s3-codepipeline
    +stg-fuga-archive-auth0-s3
    +stg-fuga-polling-schedule-lambda
    +

    ※スケジュールタイプのルールの場合は {source}schedule と記載する。

    +
    +
    +

    1.4.13 IAM

    +

    IAM に関わるリソースの命名について記載する。IAM グループ、IAM ユーザー、IAM ロール、IAM ポリシーの 4 点について述べる。

    +
    +

    1.4.13.1 IAM ユーザー

    +

    IAM ユーザーについては、誰 (人またはシステム) が利用するのかを識別することを目的とする。同じユーザーを複数の人やシステムで使いまわすと、誰が操作したのかといった証跡を追えなくなってしまうため、個別に発行することを推奨する。 また、役割や権限といった情報は名前に含めない。そのような名前はユーザーに紐づけるロールが増えた際などに名前と役割や権限の実態が乖離してしまうためである。

    +

    IAM ユーザー名については全体ポリシーから外れ、アンダースコア区切りを推奨する。

    +

    理由:

    +
      +
    • 多くのサービスでユーザー名には慣習的にアンダースコアを用いることが多いため
    • +
    +

    人が利用する IAM ユーザー:

    +
    # 命名規約
    +{company}_{username}
    +
    +# 例
    +future_taro_mirai
    +

    ※AWS アカウントに関与する人が単一の会社に属する人だけである場合は {company}_ を省略しても良い。

    +

    システムが利用する IAM ユーザー:

    +
    # 命名規約
    +{product}_{usage}
    +
    +# 例
    +fuga_api
    +fuga_auth0
    +

    AWS サービスに権限付与する場合は IAM ロールで付与することを想定している。システムが利用する IAM ユーザーは、別のクラウドや SaaS 等への権限付与に使うことを想定している。

    +

    全体ポリシーの命名規約 とは異なり、環境名 {env} を Prefix につけない理由は次である。

    +
      +
    • ある AWS アカウントに対して、Switch Role などで別の環境にアクセスする際に混乱が生じる
    • +
    • ブラウザのパスワード管理などのために ID 名を分けたいという考えもあるかもしれないが、パスワード管理アプリなどの利用を推奨する
    • +
    +
    +
    +

    1.4.13.2 IAM グループ

    +

    IAM グループに IAM ユーザーを追加することで複数ユーザーの権限を一括管理できる。IAM ユーザーは複数の IAM グループに追加可能だが、所属可能なグループ数は最大で 10 という制約があるため注意が必要である。

    +

    この制約を踏まえ、各役職ごとに基本となるグループを作成し、基本グループで対応できない例外的な権限の付与を個別のグループで対応することを想定した命名としている。

    +

    また、グループ数をむやみに増やさないためにグループ名に環境名 {env} はつけない。仮に future-developer というグループが dev 環境のみにアクセスできるといったような制御をする場合でも、グループ名には dev をつけず、dev 環境にアクセス可能なポリシーをグループにアタッチする方針としている。

    +

    基本となるグループ:

    +
    # 命名規約
    +{company}-{role}
    +
    +# 例
    +future-developer
    +future-maintainer
    +

    ここでの {role} はユーザーが担う役割を表す。

    +

    個別のグループ:

    +
    # 命名規約
    +{target}-{usage}
    +
    +# 例
    +bastion-access
    +

    個別のグループは Session Manager で EC2 にアクセスするグループといった使い方を想定している。

    +

    例外的に特定のユーザーにのみ権限を付与する、会社を超えて共通のグループを付与するといったユースケースも考えられる。

    +
    +
    +

    1.4.13.3 IAM ロール

    +

    IAM ロールは、AWS サービスに権限を付与する目的で利用する。IAM ロールに複数の IAM ポリシーをアタッチできるため、IAM ロールの命名では細かい権限を表現することは避け、IAM ロールを誰が使うのかを明確にすることを主目的とする。

    +
    # 命名規約
    +{env}-{product}-{aws_service}-{usage}
    +
    +# 例
    +stg-fuga-ec2-bastion
    +stg-fuga-lambda-api
    +

    ※場合によっては {usage} 部に詳細情報を追加しても良い

    +
    +
    +

    1.4.13.4 IAM ポリシー

    +

    IAM ポリシーの命名に入る前に、ポリシーの設計方針について記載する。 ここでは、ポリシー設計方針の代表例として、以下の 2 パターンについて説明する。

    +
      +
    • 細かく設定し再利用するパターン
    • +
    • 特定のリソースに付与するポリシーを書き出すパターン
    • +
    +

    それぞれの設計方針にはメリット・デメリットがあり開発規模などで使い分けが想定されるため、それぞれの場合の命名方法について記載する。

    +

    細かく設定する場合:

    +
    {
    +  "Version": "2012-10-17",
    +  "Statement": [
    +    {
    +      "Action": "s3:*",
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    }
    +  ]
    +}
    +
    # 命名規約
    +{env}-{product}-{permission}-{aws_service}-{usage}
    +
    +# 例
    +stg-fuga-allow-s3-full
    +stg-fuga-allow-ses-send
    +

    特定のリソースに付与するポリシーを書き出す場合:

    +
    {
    +  "Version": "2012-10-17",
    +  "Statement": [
    +    {
    +      "Action": "s3:*",
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    },
    +    {
    +      "Action": ["ses:SendEmail", "ses:SendRawEmail"],
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    },
    +    {
    +      "Action": "sqs:*",
    +      "Effect": "Allow",
    +      "Resource": "*"
    +    }
    +  ]
    +}
    +
    # 命名規約
    +{env}-{product}-{aws_service}-{usage}
    +
    +# 例
    +stg-fuga-ec2-bastion
    +stg-fuga-iam-group-future-develop
    +

    IAM グループ用のポリシーを作成する例では、company を含めた future-develop といった名前を {usage} としている。

    +

    この場合は命名粒度が IAM ロールと等しくなるため、命名規約も同じ方針にしている。

    +

    予め用意されているポリシーの名前は PascalCase 形式であるが (例: AmazonS3FullAccess)、ユーザーが作成したことを明確にするため snake_case で命名する。

    +
    +
    +
    +
    +

    1.5 タグの命名

    +
    +

    AWS上の命名制約

    +

    Tag naming and usage conventions によれば以下の制約である。

    +
      +
    • 最大 50 個のタグを設定できる
    • +
    • タグキーは一意でなければならない
    • +
    • タグキーは最長 128 Unicode 文字、タグ値は最長 256 Unicode 文字
    • +
    • 使用可能文字 +
        +
      • UTF-8 で表現できる文字、数字、スペース、. : + = @ _ / -
      • +
    • +
    • タグのキーと値では大文字と小文字が区別されます
    • +
    • タグに aws: プレフィックスは禁止
    • +
    +
    +

    AWS リソースのタグ付け によれば、タグ付けのベストプラクティスは以下である。

    +
      +
    • 個人情報 (PII) などの機密情報や秘匿性の高い情報をタグに設定しない
    • +
    • すべてのリソースタイプに一貫して適用する
    • +
    • リソースアクセスコントロールの管理、コスト追跡、オートメーション、整理など、複数の目的に対応したタグガイドラインを考慮する
    • +
    • 自動化ツールを使用してリソースタグを管理する
    • +
    • タグは、多めに使用する
    • +
    • 将来の変更の影響を考慮する
    • +
    • AWS Organizations のタグポリシーを利用することで、組織が採用するタグ付け標準を自動的に適用する
    • +
    +

    より詳しいタグ付けのベストプラクティスも存在するが、本紙の範囲を超えるため紹介のみに留める。 https://docs.aws.amazon.com/whitepapers/latest/tagging-best-practices/tagging-best-practices.html

    +
    +

    1.5.1 タグキー

    +
      +
    • 使用する文字は英数字に限定する。基本的には パスカルケース (PascalCase) 形式を推奨する +
        +
      • リソース作成時に自動生成される Name タグと平仄を合わせるため
      • +
    • +
    • 以下の観点でタグを使い分ける +
        +
      • リソース整理
      • +
      • コスト管理 +
          +
        • AWS Billing にてコスト配分タグの設定が必要
        • +
      • +
      • オートメーション +
          +
        • EC2 の自動起動停止の管理など
        • +
      • +
      • アクセス制御 +
          +
        • タグ値を利用した IAM ポリシーのアクセス制御など
        • +
      • +
    • +
    +

    主要なタグ項目

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CategoryTag KeyRequiredNote
    CommonEnv環境識別子
    Systemシステム名
    Nameリソースの識別子として機能名などを設定
    費用按分Ownerリソースの管理主管部署。費用の負担先を想定
    Project開発担当チーム。どのチームがどれくらい利用したかをトレースするために設定
    ツールで利用StartAt起動時刻。自動化ツールなどで必要があれば設定
    EndAt停止時刻
    +
    +
    +

    1.5.2 タグ値

    +
      +
    • 各タグキーごとに原則、タグ値の元となる命名規約に従う
    • +
    • 元となる命名規約がない場合、以下を推奨する +
        +
      • リソースの命名規約に従う
      • +
      • 頭文字のみの略語の場合は大文字のみ
      • +
    • +
    • 値の取りうるパターンが決まっている場合には、タグポリシーで値を設定する
    • +
    +
    +
    +

    1.5.3 タグポリシー

    +

    AWS Organizations を利用している場合、タグの標準化を促進するタグポリシーの設定が可能となる。 タグポリシーにより実現できることは以下。

    +
      +
    • タグキーの大文字小文字の組み合わせを強制する +
        +
      • 例: Name を指定した場合、 name, NAME, nAME などはタグキーとして設定できなくなる
      • +
    • +
    • 任意のタグキーに対して、設定可能なタグ値を指定する +
        +
      • Env など、予め取りうるタグ値のパターンが決まっている場合に利用
      • +
    • +
    • タグポリシーを適用するリソースタイプを指定
    • +
    +
    +
    +
    +
    +
    +

    2 License

    +

    CC-By-4.0

    +
    + + diff --git "a/resources/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.docx" "b/resources/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.docx" new file mode 100644 index 00000000..13e962e0 Binary files /dev/null and "b/resources/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.docx" differ diff --git "a/resources/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.html" "b/resources/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.html" new file mode 100644 index 00000000..77b9a770 --- /dev/null +++ "b/resources/Java\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204.html" @@ -0,0 +1,2621 @@ + + + + + + + + Javaコーディング規約 + + + + + +
    +

    Javaコーディング規約

    +

    Future Enterprise Coding Standards

    +
    + +

    +

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    +ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    +また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    +
    +

    1 はじめに

    +

    一般に利用・参照されている Java コーディング規約やガイドラインを以下に示す。本規約の作成においても、下記規約類を参照・抜粋している。

    + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    規約著作者URL
    Code Conventions for the Java Programming LanguageSun Microsystemshttp://www.oracle.com/technetwork/java/codeconvtoc-136057.html
    Writing Robust Java CodeScott W. Amblerhttp://www.ambysoft.com/downloads/javaCodingStandards.pdf
    オブジェクト倶楽部版 Java コーディング標準オブジェクト倶楽部http://objectclub.jp/community/codingstandard/CodingStd.pdf
    電通国際情報際サービス版 Java コーディング規約 2004電通国際情報サービスhttp://objectclub.jp/community/codingstandard/JavaCodingStandard2004.pdf
    JJGuideline (Java - J2EE Conventions and Guidelines)Stephan.J & JCS Teamhttp://www.fedict.belgium.be/sites/default/files/downloads/Java_J2EE_conventions_and_guidelines_EN.pdf
    Google Java Style (非公式和訳)Googlehttps://kazurof.github.io/GoogleJavaStyle-ja/
    Acroquest Technology Java コーディング規約Acroquest Technologyhttps://www.acroquest.co.jp/webworkshop/javacordingrule/Acroquest_JavaCodingStandard_6_7.pdf
    ※現在は削除されています
    +

    ※ Sun Microsystems の規約は Java 草創期から一応の標準という位置づけだったが、オブジェクト指向、及び、その開発環境の普及・発展によって、設計やコーディングにおいて、直接的に有用な知識や豊富な指針を含むような優れた規約や、ツールなどによる機械的な準拠チェックと連携する規約が普及してきている。

    +
    +
    +

    2 規約の重要性

    +

    標準としての規約を定義し、遵守することの重要性を以下に示す。

    +
      +
    • ソフトウェアメンテナンスにおける、可読性・保守性・拡張性の向上
    • +
    • 問題を起こしやすい実装を未然に回避することによる、品質・生産性の向上
    • +
    • 標準規約を通して得られる一般的な実装知識やノウハウ(=学習効果)
    • +
    +
    +

    2.1 コーディングの心得

    +

    長いプログラムを記述すること(ステップ数)によって生産性が評価されたのは、過去の時代の出来事である。現在は、クラスやメソッドの役割が明確で、ロジックが読みやすく、保守性に優れたプログラムを記述することが評価される。コーディング規約は、コードの書き方に関する一種のパターンと考えることもでき、コードの保守性を向上させる具体的な方法を示している。したがって、規約の一つ一つの意図を理解し、守ることが重要になる。しかし、保守性に優れたコードを作成するためには、コーディング規約を守ることに加えて、良いコードを記述するための基本的な心構えをしっかり心に留めておく必要がある。以下では、その心得について述べる。

    +

    【コーディングの心得 5 か条】

    +
      +
    1. 見やすさを重視せよ
    2. +
    3. ネーミングはわかりやすく
    4. +
    5. サンプルを鵜呑みにしない
    6. +
    7. 同じコードを二度書かない
    8. +
    9. 役割は一つに
    10. +
    +
    +

    2.1.1 見やすさを重視せよ

    +

    「良いコード」の基本は、「他の人が読んでもわかりやすいと感じられるコード」。コードの見やすさは、フォーマットはもちろん、ロジックの簡潔さや API の常識的な使い方などから生まれる。コーディングにあたっては、常に他の人の視点を意識しながら、見やすさに気を配って記述する必要がある。例えば、自分で記述したコードであっても、しばらくたってから読み返してみると理解に時間がかかった経験は誰にもあるはず。「3 日前に書いたコードは他人のコードと同じ」ということもよく言われる。見やすさを重視することは、他の人のためだけでなく自分のためにもなる。コードを読んでもすぐに理解できないような実装は、再考(リファクタリング)の必要がある。

    +
    +
    +

    2.1.2 ネーミングはわかりやすく

    +

    コーディングでは、様々な変数やメソッドなどにネーミング(名前付け)する必要がある。ネーミングとは、本来、その対象の本質を表すような名前を考える作業である。大変難易度の高い作業だが、一方で適当に行ってもコードの動作は変わらないため、人によっては手を抜きがちとなる。しかし、ネーミングの良し悪しは、コードの可読性に非常に大きな影響を及ぼす。例えば、「C0001」というクラス名があるとする。これでは、何を表すクラスなのかすぐにはわからないだろう。また、「int p = 5000;」という記述があるとする。プログラマに聞くと、変数名 p は価格(Price)の略だと言うのだが、それならば略さずに、「int price = 5000;」としたほうが分かりやすいはずである。「ネーミングはわかりやすく」の背景には、読んで内容が理解できるという意味で、文章のようなプログラミングを行う、という考え方に基づく。

    +
    +
    +

    2.1.3 サンプルを鵜呑みにしない

    +

    サンプルコードを活用すること自体は、著作権等を侵害しなければ問題ない。問題なのは、その内容や背景を理解しないまま、サンプルコードだけを鵜呑みにして、「おまじない」として表面的に適用してしまうことである。コードを「おまじない」ととらえていては、サンプルコードの間違いを気づかないまま適用してしまうこともある。例えば、ストリームのクローズ処理を行っていないサンプルコードであっても、それに気づかずに自分のコードに適用してしまい、後で思わぬ障害を引き起こすという可能性がある。サンプルコードは、そこで説明する内容に絞ったコードが多いため、このような例はよく見られる。また、サンプルコードをそのまま適用した結果、自分が記述すべきコードには必要のないコードが含まれてしまう場合もある。その場合、コードの可読性を下げる原因となる。自分のコードは、自分で深く理解して記述すべきである。

    +
    +
    +

    2.1.4 同じコードは二度書かない

    +

    コードをコピー・ペーストしていませんか?コピー・ペーストしてしまうと、何らかの修正をする際に、全ての個所に同じ修正をする羽目になる。同じコードが現れるようならまとめて一つにし、外に出してコールするような書き方にすべきである。同じコードをまとめる作業は、どちらかといえば、コーディング時よりリファクタリング(ソフトウェアの外部的振る舞いを変更せずに内部構造を改善する作業)で行われることが多い。しかし、コーディング時からできるだけ気をつけておきたいことでもある。

    +
    +
    +

    2.1.5 役割は一つに

    +

    メソッドの役割が明確で、かつ 1 つであれば単体テストが行いやすくなる。つまり、コードの「試験性」が高まる。また、役割が一つであれば、後でコードを変更する際に修正箇所がわかりやすいため、障害修正に要する時間が短くなる。つまり、コードの「保守性」があがることになる。例えば、「チェックをして実行する」機能を実現するために、checkAndDo()メソッドが存在したとする。この場合、このメソッドは check()メソッドと do()メソッドに分割すべきである。なぜなら、checkAndDo()メソッドの check()ロジックに誤りがあった場合、do()メソッドに書かれる内容まで把握する必要が生じるためである。分割してあれば、check()メソッドだけの変更で済む。このことはクラスの設計にもあてはまる。

    +
    +
    +
    +
    +

    3 ネーミング規約

    +
    +

    3.1 全般

    +
      +
    • 大文字・小文字の違いで名前を区別しない。

      +

      良い例:

      +
      private int carNumber;
      +private int trainNumber;
      +

      悪い例:

      +
      private int num;
      +private int Num;
    • +
    +
    +
    +

    3.2 パッケージ

    +
      +
    • パッケージ名はすべて小文字にする
    • +
    • パッケージ名は意味のある名前にする
    • +
    • サブパッケージ名の重複は可能
    • +
    +
    +
    +

    3.3 クラス

    +
      +
    • クラス名は単語の先頭を大文字にする
      +良い例:

      +
      public class Entry {
      +

      悪い例:

      +
      public class entry {
    • +
    • インターフェース名、Enum 名、Record 名はクラス名に準ずる

    • +
    +
    +
    +

    3.4 メソッド

    +
      +
    • コンストラクタと同じ名前のメソッドはつくらない

    • +
    • メソッド名は区切りのみ大文字にする
      +良い例:

      +
      public String getName() {
      +    //・・・
      +}
      +

      悪い例:

      +
      public String getname() {
      +    //・・・
      +}
      +public String GETNAME() {
      +    //・・・
      +}
    • +
    • 変換メソッド名は「“to”+オブジェクト名」にする
      +良い例:

      +
      public String toString() {
      +

      悪い例:

      +
      public String string() {
    • +
    • ゲッターメソッド名は「“get”+属性名」にする
      +型がbooleanの場合は「“is”+属性名」にする

    • +
    • セッターメソッド名は「“set”+属性名」にする

    • +
    • boolean変数を返すメソッド名はtrue/falseの状態がわかるようにする

      +

      良い例:

      +
      public boolean isAsleep() {
      +}
      +public boolean exists() {
      +}
      +public boolean hasExpired() {
      +}
    • +
    +
    +
    +

    3.5 引数

    +
      +
    • メソッドのパラメータ名とインスタンス変数名を一緒にしない
      +ただし、アクセサメソッドやコンストラクタなど、統合開発環境の機能により自動生成するものに関しては可とする。
      +アンダースコア _ をつけての区別は原則禁止とする。

      +

      良い例:

      +
      public double calc(double rate) {
      +    return this.value * rate;
      +}
      +

      悪い例:

      +
      public double calc(double value) {
      +    return this.value * value;
      +}
      +
      +public double calc(double _value) {
      +    return this.value * _value;
      +}
    • +
    +
    +
    +

    3.6 変数全般

    +
      +
    • boolean変数はtrue/false の状態がわかるようにする

      +

      良い例:

      +
      private boolean isOpen;
      +

      悪い例:

      +
      private boolean flag;
    • +
    • 定数は全てstatic finalとし、すべて大文字、区切りは“_

      +

      良い例:

      +
      private static final String SYSTEM_NAME = "販売管理システム";
    • +
    • 変数名は小文字とし、単語の区切りのみ大文字にする

      +

      良い例:

      +
      private String thisIsString;
      +

      変数名に固有名詞が含まれる場合、先頭をのぞき、単語の区切り以外に大文字を使用してもよい

      +

      良い例:

      +
      private String thisIsIPAddress;
    • +
    +
    +
    +

    3.7 ローカル変数

    +
      +
    • スコープが狭い変数名は省略した名前でもよい
      +良い例:

      +
      if (・・・) {
      +    String s = "・・・・";
      +   //変数sを利用した処理 数行
      +}
      +

      悪い例:

      +
      String s = "・・・・";
      +if (・・・) {
      +   //変数sを利用した処理
      +}
      +・・・
      +if (・・・) {
      +   //変数sを利用した処理
      +}
      +

      変数sの利用範囲が広いので役割が明確になる変数名に変更する。

    • +
    • for 文のループカウンタは、ネストごとに“i”,“j”,“k”・・・を使う

    • +
    +
    +
    +

    3.8 Enum

    +
      +
    • Enum 名はクラス名と同じく、単語の先頭を大文字にする

    • +
    • 列挙定数は定数と同じく、すべて大文字、区切りは“_

      +

      良い例:

      +
      enum Season {
      +    WINTER,
      +    SPRING,
      +    SUMMER,
      +    FALL
      +}
      +

      悪い例:

      +
      enum Season {
      +    winter,
      +    spring,
      +    summer,
      +    fall
      +}
    • +
    +
    +
    +
    +

    4 コーディング規約

    +
    +

    4.1 全般

    +
      +
    • 原則としてオブジェクトの参照にはインターフェースを利用する
      +オブジェクトを参照する際は、そのオブジェクトの実装クラスを用いて宣言できるが、実装クラスに適切なインターフェースが存在している場合は、必ずインターフェースを用いて宣言すること。

      +

      良い例:

      +
      List<Entry> list = new ArrayList<>();
      +Map<String, String> map = new HashMap<>();
      +

      悪い例:

      +
      ArrayList<Entry> list = new ArrayList<>();
      +HashMap<String, String> map = new HashMap<>();
    • +
    • 推奨されない API を使用しない
      +アノテーション@Deprecatedで指定されたメソッドは利用しないこと。

    • +
    • 使われないコードは書かない

    • +
    • 宣言は適切な権限で行うこと(public, protected, private

    • +
    • final を適切に利用する
      +継承されないクラス、オーバーライドされないメソッド、値の変わらない変数(つまり定数)等、変化のないもの/変化させたくないものについてはfinal で宣言する。

      +

      良い例:

      +
      //継承されないクラス
      +public final class CalculateUtils {
      +    //・・・
      +}
      +
      +//値の変わらない変数(定数)
      +private static final String MESSAGE = "・・・";
      +
      +//オーバーライドされないメソッド
      +public final int sum(/*変化させたくない値*/final int... values) {
      +    int sumValue = 0;
      +    for (/*変化させたくない値*/final int value : values) {
      +        sumValue += value;
      +    }
      +    return sumValue;
      +}
    • +
    +
    +
    +

    4.2 フォーマット

    +
      +
    • インデントは空白文字 4 文字分の Tab を使用する

    • +
    • 長すぎる行は避ける

    • +
    • { の後にステートメントを記述しない
      +良い例:

      +
      if (s == null) {
      +    return 0;
      +}
      +

      悪い例:

      +
      if (s == null) {return 0;}
    • +
    • 1 行に 2 つ以上のステートメントを記述しない
      +悪い例:

      +
      } catch (Exception e) {
      +    log.error("Error", e);return null;
      +}
    • +
    • カンマの後には空白文字を
      +良い例:

      +
      process(x, y, z);
      +

      悪い例:

      +
      process(x,y,z);
    • +
    • 代入演算子( = , += , -= , …)の前後には空白文字を挿入する
      +良い例:

      +
      int a = x;
      +a += 10;
      +

      悪い例:

      +
      int a=x;
      +a+= 10;
    • +
    • for 文内のセミコロンの後には空白文字を挿入する
      +良い例:

      +
      for (int i = 0; i < array.length; i++) {
      +    //・・・
      +}
      +

      悪い例:

      +
      for (int i = 0;i < array.length ;i++) {
      +    //・・・
      +}
    • +
    • ++-- とオペランドの間には空白文字を入れない
      +良い例:

      +
      i++;
      +

      悪い例:

      +
      i ++;
    • +
    • ビット演算子( |&^<<>> )の前後には空白文字を挿入する

    • +
    • 論理演算子( ||&&)の前後には空白文字を挿入する

    • +
    • 関係演算子( <>>=<===!= )の前後には空白文字を挿入する

    • +
    • 算術演算子( /% )の前後には空白文字を挿入する

    • +
    • return 文ではカッコを使わない
      +良い例:

      +
      int answer = (a + b + c) * d;
      +return answer;
      +

      悪い例:

      +
      return ((a + b + c) * d);
    • +
    • if などの条件式で boolean の変数を比較しない

      +

      良い例:

      +
      if (hasStock)
      +

      悪い例:

      +
      if (hasStock == true)
    • +
    • 不等号の向きは左向き( <<= )にする
      +良い例:

      +
      if (from <= x && x <= to) {
      +

      悪い例:

      +
      if (x >= from && x <= to) {
    • +
    +
    +
    +

    4.3 コメント

    +
      +
    • ファイルの先頭への Copyright の表記について
      +ソースのファイルヘッダにコピーライト標記は法的拘束力がないため、不要とする。
      +ただし、顧客からの要求があった場合を除く。

    • +
    • Javadoc コメントには、少なくとも author と version(クラス)、param と return と exception(メソッド)を記述する

      +
        +
      • 今後もバージョンアップのリリースが予定されているソースでは、上記に加えて since(バージョン)を記述する
      • +
      • @Overrideのあるメソッドでは、上記に加えて{@Inherit}を記述する
      • +
    • +
    • Javadoc  クラスヘッダコメントのフォーマットは以下の通り

      +

      良い例:

      +
      /**
      + * Action(or Bean)クラス メニュー名称
      + *
      + * @author 姓 名
      + * @version バージョン YYYY/MM/DD 説明
      + */
    • +
    • コメントは必要なものだけを簡潔に
      +悪い例:

      +
      /**
      + * 文字列に変換
      + */
      +@Override
      +public String toString() {
      +
      +/**
      + * コピー
      + *
      + * @return コピーしたインスタンス
      + */
      +public Entry copy() {
    • +
    • 不要なコメントは記載しない

      +
        +
      • コードからすぐわかること・冗長なコメント
      • +
      • 名前の説明
        +コメントではなくわかりやすい名前を付ける。
      • +
      • 別システムで管理している内容
        +ソースコード管理システム、バグトラッキングシステムで管理している内容はソースコードにコメントで記載する必要はない。 +
          +
        • コメントアウトされたコード
          +ソースコード管理システムで管理されている
        • +
      • +
    • +
    +
    +
    +

    4.4 インポート

    +
      +
    • java.langパッケージはインポートしない

      +

      悪い例:

      +
      import java.lang.String;//必要のない記述
    • +
    • 原則として static インポートしない
      +JUnit の作成やフレームワークとして static インポートが推奨されるような場合は利用してもよい

    • +
    • 原則としてオンデマンドのインポート宣言(type-import-on-demand declaration)(アスタリスク*によるインポート) は行わない

      +

      悪い例:

      +
      import java.util.*;
    • +
    +
    +
    +

    4.5 コンストラクタ

    +
      +
    • public 宣言していないクラスにはpublic権限のコンストラクタを作らない
      +良い例:

      +
      class Entry {
      +    //・・・
      +    Entry(int id) {
      +        //・・・
      +    }
      +

      悪い例:

      +
      class Entry {
      +    //・・・
      +    public Entry(int id) {
      +        //・・・
      +    }
    • +
    • インスタンスメンバを持たない(static メンバのみの)クラスは、private権限のコンストラクタを作成する

    • +
    +
    +
    +

    4.6 メソッド

    +
      +
    • オーバーライドさせたくないメソッドはfinalを利用する

    • +
    • 戻り値が配列のメソッドで、戻る配列のサイズが 0 の場合、メソッドを使用するクライアントの余計な null チェックのロジックを回避するため、null ではなく長さゼロの配列を戻すようにする。 良い例:

      +
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return ArrayUtils.EMPTY_STRING_ARRAY;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return Collections.emptyList();
      +    }
      +    return List.of(s);
      +}
      +

      悪い例:

      +
      public String[] toArray(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return new String[] { s };
      +}
      +
      +public List<String> toList(String s) {
      +    if (s == null || s.isEmpty()) {
      +        return null;
      +    }
      +    return List.of(s);
      +}
    • +
    • メソッドは 1 つの役割にする

    • +
    +
    +
    +

    4.7 クラスメソッド

    +
      +
    • クラスメソッドを利用するときは、クラス名を使って呼び出す
      +良い例:

      +
      int comp = Integer.compare(x, y);
      +

      悪い例:

      +
      Integer a = //
      +int comp = a.compare(x, y);
    • +
    +
    +
    +

    4.8 変数全般

    +
      +
    • 1 つのステートメントには 1 つの変数宣言
      +良い例:

      +
      /** 科目コード */
      +private String code;
      +/** 科目名 */
      +private String name;
      +/** 科目略名 */
      +private String shortName;
      +

      悪い例:

      +
      private String code, name, shortName;
    • +
    • リテラルは使用しない
      +リテラルとは、コード中に、表現が定数として直接現れており、記号やリストで表現することができないものを指す(数値、文字列両方含む 通称マジックナンバー)。コードの可読性・保守性の低下を防ぐために、リテラル定数(static final フィールド)を使用すること。
      +例外:-1,0,1 等をカウント値としてループ処理等で使用するような場合

      +

      良い例:

      +
      private static final double ONE_MILE_METRE = 1609.344;
      +
      +public double mileToMetre(double mi) {
      +    return mi * ONE_MILE_METRE;
      +}
      +

      悪い例:

      +
      public double mileToMetre(double mi) {
      +    return mi * 1609.344;
      +}
      +
        +
      • リテラル定数の名前はその値の意味を正しく表現したものにする

        +

        悪い例:

        +
        private static final int ZERO = 0;
      • +
    • +
    • 配列宣言は「型名[]」にする

      +

      良い例:

      +
      private int[] sampleArray = new int[10];
      +

      悪い例:

      +
      private int sampleArray[] = new int[10];
    • +
    • できるだけローカル変数を利用する
      +ローカル変数で事足りるものをインスタンス変数として利用するなど、必要のないインスタンス変数を定義すると、パフォーマンスや可読性の低下やの大きな要因となる上、マルチスレッドを意識した際に不整合がおきる可能性があるので、インスタンス変数は必要性を充分に考慮してから使用すること。

    • +
    • 定数はfinalで宣言する

    • +
    • ローカル変数とインスタンス変数を使いわける

    • +
    +
    +
    +

    4.9 定数

    +
      +
    • public で宣言するクラス変数とインスタンス変数は、定数のみとし、 static final で定義する
      +final ではない static な定数は作成しない。

      +

      良い例:

      +
      public static final String PROTOCOL_HTTP = "http";
    • +
    • 定数( static フィールド)に、 static ではないメソッドから書き込まない

    • +
    • 定数は、プリミティブ型もしくは、不変(Immutable)オブジェクトで参照する

      +
        +
      • 不変Listの生成にはList.of()を利用する

        +

        良い例:

        +
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);
        +

        悪い例:

        +
        public static final List<Integer> VALUES = Arrays.asList(1, 2, 3, 4, 5);
      • +
      • 不変Setの生成にはSet.of()を利用する

      • +
      • 不変Mapの生成にはMap.of()を利用する

        +

        良い例:

        +
        public static final Map<Integer, String> VALUES_MAP = Map.of(1, "A", 2, "B", 3, "C");
        +

        悪い例:

        +
        public static final Map<Integer, String> VALUES_MAP = new HashMap<>() {
        +    {
        +        put(1, "A");
        +        put(2, "B");
        +        put(3, "C");
        +    }
        +};
      • +
      • 不変な配列インスタンスは長さ 0 の配列以外は生成不可能なため、外部から参照される(public)定数では利用せず、List等への置き換えをすること

        +

        良い例:

        +
        public static final List<Integer> VALUES = List.of(1, 2, 3, 4, 5);
        +

        悪い例:

        +
        public static final int[] VALUES = { 1, 2, 3, 4, 5 };
      • +
    • +
    +
    +
    +

    4.10 インスタンス変数

    +
      +
    • インスタンス変数はprivateにする

      +

      良い例:

      +
      public class Employee {
      +    private long id;
      +
      +    //・・・
      +    //getter/setter
      +}
      +

      悪い例:

      +
      public class Employee {
      +    public long id;
      +
      +    //・・・
      +    //getter/setter
      +}
    • +
    +
    +
    +

    4.11 クラス変数

    +
      +
    • public static final 宣言した配列を利用しない
      +※「定数」を参照

    • +
    • クラス変数にはクラス名を使用してアクセスすること

      +

      良い例:

      +
      BigDecimal b = BigDecimal.ZERO;
      +

      悪い例:

      +
      BigDecimal a = //
      +BigDecimal b = a.ZERO;
      +


    • +
    +
    +
    +

    4.12 ローカル変数

    +
      +
    • ローカル変数は利用する直前で宣言する
      +行間の程度にもよるが、ある程度まとめて宣言するのは OK とする。

      +

      良い例:

      +
      for (int i = 0; i < lines.length; i++) {
      +    String line = lines[i];
      +    //lineの処理
      +}
      +

      悪い例:

      +
      String line;
      +for (int i = 0; i < lines.length; i++) {
      +    line = lines[i];
      +    //lineの処理
      +}
    • +
    • ローカル変数は安易に再利用しない
      +一度宣言したローカル変数を、複数の目的で安易に使いまわさないこと。ローカル変数は、役割ごとに新しいものを宣言して初期化することにより、コードの可読性・保守性の向上、及びコンパイラの最適化の促進をはかる。

    • +
    +
    +
    +

    4.13 引数

    +
      +
    • メソッド引数への代入は行わない
      +原則としてfinalで宣言する。

      +

      良い例:

      +
      public void add(final int value) {
      +    //・・・
      +}
    • +
    +
    +
    +

    4.14 継承

    +
      +
    • スーパークラスのインスタンス変数をサブクラスでオーバーライドしない
      +スーパークラスと同じ名前のフィールドをサブクラスで宣言しないこと。 同じ名前のフィールドを宣言すると、スーパークラスのフィールドはサブクラスで宣言されたフィールドによって隠ぺいされてしまうので、他の人の混乱を招くことを防ぐため重複する名前は付けないこと。

      +

      悪い例:

      +
      public class Abs {
      +    protected String name;
      +}
      +
      +public class Sub extends Abs {
      +    protected String name;//Abs#nameは隠ぺいされる
      +}
    • +
    • スーパークラスのメソッドをオーバーライドするときは@Override アノテーションを指定する。

      +

      良い例:

      +
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    @Override
      +    protected void process() {
      +
      +    }
      +}
      +

      悪い例:

      +
      public class Abs {
      +    protected void process() {
      +
      +    }
      +}
      +
      +public class Sub extends Abs {
      +    //@Overrideアノテーションの指定がない
      +    protected void process() {
      +
      +    }
      +}
    • +
    • スーパークラスで private 宣言されているメソッドと同じ名前のメソッドをサブクラスで定義しない
      +スーパークラスにある private メソッドと同じ名前のメソッドをサブクラスで定義しないこと。private メソッドはオーバーライドされず全く別のメソッドとして扱われ、他の人の混乱を招き、バグにつながる恐れがある。

    • +
    +
    +
    +

    4.15 インナークラス

    +
      +
    • 原則としてインナークラスは利用しない
      +一つの java ファイルに複数のクラスを記載するのは NG とする。また無名クラスを利用するのも原則として NG とする。
      +Enum の定数固有メソッド実装(constant-specific method implementation)、Java8 のラムダ式は内部的にインナークラスとされるがこれらは許可する。
    • +
    +
    +
    +

    4.16 メンバー順序

    +
      +
    • 以下の順で記述する

      +
        +
      1. static フィールド
      2. +
      3. static イニシャライザー
      4. +
      5. static メソッド
      6. +
      7. フィールド
      8. +
      9. イニシャライザー
      10. +
      11. コンストラクター
      12. +
      13. メソッド
      14. +
    • +
    • 同一カテゴリー内では以下の可視性の順で記述する

      +
        +
      1. public
      2. +
      3. protected
      4. +
      5. パッケージ private
      6. +
      7. private
      8. +
    • +
    +
    +
    +

    4.17 インスタンス

    +
      +
    • オブジェクト同士はequals()メソッドで比較する

      +

      良い例:

      +
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}
      +

      悪い例:

      +
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}
      +

      ただし Enum の場合は==演算子を利用して比較する

      +

      equals()メソッドで比較する際、左辺のオブジェクトが null にならないように制御すること。

    • +
    • Class 名を利用した比較をおこなわない

      +

      良い例:

      +
      if (o instanceof Foo f) {
      +    // ...
      +}
      +

      悪い例:

      +
      if ("my.Foo".equals(o.getClass().getName())) {
      +    Foo f = (Foo)o;
      +    // ...
      +}
    • +
    • インスタンスの型キャスト(Class キャスト)が必要な場合はパターンマッチングを使用する

      +

      良い例:

      +
      if (o instanceof String s) {
      +    // ...
      +}
      +
      +var str = (o instanceof BigDecimal b) ? b.toPlainString() : String.valueOf(o);
      +
      +var empty = o == null ||
      +  (o instanceof String s && s.isEmpty()) ||
      +  (o instanceof Collection c && c.isEmpty());
      +

      悪い例:

      +
      if (o instanceof String) {
      +    String s = (String)o;
      +    // ...
      +}
      +
      +var str = (o instanceof BigDecimal) ? ((BigDecimal)o).toPlainString() : String.valueOf(o);
      +
      +var empty = o == null ||
      +  (o instanceof String && ((String)o).isEmpty()) ||
      +  (o instanceof Collection && ((Collection)o).isEmpty());
    • +
    +
    +
    +

    4.18 制御構造

    +
      +
    • 制御文( if , else , while , for , do while )の { } は省略しない

      +

      良い例:

      +
      if (s == null) {
      +    return;
      +}
      +

      悪い例:

      +
      if (s == null)
      +    return;
    • +
    • ステートメントが無い {} ブロックを利用しない
      +悪い例:

      +
      //{}内の記述が無い
      +if (s == null) {
      +}
    • +
    • if / while の条件式で = は利用しない
      +良い例:

      +
      boolean a =//
      +if (!a) {
      +    //・・・
      +}
      +

      悪い例:

      +
      boolean a =//
      +if (a = false) {//コーディングミス
      +    //・・・
      +}
      +
      +
      +boolean a =//
      +boolean b =//
      +if (a = b) {//おそらくコーディングミス
      +    //・・・
      +}
    • +
    • forwhile の使い分けを意識する

    • +
    • for 文を利用した繰り返し処理中でループ変数の値を変更しない
      +悪い例:

      +
      String[] array = { /*・・・*/ };
      +for (int i = 0; i < array.length; i++) {
      +    //・・・
      +    i += 2;//NG
      +}
      +
      +for (String s : array) {
      +    //・・・
      +    s = "string";//NG
      +}
    • +
    • for 文のカウンタは特別な事情がない限り、0 から始める

    • +
    • 配列やリストなどの全要素に対するループ処理は拡張 for 文を使用する。
      +良い例:

      +
      for (int value : array) {
      +    //・・・
      +}
      +
      +for (String value : list) {
      +    //・・・
      +}
    • +
    • 配列をコピーするときはArrays.copyOf()メソッドを利用する

      +

      良い例:

      +
      int[] newArray = Arrays.copyOf(array, array.length);
      +

      悪い例:

      +
      int[] newArray = new int[array.length];
      +System.arraycopy(array, 0, newArray, 0, array.length);
    • +
    • 繰り返し処理中のオブジェクトの生成は最小限にする

    • +
    • if 文と else 文の繰り返しや switch 文の利用はなるべく避け、オブジェクト指向の手法を利用する
      +良い例:

      +
      CodingKind codingKind = toCodingKind(kind);
      +d = codingKind.encode(s);
      +
      +//---
      +
      +CodingKind codingKind = toCodingKind(kind);
      +s = codingKind.decode(d);
      +

      悪い例:

      +
      switch (kind) {
      +case 1 ->
      +    d = encode1(s);
      +case 2 ->
      +    d = encode2(s);
      +}
      +
      +//---
      +
      +switch (kind) {
      +case 1 ->
      +    s = decode1(d);
      +case 2 ->
      +    s = decode2(d);
      +}
    • +
    • 繰り返し処理の内部で try ブロックを利用しない
      +特に理由がない場合は繰り返し処理の外にtryブロックを記載する。
      +ただし、繰り返し処理内部で例外をキャッチし処理を行いたい場合は繰り返し処理の内部でtryブロックを利用してもよい。

      +

      良い例:

      +
      for (String s : array) {
      +    BigDecimal num;
      +    try {
      +        num = new BigDecimal(s);
      +    } catch (NumberFormatException e) {
      +        num = BigDecimal.ZERO;
      +    }
      +    //・・・
      +}
    • +
    +
    +
    +

    4.19 文字列操作

    +
      +
    • 文字列同士が同じ値かを比較するときは、equals()メソッドを利用する
      +良い例:

      +
      String s1 = "text";
      +String s2 = "text";
      +if (s1.equals(s2)) {
      +    //・・・
      +}
      +

      悪い例:

      +
      String s1 = "text";
      +String s2 = "text";
      +if (s1 == s2) {
      +    //・・・
      +}
    • +
    • 文字列リテラルはnew しない
      +良い例:

      +
      String s = "";
      +

      悪い例:

      +
      String s = new String();
    • +
    • 更新される文字列にはStringBuilder クラスを利用する
      +良い例:

      +
      StringBuilder builder = new StringBuilder();
      +for (String s : array) {
      +    builder.append(s);
      +}
      +System.out.println(builder.toString());
      +

      悪い例:

      +
      String string = "";
      +for (String s : array) {
      +    string += s;
      +}
      +System.out.println(string);
      +


      スレッドセーフ性が保証されていない箇所ではStringBufferクラスを利用する

      +

      ※パフォーマンスについても記載しているので参考にしてください

    • +
    • 1ステートメントのみで行われる文字列の連結には+演算子を利用する

      +

      良い例:

      +
      String s = s1 + s2;
      +
      +return s1 + s2 + s3 + s4 + s5;
      +

      悪い例:

      +
      String s = new StringBuilder(s1).append(s2).toString();
      +
      +return new StringBuilder(s1).append(s2).append(s3).append(s4).append(s5).toString();
    • +
    • 更新されない文字列にはString クラスを利用する

    • +
    • 文字列リテラルと定数を比較するときは、文字列リテラルのequals()メソッドを利用する
      +良い例:

      +
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (PROTOCOL_HTTP.equals(url.getProtocol())) {
      +
      +}
      +

      悪い例:

      +
      private static final String PROTOCOL_HTTP = "http";
      +
      +if (url.getProtocol().equals(PROTOCOL_HTTP)) {
      +
      +}
    • +
    • プリミティブ型とString オブジェクトの変換には、変換用のメソッドを利用する
      +良い例:

      +
      int i = 1000;
      +String s = String.valueOf(i);// "1000"
      +s = NumberFormat.getNumberInstance().format(i);// 3桁区切り "1,000"
      +
      +boolean b = true;
      +s = String.valueOf(b);// true/false
      +s = BooleanUtils.toStringOnOff(b);// on/off
    • +
    • 文字列の中に、ある文字が含まれているか調べるには、contains()メソッドを利用する

    • +
    • システム依存記号( \n\r など)は使用しない。
      +悪い例:

      +
      String text = Arrays.stream(array)
      +    .collect(Collectors.joining("\n"));
    • +
    +
    +
    +

    4.20 数値

    +
      +
    • 誤差の無い計算をするときは、BigDecimal クラスを使う
      +浮動小数点演算は科学技術計算に利用するもので、誤差が発生する。これに対して、クラス「BigDecimal」は、文字列で数値の計算を行うので、金額などの正確な計算に適している。BigDecimal ではインスタンス生成時に指定された桁数での精度が保証される。

    • +
    • 数値の比較は精度に気をつける
      +良い例:

      +
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +if (a.compareTo(b) == 0) {
      +    System.out.println("一致");
      +}
      +

      悪い例:

      +
      BigDecimal a = new BigDecimal("1");
      +BigDecimal b = new BigDecimal("1.0");
      +
      +if (a.equals(b)) {
      +    System.out.println("精度が違うためこの分岐には入らない");
      +}
    • +
    • 低精度なプリミティブ型にキャストしない

    • +
    • BigDecimalString変換する際はtoString()ではなくtoPlainString()を利用すること
      +toString()を利用した場合、指数表記になることがあります。

    • +
    +
    +
    +

    4.21 日付

    +
      +
    • 日付の文字列のフォーマットには、SimpleDateFormatまたはDateTimeFormatterを使う
      +良い例:

      +
      Date date = new Date();
      +SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
      +String s = dateFormat.format(date);
    • +
    +
    +
    +

    4.22 三項演算子

    +
      +
    • 入れ子の三項演算子の利用は禁止
      +可読性が悪くなるので三項演算子を入れ子で行うのは禁止。
    • +
    +
    +
    +

    4.23 switch 式

    +
      +
    • 一つの値を変数に代入するための if-else 文は代わりに switch 式の使用を推奨する
      +switch 式の値を使用することで変数を不変(実質的 final)にでき、代入箇所が分散することによる可読性の低下を防げます。

      +

      良い例:

      +
      var value = switch (op) {
      +    case "add" -> a + b;
      +    default -> a - b;
      +};
      +

      悪い例:

      +
      int value;
      +if (op.equals("add")) {
      +    value = a + b;
      +} else {
      +    value = a - b;
      +}
    • +
    • case 句はなるべく一つの式での記述を推奨する
      +複雑な式や複雑なステートメントを記述しなければならない場合は、メソッドに分割することを検討してください。

    • +
    • switch 式は、コーディングミスによるフォールスルーを避けるため、常にアロー構文を使用する
      +https://docs.oracle.com/javase/jp/16/language/switch-expressions.htmlからの引用:

      +
      +

      ノート:case L ->ラベルの使用をお薦めします。case L:ラベルの使用時は、break文またはyield文の挿入を忘れがちです。これを忘れると、コード内で思いがけないフォール・スルーが発生する場合があります。 case L ->ラベルで、複数の文または式でないコード、あるいはthrow文を指定するには、それらをブロック内に囲みます。caseラベルが生成する値をyield文で指定します。

      +
      +

      良い例:

      +
      var date = LocalDate.now();
      +var off = switch (date.getDayOfWeek()) {
      +    case MONDAY -> {
      +        if (myCalendar.isOff(date) || localCalendar.isHoliday(date)) {
      +            yield true;
      +        }
      +        yield localCalendar.isHoliday(date.minusDays(1));
      +    }
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY ->
      +        myCalendar.isOff(date) || localCalendar.isHoliday(date);
      +    case SUNDAY, SATURDAY -> true;
      +};
      +

      悪い例:

      +
      var date = LocalDate.now();
      +var off = switch (date.getDayOfWeek()) {
      +    case MONDAY:
      +        if (myCalendar.isOff(date) || localCalendar.isHoliday(date)) {
      +            yield true;
      +        }
      +        yield localCalendar.isHoliday(date.minusDays(1));
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY:
      +        yield myCalendar.isOff(date) || localCalendar.isHoliday(date);
      +    case SUNDAY, SATURDAY:
      +        yield true;
      +};
    • +
    • アロー構文の、中カッコ、yieldを省略できる場合は必ず省略する
      +良い例:

      +
      var day = DayOfWeek.SUNDAY;
      +var shortDay = switch (day) {
      +    case MONDAY -> "M";
      +    case WEDNESDAY -> "W";
      +    case FRIDAY -> "F";
      +    case TUESDAY, THURSDAY -> "T";
      +    case SUNDAY, SATURDAY -> "S";
      +};
      +

      悪い例:

      +
      var day = DayOfWeek.SUNDAY;
      +var shortDay = switch (day) {
      +    case MONDAY -> {
      +        yield "M";
      +    }
      +    case WEDNESDAY -> {
      +        yield "W";
      +    }
      +    case FRIDAY -> {
      +        yield "F";
      +    }
      +    case TUESDAY, THURSDAY -> {
      +        yield "T";
      +    }
      +    case SUNDAY, SATURDAY -> {
      +        yield "S";
      +    }
      +};
    • +
    • Enum 値の switch 式で case 句が全ての Enum 値をカバーする場合は default 句はデッドコードとなるため記述しない
      +良い例:

      +
      var day = DayOfWeek.SUNDAY;
      +var off = switch (day) {
      +    case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> false;
      +    case SUNDAY, SATURDAY -> true;
      +};
      +
      +var day = DayOfWeek.SUNDAY;
      +var off = switch (day) {
      +    case SUNDAY, SATURDAY -> true;
      +    default -> false;
      +};
      +

      悪い例:

      +
      var day = DayOfWeek.SUNDAY;
      +var off = switch (day) {
      +    case MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> false;
      +    case SUNDAY, SATURDAY -> true;
      +    default -> false;
      +};
    • +
    +
    +
    +

    4.24 switch 文

    +
      +
    • 代わりに switch 式が使用できる箇所は switch 式を使用する

      +
        +
      • case 句でreturnを記述する場合は switch 文を使用して良い
      • +
    • +
    • case 句はなるべく 1 行のステートメントでの記述を推奨する
      +複雑なステートメントを記述しなければならない場合は、メソッドに分割することを検討してください。

    • +
    • switch 文は、コーディングミスによるフォールスルーを避けるため、なるべくアロー構文を使用することを推奨する
      +https://docs.oracle.com/javase/jp/16/language/switch-expressions.htmlからの引用:

      +
      +

      ノート:case L ->ラベルの使用をお薦めします。case L:ラベルの使用時は、break文またはyield文の挿入を忘れがちです。これを忘れると、コード内で思いがけないフォール・スルーが発生する場合があります。 case L ->ラベルで、複数の文または式でないコード、あるいはthrow文を指定するには、それらをブロック内に囲みます。caseラベルが生成する値をyield文で指定します。

      +
      +

      良い例:

      +
      var date = LocalDate.now();
      +switch (date.getDayOfWeek()) {
      +    case MONDAY -> {
      +        if (
      +            !myCalendar.isOff(date) && !localCalendar.isHoliday(date) &&
      +            !localCalendar.isHoliday(date.minusDays(1))
      +        ) {
      +            work();
      +        }
      +    }
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY -> {
      +        if (!myCalendar.isOff(date) && !localCalendar.isHoliday(date)) {
      +            work();
      +        }
      +    }
      +}
      +

      悪い例:

      +
      var date = LocalDate.now();
      +switch (date.getDayOfWeek()) {
      +    case MONDAY:
      +        if (
      +            !myCalendar.isOff(date) && !localCalendar.isHoliday(date) &&
      +            !localCalendar.isHoliday(date.minusDays(1))
      +        ) {
      +            work();
      +        }
      +        break;
      +    case TUESDAY, WEDNESDAY, THURSDAY, FRIDAY:
      +        if (!myCalendar.isOff(date) && !localCalendar.isHoliday(date)) {
      +            work();
      +        }
      +        break;
      +}
    • +
    • アロー構文を使用しない(コロンを使用する)場合、複数の値をマッチさせるときの case 句はカンマを使用して列挙する
      +良い例:

      +
      var day = DayOfWeek.SUNDAY;
      +boolean off = false;
      +switch (day) {
      +    case SUNDAY, SATURDAY:
      +      off = true;
      +      break;
      +};
      +

      悪い例:

      +
      var day = DayOfWeek.SUNDAY;
      +boolean off = false;
      +switch (day) {
      +    case SUNDAY:
      +    case SATURDAY:
      +      off = true;
      +      break;
      +};
    • +
    +
    +
    +

    4.25 コレクション

    +
      +
    • Java2 以降のコレクションクラスを利用する
      +Vector クラス、Hashtable クラス、Enumeration 等は、特にこれらを利用する理由がなければ、インターフェースを統一する目的で、これらの代わりにList(ArrayList クラス)、Map(HashMap クラス)、Iterator を使用すること。List などのインターフェースを利用することで JDK1.2 で整理されたわかりやすいメソッドを利用でき、また、インターフェースの特性から呼び出し元を変更せずに実装クラスを変更することができる。

    • +
    • 特定の型のオブジェクトだけを受け入れるコレクションクラスを利用する

      +

      良い例:

      +
      List<Map<String, String>> list = new ArrayList<>();
    • +
    • ListのソートはList.sort()を利用する
      +Listクラスの要素をソートする際は Java8 で追加されたList.sort()を利用すること。
      +Java 7 以前で利用されていたCollections.sort()は利用しないこと。

    • +
    • Collection.forEach()は利用しない。拡張 for 文の利用を検討する
      +Java8 で追加されたメソッド。
      +拡張 for 文を利用したほうが多くの場合でデバッグに有利であり、可読性においてもforEachの優位性は少ないため、forEachは原則利用しない。拡張 for 文を利用する。
      +具体的には下記のメソッドを利用しないこと。

      +
        +
      • Collection#forEach
      • +
      • Set#forEach
      • +
      • List#forEach
      • +
      +

      Map#forEachはこの限りではない

      +

      良い例:

      +
      for (String s : List.of("A", "B")) {
      +    //処理
      +}
      +

      悪い例:

      +
      List.of("A", "B").forEach(s -> {
      +    //処理
      +});
      +

      ただし、メソッド参照で処理できる場合はforEachを利用する。
      +(デバッグのデメリットがほとんどなく、他と比較して処理効率が良いため)

      +

      良い例:

      +
      List.of("A", "B").forEach(this::process);
      +

      悪い例:

      +
      for (String s : List.of("A", "B")) {
      +    this.process(s);
      +}
    • +
    • Arrays.asList()は利用せず、List.of()を利用する
      +Java9 で追加されたメソッド。
      +配列をListに置き換える場合や、単純な固定のListを生成する際にはList.of()を利用する。

      +
        +
      • Arrays.asList()List.of()の違い
        +List.of()で生成したListは、完全に不変(Immutable)なListで、
        +Arrays.asList()で生成したListは、サイズのみ不変で、set等による値の操作が可能なListです。
        +また、setを行った場合、Arrays.asList()に与えられた配列インスタンスにも影響します。
      • +
    • +
    +
    +
    +

    4.26 ラムダ式・メソッド参照・コンストラクタ参照

    +
      +
    • ラムダ式が利用できる箇所はラムダ式を利用してよい
      +※パフォーマンスについても記載しているので参考にしてください

    • +
    • ただし、メソッド参照・コンストラクタ参照が利用できる場合はメソッド参照・コンストラクタ参照を利用する

      +

      良い例:

      +
      String::compareToIgnoreCase
      +

      悪い例:

      +
      (s1, s2) -> s1.compareToIgnoreCase(s2)
      +

      良い例:

      +
      BigDecimal::add
      +

      悪い例:

      +
      (b1, b2) -> b1.add(b2)
    • +
    • ラムダ式記述の際、型宣言は省略記法で記述する

      +

      良い例:

      +
      (s1, s2) -> s1 + "=" + s2
      +

      悪い例:

      +
      (String s1, String s2) -> s1 + "=" + s2
    • +
    • 原則ラムダ式内の行数は 1 行とする
      +複数行で利用したい場合は、privateメソッドを作成しメソッド参照を利用する

      +

      良い例:

      +
      this::getMax
      +
      +private int getMax(int i1, int i2) {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}
      +

      悪い例:

      +
      (i1, i2) -> {
      +    if (i1 > i2) {
      +        return i1;
      +    } else {
      +        return i2;
      +    }
      +}
    • +
    • 原則ラムダ式は 1 行記述に限定するので、中カッコ、returnは必ず省略する

      +

      良い例:

      +
      (s1, s2) -> s1 + "=" + s2
      +

      悪い例:

      +
      (s1, s2) -> {
      +    return s1 + "=" + s2;
      +}
    • +
    +
    +
    +

    4.27 実質的 final(effectively final)

    +
      +
    • 実質的 final を利用する
      +変数宣言にfinalを記載しなくてよい。
    • +
    +
    +
    +

    4.28 Stream API

    +
      +
    • 利用してよい
      +※パフォーマンスについても記載しているので参考にしてください

    • +
    • 並列ストリームは利用しないこと
      +悪い例:

      +
      Stream<?> s = list.parallelStream();
      +Stream<?> s = list.stream().parallel();
    • +
    • StreamAPI 記述の際の改行位置は、各中間処理・末端処理前のピリオドの前で改行する

      +

      良い例:

      +
      List<Character> alphabetLower = list.stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .toList();
      +

      悪い例:

      +
      List<Character> alphabetLower = list.stream().filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase).toList();
      +
      +List<Character> alphabetLower = list
      +    .stream()
      +    .filter(Character::isAlphabetic)
      +    .map(Character::toLowerCase)
      +    .toList();
    • +
    • インデントは統合開発環境の提供するフォーマッタに合わせる

    • +
    • 中間処理の数は 3 つ(3 行)程度までを推奨する
      +中間処理の記述が多くなると可読性も悪くなり、デバッグも難しくなるため、3 行程度を目安にロジックを検討すること。

    • +
    • コメントは、原則として処理中には記載しない
      +難解になってしまった場合のみ処理中の記載を認める

      +

      良い例:

      +
      // クラスFooのフィールドStrの値で昇順にソートし、フィールドStrの要素を取得して処理する。
      +fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    .map(Foo::getStr)
      +    .forEach(this::proc);
      +

      悪い例:

      +
      fooList.stream()
      +    .sorted(Comparator.comparing(Foo::getStr)) //クラスFooのフィールドStrの値で昇順にソート
      +    .map (Foo::getStr) //フィールドStrの要素を取得
      +    .forEach(this::proc); //処理
      +
      +
      +fooList.stream()
      +    //クラスFooのフィールドStrの値で昇順にソート
      +    .sorted(Comparator.comparing(Foo::getStr))
      +    //フィールドStrの要素を取得
      +    .map (Foo::getStr)
      +    //処理
      +    .forEach(this::proc);
    • +
    • Stream は極力変数代入しないこと
      +Stream は中間処理、末端処理を行うと使用済みとなり、以降同じインスタンスは利用できない。
      +変数代入はほとんどの場合意味をなさず、むしろミスの元となるため極力変数代入はしないこと。

      +

      良い例:

      +
      List<String> list1 = Stream.of("A", "B", "C")
      +        .map(String::toLowerCase)
      +        .toList();
      +
      +List<String> list2 = Stream.of("A", "B", "C")
      +        .map(s -> s + s)
      +        .toList();
      +

      悪い例:

      +
      Stream<String> stream = Stream.of("A", "B", "C");
      +Stream<String> stream1 = stream.map(String::toLowerCase);
      +List<String> list1 = stream1.toList();
      +
      +Stream<String> stream2 = stream.map(s -> s + s);//コーディングミス streamは使用済のためエラーになる
      +List<String> list2 = stream2.toList();
    • +
    +
    +
    +

    4.29 Optional

    +
      +
    • Optional は同メソッド内で値を取り出す場合は極力変数代入しないこと
      +Optional とその値の変数は同じものを示す名前となり、同じ意味の変数名が複数現れることで可読性が下がるため、Optional の変数代入は行わないこととする。

      +

      良い例:

      +
      Employee employee = findEmployee(employeeId)
      +        .orElseThrow(IllegalArgumentException::new);
      +

      悪い例:

      +
      Optional<Employee> employeeOpt = findEmployee(employeeId);
      +Employee employee = employeeOpt.orElseThrow(IllegalArgumentException::new);
      +


      直接、値を取り出すことなくOptionalでのみ扱う場合はOptionalを変数代入してもよい。

      +

      良い例:

      +
      Optional<Employee> employee = findEmployee(employeeId);
      +
      +Dept dept = employee.map(Employee::getDivision)
      +        .map(Division::getDept)
      +        .orElse(null);
      +
      +Role role = employee.map(Employee::getRole)
      +        .orElse(null);
      +
      +//-----
      +
      +Optional<Employee> employee = findEmployee(employeeId);
      +//・・・処理
      +return employee;
    • +
    +
    +
    +

    4.30 var (Local-Variable Type Inference)

    +

    次のリンクも参考にしてください。
    +Style Guidelines for Local Variable Type Inference in Java

    +
      +
    • 明確な方針で、利用する・利用しないを統一すること
      +方針無く、varを混在させるとソースコードの見通しと保守性が悪くなります。
      +各プロジェクトで、例えば以下ののような方針で統一してください。

      +
        +
      1. varを利用しない
      2. +
      3. 原則varを利用する
      4. +
      5. 右辺で、明確に型がわかる場合はvarを利用する
      6. +
      +

      以下で23について例を示します。

      +
        +
      • 原則varを利用する

        +

        利用できる箇所は全てvarを利用します。

        +

        良い例:

        +
        var a = "";
        +var b = 123;
        +var c = new ArrayList<String>();
        +

        悪い例:

        +
        var a = "";
        +int b = 123;
        +List<String> c = new ArrayList<>();
        +
        void methodA() {
        +    var a = "";
        +}
        +void methodB() {
        +    String a = "";
        +}
      • +
      • 右辺で、明確に型がわかる場合はvarを利用する

        +

        右辺をみて型がわかる場合は、全てvarを利用します。 それ以外はvarを利用してはいけません。

        +

        良い例:

        +
        var s = ""; // リテラルによって型が明確に判断できます
        +var list1 = new ArrayList<String>(); // newによって型が明確に判断できます
        +var list2 = (List<String>) map.get("p"); // キャストによって型が明確に判断できます
        +var list3 = List.of("A", "B", "C"); // ファクトリーによって型が明確に判断できます
        +

        プロジェクトで観点を決めるべき例:

        +
        var b1 = s.isEmpty(); // `is`で始まるメソッドは通例としてbooleanを返します
        +var b2 = Objects.equals(s1, s2); // `equals`メソッドは通例としてbooleanを返します
        +var i1 = Objects.hash(s); // `hash`、`hashCode`メソッドは通例としてintを返します
        +var i2 = Objects.compare(s1, s2); // `compare`、`compareTo`メソッドは通例としてintを返します
        +

        悪い例:

        +
        var a = e.getData(); // `e`の型と、メソッド定義がわからなければ型が判断できません
      • +
    • +
    +
    +
    +

    4.31 レコード

    +
      +
    • 明確な方針で、利用する・利用しないを統一すること
      +方針無く、recordとクラスと JavaBeans 形式のクラスや Lombok の @Data の使用を混在させるとソースコードの見通しと保守性が悪くなります。
      +各プロジェクトで、recordを利用しないか、recordの使用しても良い箇所について方針を決めた上で使用するようにしてください。 また、recordは JavaBeans とは互換性がないため使用している各種ライブラリの対応状況にも注意する必要があります。

      +

      方針例: クラス内で処理する一時的なデータを表現するためだけにrecordを使用しても良い。

      +
      // parentId と id をキーとして、重複を排除した uniqueItems を作成します。
      +record Key(int parentId, int id) {
      +}
      +var map = new HashMap<Key, Item>();
      +for (Item item : items) {
      +  var key = new Key(item.getParenId(), item.getId());
      +  map.putIfAbsent(key, item);
      +}
      +var uniqueItems = map.values();
    • +
    • 次の記述スタイルを標準とする
      +ただし、フォーマッタを導入している場合はフォーマッタに合わせます。

      +

      良い例:

      +
      /**
      + * 矩形を表すクラス
      + *
      + * @param x      矩形の左上隅の x 座標
      + * @param y      矩形の左上隅の y 座標
      + * @param width  矩形の幅
      + * @param height 矩形の高さ
      + */
      +public record Rect(
      +    /* 矩形の左上隅の x 座標 */
      +    double x,
      +    /* 矩形の左上隅の y 座標 */
      +    double y,
      +    /* 矩形の幅 */
      +    double width,
      +    /* 矩形の高さ */
      +    double height) {
      +}
      +

      次にポイントを説明します。

      +
        +
      • {の後、}の前に改行する

      • +
      • レコードコンポーネント(パラメータ)のカンマの後に改行することを推奨する
        +レコードコンポーネントが少なく、レコードコンポーネント名からでも意味が理解でき、改行がなくても可読性が低下しない場合は、改行を必要としません。
        +改行を推奨する理由は以下です。

        +
          +
        • アノテーションを付与したときでも比較的読みやすい(アノテーション引数との混在による可読性の低下の回避)
        • +
        • レコードコンポーネントが多い場合も比較的読みやすい
        • +
      • +
      • レコードコンポーネントが多い場合、レコードコンポーネントへ直接コメントをつけることを検討する
        +レコードコンポーネントの JavaDoc としては@param形式でレコード名の上部に記述しますが、このソースコードをテキストとしてみた場合、レコードコンポーネントの定義と@paramの説明とで距離が空いてしまう場合があり、型と説明を読むのに時間がかかってしまう可能性があります。
        +また、使用する IDE によっては、アクセサから宣言へのジャンプを使用すると、レコードコンポーネント(パラメータ)の定義へジャンプするものがあります。レコードコンポーネントにコメントがあればすぐに説明を読むことができますが、JavaDoc しか記述しない場合は、ファイル上部へ移動して対応するレコードコンポーネントの説明を探さなければなりません。

        +
        public record Rect(
        +    /* 矩形の左上隅の x 座標 */
        +    double x,
        +    /* 矩形の左上隅の y 座標 */
        +    double y,
        +    /* 矩形の幅 */
        +    double width,
        +    /* 矩形の高さ */
        +    double height) {
        +}
      • +
    • +
    • レコードのアクセサを上書きしない

      +

      悪い例:

      +
      public record Rect(
      +    double x,
      +    double y,
      +    double width,
      +    double height) {
      +
      +    public double x() {
      +        return x;
      +    }
      +}
    • +
    +
    +
    +

    4.32 テキストブロック

    +

    次のリンクも参考にしてください。
    +Programmer’s Guide To Text Blocks > Style Guidelines For Text Blocks

    +
      +
    • 複数行の文字列を定義する際、文字列連結よりもテキストブロックを使用する

      +

      良い例:

      +
      String message = """
      +        複数行の文字列はテキストブロックを使用しましょう。
      +        文字列連結と違い、プラス記号や改行コードのエスケープシーケンスのような無駄を排除でき、
      +        より読みやすいソースコードで書くことができます。
      +        """;
      +

      悪い例:

      +
      String message =
      +        "複数行の文字列はテキストブロックを使用しましょう。\n" +
      +        "文字列連結と違い、プラス記号や改行コードのエスケープシーケンスのような無駄を排除でき、\n" +
      +        "より読みやすいソースコードで書くことができます。\n";
    • +
    • 単一行の文字列を定義する際、テキストブロックは使用せず文字列リテラルを使用する
      +ただし、二重引用符(")のエスケープを避ける目的ではテキストブロックを使用しても良い。

      +

      良い例:

      +
      String singleLine = "単一行の文字列です。";
      +
      +String message = """
      +        テキストブロックでは単一の二重引用符「"」にエスケープを使用する必要がありません。""";
      +

      悪い例:

      +
      String singleLine = """
      +        単一行の文字列です。""";
    • +
    • テキストブロック内では基本的に改行コードのエスケープシーケンス(\n)を使用しないが、読みやすさ向上の目的で改行コードのエスケープシーケンス(\n)を使用しても良い

      +

      良い例:

      +
      String multiLine = """
      +        複数行の、
      +        文字列です。
      +        """;
      +
      +String csv = """
      +        名前,説明,MIMEタイプ
      +        CSV,"Comma-Separated Valuesの略\nCharacter-Separated Valuesの意味で使用されることもある","text/csv"
      +        TSV,"Tab-Separated Valuesの略","text/tab-separated-values"
      +        """;
      +

      悪い例:

      +
      String multiLine = """
      +        複数行の、\n文字列です。
      +        """;
    • +
    • テキストブロックで定義した文字列を処理する場合は、テキストブロックをローカル変数やフィールドへ代入してから使用することを推奨する

      +

      良い例:

      +
      String selectX = """
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_X
      +        """;
      +String selectY = """
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_Y
      +        """;
      +processValues(fetch(selectX, Entity1.class), fetch(selectY, Entity2.class));
      +

      悪い例:

      +
      processValues(fetch("""
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_X
      +        """, Entity1.class), fetch("""
      +        SELECT
      +            ID,
      +            NAME
      +        FROM
      +            TABLE_Y
      +        """, Entity2.class));
      +

      複雑な処理に直接テキストブロックを使用すると可読性を下げる可能性があります。

    • +
    • 3 つ以上続く二重引用符(")をエスケープする際は、最初の二重引用符にエスケープシーケンスを使用する

      +

      良い例:

      +
      String javaCode = """
      +        String message = \"""
      +                テキストブロックです。
      +                \""";
      +        System.out.println(message);
      +        """;
      +

      悪い例:

      +
      String javaCode = """
      +        String message = \"\"\"
      +                テキストブロックです。
      +                \"\"\";
      +        System.out.println(message);
      +        """;
      +
      +String javaCode = """
      +        String message = ""\"
      +                テキストブロックです。
      +                ""\";
      +        System.out.println(message);
      +        """;
    • +
    • テキストブロックの開始引用符(""")は前の行の右端に記述する

      +

      良い例:

      +
      String message = """
      +        テキストブロックです。
      +        """;
      +

      悪い例:

      +
      String message =
      +        """
      +        テキストブロックです。
      +        """;
    • +
    • テキストブロックのインデントは開始引用符(""")に合わせる必要はない

      +

      良い例:

      +
      String message = """
      +        テキストブロックです。
      +        """;
      +

      悪い例:

      +
      String message = """
      +                 テキストブロックです。
      +                 """;
      +

      一見すると、読みやすく見えるかもしれませんが、変数名の変更によって簡単に崩れてしまい、修正するために多くの行の変更を強制することになるため、メンテナンス性が低下します。

    • +
    • テキストブロックで定義する文字列のインデントは基本的に周辺の Java コードに合わせてインデントする
      +ただし、横に長い文字列などの可読性向上の目的で左端に揃えるのは良い。

      +

      良い例:

      +
      public class Foo {
      +    public void process() {
      +        String message = """
      +                テキストブロックです。
      +                """;
      +    }
      +}
      +

      悪い例:

      +
      public class Foo {
      +    public void process() {
      +        String message = """
      +    テキストブロックです。
      +    """;
      +    }
      +}
      +

      良い例:

      +
      public class Foo {
      +    public void process() {
      +        if (foo) {
      +            String message = """
      +それはもう長い長いテキストブロックのためインデントするとエディタ上でテキストを見るためには横スクロールが必要になるかもしれません。
      +""";
      +        }
      +    }
      +}
      +

      悪い例:

      +
      public class Foo {
      +    public void process() {
      +        if (foo) {
      +            String message = """
      +                    それはもう長い長いテキストブロックのためインデントするとエディタ上でテキストを見るためには横スクロールが必要になるかもしれません。
      +                    """;
      +        }
      +    }
      +}
    • +
    • テキストブロックのインデントにスペース文字とタブ文字を混在させない

    • +
    • 文字列の最後に改行コードを入れずに、意図的にインデントした文字列を定義するとき終了引用符(""")の前の行の右端に\を使用する

      +

      良い例:

      +
      String text = """
      +            ABC
      +            DEF
      +            GHI\
      +        """;
      +

      悪い例:

      +
      String text = """
      +        ABC
      +        DEF
      +        GHI""".indent(4);
    • +
    +
    +
    +

    4.33 ストリーム(InputStream OutputStream)

    +
      +
    • ストリームを扱う API を利用するときは、try-with-resources 文で後処理をする

      +

      良い例:

      +
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • +
    • ObjectOutputStream ではreset()を利用する

    • +
    +
    +
    +

    4.34 リソースの解放

    +
      +
    • リソース解放を必要とするクラスを利用するときは、try-with-resources 文で後処理をする

      +

      良い例:

      +
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //inputStreamに対する処理を記載
      +}
    • +
    • リソース解放を必要とするクラスを作成する場合はAutoCloseableimplementsする
      +AutoCloseableimplementsすることで try-with-resources 文が利用できるようになります。

    • +
    +
    +
    +

    4.35 例外

    +
      +
    • catch 文で受け取る例外は、詳細な例外クラスで受け取る

      +

      良い例:

      +
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (IOException e) {
      +    log.error("Error", e);
      +    throw e;
      +}
      +

      悪い例:

      +
      try (InputStream inputStream = Files.newInputStream(Paths.get("foo.txt")) {
      +    //・・・
      +} catch (Exception e) {//範囲が広すぎる例外クラスの利用はNG
      +    log.error("Error", e);
      +    throw e;
      +}
    • +
    • Exception クラスのオブジェクトを生成してスローしない

    • +
    • catch ブロックでは基本、例外処理をする。ただし処理を書いてはいけない部分もあるので、その部分については、“// ignore” というコメントを記述すること。

    • +
    • 例外クラスは無駄に定義しない

    • +
    +
    +
    +

    4.36 ガベージコレクション

    +
      +
    • 原則finalize()のオーバーライド実装は禁止
    • +
    • もしfinalize()をオーバーライドした場合はsuper.finalize() を呼び出す
    • +
    • アプリケーションからfinalize()を呼び出さない
    • +
    +
    +
    +
    +

    5 コメント規約

    +
    +

    5.1 よいコメントの鉄則

    +
      +
    • コードを明確化するコメントを書く
      +コードにコメントを書く理由は、自分自身、一緒に仕事をしている人、後に関わる開発者にとってコードをより理解しやすいものにするためである。

    • +
    • コメント化する価値がないプログラムならば、実行するに値しない
      +有用な格言。コメントは必須。

    • +
    • 過剰な装飾は使わない (例:見出し状のコメント)
      +1960 年代から 1970 年代の典型的な COBOL プログラマにはアスタリスク( * )でコメントを囲った箱を書く習慣があった。彼らの芸術的な主張を表わしているのかもしれないが、率直に言えばそれは製品に加わるちょっとした価値に比べれば大きな時間の無駄である。かわいいコードではなくきれいなコードを書くはずである。さらに、コードを表示するディスプレイや印刷するプリントに使われるフォントはプロポーショナルだったりそうでなかったりして、箱をきれいに整列させることは難しい。

    • +
    • コメントはシンプルに
      +かつて見たもっとも最良のコメントは、シンプルな要点をまとめた注釈であった。なにも本を書く必要はなく、他の人がコードを理解するに十分な情報を提供するだけでよいのである。

    • +
    • コードを書く前に先にコメントを記述する
      +コードをコメント化する最良の方法は、コードを書く前にコメントを書くことである。それが、コードを書く前にコードがどのように動作するかについて考えるよい機会となり、コメントの存在を保障することにもつながる。少なくともコードを書いた時にコメントすべきである。コメントによってコードが理解しやすくなることで、コードの開発中にアドバンテージを得ることができる。コードにコメントを書く時間を費やせば、それによって得られるものがある。

    • +
    • コメントには、なぜそうなのかを書く。コードを読めば分かることを書かない
      +基本的に、コードの一部分を見ればそれが何かを理解することはできる。例えば、以下のコードを見て、$1000 以上の注文については 5%ディスカウントされることは理解できる。なぜそうなのか?大きな注文ではディスカウントがつきものだというビジネスルールがあるのだろうか?大きな注文に時間限定サービスがあるのか、それともずっとサービスがあるのか?これを書いたプログラマの気前がよかったのか?
      +どこかソースコード中か別な文書にコメントされていない限り、それがなぜなのかを知ることはできない。

      +
      if (grandTotal >= 1000.00) {
      +    grandTotal = grandTotal * 0.95;
      +}
      +

      なお、メソッドコメントには、適切な javadoc コメント(タグ)のほかに、以下の内容も可能な限り明記すること。

      +
        +
      • 副作用のある処理の場合は、その内容 (→ メソッドの引数オブジェクトがメソッド内で変更されるケースなど)
      • +
      • 既知のバグ (→ 判明しているが修正しないことにした場合など)
      • +
      • 影響のある事前条件、事後条件 (→ メソッドが正しく動作するための前提について)
      • +
      • 並行性 (→  マルチスレッドでアクセスされた場合の動作について)
      • +
      • 該当メソッドの使用例やサンプルコード
      • +
    • +
    • TODO コメント
      +設計者確認待ち、共通処理の作成待ちなどの理由により、実装時に TODO がある場合、下記のようにコメントを記述する。
      +(Eclipse の TODO コメント形式を採用)
      +例)

      +
      //TODO:ワークフローの仕様決定待ち 関連チケット#12345
    • +
    +
    +
    +

    5.2 Java コメント(3 種類)の使い分け

    +

    Java では 3 種類のコメントが使える。javadoc コメントは/**で開始され、*/で終わる。C 風コメントは/*で開始され*/で終わる。単一行コメントは//で開始され、そのソースコード行が終わるまで続く。以下の表ではコメントの使い方とその例を示す。(コメントのスタイルに関しては、前述の「標準規約に準拠したコーディング例」を参照)

    + +++++ + + + + + + + + + + + + + + + + + + + + + + + + +
    コメント種類使用方法
    javadoc コメント
    /** comment */
    interface、class、メソッド、フィールドの直前に書く。コメントは javadoc によって処理され、外部ドキュメント(HTML)として生成される。(この形式以外のコメントはドキュメントとして出力されないことに注意)/*
    顧客(Customer)-
    _ 顧客はわれわれがサービスまたは製品を売った人物
    _ もしくは組織のいずれかである。
    _ @author 開発太郎
    _/
    C 風コメント
    /* comment */
    特定のコードを無効化したいが、後で使用するかもしれないので残しておくためにコメント化する時や、デバッグ時に一時的に無効化するときに使用する。/_
    このコードは J.T.Kirk によって 1997.12.9 に前述のコードと置き換えたためコメント化した。2 年間不要であるならば削除せよ。
    … (ソースコード)
    _/
    単一行コメント
    // comment
    メソッド内にて、ビジネスロジック、コードの概要、一時変数の定義内容などを記述する。// 1995 年 2 月に開始された X 氏の寛大なキャンペーンで
    // 定められた通り 1000$を超える請求には、全て 5%割引を
    // 適用する。
    +

    ※ ロジック中に、頻繁に C 風コメントでコメントを書くとまとめてコメントアウトする場合に不便なため、基本的にロジック中では単一行コメントを利用すること。

    +
    +
    +
    +

    6 パフォーマンス

    +

    パフォーマンスを考慮した Java のコーディングについて以下に示す。

    +

    ※ パフォーマンスは jre のバージョンやスペックによって変化します。本内容は jre1.8.0_74 での検証結果を元にした内容です。

    +

    ※ 性能計測結果についての記載がありますが、あくまでも参考値です。性能を保証するものではありません。

    +

    +
    +

    6.1 Stream API

    +

    Java8 で追加された Stream API での記述は、可読性も高く、簡潔に書けますが、パフォーマンス・性能面で注意が必要な場合があります。

    +

    List の処理を行う際、拡張 for 文で処理する場合は Iterator インスタンスが 1 つだけ生成されますが、Stream API で処理する場合、最初の Stream インスタンスに加え、各中間処理ごとにも Stream インスタンスが生成され、その分の性能劣化が懸念されます。
    +以下に処理例と計測結果を記載します。

    +
      +
    • 拡張 for 文

      +
      List<String> list = //数値文字列のList
      +List<String> resultList = new ArrayList<>();
      +for (String string : list) {
      +    if (string.endsWith("0")) {
      +        resultList.add(string);
      +    }
      +}
      +return resultList;
    • +
    • Stream API

      +
      List<String> list = //数値文字列のList
      +List<String> resultList = list.stream()
      +    .filter(s -> s.endsWith("0"))
      +    .toList();
      +return resultList;
    • +
    • 計測結果

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      処理する List の件数拡張 for 文 (ms)StreamAPI (ms)
      100 万件79
      1,000 万件88114
      1 億件9491,026
      2 億件1,8222,081
    • +
    +

    小中規模の処理量であれば考慮するほどの性能差はありませんが、大量の処理が見込まれる場合は考慮が必要です。
    +また、Stream API は並列処理(スレッド処理)の機能をサポートしていますので、利用できる場合は並列処理も含めての検証が必要です。

    +

    +
    +
    +

    6.2 ラムダ式・メソッド参照・コンストラクタ参照

    +

    Java8 で追加されたラムダ式・メソッド参照・コンストラクタ参照は、匿名クラスを利用するよりも効率的です。
    +積極的な利用を推奨します。

    +

    以下に Comparator を生成した場合の計測結果を記載します。

    +
      +
    • 匿名クラス

      +
      Comparator<String> c = new Comparator<String>() {
      +    @Override
      +    public int compare(String o1, String o2) {
      +        return o1.compareToIgnoreCase(o2);
      +    }
      +};
    • +
    • ラムダ式

      +
      Comparator<String> c = (o1, o2) -> o1.compareToIgnoreCase(o2);
    • +
    • メソッド参照

      +
      Comparator<String> c = String::compareToIgnoreCase;
    • +
    • 計測結果

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      処理件数匿名クラス (ms)ラムダ式 (ms)メソッド参照 (ms)
      10 億回3800(計測不能)0(計測不能)
      100 億回6,3740(計測不能)0(計測不能)
      1 京回(30 秒以上)1410
    • +
    +

    ラムダ式は外部の変数を利用する場合、匿名クラスとほぼ同じ動作をします。

    +
      +
    • 匿名クラス

      +
      new Comparator<String>() {
      +        @Override
      +        public int compare(String o1, String o2) {
      +            return arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                            : o1.compareToIgnoreCase(o2);
      +        }
      +    }
    • +
    • ラムダ式

      +
      Comparator<String> c = (o1, o2) -> arg.equals("DESC") ? o2.compareToIgnoreCase(o1)
      +                                    : o1.compareToIgnoreCase(o2);
    • +
    • 計測結果

      + + + + + + + + + + + + + + + + + + + + +
      処理件数匿名クラス (ms)ラムダ式 (ms)
      10 億回(パラメータあり)571572
      100 億回(パラメータあり)9,9009,864
    • +
    +
    +
    +

    6.3 文字列連結

    +
    +

    6.3.1 文字列連結(繰り返し)

    +

    文字列連結を繰り返し処理中で行う際、+演算子で処理することはアンチパターンとして知られています。
    +繰り返し処理中の文字列連結は、 StringBuilderStringJoinerStringBuffer を利用します。
    +また、コレクション要素の結合であればString#joinが利用できます。

    +

    以下に処理例と計測結果を記載します。

    +
      +
    • +演算子

      +
      String s = "";
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        s += ",";
      +    }
      +    s += string;
      +}
      +return s;
    • +
    • StringBuilder

      +
      StringBuilder sb = new StringBuilder();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • +
    • StringBuffer

      +
      StringBuffer sb = new StringBuffer();
      +for (int i = 0; i < list.size(); i++) {
      +    String string = list.get(i);
      +    if (i > 0) {
      +        sb.append(",");
      +    }
      +    sb.append(string);
      +}
      +return sb.toString();
    • +
    • String#join

      +
      return String.join(",", list);
    • +
    • 計測結果

      + +++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      処理する List の件数+演算子 (ms)StringBuilder (ms)StringBuffer (ms)String#join (ms)
      1,000 件50(計測不能)0(計測不能)0(計測不能)
      1 万件1,016111
      10 万件(30 秒以上)255
      100 万件(30 秒以上)294251
    • +
    +
    +
    +

    6.3.2 文字列連結(定数)

    +

    基本的に処理中の文字列連結では+演算子は使わないで処理するほうがパフォーマンスが高くなりますが、定数の場合は+演算子で定義するほうがパフォーマンスが高いです。

    +

    たとえば以下のように、処理したい場合、

    +
    private static final String CONST_A = "A";
    +private static final String CONST_B = "B";
    +private static final String CONST_AB = CONST_A + CONST_B;
    +

    StringBuilder で処理しようとすると以下のようになります。

    +
    private static final String CONST_AB = new StringBuilder(CONST_A).append(CONST_B).toString();
    +

    しかし、これらをバイトコード上で確認するとそれぞれ以下のようになります。

    +
      +
    • +演算子

      +
      private static final java.lang.String CONST_AB = "AB";
    • +
    • StringBuilder

      +
      private static final java.lang.String CONST_AB;
      +
      +static {};
      +   0  new java.lang.StringBuilder [20]
      +   3  dup
      +   4  ldc <String "A"> [8]
      +   6  invokespecial java.lang.StringBuilder(java.lang.String) [22]
      +   9  ldc <String "B"> [11]
      +  11  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [26]
      +  14  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [30]
      +  17  putstatic jp.co.packagename.ClassName.CONST_AB : java.lang.String [34]
      +  20  return
    • +
    +

    +演算子を利用した場合コンパイル時に最適化され、文字列"A""B"をあらかじめ結合して class が作成されます。
    +StringBuilderを利用した場合は最適化はされず、記述した通りの処理が行われます。

    +

    計測した場合、下記のようになります。

    +
      +
    • 計測結果

      + + + + + + + + + + + + + + + + + + + + +
      処理回数StringBuilder (ms)+演算子 (ms)
      5,000 万回5590(計測不能)
      1 億回1,0590(計測不能)
    • +
    +

    通常、定数処理を大量に処理することは考えられないので性能問題になることはありませんが、+演算子を利用したほうがパフォーマンスが高いこともあるということを理解してください。

    +
    +
    +
    +

    6.4 List の種類

    +

    ListにはArrayListのようなRandomAccessを implements した、ランダムアクセスをサポートしているクラスと、
    +LinkedListのようなランダムアクセスをサポートしていない(シーケンシャルアクセス)クラスが存在します。
    +RandomAccessではないListは、List#getなどインデックスを利用するような操作のパフォーマンスが低いので注意してください。

    +

    以下に処理例と計測結果を記載します。

    +
      +
    • for 文(List#get(int)によるループ)

      +
      int size = list.size();
      +for (int i = 0; i < size; i++) {
      +    String s = list.get(i);
      +    //処理
      +}
    • +
    • 拡張 for 文

      +
      for (String s : list) {
      +    //処理
      +}
    • +
    • forEach

      +
      list.forEach(this::処理);
    • +
    • 計測結果

      + +++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      処理する List の件数ArrayList
      for 文(List#get(int)によるループ) (ms)
      LinkedList
      for 文(List#get(int)によるループ) (ms)
      ArrayList
      拡張 for 文 (ms)
      LinkedList
      拡張 for 文 (ms)
      ArrayList
      forEach (ms)
      LinkedList
      forEach (ms)
      1 万件0(計測不能)730(計測不能)0(計測不能)0(計測不能)0(計測不能)
      10 万件0(計測不能)7,5760(計測不能)0(計測不能)12
      20 万件0(計測不能)17,7400(計測不能)0(計測不能)0(計測不能)0(計測不能)
      50 万件0(計測不能)(30 秒以上)0(計測不能)20(計測不能)2
      100 万件1(30 秒以上)0(計測不能)40(計測不能)4
      1,000 万件16(30 秒以上)845644
    • +
    +

    ランダムアクセスをサポートしているListがシーケンシャルアクセス(iterator を利用した処理など)で遅いということはないので、
    +ループの処理は拡張 for 文等、Iterator によるループで記述するのが無難です。
    +List#getでの処理をすべて禁止することはできませんが、高いパフォーマンスが求められる場合はListの種類にも注目してみてください。

    +
    +
    +

    6.5 BigDecimal の ZERO との比較

    +

    BigDecimal の正・負・ZERO の判定はBigDecimal#signumを利用します。
    +compareToを利用してBigDecimal.ZEROと比較しても同じことができますが、signumを利用したほうが効率的です。

    +

    以下に処理例と計測結果を記載します。

    +
      +
    • compareTo 利用

      +
      BigDecimal value = new BigDecimal("0.0");
      +if (value.compareTo(BigDecimal.ZERO) == 0) {
    • +
    • signum 利用

      +
      BigDecimal value = new BigDecimal("0.0");
      +if (value.signum() == 0) {
    • +
    • 計測結果

      +

      (単位:マイクロ秒)

      + + + + + + + + + + + + + + + +
      処理回数compareTo 利用 (マイクロ秒)signum 利用 (マイクロ秒)
      1 京回527
      max:26,367
      min:0
      424
      max:21,213
      min:0
    • +
    +

    性能差が少ないので、必ずしも signum を利用する必要はありませんが、大量に処理する場合など、高いパフォーマンスが求められる場合は意識してください。

    +
    +
    +
    +
    +

    7 License

    +

    CC-By-4.0

    +
    + + diff --git a/resources/OpenAPI_Specification_2.0.docx b/resources/OpenAPI_Specification_2.0.docx new file mode 100644 index 00000000..fc77e12d Binary files /dev/null and b/resources/OpenAPI_Specification_2.0.docx differ diff --git a/resources/OpenAPI_Specification_2.0.html b/resources/OpenAPI_Specification_2.0.html new file mode 100644 index 00000000..5bb43d17 --- /dev/null +++ b/resources/OpenAPI_Specification_2.0.html @@ -0,0 +1,1337 @@ + + + + + + + + OpenAPI Specification 2.0規約 + + + + + +
    +

    OpenAPI Specification 2.0規約

    +

    フューチャー株式会社

    +
    + +

    +

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。 ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。 また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    +
    +

    1 はじめに

    +

    OpenAPI Specification 2.0(Swagger, OAS2)定義についてのコーディング規約をまとめます。より新しいバージョンとして OAS 3.0.3 規約(作成中)がありますので、ご注意ください。

    +

    本規約の前提条件に従い作成されています。ToC 向けの LSUDs(Large Set of Unknown Developers)な Web API にはマッチしない可能性があります。

    +

    Web API 自体の設計については範囲外としますが、API 設計標準に利用するステータスコードなどは記載しています。

    +
    +
    +

    2 免責事項

    +

    ::: warning 有志で作成したドキュメントである

    +
      +
    • フューチャーアーキテクトには多様なプロジェクトが存在し、それぞれの状況に合わせた開発手法が採用されている。本規約はフューチャーアーキテクトの全ての部署/プロジェクトで利用されているわけではなく、有志が観点を持ち寄って新たに整理したものである。相容れない部分があればその領域を書き換えて利用することを想定している
    • +
    +

    :::

    +
    +

    2.1 ファイルフォーマット

    +

    ファイルフォーマット規約に準じる。

    +
    +
    +

    2.2 要素規約

    +

    Swagger の基本構造は以下の、swagger・info・host・basePath・schemes・paths・definitions から構成される。

    +

    要素の並び順は、原則 OpenAPI Specification 2.0(Swagger, OAS2) に記載された順番に記載する。

    +
    swagger: "2.0"
    +info:
    +  title: サンプルAPI
    +  description: サンプルAPIはシステムにおけるユーザーのアカウント、契約、支払い、注文履歴などを管理できます
    +  version: 1.0.0
    +host: api.example.com
    +basePath: /v1
    +schemes:
    +  - https
    +consumes:
    +  - application/json
    +produces:
    +  - application/json
    +tags:
    +  - name: user
    +    description: ユーザー
    +paths:
    +  /users/{user_id}/account:
    +    get:
    +      tags:
    +        - user
    +      summary: API-001 ユーザーアカウント取得
    +      description: ユーザーのアカウント情報を取得します
    +      operationId: getUserAccount
    +      parameters:
    +        - name: user_id
    +          in: path
    +          type: string
    +          pattern: ^[0-9a-zA-Z_-]*$
    +          minLength: 4
    +          maxLength: 16
    +          required: true
    +          description: 登録時に設定されたユーザーID
    +      responses:
    +        "200":
    +          description: OK
    +          schema:
    +            $ref: "#/definitions/UserAccount"
    +        "400":
    +          description: パラメータ不正
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "404":
    +          description: リソースが存在しない
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "500":
    +          description: 内部エラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +        default:
    +          description: その他予期せぬエラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +definitions:
    +  UserAccount:
    +    required: [user_id, user_name, account_type, register_at]
    +    properties:
    +      user_id:
    +        type: string
    +        description: ユーザーID
    +        minLength: 4
    +        maxLength: 16
    +        example: 32AB1aaad100eavV
    +      user_name:
    +        type: string
    +        description: ユーザー名
    +        minLength: 1
    +        maxLength: 128
    +        example: 未来太郎
    +      account_type:
    +        type: string
    +        description: アカウント種別(1:ゲスト 2:登録済み 3:プレミアム 4:管理者)
    +        minLength: 1
    +        maxLength: 1
    +        example: "1"
    +      register_at:
    +        type: string
    +        description: 登録日時
    +        format: date-time
    +        example: "2023-04-01T11:30:45.000Z"
    +
    +
    +

    2.3 swagger

    +
      +
    • 2.0 固定とする
    • +
    +
    +
    +

    2.4 info

    +

    info オブジェクトには Web API に関するメタデータを記載する。 title, description, version を必須項目とする。

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    フィールド名必須記載内容
    titleWeb API の総称
    descriptionWeb API の簡単な説明
    versionOpenAPI ドキュメントのバージョン
    termsOfService利用規約の URL
    contact連絡先情報
    licenseライセンス情報
    +
    +

    2.4.1 title

    +

    WebAPI の総称を記載する。システム名やサービス名 + API のような命名とすることを推奨する。 例. X System API

    +
    +
    +

    2.4.2 desctiption

    +

    Web API が提供する機能の概要・想定する利用者やユースケース・制約などを記載する。

    +
    +
    +

    2.4.3 version

    +

    この API 仕様のドキュメントのバージョンを記載する。アプリケーションのバージョン(git tag やリリースで管理するようなバージョン)とは別である。

    +

    本規約の推奨は major.minor 形式である。 0.1固定で開発を進め、サービスのリリース時に 1.0 とし、その後の項目やオプション、パスの追加ごとに 1.1 などインクリメントしていく。もし他チームへのドキュメントの頻繁な共有が必要だれば、1.0 のかわりに 2023.03.26 といった形式も許容する。

    +
    +
    +
    +

    2.5 host

    +

    OpenAPI 3 系と異なり、 Swagger では複数のホストを指定できない。そのため host には開発環境(local, develop, staging, production というステージ区別であれば、develop)で用いる IP、ポート番号を指定する。他チームに提供するサンドボックス環境を用意する場合は、そのエンドポイントを指定しても良い。localhost などのローカル開発への向き先変更は、ツール側で対応している事が多く上書き可能なため記載しない。API 定義書は予期せぬタイミングで他チームに展開する必要がしばしばあり、お試しで触っても良い環境があることを示すことで情報量を増やし、円滑なコミュニケーションを促進することを狙いとする。

    +
    # OK
    +host: dev.api.example.com:80
    +host: sandbox.api.example.com:80
    +
    +# NG(ローカル開発で用いる環境を指定する)
    +host: localhost:8001
    +
    +# NG(LSUDs向けのWeb API開発では不用意に本番環境を触られたくないときが多く、避けるべきである)
    +host: prod.api.example.com:80
    +
    +
    +

    2.6 basePath

    +

    作成する Swagger 定義の URL パスの全てで、共通するプレフィックスを持つ場合に指定する。Swagger の仕様上、先頭には / が必須であるため、以下のように定義する。

    +
    # OK
    +basePath: /v1
    +basePAth: /api/v2
    +
    +# NG
    +basePath: v2
    +
    +
    +

    2.7 schemes

    +

    最終的に利用するスキーマのみを記載する。通常、HTTP 通信での Web API 提供は行わないと考えられるため、 https 固定で設定する。ローカル開発では http を指定することも多いが、ツールで生成されたコードのオプションで通常書き換えが可能なため、http の併記は許可しない。ただし、サーバサイドのマイクロサービス同士の通信で、VPC(プライベートセグメント)内であり、SSL 通信を本当に利用しない場合は http と記載する。

    +
    # OK
    +schemes:
    +  - https
    +
    +# NG(httpの指定は通常、Web APIサーバアプリケーションの開発時を除いて不要であるためわざわざ追加しない)
    +schemes:
    +  - http
    +  - https
    +

    もし、WebSocket スキームを提供するサービスの定義である場合は、wss を(追加で)指定する。定義上は https 側との共存ができないため、ファイル定義を分けるようにする。

    +
    +
    +

    2.8 security, securityDefinitions

    +

    Swagger では、次の認証タイプを記載できる(詳細)。

    +
      +
    1. ベーシック認証
    2. +
    3. API キー(リクエストヘッダ, クエリパラメータ)
    4. +
    5. OAuth2
    6. +
    +

    もし、認証が必須であれば記載する。全ての Web API で未認証を受け入れる場合は記載しない。認証の要否が API ごとに異なる場合は、各 API 側で security: [] と記載しして上書き定義する必要がある。

    +
    # OK
    +securityDefinitions:
    +  OAuth2:
    +    type: oauth2
    +    flow: accessCode
    +    authorizationUrl: https://example.com/authorize
    +    tokenUrl: https://example.com/.well-known/jwks.json
    +
    +# OK(OAuth2認証ありの場合)
    +paths:
    +  /users/{user_id}/account:
    +    get:
    +      ...
    +      security:      # 認証が不要な場合は security: [] と記載する
    +        - OAuth2: []
    +
    +
    +

    2.9 produces

    +

    Web API が応答する際の MIME タイプを指定します。未指定の場合に、コード生成などツール側で予期しない動作をすることがあるため、固定で指定する。新規構築の Web API であれば application/xml は不要と通常は考えられるので、application/json を記載する。また、RFC 7807 Problem Details for HTTP APIs では Content-Type に application/problem+json を設定するとあるが、一部のコード生成ツールにおいて、 application/problemapplication/problem+json の使い分けが難しいため、併記を必須としない。OpenAPI Specification の 3 系ではステータスコードごとに Content-Type を指定できるため、3 系への移行も検討する。

    +
    # OK(applicaton/problem+json 無しでも良い)
    +produces:
    +  - application/json
    +
    +# OK(利用するツールで複数のContent-Typeの使い分けが実現しやすい場合は以下でも良い)
    +produces:
    +  - application/json
    +  - application/problem+json
    +

    ある API のみ、バイナリ(画像データなど)を返すなどのケースがあれば、 paths 配下で上書き指定する。

    +
    paths:
    +  /logo:
    +    get:
    +      summary: API-002 ロゴ画像を取得する
    +      description: サービスのロゴ画像をpng形式で取得します
    +      operationId: getLogoImage
    +      produces:
    +        - image/png
    +      responses:
    +        "200":
    +          description: OK
    +          schema:
    +            type: file
    +
    +
    +

    2.10 consumes

    +

    Web API が要求を受け入れる際の MIME タイプを指定する。未指定の場合に、コード生成などツール側で予期しない動作をすることがあるため、固定で指定する。新規構築の Web API であれば application/xml は不要と通常は考えらえるので、application/json だけ記載する。

    +

    仕様上、 consumes は POST, PUT, PATCH を利用した操作のみに影響し、GET などリクエストボディが無い操作では無視される。

    +
    # OK
    +consumes:
    +  - application/json
    +
    +
    +

    2.11 tags

    +

    タグを用いて、API 操作をグループ化することができる。ドキュメントやツールにとって非常に重要であるため、 必須 で指定する。

    +
      +
    • Swagger UI(HTML ドキュメント)の順序を制御できる +
        +
      • 未指定の場合は、登場順で生成されてしまう
      • +
    • +
    • 命名は、 単数形 で、小文字かつ半角スペース区切り で記載する +
        +
      • コード生成で利用され、Go ではパッケージ名や TypeScript の Class 単位となるため、シンプルな命名にする
      • +
      • HTML ドキュメントで参照する場合の可読性を上げるため、単語を半角スペース区切りとする
      • +
    • +
    • タグごとに description も必須で記載する
    • +
    +
    # NG
    +tags:
    +  - name: product
    +    description: 製品
    +  - name: store
    +    description: 店舗
    +  - name: user account
    +    description: ユーザーアカウント
    +
    +# NG
    +tags:
    +  - name: products
    +  - name: stores
    +  - name: user_account
    +  - name: UserAccount
    +
    +
    +

    2.12 paths

    +

    paths 配下に個々の API エンドポイントを記載する。

    +

    paths は根幹となる定義部分であり、以下のように重要な定義が続く。それぞれ重要な要素ごとに規約を示す。

    +
    Paths              # API定義全体
    +Path           # URLパス
    +Operation    # HTTPメソッド
    +Parameter  # リクエストパラメータ
    +Responses  # レスポンス
    +Response # ステータスコードに応じたレスポンス
    +
    +

    2.12.1 Paths > Path

    +

    記載順は以下のルールである。

    +
      +
    • トップレベルの tags でグルーピングした順番に記載する
    • +
    • URL は短いものから並べる
    • +
    • HTTP メソッドは、 head, get, post, put, patch, delete の順にする
    • +
    +
    # 並び順の例(HTTPメソッドの子要素はtags以外を省略)
    +tags:
    +  - user
    +  - item
    +paths:
    +  /users:
    +    get:
    +      tags:
    +        - user
    +      ...
    +  /users/{user_id}/account:
    +    get:
    +      tags:
    +        - user
    +      ...
    +  /users/{user_id}/account:
    +    patch:
    +      tags:
    +        - user
    +      ...
    +  /items:
    +    get:
    +      tags:
    +        - item
    +      ...
    +
    +
    +

    2.12.2 Paths > Path > Operation

    +

    URL に紐づく HTTP メソッドで、1 つの操作を定義します。

    +
      +
    • summary +
        +
      • API の操作概要を summary に記載する
      • +
      • 機能 ID があるのでれば、ここに記載する
      • +
      • 例: API-001 ユーザアカウント取得
      • +
    • +
    • description +
        +
      • API の振る舞いの詳細や注意点(ある条件で区分の値が変わったり、権限についての注意、要素が空になるなど)を記載する
      • +
    • +
    • operationId +
        +
      • コード生成で利用される項目なので、必須で指定する
      • +
      • 原則、camelCase${HTTPメソッド}${機能物理名} で記載する(例: getUser, postUser, deleteUser) +
          +
        • ただし、HTTP メソッドに紐づかない操作であれば、HTTP メソッドの代わりに個別の動詞(例: searchUser, moveItemList, addPermission)を当てはめる
        • +
        • コード生成対象によっては、get_user(Python)、GetUser(Go)といった命名規約にしたくなるが、通常はコード生成側で配慮してくれる
        • +
      • +
    • +
    • consumes, produces +
        +
      • トップレベルに application/json を記載しているため、同様であれば記載しない
      • +
    • +
    +
    /users:
    +  get:
    +    tags:
    +      - user
    +    summary: API-001 ユーザーアカウント取得
    +    description: |
    +      ユーザーのアカウント情報を取得します。
    +      ログイン情報が不正の場合はアカウントが存在しても404を返すことがあります。
    +      アカウント種別については【別紙】X_定数一覧 を参照ください。
    +    operationId: getUser
    +    parameters: ...
    +    responses: ...
    +
    +
    +

    2.12.3 Paths > Path > Parameter

    +

    リクエストの定義を記載する。

    +
      +
    • name

      +
        +
      • snake_case で物理名を記載します
      • +
      • HTTP メソッドが POST/PUT/HTTP の場合は body に固定する
      • +
    • +
    • in

      +
        +
      • 仕様上、必須で query, header, path, formData, body のどれかを指定する
      • +
      • HTTP メソッドが HEAD/GET/DELETE の場合 +
          +
        • path, query のみの利用を推奨する
        • +
      • +
      • HTTP メソッドが POST/PUT/HTTP の場合 +
          +
        • body のみの利用を推奨する
        • +
      • +
    • +
    • required

      +
        +
      • 必須の場合のみ記載する。デフォルト false であるため、任意項目の場合は記載しない
      • +
      • POST, PUT で用いるリクエストボディに対しては、 required: true を必ず指定する +
          +
        • リクエストボディ自体が未指定だった場合、各項目の required: true を指定していてもサーバサイドのチェックが有効に働かないことがあるため
        • +
      • +
    • +
    • pattern, minLength, maxLength などの条件について

      +
    • +
    • schema

      +
        +
      • リクエストボディは、$ref を用いて、#/definitions 配下に記載する。$ref を用いない記載は許可しない。
      • +
      +
        # OK
      +  - name: body
      +    in: body
      +    required: true
      +    schema:
      +      $ref: "#/definitions/PutUserAccount"
      +
      +  # NG
      +  - name: body
      +    in: body
      +    required: true
      +    type: object
      +    required: [user_name, account_type, register_at, point]
      +    properties:
      +      user_name:
      +        type: string
      +        ...
      +      account_type:
      +        type: string
      +        ...
      +
        +
      • モデル名は、 {HTTPメソッド名}{物理名} の PascalCase で記載する +
          +
        • 例: PutUserAccount、PostUserAccount, PatchUserAccount
        • +
      • +
    • +
    • desription

      +
        +
      • 項目の論理名や補足説明を記載する
      • +
    • +
    +
      /users/{user_id}/account:
    +    get:
    +      ...
    +      parameters:
    +        - name: user_id
    +          in: path
    +          type: string
    +          pattern: ^[0-9a-zA-Z_-]*$
    +          minLength: 4
    +          maxLength: 16
    +          required: true
    +          description: 登録時に設定されたユーザーID
    +      responses:
    +        ...
    +    put:
    +      ...
    +      parameters:
    +        - name: user_id
    +          in: path
    +          type: string
    +          pattern: ^[0-9a-zA-Z_-]*$
    +          minLength: 4
    +          maxLength: 16
    +          required: true
    +          description: 登録時に設定されたユーザーID
    +        - name: body
    +          in: body
    +          required: true
    +          schema:
    +            $ref: "#/definitions/PutUserAccount"
    +      responses:
    +        ...
    +
    +
    +

    2.12.4 Paths > Path > Responses

    +

    レスポンスの定義を記載する。

    +
      +
    • description +
        +
      • 必須で記載する
      • +
    • +
    • ステータスコードは発生し得る全てのパターンを列挙する +
        +
      • 正常系の 200 OK201 Created202 Accepted 204 No Content 以外の、異常系も忘れず記載する
      • +
      • 通常発生しない、サーバサイドの内部的な予期せぬエラー 500 Internal Server Error は必須で記載する
      • +
      • リクエストパラメータが存在する場合は 400 Bad Request が、認証がある場合は 401 Unauthorized403 Forbiddend が考えられる
      • +
      • default は必須で指定する +
          +
        • 例えば、URL 自体が存在しない場合の 404 NotFound や、提供していない HTTP メソッドを呼び出した場合に 405 Method Not Allowed を、自動生成したサーバサイドの実装が返すことがある。この場合、 default を指定していないとフロントエンド側でパースエラーとなることがあるため。各 API エンドポイントのサーバサイド側の実装が応答しないコードは、 default でまとめて指定させる
        • +
      • +
    • +
    +
      /users/{user_id}/account:
    +    get:
    +      ...
    +      parameters:
    +        ...
    +      responses:
    +        "200":
    +          description: OK
    +          schema:
    +            $ref: "#/definitions/Users"
    +        "400":
    +          description: パラメータ不正
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "404":
    +          description: リソースが存在しない
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "500":
    +          description: 内部エラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +        default:
    +          description: その他予期せぬエラー
    +          schema:
    +            $ref: "#/definitions/Error"
    +    post:
    +      ...
    +      parameters:
    +        ...
    +      responses:
    +        "201":
    +          description: 新規登録に成功
    +          schema:
    +            $ref: "#/definitions/UserAccount"
    +        "400":
    +          description: パラメータ不正
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "409":
    +          description: すでに登録済みのユーザーIDを用いている
    +          schema:
    +            $ref: "#/definitions/Error"
    +        "500":
    +          description: Internal Server Error
    +          schema:
    +            $ref: "#/definitions/Error"
    +        default:
    +          description: "その他予期せぬエラー"
    +          schema:
    +            $ref: "#/definitions/Error"
    +
    +
    +
    +

    2.13 definitions

    +
      +
    • モデル名は、PascalCase で記載する

    • +
    • 種別が配列の場合、ネストして定義するのではなく、 $ref を活用する

    • +
    • もし、リソース名が単複同形で type: array と区別できない場合、 List を末尾に付けて区別する

      +
        +
      • そうではない場合は s を付けて表現する
      • +
      +
      # OK
      +- in: query
      +  name: product_types
      +  type: array
      +  description: プロダクト種別
      +
      +# NG
      +- in: query
      +  name: product_type_list # xxx_listはNG
      +  type: array
      +  description: プロダクト種別
    • +
    • リクエストボディ

      +
        +
      • 必須項目は required で項目を全て指定する
      • +
      • その他、項目定義として可能であればできる限り細かく指定する
      • +
    • +
    • レスポンスボディ

      +
        +
      • type, description, exampleが必須。
      • +
      • format, minLength, maxLength などの型桁はできる限り細かく指定する +
          +
        • 多くのクライアントは RDB をデータストアに持ち、それらの型定義の参考にするためである
        • +
      • +
      • enum指定してはならない +
          +
        • 一部のクライアント側のコード生成で、存在しない区分値を指定するとエラーになる(レスポンスを受信できない)。これはサーバサイドで区分値を増やす必要があるケースで、サーバ・クライアントの同期をとる必要があり困難なケースが多い。例えばクライアントがモバイルである場合、サーバサイドで区分値を追加した場合には、全端末でアプリアップデートが必要となリ、事実上 API 互換性がなくなるため、v1 を保持しつつ、区分値を追加した v2 の Path を追加する必要が出てくる
        • +
      • +
      • pattern の指定は不要 +
          +
        • pattern も enum と同様に、サーバサイドが当初よりリクエストのバリデーションを緩めた場合に、古い pattern でクライアントがレスポンスを検証すると動作しなくなるため。クライアントサイドが RDB など書き込み時のスキーマが厳密であったとしても、正規表現レベルの厳格さで書き込みチェックをすることは無いと考えられる
        • +
      • +
      • example の値は、 例えば Prism でサーバのモックとして動かす場合に返される値になるため、できる限り具体的な値にする
      • +
      • 空文字、false, 0 値を返しうる項目に、x-omitempty :false を付与する +
          +
        • ツールの実装によっては、0 値や false を返した場合に JSON フィールドから除外される(omit される)ことがある
        • +
      • +
    • +
    • 日付は 2023-04-02 といった ISO 8601 date フォーマットを推奨する。この場合は fromat: date を指定する

    • +
    • 日時は 2023-04-02T15:04:05+09:00 といった ISO 8601 datetime フォーマットを推奨する。この場合は、 format: date-time を指定する

    • +
    • エラーについて

      +
        +
      • API 全体で一貫したエラーを返すことを推奨とし、そのために "#/definitions/Error" といった共通のエラーモデルを利用を推奨する
      • +
      • RFC 7807 Problem Details for HTTP APIs があるため、レイアウトを参考にする
      • +
    • +
    +
    definitions:
    +  UserAccounts:
    +    type: array
    +    items:
    +      $ref: "#/definitions/UserAccount"
    +  UserAccount:
    +    required: [user_id, user_name, account_type, register_at, point]
    +    properties:
    +      user_id:
    +        type: string
    +        description: ユーザーID
    +        minLength: 4
    +        maxLength: 16
    +        example: 32AB1aaad100eavV
    +      user_name:
    +        type: string
    +        description: ユーザー名
    +        minLength: 1
    +        maxLength: 128
    +        example: 未来太郎
    +      account_type: # enumは指定しないこと
    +        type: string
    +        description: アカウント種別(1:ゲスト 2:登録済み 3:プレミアム 4:管理者)
    +        minLength: 1
    +        maxLength: 1
    +        example: "1"
    +      register_at:
    +        type: string
    +        format: date-time
    +        description: 登録日時
    +        example: "2023-04-01T11:30:45.000Z"
    +      point:
    +        type: integer
    +        format: int64
    +        description: ポイント(0ポイント以上)
    +        exampe: 421
    +  PostUserAccount:
    +    required: [user_id, user_name, account_type, register_at]
    +    properties:
    +      user_id:
    +        type: string
    +        minLength: 4
    +        maxLength: 16
    +        pattern: ^[0-9a-zA-Z_-]*$
    +        description: ユーザーID
    +        example: 32AB1aaad100eavV
    +      user_name:
    +        type: string
    +        minLength: 1
    +        maxLength: 128
    +        description: ユーザー名
    +        example: 未来太郎
    +      account_type:
    +        type: string
    +        minLength: 1
    +        maxLength: 1
    +        enum: ["1", "2", "3", "4"]
    +        description: アカウント種別(1:ゲスト 2:登録済み 3:プレミアム 4:管理者)
    +        example: "1"
    +      register_at:
    +        type: string
    +        format: date-time
    +        description: 登録日時
    +        example: "2023-04-01T11:30:45.000Z"
    +  Error:
    +    description: エラー (RFC 7807)
    +    type: object
    +    required: [title, status, detail]
    +    properties:
    +      title:
    +        type: string
    +        description: タイトル
    +        minLength: 1
    +        maxLength: 64
    +        example: request validation error
    +      status:
    +        type: integer
    +        format: int32
    +        description: HTTPステータスコード
    +        minimum: 400
    +        maximum: 600
    +        exclusiveMaximum: true
    +        example: 503
    +      message_cd:
    +        type: string
    +        description: 状態の切り分けとアクションが一意に特定できるメッセージコード
    +        minLength: 1
    +        maxLength: 16
    +        example: APPERR-0001
    +      detail:
    +        type: string
    +        description: エラーメッセージ詳細
    +        minLength: 1
    +        maxLength: 128
    +        example: user name is too long
    +
    +
    +

    2.14 バリデーションについて

    +

    OpenAPI 定義を記載するにあたり、バリデーションをどこまで厳密に定義すべきかという議論はよく行いがちである。

    +

    リクエストパラメータの各項目に対して、必須・型・桁・区分値・日付・正規表現のチェックが行える。レスポンスで用いるモデルについても同様に設定でき、enum, pattern 以外は API の利用者(クライアント)側の DB 設計などに必要な型桁情報を渡すのに有用であるため、できる限り詳しく指定する。

    +
    +

    2.14.1 必須

    +

    必須パラメータのみ required: true を定義する

    +
    +
    +

    2.14.2 デフォルト値

    +

    パラメータにデフォルト値がある場合はdefault を定義する。

    +
    # ex. enum
    +name: limit
    +type: number
    +format: integer
    +minimum: 1
    +maximum: 100
    +default: 20
    +description: 検索結果の項目数上限(1~100が指定可能)
    +

    【注意】API 公開後に、default 値を変更してはならない(API の互換性が崩れるため)。もし変更する場合は、API のバージョンを上げること。

    +
    +
    +

    2.14.3 型・フォーマット

    +

    型(type)は string(文字列), number(数値), integer(整数値), boolean(真偽値) array(配列), file(ファイル) のうちどれか指定する.

    +

    フォーマット(format) は以下の型の詳細情報を示すもので、可能な限り設定する。

    +
      +
    • integer (整数) +
        +
      • int32, int64
      • +
    • +
    • number (数値) +
        +
      • float, double
      • +
    • +
    • string (バイナリ) +
        +
      • byte: Base64 でエンコードされた文字列
      • +
      • binary: バイト配列
      • +
    • +
    • string (日付) +
        +
      • date: RFC3339 full-date(例: 2023-07-21) +
          +
        • 項目名は _on を接尾辞につけることを推奨とする
        • +
      • +
      • date-time: RFC3339 date-time(例: 2023-07-21T17:32:28Z) +
          +
        • 項目名は _at を接尾辞につけることを推奨とする
        • +
      • +
    • +
    • string (その他) +
        +
      • password: Swagger UI で入力が隠される
      • +
      • その他、 email, uuid など Open API 仕様に存在しない任意のフォーマットを独自のドキュメント生成などのために記載しても良い
      • +
    • +
    +
    +
    +

    2.14.4

    +

    データ型によって、利用できる桁を指定する項目が異なる。可能な限り設定する。

    +
      +
    • 文字列 +
        +
      • 最大桁数:maxLength
      • +
      • 最小桁数:minLength
      • +
    • +
    • 数値または整数値 +
        +
      • 最小値(境界値を含む):minimum
      • +
      • 最大値(境界値を含む):maximum
      • +
      • 境界値を含まない場合のみexclusiveMinimum: trueまたはexclusiveMaximum: trueを定義する。minimum, maximum で代用できる場合は利用しない
      • +
    • +
    • 配列: +
        +
      • 最大要素数:maxItems
      • +
      • 最小要素数:minItems
      • +
      • required: trueの場合は原則としてminItems: 1を定義する
      • +
      • uniqueItems は必須で指定する(通常は一意であるべき)
      • +
    • +
    +

    【注意】API 公開後に、レスポンスの maxLength を以前より大きい値に変更してはならない。レスポンスの maxLength など API 利用者側システムの DB の ERD 定義のインプットになる事が多いため。もし行う場合は API のバージョンを上げることや、連携先に桁数変更の旨を調整するなどの考慮を行う。

    +
    +
    +

    2.14.5 区分値

    +

    区分値の場合は enum 属性を利用し、descriptionには区分値の論理名を記載する。

    +
    name: gender
    +type: string
    +enum: ["0", "1", "2", "9"]
    +description: |
    +  性別
    +    0: 不明
    +    1: 男
    +    2: 女
    +    9: 適用不能
    +
    +
    +

    2.14.6 固定値

    +

    固定値 の場合も enum を 1 つだけ指定して表現する。この場合もレスポンスで利用する場合は指定しない

    +
    name: file_layout
    +type: string
    +enum: ["json"]
    +description: ファイルレイアウト
    +
    +
    +

    2.14.7 その他(正規表現)

    +

    正規表現で表現できる文字列はpatternを利用して定義する。桁や区分値で代替できる場合は、pattern を用いない

    +

    例:

    +
    remind_time:
    +  type: string
    +  description: リマインド時刻。(hh:mm)形式
    +  example: 23:59
    +  pattern: "^(2[0-3]|[01][0-9]):([0-5][0-9])$"
    +
    +
    +
    +

    2.15 ファイルアップロード

    +

    Web API におけるファイルアップロードのよく利用される実装手段は、大きく分けて以下の 3 手法に分類できます

    +
      +
    1. ファイルのコンテンツを Base64 などにエンコードして、JSON の項目として設定し、リクエストボディで送る +
        +
      • メリット: 通常の JSON を扱うのとほぼ変わらないため楽。サムネイルなど限定されたユースケースの場合に向く
      • +
      • デメリット: 巨大なファイルを扱う場合などサーバリソース負荷が懸念。Base64 に変換する分 CPU 負荷は余計にかかる。ペイロードが膨れるためモバイルなどのクライアントでは帯域利用での懸念がある
      • +
    2. +
    3. multipart/form-data ファイルを送信する +
        +
      • メリット: ファイルを Base64 に変換するといった作業が不要
      • +
      • デメリット: ブラウザ以外のクライアントにとって手間がかかる
      • +
    4. +
    5. アップロード用に用いる、オブジェクトストレージの Signed URL を発行し、クライアントから直接ファイルをアップロードしてもらう +
    6. +
    +

    本規約でファイルアップロードについて上記の 3. Signed URL を推奨する。API 呼び出しとしては次のようなフローとする。

    +
    sequenceDiagram
    +participant A as クライアント
    +participant B as Web APIサーバ
    +participant C as オブジェクトストレージ
    +
    +A->>B: ①アップロード先URL取得
    +  B->>C: Signed URL発行
    +  C-->>B: Signed URL
    +  B-->>A: アップロードURL、受付ID(加えて、アップロードで指定したいHTTP Methodや必要なリクエストヘッダーがあれば応答の項目に追加する)
    +
    +A->>C: ②ファイルアップロード
    +
    +A->>B: ③ファイルアップロード完了(受付ID、キー、属性)
    +  B-->>A: 受付完了
    +

    フローの ①、② はアプリケーション固有の紐づけルールにおいて Web API を設計すれば良いため、本規約で YAML の設定例は記載しない。フロー ② については Signed URL を用いたアップロードであり、アプリケーションの Web API 定義を書く必要はない。もし、監査ログなどのガバナンス上、直接オブジェクトストレージへの書き込みを許容されないケースは、B で Signed URL に相当する書き込み先を提供し、B を経由してファイルをアップロードする。

    +

    上記どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    +
    +
    +

    2.16 ファイルダウンロード

    +

    ファイルアップロードと同様、オブジェクトストレージの Signed URL 経由を経由してのダウンロードさせる手法を推奨する。Web API としてはオブジェクトストレージにダウンロード用のファイルを書き込み、クライアントが取得するための Signed URL をレスポンスの JSON 項目に渡す方式である。

    +

    もし、サムネイルやアイコン画像など、ファイル容量がごく小さい場合は Base64 にエンコードして JSON に埋め込んで渡しても良い。線引をどこに設置するかは本規約で定義しない。

    +

    どちらのケースも OpenAPI 定義としてはシンプルであるため、記述例は割愛する。

    +
    +
    +

    2.17 CORS

    +

    CORS(Cross-Origin Resource Sharing)のために、options メソッドの追記は 原則不要 とする。

    +

    理由は以下である。

    +
      +
    • サーバ側 +
        +
      • options メソッド対応は、API 使用ではなく実装レベルの機能横断的な処理(Java における Servlet Filter や Spring の Interceptor、Go における Middleware など)で行うことが大半であり、コード生成が不要
      • +
    • +
    • クライアント側 +
        +
      • options メソッドを用いるのはクライアントがブラウザであり、クライアントのアプリケーションコードが明示的にアクセスしないため、コード生成が不要
      • +
    • +
    • 使用面として +
        +
      • Access-Control-Allow-Origin がどのような値を返すか、呼び出し元によって動的な値を返したい場合があり、記載が困難なケースがある
      • +
    • +
    +

    ただし、Amazon API Gateway のようなサービスを利用する場合は、options メソッドの記載が必須である場合は除く1

    +
    +
    +

    2.18 OpenTelemetry Traceparent HTTP Header

    +

    OpenOpenTelemetry で用いるられるtraceparent のリクエストヘッダーは OpenAPI で 原則不要 とする。

    +

    理由は以下である。

    +
      +
    • OpenTelemetry が定めるヘッダー類は、API 横断的に設定されるべきものであり、ミドルウェアやフレームワーク側などでの一律の制御を推奨するため
    • +
    • 記載することにより、OpenOpenTelemetry に対応していることを明記し開発者に周知できるメリットより、各アプリ開発者が生成されたコードで悩んだり、誤解されることを回避したいため
    • +
    +
    +
    +

    2.19 API のバージョン管理

    +

    Swagger 定義で以下の変更を行う場合は、利用するコード生成の動作によってはクライアントにとって互換性を失う破壊的変更であることがあるため、変更は調整の上で行うか、バージョンを上げることを考える。

    +
      +
    • リクエスト項目 +
        +
      • フィールドの型を変更する
      • +
      • 桁数を小さくする
      • +
      • enum の種類を減らす
      • +
      • 正規表現のチェックを厳しくする
      • +
      • 必須フィールドを後から追加する
      • +
      • デフォルト値を後から変更する
      • +
    • +
    • レスポンス項目 +
        +
      • フィールドの型を変更する
      • +
      • 桁数を大きくする
      • +
      • デフォルト値を後から変更する
      • +
    • +
    +
    +
    +

    2.20 ファイル単位

    +

    TODO v3 の作成タイミングと合わせて追記する

    +
    +
    +
    +

    3 推奨ツール

    +

    本当に使ってよかった OpenAPI (Swagger) ツール にあるように、様々なツールで開発ができる。VS Code を用いる場合は以下のプラグインを推奨する。

    +
      +
    • YAML
    • +
    • Swagger Viewer +
        +
      • Ctrl + Shift + P (Win: Shift + Alt +P ) → Preview Swagger で現在編集中の Swagger プレビューが可能
      • +
    • +
    • spectral-cli
    • +
    +

    editorconfig を用いる場合は、以下の定義を推奨する。

    +

    ```ini .editorconfig root = true

    +

    [*] charset = utf-8 insert_final_newline = true trim_trailing_whitespace = true end_of_line = lf

    +

    [*.{json,yaml}] indent_size = 2 indent_style = space ```

    +
    +
    +
    +

    4 License

    +

    CC-By-4.0

    +
    +
    +
    +
      +
    1. https://docs.aws.amazon.com/ja_jp/apigateway/latest/developerguide/enable-cors-for-resource-using-swagger-importer-tool.html↩︎

    2. +
    +
    + + diff --git "a/resources/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.docx" "b/resources/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.docx" new file mode 100644 index 00000000..668f0f99 Binary files /dev/null and "b/resources/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.docx" differ diff --git "a/resources/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.html" "b/resources/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.html" new file mode 100644 index 00000000..b32124d7 --- /dev/null +++ "b/resources/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210Oracle\357\274\211.html" @@ -0,0 +1,935 @@ + + + + + + + + SQLコーディング規約(Oracle) + + + + + +
    +

    SQLコーディング規約(Oracle)

    +

    Future Enterprise Coding Standards

    +
    + +

    +

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    +ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    +また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    +
    +

    1 はじめに

    +
    +

    1.1 前提条件

    +

    本書は、SQL コーディング規約についてまとめたものである。
    +今回 RDBMS として採用する Oracle での SQL の使用を前提に記述している。

    +
    +
    +
    +

    2 SQL コーティング規約(可読性・管理性)

    +

    本章では可読性・管理性を高めることを目的としたコーディング規約について記載する。

    +
    +

    2.1 書式全般

    +

    書式全般についてのコーディング規約を下記に示す。

    +
      +
    • 1 行につき、1 文のみを記述する。
    • +
    • SQL 中のインデントは、Java コーディング規約にあわせて半角スペースではなくタブ文字とする。
    • +
    • ヘボン式ローマ字を使用する。
    • +
    • 外来語に関しては、原語の綴りを使用する。
    • +
    • 横は 80 文字を目安に改行する。
    • +
    • 定数を条件に用いる場合やインライン・ビューで取得したいデータなど開発者の意図はコメントにて記載する。
    • +
    +
    +
    +

    2.2 予約語

    +

    予約語に対しては、大文字を使用する。(例 : SELECTINSERTUPDATEDELETE 等)

    +
    +
    +

    2.3 予約語以外

    +

    予約語以外に対しても、予約語と同様に大文字を使用する。(例 : オブジェクト名、カラム名 等)

    +
    +
    +

    2.4 短縮名称

    +

    SQL 中に記述するエイリアス名など単語の短縮について示す。

    +
      +
    1. 外来語に関しては、原語の短縮形を使用する。短縮形が存在しない場合には、母音を抜かして表記する。
      +例) corporation → corp / computer → cmptr

    2. +
    3. ローマ字の短縮は、単語の区切れの頭文字、または母音を抜かした子音字等を利用する。
      +例) nichijo → nchj

    4. +
    +
      +
    • カラムには必ずテーブルエイリアスを付与する
    • +
    • テーブルのエイリアスは必ず付与すること。
      +必要ない場合(単一テーブルへの SELECT 等)も必ず付与すること
      +また、テーブルのエイリアス名は同 SQL 文の中で重複しないように命名すること。
      +(副問い合わせで利用したエイリアス名をメインの SQL 中のエイリアス名に利用しない。など)
    • +
    +
    +
    +

    2.5 文字コード

    +

    SQL ファイルの文字コード(エンコーディング)は Java ソースファイルと同じく『 Unicode UTF-8 』で保存する。

    +
    +
    +

    2.6 不要な空白文字(スペース)は除去する

    +

    不要な空白文字(スペース)は除去すること。

    +
    +
    +

    2.7 SQL 文の整形

    +

    DML 文の節に対する予約語は左揃えにする。
    +項目ごとに改行を入れ、項目の前にはインデントを挿入する。カンマは項目の前へ記入する。
    +Java ソースファイルのようにファイルの先頭にコメント行を入れると DB 分析作業に支障があるため禁止とする。
    +よって SQL ファイルの先頭は必ずSELECTUPDATEINSERTDELETEMERGEの何れかになる。

    +

    物理カラム名、テーブル名に対応する論理名を入れる場合、その後ろに単数行コメント(--)にて記述する。
    +SQL 内に挿入する単数行コメントは、/*(半角スペース)コメント本文(半角スペース)*/ で行う。
    +,(カンマ)とANDについては各行の先頭に記述する。(以下の例を参照のこと)
    +SQL フレームワークで実行する SQL の場合、SQL ステートメントの終わりを示す;(セミコロン)は記述しない。

    +

    良い例:

    +
    SELECT
    +/*
    +    処理名
    +*/
    +    TBL1.COLUMN1    AS  COLUMN1 -- カラム1
    +,   TBL1.COLUMN2    AS  COLUMN2 -- カラム2
    +FROM
    +    TABLE1  TBL1    -- テーブル1
    +

    WHERE 句の=!=ISIS NULLIS)の縦位置は揃える。

    +

    良い例:

    +
    WHERE
    +    A.TEN_NO    =   B.TEN_NO
    +AND A.KAMOKU_CD !=  '1'
    +AND A.ANKEN_NO  IS  NULL
    +
    +

    2.7.1 SELECT 文

    +

    良い例:

    +
    SELECT
    +    TBL1.COLUMN1    AS  COLUMN1 -- カラム1
    +,   TBL1.COLUMN2    AS  COLUMN2 -- カラム2
    +FROM
    +    TABLE1  TBL1    -- テーブル1
    +WHERE
    +    TBL1.COLUMN3    =   1
    +ORDER BY
    +    TBL1.COLUMN1
    +,   TBL1.COLUMN2
    +
    +
    +

    2.7.2 INSERT 文

    +

    良い例:

    +
    INSERT
    +INTO
    +    TABLE1  -- テーブル1
    +(
    +    COLUMN1 -- カラム1
    +,   COLUMN2 -- カラム2
    +,   COLUMN3 -- カラム3
    +) VALUES (
    +    VALUE1
    +,   VALUE2
    +,   VALUE3
    +)
    +
    +
    +

    2.7.3 UPDATE 文

    +

    良い例:

    +
    UPDATE
    +    TABLE1  TBL1    -- テーブル1
    +SET
    +    TBL1.COLUMN2    =   100 -- カラム2
    +,   TBL1.COLUMN3    =   100 -- カラム3
    +WHERE
    +    TBL1.COLUMN1    =   10
    +
    +
    +

    2.7.4 DELETE 文

    +

    良い例:

    +
    DELETE
    +FROM
    +    TABLE1  TBL1    -- テーブル1
    +WHERE
    +    TBL1.VALUE  =   1
    +
    +
    +

    2.7.5 MERGE 文

    +

    DB 結合条件が一致した場合と不一致になった場合の、それぞれの SQL 文を記述する。

    +

    良い例:

    +
    MERGE
    +INTO
    +    PROFILE P               -- PROFILEテーブル
    +USING
    +    NAME    N               -- NAMEテーブル
    +ON
    +    (
    +        P.NAME  = N.NAME        -- 条件
    +    )
    +WHEN MATCHED THEN           -- 条件が一致
    +    /*UPDATE文*/
    +WHEN NOT MATCHED THEN       -- 条件が不一致
    +    /*INSERT文*/
    +
    +
    +

    2.7.6 AND(副問い合わせ)

    +

    良い例:

    +
    AND XXX =   (
    +        SELECT
    +            TBL1.COLUMN1
    +        ,   TBL1.COLUMN2
    +        FROM
    +            TABLE1  TBL1
    +    )
    +
    +
    +

    2.7.7 CASE 式

    +

    CASE 式は下記のように記載すること。

    +

    良い例:

    +
    CASE
    +    WHEN
    +        XXX.HOGE    =   YYY.FUGA
    +    AND XXX.FUGA    =   YYY.FUGA
    +    THEN
    +        1
    +    ELSE
    +        0
    +END
    +

    CASEWHENTHENELSEの後に改行を挿入すること。
    +CASEの後、ENDの前までは 1 インデント挿入すること。

    +
    +
    +

    2.7.8 IN 句

    +

    カンマの後にスペースを1文字入れる。

    +
    +
    +

    2.7.9 比較演算子

    +

    比較演算子の前後にタブ(またはスペース)を1文字入れる。

    +
    +
    +

    2.7.10 改行位置

    +

    SELECT 句、ORDER BY 句、GROUP BY 句等は最初に出現するカラムとカラムの区切りのカンマ前に改行を入れること。
    +SELECT の FROM 句の最初に出現するテーブルと結合テーブルの区切りのカンマ前に改行を入れること。
    +WHERE 句、MERGE の ON 句の各条件文の(AND や OR の)前に改行を入れること。
    +命令句の後は、ヒント句が挿入できるように改行すること。

    +

    良い例:

    +
    SELECT
    +    T1.COLUMN1  AS  COLUMN1
    +,   T2.COLUMN2  AS  COLUMN2
    +FROM
    +    TABLE1  T1
    +,   TABLE2  T2
    +WHERE
    +    T1.COLUMN3  =   1
    +AND T1.COLUMN4  =   T2.COLUMN4
    +ORDER BY
    +    T1.COLUMN1
    +,   T2.COLUMN2
    +
    +
    +

    2.7.11 WITH 句

    +

    WITH の前後に改行を挿入すること
    +また、インデントは下記のように記述すること

    +

    良い例:

    +
    -- カラムエイリアスあり
    +WITH
    +    NAME1   (
    +        COL_ALIAS1  -- カラム1
    +    ,   COL_ALIAS2  -- カラム2
    +    )   AS  (
    +        SELECT
    +        ・・・
    +    )
    +,   NAME2   (
    +        COL_ALIAS1  -- カラム1
    +    ,   COL_ALIAS2  -- カラム2
    +    )   AS  (
    +        SELECT
    +        ・・・
    +    )
    +
    +-- カラムエイリアスなし
    +WITH
    +    NAME1   AS  (
    +        SELECT
    +        ・・・
    +    )
    +,   NAME2   AS  (
    +        SELECT
    +        ・・・
    +    )
    +
    +
    +

    2.7.12 OFFSET 句 FETCH 句

    +

    OFFSET、FETCH の前に改行を挿入すること

    +

    良い例:

    +
    SELECT
    +    TBL1.COLUMN1    AS  COLUMN1
    +FROM
    +    TABLE1  TBL1
    +ORDER BY
    +    TBL1.COLUMN2    DESC
    +OFFSET 5 ROWS
    +FETCH NEXT 5 ROWS ONLY
    +
    +
    +

    2.7.13 HINT 句

    +

    HINT 句は独立した行で記載すること
    +HINT 内容にはインデントを付けること

    +

    良い例:

    +
    SELECT
    +/*+
    +    ここにHINTを記載
    +*/
    +    TBL1.COLUMN1    AS  COLUMN1
    +FROM
    +    TABLE1  TBL1
    +WHERE
    +    TBL1.COLUMN2    =   1
    +
    +
    +
    +

    2.8 コメント

    +
      +
    • 修正コメント

      +

      (修正コメントが必要な場合、)
      +処理追加の際、追加行の 1 行目の前と最終行の次の行にコメントを入れる。単一行の場合は、同一行の最後にコメントをつける。

      +

      良い例:

      +
      -- 2004/04/23 仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 S ← 修正開始点コメント
      +(追加処理)
      +-- 2004/04/23仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 E ← 修正終了点コメント
    • +
    • 単数行コメント

      +

      SQL 内で使用する単数行コメント(カラムコメントなど)には、「 -- 」を使用する。

    • +
    • 複数行コメント

      +

      /* */ 」を使用する。下記に例を示す。
      +なお、前述で触れたとおり、SQL ファイルの先頭にコメントを記述することは禁止とする。

      +

      良い例:

      +
      /**********************************************************************/
      +/*
      + * コメントを始めるスラッシュとアスタリスクは、それだけを1行に置く。
      + * それから、コメント・ブロック内の各行は縦にアスタリスクを置き
      + * コメントがあることを強調する。
      + * 最後に、アスタリスクとスラッシュは、それだけを1行に置く。
      + */
      +/**********************************************************************/
    • +
    • 複数行コメントアウト

      +

      複数行をコメントアウトする場合は、各行を「--」でコメントアウトする。
      +「 /* */ 」を使用すると、その中に「 /* */ 」が存在した場合、コメントアウトが途中で切れてしまう恐れがあるため、
      +使用しない。

    • +
    • 論理名の記載

      +

      SELECTINSERTUPDATEMERGEのカラム名記述箇所には単数行コメントでカラムの論理名を記載する。
      +SELECTINSERTUPDATEDELETEMERGEのテーブル名記述箇所には単数行コメントでテーブルの論理名を記載する。
      +論理名は ERD 等で定義された論理名と必ず一致させること。

    • +
    +
    +
    +

    2.9 外部結合

    +

    結合方法は ANSI 形式(~outer join ~)ではなく Oracle 形式(+)を使用する。
    +原則として(+)は条件文の右にくるカラムに付与する。

    +

    良い例:

    +
    T1.COL1 =   T2.COL2(+)
    +
    +
    +

    2.10 型変換

    +

    代入や WHERE 句の条件設定などでデータ・タイプが異なる場合、明示的にタイプ変換を行う。(暗黙の型変換は使用しない)

    +
    +
    +

    2.11 比較演算子

    +

    「等しくない」を示す演算子は「!=」を利用する。「<>」「^=」も動作するが統一の観点から利用しない。

    +
    +
    +

    2.12 ORDER BY 句

    +

    ORDER BY 数字の構文は使用せずに、カラム名を記載する。

    +
    +
    +

    2.13 GROUP BY 句

    +

    GROUP BY 数字の構文は使用せずに、カラム名を記載する。

    +

    集約関数を利用する場合は必ず記載すること。(省略可能であっても省略しない)

    +
    +
    +

    2.14 EXISTS 句

    +

    EXISTS 句を記載する際、サブクエリになる SELECT 句の指定は定数「1」とする。
    +「*」(ワイルドカード)や「'X'」は統一の観点から利用しない。
    +また「*」(ワイルドカード)についてはパフォーマンスの観点からも禁止とする。

    +

    良い例:

    +
    WHERE
    +    EXISTS(
    +        SELECT
    +            1
    +        FROM
    +            FOO F
    +        WHERE
    +            F.COL1  =   M.KEY
    +    )
    +
    +
    +

    2.15 AS 句

    +

    トップレベルの SELECT 句には必ずAS句を記載し別名を付ける。
    +同一の名前であっても AS 句を付与する。
    +また、「AS」は省略可能であるが、省略はしないこと。

    +
    +
    +

    2.16 WHERE 句

    +
      +
    • 論理名の記載
      +WHERE 句でカラムと式を比較する際は左辺がカラムになるように記載すること。

      +

      良い例:

      +
      WHERE
      +  TBL.COLUMN1 =   1
      +AND   TBL.AMOUNT2 >   TBL.AMOUNT3 +   TBL.AMOUNT4
    • +
    • 条件式の順序
      +原則として、WHERE 句で条件式を列挙する際、下記の順序を守ること。

      +
        +
      1. テーブル単位にまとめて順番に記述する
        +この際、テーブルの順序は FROM 句に記述した順序に準ずること。
      2. +
      3. 1.のテーブル単位の中で絞り込み条件をまず記述し、その後結合条件を記述する。
      4. +
      +

      良い例:

      +
      FROM
      +  A_TABLE A   -- A_TABLE
      +, B_TABLE B   -- B_TABLE
      +, C_TABLE C   -- C_TABLE
      +WHERE
      +-- A_TABLEの絞り込み
      +  A.KEY1      =   ?
      +AND   A.KEY2      =   ?
      +-- B_TABLEの絞り込み
      +AND   B.KEY1      =   ?
      +AND   B.KEY2      =   ?
      +-- B_TABLEの結合条件
      +AND   B.COL1      =   A.COL1
      +-- C_TABLEの絞り込み
      +AND   C.KEY1      =   ?
      +AND   C.KEY2      =   ?
      +-- C_TABLEの結合条件
      +AND   C.COL1      =   A.COL1
      +AND   C.COL2      =   A.COL2
      +AND   C.COL3      =   B.COL3
    • +
    +
    +
    +

    2.17 COUNT 文

    +

    レコード数を数える COUNT 文の記述はCOUNT(*)と記述する。
    +COUNT(1)COUNT('X')COUNT(KEY1)という記載は NG。

    +
    +
    +
    +

    3 SQL コーディング規約(パフォーマンス性)

    +

    本章ではパフォーマンス性を高めることを目的としたコーディング規約について記載する。

    +
    +

    3.1 検索

    +

    検索処理におけるコーディング規約を下記に示す。

    +
      +
    • 中間一致、後方一致検索はインデックスを利用できないため避ける

    • +
    • 検索条件で=(等号)を使用できる場合は必ず使用する

      +

      A=1 or A=2とする方がA>0 and A<3などと記述するのよりパフォーマンス上優位な場合が多い。
      +これは A にインデックスがある場合、=であれば、インデックスが有効に使われるためである。

    • +
    • 可能な限り検索条件にパーティションキーの値を指定する

    • +
    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する

    • +
    • インデックスによる検索を指定したい場合、下記の記載を行わない

      +
        +
      • インデックスカラムを含む演算に対して条件指定

        +

        悪い例:

        +
        TBL1.COL1   +   1   >   100 /* NGパターン 右辺で演算してください */
        +

        良い例:

        +
        TBL1.COL1   >   100 -   1
      • +
      • インデックスカラムに関数を通した値に対して条件指定

        +

        悪い例:

        +
        /* NGパターン 右辺に関数を通してください */
        +TO_CHAR(TBL1.COL1, 'YYYYMMDD')  >   '20151231'
        +

        良い例:

        +
        TBL1.COL1   >=  TO_DATE('20160101', 'YYYYMMDD')
      • +
      • インデックスカラムをORで条件指定(禁止ではないが原則行わない)

        +

        悪い例:

        +
        (
        +    /* NGパターンINDEXが利用されない場合があります。他の方法を検討してください */
        +        TBL1.COL1   =   1
        +    OR  TBL1.COL1   =   2
        +    )
      • +
    • +
    +
    +
    +

    3.2 挿入

    +

    挿入処理におけるコーディング規約を下記に示す。

    +
      +
    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する。
    • +
    +
    +
    +

    3.3 更新

    +

    更新処理におけるコーディング規約を下記に示す。

    +
      +
    • 主キーの値の UPDATE は原則行わない。外部キーがあればエラーになる。
      +外部キーが無い場合でも、事実上、主キーの値を利用して、検索、更新する場合は、リンクが切れてしまう。
    • +
    • パーティションキーの UPDATE は原則行わない。
    • +
    • VIEW を使用するデータ更新は禁止。更新は実表に対して行う。
    • +
    +
    +
    +

    3.4 削除

    +

    削除処理におけるコーディング規約を下記に示す。

    +
      +
    • 大量件数(数百万件レベル)の delete 文発行は避ける。
    • +
    +
    +
    +

    3.5 WITH 句

    +

    WITH 句の誤った使い方はパフォーマンスの劣化を招くため、WITH 句を利用する場合は DBA に相談する。

    +
    +
    +

    3.6 DISTINCT 句

    +

    DISTINCT は、暗黙のソート処理が行われる可能性があるため性能劣化につながる。
    +EXISTS 句の使用・代替を検討すること。

    +

    悪い例:

    +
    SELECT
    +    DISTINCT
    +    D.NO    AS  DEPT_NO
    +,   D.NAME  AS  DEPT_NAME
    +FROM
    +    DEPARTMENT  D
    +,   EMPLOYEE    E
    +WHERE
    +    D.NO    =   E.DEPT_NO   -- 社員が一人以上属している部門を取得
    +

    良い例:

    +
    SELECT
    +    D.NO    AS  DEPT_NO
    +,   D.NAME  AS  DEPT_NAME
    +FROM
    +    DEPARTMENT  D
    +WHERE
    +    EXISTS(
    +        SELECT
    +            1
    +        FROM
    +            EMPLOYEE    E
    +        WHERE
    +            D.NO    =   E.DEPT_NO   -- 社員が一人以上属している部門を取得
    +    )
    +
    +
    +

    3.7 IN 句

    +

    IN 句は最大 1000 個まで指定できるが、200 個程度でも ORA エラーが発生するケースがある。
    +また IN 句の少しだけ異なる SQL が大量に発行されると CPU 高騰やメモリ枯渇を招く。
    +従って 100 を超えるような長い IN 句は使用せず、一時表を利用して IN (SELECT ・・・ FROM 一時表)のように書き換える。

    +
    +
    +

    3.8 NOT IN 句

    +

    原則NOT IN(SELECT~)は使用せずに、NOT EXISTS (SELECT~)を使用する。
    +NOT IN句は、内部的にソートマージの結合をすることでテーブルをフルスキャンする場合があるため、性能が悪化する可能性がある。

    +
    +
    +

    3.9 UNION 句

    +

    UNIONDISTINCT処理が含まれパフォーマンス上問題があるため、UNION ALLを使用する。

    +
    +
    +

    3.10 パラレルヒント句

    +

    パラレルヒント句は DB 負荷が高いため、原則使用禁止とする。付与したい場合は DBA に相談する。

    +
    +
    +

    3.11 SELECT FOR UPDATE

    +
      +
    • SELECT FOR UPDATENO WAITまたは「WAIT秒数指定」を必ず付ける。
      +WAIT指定なしの場合はロックが解除されてもプログラムに制御が返らないことがある。
      +※WAIT 秒数指定を行う際の秒数は各開発者で決めるのではなくプロジェクトで決定した方針に従うこと。
      +また、SQL ライブラリを利用していて定数が記述できる場合は定数で記述すること。
    • +
    • SELECT FOR UPDATEで複数行にロックをかける場合、同時実行されるとデットロックを起こす可能性があるため、1件のロックでない場合はORDER BYを指定する。
    • +
    +
    +
    +

    3.12 分析関数

    +

    分析関数の使用は可能だが、性能悪化を招く恐れがあるため、特性を知らない方は DBA に相談する。

    +
    +
    +

    3.13 インデックス

    +

    インデックスの必要性については DBA で最終判断するため、必要とする場合は DBA へ相談する。

    +
    +
    +

    3.14 外部結合

    +

    外部結合する際、内部表(駆動表)はなるべく想定件数の少ない表にする。

    +
    +
    +
    +
    +

    4 License

    +

    CC-By-4.0

    +
    + + diff --git "a/resources/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.docx" "b/resources/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.docx" new file mode 100644 index 00000000..3810d7b5 Binary files /dev/null and "b/resources/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.docx" differ diff --git "a/resources/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.html" "b/resources/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.html" new file mode 100644 index 00000000..75084c1f --- /dev/null +++ "b/resources/SQL\343\202\263\343\203\274\343\203\207\343\202\243\343\203\263\343\202\260\350\246\217\347\264\204\357\274\210PostgreSQL\357\274\211.html" @@ -0,0 +1,920 @@ + + + + + + + + SQLコーディング規約(PostgreSQL) + + + + + +
    +

    SQLコーディング規約(PostgreSQL)

    +

    Future Enterprise Coding Standards

    +
    + +

    +

    本コーディング規約は、世の中のシステム開発プロジェクトのために無償で提供致します。
    +ただし、掲載内容および利用に際して発生した問題、それに伴う損害については、フューチャー株式会社は一切の責務を負わないものとします。
    +また、掲載している情報は予告なく変更することがございますので、あらかじめご了承下さい。

    +
    +

    1 はじめに

    +
    +

    1.1 前提条件

    +

    本書は、SQL コーディング規約についてまとめたものである。
    +今回 RDBMS として採用する PostgreSQL での SQL の使用を前提に記述している。

    +
    +
    +
    +

    2 SQL コーティング規約(可読性・管理性)

    +

    本章では可読性・管理性を高めることを目的としたコーディング規約について記載する。

    +
    +

    2.1 書式全般

    +

    書式全般についてのコーディング規約を下記に示す。

    +
      +
    • 1 行につき、1 文のみを記述する。
    • +
    • SQL 中のインデントは、Java コーディング規約にあわせて半角スペースではなくタブ文字とする。
    • +
    • ヘボン式ローマ字を使用する。
    • +
    • 外来語に関しては、原語の綴りを使用する。
    • +
    • 横は 80 文字を目安に改行する。
    • +
    • 定数を条件に用いる場合やインライン・ビューで取得したいデータなど開発者の意図はコメントにて記載する。
    • +
    +
    +
    +

    2.2 予約語

    +

    予約語に対しては、小文字を使用する。(例 : selectinsertupdatedelete 等)

    +
    +
    +

    2.3 予約語以外

    +

    予約語以外に対しても、予約語と同様に小文字を使用する。(例 : オブジェクト名、カラム名 等)

    +
    +
    +

    2.4 短縮名称

    +

    SQL 中に記述するエイリアス名など単語の短縮について示す。

    +
      +
    1. 外来語に関しては、原語の短縮形を使用する。短縮形が存在しない場合には、母音を抜かして表記する。
      +例) corporation → corp / computer → cmptr

    2. +
    3. ローマ字の短縮は、単語の区切れの頭文字、または母音を抜かした子音字等を利用する。
      +例) nichijo → nchj

    4. +
    +
      +
    • カラムには必ずテーブルエイリアスを付与する
    • +
    • テーブルのエイリアスは必ず付与すること。
      +必要ない場合(単一テーブルへの SELECT 等)も必ず付与すること
      +また、テーブルのエイリアス名は同 SQL 文の中で重複しないように命名すること。
      +(副問い合わせで利用したエイリアス名をメインの SQL 中のエイリアス名に利用しない。など)
    • +
    +
    +
    +

    2.5 文字コード

    +

    SQL ファイルの文字コード(エンコーディング)は Java ソースファイルと同じく『 Unicode UTF-8 』で保存する。

    +
    +
    +

    2.6 不要な空白文字(スペース)は除去する

    +

    不要な空白文字(スペース)は除去すること。

    +
    +
    +

    2.7 SQL 文の整形

    +

    DML 文の節に対する予約語は左揃えにする。
    +項目ごとに改行を入れ、項目の前にはインデントを挿入する。カンマは項目の前へ記入する。
    +Java ソースファイルのようにファイルの先頭にコメント行を入れると DB 分析作業に支障があるため禁止とする。
    +よって SQL ファイルの先頭は必ずselectupdateinsertdeleteの何れかになる。

    +

    物理カラム名、テーブル名に対応する論理名を入れる場合、その後ろに単数行コメント(--)にて記述する。
    +SQL 内に挿入する単数行コメントは、/*(半角スペース)コメント本文(半角スペース)*/ で行う。
    +,(カンマ)とANDについては各行の先頭に記述する。(以下の例を参照のこと)
    +SQL フレームワークで実行する SQL の場合、SQL ステートメントの終わりを示す;(セミコロン)は記述しない。

    +

    良い例:

    +
    select
    +/*
    +    処理名
    +*/
    +    tbl1.column1    as  column1 -- カラム1
    +,   tbl1.column2    as  column2 -- カラム2
    +from
    +    table1  tbl1    -- テーブル1
    +

    WHERE 句の=!=isis nullis)の縦位置は揃える。

    +

    良い例:

    +
    where
    +    a.ten_no    =   b.ten_no
    +and a.kamoku_cd !=  '1'
    +and a.anken_no  is  null
    +
    +

    2.7.1 SELECT 文

    +

    良い例:

    +
    select
    +    tbl1.column1    as  column1 -- カラム1
    +,   tbl1.column2    as  column2 -- カラム2
    +from
    +    table1  tbl1    -- テーブル1
    +where
    +    tbl1.column3    =   1
    +order by
    +    tbl1.column1
    +,   tbl1.column2
    +
    +
    +

    2.7.2 INSERT 文

    +

    良い例:

    +
    insert
    +into
    +    table1  -- テーブル1
    +(
    +    column1 -- カラム1
    +,   column2 -- カラム2
    +,   column3 -- カラム3
    +) values (
    +    value1
    +,   value2
    +,   value3
    +)
    +
    +
    +

    2.7.3 UPDATE 文

    +

    良い例:

    +
    update
    +    table1  tbl1    -- テーブル1
    +set
    +    tbl1.column2    =   100 -- カラム2
    +,   tbl1.column3    =   100 -- カラム3
    +where
    +    tbl1.column1    =   10
    +
    +
    +

    2.7.4 DELETE 文

    +

    良い例:

    +
    delete
    +from
    +    table1  tbl1    -- テーブル1
    +where
    +    tbl1.value  =   1
    +
    +
    +

    2.7.5 AND(副問い合わせ)

    +

    良い例:

    +
    and xxx =   (
    +        select
    +            tbl1.column1
    +        ,   tbl1.column2
    +        from
    +            table1  tbl1
    +    )
    +
    +
    +

    2.7.6 CASE 式

    +

    CASE 式は下記のように記載すること。

    +

    良い例:

    +
    case
    +    when
    +        xxx.hoge    =   yyy.fuga
    +    and xxx.fuga    =   yyy.fuga
    +    then
    +        1
    +    else
    +        0
    +end
    +

    casewhenthenelseの後に改行を挿入すること。
    +caseの後、endの前までは 1 インデント挿入すること。

    +
    +
    +

    2.7.7 IN 句

    +

    カンマの後にスペースを1文字入れる。

    +
    +
    +

    2.7.8 比較演算子

    +

    比較演算子の前後にタブ(またはスペース)を1文字入れる。

    +
    +
    +

    2.7.9 改行位置

    +

    select 句、order by 句、group by 句等は最初に出現するカラムとカラムの区切りのカンマ前に改行を入れること。
    +select の from 句の最初に出現するテーブルと結合テーブルの区切りのカンマ前に改行を入れること。
    +where 句の on 句の各条件文の(and や or の)前に改行を入れること。
    +命令句の後は、ヒント句が挿入できるように改行すること。

    +

    良い例:

    +
    select
    +    t1.column1  as  column1
    +,   t2.column2  as  column2
    +from
    +    table1  t1
    +,   table2  t2
    +where
    +    t1.column3  =   1
    +and t1.column4  =   t2.column4
    +order by
    +    t1.column1
    +,   t2.column2
    +
    +
    +

    2.7.10 WITH 句

    +

    with の前後に改行を挿入すること
    +また、インデントは下記のように記述すること

    +

    良い例:

    +
    -- カラムエイリアスあり
    +with
    +    name1   (
    +        col_alias1  -- カラム1
    +    ,   col_alias2  -- カラム2
    +    )   as  (
    +        select
    +        ・・・
    +    )
    +,   name2   (
    +        col_alias1  -- カラム1
    +    ,   col_alias2  -- カラム2
    +    )   as  (
    +        select
    +        ・・・
    +    )
    +
    +-- カラムエイリアスなし
    +with
    +    name1   as  (
    +        select
    +        ・・・
    +    )
    +,   name2   as  (
    +        select
    +        ・・・
    +    )
    +
    +
    +

    2.7.11 LIMIT 句 OFFSET 句

    +

    LIMIT、OFFSET の前に改行を挿入すること

    +

    良い例:

    +
    select
    +    tbl1.column1    as  column1
    +from
    +    table1  tbl1
    +order by
    +    tbl1.column2    desc
    +limit 5
    +offset 5
    +
    +
    +

    2.7.12 HINT 句

    +

    HINT 句は独立した行で記載すること
    +HINT 内容にはインデントを付けること

    +

    良い例:

    +
    select
    +/*+
    +    ここにhintを記載
    +*/
    +    tbl1.column1    as  column1
    +from
    +    table1  tbl1
    +where
    +    tbl1.column2    =   1
    +
    +
    +
    +

    2.8 コメント

    +
      +
    • 修正コメント

      +

      (修正コメントが必要な場合、)
      +処理追加の際、追加行の 1 行目の前と最終行の次の行にコメントを入れる。単一行の場合は、同一行の最後にコメントをつける。

      +

      良い例:

      +
      -- 2004/04/23 仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 S ← 修正開始点コメント
      +(追加処理)
      +-- 2004/04/23仕様変更管理番号 ADD(または、MOD、DEL) 変更者名 E ← 修正終了点コメント
    • +
    • 単数行コメント

      +

      SQL 内で使用する単数行コメント(カラムコメントなど)には、「 -- 」を使用する。

    • +
    • 複数行コメント

      +

      /* */ 」を使用する。下記に例を示す。
      +なお、前述で触れたとおり、SQL ファイルの先頭にコメントを記述することは禁止とする。

      +

      良い例:

      +
      /**********************************************************************/
      +/*
      + * コメントを始めるスラッシュとアスタリスクは、それだけを1行に置く。
      + * それから、コメント・ブロック内の各行は縦にアスタリスクを置き
      + * コメントがあることを強調する。
      + * 最後に、アスタリスクとスラッシュは、それだけを1行に置く。
      + */
      +/**********************************************************************/
    • +
    • 複数行コメントアウト

      +

      複数行をコメントアウトする場合は、各行を「--」でコメントアウトする。
      +「 /* */ 」を使用すると、その中に「 /* */ 」が存在した場合、コメントアウトが途中で切れてしまう恐れがあるため、
      +使用しない。

    • +
    • 論理名の記載

      +

      selectinsertupdatemergeのカラム名記述箇所には単数行コメントでカラムの論理名を記載する。
      +selectinsertupdatedeletemergeのテーブル名記述箇所には単数行コメントでテーブルの論理名を記載する。
      +論理名は ERD 等で定義された論理名と必ず一致させること。

    • +
    +
    +
    +

    2.9 型変換

    +

    代入や WHERE 句の条件設定などでデータ・タイプが異なる場合、明示的にタイプ変換を行う。(暗黙の型変換は使用しない)

    +
    +
    +

    2.10 比較演算子

    +

    「等しくない」を示す演算子は「!=」を利用する。「<>」も動作するが統一の観点から利用しない。

    +
    +
    +

    2.11 ORDER BY 句

    +

    order by 数字の構文は使用せずに、カラム名を記載する。

    +
    +
    +

    2.12 GROUP BY 句

    +

    group by 数字の構文は使用せずに、カラム名を記載する。

    +

    集約関数を利用する場合は必ず記載すること。(省略可能であっても省略しない)

    +
    +
    +

    2.13 EXISTS 句

    +

    EXISTS 句を記載する際、サブクエリになる SELECT 句の指定は定数「1」とする。
    +「*」(ワイルドカード)や「'X'」は統一の観点から利用しない。
    +また「*」(ワイルドカード)についてはパフォーマンスの観点からも禁止とする。

    +

    良い例:

    +
    where
    +    exists(
    +        select
    +            1
    +        from
    +            foo f
    +        where
    +            f.col1  =   m.key
    +    )
    +
    +
    +

    2.14 AS 句

    +

    トップレベルの SELECT 句には必ずas句を記載し別名を付ける。
    +同一の名前であっても AS 句を付与する。
    +また、「as」は省略可能であるが、省略はしないこと。

    +
    +
    +

    2.15 WHERE 句

    +
      +
    • 論理名の記載
      +WHERE 句でカラムと式を比較する際は左辺がカラムになるように記載すること。

      +

      良い例:

      +
      where
      +  tbl.column1 =   1
      +and   tbl.amount2 >   tbl.amount3 +   tbl.amount4
    • +
    • 条件式の順序
      +原則として、WHERE 句で条件式を列挙する際、下記の順序を守ること。

      +
        +
      1. テーブル単位にまとめて順番に記述する
        +この際、テーブルの順序は FROM 句に記述した順序に準ずること。
      2. +
      3. 1.のテーブル単位の中で絞り込み条件をまず記述し、その後結合条件を記述する。
      4. +
      +

      良い例:

      +
      from
      +  a_table a   -- a_table
      +, b_table b   -- b_table
      +, c_table c   -- c_table
      +where
      +-- a_tableの絞り込み
      +  a.key1      =   ?
      +and   a.key2      =   ?
      +-- b_tableの絞り込み
      +and   b.key1      =   ?
      +and   b.key2      =   ?
      +-- b_tableの結合条件
      +and   b.col1      =   a.col1
      +-- c_tableの絞り込み
      +and   c.key1      =   ?
      +and   c.key2      =   ?
      +-- c_tableの結合条件
      +and   c.col1      =   a.col1
      +and   c.col2      =   a.col2
      +and   c.col3      =   b.col3
    • +
    +
    +
    +

    2.16 COUNT 文

    +

    レコード数を数える COUNT 文の記述はcount(*)と記述する。
    +count(1)count('x')count(key1)という記載は NG。

    +
    +
    +

    2.17 文字列リテラル

    +
    +

    2.17.1 エスケープシーケンス

    +

    文字列リテラル中のシングルクォーテーションのエスケープは「 '' 」とシングルクォーテーションを二つつなげた記述をする。
    +「 \' 」も同様の結果が得られるが円マーク(バックスラッシュ)によるエスケープは利用しない。
    +円マークをエスケープせざるを得ないときのみ円マークによるエスケープ利用して良いが、
    +円マークを文字列リテラルで表現する必要のある設計自体を避けること。

    +

    ※PostgreSQL は設定によって円マーク(バックスラッシュ)によるエスケープを無効にできます。(デフォルト無効)
    +円マークをエスケープするときは、自プロジェクトでどちらに設定されているか確認してください。

    +

    良い例:

    +
    update
    +    table_a
    +set
    +    text_data   =   'that''s right'
    +

    悪い例:

    +
    update
    +    table_a
    +set
    +    text_data   =   'that\'s too bad'
    +
    +
    +
    +
    +

    3 SQL コーディング規約(パフォーマンス性)

    +

    本章ではパフォーマンス性を高めることを目的としたコーディング規約について記載する。

    +
    +

    3.1 検索

    +

    検索処理におけるコーディング規約を下記に示す。

    +
      +
    • 中間一致、後方一致検索はインデックスを利用できないため避ける

    • +
    • 検索条件で=(等号)を使用できる場合は必ず使用する

      +

      a=1 or a=2とする方がa>0 and a<3などと記述するのよりパフォーマンス上優位な場合が多い。
      +これは a にインデックスがある場合、=であれば、インデックスが有効に使われるためである。

    • +
    • 可能な限り検索条件にパーティションキーの値を指定する

    • +
    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する

    • +
    • インデックスによる検索を指定したい場合、下記の記載を行わない

      +
        +
      • インデックスカラムを含む演算に対して条件指定

        +

        悪い例:

        +
        tbl1.col1   +   1   >   100 /* NGパターン 右辺で演算してください */
        +

        良い例:

        +
        tbl1.col1   >   100 -   1
      • +
      • インデックスカラムに関数を通した値に対して条件指定

        +

        悪い例:

        +
        /* NGパターン 右辺に関数を通してください */
        +to_char(tbl1.col1, 'YYYYMMDD')  >   '20151231'
        +

        良い例:

        +
        tbl1.col1   >=  to_date('20160101', 'YYYYMMDD')
      • +
      • インデックスカラムをORで条件指定(禁止ではないが原則行わない)

        +

        悪い例:

        +
        (
        +    /* NGパターンINDEXが利用されない場合があります。他の方法を検討してください */
        +        tbl1.col1   =   1
        +    or  tbl1.col1   =   2
        +    )
      • +
    • +
    +
    +
    +

    3.2 挿入

    +

    挿入処理におけるコーディング規約を下記に示す。

    +
      +
    • 全列ワイルドカード「*」の使用はせず、カラム名を明記する。
    • +
    +
    +
    +

    3.3 更新

    +

    更新処理におけるコーディング規約を下記に示す。

    +
      +
    • 主キーの値の UPDATE は原則行わない。外部キーがあればエラーになる。
      +外部キーが無い場合でも、事実上、主キーの値を利用して、検索、更新する場合は、リンクが切れてしまう。
    • +
    • パーティションキーの UPDATE は原則行わない。
    • +
    • VIEW を使用するデータ更新は禁止。更新は実表に対して行う。
    • +
    +
    +
    +

    3.4 削除

    +

    削除処理におけるコーディング規約を下記に示す。

    +
      +
    • 大量件数(数百万件レベル)の delete 文発行は避ける。
    • +
    +
    +
    +

    3.5 DISTINCT 句

    +

    DISTINCT は、暗黙のソート処理が行われる可能性があるため性能劣化につながる。
    +EXISTS 句の使用・代替を検討すること。

    +

    悪い例:

    +
    select
    +    distinct
    +    d.no    as  dept_no
    +,   d.name  as  dept_name
    +from
    +    department  d
    +,   employee    e
    +where
    +    d.no    =   e.dept_no   -- 社員が一人以上属している部門を取得
    +

    良い例:

    +
    select
    +    d.no    as  dept_no
    +,   d.name  as  dept_name
    +from
    +    department  d
    +where
    +    exists(
    +        select
    +            1
    +        from
    +            employee    e
    +        where
    +            d.no    =   e.dept_no   -- 社員が一人以上属している部門を取得
    +    )
    +
    +
    +

    3.6 IN 句

    +

    IN 句は最大 1000 個まで指定できるが、200 個程度でも ORA エラーが発生するケースがある。
    +また IN 句の少しだけ異なる SQL が大量に発行されると CPU 高騰やメモリ枯渇を招く。
    +従って 100 を超えるような長い IN 句は使用せず、一時表を利用して in (select ・・・ from 一時表)のように書き換える。

    +
    +
    +

    3.7 NOT IN 句

    +

    原則not in(select~)は使用せずに、not exists (select~)を使用する。
    +NOT IN句は、内部的にソートマージの結合をすることでテーブルをフルスキャンする場合があるため、性能が悪化する可能性がある。

    +
    +
    +

    3.8 UNION 句

    +

    uniondistinct処理が含まれパフォーマンス上問題があるため、union allを使用する。

    +
    +
    +

    3.9 SELECT FOR UPDATE

    +
      +
    • select for updateで複数行にロックをかける場合、同時実行されるとデットロックを起こす可能性があるため、1件のロックでない場合はorder byを指定する。
    • +
    +
    +
    +

    3.10 分析関数

    +

    分析関数の使用は可能だが、性能悪化を招く恐れがあるため、特性を知らない方は DBA に相談する。

    +
    +
    +

    3.11 インデックス

    +

    インデックスの必要性については DBA で最終判断するため、必要とする場合は DBA へ相談する。

    +
    +
    +

    3.12 外部結合

    +

    外部結合する際、内部表(駆動表)はなるべく想定件数の少ない表にする。

    +
    +
    +
    +
    +

    4 License

    +

    CC-By-4.0

    +
    + + diff --git a/vp-icons.css b/vp-icons.css new file mode 100644 index 00000000..ddc5bd8e --- /dev/null +++ b/vp-icons.css @@ -0,0 +1 @@ +.vpi-social-github{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")} \ No newline at end of file