copilot-operator 0.1.52 → 0.1.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -1
- package/dist/src/api/operator.controller.js +71 -2
- package/dist/src/api/operator.service.js +99 -7
- package/dist/src/config/schema.js +32 -0
- package/dist/src/exec/policy.js +11 -1
- package/dist/src/exec/scriptFiles.js +108 -2
- package/dist/src/orchestrator/leadRunner.js +50 -4
- package/dist/src/orchestrator/review.js +9 -3
- package/dist/src/orchestrator/taskRunner.js +55 -3
- package/dist/src/plan/kerrigan.js +35 -4
- package/dist/src/plan/systemGuide.js +234 -4
- package/dist/src/session/compose.js +16 -4
- package/dist/src/session/store.js +3 -0
- package/dist/src/session/workspace.js +22 -0
- package/dist/src/session/workspaceSearch.js +162 -0
- package/dist/src/util/pacing.js +33 -2
- package/dist/src/vcs/git.js +12 -2
- package/dist/src/vcs/referenceGuard.js +299 -0
- package/dist/web/404.html +3 -2
- package/dist/web/_next/static/{_1zhoDsMOPAH2xW702E5A → WuIGWiKKh_ESR3KwzsLZF}/_buildManifest.js +1 -1
- package/dist/web/_next/static/chunks/1017.ce926873b598fb89.js +1 -0
- package/dist/web/_next/static/chunks/1077.ae2fd686ef05572e.js +1 -0
- package/dist/web/_next/static/chunks/12.06a7f14bd6716249.js +1 -0
- package/dist/web/_next/static/chunks/1350.a5dc706c8110fd34.js +24 -0
- package/dist/web/_next/static/chunks/1548.bd558d3f2c8df4af.js +1 -0
- package/dist/web/_next/static/chunks/1706.db51b57351297898.js +309 -0
- package/dist/web/_next/static/chunks/1707.7d64ffc060c697a0.js +193 -0
- package/dist/web/_next/static/chunks/1880.87829ecb91209eda.js +24 -0
- package/dist/web/_next/static/chunks/20154aaa.28032c3aa5bcd84d.js +1 -0
- package/dist/web/_next/static/chunks/2037.d1bb5e37c7fe85ae.js +104 -0
- package/dist/web/_next/static/chunks/2163.b41334711ddcceff.js +1 -0
- package/dist/web/_next/static/chunks/2398d077.79ae940919b9695e.js +1 -0
- package/dist/web/_next/static/chunks/2435.9b433b38d34b4b2e.js +1 -0
- package/dist/web/_next/static/chunks/2506.bc8515842e225d2a.js +1 -0
- package/dist/web/_next/static/chunks/2529.c88688b437d71d68.js +41 -0
- package/dist/web/_next/static/chunks/2908.4e0e875d2d471932.js +1 -0
- package/dist/web/_next/static/chunks/3117.a4e1c3348e8bead9.js +1 -0
- package/dist/web/_next/static/chunks/3131-8ec8b632ebf0450d.js +1 -0
- package/dist/web/_next/static/chunks/3134-b6a7bc1f267c39aa.js +1 -0
- package/dist/web/_next/static/chunks/3233.1dcc2798f7f5efa0.js +149 -0
- package/dist/web/_next/static/chunks/344.41cc997c8c8deeed.js +115 -0
- package/dist/web/_next/static/chunks/3690.f691d3fcbd70073d.js +1 -0
- package/dist/web/_next/static/chunks/3804.593b14643e74a2a1.js +1 -0
- package/dist/web/_next/static/chunks/3816.9f5568918e35e4ef.js +77 -0
- package/dist/web/_next/static/chunks/3859.f56f3c6ac4b74cf1.js +94 -0
- package/dist/web/_next/static/chunks/3976.11b159e82e0aa974.js +1 -0
- package/dist/web/_next/static/chunks/3986.d47ed4855773e6dd.js +1 -0
- package/dist/web/_next/static/chunks/441.172f3f581f0030d1.js +226 -0
- package/dist/web/_next/static/chunks/442.2e236a6c5c413bd9.js +1 -0
- package/dist/web/_next/static/chunks/4459.d6df347eb58fccd7.js +1 -0
- package/dist/web/_next/static/chunks/4619.ae3628373decf74f.js +34 -0
- package/dist/web/_next/static/chunks/4623.d5711a8d967e49f4.js +1 -0
- package/dist/web/_next/static/chunks/4670.6b811cc3f67a851c.js +62 -0
- package/dist/web/_next/static/chunks/4812.0af1380aa478f6d3.js +93 -0
- package/dist/web/_next/static/chunks/4969.4f7aff472cf938bf.js +1 -0
- package/dist/web/_next/static/chunks/5790.fe114d1a18741d62.js +86 -0
- package/dist/web/_next/static/chunks/603.4055460889ea24d8.js +1 -0
- package/dist/web/_next/static/chunks/6072.b4b359b24b1738d4.js +286 -0
- package/dist/web/_next/static/chunks/6230.8645bbed143793da.js +1 -0
- package/dist/web/_next/static/chunks/6260.6b5b5c9713d7133f.js +1 -0
- package/dist/web/_next/static/chunks/63b9f8e2.218fd437b256a7e4.js +1 -0
- package/dist/web/_next/static/chunks/6421.3ace3aefc3e7350e.js +1 -0
- package/dist/web/_next/static/chunks/6542.963ec591b5c2bc5a.js +1 -0
- package/dist/web/_next/static/chunks/6885.8fb8eeb9e792b515.js +1 -0
- package/dist/web/_next/static/chunks/6891.dd910309748ad46b.js +1 -0
- package/dist/web/_next/static/chunks/714.cb77983f9be215c9.js +1 -0
- package/dist/web/_next/static/chunks/7220.072a60cd9d60220a.js +1 -0
- package/dist/web/_next/static/chunks/7307.39c27470a879fd0a.js +1 -0
- package/dist/web/_next/static/chunks/7333.04d0e45b223dadd4.js +32 -0
- package/dist/web/_next/static/chunks/7489.395193bf37b80884.js +1 -0
- package/dist/web/_next/static/chunks/7496.17282033df0e8794.js +148 -0
- package/dist/web/_next/static/chunks/7500-f90e2ae7061e351d.js +1 -0
- package/dist/web/_next/static/chunks/7507.9fd648884587a7f3.js +287 -0
- package/dist/web/_next/static/chunks/76.f9c2aea58a61692f.js +1 -0
- package/dist/web/_next/static/chunks/7664.bd6265e6e94e1ecd.js +79 -0
- package/dist/web/_next/static/chunks/7872.9b08a88b7289949f.js +64 -0
- package/dist/web/_next/static/chunks/7921-54dae769aa8bae96.js +1 -0
- package/dist/web/_next/static/chunks/795.710d39b80c9ae80c.js +1 -0
- package/dist/web/_next/static/chunks/8173.b82aa1855e641605.js +1 -0
- package/dist/web/_next/static/chunks/8216.b248ebe0af447347.js +8 -0
- package/dist/web/_next/static/chunks/82d3f3cb.23be11b749288234.js +62 -0
- package/dist/web/_next/static/chunks/8381.2d6783c030f8a913.js +27 -0
- package/dist/web/_next/static/chunks/85120a0e.ac16dccf0b8d73d3.js +66 -0
- package/dist/web/_next/static/chunks/8547.0a9997b67008c706.js +1 -0
- package/dist/web/_next/static/chunks/8584.9d5d6c09b0375015.js +1 -0
- package/dist/web/_next/static/chunks/8662.f2663643214caed1.js +38 -0
- package/dist/web/_next/static/chunks/8689.e564346c6e0d16be.js +1 -0
- package/dist/web/_next/static/chunks/9067.832c4761a991f2c2.js +1 -0
- package/dist/web/_next/static/chunks/9125.8589db5ba200cbf1.js +1 -0
- package/dist/web/_next/static/chunks/9202.8dcf7e6a85cc3d36.js +1 -0
- package/dist/web/_next/static/chunks/9249.916a423ac8a07e76.js +1 -0
- package/dist/web/_next/static/chunks/9313.e4f6405d96375c40.js +92 -0
- package/dist/web/_next/static/chunks/937.6d8406b06135134f.js +1 -0
- package/dist/web/_next/static/chunks/9418.1e8f8e14bb5fe3ae.js +217 -0
- package/dist/web/_next/static/chunks/9591.fabd60bd0d10341c.js +1 -0
- package/dist/web/_next/static/chunks/972.db753db904050e48.js +23 -0
- package/dist/web/_next/static/chunks/9747.c8d4ba56c9eef95f.js +1 -0
- package/dist/web/_next/static/chunks/9763.da9015d4a1b533b9.js +36 -0
- package/dist/web/_next/static/chunks/9884.8712c5ed7b044ff2.js +1 -0
- package/dist/web/_next/static/chunks/9891.91a2c59fd073fd48.js +74 -0
- package/dist/web/_next/static/chunks/9984.cdabea5a592e42a1.js +1 -0
- package/dist/web/_next/static/chunks/a9ddb983.8bbb677720017a57.js +122 -0
- package/dist/web/_next/static/chunks/app/_not-found/page-1264c0db9665169c.js +1 -0
- package/dist/web/_next/static/chunks/app/defaults/page-a1f90fe37e302928.js +1 -0
- package/dist/web/_next/static/chunks/app/layout-46efb208d7c88648.js +1 -0
- package/dist/web/_next/static/chunks/app/page-57787f15774d76b8.js +1 -0
- package/dist/web/_next/static/chunks/app/system/page-825f53f14d16033d.js +1 -0
- package/dist/web/_next/static/chunks/c7879cf7-fabe25011515220e.js +1 -0
- package/dist/web/_next/static/chunks/c7ea4e13.9b71b5f026a1d6d4.js +1 -0
- package/dist/web/_next/static/chunks/f99cb6a2.3f570aeba3860608.js +160 -0
- package/dist/web/_next/static/chunks/framework-a8bf4d38dd23845f.js +1 -0
- package/dist/web/_next/static/chunks/main-app-f747f0f5ddb4213b.js +1 -0
- package/dist/web/_next/static/chunks/main-d3bbfb91b54fbcc3.js +1 -0
- package/dist/web/_next/static/chunks/pages/_app-5b348989bba3d570.js +1 -0
- package/dist/web/_next/static/chunks/pages/_error-cf88c6d2cc5868d7.js +1 -0
- package/dist/web/_next/static/chunks/webpack-cb74fa884b8af278.js +1 -0
- package/dist/web/_next/static/css/d3398f485b2a9075.css +1 -0
- package/dist/web/defaults.html +3 -2
- package/dist/web/defaults.txt +16 -16
- package/dist/web/index.html +4 -2
- package/dist/web/index.txt +16 -16
- package/dist/web/system.html +3 -2
- package/dist/web/system.txt +16 -16
- package/package.json +8 -2
- package/prompts/level1.md +32 -12
- package/prompts/review1.md +287 -286
- package/dist/web/_next/static/chunks/12.f1f4d35b52633e8d.js +0 -1
- package/dist/web/_next/static/chunks/131-bae98f790a541679.js +0 -1
- package/dist/web/_next/static/chunks/134-ddd50a7fbb536ec8.js +0 -1
- package/dist/web/_next/static/chunks/163.dbd7d36584d0bb37.js +0 -1
- package/dist/web/_next/static/chunks/220.35531b39410e1a9f.js +0 -1
- package/dist/web/_next/static/chunks/489.158bbe303a595fba.js +0 -1
- package/dist/web/_next/static/chunks/548.71ac96c94136659b.js +0 -1
- package/dist/web/_next/static/chunks/584.6df695c5b86a75aa.js +0 -1
- package/dist/web/_next/static/chunks/67.9ed79e2fbfb56f26.js +0 -1
- package/dist/web/_next/static/chunks/714.1e2338736a70b9c7.js +0 -1
- package/dist/web/_next/static/chunks/747.d2c1249d736dc03b.js +0 -1
- package/dist/web/_next/static/chunks/77.a200abef0f5b4a7f.js +0 -1
- package/dist/web/_next/static/chunks/808-bc7d7eac6d823291.js +0 -1
- package/dist/web/_next/static/chunks/921-dc5538cd779c6432.js +0 -1
- package/dist/web/_next/static/chunks/app/_not-found/page-0d0d8e7e62efca12.js +0 -1
- package/dist/web/_next/static/chunks/app/defaults/page-edd7534ca9ecf366.js +0 -1
- package/dist/web/_next/static/chunks/app/layout-8f99a164d76897a0.js +0 -1
- package/dist/web/_next/static/chunks/app/page-4bed816eda370d0c.js +0 -1
- package/dist/web/_next/static/chunks/app/system/page-1cf9e75e76da59ed.js +0 -1
- package/dist/web/_next/static/chunks/c7879cf7-b5ab1053c1d9a2e7.js +0 -1
- package/dist/web/_next/static/chunks/framework-9ac6a346bd42cedd.js +0 -1
- package/dist/web/_next/static/chunks/main-6be4444e2d667e41.js +0 -1
- package/dist/web/_next/static/chunks/main-app-e3a5f713ba31557e.js +0 -1
- package/dist/web/_next/static/chunks/pages/_app-32d20d5a04949d29.js +0 -1
- package/dist/web/_next/static/chunks/pages/_error-abbab53f25ea29b0.js +0 -1
- package/dist/web/_next/static/chunks/webpack-77147e31d2125631.js +0 -1
- package/dist/web/_next/static/css/3bea264adc472bc8.css +0 -1
- /package/dist/web/_next/static/{_1zhoDsMOPAH2xW702E5A → WuIGWiKKh_ESR3KwzsLZF}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7496],{19777:(t,e,i)=>{i.d(e,{o:()=>r});var r=(0,i(36744).K)(()=>`
|
|
2
|
+
/* Font Awesome icon styling - consolidated */
|
|
3
|
+
.label-icon {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
height: 1em;
|
|
6
|
+
overflow: visible;
|
|
7
|
+
vertical-align: -0.125em;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.node .label-icon path {
|
|
11
|
+
fill: currentColor;
|
|
12
|
+
stroke: revert;
|
|
13
|
+
stroke-width: revert;
|
|
14
|
+
}
|
|
15
|
+
`,"getIconStyles")},27496:(t,e,i)=>{i.d(e,{diagram:()=>Y});var r=i(19777),n=i(66926),a=i(97562);i(13318);var s=i(36744),l=i(13226),o=function(){var t=(0,s.K)(function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},"o"),e=[6,8,10,11,12,14,16,17,18],i=[1,9],r=[1,10],n=[1,11],a=[1,12],l=[1,13],o=[1,14],c={trace:(0,s.K)(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:(0,s.K)(function(t,e,i,r,n,a,s){var l=a.length-1;switch(n){case 1:return a[l-1];case 2:case 6:case 7:this.$=[];break;case 3:a[l-1].push(a[l]),this.$=a[l-1];break;case 4:case 5:this.$=a[l];break;case 8:r.setDiagramTitle(a[l].substr(6)),this.$=a[l].substr(6);break;case 9:this.$=a[l].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[l].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[l].substr(8)),this.$=a[l].substr(8);break;case 13:r.addTask(a[l-1],a[l]),this.$="task"}},"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:i,12:r,14:n,16:a,17:l,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:i,12:r,14:n,16:a,17:l,18:o},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:(0,s.K)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,s.K)(function(t){var e=this,i=[0],r=[],n=[null],a=[],l=this.table,o="",c=0,h=0,u=0,p=a.slice.call(arguments,1),y=Object.create(this.lexer),d={};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d[f]=this.yy[f]);y.setInput(t,d),d.lexer=y,d.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;a.push(g);var x=y.options&&y.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||y.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.parseError?this.parseError=d.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K)(function(t){i.length=i.length-2*t,n.length=n.length-t,a.length=a.length-t},"popStack"),(0,s.K)(m,"lex");for(var k,_,b,v,w,K,$,T,M,E={};;){if(b=i[i.length-1],this.defaultActions[b]?v=this.defaultActions[b]:(null==k&&(k=m()),v=l[b]&&l[b][k]),void 0===v||!v.length||!v[0]){var S="";for(K in M=[],l[b])this.terminals_[K]&&K>2&&M.push("'"+this.terminals_[K]+"'");S=y.showPosition?"Parse error on line "+(c+1)+":\n"+y.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(S,{text:y.match,token:this.terminals_[k]||k,line:y.yylineno,loc:g,expected:M})}if(v[0]instanceof Array&&v.length>1)throw Error("Parse Error: multiple actions possible at state: "+b+", token: "+k);switch(v[0]){case 1:i.push(k),n.push(y.yytext),a.push(y.yylloc),i.push(v[1]),k=null,_?(k=_,_=null):(h=y.yyleng,o=y.yytext,c=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if($=this.productions_[v[1]][1],E.$=n[n.length-$],E._$={first_line:a[a.length-($||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-($||1)].first_column,last_column:a[a.length-1].last_column},x&&(E._$.range=[a[a.length-($||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(E,[o,h,c,d,v[1],n,a].concat(p))))return w;$&&(i=i.slice(0,-1*$*2),n=n.slice(0,-1*$),a=a.slice(0,-1*$)),i.push(this.productions_[v[1]][0]),n.push(E.$),a.push(E._$),T=l[i[i.length-2]][i[i.length-1]],i.push(T);break;case 3:return!0}}return!0},"parse")};function h(){this.yy={}}return c.lexer={EOF:1,parseError:(0,s.K)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,s.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:(0,s.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=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),i.length-1&&(this.yylineno-=i.length-1);var n=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:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K)(function(){return this._more=!0,this},"more"),reject:(0,s.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K)(function(t,e){var i,r,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var a in n)this[a]=n[a];return!1},"test_match"),next:(0,s.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,r,n=this._currentRules(),a=0;a<n.length;a++)if((i=this._input.match(this.rules[n[a]]))&&(!e||i[0].length>e[0].length)){if(e=i,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[a])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K)(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:(0,s.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K)(function(t,e,i,r){switch(i){case 0:case 1:case 3:case 4:break;case 2:return 10;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}}},(0,s.K)(h,"Parser"),h.prototype=c,c.Parser=h,new h}();o.parser=o;var c="",h=[],u=[],p=[],y=(0,s.K)(function(){h.length=0,u.length=0,c="",p.length=0,(0,a.IU)()},"clear"),d=(0,s.K)(function(t){c=t,h.push(t)},"addSection"),f=(0,s.K)(function(){return h},"getSections"),g=(0,s.K)(function(){let t=_(),e=0;for(;!t&&e<100;)t=_(),e++;return u.push(...p),u},"getTasks"),x=(0,s.K)(function(){let t=[];return u.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),m=(0,s.K)(function(t,e){let i=e.substr(1).split(":"),r=0,n=[];1===i.length?(r=Number(i[0]),n=[]):(r=Number(i[0]),n=i[1].split(","));let a=n.map(t=>t.trim()),s={section:c,type:c,people:a,task:t,score:r};p.push(s)},"addTask"),k=(0,s.K)(function(t){let e={section:c,type:c,description:t,task:t,classes:[]};u.push(e)},"addTaskOrg"),_=(0,s.K)(function(){let t=(0,s.K)(function(t){return p[t].processed},"compileTask"),e=!0;for(let[i,r]of p.entries())t(i),e=e&&r.processed;return e},"compileTasks"),b=(0,s.K)(function(){return x()},"getActors"),v={getConfig:(0,s.K)(()=>(0,a.D7)().journey,"getConfig"),clear:y,setDiagramTitle:a.ke,getDiagramTitle:a.ab,setAccTitle:a.SV,getAccTitle:a.iN,setAccDescription:a.EI,getAccDescription:a.m7,addSection:d,getSections:f,getTasks:g,addTask:m,addTaskOrg:k,getActors:b},w=(0,s.K)(t=>`.label {
|
|
16
|
+
font-family: ${t.fontFamily};
|
|
17
|
+
color: ${t.textColor};
|
|
18
|
+
}
|
|
19
|
+
.mouth {
|
|
20
|
+
stroke: #666;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
line {
|
|
24
|
+
stroke: ${t.textColor}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.legend {
|
|
28
|
+
fill: ${t.textColor};
|
|
29
|
+
font-family: ${t.fontFamily};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.label text {
|
|
33
|
+
fill: #333;
|
|
34
|
+
}
|
|
35
|
+
.label {
|
|
36
|
+
color: ${t.textColor}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.face {
|
|
40
|
+
${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
|
|
41
|
+
stroke: #999;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.node rect,
|
|
45
|
+
.node circle,
|
|
46
|
+
.node ellipse,
|
|
47
|
+
.node polygon,
|
|
48
|
+
.node path {
|
|
49
|
+
fill: ${t.mainBkg};
|
|
50
|
+
stroke: ${t.nodeBorder};
|
|
51
|
+
stroke-width: 1px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.node .label {
|
|
55
|
+
text-align: center;
|
|
56
|
+
}
|
|
57
|
+
.node.clickable {
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.arrowheadPath {
|
|
62
|
+
fill: ${t.arrowheadColor};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.edgePaths .path {
|
|
66
|
+
stroke: ${t.lineColor};
|
|
67
|
+
stroke-width: 1.5px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.flowchart-link {
|
|
71
|
+
stroke: ${t.lineColor};
|
|
72
|
+
fill: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.edgeLabel {
|
|
76
|
+
background-color: ${t.edgeLabelBackground};
|
|
77
|
+
rect {
|
|
78
|
+
opacity: 0.5;
|
|
79
|
+
}
|
|
80
|
+
text-align: center;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.cluster rect {
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cluster text {
|
|
87
|
+
fill: ${t.titleColor};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
div.mermaidTooltip {
|
|
91
|
+
position: absolute;
|
|
92
|
+
text-align: center;
|
|
93
|
+
max-width: 200px;
|
|
94
|
+
padding: 2px;
|
|
95
|
+
font-family: ${t.fontFamily};
|
|
96
|
+
font-size: 12px;
|
|
97
|
+
background: ${t.tertiaryColor};
|
|
98
|
+
border: 1px solid ${t.border2};
|
|
99
|
+
border-radius: 2px;
|
|
100
|
+
pointer-events: none;
|
|
101
|
+
z-index: 100;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.task-type-0, .section-type-0 {
|
|
105
|
+
${t.fillType0?`fill: ${t.fillType0}`:""};
|
|
106
|
+
}
|
|
107
|
+
.task-type-1, .section-type-1 {
|
|
108
|
+
${t.fillType0?`fill: ${t.fillType1}`:""};
|
|
109
|
+
}
|
|
110
|
+
.task-type-2, .section-type-2 {
|
|
111
|
+
${t.fillType0?`fill: ${t.fillType2}`:""};
|
|
112
|
+
}
|
|
113
|
+
.task-type-3, .section-type-3 {
|
|
114
|
+
${t.fillType0?`fill: ${t.fillType3}`:""};
|
|
115
|
+
}
|
|
116
|
+
.task-type-4, .section-type-4 {
|
|
117
|
+
${t.fillType0?`fill: ${t.fillType4}`:""};
|
|
118
|
+
}
|
|
119
|
+
.task-type-5, .section-type-5 {
|
|
120
|
+
${t.fillType0?`fill: ${t.fillType5}`:""};
|
|
121
|
+
}
|
|
122
|
+
.task-type-6, .section-type-6 {
|
|
123
|
+
${t.fillType0?`fill: ${t.fillType6}`:""};
|
|
124
|
+
}
|
|
125
|
+
.task-type-7, .section-type-7 {
|
|
126
|
+
${t.fillType0?`fill: ${t.fillType7}`:""};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.actor-0 {
|
|
130
|
+
${t.actor0?`fill: ${t.actor0}`:""};
|
|
131
|
+
}
|
|
132
|
+
.actor-1 {
|
|
133
|
+
${t.actor1?`fill: ${t.actor1}`:""};
|
|
134
|
+
}
|
|
135
|
+
.actor-2 {
|
|
136
|
+
${t.actor2?`fill: ${t.actor2}`:""};
|
|
137
|
+
}
|
|
138
|
+
.actor-3 {
|
|
139
|
+
${t.actor3?`fill: ${t.actor3}`:""};
|
|
140
|
+
}
|
|
141
|
+
.actor-4 {
|
|
142
|
+
${t.actor4?`fill: ${t.actor4}`:""};
|
|
143
|
+
}
|
|
144
|
+
.actor-5 {
|
|
145
|
+
${t.actor5?`fill: ${t.actor5}`:""};
|
|
146
|
+
}
|
|
147
|
+
${(0,r.o)()}
|
|
148
|
+
`,"getStyles"),K=(0,s.K)(function(t,e){return(0,n.tk)(t,e)},"drawRect"),$=(0,s.K)(function(t,e){let i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");function n(t){let i=(0,l.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(t){let i=(0,l.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(t){t.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 r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,s.K)(n,"smile"),(0,s.K)(a,"sad"),(0,s.K)(o,"ambivalent"),e.score>3?n(r):e.score<3?a(r):o(r),i},"drawFace"),T=(0,s.K)(function(t,e){let i=t.append("circle");return i.attr("cx",e.cx),i.attr("cy",e.cy),i.attr("class","actor-"+e.pos),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("r",e.r),void 0!==i.class&&i.attr("class",i.class),void 0!==e.title&&i.append("title").text(e.title),i},"drawCircle"),M=(0,s.K)(function(t,e){return(0,n.m)(t,e)},"drawText"),E=(0,s.K)(function(t,e,i){let r=t.append("g"),a=(0,n.PB)();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),a.height=i.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,K(r,a),I(i)(e.text,r,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},i,e.colour)},"drawSection"),S=-1,C=(0,s.K)(function(t,e,i,r){let a=e.x+i.width/2,s=t.append("g");S++,s.append("line").attr("id",r+"-task"+S).attr("x1",a).attr("y1",e.y).attr("x2",a).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),$(s,{cx:a,cy:300+(5-e.score)*30,score:e.score});let l=(0,n.PB)();l.x=e.x,l.y=e.y,l.fill=e.fill,l.width=i.width,l.height=i.height,l.class="task task-type-"+e.num,l.rx=3,l.ry=3,K(s,l);let o=e.x+14;e.people.forEach(t=>{let i=e.actors[t].color;T(s,{cx:o,cy:e.y,r:7,fill:i,stroke:"#000",title:t,pos:e.actors[t].position}),o+=10}),I(i)(e.task,s,l.x,l.y,l.width,l.height,{class:"task"},i,e.colour)},"drawTask"),I=function(){function t(t,e,i,n,a,s,l,o){r(e.append("text").attr("x",i+a/2).attr("y",n+s/2+5).style("font-color",o).style("text-anchor","middle").text(t),l)}function e(t,e,i,n,a,s,l,o,c){let{taskFontSize:h,taskFontFamily:u}=o,p=t.split(/<br\s*\/?>/gi);for(let t=0;t<p.length;t++){let o=t*h-h*(p.length-1)/2,y=e.append("text").attr("x",i+a/2).attr("y",n).attr("fill",c).style("text-anchor","middle").style("font-size",h).style("font-family",u);y.append("tspan").attr("x",i+a/2).attr("dy",o).text(p[t]),y.attr("y",n+s/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,l)}}function i(t,i,n,a,s,l,o,c){let h=i.append("switch"),u=h.append("foreignObject").attr("x",n).attr("y",a).attr("width",s).attr("height",l).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,h,n,a,s,l,o,c),r(u,o)}function r(t,e){for(let i in e)i in e&&t.attr(i,e[i])}return(0,s.K)(t,"byText"),(0,s.K)(e,"byTspan"),(0,s.K)(i,"byFo"),(0,s.K)(r,"_setTextAttrs"),function(r){return"fo"===r.textPlacement?i:"old"===r.textPlacement?t:e}}(),P={drawCircle:T,drawSection:E,drawText:M,drawTask:C,initGraphics:(0,s.K)(function(t,e){S=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics")},A=(0,s.K)(function(t){Object.keys(t).forEach(function(e){V[e]=t[e]})},"setConf"),j={},L=0;function D(t){let e=(0,a.D7)().journey,i=e.maxLabelWidth;L=0;let r=60;Object.keys(j).forEach(n=>{let a=j[n].color,s={cx:20,cy:r,r:7,fill:a,stroke:"#000",pos:j[n].position};P.drawCircle(t,s);let l=t.append("text").attr("visibility","hidden").text(n),o=l.node().getBoundingClientRect().width;l.remove();let c=[];if(o<=i)c=[n];else{let e=n.split(" "),r="";l=t.append("text").attr("visibility","hidden"),e.forEach(t=>{let e=r?`${r} ${t}`:t;if(l.text(e),l.node().getBoundingClientRect().width>i){if(r&&c.push(r),r=t,l.text(t),l.node().getBoundingClientRect().width>i){let e="";for(let r of t)e+=r,l.text(e+"-"),l.node().getBoundingClientRect().width>i&&(c.push(e.slice(0,-1)+"-"),e=r);r=e}}else r=e}),r&&c.push(r),l.remove()}c.forEach((i,n)=>{let a={x:40,y:r+7+20*n,fill:"#666",text:i,textMargin:e.boxTextMargin??5},s=P.drawText(t,a).node().getBoundingClientRect().width;s>L&&s>e.leftMargin-s&&(L=s)}),r+=Math.max(20,20*c.length)})}(0,s.K)(D,"drawActorLegend");var V=(0,a.D7)().journey,B=0,F=(0,s.K)(function(t,e,i,r){let n,s=(0,a.D7)(),o=s.journey.titleColor,c=s.journey.titleFontSize,h=s.journey.titleFontFamily,u=s.securityLevel;"sandbox"===u&&(n=(0,l.Ltv)("#i"+e));let p="sandbox"===u?(0,l.Ltv)(n.nodes()[0].contentDocument.body):(0,l.Ltv)("body");N.init();let y=p.select("#"+e);P.initGraphics(y,e);let d=r.db.getTasks(),f=r.db.getDiagramTitle(),g=r.db.getActors();for(let t in j)delete j[t];let x=0;g.forEach(t=>{j[t]={color:V.actorColours[x%V.actorColours.length],position:x},x++}),D(y),B=V.leftMargin+L,N.insert(0,0,B,50*Object.keys(j).length),z(y,d,0,e);let m=N.getBounds();f&&y.append("text").text(f).attr("x",B).attr("font-size",c).attr("font-weight","bold").attr("y",25).attr("fill",o).attr("font-family",h);let k=m.stopy-m.starty+2*V.diagramMarginY,_=B+m.stopx+2*V.diagramMarginX;(0,a.a$)(y,k,_,V.useMaxWidth),y.append("line").attr("x1",B).attr("y1",4*V.height).attr("x2",_-B-4).attr("y2",4*V.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");let b=70*!!f;y.attr("viewBox",`${m.startx} -25 ${_} ${k+b}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",k+b+25)},"draw"),N={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:(0,s.K)(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:(0,s.K)(function(t,e,i,r){void 0===t[e]?t[e]=i:t[e]=r(i,t[e])},"updateVal"),updateBounds:(0,s.K)(function(t,e,i,r){let n=(0,a.D7)().journey,l=this,o=0;function c(a){return(0,s.K)(function(s){o++;let c=l.sequenceItems.length-o+1;l.updateVal(s,"starty",e-c*n.boxMargin,Math.min),l.updateVal(s,"stopy",r+c*n.boxMargin,Math.max),l.updateVal(N.data,"startx",t-c*n.boxMargin,Math.min),l.updateVal(N.data,"stopx",i+c*n.boxMargin,Math.max),"activation"!==a&&(l.updateVal(s,"startx",t-c*n.boxMargin,Math.min),l.updateVal(s,"stopx",i+c*n.boxMargin,Math.max),l.updateVal(N.data,"starty",e-c*n.boxMargin,Math.min),l.updateVal(N.data,"stopy",r+c*n.boxMargin,Math.max))},"updateItemBounds")}(0,s.K)(c,"updateFn"),this.sequenceItems.forEach(c())},"updateBounds"),insert:(0,s.K)(function(t,e,i,r){let n=Math.min(t,i),a=Math.max(t,i),s=Math.min(e,r),l=Math.max(e,r);this.updateVal(N.data,"startx",n,Math.min),this.updateVal(N.data,"starty",s,Math.min),this.updateVal(N.data,"stopx",a,Math.max),this.updateVal(N.data,"stopy",l,Math.max),this.updateBounds(n,s,a,l)},"insert"),bumpVerticalPos:(0,s.K)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:(0,s.K)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,s.K)(function(){return this.data},"getBounds")},R=V.sectionFills,O=V.sectionColours,z=(0,s.K)(function(t,e,i,r){let n=(0,a.D7)().journey,s="",l=i+(2*n.height+n.diagramMarginY),o=0,c="#CCC",h="black",u=0;for(let[i,a]of e.entries()){if(s!==a.section){c=R[o%R.length],u=o%R.length,h=O[o%O.length];let r=0,l=a.section;for(let t=i;t<e.length;t++)if(e[t].section==l)r+=1;else break;let p={x:i*n.taskMargin+i*n.width+B,y:50,text:a.section,fill:c,num:u,colour:h,taskCount:r};P.drawSection(t,p,n),s=a.section,o++}let p=a.people.reduce((t,e)=>(j[e]&&(t[e]=j[e]),t),{});a.x=i*n.taskMargin+i*n.width+B,a.y=l,a.width=n.diagramMarginX,a.height=n.diagramMarginY,a.colour=h,a.fill=c,a.num=u,a.actors=p,P.drawTask(t,a,n,r),N.insert(a.x,a.y,a.x+a.width+n.taskMargin,450)}},"drawTasks"),W={setConf:A,draw:F},Y={parser:o,db:v,renderer:W,styles:w,init:(0,s.K)(t=>{W.setConf(t.journey),v.clear()},"init")}},66926:(t,e,i)=>{i.d(e,{CP:()=>u,Ck:()=>d,HT:()=>y,PB:()=>p,aC:()=>h,lC:()=>o,m:()=>c,tk:()=>l});var r=i(97562),n=i(36744),a=i(29178),s=i(13226),l=(0,n.K)((t,e)=>{let i=t.append("rect");if(i.attr("x",e.x),i.attr("y",e.y),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("width",e.width),i.attr("height",e.height),e.name&&i.attr("name",e.name),e.rx&&i.attr("rx",e.rx),e.ry&&i.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)i.attr(t,e.attrs[t]);return e.class&&i.attr("class",e.class),i},"drawRect"),o=(0,n.K)((t,e)=>{l(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),c=(0,n.K)((t,e)=>{let i=e.text.replace(r.H1," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);let a=n.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(i),n},"drawText"),h=(0,n.K)((t,e,i,r)=>{let n=t.append("image");n.attr("x",e),n.attr("y",i);let s=(0,a.J)(r);n.attr("xlink:href",s)},"drawImage"),u=(0,n.K)((t,e,i,r)=>{let n=t.append("use");n.attr("x",e),n.attr("y",i);let s=(0,a.J)(r);n.attr("xlink:href",`#${s}`)},"drawEmbeddedImage"),p=(0,n.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),y=(0,n.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),d=(0,n.K)(()=>{let t=(0,s.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,s.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7500],{1758:(e,t,a)=>{a.d(t,{y:()=>d});var n=a(73365),l=a(98078),r=a(8205),i=a(5462);let s=[{value:"system",label:"theme.system"},{value:"light",label:"theme.light"},{value:"dark",label:"theme.dark"}],o={small:"ap.sizeSmall",normal:"ap.sizeNormal",large:"ap.sizeLarge",huge:"ap.sizeHuge",giant:"ap.sizeGiant"},c=[{name:"nightLight",label:"ap.night"},{name:"underlineLinks",label:"ap.links"},{name:"reduceMotion",label:"ap.motion"},{name:"highContrast",label:"ap.contrast"},{name:"strongFocus",label:"ap.focus"},{name:"systemCursor",label:"ap.systemCursor"}];function d(){let{t:e}=(0,r.kj)(),{appearance:t,set:a,reset:d,loaded:h}=(0,l.KP)(),p=(0,i.f)("below"),m=l.Xm.indexOf(t.textSize);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{ref:p.anchor,type:"button",className:"lang-btn ap-btn".concat(p.open?" on":""),"aria-label":e("wb.appearance"),title:e("wb.appearance"),"aria-expanded":p.open,"aria-controls":p.open?p.id:void 0,onClick:p.toggle,children:[(0,n.jsxs)("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"8.5"}),(0,n.jsx)("path",{d:"M12 3.5a8.5 8.5 0 0 1 0 17z",fill:"currentColor",stroke:"none"})]}),(0,n.jsx)("span",{"aria-hidden":"true",children:e("nav.appearance")})]}),p.open&&(0,n.jsxs)("div",{ref:p.panel,id:p.id,role:"dialog","aria-label":e("wb.appearance"),className:"pop wb-appear",style:p.style,children:[(0,n.jsx)("p",{className:"pop-title",children:e("wb.appearance")}),(0,n.jsx)("p",{className:"wb-appear-label",id:"".concat(p.id,"-theme"),children:e("ap.theme")}),(0,n.jsx)("div",{className:"segmented",role:"group","aria-labelledby":"".concat(p.id,"-theme"),children:s.map(l=>(0,n.jsx)("button",{type:"button","aria-pressed":h&&t.theme===l.value,onClick:()=>a({theme:l.value}),children:e(l.label)},l.value))}),(0,n.jsx)("p",{className:"wb-appear-label",id:"".concat(p.id,"-size"),children:e("ap.size")}),(0,n.jsxs)("div",{className:"wb-appear-size",role:"group","aria-labelledby":"".concat(p.id,"-size"),children:[(0,n.jsx)("button",{type:"button","aria-label":e("ap.smaller"),title:e("ap.smaller"),disabled:m<=0,onClick:()=>a({textSize:l.Xm[m-1]}),children:"A−"}),(0,n.jsx)("span",{"aria-live":"polite",children:e(o[t.textSize])}),(0,n.jsx)("button",{type:"button","aria-label":e("ap.larger"),title:e("ap.larger"),disabled:m>=l.Xm.length-1,onClick:()=>a({textSize:l.Xm[m+1]}),children:"A+"})]}),c.map(l=>(0,n.jsxs)("label",{className:"wb-appear-aid",children:[(0,n.jsx)("input",{type:"checkbox",checked:t[l.name],onChange:e=>a({[l.name]:e.target.checked})}),(0,n.jsx)("span",{children:e(l.label)})]},l.name)),(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("button",{type:"button",className:"quiet small",onClick:d,children:e("ap.reset")})})]})]})}},5462:(e,t,a)=>{a.d(t,{f:()=>r,q:()=>i});var n=a(73365),l=a(1521);function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"below",[t,a]=(0,l.useState)(!1),n=(0,l.useRef)(null),r=(0,l.useRef)(null),i=(0,l.useId)(),[s,o]=(0,l.useState)({visibility:"hidden"}),c=(0,l.useCallback)(()=>a(!1),[]),d=(0,l.useCallback)(()=>a(e=>!e),[]);return(0,l.useLayoutEffect)(()=>{var a;let l,i;if(!t)return void o({visibility:"hidden"});let s=null==(a=n.current)?void 0:a.getBoundingClientRect(),c=r.current;if(!s||!c)return;let d=c.offsetWidth,h=c.offsetHeight;"right"===e?(l=s.right+6,i=Math.min(s.top,window.innerHeight-h-8)):(l=Math.min(s.left,window.innerWidth-d-8),i=s.bottom+6+h>window.innerHeight-8?s.top-6-h:s.bottom+6),o({left:Math.max(8,l),top:Math.max(8,i)})},[t,e]),(0,l.useEffect)(()=>{if(!t)return;let e=e=>{var t,l;let i=e.target;(null==(t=r.current)?void 0:t.contains(i))||(null==(l=n.current)?void 0:l.contains(i))||a(!1)},l=e=>{var t;"Escape"===e.key&&(a(!1),null==(t=n.current)||t.focus())},i=()=>a(!1);return document.addEventListener("pointerdown",e,!0),document.addEventListener("keydown",l),window.addEventListener("resize",i),()=>{document.removeEventListener("pointerdown",e,!0),document.removeEventListener("keydown",l),window.removeEventListener("resize",i)}},[t]),{open:t,setOpen:a,toggle:d,close:c,anchor:n,panel:r,style:s,id:i}}function i(e){let{label:t,text:a}=e,l=r("below");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{ref:l.anchor,type:"button",className:"info-btn","aria-label":t,title:t,"aria-expanded":l.open,"aria-controls":l.open?l.id:void 0,onClick:l.toggle,children:"i"}),l.open&&(0,n.jsxs)("div",{ref:l.panel,id:l.id,role:"dialog","aria-label":t,className:"pop info-pop",style:l.style,children:[(0,n.jsx)("p",{className:"pop-title",children:t}),a.split(/\n\s*\n/).map(e=>(0,n.jsx)("p",{children:e},e))]})]})}},24872:(e,t,a)=>{a.d(t,{D:()=>i,i:()=>s});var n=a(73365),l=a(1521),r=a(8205);async function i(e){try{return await navigator.clipboard.writeText(e),!0}catch(e){}try{let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();let a=document.execCommand("copy");return t.remove(),a}catch(e){return!1}}function s(e){let{text:t,what:a,className:s=""}=e,{t:o}=(0,r.kj)(),[c,d]=(0,l.useState)(""),h=(0,l.useRef)(void 0);(0,l.useEffect)(()=>()=>window.clearTimeout(h.current),[]);let p=async()=>{d(await i(t)?"copied":"failed"),window.clearTimeout(h.current),h.current=window.setTimeout(()=>d(""),2e3)};return(0,n.jsx)("button",{type:"button",className:"quiet small copy-btn ".concat(s).trim(),onClick:()=>void p(),title:o(a),"aria-label":o(a),children:(0,n.jsx)("span",{"aria-live":"polite",children:o("copied"===c?"copy.copied":"failed"===c?"copy.failed":"copy.copy")})})}},36657:(e,t,a)=>{a.d(t,{M:()=>f,U:()=>m});var n=a(73365),l=a(1521),r=a(18197),i=a.n(r),s=a(1702),o=a(15549),c=a(8205),d=a(51035),h=a(87527),p=a(79717);function m(){let{t:e}=(0,c.kj)(),t=(0,s.usePathname)(),[a,r]=(0,l.useState)([]),[i,d]=(0,l.useState)({}),p=(0,l.useRef)({}),m=(0,l.useRef)(new Set),f=(0,l.useRef)(""),x=(0,l.useCallback)(async()=>{try{let e=await o.FH.approvals();r(e);let t=[...new Set(e.map(e=>e.sessionId).filter(e=>!(e in p.current)))],a=t.sort().join(",");if(t.length>0&&a!==f.current){for(let e of(f.current=a,await o.FH.sessions().catch(()=>[])))p.current[e.id]=e.name,"chat"===e.kind&&m.current.add(e.id);d({...p.current})}}catch(e){}},[]);(0,h.z)(x,2e3),(0,l.useEffect)(()=>{let t="copilot-operator";document.title=a.length>0?"(".concat(a.length,") ").concat(e("approval.tabTitle")," — ").concat(t):t},[a.length,e]);let v="/"===t?a.filter(e=>e.sessionId in p.current&&(!m.current.has(e.sessionId)||!!e.model)):a;return 0===v.length?null:(0,n.jsxs)("section",{className:"approval-banner",role:"alert","aria-live":"assertive",children:[(0,n.jsx)("h2",{children:e("approval.waitingHere")}),(0,n.jsx)("p",{className:"small",children:e("approval.waitingHereWhy")}),v.map(e=>{var t;return(0,n.jsx)(u,{approval:e,sessionName:null!=(t=i[e.sessionId])?t:e.sessionId,onDecided:()=>void x()},e.id)})]})}function u(e){let{approval:t,sessionName:a,onDecided:r}=e,{t:s}=(0,c.kj)(),h=(0,c.W3)(),[p,m]=(0,l.useState)(!1),[u,x]=(0,l.useState)(""),v=(0,l.useRef)(!1),g=async e=>{if(!v.current&&("run-all"!==e||await (0,d.Z)(s("approval.runAllConfirm")))){v.current=!0,m(!0),x("");try{await o.FH.decide(t.id,e)}catch(e){x(e.message)}finally{v.current=!1,m(!1),r()}}};if(t.plan)return(0,n.jsx)(f,{approval:t,sessionName:a,onDecided:r});if(t.model){var j;let e=t.model;return(0,n.jsxs)("div",{className:"approval",children:[(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("strong",{children:s(e.manual?"approval.manualTitle":"approval.modelTitle")}),(0,n.jsx)(i(),{href:"/",children:a}),(0,n.jsx)("span",{className:"muted small",children:h(t.createdAt)})]}),e.review&&(0,n.jsxs)("div",{className:"approval-review",role:"note",children:[(0,n.jsx)("strong",{children:s("approval.reviewModelTitle")}),(0,n.jsx)("span",{children:s("approval.reviewModelWhy")})]}),e.role&&(0,n.jsxs)("div",{className:"approval-review",role:"note",children:[(0,n.jsx)("strong",{children:s("lead"===e.role?"approval.leadModelTitle":"approval.workerModelTitle")}),(0,n.jsx)("span",{children:s("lead"===e.role?"approval.leadModelWhy":"approval.workerModelWhy")})]}),(0,n.jsx)("p",{children:e.manual?e.asked?s("approval.manualAsk",{model:e.asked}):s("approval.manualAskAny"):s("approval.modelAsk",{model:e.asked})}),(0,n.jsx)("p",{className:"muted small",children:s("approval.modelShown",{shown:null!=(j=e.shown)?j:"—"})}),!e.manual&&(0,n.jsx)("p",{className:"reason small",children:s("approval.modelWhy",{why:e.why,tries:e.tries})}),u&&(0,n.jsx)("p",{className:"err",role:"alert",children:u}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("button",{className:"primary",disabled:p,onClick:()=>void g("run"),children:s(e.manual?"approval.manualReady":"approval.modelChosen")}),!e.manual&&(0,n.jsx)("button",{disabled:p,onClick:()=>void g("skip"),children:s("approval.modelAsItIs")}),(0,n.jsx)("button",{className:"danger",disabled:p,onClick:()=>void g("abort"),children:s("approval.modelStop")})]})]})}return(0,n.jsxs)("div",{className:"approval",children:[(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("strong",{children:s("approval.title",{n:t.stepId})}),(0,n.jsx)(i(),{href:"/",children:a}),(0,n.jsx)("span",{className:"muted small",children:h(t.createdAt)})]}),(0,n.jsx)("pre",{style:{margin:"8px 0"},children:t.description}),t.network&&(0,n.jsx)("p",{className:"reason small",children:s("approval.network")}),u&&(0,n.jsx)("p",{className:"err",role:"alert",children:u}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("button",{className:"primary",disabled:p,onClick:()=>void g("run"),children:s("approval.run")}),!t.network&&(0,n.jsx)("button",{disabled:p,onClick:()=>void g("run-all"),title:s("approval.runAllWhy"),children:s("approval.runAll")}),(0,n.jsx)("button",{disabled:p,onClick:()=>void g("skip"),children:s("approval.skip")}),(0,n.jsx)("button",{className:"danger",disabled:p,onClick:()=>void g("abort"),children:s("approval.abort")})]})]})}function f(e){let{approval:t,sessionName:a,onDecided:r}=e,{t:s}=(0,c.kj)(),h=(0,c.W3)(),[m,u]=(0,l.useState)(""),[f,x]=(0,l.useState)(!1),[v,g]=(0,l.useState)(""),j=(0,l.useRef)(!1),b=t.plan,w=async e=>{if(j.current)return;if("revise"===e&&!m.trim())return void g(s("pm.reviseNeedsNote"));if("stop"===e&&!await (0,d.Z)(s("pm.stopConfirm")))return;j.current=!0,x(!0),g("");let a=!1;try{await o.FH.decidePlan(t.id,e,m),a=!0}catch(e){g(e.message)}finally{j.current=!1,x(!1),r(a)}};return(0,n.jsxs)("div",{className:"approval",children:[(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("strong",{children:s("pm.cardTitle",{title:b.title})}),void 0!==a&&(0,n.jsx)(i(),{href:"/",children:a}),(0,n.jsx)("span",{className:"muted small",children:h(t.createdAt)})]}),(0,n.jsx)("p",{className:"small",children:s("pm.cardWhy")}),(0,n.jsx)(p.D,{plan:b.plan,showApproval:!1}),(0,n.jsx)("label",{htmlFor:"plan-note-".concat(t.id),children:s("pm.note")}),(0,n.jsx)("textarea",{id:"plan-note-".concat(t.id),className:"prose",value:m,onChange:e=>u(e.target.value),placeholder:s("pm.notePlaceholder"),style:{minHeight:70},disabled:f}),v&&(0,n.jsx)("p",{className:"err",role:"alert",children:v}),(0,n.jsxs)("div",{className:"row",children:[(0,n.jsx)("button",{className:"primary",disabled:f,onClick:()=>void w("approve"),children:s("pm.approve")}),(0,n.jsx)("button",{disabled:f,onClick:()=>void w("revise"),title:s("pm.reviseWhy"),children:s("pm.revise")}),(0,n.jsx)("button",{className:"danger",disabled:f,onClick:()=>void w("stop"),children:s("pm.stop")})]})]})}},46575:(e,t,a)=>{a.d(t,{c:()=>c});var n=a(73365),l=a(99755),r=a(8205);let i={gb:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"20",fill:"#012169"}),(0,n.jsx)("path",{d:"M0 0 30 20M30 0 0 20",stroke:"#fff",strokeWidth:"4"}),(0,n.jsx)("path",{d:"M0 0 30 20M30 0 0 20",stroke:"#c8102e",strokeWidth:"1.4"}),(0,n.jsx)("path",{d:"M15 0v20M0 10h30",stroke:"#fff",strokeWidth:"6"}),(0,n.jsx)("path",{d:"M15 0v20M0 10h30",stroke:"#c8102e",strokeWidth:"3.4"})]}),bg:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"20",fill:"#fff"}),(0,n.jsx)("rect",{y:"6.67",width:"30",height:"6.67",fill:"#00966e"}),(0,n.jsx)("rect",{y:"13.33",width:"30",height:"6.67",fill:"#d62612"})]}),de:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"6.67",fill:"#000"}),(0,n.jsx)("rect",{y:"6.67",width:"30",height:"6.67",fill:"#dd0000"}),(0,n.jsx)("rect",{y:"13.33",width:"30",height:"6.67",fill:"#ffce00"})]}),es:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"20",fill:"#aa151b"}),(0,n.jsx)("rect",{y:"5",width:"30",height:"10",fill:"#f1bf00"}),(0,n.jsx)("rect",{x:"7",y:"7.5",width:"3.4",height:"5",rx:"0.8",fill:"#aa151b",opacity:"0.85"})]}),fr:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"10",height:"20",fill:"#002395"}),(0,n.jsx)("rect",{x:"10",width:"10",height:"20",fill:"#fff"}),(0,n.jsx)("rect",{x:"20",width:"10",height:"20",fill:"#ed2939"})]}),pt:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"12",height:"20",fill:"#006600"}),(0,n.jsx)("rect",{x:"12",width:"18",height:"20",fill:"#ff0000"}),(0,n.jsx)("circle",{cx:"12",cy:"10",r:"4.2",fill:"none",stroke:"#ffcc00",strokeWidth:"1.4"}),(0,n.jsx)("path",{d:"M10.3 7.8h3.4v3.2a1.7 1.7 0 0 1-3.4 0z",fill:"#fff",stroke:"#d00",strokeWidth:"0.6"})]}),jp:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"20",fill:"#fff"}),(0,n.jsx)("circle",{cx:"15",cy:"10",r:"6",fill:"#bc002d"})]}),kr:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"20",fill:"#fff"}),(0,n.jsx)("path",{d:"M10 10a5 5 0 0 1 10 0 2.5 2.5 0 0 1-5 0 2.5 2.5 0 0 0-5 0z",fill:"#cd2e3a"}),(0,n.jsx)("path",{d:"M10 10a5 5 0 0 0 10 0 2.5 2.5 0 0 0-5 0 2.5 2.5 0 0 1-5 0z",fill:"#0047a0"}),(0,n.jsxs)("g",{stroke:"#000",strokeWidth:"0.9",children:[(0,n.jsx)("path",{d:"M4.2 5.6 6.8 2.4M5.1 6.3 7.7 3.1M6 7 8.6 3.8"}),(0,n.jsx)("path",{d:"M21.4 3.8 24 7M22.3 3.1 24.9 6.3M23.2 2.4 25.8 5.6"}),(0,n.jsx)("path",{d:"M4.2 14.4 6.8 17.6M5.1 13.7 7.7 16.9M6 13 8.6 16.2"}),(0,n.jsx)("path",{d:"M21.4 16.2 24 13M22.3 16.9 24.9 13.7M23.2 17.6 25.8 14.4"})]})]}),sa:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("rect",{width:"30",height:"20",fill:"#006c35"}),(0,n.jsx)("path",{d:"M7 8.2c1-.9 2 .9 3 0s2 .9 3 0 2 .9 3 0 2 .9 3 0 2 .9 3 0",fill:"none",stroke:"#fff",strokeWidth:"1.1",strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M8 12.6h13.4M21.4 12.6l1.6-.9M9.6 11.6v2",stroke:"#fff",strokeWidth:"1",strokeLinecap:"round"})]})};function s(e){let{id:t}=e;return(0,n.jsx)("svg",{className:"flag",viewBox:"0 0 30 20","aria-hidden":"true",focusable:"false",children:i[t]})}var o=a(5462);function c(){let{locale:e,setLocale:t}=(0,r.Ym)(),{t:a}=(0,r.kj)(),i=(0,o.f)("below");return(0,n.jsxs)("span",{className:"lang-menu",children:[(0,n.jsxs)("button",{ref:i.anchor,type:"button",className:"lang-btn","aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.id:void 0,onClick:i.toggle,title:a("lang.menu"),children:[(0,n.jsxs)("svg",{className:"lang-globe",viewBox:"0 0 16 16","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"8",cy:"8",r:"6.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3"}),(0,n.jsx)("path",{d:"M1.5 8h13M8 1.5c2 2 2.8 4 2.8 6.5S10 12.5 8 14.5M8 1.5C6 3.5 5.2 5.5 5.2 8S6 12.5 8 14.5",fill:"none",stroke:"currentColor",strokeWidth:"1.1"})]}),(0,n.jsx)("span",{lang:"en",children:a("lang.label")}),(0,n.jsx)("span",{"aria-hidden":"true",children:"▾"})]}),i.open&&(0,n.jsx)("div",{ref:i.panel,id:i.id,role:"menu","aria-label":a("lang.menu"),className:"pop menu lang-list",style:i.style,children:l.Yj.map(a=>(0,n.jsxs)("button",{type:"button",role:"menuitemradio","aria-checked":a.code===e,onClick:()=>{t(a.code),i.close()},children:[(0,n.jsx)(s,{id:a.flag}),(0,n.jsx)("span",{className:"lang-native",lang:a.code,dir:a.dir,children:a.native}),"en"!==a.code&&(0,n.jsx)("span",{className:"lang-english muted small",lang:"en",children:a.english}),(0,n.jsx)("span",{className:"lang-tick","aria-hidden":"true",children:a.code===e?"✓":""})]},a.code))})]})}},51035:(e,t,a)=>{a.d(t,{DialogHost:()=>d,Z:()=>c});var n=a(73365),l=a(1521),r=a(8205),i=a(94969);let s=null,o=[];function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(a=>{var n;return n={kind:"confirm",message:e,...t,resolve:a},void(s?s(n):o.push(n))})}function d(e){var t,a;let{children:c}=e,{t:d}=(0,r.kj)(),[h,p]=(0,l.useState)([]),m=(0,l.useRef)(null),u=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(s=e=>p(t=>[...t,e]),o.length>0){let e=o.splice(0,o.length);p(t=>[...t,...e])}return()=>{s=null}},[]);let f=h[0],x=(0,l.useCallback)(e=>{f&&(f.resolve(e),p(e=>e.slice(1)))},[f]);return(0,i.V)(u,!!f,m),(0,l.useEffect)(()=>{if(!f)return;let e=e=>{"Escape"===e.key&&(e.preventDefault(),x(!1))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[f,x]),(0,n.jsxs)(n.Fragment,{children:[c,f&&(0,n.jsx)("div",{className:"modal-backdrop",onClick:()=>x(!1),role:"presentation",children:(0,n.jsxs)("div",{ref:u,className:"modal".concat(f.danger?" danger":""),role:"confirm"===f.kind?"alertdialog":"dialog","aria-modal":"true","aria-labelledby":"modal-title","aria-describedby":"modal-body",onClick:e=>e.stopPropagation(),children:[(0,n.jsx)("h2",{id:"modal-title",children:null!=(t=f.title)?t:d("confirm"===f.kind?"dialog.confirmTitle":"dialog.noticeTitle")}),(0,n.jsx)("div",{id:"modal-body",className:"modal-body",children:f.message}),(0,n.jsxs)("div",{className:"row modal-actions",children:["confirm"===f.kind&&(0,n.jsx)("button",{type:"button",className:"quiet",onClick:()=>x(!1),children:d("dialog.cancel")}),(0,n.jsx)("button",{ref:m,type:"button",className:f.danger?"danger":"primary",onClick:()=>x(!0),children:null!=(a=f.okLabel)?a:d("dialog.ok")})]})]})})]})}},79717:(e,t,a)=>{a.d(t,{D:()=>i});var n=a(73365),l=a(8205),r=a(24872);function i(e){var t,a;let{plan:i,showApproval:s=!0}=e,{t:o}=(0,l.kj)(),c=(0,l.W3)(),d=i.approved,h=function(e,t){var a;let n=(e,a)=>a.trim()?["## ".concat(t(e)),"",a.trim(),""]:[];return[...n("pm.existing",e.existing),...n("pm.approach",e.approach),...n("pm.steps",e.steps.map((e,t)=>"".concat(t+1,". ").concat(e.trim())).join("\n")),...n("pm.files",e.files.map(e=>"- `".concat(e,"`")).join("\n")),...n("pm.verification",e.verification),...n("pm.risks",null!=(a=e.risks)?a:"")].join("\n").trim()}(i,o);return(0,n.jsxs)("div",{className:"plan-view",children:[(0,n.jsxs)("div",{className:"plan-view-head",children:[(0,n.jsx)("p",{className:"small muted",children:o("pm.version",{n:i.version,at:c(i.at)})}),(0,n.jsx)(r.i,{text:h,what:"pm.copyPlan"})]}),s&&d&&(0,n.jsxs)("p",{className:"small",children:["operator"===d.by?o("pm.approvedByOperator",{at:c(d.at)}):o("pm.approvedAuto",{at:c(d.at)}),d.why&&" ".concat(d.why),d.note&&" ".concat(o("pm.approvedNote",{note:d.note}))]}),(0,n.jsx)("h4",{children:o("pm.existing")}),(0,n.jsx)("p",{className:"pre-wrap",children:i.existing}),(0,n.jsx)("h4",{children:o("pm.approach")}),(0,n.jsx)("p",{className:"pre-wrap",children:i.approach}),(0,n.jsx)("h4",{children:o("pm.steps")}),(0,n.jsx)("ol",{children:i.steps.map((e,t)=>(0,n.jsx)("li",{className:"pre-wrap",children:e},t))}),i.files.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h4",{children:o("pm.files")}),(0,n.jsx)("ul",{children:i.files.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)("code",{children:e})},e))})]}),(0,n.jsx)("h4",{children:o("pm.verification")}),(0,n.jsx)("p",{className:"pre-wrap",children:i.verification}),i.risks&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h4",{children:o("pm.risks")}),(0,n.jsx)("p",{className:"pre-wrap",children:i.risks})]}),(null!=(a=null==(t=i.revisions)?void 0:t.length)?a:0)>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h4",{children:o("pm.revisions")}),(0,n.jsx)("ul",{children:i.revisions.map(e=>(0,n.jsxs)("li",{className:"small",children:[o("pm.revision",{n:e.version,at:c(e.at)})," ",(0,n.jsx)("span",{className:"pre-wrap",children:e.comment})]},e.version))})]}),(0,n.jsx)("div",{className:"cs-copy-row",children:(0,n.jsx)(r.i,{text:h,what:"pm.copyPlan"})})]})}},87527:(e,t,a)=>{a.d(t,{z:()=>l});var n=a(1521);function l(e,t){let a=!(arguments.length>2)||void 0===arguments[2]||arguments[2],l=(0,n.useRef)(e);l.current=e,(0,n.useEffect)(()=>{let e;if(!a)return;let n=!1,r=async()=>{try{await l.current()}catch(e){}finally{n||(e=setTimeout(()=>void r(),t))}};return r(),()=>{n=!0,e&&clearTimeout(e)}},[t,a])}},94969:(e,t,a)=>{a.d(t,{V:()=>r});var n=a(1521);let l='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function r(e,t,a){(0,n.useEffect)(()=>{var n,r;if(!t)return;let i=document.activeElement instanceof HTMLElement?document.activeElement:null,s=e.current,o=null!=(r=null!=(n=null==a?void 0:a.current)?n:null==s?void 0:s.querySelector(l))?r:null;null==o||o.focus();let c=e=>{if("Tab"!==e.key||!s)return;let t=Array.from(s.querySelectorAll(l)).filter(e=>null!==e.offsetParent);if(0===t.length)return;let a=t[0],n=t[t.length-1],r=s.contains(document.activeElement);e.shiftKey&&(document.activeElement===a||!r)?(e.preventDefault(),n.focus()):e.shiftKey||document.activeElement!==n&&r||(e.preventDefault(),a.focus())};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c),i&&document.contains(i)&&i.focus()}},[e,t,a])}},98078:(e,t,a)=>{a.d(t,{AppearanceProvider:()=>d,Xm:()=>i,KP:()=>h});var n=a(73365),l=a(1521);let r="cop.appearance",i=["small","normal","large","huge","giant"];"(function(){try{\nvar d=document.documentElement,raw=localStorage.getItem('".concat(r,"'),a=raw?JSON.parse(raw):{};\nif(!a||typeof a!=='object')a={};\nd.dataset.theme=a.theme==='dark'||a.theme==='light'?a.theme:window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light';\nd.dataset.textsize=").concat(JSON.stringify(i),".indexOf(a.textSize)>=0?a.textSize:'normal';\nd.dataset.contrast=a.highContrast?'high':'normal';\nd.dataset.motion=a.reduceMotion?'reduced':'normal';\nd.dataset.links=a.underlineLinks?'underline':'plain';\nd.dataset.focus=a.strongFocus?'strong':'normal';\nd.dataset.night=a.nightLight?'on':'off';\nd.dataset.cursor=a.systemCursor?'system':'own';\nvar l=(localStorage.getItem('cop.locale')||'').toLowerCase();\nif(").concat(JSON.stringify(["ar"]),".indexOf(l)>=0){d.dir='rtl';d.lang=l;}\n}catch(e){}})();");let s={theme:"system",textSize:"normal",highContrast:!1,reduceMotion:!1,underlineLinks:!1,strongFocus:!1,nightLight:!1,systemCursor:!1};function o(e){let t=document.documentElement;t.dataset.theme="system"===e.theme?!function(){try{return window.matchMedia("(prefers-color-scheme: dark)").matches}catch(e){return!1}}()?"light":"dark":e.theme,t.dataset.textsize=e.textSize,t.dataset.contrast=e.highContrast?"high":"normal",t.dataset.motion=e.reduceMotion?"reduced":"normal",t.dataset.links=e.underlineLinks?"underline":"plain",t.dataset.focus=e.strongFocus?"strong":"normal",t.dataset.night=e.nightLight?"on":"off",t.dataset.cursor=e.systemCursor?"system":"own"}let c=(0,l.createContext)({appearance:s,set:()=>void 0,reset:()=>void 0,loaded:!1});function d(e){let{children:t}=e,[a,d]=(0,l.useState)(s),[h,p]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let e=s;try{let t=window.localStorage.getItem(r);t&&(e=function(e){let t=e&&"object"==typeof e?e:{},a=(e,t)=>"boolean"==typeof e?e:t;return{theme:"dark"===t.theme||"light"===t.theme||"system"===t.theme?t.theme:s.theme,textSize:i.includes(t.textSize)?t.textSize:s.textSize,highContrast:a(t.highContrast,s.highContrast),reduceMotion:a(t.reduceMotion,s.reduceMotion),underlineLinks:a(t.underlineLinks,s.underlineLinks),strongFocus:a(t.strongFocus,s.strongFocus),nightLight:a(t.nightLight,s.nightLight),systemCursor:a(t.systemCursor,s.systemCursor)}}(JSON.parse(t))),window.matchMedia("(prefers-reduced-motion: reduce)").matches&&!t&&(e={...e,reduceMotion:!0})}catch(e){}d(e),o(e),p(!0)},[]),(0,l.useEffect)(()=>{let e;if("system"!==a.theme)return;try{e=window.matchMedia("(prefers-color-scheme: dark)")}catch(e){return}let t=()=>o(a);return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[a]);let m=(0,l.useCallback)(e=>{d(t=>{let a={...t,...e};o(a);try{window.localStorage.setItem(r,JSON.stringify(a))}catch(e){}return a})},[]),u=(0,l.useCallback)(()=>{d(s),o(s);try{window.localStorage.removeItem(r)}catch(e){}},[]);return(0,n.jsx)(c.Provider,{value:{appearance:a,set:m,reset:u,loaded:h},children:t})}function h(){return(0,l.useContext)(c)}}}]);
|