PageSourceSearch

https://static.scale.com/dashboard.scale.com/rrvqttTwFdiikV-VvVU_R…/[project]/pipeline-66f63e77ad7310a0.js

js scale.com collected 2026-09-24 08:47:22 UTC 48,791 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44083],{846313:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/corp/qm/queue/[project]/pipeline",function(){return i(148142)}])},919510:function(e,t,i){"use strict";i.d(t,{U:function(){return useMarkdownSyntaxOptions}});var n=i(885115),r=i(641040),o=i(497903);function useMarkdownSyntaxOptions(){var e,t,i,a;let s=(0,n.useContext)(r.p),l=null==s?void 0:s.markdownSyntaxConfig;return{boldToken:null!==(e=null==l?void 0:l.boldToken)&&void 0!==e?e:o.BL.ASTERISK,italicToken:null!==(t=null==l?void 0:l.italicToken)&&void 0!==t?t:o.fK.ASTERISK,bulletListToken:null!==(i=null==l?void 0:l.bulletListToken)&&void 0!==i?i:o.GO.ASTERISK,mathToken:null!==(a=null==l?void 0:l.mathToken)&&void 0!==a?a:o.KK.DOLLARS}}},687842:function(e,t,i){"use strict";var n=i(667488),r=i(623631),o=i.n(r),a=i(56537),s=i.n(a),l=i(967336),d=i.n(l),c=i(885115);let u=d()(()=>Promise.resolve().then(i.bind(i,927259)),{loadableGenerated:{webpack:()=>[927259]},ssr:!1}),p=c.memo(function(e){let{value:t,onChange:i,readOnly:r=!1,options:a={},onErrorChange:l}=e,d=(0,c.useRef)(null),p=(0,c.useMemo)(()=>({automaticLayout:!0,autoClosingBrackets:"always",autoClosingQuotes:"always",formatOnPaste:!0,formatOnType:!0,scrollBeyondLastLine:!1,tabSize:2,minimap:{enabled:!1},lineNumbers:"on",wordWrap:"off",readOnly:r,...a}),[r,a]),h=(0,c.useMemo)(()=>s()((e,t)=>{d.current&&d.current(e.getValue(),t,l)},300),[l]),m=(0,c.useCallback)(e=>i(null!=e?e:""),[i]),f=(0,c.useCallback)(e=>{d.current=(e.languages.register({id:"jsonata"}),e.languages.setLanguageConfiguration("jsonata",{brackets:[["{","}"],["[","]"],["(",")"]]}),e.languages.setMonarchTokensProvider("jsonata",{keywords:["and","or","not","in","if","then","else","true","false","null","function"],builtins:["$length","$substring","$uppercase","$lowercase","$number","$string","$boolean","$sum","$count","$map","$reduce","$each","$exists","$not","$sort","$filter","$contains","$join","$distinct"],brackets:[["{","}","delimiter.bracket"],["[","]","delimiter.bracket"],["(",")","delimiter.parenthesis"]],tokenizer:{root:[[/\/\/.*$/,"comment"],[/\/\*[\s\S]*?\*\//,"comment"],{include:"@whitespace"},[/~>/,"operator.pipeline"],[/->/,"operator.partial"],[/\.\./,"operator.recursive"],[/\./,"operator.dot"],[/[,:;]/,"delimiter"],[/[=!<>]=?/,"operator"],[/[+\-*/%&|^~]/,"operator"],[/\?/,"operator"],[/\d+(\.\d+)?([eE][-+]?\d+)?/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@stringDouble"}],[/'/,{token:"string.quote",bracket:"@open",next:"@stringSingle"}],[/\$[a-zA-Z_]\w*/,{cases:{"@builtins":"predefined","@default":"variable"}}],[/\$/,"variable"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@builtins":"predefined","\\w+\\s*\\(":"function","@default":"identifier"}}]],whitespace:[[/\s+/,"white"]],stringDouble:[[/[^\\"]+/,"string"],[/\\./,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/\\./,"string.escape"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]]}}),e.editor.defineTheme("jsonata-theme",{base:"vs",inherit:!0,rules:[{token:"comment",foreground:"30972f"},{token:"keyword",foreground:"372cc9"},{token:"predefined",foreground:"ff4f14"},{token:"function",foreground:"372cc9"},{token:"variable",foreground:"267F99"},{token:"operator",foreground:"0000FF"},{token:"operator.dot",foreground:"0000FF"},{token:"operator.recursive",foreground:"7B1FA2",fontStyle:"bold"},{token:"operator.pipeline",foreground:"7B1FA2",fontStyle:"bold"},{token:"operator.partial",foreground:"7B1FA2",fontStyle:"bold"},{token:"delimiter",foreground:"000000"},{token:"number",foreground:"09885A"},{token:"string",foreground:"B22222"},{token:"string.escape",foreground:"D16969",fontStyle:"bold"},{token:"identifier",foreground:"333333"}],colors:{"editorError.foreground":"#ff0000","editorError.border":"#ff0000","editorError.background":"#ff000010","errorLens.errorForeground":"#ff0000","errorLens.errorBackground":"#ff000010"}}),function(t,i,n){if(!(null==t?void 0:t.trim())){null==n||n(!1);return}try{o()(t),e.editor.setModelMarkers(i,"jsonata",[]),null==n||n(!1)}catch(u){let r=u.message,o=u.position;if("number"!=typeof o){let e=r.match(/at position (\d+)/i);e&&(o=parseInt(e[1],10))}let a=1,s=1,l=1,d=1;if("number"==typeof o){let e=i.getPositionAt(o),n=i.getWordAtPosition(e),r=1;if(n)r=n.endColumn-n.startColumn;else{let e=t.substring(o).match(/^\S+/);r=e?e[0].length:1}let c=i.getPositionAt(o+r);a=e.lineNumber,s=e.column,l=c.lineNumber,d=c.column}else{let e=t.split("\n");a=1,s=1,l=e.length,d=e[e.length-1].length+1}let c={severity:e.MarkerSeverity.Error,message:r,startLineNumber:a,startColumn:s,endLineNumber:l,endColumn:d,source:"JSONata",code:"syntax_error"};e.editor.setModelMarkers(i,"jsonata",[c]),null==n||n(!0)}})},[]),g=(0,c.useCallback)(e=>{let i=e.getModel();i&&d.current&&(d.current(t,i,l),e.onDidChangeModelContent(()=>{h(e,i)}))},[t,l,h]);return(0,c.useEffect)(()=>()=>{h.cancel()},[h]),(0,n.jsx)(u,{language:"jsonata",theme:"jsonata-theme",beforeMount:f,onMount:g,value:t,onChange:m,options:p})});t.Z=p},504357:function(e,t,i){"use strict";var n=i(667488),r=i(367915),o=i.n(r),a=i(747910),s=i.n(a),l=i(885115),d=i(375619),c=i(698878),u=i(753966),p=i(73173),h=i.n(p),m=i(201572),f=i.n(m),g=i(64953),b=i(245987);
1let y={a:"Alfa",b:"Bravo",c:"Charlie",d:"Delta",e:"Echo",f:"Foxtrot",g:"Golf",h:"Hotel",i:"India",j:"Juliette",k:"Kilo",l:"Lima",m:"Mike",n:"November",o:"Oscar",p:"Papa",q:"Quebec",r:"Romeo",s:"Sierra",t:"Tango",u:"Uniform",v:"Victor",w:"Whiskey",x:"Xray",y:"Yankee",z:"Zulu"},x=new(f()).graphlib.Graph;x.setDefaultEdgeLabel(()=>({}));let getLayoutedElements=e=>(x.setGraph({rankdir:"LR"}),e.forEach(e=>{if((0,c.UG)(e)){var t,i;x.setNode(e.id,{width:null===(t=e.__rf)||void 0===t?void 0:t.width,height:null===(i=e.__rf)||void 0===i?void 0:i.height})}else x.setEdge(e.source,e.target)}),f().layout(x),e.map(e=>{if((0,c.UG)(e)){var t,i;let n=x.node(e.id);e.targetPosition=c.Ly.Left,e.sourcePosition=c.Ly.Right,e.position={x:n.x-(null===(t=e.__rf)||void 0===t?void 0:t.width)/2,y:n.y-(null===(i=e.__rf)||void 0===i?void 0:i.height)/2}}return e})),getSortedCartesianProduct=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return t.reduce((e,t)=>e.map(e=>t.map(t=>[...new Set([...e,t])].sort())).reduce((e,t)=>[...e,...t],[]),[[]])},getSortedPowerSet=e=>e.reduce((e,t)=>e.concat(e.map(e=>[t,...e].sort())),[[]]).filter(e=>{if(e.length>0)return e}),findSubprojectKey=(e,t)=>{for(let[i,n]of Object.entries(e))for(let e of n)for(let n of t)if(s().isEqual(e,n))return i;return"None"},v="#CC54CD",w="#59B45F",j={stroke:v,strokeWidth:"3px"},k={background:"#FFFFFF",border:"1px solid #A3A3A3",boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.1), 0px 0px 4px rgba(0, 0, 0, 0.1)",borderRadius:"12px",minHeight:"90px",fontWeight:500},subprojectMapToGraphElements=(e,t,i,n)=>{let r={x:0,y:0},o=[];o.push({id:"parent",type:"default",data:{label:e},position:r,style:{...k,width:"200px",lineHeight:k.minHeight,fontSize:"16px"}}),o.push({id:"parent-categorization-edge",source:"parent",target:"categorization",type:"smoothstep",arrowHeadType:c.f8.ArrowClosed,style:{...j}}),o.push({id:"categorization",type:"default",data:{label:formatCategorizationNodeLabel(t.globalAttributes,i,n)},position:r,targetPosition:c.Ly.Left,sourcePosition:c.Ly.Right,style:{...k,width:"550px",padding:"0 0 0 0"}});let a=[];for(let[e,t]of Object.entries(n))Array.isArray(t)?t.forEach(t=>a.push("".concat(e,":").concat(t))):a.push("".concat(e," ").concat(t));let l=s().mapValues(t.subprojectToCategorizationMap,e=>getSortedCartesianProduct(...e)),d=getSortedPowerSet(a),u=findSubprojectKey(l,d);for(let[e,i]of Object.entries(t.subprojectToCategorizationMap)){let t=e.toLowerCase(),n=j.stroke,a=k.border;e===u&&(n=w,a="3px solid ".concat(w)),o.push({id:t,type:"default",data:{label:formatSubprojectNodeLabel(t)},position:r,targetPosition:c.Ly.Left,sourcePosition:c.Ly.Right,style:{...k,width:"150px",padding:"0 0 0 0",border:a}}),o.push({id:"".concat(t,"-mapping"),type:"default",data:{label:formatMappingNodeLabel(i)},position:r,targetPosition:c.Ly.Left,sourcePosition:c.Ly.Right,style:{background:"#F8F8F8",borderRadius:"10px",width:"200px",border:a}}),o.push({id:"categorization-".concat(t,"-mapping-edge"),source:"categorization",target:"".concat(t,"-mapping"),type:"smoothstep",style:{...j,stroke:n}}),o.push({id:"".concat(t,"-mapping-subproject-edge"),source:"".concat(t,"-mapping"),target:"".concat(t),type:"smoothstep",style:{...j,stroke:n}})}return o},formatSubprojectNodeLabel=e=>{let t="zeroannotation"===e?"Zero Annotation Subproject":"Specialization Subproject ".concat(y[e]);return(0,n.jsxs)("div",{className:"jsx-5f131717e3047350",children:[(0,n.jsx)("div",{className:"jsx-5f131717e3047350 node-header"}),(0,n.jsx)("div",{className:"jsx-5f131717e3047350 node-subproject",children:t}),(0,n.jsx)(o(),{id:"5f131717e3047350",children:".node-header.jsx-5f131717e3047350{background:#404040;padding:8px;-webkit-border-radius:10px 10px 0 0;-moz-border-radius:10px 10px 0 0;border-radius:10px 10px 0 0}.node-subproject.jsx-5f131717e3047350{font-size:14px;font-style:normal;padding-top:16px}"})]})},formatCategorizationNodeLabel=(e,t,i)=>(0,n.jsxs)("div",{className:"jsx-ec215d392c97fbe7",children:[(0,n.jsx)("div",{className:"jsx-ec215d392c97fbe7 node-categorization__header",children:"Categorization Subproject"}),(0,n.jsx)("div",{className:"jsx-ec215d392c97fbe7 node-categorization__annotation",children:(0,n.jsx)(g.Z,{onChange:t,isLabelRequired:!1,isReadOnly:!1,attrDefinitions:e,attrSelections:i})}),(0,n.jsx)(o(),{id:"ec215d392c97fbe7",children:".node-categorization__header.jsx-ec215d392c97fbe7{background:#000;color:#fff;font-weight:600;font-size:20px;-webkit-border-radius:10px 10px 0 0;-moz-border-radius:10px 10px 0 0;border-radius:10px 10px 0 0;height:50px;line-height:50px}.node-categorization__annotation.jsx-ec215d392c97fbe7{margin:10px;text-align:left}.node-categorization__question.jsx-ec215d392c97fbe7{font-size:16px;border-top:3px solid#e5e5e5;padding:8px;text-align:left;align-text:center}"})]}),formatMappingNodeLabel=e=>{let t=e.map((t,i)=>t.map((t,r)=>{let o="",a=!1;return 0===r?1===e[i].length?i<e.length-1&&(a=!0):o="OR":r===e[i].length-1?i<e.length-1&&(a=!0):o="OR",(0,n.jsxs)("div",{className:"node-details_popover",children:[(0,n.jsxs)("div",{children:[e[i][r]," ",(0,n.jsx)("b",{children:o})]}),a&&(0,n.jsx)("div",{children:(0,n.jsx)("b",{children:"AND"})})]},"".concat(i,"_").concat(r))})),i=(0,n.jsx)("div",{style:{fontSize:"14px"},children:"View task routing logic"});return(0,n.jsx)("div",{children:(0,n.jsx)(b.J2,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},targetOpen:i,popover:t,style:{padding:"12px",background:"#F8F8F8"}})})},tryVerifyAndFormatJSON=e=>{if((null==e?void 0:e.globalAttributes)===void 0)throw Error("globalAttributes not found in Pipeline Config JSON!");if((null==e?void 0:e.subprojectToCategorizationMap)===void 0)throw Error("subprojectToCategorizationMap not found in Pipeline Config JSON!");if(!Object.keys(null==e?void 0:e.globalAttributes).length)throw Error("globalAttributes has no categorization questions!");if(!Object.keys(null==e?void 0:e.subprojectToCategorizationMap).length)throw Error("subprojectToCategorizationMap has no subproject mappings!");
1for(let t of(Object.keys(e.globalAttributes).forEach(t=>{let i=s().capitalize(s().replace(t,/_/g," "))+"?";e.globalAttributes[i]=e.globalAttributes[t],delete e.globalAttributes[t]}),Object.keys(e.subprojectToCategorizationMap)))e.subprojectToCategorizationMap[t].forEach(e=>{e.forEach((t,i)=>{e[i]=s().upperFirst(s().replace(s().replace(t,":","? "),/_/g," "))})})},Wrapper=e=>{let{shouldLayout:t,layoutCompleteCallback:i}=e,r=(0,c.Kw)(e=>e.nodes),o=(0,c.Kw)(e=>e.edges),a=r.concat(o),[s,d]=(0,l.useState)(a),[u,p]=(0,l.useState)(!1),{fitView:h}=(0,c.Hs)();return(0,l.useEffect)(()=>{var e,n;t&&a.length>0&&(null===(n=a[0])||void 0===n?void 0:null===(e=n.__rf)||void 0===e?void 0:e.width)&&(d(getLayoutedElements(a)),p(!0),i())},[t,a,i]),(0,l.useEffect)(()=>{u&&(h(),p(!1))},[u,h]),(0,n.jsx)("div",{children:(0,n.jsxs)(c.ZP,{elements:s,style:{width:"100%",height:"80vh"},children:[(0,n.jsx)(c.Aq,{variant:c.T7.Lines,color:"#EFEFEF",gap:63}),(0,n.jsx)(c.ZX,{showInteractive:!1})]})})};t.Z=e=>{let{projectName:t,pipelineConfigParams:i,resetLayout:r,isCustomerFacing:a=!0}=e,[s,p]=(0,l.useState)([]),[m,f]=(0,l.useState)(!0),[g,b]=(0,l.useState)(!1),[y,x]=(0,l.useState)(""),[w,j]=(0,l.useState)({}),handleCategorizationSelection=(e,t)=>{let i=JSON.parse(JSON.stringify(w));i[null==t?void 0:t.attrKey]=null==t?void 0:t.attrVal,j(i)};return(0,l.useEffect)(()=>{if(m)try{let e=JSON.parse(JSON.stringify(i));tryVerifyAndFormatJSON(e);let n=subprojectMapToGraphElements(t,e,handleCategorizationSelection,w);p(n)}catch(e){a?x("Failed to load the Task Graph. Please try again later, if that doesn't work please contact support."):x(e.message),b(!0),f(!1)}}),(0,l.useEffect)(()=>{g&&h().error((0,u.V)({response:y},void 0,y),{timeout:"none"})},[g]),(0,d.Z)(()=>{p([]),b(!1)},[i,r,w]),(0,l.useEffect)(()=>{s.length||f(!0)},[s]),(0,n.jsxs)("div",{style:{cursor:"grab",boxShadow:"inset 0px 0px 6px #ccc"},tabIndex:1,className:"jsx-73587365d7128a13",children:[(0,n.jsx)(c.tV,{children:(0,n.jsx)(c.ZP,{elements:s,arrowHeadColor:v,minZoom:.25,maxZoom:1.25,children:(0,n.jsx)(Wrapper,{shouldLayout:m,layoutCompleteCallback:()=>{f(!1)}})})}),(0,n.jsx)(o(),{id:"73587365d7128a13",children:".react-flow__node{cursor:pointer}.react-flow__handle{visibility:hidden}.react-flow__handle-right{right:0}.react-flow__handle-left{left:0}.react-flow__handle-top{top:0}.react-flow__handle-bottom{bottom:0}"})]})}},494090:function(e,t,i){"use strict";i.d(t,{D:function(){return useConfigAttributes},U:function(){return getConfigAttributes}});var n=i(885115),r=i(243553);let getConfigAttributes=(e,t)=>{if(!e||e.type===r.rO7.Project&&!t)return null;let i={};switch(e.type){case r.rO7.Project:i.project=e.id,t&&t.taskType&&(i.taskType=t.taskType),i.taskCustomer=t.taskCustomer;break;case r.rO7.TaskCustomerType:i.taskCustomer=e.id,e.taskType&&(i.taskType=e.taskType);break;case r.rO7.TaskCustomer:i.taskCustomer=e.id;break;case r.rO7.TaskType:e.taskType&&(i.taskType=e.taskType)}return i},useConfigAttributes=(e,t)=>(0,n.useMemo)(()=>getConfigAttributes(e,null!=t?t:void 0),[e,t])},540255:function(e,t,i){"use strict";i.d(t,{Q2:function(){return fetchConfig},WW:function(){return useConfigData},kR:function(){return getConfigQuery}});var n=i(747910),r=i.n(n),o=i(73173),a=i.n(o),s=i(430633),l=i(885115),d=i(663752),c=i(494090);let canSubmitConfigChanges=function(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];return r().every(r().mapValues(t,(n,o)=>{let{_type:s,children:l}=r().get(e,o);if("Array"===s&&l)return Object.values(n).map(e=>{Object.keys(e).map(t=>{if("_id"!==t&&l[t]&&["Mixed","Array"].includes(l[t]._type)&&"string"==typeof e[t])try{e[t]=JSON.parse(e[t])}catch(i){return a().error("Expected path ".concat(t," to be JSON parsable, got ").concat(e[t]),{timeout:"none"}),!1}})});if("Mixed"===s||"Array"===s)try{t[o]=i?JSON.parse(n):n}catch(e){return a().error("Expected path ".concat(o," to be JSON parsable, got ").concat(n),{timeout:"none"}),!1}return!0}))},getConfigQuery=(e,t)=>{let i={type:e.type,...t};return i},fetchConfig=async(e,t)=>{let i=getConfigQuery(e,t);return await (0,d.ZP)(null,"corp-api/lookup/".concat(e.id,"/config?").
1concat(s.stringify(i)),{method:"GET"})},useConfigData=(e,t,i,n)=>{let[o,a]=(0,l.useState)(!0),[s,u]=(0,l.useState)(!1),[p,h]=(0,l.useState)(null),[m,f]=(0,l.useState)(null),[g,b]=(0,l.useState)(-1),[y,x]=(0,l.useState)({}),v=(0,c.D)(i,n),w=(0,l.useCallback)(async()=>{if(i&&v)try{let{config:e,version:t}=await fetchConfig(i,v);if(r().isNil(e)||r().isNil(t))return;h(e),f(r().cloneDeep(e)),b(t),a(!1)}catch(e){(0,d.vj)(e,{handleHttp:!0})}},[v,i]),j=(0,l.useCallback)(async()=>{await w()},[w]),saveChanges=async()=>{if(!i||!v)return;u(!0);let n=getConfigQuery(i,v);try{let{config:o,version:a}=await (0,d.ZP)(null,"corp-api/lookup/".concat(i.id,"/config"),{method:"POST",body:{changes:y,query:n,lastVersion:g,user:e,type:t,attributes:v}});h(o),f(r().cloneDeep(o)),b(a),x({}),u(!1)}catch(e){(0,d.vj)(e,{handleHttp:!0}),u(!1)}},trySaveChangesAsync=async function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];p&&y&&canSubmitConfigChanges(p,y,e)&&await saveChanges()};return{ogConfigs:m,trySaveChanges:function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];p&&y&&canSubmitConfigChanges(p,y,e)&&saveChanges()},trySaveChangesAsync,newSetValue:(e,t)=>{if(!p||!m)return;let i=r().cloneDeep(p),n=e+".value";h(i=r().set(i,n,t));let o=r().get(m,n),a=JSON.stringify(o)===JSON.stringify(t),s=r().isNil(o)&&(""===t||!1===t);a||s?x(r().omit(y,[e])):x({...y,[e]:t})},resetConfig:()=>{h(r().cloneDeep(m)),x({})},loading:o,saving:s,configs:p,triggerGetConfigs:j,changes:y}}},762754:function(e,t,i){"use strict";i.d(t,{Z:function(){return QM_QMErrorPage}});var n,r,o=i(667488);i(885115);var a=i(695477),s=i.n(a),l=i(462206),d=i(74750),c=i(482770);let u=(0,l.ZL)({pageWrapper:{display:"flex","flex-direction":"row",width:"100%",height:"100%"},sidebar:{marginTop:24,minWidth:300,float:"left"},section:{marginTop:"50px",marginBottom:"30px",flexGrow:2}});var QM_QMSelectProjectPage=()=>{let e=u();return(0,o.jsxs)("div",{className:e.pageWrapper,children:[(0,o.jsx)("div",{className:e.sidebar,children:(0,o.jsx)(c.Z,{})}),(0,o.jsxs)("div",{className:e.section,children:[(0,o.jsx)(d.Z,{title:"Select a project"}),(0,o.jsx)("p",{children:"Please select a project from the left sidebar."})]})]})};let p=(0,l.ZL)({container:{marginTop:40,margin:"0 auto",textAlign:"center"},selectProject:{marginTop:20,textAlign:"left"}});function getErrorMessage(e){var t;return s()(null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.error)?e.response.error:e instanceof Error?e.message:"unknown error"}(n=r||(r={}))[n.InvalidProjectId=0]="InvalidProjectId",n[n.Unknown=1]="Unknown";var QM_QMErrorPage=e=>{let{error:t,title:i,className:n}=e,r=p();return 0===function(e){let t=getErrorMessage(e).split('"');return t&&7===t.length&&"_id"===t[3]?0:1}(t)?(0,o.jsx)(QM_QMSelectProjectPage,{}):(0,o.jsxs)("div",{className:[n,r.container].join(" "),children:[(0,o.jsx)("h1",{children:i||"Sorry there was a problem."}),(0,o.jsx)("div",{children:getErrorMessage(t)})]})}},982964:function(e,t,i){"use strict";i.d(t,{X:function(){return ReactJsonView}});var n=i(667488),r=i(967336),o=i.n(r),a=i(479930);i(885115);let s=o()(()=>i.e(86718).then(i.bind(i,886718)),{loadableGenerated:{webpack:()=>[509759]},ssr:!1}),ReactJsonView=e=>{let t=!0===e.enableClipboard?e=>{let{src:t}=e,i="string"==typeof t?t:JSON.stringify(t);(0,a.v)(i,{copyRaw:!0})}:e.enableClipboard||!1;return(0,n.jsx)(s,{...e,enableClipboard:t})}},92109:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var n=i(667488),r=i(367915),o=i.n(r),a=i(916533),s=i.n(a),l=i(885115),d=i(924966),c=i(479930),u=i(634722),p=(0,i(357565).P)({reloadable:!0})(e=>{var t,i,r;let getCacheKey=e=>"hideablesection/".concat(e,"/hidden"),[a,p]=(0,l.useState)(null!==(i=null!==(t=e.forceHidden)&&void 0!==t?t:s().get(getCacheKey(e.name)))&&void 0!==i&&i),h=(0,l.useRef)(null),m=(0,l.useRef)(null),f=null===(r=e.enableLink)||void 0===r||r;(0,l.useEffect)(()=>{var t,i;p(null!==(i=null!==(t=e.forceHidden)&&void 0!==t?t:s().get(getCacheKey(e.name)))&&void 0!==i&&i)},[e.forceHidden,e.name]),(0,l.useEffect)(()=>{h.current&&window.location.hash==="#".concat(encodeURIComponent(e.name))&&h.current.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}),m.current&&e.containZoom&&m.current.addEventListener("wheel",e=>{e.ctrlKey&&e.preventDefault()})}),(0,l.useEffect)(()=>{e.linterSelected&&toggleHidden()},[]);let copyUrl=()=>{let t=window.location.href.split("#")[0];(0,c.v)("".concat(t,"#").concat(e.sectionId),{excludeOuterQuotes:!0})},toggleHidden=()=>{let t=!a;p(t),s().set(getCacheKey(e.name),t)};return e.children?(0,n.jsxs)("div",{ref:h,className:o().dynamic([["13c0c50e657a638b",[e.showOverflow?"":"overflow: hidden;"]]])+" section",children:[e.sectionId?(0,n.jsxs)("div",{onClick:toggleHidden,className:o().dynamic([["13c0c50e657a638b",[e.showOverflow?"":"overflow: hidden;"]]])+" section-header",children:[(0,n.jsx)("em",{style:{minWidth:24,paddingRight:0},className:o().dynamic([["13c0c50e657a638b",[e.showOverflow?"":"overflow: hidden;"]]]),children:(0,n.jsx)(d.GN,{icon:a?"caret-right":"caret-down",size:"sm"})}),e.nameStatusIcon&&(0,n.jsx)(d.GN,{style:{paddingRight:"6px"},icon:e.nameStatusIcon.icon||"circle",color:e.nameStatusIcon.color}),(0,n.jsxs)("div",{className:o().dynamic([["13c0c50e657a638b",[e.showOverflow?"":"overflow: hidden;"]]])+" section-title",children:[e.name,(0,n.jsx)("em",{onClick:e=>{e.stopPropagation(),copyUrl()},style:{marginLeft:8},className:o().dynamic([["13c0c50e657a638b",[e.showOverflow?"":"overflow: hidden;"]]]),children:(0,n.jsx)(d.GN,{icon:"link",size:"xs"})})]})]}):(0,n.jsxs)("div",{onClick:toggleHidden,className:o().dynamic([["13c0c50e657a638b",[e.showOverflow?"":"overflow: hidden;"]]])+" section-header",children:[(0,n.jsx)("em",{style:{minWidth:24,paddingRight:0},className:o().dynamic([["13c0c50e657a638b",[e.showOverflow?"":"overflow: hidden;"]]]),children:(0,n.jsx)(d.GN,{icon:a?"caret-right":"caret-down",size:"sm"})}),e.nameStatusIcon&&(0,n.jsx)(d.GN,{style:{paddingRight:"6px"},icon:e.nameStatusIcon.icon||"circle",color:e.nameStatusIcon.color}),(0,n.jsxs)("div",{className:o().dynamic([["13c0c50e657a638b",[e.showOverflow?"":"overflow: hidden;"]]])+" section-title",children:[e.name,f&&(0,n.jsx)("em",{onClick:t=>{t.stopPropagation(),h.current&&(h.current.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}),(0,u.VF)("".concat(window.location.pathname,"#").concat(encodeURIComponent(e.name)),void 0,{shallow:!0}))},className:o().dynamic([["13c0c50e657a638b",[e.showOverflow?"":"overflow: hidden;"]]])+" pl-3",children:(0,n.jsx)(d.GN,{icon:"link",size:"xs"})})]})]}),e.keepMounted?(0,n.jsx)("div",{ref:m,style:{display:a?"none":"block"},className:o().dynamic([["13c0c50e657a638b",[e.showOverflow?"":"overflow: hidden;"]]])+" section-body",children:e.children}):!a&&(0,n.jsx)("div",{ref:m,className:o().dynamic([["13c0c50e657a638b",[e.showOverflow?"":"overflow: hidden;"]]])+" section-body",children:e.children}),(0,n.jsx)(o(),{id:"13c0c50e657a638b",dynamic:[e.showOverflow?"":"overflow: hidden;"],children:".section.__jsx-style-dynamic-selector{margin:16px 0;border:1px solid rgba(0,0,0,.05);-webkit-border-radius:var(--border-radius);-moz-border-radius:var(--border-radius);border-radius:var(--border-radius);".concat(e.showOverflow?"":"overflow: hidden;","\n        }.section-header.__jsx-style-dynamic-selector{padding:12px 8px;font-weight:bold;font-size:20px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:background.2s;-moz-transition:background.2s;-o-transition:background.2s;transition:background.2s}.section-header.__jsx-style-dynamic-selector:hover{background:var(--color-RemoGray01)}
1.section-header.__jsx-style-dynamic-selector:hover .section-title.__jsx-style-dynamic-selector path{fill:var(--color-RemoGray20)}.section-header.__jsx-style-dynamic-selector:not(:hover) .section-title.__jsx-style-dynamic-selector path{fill:white}.section-header.__jsx-style-dynamic-selector .section-title.__jsx-style-dynamic-selector{display:inline-block}.section-header.__jsx-style-dynamic-selector .section-title.__jsx-style-dynamic-selector:hover path{fill:var(--color-RemoGray50)!important}.section-header.__jsx-style-dynamic-selector em.__jsx-style-dynamic-selector{display:inline-block}.section-body.__jsx-style-dynamic-selector{padding:16px}")})]}):null})},74750:function(e,t,i){"use strict";i.d(t,{Z:function(){return l}});var n=i(667488),r=i(367915),o=i.n(r),a=i(885115),s=i(245987);let SectionTitle=class SectionTitle extends a.Component{render(){return(0,n.jsxs)("div",{className:"jsx-3d598c44eb364d94 header",children:[(0,n.jsx)("div",{className:"jsx-3d598c44eb364d94 title",children:(0,n.jsxs)(s.H2,{children:[this.props.icon," ",this.props.title]})}),(0,n.jsx)("div",{className:"jsx-3d598c44eb364d94",children:this.props.children}),(0,n.jsx)(o(),{id:"3d598c44eb364d94",children:".header.jsx-3d598c44eb364d94{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;margin-bottom:24px;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-moz-box-orient:horizontal;-moz-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}"})]})}};var l=SectionTitle},949320:function(e,t,i){"use strict";i.d(t,{a:function(){return useHarborAdapters}});var n=i(885115),r=i(90272),o=i(663752);function useHarborAdapters(){let[e,t]=(0,n.useState)(r.HARBOR_ADAPTER_INFOS),[i,a]=(0,n.useState)(!0);return(0,n.useEffect)(()=>{let e=!1;return async function(){try{var i;let n=await (0,o.ZP)(null,"corp-api/compass/harbor/adapters");!e&&(null==n?void 0:null===(i=n.adapters)||void 0===i?void 0:i.length)&&t(n.adapters)}catch(e){}finally{e||a(!1)}}(),()=>{e=!0}},[]),{adapters:e,loading:i}}},749975:function(e,t,i){"use strict";i.d(t,{Z:function(){return JSONEditable}});var n=i(667488),r=i(367915),o=i.n(r),a=i(982964),s=i(885115),l=i(2983),d=i(329782);function JSONEditable(e){let{isShowingRaw:t,json:i,onEditJSON:r,preserveTypes:c=!0,readOnly:u=!1}
1=e,[p,h]=(0,s.useState)(!0),applyValue=(e,t,i,n)=>{let r=e;for(let i of t)r=e[i];r[i]=n},m=(0,s.useCallback)(e=>{let{updated_src:t,name:i,namespace:n,new_value:o,existing_value:a}=e;if(!c){r(t);return}let s=o,l=null==o?void 0:o.toString(),d=parseFloat(null==o?void 0:o.toString().trim());switch(typeof a){case"string":s=l;break;case"number":isNaN(d)||(s=Math.round(d)===d?Math.round(d):d);break;case"boolean":s=(null==l?void 0:l.trim())==="true"||(null==l?void 0:l.trim())!=="false"&&a}applyValue(t,n,i,s),r(t)},[r,c]);return((0,s.useEffect)(()=>{h(!0)},[t]),t)?u?(0,n.jsx)(l.x,{scrollbars:"vertical",style:{maxHeight:520},children:(0,n.jsx)("pre",{style:{margin:0,padding:12,fontSize:12,fontFamily:"monospace",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:JSON.stringify(i,null,4)})}):(0,n.jsxs)(n.Fragment,{children:[!p&&(0,n.jsx)("span",{children:"This JSON is not valid. Please fix."}),(0,n.jsx)(d.K,{size:"3",id:"json-text",defaultValue:JSON.stringify(i,null,4),onChange:e=>{try{let t=e.target.value,i=JSON.parse(t);r(i),h(!0)}catch(e){h(!1),console.error(e)}},style:{minHeight:"480px"}})]}):(0,n.jsxs)(l.x,{scrollbars:"vertical",style:{maxHeight:520},children:[(0,n.jsx)(a.X,{src:i,name:!1,theme:"monokai",iconStyle:"triangle",collapsed:4,collapseStringsAfterLength:120,groupArraysAfterLength:!1,displayObjectSize:!1,displayDataTypes:!1,...!u&&{onEdit:m,onAdd:m,onDelete:m}}),(0,n.jsx)(o(),{id:"3321df469b649057",children:".react-json-view{-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;padding:12px;minheight:550px}"})]})}},285708:function(e,t,i){"use strict";var n=i(667488),r=i(885115),o=i(720),a=i(866506),s=i(728219),l=i(238169),d=i(955292),c=i(78631),u=i(610375),p=i(424347);t.Z=e=>((0,r.useEffect)(()=>{(0,p.Qg)("/corp/qm")},[]),(0,r.useEffect)(()=>{(0,p.Zz)()||(0,p.ZP)({version:"rrvqttTwFdiikV-VvVU_R"}),(0,p.w_)(e.user)},[e.user]),(0,n.jsx)(l.Z,{children:(0,n.jsxs)(c.aH,{client:u.X,children:[(0,n.jsx)(d.Z,{title:"Delivery Portal"}),(0,n.jsx)(s.VK,{forceRefresh:!0,basename:"corp",children:(0,n.jsx)(a.Z,{children:(0,n.jsx)(o.Z,{user:e.user,children:e.children})})})]})}))},148142:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return W}});var n,r,o=i(667488),a=i(885115),s=i(285708),l=i(431548),d=i(762754),c=i(528499),u=i(462206),p=i(699890),h=i(74750),m=i(448665);let f={numAttempts:{displayName:"Number of Initial Attempts",required:!0,inputType:m.b.Number,hint:"Number of initial labeler annotations used for consensus."},numReviewsIfEscalated:{displayName:"Number of Reviews (if escalated)",required:!0,inputType:m.b.Number,hint:"Number of reviews if escalated, either by linters or low confidence thresholds."}
1,needsL0Review:{displayName:"Needs L0 Review",required:!0,inputType:m.b.Boolean,hint:"Whether or not an L0 tasker needs to review after the attempts."},needsL1Review:{displayName:"Needs L1 Review",required:!0,inputType:m.b.Boolean,hint:"Whether or not an L1 tasker needs to review after the attempt and L0 reviews."},needsCorpReview:{displayName:"Needs Corp Review",required:!0,inputType:m.b.Boolean,hint:"Whether or not a corp user needs to approve after consensus and the initial reviews. AKA whether or not to send to L10."},consensusFunctionType:{displayName:"Consensus Function Type",required:!0,inputType:m.b.String,hint:"Function used to determine the consensus value. One of default, accuracyweightedconsensus, or externalprojectevaluation."},attemptFilterStrategy:{displayName:"Attempt Filter Strategy",required:!1,inputType:m.b.String,hint:"Function used to filter out attempts. One of all_attempts, best_attempts, latest_attempts, or default."},targetConfidenceThreshold:{displayName:"Target Confidence Threshold",required:!1,inputType:m.b.Number,hint:"Used for dynamic consensus. This is the target confidence we want to compare to per field in order to decide if more attempts are needed. Should be a decimal value between 0 and 1.  Confidence is weighted by tasker accuracy, whereas agreement is not."},shortCircuitConfidenceThreshold:{displayName:"Short Circuit Confidence Threshold",required:!1,inputType:m.b.Number,hint:"Used for dynamic consensus. If the subtask confidence is below this value, we terminate consensus without requesting more attempts. Should be a decimal value between 0 and 1."},confidenceFieldInclusionList:{displayName:"Confidence Field Inclusion List",required:!1,inputType:m.b.JSON,hint:"Used for dynamic consensus. List of field IDs to check (e.g. ['field_A', 'field_B']). If this property is defined, only check if the listed fields are below the target confidence threshold."},targetAgreementThreshold:{displayName:"Target Agreement Threshold",required:!1,inputType:m.b.Number,hint:"Used for dynamic consensus. This is the target agreement we want to compare to per field in order to decide if more attempts are needed. Should be a decimal value between 0 and 1. Confidence is weighted by tasker accuracy, whereas agreement is not."},agreementFieldInclusionList:{displayName:"Agreement Field Inclusion List",required:!1,inputType:m.b.JSON,hint:"Used for dynamic consensus. List of field IDs to check (e.g. ['field_A', 'field_B']). If this property is defined, only check if the listed fields are below the target agreement threshold."},shortCircuitHighestAnswerShareThreshold:{displayName:"Short Circuit Threshold for Share of Most Popular Answer",required:!1,inputType:m.b.Number,hint:'Used for dynamic consensus. The minimum "share" or "vote" amongst all answers submitted that the answer with the highest confidence needs to reach for short circuiting. For example, if this is set to 0.7, then consensus will finish if the top answer submitted for the relevant field holds 70% or more of all votes across all answers. The "share" is based on consensus function: for accuracy-weighted, it is % confidence, while for frequency-weighted, it is % agreement. Should be a decimal value between 0 and 1.'},highestAnswerShareFieldInclusionList:{displayName:"Field Inclusion List for Most Popular Answers",required:!1,inputType:m.b.JSON,hint:"Used with shortCircuitHighestAnswerShareThreshold. List of field IDs to check (e.g. ['field_A', 'field_B']), with AND requirements: all fields must have an answer pass the threshold to short circuit. If this property is not defined, automatically check all fields in the task."},maxNumAttempts:{displayName:"Max Num Attempts",required:!1,inputType:m.b.Number,hint:"Used for dynamic consensus. The maximum number of attempts on the subtask."},numIncrementalAttempts:{displayName:"Num Incremental Attempts",required:!1,inputType:m.b.Number,hint:"Used for dynamic consensus. After each attempt, we will check if the target confidence threshold is met. If it is not, then we will add this many more attempts to the subtask until either that target confidence threshold is met or we hit the maximum number of attempts."},considerAttemptsInReviewConsensus:{displayName:"Consider Attempts In Review Consensus",required:!1,inputType:m.b.Boolean},skipReviewsConfidenceThreshold:{displayName:"Skip Reviews Confidence Threshold",required:!1,inputType:m.b.Number},useSubtaskPipelineParams:{displayName:"Use Subtask Pipeline Param
1s",required:!1,inputType:m.b.Boolean,hint:"If enabled, pipeline params on the subtask will override pipeline params at the project level."},useOldUnexcludedAttemptsWhenRecalling:{displayName:"Use Old Unexcluded Attempts When Recalling",required:!1,inputType:m.b.Boolean},agreementScoresMapAggregation:{displayName:"Agreement Scores Map Aggregation Method",required:!1,inputType:m.b.String,hint:"Defines how to calculate agreement rate for complex field like category selection. Should be one of max, mean, min. Example: scores = { A: 1.0, B: 0.5 }, max(scores) = 1.0, mean(scores) = 0.75, min(scores) = 0.5. Default value: max"},confidenceScoresMapAggregation:{displayName:"Confidence Scores Map Aggregation Method",required:!1,inputType:m.b.String,hint:"Defines how to calculate confidence rate for complex field like category selection. Should be one of max, mean, min. Example: scores = { A: 1.0, B: 0.5 }, max(scores) = 1.0, mean(scores) = 0.75, min(scores) = 0.5. Default value: max"}};m.b.Number,m.b.Number,m.b.Boolean,m.b.Boolean,m.b.Boolean,m.b.String,m.b.String;let g={numL0Reviews:{displayName:"Number of L0 Reviews",required:!0,inputType:m.b.Number,hint:"Number of L0 reviews required after the initial attempt."}
1,needsL1Review:{displayName:"Needs L1 Review",required:!0,inputType:m.b.Boolean,hint:"Whether or not an L1 tasker needs to review after the attempt and L0 reviews."},needsCorpReview:{displayName:"Needs Corp Review",required:!0,inputType:m.b.Boolean,hint:"Whether or not a corp user needs to approve after the attempt and L0/L1 reviews. AKA whether or not to send to L10."},responsesRequired:{displayName:"Responses Required",required:!0,inputType:m.b.Number,hint:"Number of responses required on the subtask."},alwaysSendBackToAttempt:{displayName:"Always Send Back to Attempt",required:!0,inputType:m.b.Boolean},discardResponseAfterSendBack:{displayName:"Discard response after SBQ",required:!1,inputType:m.b.Boolean},predictionsParams:{displayName:"Predictions Params",required:!1,inputType:m.b.JSON,hint:'Parameters to enable running predictions. Supports prelabeling, autoflag, attribute prelabeling.\n\n      "usePredictions": true - top level enable/disable for running predictions\n      "{autoflagParams|prelabelingParams|attributePrelabelingParams}": {\n      "{useAutoflag|usePrelabeling|useAttributePrelabeling}": true - prediction type enable/disable\n      "models": list of models to run [{ "modelName": "model name", "extra": ... }]\n      "modelLinters": model to linter mapping for autoflag {"model name": ["linters", ...]}\n      }\n    '},instantModel:{displayName:"Instant Model",required:!1,inputType:m.b.String,hint:"Document Model that would provide HTTP req/res functionality"},skipPipeline:{displayName:"Skip Pipeline",required:!1,inputType:m.b.Boolean,hint:"Skip the task pipeline if its not necessary"},confidenceModelParams:{displayName:"Confidence Model Params",required:!1,inputType:m.b.JSON,hint:"Parameters to enable confidence model"}};m.b.Number,m.b.Boolean,m.b.Boolean,m.b.Boolean;let b={numAttempts:{displayName:"Number of Initial Consensus Attempts",required:!0,inputType:m.b.Number,hint:"Number of initial labeler annotations used for consensus. If the confidence score for any individual field is too low, or the field fails a linter, the task will be sent to targeted review, where the L0 reviewers will focus on the problem fields."},numL0Reviews:{displayName:"Number of Targeted L0 Reviews",required:!0,inputType:m.b.Number,hint:"Number L0 reviews on problem fields."}
1,needsL1Review:{displayName:"Needs Targeted L1 Review",required:!0,inputType:m.b.Boolean,hint:"Determines if an additional L1 review is needed on top of the L0 reviews."},consensusFunctionType:{displayName:"Consensus Function Type",required:!0,inputType:m.b.String,hint:"Function used to determine the consensus value. One of: default, accuracyweightedconsensus, or externalprojectevaluation."},attemptFilterStrategy:{displayName:"Attempt Filter Strategy",required:!1,inputType:m.b.String,hint:"Function used to filter out attempts. One of: all_attempts, best_attempts, latest_attempts, or default."},targetConfidenceThreshold:{displayName:"Target Confidence Threshold",required:!0,inputType:m.b.Number,hint:"Used for dynamic consensus. This is the target confidence we want to compare to per field in order to decide if more attempts are needed. Should be a decimal value between 0 and 1."},maxNumAttempts:{displayName:"Max Num Attempts",required:!0,inputType:m.b.Number,hint:"Used for dynamic consensus. The maximum number of attempts on the subtask."},numIncrementalAttempts:{displayName:"Num Incremental Attempts",required:!0,inputType:m.b.Number,hint:"After each attempt, we will check if the target confidence threshold is met. If it is not, then we will add this many more attempts to the subtask until either that target confidence threshold is met or we hit the maximum number of attempts."},shortCircuitConfidenceThreshold:{displayName:"Short Circuit Confidence Threshold",required:!0,inputType:m.b.Number,hint:"If the confidence for a field falls below this threshold, we will stop adding attempts and directly send the task to review. This field is useful to avoid adding extra attempts when we know the target confidence threshold cannot be met."},confidenceThresholds:{displayName:"Confidence Thresholds",required:!0,inputType:m.b.JSON,hint:"Map of field ID to confidence threshold. Example: {'field_id_1': 0.7, 'field_id_2': 0.8}"},agreementThresholds:{displayName:"Agreement Thresholds",required:!0,inputType:m.b.JSON,hint:"Map of field ID to agreement threshold. Example: {'field_id_1': 0.7, 'field_id_2': 0.8}"},defaultAgreementThreshold:{displayName:"Default Agreement Threshold",required:!1,inputType:m.b.Number,hint:"Default agreement threshold."},reviewMaxChoices:{displayName:"Review Max Choices",required:!1,inputType:m.b.Number},reviewMinChoices:{displayName:"Review Min Choices",required:!1,inputType:m.b.Number},confidenceFieldInclusionList:{displayName:"Confidence Field Inclusion List",required:!1,inputType:m.b.JSON,hint:"Used for dynamic consensus. List of field IDs to check (e.g. ['field_A', 'field_B']). If this property is defined, only check if the listed fields are below the target confidence threshold."},fetchAdditionalChoices:{displayName:"Fetch Additional Choices",required:!0,inputType:m.b.Boolean,hint:"Currently used only for Instacart."},addUnjudgeableField:{displayName:"Add Unjudgeable Field",required:!0,inputType:m.b.Boolean,hint:"Currently used only for Instacart."},autogetSecondAttempt:{displayName:"Autoget Second Attempt for Consensus",required:!0,inputType:m.b.JSON,hint:"Currently used only for Instacart."},renderAsInitialChoiceFilter:{displayName:"Whether to render the other choices as initial choice",required:!1,inputType:m.b.Boolean}};(n=r||(r={})).Finish="finish",n.L12="L12",n.L10="L10",n.L0="L0",n.L0Only="L0 Only";var y=i(909016),x=i(90272),v=i(663752),w=i(245987),j=i(747910),k=i.n(j),N=i(73173),T=i.n(N),S=i(597565),C=i(129132),_=i(982964);let A=(0,u.ZL)({instructions:{textAlign:"center",marginBottom:16},info:{whiteSpace:"pre-line",marginBottom:16},error:{whiteSpace:"pre-line",color:"var(--color-RemoRed)",marginBottom:16},container:{},button:{marginBottom:16}});var pipeline_UpdateConfigDialog=e=>{let{projectId:t,open:i,setShowModal:n,config:r}=e,s=A(),[l,d]=(0,a.useState)([]),[c,u]=(0,a.useState)(!1),[p,h]=(0,a.useState)(!1),handleModalClose=()=>{n(!1)};(0,a.useEffect)(()=>{u(!1);let e=[],t=(0,S.ye)(r.pipelineName,r.pipelineParams);
1k().forEach(t,t=>{e.push({type:"Invalid JSON string"===t?C.r1.Error:C.r1.Warn,text:t})}),d(e),u(k().every(e,{type:C.r1.Warn}))},[r]);let handleUpdateConfig=async()=>{h(!0);let{message:e,success:i}=await (0,v.ZP)(null,"corp-api/pipeline/".concat(t,"/update"),{method:"POST",body:{config:r}});i?(handleModalClose(),T().success(e)):T().error(e),h(!1)};return(0,o.jsxs)(w.Vq,{open:i,onClose:handleModalClose,children:[(0,o.jsx)(w.$N,{children:"Update Config"}),(0,o.jsx)(w.cZ,{children:(0,o.jsxs)("div",{className:s.container,children:[(0,o.jsx)(_.X,{src:r,name:!1,iconStyle:"triangle",collapsed:1,collapseStringsAfterLength:120,groupArraysAfterLength:!1,enableClipboard:!0,displayObjectSize:!1,displayDataTypes:!1}),(0,o.jsxs)("div",{children:[l.map(e=>{let{type:t,text:i}=e;return(0,o.jsxs)("div",{className:t===C.r1.Error?s.error:s.info,children:[t,": ",i]},i)}),0===l.length&&(0,o.jsx)("div",{className:s.info,children:"No validation issues"})]}),(0,o.jsx)("div",{className:s.button,children:(0,o.jsx)(w.zx,{onClick:handleUpdateConfig,disabled:!c||p,children:"Update config"})})]})})]})},P=i(243553),L=i(540255),O=i(888965),E=i(305634),q=i(504357),M=i(92109),R=i(749975);let I=(0,u.ZL)({pageWrapper:{display:"flex",flexDirection:"column",width:"100%",height:"100%"}});var sections_ConfigPipeline=e=>{var t;let{project:i,user:n}=e,r=I(),[s,l]=(0,E.Z)(!1),[d,c]=(0,E.Z)(!1),[u]=(0,a.useState)({type:"project",id:null!==(t=i._id)&&void 0!==t?t:i.id}),{trySaveChanges:p,newSetValue:h,resetConfig:m,saving:f,configs:g,triggerGetConfigs:b,changes:y}=(0,L.WW)(n.email,P.rO7.Project,u,i);return((0,a.useEffect)(()=>{b()},[i]),g)?(0,o.jsxs)("div",{className:r.pageWrapper,children:[(0,o.jsxs)(M.Z,{name:"Pipeline Config",containZoom:!0,children:["Pipeline Type",(0,o.jsx)(O.Z,{placeholder:"Pipeline Type",value:{value:g.pipelineConfig.pipelineName.value,label:g.pipelineConfig.pipelineName.value},onChange:e=>{h("pipelineConfig.pipelineName",e.value)},options:g.pipelineConfig.pipelineName.enumValues.map(e=>({value:e,label:e}))}),(0,o.jsxs)(w.zx,{type:"secondary",onClick:l,children:["Toggle to ",s?"Interactive":"Raw"]}),(0,o.jsx)(w.zx,{type:"secondary",onClick:m,children:"Reset Config"}),(0,o.jsx)("div",{children:(0,o.jsx)(R.Z,{onEditJSON:e=>h("pipelineConfig.pipelineParams",e),isShowingRaw:s,json:g.pipelineConfig.pipelineParams.value,preserveTypes:!0})}),(0,o.jsx)(w.zx,{type:"secondary",onClick:()=>p(!1),disabled:!y||f,children:"Save Config"})]}),g.pipelineConfig.pipelineName.value===x.TaskPipelineName.ConfigurableSpecializationTask&&(0,o.jsxs)(M.Z,{name:"Pipeline Task Routing Graph",containZoom:!0,children:[(0,o.jsx)(q.Z,{projectName:i.name,pipelineConfigParams:g.pipelineConfig.pipelineParams.value,resetLayout:d,isCustomerFacing:!1}),(0,o.jsx)(w.zx,{type:"secondary",onClick:c,children:"Reset Layout"})]})]}):(0,o.jsxs)("div",{children:[(0,o.jsx)(w.$j,{}),(0,o.jsx)("p",{children:"Fetching config..."})]})};let z={[x.TaskPipelineName.ConsensusTask]:f,[x.TaskPipelineName.StandardTask]:g,[x.TaskPipelineName.TargetedReviewTask]:b},F=Object.keys(z),Z={[x.TaskType.TextCollection]:[x.TaskPipelineName.ConsensusTask,x.TaskPipelineName.StandardTask,x.TaskPipelineName.TargetedReviewTask]},propertyToBuilder=(e,t,i,n)=>{let{inputType:r,displayName:a,required:s,hint:l}=t[e],d=y.b[r];if(!d)throw Error("BuilderComponent not found for inputType: ".concat(r));return(0,o.jsx)("div",{className:"scaleui scale-tailwind scale-theme",children:(0,o.jsx)("div",{className:"pb-2",children:(0,o.jsx)(d,{typeBuilderMap:y.b,name:a,existingValue:i,updateProperty:n,required:s,hint:l})})},e)},B=(0,u.ZL)({pageWrapper:{display:"flex","flex-direction":"row",width:"100%",height:"100%"},section:{marginTop:"20px",marginBottom:"30px",flexGrow:2,marginLeft:24},title:{marginBottom:10},select:{marginBottom:20},builder:{maxWidth:500}});var qm_QMPipelineEditorPage=e=>{let{project:t,user:i}=e,n=B(),r=p.NZ.PipelineEditor,[s,l]=(0,a.useState)(x.TaskPipelineName.StandardTask),[d,c]=(0,a.useState)({}),[u,m]=(0,a.useState)(g),[f,b]=(0,a.useState)(!1),[y,j]=(0,a.useState)(!1),k=(0,a.useMemo)(()=>Object.keys(Z).includes(t.taskType)?Z[t.taskType]:Object.values(x.TaskPipelineName),[t]);return(0,a.useEffect)(()=>{(async function(){let{config:e}=await (0,v.ZP)(null,"corp-api/pipeline/".concat(t.id),{method:"GET"});if(e){let{pipelineName:t,pipelineParams:i}=e;t&&(l(t),F.includes(t)&&(m(z[t]),c(i)))}b(!0)})()},[t.id,t.taskType]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(h.Z,{title:r}),(0,o.jsxs)("div",{className:n.select,children:[(0,o.jsx)("div",{className:n.title,children:(0,o.jsx)(w.H3,{children:"Pipeline Name"})}),f&&(0,o.jsx)(w.Ph,{value:s||"",onChange:e=>{let t=e.target.value;if(l(t),c({}),t&&k.includes(t)&&F.includes(t)){let e=z[t];m(e);let i={};
1Object.keys(e).forEach(e=>{Object.keys(d).includes(e)&&(i[e]=d[e])}),c(i)}else c({})},children:k.map(e=>(0,o.jsx)(w.Wx,{value:e,children:e},e))})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:n.title,children:(0,o.jsx)(w.H3,{children:"Pipeline Params"})}),f&&(0,o.jsx)(o.Fragment,{children:F.includes(s||"")?(0,o.jsxs)("div",{className:n.builder,children:[Object.keys(u).map(e=>propertyToBuilder(e,u,d[e],t=>{c({...d,[e]:t})})),(0,o.jsx)(w.zx,{onClick:()=>{j(!0)},children:"Save Params"})]}):(0,o.jsxs)("div",{children:["Selected pipeline type is not yet supported in editor, please use next editor for changing configs:",(0,o.jsx)(sections_ConfigPipeline,{project:t,user:i})]})})]}),(0,o.jsx)(pipeline_UpdateConfigDialog,{projectId:t.id,open:y,setShowModal:j,config:{pipelineName:s,pipelineParams:d}})]})},D=i(268665),J=i(482770);let PipelineEditorNextJSPage=e=>{let{project:t,loading:i,error:n}=(0,c.Z)(e.projectId),r=U();return(0,o.jsxs)(s.Z,{user:e.user,children:[t&&(0,o.jsxs)("div",{className:r.pageWrapper,children:[(0,o.jsx)("div",{children:(0,o.jsx)(J.Z,{project:t,activeSection:p.NZ.PipelineEditor})}),(0,o.jsxs)("div",{className:"scale-tailwind scaleui scale-theme ml-4 grow",children:[(0,o.jsx)(h.Z,{title:p.NZ.PipelineEditor}),t.usesPipelineV3?(0,o.jsx)(D.ZP,{project:t}):(0,o.jsx)(qm_QMPipelineEditorPage,{project:t,user:e.user})]})]}),n&&(0,o.jsx)(d.Z,{error:n}),i&&(0,o.jsx)(l.Z,{})]})},U=(0,w.ZL)({pageWrapper:{display:"flex",height:"100%",width:"100%"}});PipelineEditorNextJSPage.getInitialProps=e=>{var t;return{projectId:null===(t=e.query)||void 0===t?void 0:t.project,user:e.user}};var W=PipelineEditorNextJSPage},764523:function(e,t,i){"use strict";i.d(t,{mQ:function(){return extractLabelChoices},p2:function(){return extractLabelChoicesForGeometry},tM:function(){return extractAllLabelChoices}});var n=i(828058),r=i(747910);function extractLabelChoicesForGeometry(e,t,i){if(t&&(0,n.x)(e)){var r,o,a,s;return!i&&e.params.limited_geometries?null!==(s=null===(o=(null!==(a=e.params.limited_geometries)&&void 0!==a?a:{})[t])||void 0===o?void 0:o.objects_to_annotate)&&void 0!==s?s:[]:(null===(r=e.params.geometries[t])||void 0===r?void 0:r.objects_to_annotate)||[]}throw Error("Not supported")}function extractLabelChoices(e){if((0,n.x)(e))return r.flatMap(e.params.geometries,"objects_to_annotate");throw Error("Not supported")}function extractAllLabelChoices(e){var t;return(0,n.x)(e)?r.flatMap(e.params.geometries,"objects_to_annotate"):null!==(t=e.params.objects_to_annotate)&&void 0!==t?t:[]}},828058:function(e,t,i){"use strict";i.d(t,{Q:function(){return isImageAnnotation},x:function(){return isMultiGeometryOrLidarTopdownAssignment}});var n=i(90272);function isMultiGeometryOrLidarTopdownAssignment(e){return e.type===n.TaskType.ImageAnnotation||e.type===n.TaskType.LidarTopdown||e.type===n.TaskType.VideoPlaybackAnnotation||e.type===n.TaskType.VideoAnnotation}function isImageAnnotation(e){return e.type===n.TaskType.ImageAnnotation}}},function(e){e.O(0,[23890,44147,45439,79290,61730,67945,14012,14004,57495,88637,86815,10492,80507,94828,99218,28041,75095,605,54464,21637,67138,70057,17696,72861,51274,84059,8238,18431,52931,10352,45560,35685,12642,82370,93877,58571,39989,73048,75392,13284,30962,75899,99257,1572,4750,13444,12100,23532,40907,57753,49430,94209,98413,57853,22636,60225,82770,17729,13314,83701,37627,34895,22573,11238,64953,9016,68665,49774,92888,40179],function(){return e(e.s=846313)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.