1"use strict";(self.webpackChunkccweb=self.webpackChunkccweb||[]).push([[120],{120:(Ye,E,d)=>{d.r(E),d.d(E,{FormEditPageModule:()=>Ad});var g=d(6814),W=d(183),N=d(3571),Q=d(6322),F=d(5907),X=d(1664),p=d(1086),m=d(6223),Ve=d(3945),Re=d(3883),He=d(8579),Ge=d(5972),$e=d(5271),C=d(1438),J=d(5985),je=d(7053),Ke=d(9933),ze=d(4421),We=d(6018),Z=d(9858),P=d(655),D=d(9862),u=d(1791),B=d(7908),Xe=d(9315),v=d(9397),I=d(6306),ee=d(2096),L=d(4716),et=d(2181),tt=d(4664),it=d(7398),s=d(6428),b=d(2193),q=d(3678),O=d(2811),te=d(1633),ie=d(3375),U=d(2894),Ze=d(9280),w=d(3394);const Ae=[{fieldType:s.ii.Section,validationType:s.xT.Optional,isDeleted:!1,isNextNumberActive:!1,typeLogic:"Invisible",fieldSecurity:[],id:b.A5.getUuid(),order:1,label:"Invisible",fields:[{fieldType:s.ii.SingleLineText,validationType:s.xT.Mandatory,isDeleted:!1,isNextNumberActive:!1,typeLogic:"0",fieldSecurity:[],id:b.A5.getUuid(),order:2,label:"Enter Title",validationMessage:"Please enter a title",disableSort:!0,locked:!0,disableDelete:!0,defaultValue:null},{fieldType:s.ii.Location,validationType:s.xT.Optional,isDeleted:!1,isNextNumberActive:!1,typeLogic:"",fieldSecurity:[],id:b.A5.getUuid(),order:3,label:"Location",address:null,disableDelete:!0,disableSort:!0,locked:!0,defaultValue:null}],isPaused:!1,assignees:null,parsedAssignees:{teams:[],users:[]},parsedTypeLogic:{assignable:!0},locked:!0},{fieldType:s.ii.Section,validationType:s.xT.Optional,isDeleted:!1,isNextNumberActive:!1,typeLogic:JSON.stringify({assignable:!0}),fieldSecurity:[],id:b.A5.getUuid(),order:4,label:"Section name...",fields:[{fieldType:s.ii.SingleLineText,validationType:s.xT.Optional,isDeleted:!1,isNextNumberActive:!1,typeLogic:"0",fieldSecurity:[],id:b.A5.getUuid(),order:5,label:"Sample Item",defaultValue:null}],isPaused:!1,assignees:null,parsedAssignees:{teams:[],users:[]},parsedTypeLogic:{assignable:!0}}];var ne=d(251);class y{static handleDuplicateVariableNames(o){const t=o.get("sections").controls.filter(l=>!l.value.isDeleted),n={};o.patchValue({duplicatedVariableNameIds:[]});for(const l of t){const a=l.get("fields").controls.filter(r=>!r.value.isDeleted&&r.value.variableName&&!ne.b.isMathOperation(r.value.variableName)&&"@"!==r.value.variableName);for(const r of a){r.patchValue({variableNameInUse:!1}),o.value.duplicatedVariableNameIds.includes(r.value.id)&&r.patchValue({variableNameInUse:!0});const c=r.get("variableName")?.value,_=r.get("id")?.value;if(c){if(n[c]){r.patchValue({variableNameInUse:!0}),r?.get("variableName")?.setErrors({variableNameInUse:!0});const h=this.getDuplicateItem(n[c],o);h?.patchValue({variableNameInUse:!0}),h?.get("variableName")?.setErrors({variableNameInUse:!0}),o.patchValue({duplicatedVariableNameIds:[...new Set([...o.value.duplicatedVariableNameIds,r.value.id,h?.value.id])]})}n[c]=_}}}}static getDuplicateItem(o,t){const n=t.get("sections").controls;for(const l of n){const a=l.get("fields").controls;for(const r of a)if(r.value.id===o)return r}return null}static checkVariableNamesExisting(o){const t=o.get("sections").controls.filter(n=>!n.value.isDeleted);for(const n of t)n.get("fields").controls.filter(a=>a.value.variableName&&!a.value.isDeleted).forEach(a=>this.checkExactVarNameExisting(a,o))}static checkExactVarNameExisting(o,t){if(!ne.b.isMathOperation(o.value.variableName))return void o.patchValue({variableNameNotExist:!1});const n=o.value.variableName.split(/[\(\)*+/-]+/),l=[...new Set(t.value.sections.filter(r=>!r.isDeleted).map(r=>r.fields.filter(c=>!c.isDeleted&&c.variableName&&!ne.b.isMathOperation(c.variableName)).map(c=>c.variableName)).flat())];let a=!1;n.forEach(r=>{a||(a=!!(r.includes("@")&&!l.includes(r)||!r.includes("@")&&r.length>0&&!/^(?!\.)(?!.*\.$)\d+(\.\d+)?$/.test(r)&&r.indexOf("Math.")<0))}),o.get("variableName")?.setErrors(a?{variableNameNotExist:a}:null),o.patchValue({variableNameNotExist:a})}static validateHierarchyFields(o){const t=[];o.get("sections")?.controls.forEach(a=>{a.value.isDeleted||a.get("fields").controls.filter(c=>{const _=c.value;!c.value.isDeleted&&_.label?.trim()&&_.fieldType===s.ii.Hierarchy&&t.push(c)})});const n=t.map(a=>a.value.label?.trim()),l=n.filter((a,r)=>n.indexOf(a)!==r);t.forEach(a=>{a.get("label")?.setErrors(l.includes(a.value.label?.trim())?{labelDuplicated:!0}:null)})}}var e=d(5879),Y=d(1535);const oe=[{fieldSecurity:[],fieldType:s.ii.Signature,id:"0",isNextNumberActive:!1,label:s.ii.Signature,order:null,typeLogic:"",isDeleted:!1,validationType:s.xT.Optional,validationMessage:""},{disableAdvSettings:!0,fieldSecurity:[],fieldType:s.ii.Photo,id:"0",isNextNumberActive:!1,label:s.b$.Photo,order:null,typeLogic:"",isDeleted:!1,validationType:s.xT.Optional},{fieldSecurity:[],fieldType:s.ii.SingleLineText,id:"0",isNextNumberActive:!1,order:null,typeLogic:"0",isDeleted:!1,validationType:s.xT.Optional,defaultValue:null,validationMessage:"",nextNumberValue:0},{fieldSecurity:[],fieldType:s.ii.MultiLineText,id:"0",isNextNumberActive:!1,order:null,typeLogic:"",isDeleted:!1,validationType:s.xT.Optional,defaultValue:null,validationMessage:""},{fieldSecurity:[],fieldTriggers:[],fieldType:s.ii.Boolean,id:"0",isNextNumberActive:!1,order:null,typeLogic:"Yes|No",isDeleted:!1,validationType:s.xT.Optional,defaultValue:null,validationMessage:""},{fieldSecurity:[],fieldTriggers:[],fieldType:s.ii.Trilean,id:"0",isNextNumberActive:!1,order:null,typeLogic:"Yes|No|N/A",isDeleted:!1,validationType:s.xT.Optional,defaultValue:null,validationMessage:""},{aiLogic:"|false",alert_new_min_max:!1,fieldSecurity:[],fieldType:s.ii.Numeric,id:"0",isNextNumberActive:!1,order:null,typeLogic:"",isMonetary:!1,isDeleted:!1,validationType:s.xT.Optional,mathFormula:"",validationMessage:"",variableName:"@",hasCalculation:!1,calculatedFunction:null,defaultValue:null,nextNumberValue:0,triggerMessage:null,label:""},{fieldSecurity:[],fieldType:s.ii.Barcode,id:"0",isNextNumberActive:!1,label:s.b$.Barcode,order:null,typeLogic:"",isDeleted:!1,validationType:s.xT.Optional,defaultValue:null,validationMessage:""},{fieldSecurity:[],fieldType:s.ii.Location,id:"0",isNextNumberActive:!1,label:s.ii.Location,order:null,typeLogic:"",isDeleted:!1,validationType:s.xT.Optional,address:null,defaultValue:null,validationMessage:""},{areChoicesValid:!0,fieldSecurity:[],fieldTriggers:[],fieldType:s.ii.Hierarchy,currentApiStatus:null,id:"0",isNextNumberActive:!1,order:null,typeLogic:null,isDeleted:!1,validationType:s.xT.Optional,defaultValue:"",validationMessage:"",apiURL:"",apiObjectName:"",apiPassword:"",offlineDSN:"",apiVariableName:"",fieldName:"",apiUserName:"",mathFormula:"",variableName:"@",label:""},{areChoicesValid:!0,fieldSecurity:[],fieldTriggers:[],fieldType:s.ii.Asset,currentApiStatus:null,id:"0",isNextNumberActive:!1,order:null,typeLogic:null,isDeleted:!1,validationType:s.xT.Optional,defaultValue:"",validationMessage:"",apiURL:"",apiObjectName:"",apiPassword:"",offlineDSN:"",apiVariableName:"",fieldName:"",apiUserName:"",mathFormula:"",variableName:"",label:"",hierarchyField:null,assetTypeId:null},{areChoicesValid:!0,fieldSecurity:[],fieldTriggers:[],fieldType:s.ii.SingleSelect,currentApiStatus:null,id:"0",isNextNumberActive:!1,order:null,typeLogic:"",isDeleted:!1,validationType:s.xT.Optional,defaultValue:null,validationMessage:"",apiURL:"",apiObjectName:"",apiPassword:"",offlineDSN:"",apiVariableName:"",fieldName:"",apiUserName:"",automation:null},{areChoicesValid:!0,fieldSecurity:[],fieldType:s.ii.MultiSelect,defaultValue:null,defaultValueParsed:[],parsedTypeLogic:[],currentApiStatus:null,id:"0",isNextNumberActive:!1,order:null,typeLogic:"",isDeleted:!1,validationType:s.xT.Optional,validationMessage:"",apiURL:"",apiObjectName:"",apiPassword:"",offlineDSN:"",apiVariableName:"",fieldName:"",apiUserName:"",automation:null},{fieldSecurity:[],fieldType:s.ii.DateTime,id:"0",isNextNumberActive:!1,isVariableInUse:"no",order:null,typeLogic:"0",typeOfContent:"0",isDeleted:!1,validationType:s.xT.Optional,defaultValue:null,variableName:"@",validationMessage:"",label:"",date:null,time:null},{fieldSecurity:[],fieldType:s.ii.Task,id:"0",isNextNumberActive:!1,order:null,typeLogic:JSON.stringify({formId:null,formName:null,comments:""}),isDeleted:!1,validationType:s.xT.Optional,defaultValue:null,validationMessage:""},{disableAdvSettings:!0,fieldSecurity:[],fieldType:s.ii.Label,id:"0",isNextNumberActive:!1,order:null,typeLogic:"",isDeleted:!1,validationType:s.xT.Optional,validationMessage:"",label:s.b$.Label},{fieldSecurity:[],fieldType:s.ii.ImageViewer,id:"0",isNextNumberActive:!1,order:null,typeLogic:"",isDeleted:!1,validationType:s.xT.Optional,defaultValue:null},{fieldSecurity:[],fieldType:s.ii.InsertFile,id:"0",isNextNumberActive:!1,order:null,typeLogic:"upload",typeLogicBkp:null,typeLogicParsed:[],isDeleted:!1,validationType:s.xT.Optional},{fieldSecurity:[],fieldType:s.ii.WebViewer,id:"0",isNextNumberActive:!1,order:null,typeLogic:"",isDeleted:!1,validationType:s.xT.Optional,defaultValue:null},{fieldSecurity:[],fieldType:s.ii.AddChild,id:"0",isNextNumberActive:!1,order:null,typeLogic:JSON.stringify({formId:null,formName:null,comments:"",isTrigger:!1}),isDeleted:!1,validationType:s.xT.Optional,defaultValue:null,validationMessage:""},{fieldType:s.ii.IotDeviceDataPoint,aiLogic:"|false",defaultValue:null,alert_new_min_max:!1,fieldSecurity:[],id:"0",isNextNumberActive:!1,isVariableInUse:"no",order:null,typeLogic:"",isDeleted:!1,validationType:s.xT.Optional,hasCalculation:!1,apiURL:"",variableName:"",calculatedFunction:null,apiUserName:"",apiPassword:"",label:""},{aiLogic:"0|false",alert_new_min_max:!1,apiObjectName:"X Axis|Y Axis|Line",fieldSecurity:[],fieldType:s.ii.IotDeviceChart,id:"0",iotChartL:"Line",iotChartX:"X Axis",iotChartY:"Y Axis",isNextNumberActive:!1,isVariableInUse:"no",order:null,pct_avg_tolerance:0,triggerMessageHigh:"",triggerMessageLow:"",triggerMessageTarget:"",typeLogic:"",isDeleted:!1,validationType:s.xT.Optional,apiURL:"",apiUserName:"",apiPassword:""},{aiLogic:"0|false",alert_new_min_max:!1,fieldSecurity:[],fieldType:s.ii.IotDeviceCmd,id:"0",isNextNumberActive:!1,isVariableInUse:"no",order:null,pct_avg_tolerance:0,typeLogic:"Open\nClose\nStart\nStop\nEmergency Shut Down",isDeleted:!1,validationType:s.xT.Optional,apiURL:"",apiUserName:"",apiPassword:""},{fieldSecurity:[],fieldType:s.ii.CustomScript,id:"0",isNextNumberActive:!1,order:null,typeLogic:"",label:s.b$.None,isDeleted:!1,validationType:s.xT.Optional}],V=[{fieldSecurity:[],fieldType:s.bA.Section,fields:[],id:"0",pause:!1,assignees:null,parsedAssignees:{teams:[],users:[]},isNextNumberActive:!1,order:null,typeLogic:JSON.stringify({assignable:!0}),parsedTypeLogic:{assignable:!0}
1,isDeleted:!1,validationType:"0",isPaused:!1},{fieldSecurity:[],fieldType:s.bA.Table,fields:[],id:"0",pause:!1,assignees:null,parsedAssignees:{teams:[],users:[]},isNextNumberActive:!1,order:null,typeLogic:JSON.stringify({assignable:!0,advanceTable:!1,rows:[],isColLocked:{},addRows:!1,editRows:!0,deleteRows:!1}),parsedTypeLogic:{assignable:!0,advanceTable:!1,rows:[],isColLocked:{},addRows:!1,editRows:!0,deleteRows:!1},isDeleted:!1,validationType:"0",isPaused:!1},{fieldSecurity:[],fieldType:s.bA.Trigger,fields:[],id:"0",pause:!1,assignees:null,parsedAssignees:{teams:[],users:[]},isNextNumberActive:!1,order:null,typeLogic:null,isDeleted:!1,validationType:"0"},{fieldSecurity:[],fieldType:s.bA.Approval,fields:[],id:"0",pause:!1,assignees:null,parsedAssignees:{teams:[],users:[]},isNextNumberActive:!1,order:null,typeLogic:JSON.stringify({assignable:!0}),parsedTypeLogic:{assignable:!0},isDeleted:!1,validationType:"0",label:s.b$.ApprovalSection}],Ce=["Math.abs","Math.acos","Math.acosh","Math.asin","Math.asinh","Math.atan","Math.atan2","Math.atanh","Math.cbrt","Math.ceil","Math.clz32","Math.cos","Math.cosh","Math.exp","Math.expm1","Math.floor","Math.fround","Math.hypot","Math.imul","Math.log","Math.log10","Math.log1p","Math.log2","Math.max","Math.min","Math.pow","Math.random","Math.round","Math.sign","Math.sin","Math.sinh","Math.sqrt","Math.tan","Math.tanh","Math.trunc"];var ke=d(1677),Se=d(7440);const Ne=["address-book","address-card","adjust","air-freshener","align-center","align-justify","align-left","align-right","allergies","ambulance","american-sign-language-interpreting","anchor","angle-double-down","angle-double-left","angle-double-right","angle-double-up","angle-down","angle-left","angle-right","angle-up","angry","ankh","apple-alt","archive","archway","arrow-alt-circle-down","arrow-alt-circle-left","arrow-alt-circle-right","arrow-alt-circle-up","arrow-circle-down","arrow-circle-left","arrow-circle-right","arrow-circle-up","arrow-down","arrow-left","arrow-right","arrow-up","arrows-alt","arrows-alt-h","arrows-alt-v","assistive-listening-systems","asterisk","at","atlas","atom","audio-description","award","baby","baby-carriage","backspace","backward","bacon","bacteria","bacterium","bahai","balance-scale","balance-scale-left","balance-scale-right","ban","band-aid","barcode","bars","baseball-ball","basketball-ball","bath","battery-empty","battery-full","battery-half","battery-quarter","battery-three-quarters","bed","beer","bell","bell-slash","bezier-curve","bible","bicycle","biking","binoculars","biohazard","birthday-cake","blender","blender-phone","blind","blog","bold","bolt","bomb","bone","bong","book","book-dead","book-medical","book-open","book-reader","bookmark","border-all","border-none","border-style","bowling-ball","box","box-open","box-tissue","boxes","braille","brain","bread-slice","briefcase","briefcase-medical","broadcast-tower","broom","brush","bug","building","bullhorn","bullseye","burn","bus","bus-alt","business-time","calculator","calendar","calendar-alt","calendar-check","calendar-day","calendar-minus","calendar-plus","calendar-times","calendar-week","camera","camera-retro","campground","candy-cane","cannabis","capsules","car","car-alt","car-battery","car-crash","car-side","caravan","caret-down","caret-left","caret-right","caret-square-down","caret-square-left","caret-square-right","caret-square-up","caret-up","carrot","cart-arrow-down","cart-plus","cash-register","cat","certificate","chair","chalkboard","chalkboard-teacher","charging-station","chart-area","chart-bar","chart-line","chart-pie","check","check-circle","check-double","check-square","cheese","chess","chess-bishop","chess-board","chess-king","chess-knight","chess-pawn","chess-queen","chess-rook","chevron-circle-down","chevron-circle-left","chevron-circle-right","chevron-circle-up","chevron-down","chevron-left","chevron-right","chevron-up","child","church","circle","circle-notch","city","clinic-medical","clipboard","clipboard-check","clipboard-list","clock","clone","closed-captioning","cloud","cloud-download-alt","cloud-meatball","cloud-moon","cloud-moon-rain","cloud-rain","cloud-showers-heavy","cloud-sun","cloud-sun-rain","cloud-upload-alt","cocktail","code","code-branch","coffee","cog","cogs","coins","columns","comment","comment-alt","comment-dollar","comment-dots","comment-medical","comment-slash","comments","comments-dollar","compact-disc","compass","compress","compress-alt","compress-arrows-alt","concierge-bell","cookie","cookie-bite","copy","copyright","couch","credit-card","crop","crop-alt","cross","crosshairs","crow","crown","crutch","cube","cubes","cut","database","deaf","democrat","desktop","dharmachakra","diagnoses","dice","dice-d20","dice-d6","dice-five","dice-four","dice-one","dice-six","dice-three","dice-two","digital-tachograph","directions","disease","divide","dizzy","dna","dog","dollar-sign","dolly","dolly-flatbed","donate","door-closed","door-open","dot-circle","dove","download","drafting-compass","dragon","draw-polygon","drum","drum-steelpan","drumstick-bite","dumbbell","dumpster","dumpster-fire","dungeon","edit","egg","eject","ellipsis-h","ellipsis-v","envelope","envelope-open","envelope-open-text","envelope-square","equals","eraser","ethernet","euro-sign","exchange-alt","exclamation","exclamation-circle","exclamation-triangle","expand","expand-alt","expand-arrows-alt","external-link-alt","external-link-square-alt","eye","eye-dropper","eye-slash","fan","fast-backward","fast-forward","faucet","fax","feather","feather-alt","female","fighter-jet","file","file-alt","file-archive","file-audio","file-code","file-contract","file-csv","file-download","file-excel","file-ex
1port","file-image","file-import","file-invoice","file-invoice-dollar","file-medical","file-medical-alt","file-pdf","file-powerpoint","file-prescription","file-signature","file-upload","file-video","file-word","fill","fill-drip","film","filter","fingerprint","fire","fire-alt","fire-extinguisher","first-aid","fish","fist-raised","flag","flag-checkered","flag-usa","flask","flushed","folder","folder-minus","folder-open","folder-plus","font","football-ball","forward","frog","frown","frown-open","funnel-dollar","futbol","gamepad","gas-pump","gavel","gem","genderless","ghost","gift","gifts","glass-cheers","glass-martini","glass-martini-alt","glass-whiskey","glasses","globe","globe-africa","globe-americas","globe-asia","globe-europe","golf-ball","gopuram","graduation-cap","greater-than","greater-than-equal","grimace","grin","grin-alt","grin-beam","grin-beam-sweat","grin-hearts","grin-squint","grin-squint-tears","grin-stars","grin-tears","grin-tongue","grin-tongue-squint","grin-tongue-wink","grin-wink","grip-horizontal","grip-lines","grip-lines-vertical","grip-vertical","guitar","h-square","hamburger","hammer","hamsa","hand-holding","hand-holding-heart","hand-holding-medical","hand-holding-usd","hand-holding-water","hand-lizard","hand-middle-finger","hand-paper","hand-peace","hand-point-down","hand-point-left","hand-point-right","hand-point-up","hand-pointer","hand-rock","hand-scissors","hand-sparkles","hand-spock","hands","hands-helping","hands-wash","handshake","handshake-alt-slash","handshake-slash","hanukiah","hard-hat","hashtag","hat-cowboy","hat-cowboy-side","hat-wizard","hdd","head-side-cough","head-side-cough-slash","head-side-mask","head-side-virus","heading","headphones","headphones-alt","headset","heart","heart-broken","heartbeat","helicopter","highlighter","hiking","hippo","history","hockey-puck","holly-berry","home","horse","horse-head","hospital","hospital-alt","hospital-symbol","hospital-user","hot-tub","hotdog","hotel","hourglass","hourglass-end","hourglass-half","hourglass-start","house-damage","house-user","hryvnia","i-cursor","ice-cream","icicles","icons","id-badge","id-card","id-card-alt","igloo","image","images","inbox","indent","industry","infinity","info","info-circle","italic","jedi","joint","journal-whills","kaaba","key","keyboard","khanda","kiss","kiss-beam","kiss-wink-heart","kiwi-bird","landmark","language","laptop","laptop-code","laptop-house","laptop-medical","laugh","laugh-beam","laugh-squint","laugh-wink","layer-group","leaf","lemon","less-than","less-than-equal","level-down-alt","level-up-alt","life-ring","lightbulb","link","lira-sign","list","list-alt","list-ol","list-ul","location-arrow","lock","lock-open","long-arrow-alt-down","long-arrow-alt-left","long-arrow-alt-right","long-arrow-alt-up","low-vision","luggage-cart","lungs","lungs-virus","magic","magnet","mail-bulk","male","map","map-marked","map-marked-alt","map-marker","map-marker-alt","map-pin","map-signs","marker","mars","mars-double","mars-stroke","mars-stroke-h","mars-stroke-v","mask","medal","medkit","meh","meh-blank","meh-rolling-eyes","memory","menorah","mercury","meteor","microchip","microphone","microphone-alt","microphone-alt-slash","microphone-slash","microscope","minus","minus-circle","minus-square","mitten","mobile","mobile-alt","money-bill","money-bill-alt","money-bill-alt","money-bill-wave","money-bill-wave-alt","money-check","money-check-alt","monument","moon","mortar-pestle","mosque","motorcycle","mountain","mouse","mouse-pointer","mug-hot","music","network-wired","neuter","newspaper","not-equal","notes-medical","object-group","object-ungroup","oil-can","om","otter","outdent","pager","paint-brush","paint-roller","palette","pallet","paper-plane","paperclip","parachute-box","paragraph","parking","passport","pastafarianism","paste","pause","pause-circle","paw","peace","pen","pen-alt","pen-fancy","pen-nib","pen-square","pencil-alt","pencil-ruler","people-arrows","people-carry","pepper-hot","percent","percentage","person-booth","phone","phone-alt","phone-slash","phone-square","phone-square-alt","phone-volume","photo-video","piggy-bank","pills","pizza-slice","place-of-worship","plane","plane-arrival","plane-departure","plane-slash","play","play-circle","plug","plus","plus-circle","plus-square","podcast","poll","poll-h","poo","poo-storm","poop","portrait","pound-sign","power-off","pray","praying-hands","prescription","prescription-bottle","prescription-bottle-alt","print","procedures","project-diagram","pump-medical","pump-soap","puzzle-piece","qrcode","question","question-circle","quidditch","quote-left","quote-right","quran","radiation","radiation-alt","rainbow","random","receipt","record-vinyl","recycle","redo","redo-alt","registered","remove-format","reply","reply-all","republican","restroom","retweet","ribbon","ring","road","robot","rocket","route","rss","rss-square","ruble-sign","ruler","ruler-combined","ruler-horizontal","ruler-vertical","running","rupee-sign","sad-cry","sad-tear","satellite","satellite-dish","save","school","screwdriver","scroll","sd-card","search","search-dollar","search-location","search-minus","search-plus","seedling","server","shapes","share","share-alt","share-alt-square","share-square","shekel-sign","shield-alt","shield-virus","ship","shipping-fast","shoe-prints","shopping-bag","shopping-basket","shopping-cart","shower","shuttle-van","sign","sign-in-alt","sign-language","sign-out-alt","signal","signature","sink","sitemap","skating","skiing","skiing-nordic","skull","skull-crossbones","slash","sleigh","sliders-h","smile","smile-beam","smile-wink","smog","smoking","smoking-ban","sms","snowboarding","snowflake","snowman","snowplow","soap","socks","solar-panel","sort","sort-alpha-down","sort-alpha-down-alt","sort-alpha-up","sort-alpha-up-alt","sort-amount-down","sort-amount-down-alt","sort-amount-up","sort-amount-up-alt","sort-down","sort-numeric-down","sort-numeric-down-alt","sort-numeric-up","sort-numeric-up-alt","sort-up","spa","space-shuttle","spell-check","spider","spinner","splotch","spray-can","square","square-full","square-root-alt","stamp","star","star-and-crescent","star-half","star-half-alt","star-of-david","star-of-life","step-backward","step-forward","stethoscope","sticky-note","stop","stop-circle","stopwatch","stopwatch-20","store","store-alt","store-alt-slash","store-slash","stream","street-view","strikethrough","stroopwafel","subscript","subway","suitcase","suitcase-rolling","sun","superscript","surprise","swatchbook","swimmer","swimming-pool","synagogue","sync","sync-alt","syringe","table","table-tennis","tablet","tablet-alt","tablets","tachometer-alt","tag","tags","tape","tasks","taxi","teeth","teeth-open","temperature-high","temperature-low","tenge","terminal","text-height","text-width","th","th-large","th-list","theater-masks","thermometer","thermometer-empty","thermometer-full","thermometer-half","thermometer-quarter","thermometer-three-quarters","thumbs-down","thumbs-up","thumbtack","ticket-alt","times","times-circle","tint","tint-slash","tired","toggle-off","toggle-on","toilet","toilet-paper","toilet-paper-slash","toolbox","tools","tooth","torah","torii-gate","tractor","trademark","traffic-light","trailer","train","tram","transgender","transgender-alt","trash","trash-alt","trash-restore","trash-restore-alt","tree","trophy","truck","truck-loading","truck-monster","truck-moving","truck-pickup","tshirt","tty","tv","umbrella","umbrella-beach","underline","undo","undo-alt","universal-access","university","unlink","unlock","unlock-alt","upload","user","user-alt","user-alt-slash","user-astronaut","user-check","user-circle","user-clock","user-cog","user-edit","user-friends","user-graduate","user-injured","user-lock","user-md","user-minus","user-ninja","user-nurse","user-plus","user-secret","user-shield","user-slash","user-tag","user-tie","user-times","users","users-cog","users-slash","utensil-spoon","utensils","vector-square","venus","venus-double","venus-mars","vest","vest-patches","vial","vials","video","video-slash","vihara","virus","virus-slash","viruses","voicemail","volleyball-ball","volume-down","volume-mute","volume-off","volume-up","vote-yea","vr-cardboard","walking","wallet","warehouse","water","wave-square","weight","weight-hanging","wheelchair","wifi","wind","window-close","window-maximize","window-minimize","window-restore","wine-bottle","wine-glass","wine-glass-alt","won-sign","wrench","x-ray","yen-sign","yin-yang"];var nt=d(4844);function ot(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",13)(1,"button",14),e.NdJ("click",function(){const a=e.CHM(t).$implicit,r=e.oxw();return r.workflowForm.value.icon=a,e.KtG(r.workflowForm.markAsDirty())}),e._UZ(2,"i"),e.TgZ(3,"small",15),e._uU(4),e.qZA()()()}if(2&i){const t=o.$implicit,n=e.oxw();e.xp6(1),e.ekj("active",n.workflowForm.value.icon===t),e.xp6(1),e.Gre("fas fa-",t," fa-3x"),e.xp6(2),e.Oqu(t)}}let lt=(()=>{class i{constructor(){this.icons={library:Ne,searchResult:Ne,pageSize:60,currentPage:1}}nextIconPage(){this.icons.currentPage<this.icons.library.length/this.icons.pageSize&&this.icons.currentPage++}prevIconPage(){this.icons.currentPage<this.icons.library.length/this.icons.pageSize&&this.icons.currentPage--}updateIcons(t){const n=t.target.value;this.icons.currentPage=1,this.icons.searchResult=this.icons.library.filter(l=>l.includes(n))}trackByValue(t,n){return n}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275cmp=e.Xpm({type:i,selectors:[["ff-icon-library"]],inputs:{workflowForm:"workflowForm"},decls:20,vars:11,consts:[["ngbDropdown","",1,"input-group-btn","icon-library"],["type","button","ngbDropdownToggle","",1,"btn","hide-arrow"],["ngbDropdownMenu","",1,"p-0"],[1,"searchBox","m-3"],["type","text","placeholder","Search icon",1,"form-control",3,"input"],[1,"fa","fa-search"],[1,"catalog","mx-3"],[1,"row","m-0"],["class","col-4",4,"ngFor","ngForOf","ngForTrackBy"],[1,"pagination","border-top","d-flex","justify-content-between"],["type","button",1,"flex-fill","btn","btn-outline-secondary","border","border-white",3,"disabled","click"],[1,"fas","fa-angle-double-left","text-info","pe-2"],[1,"fas","fa-angle-double-right","text-info","ps-2"],[1,"col-4"],["type","button",1,"btn","btn-link","text-decoration-none","w-100",3,"click"],[1,"d-block","pt-2","lh-sm"]],template:function(n,l){1&n&&(e.TgZ(0,"div",0)(1,"button",1),e._UZ(2,"i"),e.qZA(),e.TgZ(3,"div",2)(4,"div",3)(5,"input",4),e.NdJ("input",function(r){return l.updateIcons(r)}),e.qZA(),e._UZ(6,"i",5),e.qZA(),e.TgZ(7,"div",6)(8,"div",7),e.YNc(9,ot,5,6,"div",8),e.ALo(10,"chunk"),e.qZA()(),e.TgZ(11,"div",9)(12,"button",10),e.NdJ("click",function(){return l.prevIconPage()}),e._UZ(13,"i",11),e.TgZ(14,"span"),e._uU(15,"Previous page"),e.qZA()(),e.TgZ(16,"button",10),e.NdJ("click",function(){return l.nextIconPage()}),e.TgZ(17,"span"),e._uU(18,"Next page"),e.qZA(),e._UZ(19,"i",12),e.qZA()()()()),2&n&&(e.xp6(2),e.Gre("fas text-muted fa-",l.workflowForm.value.icon||"file"," fa-lg"),e.xp6(7),e.Q6J("ngForOf",e.Dn7(10,7,l.icons.searchResult,l.icons.currentPage,l.icons.pageSize))("ngForTrackBy",l.trackByValue),e.xp6(3),e.Q6J("disabled",1===l.icons.currentPage),e.xp6(4),e.Q6J("disabled",l.icons.currentPage===l.icons.searchResult.length/l.icons.pageSize))},dependencies:[g.sg,p.jt,p.iD,p.Vi,nt.S],encapsulation:2})}return i})();var R=d(2563),at=d(9329);function rt(i,o){1&i&&(e.TgZ(0,"p",15),e._UZ(1,"i",16),e.TgZ(2,"span",17),e._uU(3),e.ALo(4,"translate"),e.qZA()()),2&i&&(e.xp6(3),e.Oqu(e.l
1cZ(4,1,"FORM.Workflow name is required")))}function st(i,o){1&i&&(e.TgZ(0,"p",18),e._UZ(1,"i",16),e.TgZ(2,"span",17),e._uU(3),e.ALo(4,"translate"),e.qZA()()),2&i&&(e.xp6(3),e.Oqu(e.lcZ(4,1,"FORM.This workflow name already exists")))}function ct(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",19),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.scrollToError())}),e._UZ(1,"i",20),e.qZA()}if(2&i){const t=e.oxw().opened;e.xp6(1),e.ekj("fa-angle-down",!t)("fa-angle-up",t)}}function _t(i,o){if(1&i&&(e.TgZ(0,"button",21),e._UZ(1,"i",20),e.qZA()),2&i){const t=e.oxw().opened;e.xp6(1),e.ekj("fa-angle-down",!t)("fa-angle-up",t)}}const dt=function(i){return{"invalid-input":i}};function pt(i,o){if(1&i&&(e.TgZ(0,"div",6),e._UZ(1,"i",7)(2,"ff-icon-library",8),e.TgZ(3,"div",9),e._UZ(4,"input",10),e.YNc(5,rt,5,3,"p",11),e.YNc(6,st,5,3,"p",12),e.qZA(),e.YNc(7,ct,2,4,"button",13),e.YNc(8,_t,2,4,"button",14),e.qZA()),2&i){const t=e.oxw();e.xp6(2),e.Q6J("workflowForm",t.workflowForm),e.xp6(2),e.Q6J("ngClass",e.VKq(6,dt,t.workflowForm.controls.formName.dirty&&((null==t.workflowForm.controls.formName.errors?null:t.workflowForm.controls.formName.errors.required)||(null==t.workflowForm.controls.formName.errors?null:t.workflowForm.controls.formName.errors.formNameExists)))),e.xp6(1),e.Q6J("ngIf",t.workflowForm.controls.formName.dirty&&(null==t.workflowForm.controls.formName.errors?null:t.workflowForm.controls.formName.errors.required)),e.xp6(1),e.Q6J("ngIf",null==t.workflowForm.controls.formName.errors?null:t.workflowForm.controls.formName.errors.formNameExists),e.xp6(1),e.Q6J("ngIf",null==t.workflowForm.controls.process.errors?null:t.workflowForm.controls.process.errors.required),e.xp6(1),e.Q6J("ngIf",!(null!=t.workflowForm.controls.process.errors&&t.workflowForm.controls.process.errors.required))}}function mt(i,o){if(1&i&&(e._UZ(0,"i",66),e.TgZ(1,"span"),e._uU(2),e.TgZ(3,"small",67),e._uU(4),e.qZA()()),2&i){const t=o.$implicit;e.xp6(2),e.hij(" ",t.fullName," "),e.xp6(2),e.Oqu(t.email)}}function gt(i,o){1&i&&(e.TgZ(0,"span",68,69),e._UZ(2,"i",70),e._uU(3),e.ALo(4,"translate"),e.qZA()),2&i&&(e.xp6(3),e.hij(" ",e.lcZ(4,1,"FORM.Function is required")," "))}function ut(i,o){if(1&i&&(e._UZ(0,"i",66),e.TgZ(1,"span"),e._uU(2),e.TgZ(3,"small",67),e._uU(4),e.qZA()()),2&i){const t=o.$implicit;e.xp6(2),e.hij(" ",t.fullName," "),e.xp6(2),e.Oqu(t.email)}}function ft(i,o){if(1&i&&(e.TgZ(0,"label",30),e._uU(1),e.ALo(2,"translate"),e.qZA(),e.TgZ(3,"textarea",31),e._uU(4," "),e.qZA(),e.TgZ(5,"label",32),e._uU(6),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"fieldset",33)(9,"ff-select-multiple-items",34),e.ALo(10,"filterArrayByValue"),e.YNc(11,mt,5,2,"ng-template",null,35,e.W1O),e.qZA()(),e.TgZ(13,"label",36),e._uU(14),e.ALo(15,"translate"),e.qZA(),e._UZ(16,"ff-select-single-item",37),e.YNc(17,gt,5,3,"span",38),e.TgZ(18,"div",39)(19,"div",40),e._UZ(20,"input",41),e.qZA(),e.TgZ(21,"div",42)(22,"label",43),e._uU(23),e.ALo(24,"translate"),e.qZA(),e.TgZ(25,"p"),e._UZ(26,"i",44),e._uU(27),e.ALo(28,"translate"),e.qZA(),e.TgZ(29,"p"),e._uU(30),e.ALo(31,"translate"),e.qZA(),e.TgZ(32,"p"),e._uU(33),e.ALo(34,"translate"),e.qZA()()(),e.TgZ(35,"div",45)(36,"div",40),e._UZ(37,"input",46),e.qZA(),e.TgZ(38,"div",42)(39,"fieldset",47)(40,"label",48),e._uU(41),e.ALo(42,"translate"),e.qZA(),e.TgZ(43,"div",49)(44,"div",50)(45,"label",51),e._uU(46),e.ALo(47,"translate"),e.qZA(),e._UZ(48,"input",52),e.qZA(),e.TgZ(49,"div",50)(50,"label",53),e._uU(51),e.ALo(52,"translate"),e.qZA(),e.TgZ(53,"select",54)(54,"option",55),e._uU(55),e.ALo(56,"translate"),e.qZA(),e.TgZ(57,"option",56),e._uU(58),e.ALo(59,"translate"),e.qZA(),e.TgZ(60,"option",57),e._uU(61),e.ALo(62,"translate"),e.qZA()()(),e.TgZ(63,"div",50)(64,"label",53),e._uU(65),e.ALo(66,"translate"),e.qZA(),e._UZ(67,"ff-select-single-item",58),e.ALo(68,"getUserById"),e.qZA()()(),e.TgZ(69,"p",59),e._UZ(70,"i",44),e._uU(71),e.ALo(72,"translate"),e.qZA()()(),e.TgZ(73,"div",39)(74,"div",40),e._UZ(75,"input",60),e.qZA(),e.TgZ(76,"div",42)(77,"label",61),e._uU(78),e.ALo(79,"translate"),e.qZA(),e.TgZ(80,"label"),e._uU(81),e.ALo(82,"translate"),e.qZA(),e.TgZ(83,"fieldset",33),e._UZ(84,"ff-select-single-item",62),e.ALo(85,"getUserById"),e.qZA(),e.TgZ(86,"p",59),e._UZ(87,"i",44),e._uU(88),e.ALo(89,"translate"),e.qZA()()(),e.TgZ(90,"div",39)(91,"div",40),e._UZ(92,"input",63),e.qZA(),e.TgZ(93,"div",42)(94,"label",64),e._uU(95),e.ALo(96,"translate"),e.qZA(),e.TgZ(97,"fieldset",33)(98,"ff-select-multiple-items",65),e.YNc(99,ut,5,2,"ng-template",null,35,e.W1O),e.qZA()(),e.TgZ(101,"p",59),e._UZ(102,"i",44),e._uU(103),e.ALo(104,"translate"),e.qZA()()()),2&i){const t=e.oxw(2);let n,l;
1e.xp6(1),e.Oqu(e.lcZ(2,42,"FORM.Description")),e.xp6(5),e.Oqu(e.lcZ(7,44,"FORM.Ownership")),e.xp6(2),e.Q6J("disabled",!t.isOwner&&t.user$.value.role!==t.UserRoles.Admin),e.xp6(1),e.Q6J("items",e.Dn7(10,46,t.workflowForm.value.assignableUsers,"isDisabled",!1))("selectedFilterItems",t.selectedOwners),e.xp6(5),e.Oqu(e.lcZ(15,50,"FORM.Function")),e.xp6(2),e.Q6J("items",t.classifications)("placeholder",t.workflowForm.value.process.value||"Choose one")("searchPlaceholder","Function"),e.xp6(1),e.Q6J("ngIf",null==t.workflowForm.controls.process.errors?null:t.workflowForm.controls.process.errors.required),e.xp6(6),e.Oqu(e.lcZ(24,52,"FORM.Advanced Workflow")),e.xp6(4),e.hij(" ",e.lcZ(28,54,"FORM.Advanced Workflow1"),""),e.xp6(3),e.Oqu(e.lcZ(31,56,"FORM.Advanced Workflow2")),e.xp6(3),e.Oqu(e.lcZ(34,58,"FORM.Advanced Workflow3")),e.xp6(6),e.Q6J("disabled",!t.workflowForm.value.frequencyForm.isFrequencyEnabled),e.xp6(2),e.Oqu(e.lcZ(42,60,"FORM.Frequency")),e.xp6(5),e.Oqu(e.lcZ(47,62,"FORM.Amount")),e.xp6(2),e.Q6J("required",t.workflowForm.value.frequencyForm.isFrequencyEnabled&&!t.workflowForm.value.frequencyForm.frequencyAmount),e.xp6(3),e.Oqu(e.lcZ(52,64,"FORM.Period")),e.xp6(4),e.Oqu(e.lcZ(56,66,"FORM.Per Day")),e.xp6(3),e.Oqu(e.lcZ(59,68,"FORM.Per Month")),e.xp6(3),e.Oqu(e.lcZ(62,70,"FORM.Per Year")),e.xp6(4),e.Oqu(e.lcZ(66,72,"FORM.Person to notify")),e.xp6(2),e.Q6J("required",t.workflowForm.value.frequencyForm.isFrequencyEnabled&&!t.workflowForm.value.frequencyForm.frequencyNotify)("items",t.workflowForm.value.assignableUsers)("placeholder",(null==(n=e.xi3(68,74,t.workflowForm.value.frequencyForm.frequencyNotify,t.workflowForm.value.assignableUsers))?null:n.fullName)||"Choose one")("searchPlaceholder","user"),e.xp6(4),e.hij(" ",e.lcZ(72,77,"FORM.Frequency Exp"),"."),e.xp6(7),e.Oqu(e.l
1cZ(79,79,"FORM.Notification")),e.xp6(3),e.Oqu(e.lcZ(82,81,"FORM.Person to notify")),e.xp6(2),e.Q6J("disabled",!t.workflowForm.value.isNotificationEnabled),e.xp6(1),e.Q6J("required",t.workflowForm.value.isNotificationEnabled&&!t.workflowForm.value.notificateUser)("items",t.workflowForm.value.assignableUsers)("searchPlaceholder","user")("placeholder",(null==(l=e.xi3(85,83,t.workflowForm.value.notificateUser,t.workflowForm.value.assignableUsers))?null:l.fullName)||"Choose one"),e.xp6(4),e.hij(" ",e.lcZ(89,86,"FORM.Notify Exp"),""),e.xp6(7),e.Oqu(e.lcZ(96,88,"FORM.Privacy")),e.xp6(2),e.Q6J("disabled",!t.workflowForm.value.isPrivacyEnabled),e.xp6(1),e.Q6J("required",t.workflowForm.value.isPrivacyEnabled&&!t.workflowForm.value.privacyUsers)("items",t.workflowForm.value.assignableUsers)("selectedFilterItems",t.selectedPrivateUsers),e.xp6(5),e.hij(" ",e.lcZ(104,90,"FORM.Private Exp"),"")}}function vt(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"ul",22,23),e.NdJ("navChange",function(l){e.CHM(t);const a=e.oxw();return e.KtG(a.onNavChange(l))}),e.TgZ(2,"li",24)(3,"button",25),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.YNc(6,ft,105,92,"ng-template",26),e.qZA(),e.TgZ(7,"li",24)(8,"button",27),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.openAiModal())})("mouseenter",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.aiHovered=!0)})("mouseleave",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.aiHovered=!1)}),e.TgZ(9,"span",28),e._uU(10),e.ALo(11,"translate"),e.qZA()()()(),e._UZ(12,"div",29)}if(2&i){const t=e.MAs(1);e.xp6(2),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(5,5,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(3),e.Oqu(e.lcZ(11,7,"FORM.Ai-Assistant")),e.xp6(2),e.Q6J("ngbNavOutlet",t)}}let qe=(()=>{class i{constructor(t){this.modalService=t,this.aiHovered=!1,this.activePanelId=[],this.UserRoles=B.vX}ngOnInit(){this.activePanelId=[]}onNavChange(t){2===t.nextId&&t.preventDefault()}openAiModal(){this.modalService.open(q.W9,{size:"lg",centered:!0}).componentInstance.triggerLocation="builder"}scrollToError(){const t=document.querySelector(".error-process "),n=document.querySelector(".error-span-workflow-name");t&&t.scrollIntoView({behavior:"smooth",block:"center"}),n&&n.scrollIntoView({behavior:"smooth",block:"center"})}static#e=this.\u0275fac=function(n){return new(n||i)(e.Y36(p.FF))};static#t=this.\u0275cmp=e.Xpm({type:i,selectors:[["ff-form-settings"]],inputs:{workflowForm:"workflowForm",workflow:"workflow",classifications:"classifications",selectedOwners:"selectedOwners",selectedPrivateUsers:"selectedPrivateUsers",isOwner:"isOwner",user$:"user$"},decls:8,vars:5,consts:[[1,"settings","pb-4",3,"formGroup"],[1,"text-uppercase","fw-semibold","title"],[3,"activeIds"],["id","ngb-panel-0"],["ngbPanelHeader",""],["ngbPanelContent",""],[1,"d-flex","py-1","px-2","justify-content-between","align-items-center"],["ngbTooltip","Choose an icon that best describes this Workflow",1,"fa","fa-question-circle","text-info","ps-1"],[3,"workflowForm"],[1,"flex-grow-1","p-0"],["type","text","placeholder","Enter Workflow name","data-cy","formName","id","formName","formControlName","formName",1,"element","lh-1","form-control","w-100",3,"ngClass"],["class","bg-danger error-span-workflow-name m-0","data-cy","nameRequiredWarning",4,"ngIf"],["class","bg-danger error-span-workflow-name m-0","data-cy","nameExistWarning",4,"ngIf"],["type","button","class","action btn btn-outline-secondary btn-sm lh-1 py-2",3,"click",4,"ngIf"],["type","button","data-cy","formSettingsToggle","ngbPanelToggle","","class","action btn btn-outline-secondary btn-sm lh-1 py-2",4,"ngIf"],["data-cy","nameRequiredWarning",1,"bg-danger","error-span-workflow-name","m-0"],[1,"fa","fa-exclamation-triangle","text-light","pe-1"],[1,"text-light"],["data-cy","nameExistWarning",1,"bg-danger","error-span-workflow-name","m-0"],["type","button",1,"action","btn","btn-outline-secondary","btn-sm","lh-1","py-2",3,"click"],[1,"fa","fa-lg"],["type","button","data-cy","formSettingsToggle","ngbPanelToggle","",1,"action","btn","btn-outline-secondary","btn-sm","lh-1","py-2"],["ngbNav","","data-cy","formSettings",1,"nav","nav-tabs",3,"navChange"],["nav","ngbNav"],[3,"ngbNavItem"],["type","button","ngbNavLink","",1,"nav-link","active"],["ngbNavContent",""],["ngbNavLink","",1,"nav-link",3,"click","mouseenter","mouseleave"],[1,"text-dark"],[1,"mt-2",3,"ngbNavOutlet"],["for","description",1,"fw-semibold","text-uppercase","title"],["formControlName","description","id","description","placeholder","Enter workflow description",1,"form-control"],["for","description",1,"fw-semibold","text-uppercase","title","pt-4"],[3,"disabled"],["formControlName","owner","searchTitle","name","searchName","fullName","selectedItemIcon","fa fa-user text-info",3,"items","selectedFilterItems"],["element",""],[1,"fw-semibold","text-uppercase","title","mt-5"],["data-cy","functionSelect","formControlName","process","
1searchName","value",1,"w-100",3,"items","placeholder","searchPlaceholder"],["class","text-danger error-process fs-14 lh-base","data-cy","functionRequiredWarning",4,"ngIf"],[1,"d-flex","mt-3"],[1,"form-switch"],["data-cy","advancedWorkflowToggle","formControlName","isWorkflow","type","checkbox","id","isWorkflow",1,"form-check-input"],[1,"d-flex","flex-column"],[1,"fw-semibold","text-uppercase","title"],[1,"fa","fa-question-circle","text-info"],["formGroupName","frequencyForm",1,"d-flex","mt-3"],["formControlName","isFrequencyEnabled","type","checkbox","id","frequency",1,"form-check-input"],[1,"clearfix",3,"disabled"],["for","frequency",1,"fw-semibold","text-uppercase","title"],[1,"row"],[1,"col"],["for","amount"],["type","number","min","0","formControlName","frequencyAmount","placeholder","Value","id","amount",1,"form-control",3,"required"],["for","period"],["formControlName","frequencyPeriod","id","period",1,"form-select"],["value","day"],["value","month"],["value","year"],["formControlName","frequencyNotify","searchName","fullName",3,"required","items","placeholder","searchPlaceholder"],[1,"pt-2"],["formControlName","isNotificationEnabled","type","checkbox","id","isNotificationEnabled",1,"form-check-input"],["for","isNotificationEnabled",1,"fw-semibold","text-uppercase","title"],["formControlName","notificateUser","searchName","fullName",3,"required","items","searchPlaceholder","placeholder"],["formControlName","isPrivacyEnabled","type","checkbox","id","isPrivacyEnabled",1,"form-check-input"],["for","isPrivacyEnabled",1,"fw-semibold","text-uppercase","title"],["formControlName","privacyUsers","searchTitle","name","searchName","fullName",3,"required","items","selectedFilterItems"],[1,"fa","fa-lg","fa-user"],[1,"d-block"],["data-cy","functionRequiredWarning",1,"text-danger","error-process","fs-14","lh-base"],["errorSpan",""],[1,"fa","fa-exclamation-triangle"]],template:function(n,l){1&n&&(e.TgZ(0,"form",0)(1,"label",1),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"ngb-accordion",2)(5,"ngb-panel",3),e.YNc(6,pt,9,8,"ng-template",4),e.YNc(7,vt,13,9,"ng-template",5),e.qZA()()()),2&n&&(e.Q6J("formGroup",l.workflowForm),e.xp6(2),e.Oqu(e.lcZ(3,3,"FORM.Workflow Name & Description")),e.xp6(2),e.Q6J("activeIds",l.activePanelId))},dependencies:[g.mk,g.O5,p.gY,p.Gk,p.gW,p.k9,p.I_,m._Y,m.YN,m.Kr,m.Fj,m.wV,m.Wl,m.EJ,m.JJ,m.JL,m.Q7,m.qQ,m.sg,m.u,m.x0,p.uN,p.Pz,p.nv,p.Is,p.Fh,p.tO,p.Dy,p._L,ke.P,Se.L,lt,R.k,at.d,Z.X$],encapsulation:2})}return i})();var H=d(1463),G=d(5619);let $=(()=>{class i{constructor(){this.isDragging=new G.X(!1)}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac})}return i})();var ht=d(3724),le=d(3476),Oe=d(5628),Ue=d(5186),Ie=d(3028);function xt(i,o){if(1&i&&(e.TgZ(0,"li",9),e._UZ(1,"i",10),e.TgZ(2,"label",11),e._uU(3,"Wait "),e.TgZ(4,"span",12),e._uU(5," for Completion"),e.qZA()(),e.TgZ(6,"div",13),e._UZ(7,"input",14),e.qZA()()),2&i){const t=e.oxw();e.xp6(6),e.Q6J("formGroup",t.sectionForm)}}function Tt(i,o){1&i&&(e.ynx(0),e.TgZ(1,"label"),e._uU(2,"Assignable"),e.qZA(),e.BQk())}function bt(i,o){if(1&i&&e._UZ(0,"ff-handle-assignees",15),2&i){const t=e.oxw();e.Q6J("fromPage",t.AssigneesPages.FormBuilder)("users",t.users)("teams",t.teams)("assigneesForm",t.sectionForm)}}let wt=(()=>{class i{constructor(){this.SectionType=s.bA,this.AssigneesPages=Ue.R}ngOnInit(){this.headerForm=this.workflowForm.get("sections").at(this.sectionIndex).get("parsedTypeLogic"),this.sectionForm=this.workflowForm.get("sections").at(this.sectionIndex)}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275cmp=e.Xpm({type:i,selectors:[["ff-section-header"]],inputs:{section:"section",workflowForm:"workflowForm",sectionIndex:"sectionIndex",users:"users",teams:"teams",opened:"opened",currentAssigneesDropdownId:"currentAssigneesDropdownId"},decls:9,vars:6,consts:[[1,"advanced","bg-white"],[1,"d-flex","flex-row","align-items-center","py-1","px-1"],["class","d-flex align-items-center border-end pe-2",4,"ngIf"],[1,"d-flex","align-items-center","mx-2"],["ngbTooltip","Select users and/or teams that are responsible\n for completing this section. Tasks will be automatically created\n for each user/team as the section is enabled based on prior completed\n sections, workflow logic and 'Wait for Completion' settings.",1,"fa","fa-question-circle","text-info","mx-1","fs-13","lh-1"],[4,"ngIf"],["clearAssigneesControl","assignable",3,"fromPage","users","teams","assigneesForm",4,"ngIf"],[1,"form-check","form-switch","ms-2","me-0","my-0","p-0","fs-12",3,"formGroup"],["type","checkbox","formControlName","assignable",1,"form-check-input","m-0"],[1,"d-flex","align-items-center","border-end","pe-2"],["ngbTooltip","Enabling 'Wait for Completion' forces\n this section and sections before it\n to be completed by a user before the\n sections below this one can be started or enabled.",1,"fa","fa-question-circle","text-info","mx-1","fs-13","lh-1"],[1,"mx-1","text-nowrap","fs-13","lh-1"],[1,"d-lg-inline-block","d-sm-none","d-md-none"],[1,"form-check","form-switch","m-0","p-0","fs-12",3,"formGroup"],["type","checkbox","formControlName","isPau
1sed",1,"form-check-input","m-0"],["clearAssigneesControl","assignable",3,"fromPage","users","teams","assigneesForm"]],template:function(n,l){1&n&&(e.TgZ(0,"div",0)(1,"ul",1),e.YNc(2,xt,8,1,"li",2),e.TgZ(3,"li",3),e._UZ(4,"i",4),e.YNc(5,Tt,3,0,"ng-container",5),e.YNc(6,bt,1,4,"ff-handle-assignees",6),e.TgZ(7,"div",7),e._UZ(8,"input",8),e.qZA()()()()),2&n&&(e.ekj("rounded-bottom",!l.opened),e.xp6(2),e.Q6J("ngIf",l.section.value.fieldType!==l.SectionType.Approval),e.xp6(3),e.Q6J("ngIf",!l.headerForm.value.assignable),e.xp6(1),e.Q6J("ngIf",l.headerForm.value.assignable),e.xp6(1),e.Q6J("formGroup",l.headerForm))},dependencies:[g.O5,m.Wl,m.JJ,m.JL,m.sg,m.u,p._L,Ie.k],encapsulation:2})}return i})();var k=d(491),yt=d(6253);let ae=(()=>{class i{constructor(){this.loadWorkflows=new G.X(!1),this.workflows=new G.X([])}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac})}return i})();var Ft=d(9516);let Zt=(()=>{class i{onClick(t){this.elementRef.nativeElement.contains(t.target)||this.outsideClick.emit(t)}constructor(t){this.elementRef=t,this.outsideClick=new e.vpe}static#e=this.\u0275fac=function(n){return new(n||i)(e.Y36(e.SBq))};static#t=this.\u0275dir=e.lG2({type:i,selectors:[["","ffOutsideClick",""]],hostBindings:function(n,l){1&n&&e.NdJ("mousedown",function(r){return l.onClick(r)},!1,e.evT)},outputs:{outsideClick:"outsideClick"}})}return i})();var Pe=d(5513),At=d(847),M=d(4288),Le=function(i){return i.CustomScript="fa-code",i.Signature="fa-pencil-alt",i.Barcode="fa-barcode",i.Label="fa-quote-right",i.SingleLineText="fa-font",i.MultiLineText="fa-align-left",i.Trilean="fa-traffic-light",i.Boolean="fa-toggle-on",i.Numeric="fa-hashtag",i.Asset="fa-cube",i.Hierarchy="fa-sitemap",i.SingleSelect="fa-dot-circle",i.MultiSelect="fa-check-square",i.DateTime="far fa-calendar-alt",i.Task="fa-briefcase",i.ImageViewer="fa-image",i.WebViewer="fa-link",i.Location="fa-map-marker-alt",i.Photo="fa-camera",i.InsertFile="fa-paperclip",i.IotDeviceDataPoint="fa-podcast",i.IotDeviceChart="fa-chart-line",i.IotDeviceCmd="fa-bolt",i.Section="fa-list",i.Table="fa-table",i.ApprovalSection="fa-thumbs-up",i.TriggerSection="fa-asterisk",i.AddChild="fa-folder-tree",i}(Le||{}),Me=function(i){return i.MultiSelect="MultiSelect",i.IotDeviceCmd="IotDeviceCmd",i.IotDeviceChart="IotDeviceChart",i.IotDeviceDataPoint="IotDeviceDataPoint",i.CustomScript="CustomScript",i.InsertFile="InsertFile",i.ImageViewer="ImageViewer",i.WebViewer="WebViewer",i.Task="Task",i.Location="Location",i.Label="Label",i.Signature="Signature",i.Photo="Photo",i.Asset="Asset",i.AddChild="AddChild",i}(Me||{});let re=(()=>{class i{transform(t){return Le[t]||""}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275pipe=e.Yjl({name:"fieldTypeIconClass",type:i,pure:!0})}return i})(),Ct=(()=>{class i{transform(t){return t===s.ii.SingleLineText||t===s.ii.MultiLineText||t===s.ii.SingleSelect||t===s.ii.MultiSelect||t===s.ii.IotDeviceDataPoint||t===s.ii.Numeric}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275pipe=e.Yjl({name:"basicValidationEmailOption",type:i,pure:!0})}return i})(),kt=(()=>{class i{transform(t,n,l){return!!t.find((r,c)=>!r.isDeleted&&"default"===r.triggerType&&r.trigger===n&&l!==c)}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275pipe=e.Yjl({name:"defaultSmartResponseInUse",type:i,pure:!0})}return i})(),St=(()=>{class i{transform(t,n){return t.includes(n)}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275pipe=e.Yjl({name:"validateChoice",type:i,pure:!0})}return i})(),Nt=(()=>{class i{transform(t){return t.filter(n=>n.isPublished&&!n.isDeleted)}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275pipe=e.Yjl({name:"getFilteredWorkflows",type:i,pure:!0})}return i})();const qt=["sectionFieldPanel"],Ot=["fileInput"],Ut=["autoComplete"],It=["choice"];function Pt(i,o){if(1&i&&(e.TgZ(0,"p",41),e._UZ(1,"i",42),e.TgZ(2,"span",43),e._uU(3),e.qZA()()),2&i){const t=e.oxw(4);e.xp6(3),e.Oqu(t.requiredFieldMessage)}}function Lt(i,o){1&i&&(e.TgZ(0,"p",41),e._UZ(1,"i",42),e.TgZ(2,"span",43),e._uU(3),e.ALo(4,"translate"),e.qZA()()),2&i&&(e.xp6(3),e.Oqu(e.l
1cZ(4,1,"FORM.Labels on Hierarchy elements should be unique")))}function Mt(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",44),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(4);return e.KtG(l.onPanelToggle())}),e._UZ(1,"i",45),e.qZA()}if(2&i){const t=e.oxw().opened;e.xp6(1),e.ekj("fa-angle-down",!t)("fa-angle-up",t)}}function Jt(i,o){if(1&i&&(e.TgZ(0,"button",46),e._UZ(1,"i",45),e.qZA()),2&i){const t=e.oxw().opened;e.xp6(1),e.ekj("fa-angle-down",!t)("fa-angle-up",t)}}function Dt(i,o){1&i&&(e.TgZ(0,"button",48),e._UZ(1,"i",49),e.qZA())}function Et(i,o){if(1&i&&e.YNc(0,Dt,2,0,"button",47),2&i){const t=e.oxw(4);e.Q6J("ngIf",t.fieldForm.value.fieldType===t.SectionFieldType.Photo)}}const Qt=function(i,o){return{control:i,value:o}};function Bt(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",24),e.NdJ("cdkDragStarted",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.onDragHandlingChange(!0))})("cdkDragDropped",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.onDragHandlingChange(!1))}),e.TgZ(1,"div",25)(2,"div",26)(3,"div",27),e._UZ(4,"i",28)(5,"i",28)(6,"i",28),e.qZA()(),e.TgZ(7,"div",29)(8,"div",30)(9,"i",31),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.copyToClipboard(l.field.value.fieldName))}),e.ALo(10,"fieldTypeIconClass"),e.qZA(),e.TgZ(11,"fieldset",32)(12,"input",33),e.NdJ("input",function(l){e.CHM(t);const a=e.oxw(3);return e.KtG(a.onLabelChange(l))}),e.qZA(),e.YNc(13,Pt,4,1,"p",34),e.YNc(14,Lt,5,3,"p",34),e.qZA()()()(),e.TgZ(15,"div")(16,"ul",35)(17,"li")(18,"button",36),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.onDeleteField())}),e._UZ(19,"i",37),e.qZA()(),e.TgZ(20,"li"),e.YNc(21,Mt,2,4,"button",38),e.YNc(22,Jt,2,4,"button",39),e.YNc(23,Et,1,1,"ng-template",null,40,e.W1O),e.qZA()()()()}if(2&i){const t=e.MAs(24),n=e.oxw(3);let l,a,r;e.ekj("rounded-0",!n.lastField)("rounded-bottom",n.lastField),e.Q6J("cdkDragData",e.WLB(18,Qt,n.field,n.field.value)),e.xp6(9),e.Q6J("closeDelay",500)("ngClass",e.lcZ(10,16,n.field.value.fieldType)),e.xp6(2),e.Q6J("disabled",n.field.value.disableEdit||n.field.value.fieldType===n.SectionFieldType.Label),e.xp6(1),e.ekj("invalid-input",(null==(l=n.field.get("label"))||null==l.errors?null:l.errors.required)||(null==(l=n.field.get("label"))||null==l.errors?null:l.errors.labelDuplicated)),e.Q6J("required",!n.field.value.isDisabled&&n.field.value.fieldType!==n.SectionFieldType.Label),e.xp6(1),e.Q6J("ngIf",null==(a=n.field.get("label"))||null==a.errors?null:a.errors.required),e.xp6(1),e.Q6J("ngIf",null==(r=n.field.get("label"))||null==r.errors?null:r.errors.labelDuplicated),e.xp6(7),e.Q6J("ngIf",!(null!=n.fieldForm.controls.variableName&&null!=n.fieldForm.controls.variableName.errors&&n.fieldForm.controls.variableName.errors.variableNameInUse||null!=n.fieldForm.controls.typeLogic&&null!=n.fieldForm.controls.typeLogic.errors&&n.fieldForm.controls.typeLogic.errors.textAreaError||n.fieldForm.value.fieldType===n.SectionFieldType.Photo))("ngIfElse",t),e.xp6(1),e.Q6J("ngIf",(null==n.fieldForm.controls.variableName||null==n.fieldForm.controls.variableName.errors?null:n.fieldForm.controls.variableName.errors.variableNameInUse)||(null==n.fieldForm.controls.typeLogic||null==n.fieldForm.controls.typeLogic.errors?null:n.fieldForm.controls.typeLogic.errors.textAreaError))}}function Yt(i,o){1&i&&e.YNc(0,Bt,25,21,"ng-template",23)}function Vt(i,o){if(1&i&&(e.TgZ(0,"p",61),e._UZ(1,"i",62),e.TgZ(2,"span",43),e._uU(3),e.qZA()()),2&i){const t=e.oxw(4);e.xp6(3),e.Oqu(t.requiredFieldMessage)}}function Rt(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",63),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(4);return e.KtG(l.onDeleteField())}),e._UZ(1,"i",37),e.qZA()}if(2&i){const t=e.oxw(4);e.Q6J("hidden",t.field.value.parsedTypeLogic.isHidden)}}function Ht(i,o){1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"FORM.HIDE")))}function Gt(i,o){1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"FORM.SHOW")))}function $t(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",64),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(4);return e.KtG(l.toggleSectionFieldVisibility())}),e.YNc(1,Ht,3,3,"span",21),e.YNc(2,Gt,3,3,"span",21),e.qZA()}if(2&i){const t=e.oxw(4);e.ekj("hidenField",t.field.value.parsedTypeLogic.isHidden),e.xp6(1),e.Q6J("ngIf",t.sectionFieldVisible),e.xp6(1),e.Q6J("ngIf",!t.sectionFieldVisible)}}function jt(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",50)(1,"div",25)(2,"div",51),e._UZ(3,"i",52),e.qZA(),e.TgZ(4,"div",53)(5,"i",31),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.copyToClipboard(l.field.value.fieldName))}),e.ALo(6,"fieldTypeIconClass"),e.qZA(),e.TgZ(7,"div",54)(8,"fieldset",32),e._UZ(9,"
1input",55),e.YNc(10,Vt,4,1,"p",56),e.qZA()()()(),e.TgZ(11,"div")(12,"ul",57)(13,"li"),e.YNc(14,Rt,2,1,"button",58),e.YNc(15,$t,3,4,"button",59),e.qZA(),e.TgZ(16,"li")(17,"button",60),e._UZ(18,"i",45),e.qZA()()()()()}if(2&i){const t=o.opened,n=e.oxw(3);let l,a;e.xp6(1),e.ekj("opacity-25",!n.sectionFieldVisible)("text-muted",n.sectionFieldVisible),e.xp6(2),e.Q6J("disableTooltip",!n.sectionFieldVisible),e.xp6(2),e.Q6J("closeDelay",500)("ngClass",e.lcZ(6,18,n.field.value.fieldType)),e.xp6(3),e.Q6J("disabled",n.field.value.disableEdit||!n.sectionFieldVisible),e.xp6(1),e.ekj("invalid-input",null==(l=n.field.get("label"))||null==l.errors?null:l.errors.required),e.Q6J("required",!n.field.value.isDisabled&&n.field.value.fieldType!==n.SectionFieldType.Label),e.xp6(1),e.Q6J("ngIf",null==(a=n.field.get("label"))||null==a.errors?null:a.errors.required),e.xp6(4),e.Q6J("ngIf",n.field.value.order>3),e.xp6(1),e.Q6J("ngIf",n.field.value.order<=3),e.xp6(3),e.ekj("fa-angle-down",!t)("fa-angle-up",t)}}function Kt(i,o){1&i&&e.YNc(0,jt,19,20,"ng-template",23)}function zt(i,o){1&i&&e.GkF(0)}function Wt(i,o){1&i&&e.GkF(0)}function Xt(i,o){if(1&i&&(e.TgZ(0,"div",74)(1,"div",75)(2,"div",76),e.YNc(3,zt,1,0,"ng-container",77),e.qZA(),e.TgZ(4,"div",76),e.YNc(5,Wt,1,0,"ng-container",77),e.qZA()()()),2&i){e.oxw(3);const t=e.MAs(18),n=e.MAs(20);e.xp6(3),e.Q6J("ngTemplateOutlet",t),e.xp6(2),e.Q6J("ngTemplateOutlet",n)}}function ei(i,o){1&i&&e.GkF(0)}function ti(i,o){1&i&&e.GkF(0)}function ii(i,o){if(1&i&&(e.TgZ(0,"div",92),e.YNc(1,ti,1,0,"ng-container",77),e.qZA()),2&i){e.oxw(5);const t=e.MAs(20);e.xp6(1),e.Q6J("ngTemplateOutlet",t)}}function ni(i,o){if(1&i&&(e.TgZ(0,"div",92)(1,"label",87),e._uU(2),e.ALo(3,"translate"),e.qZA(),e._UZ(4,"ff-location-picker",93),e.qZA()),2&i){const t=e.oxw(5);e.xp6(2),e.Oqu(e.lcZ(3,2,"FORM.Choose custom location")),e.xp6(2),e.Q6J("fieldForm",t.fieldForm)}}function oi(i,o){if(1&i&&(e.TgZ(0,"div",75)(1,"div"),e.YNc(2,ei,1,0,"ng-container",77),e.qZA(),e.YNc(3,ii,2,1,"div",86),e.qZA(),e.TgZ(4,"div",75)(5,"div")(6,"label",87),e._uU(7),e.ALo(8,"translate"),e.qZA(),e.TgZ(9,"select",88)(10,"option",89),e._uU(11),e.ALo(12,"translate"),e.qZA(),e.TgZ(13,"option",90),e._uU(14),e.ALo(15,"translate"),e.qZA(),e.TgZ(16,"option",91),e._uU(17),e.ALo(18,"translate"),e.qZA()()(),e.YNc(19,ni,5,4,"div",86),e.qZA()),2&i){const t=e.oxw(4),n=e.MAs(18);e.xp6(1),e.ekj("col-md-12",t.fieldForm.value.validationType===t.ValidationType.Optional)("col-md-4",t.fieldForm.value.validationType!==t.ValidationType.Optional),e.xp6(1),e.Q6J("ngTemplateOutlet",n),e.xp6(1),e.Q6J("ngIf",t.fieldForm.value.validationType!==t.ValidationType.Optional),e.xp6(2),e.ekj("col-md-12",t.fieldForm.value.defaultValue===t.FieldLogic.LocationCurrent||null===t.fieldForm.value.defaultValue)("col-md-4",t.fieldForm.value.defaultValue!==t.FieldLogic.LocationCurrent&&null!==t.fieldForm.value.defaultValue),e.xp6(2),e.Oqu(e.lcZ(8,19,"FORM.Default location")),e.xp6(3),e.Q6J("ngValue",null),e.xp6(1),e.Oqu(e.lcZ(12,21,"FORM.None")),e.xp6(2),e.Q6J("selected",t.fieldForm.value.defaultValue!==t.FieldLogic.LocationCurrent&&null!==t.fieldForm.value.defaultValue),e.xp6(1),e.hij(" ",e.lcZ(15,23,"FORM.Custom")," "),e.xp6(2),e.Q6J("value",t.FieldLogic.LocationCurrent)("selected",t.fieldForm.value.defaultValue===t.FieldLogic.LocationCurrent),e.xp6(1),e.Oqu(e.lcZ(18,25,"FORM.Current")),e.xp6(2),e.Q6J("ngIf",t.fieldForm.value.defaultValue!==t.FieldLogic.LocationCurrent&&null!==t.fieldForm.value.defaultValue)}}function li(i,o){1&i&&e.GkF(0)}function ai(i,o){if(1&i&&e.YNc(0,li,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(22);e.Q6J("ngTemplateOutlet",t)}}function ri(i,o){if(1&i&&(e.TgZ(0,"div",78)(1,"ul",79,80)(3,"li",81)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,oi,20,27,"ng-template",83),e.qZA(),e.TgZ(8,"li",81)(9,"a",82),e._uU(10),e.ALo(11,"translate"),e.TgZ(12,"span",84),e._uU(13,"BETA"),e.qZA()(),e.YNc(14,ai,1,1,"ng-template",83),e.qZA()(),e._UZ(15,"div",85),e.qZA()),2&i){const t=e.MAs(2);e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,5,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(2),e.hij(" ",e.lcZ(11,7,"FORM.Security")," "),e.xp6(5),e.Q6J("ngbNavOutlet",t)}}function si(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",94)(1,"ngx-summernote",95),e.NdJ("summernoteModelChange",function(l){e.CHM(t);const a=e.oxw(3);return e.KtG(a.handleSummernoteContentChange(l))}),e.qZA()()}if(2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngxSummernoteView",t.fieldForm.value.htmlLabel)("ngxSummernote",t.summernoteConfig)}}function ci(i,o){1&i&&e.GkF(0)}function _i(i,o){1&i&&e.GkF(0)}function di(i,o){1&i&&e.GkF(0)}function pi(i,o){if(1&i&&(e.TgZ(0,"div",75)(1,"div",98),e.YNc(2,_i,1,0,"ng-container",77),e.qZA(),e.TgZ(3,"div",98),e.YNc(4,di,1,0,"ng-container",77),e.qZA()()),2&i){e.oxw(5);const t=e.MAs(26),n=e.MAs(18);e.xp6(2),e.Q6J("ngTemplateOutlet",t),e.xp6(2),e.Q6J("ngTemplateOutlet",n)}}function mi(i,o){1&i&&e.GkF(0)}function gi(i,o){if(1&i&&(e.TgZ(0,"div",75)(1,"div",99),e.YNc(2,mi,1,0,"ng-container",77),e.qZA()()),2&i){e.oxw(5);const t=e.MAs(20);e.xp6(2),e.Q6J("ngTemplateOutlet",t)}}function ui(i,o){if(1&i&&(e.YNc(0,ci,1,0,"ng-container",77),e.YNc(1,pi,5,2,"div",97),e.YNc(2,gi,3,1,"div",97)),2&i){const t=e.oxw(4),n=e.MAs(6);e.Q6J("ngTemplateOutlet",n),e.xp6(1),e.Q6J("ngIf",!t.fieldForm.value.isNextNumberActive),e.xp6(1),e.Q6J("ngIf",!t.fieldForm.value.isNextNumberActive)}}function fi(i,o){1&i&&e.GkF(0)}function vi(i,o){if(1&i&&e.YNc(0,fi,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(22);e.Q6J("ngTemplateOutlet",t)}}function hi(i,o){if(1&i&&(e.TgZ(0,"div",78)(1,"ul",79,96)(3,"li",8
11)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,ui,3,3,"ng-template",83),e.qZA(),e.TgZ(8,"li",81)(9,"a",82),e._uU(10),e.ALo(11,"translate"),e.TgZ(12,"span",84),e._uU(13,"BETA"),e.qZA()(),e.YNc(14,vi,1,1,"ng-template",83),e.qZA()(),e._UZ(15,"div",85),e.qZA()),2&i){const t=e.MAs(2);e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,5,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(2),e.hij(" ",e.lcZ(11,7,"FORM.Security")," "),e.xp6(5),e.Q6J("ngbNavOutlet",t)}}function xi(i,o){1&i&&e.GkF(0)}function Ti(i,o){1&i&&e.GkF(0)}function bi(i,o){1&i&&e.GkF(0)}function wi(i,o){if(1&i&&(e.TgZ(0,"div",75)(1,"div",98),e.YNc(2,xi,1,0,"ng-container",77),e.qZA(),e.TgZ(3,"div",98),e.YNc(4,Ti,1,0,"ng-container",77),e.qZA()(),e.TgZ(5,"div",75)(6,"div",99),e.YNc(7,bi,1,0,"ng-container",77),e.qZA()()),2&i){e.oxw(4);const t=e.MAs(26),n=e.MAs(18),l=e.MAs(20);e.xp6(2),e.Q6J("ngTemplateOutlet",t),e.xp6(2),e.Q6J("ngTemplateOutlet",n),e.xp6(3),e.Q6J("ngTemplateOutlet",l)}}function yi(i,o){1&i&&e.GkF(0)}function Fi(i,o){if(1&i&&e.YNc(0,yi,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(22);e.Q6J("ngTemplateOutlet",t)}}function Zi(i,o){if(1&i&&(e.TgZ(0,"div",78)(1,"ul",79,100)(3,"li",81)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,wi,8,3,"ng-template",83),e.qZA(),e.TgZ(8,"li",81)(9,"a",82),e._uU(10),e.ALo(11,"translate"),e.TgZ(12,"span",84),e._uU(13,"BETA"),e.qZA()(),e.YNc(14,Fi,1,1,"ng-template",83),e.qZA()(),e._UZ(15,"div",85),e.qZA()),2&i){const t=e.MAs(2);e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,5,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(2),e.hij(" ",e.lcZ(11,7,"FORM.Security")," "),e.xp6(5),e.Q6J("ngbNavOutlet",t)}}function Ai(i,o){1&i&&e.GkF(0)}function Ci(i,o){1&i&&e.GkF(0)}function ki(i,o){1&i&&e.GkF(0)}function Si(i,o){1&i&&e.GkF(0)}function Ni(i,o){1&i&&e.GkF(0)}function qi(i,o){if(1&i&&(e.TgZ(0,"div",75)(1,"div",98),e.YNc(2,Ai,1,0,"ng-container",77),e.qZA(),e.TgZ(3,"div",98),e.YNc(4,Ci,1,0,"ng-container",77),e.qZA()(),e.TgZ(5,"div",75)(6,"div",98),e.YNc(7,ki,1,0,"ng-container",77),e.qZA(),e.TgZ(8,"div",98),e.YNc(9,Si,1,0,"ng-container",77),e.qZA()(),e.TgZ(10,"div",75)(11,"div",99),e.YNc(12,Ni,1,0,"ng-container",77),e.qZA()()),2&i){e.oxw(4);const t=e.MAs(10),n=e.MAs(12),l=e.MAs(8),a=e.MAs(18),r=e.MAs(20);e.xp6(2),e.Q6J("ngTemplateOutlet",t),e.xp6(2),e.Q6J("ngTemplateOutlet",n),e.xp6(3),e.Q6J("ngTemplateOutlet",l),e.xp6(2),e.Q6J("ngTemplateOutlet",a),e.xp6(3),e.Q6J("ngTemplateOutlet",r)}}function Oi(i,o){1&i&&e.GkF(0)}function Ui(i,o){if(1&i&&e.YNc(0,Oi,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(22);e.Q6J("ngTemplateOutlet",t)}}function Ii(i,o){1&i&&e.GkF(0)}function Pi(i,o){if(1&i&&e.YNc(0,Ii,1,0,"ng-container",77),2&i){e.oxw(5);const t=e.MAs(32);e.Q6J("ngTemplateOutlet",t)}}function Li(i,o){1&i&&(e.TgZ(0,"li",81)(1,"a",82),e._uU(2,"Advanced"),e.qZA(),e.YNc(3,Pi,1,1,"ng-template",83),e.qZA()),2&i&&e.Q6J("ngbNavItem",3)}function Mi(i,o){if(1&i&&(e.TgZ(0,"div",78)(1,"ul",79,101)(3,"li",81)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,qi,13,5,"ng-template",83),e.qZA(),e.TgZ(8,"li",81)(9,"a",82),e._uU(10),e.ALo(11,"translate"),e.TgZ(12,"span",84),e._uU(13,"BETA"),e.qZA()(),e.YNc(14,Ui,1,1,"ng-template",83),e.qZA(),e.YNc(15,Li,4,1,"li",102),e.qZA(),e._UZ(16,"div",85),e.qZA()),2&i){const t=e.MAs(2),n=e.oxw(3);e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,6,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(2),e.hij(" ",e.lcZ(11,8,"FORM.Security")," "),e.xp6(5),e.Q6J("ngIf",n.sectionForm.value.fieldType===n.SectionType.Section||n.sectionForm.value.fieldType===n.SectionType.Trigger),e.xp6(1),e.Q6J("ngbNavOutlet",t)}}function Ji(i,o){1&i&&e.GkF(0)}function Di(i,o){1&i&&e.GkF(0)}function Ei(i,o){1&i&&e.GkF(0)}function Qi(i,o){1&i&&e.GkF(0)}function Bi(i,o){1&i&&e.GkF(0)}function Yi(i,o){1&i&&e.GkF(0)}function Vi(i,o){if(1&i&&(e.TgZ(0,"div",75)(1,"div",104),e.YNc(2,Ji,1,0,"ng-container",77),e.qZA(),e.TgZ(3,"div",104),e.YNc(4,Di,1,0,"ng-container",77),e.qZA(),e.TgZ(5,"div",104),e.YNc(6,Ei,1,0,"ng-container",77),e.qZA()(),e.TgZ(7,"div",75)(8,"div",98),e.YNc(9,Qi,1,0,"ng-container",77),e.qZA(),e.TgZ(10,"div",98),e.YNc(11,Bi,1,0,"ng-container",77),e.qZA()(),e.TgZ(12,"div")(13,"div",99),e.YNc(14,Yi,1,0,"ng-container",77),e.qZA()()),2&i){e.oxw(4);const t=e.MAs(10),n=e.MAs(12),l=e.MAs(14),a=e.MAs(8),r=e.MAs(18),c=e.MAs(20);e.xp6(2),e.Q6J("ngTemplateOutlet",t),e.xp6(2),e.Q6J("ngTemplateOutlet",n),e.xp6(2),e.Q6J("ngTemplateOutlet",l),e.xp6(3),e.Q6J("ngTemplateOutlet",a),e.xp6(2),e.Q6J("ngTemplateOutlet",r),e.xp6(3),e.Q6J("ngTemplateOutlet",c)}}function Ri(i,o){1&i&&e.GkF(0)}function Hi(i,o){if(1&i&&e.YNc(0,Ri,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(22);e.Q6J("ngTemplateOutlet",t)}}function Gi(i,o){1&i&&e.GkF(0)}function $i(i,o){if(1&i&&e.YNc(0,Gi,1,0,"ng-container",77),2&i){e.oxw(5);const t=e.MAs(32);e.Q6J("ngTemplateOutlet",t)}}function ji(i,o){1&i&&(e.TgZ(0,"li",81)(1,"a",82),e._uU(2,"Advanced"),e.qZA(),e.YNc(3,$i,1,1,"ng-template",83),e.qZA()),2&i&&e.Q6J("ngbNavItem",3)}function Ki(i,o){if(1&i&&(e.TgZ(0,"div",78)(1,"ul",79,103)(3,"li",8
11)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,Vi,15,6,"ng-template",83),e.qZA(),e.TgZ(8,"li",81)(9,"a",82),e._uU(10),e.ALo(11,"translate"),e.TgZ(12,"span",84),e._uU(13,"BETA"),e.qZA()(),e.YNc(14,Hi,1,1,"ng-template",83),e.qZA(),e.YNc(15,ji,4,1,"li",102),e.qZA(),e._UZ(16,"div",85),e.qZA()),2&i){const t=e.MAs(2),n=e.oxw(3);e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,6,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(2),e.hij(" ",e.lcZ(11,8,"FORM.Security")," "),e.xp6(5),e.Q6J("ngIf",n.sectionForm.value.fieldType===n.SectionType.Section||n.sectionForm.value.fieldType===n.SectionType.Trigger),e.xp6(1),e.Q6J("ngbNavOutlet",t)}}function zi(i,o){1&i&&e.GkF(0)}function Wi(i,o){1&i&&e.GkF(0)}function Xi(i,o){1&i&&e._UZ(0,"i",120)}function en(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",117),e.YNc(1,Xi,1,0,"i",118),e.TgZ(2,"label",87),e._uU(3),e.qZA(),e.TgZ(4,"input",119),e.NdJ("input",function(l){e.CHM(t);const a=e.oxw(5);return e.KtG(a.onDynamicLabelsChange(l,"typeLogic"))}),e.qZA()()}if(2&i){const t=o.$implicit,n=o.index,l=e.oxw(5);e.xp6(1),e.Q6J("ngIf",3===n),e.xp6(2),e.Oqu(t),e.xp6(1),e.Q6J("name",n)("value",l.splittedTypeLogic[n])}}function tn(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",75)(1,"div",99)(2,"label",87),e._uU(3),e.qZA(),e.TgZ(4,"input",121),e.NdJ("input",function(l){e.CHM(t);const a=e.oxw(6);return e.KtG(a.onDynamicLabelsChange(l,"triggerMessage"))}),e.qZA()()()}if(2&i){const t=e.oxw(),n=t.$implicit,l=t.index,a=e.oxw(5);e.xp6(3),e.hij("",n," Action Instructions"),e.xp6(1),e.Q6J("name",l)("value",a.splittedTriggerMessage[l]||"")}}function nn(i,o){if(1&i&&(e.ynx(0),e.YNc(1,tn,5,3,"div",97),e.BQk()),2&i){const t=o.index,n=e.oxw(5);e.xp6(1),e.Q6J("ngIf",n.splittedTypeLogic[t])}}function on(i,o){1&i&&e.GkF(0)}function ln(i,o){1&i&&e.GkF(0)}function an(i,o){1&i&&e.GkF(0)}function rn(i,o){if(1&i&&(e.TgZ(0,"div",104),e.YNc(1,an,1,0,"ng-container",77),e.qZA()),2&i){e.oxw(5);const t=e.MAs(16);e.xp6(1),e.Q6J("ngTemplateOutlet",t)}}function sn(i,o){1&i&&e.GkF(0)}const cn=function(){return["Max","Low","Target","Deviation"]},Je=function(){return["High","Low","Target"]},j=function(i,o){return{"col-md-6":i,"col-md-4":o}};function _n(i,o){if(1&i){const t=e.EpF();e.YNc(0,zi,1,0,"ng-container",77),e.TgZ(1,"div",75)(2,"div",108)(3,"fieldset",109),e.YNc(4,Wi,1,0,"ng-container",77),e.qZA()(),e.TgZ(5,"div",108)(6,"label",110),e._uU(7,"Monetary format"),e.qZA(),e.TgZ(8,"div",111)(9,"input",112),e.NdJ("click",function(l){e.CHM(t);const a=e.oxw(4);return e.KtG(a.onDynamicLabelsChange(l,"typeLogic"))}),e.qZA()()()(),e.TgZ(10,"fieldset",109)(11,"div",75),e.YNc(12,en,5,4,"div",113),e.qZA(),e.YNc(13,nn,2,1,"ng-container",114),e.TgZ(14,"div",75)(15,"div",115),e.YNc(16,on,1,0,"ng-container",77),e.qZA(),e.TgZ(17,"div",115),e.YNc(18,ln,1,0,"ng-container",77),e.qZA(),e.YNc(19,rn,2,1,"div",116),e.qZA(),e.TgZ(20,"div",75)(21,"div",99),e.YNc(22,sn,1,0,"ng-container",77),e.qZA()()()}if(2&i){const t=e.oxw(4),n=e.MAs(6),l=e.MAs(24),a=e.MAs(26),r=e.MAs(18),c=e.MAs(20);e.Q6J("ngTemplateOutlet",n),e.xp6(3),e.Q6J("disabled",t.fieldForm.value.isNextNumberActive),e.xp6(1),e.Q6J("ngTemplateOutlet",l),e.xp6(6),e.Q6J("disabled",t.fieldForm.value.isNextNumberActive),e.xp6(2),e.Q6J("ngForOf",e.DdM(14,cn))("ngForTrackBy",t.trackByIndex),e.xp6(1),e.Q6J("ngForOf",e.DdM(15,Je))("ngForTrackBy",t.trackByIndex),e.xp6(2),e.Q6J("ngClass",e.WLB(16,j,t.sectionForm.value.fieldType!==t.SectionType.Table,t.sectionForm.value.fieldType===t.SectionType.Table)),e.xp6(1),e.Q6J("ngTemplateOutlet",a),e.xp6(1),e.Q6J("ngClass",e.WLB(19,j,t.sectionForm.value.fieldType!==t.SectionType.Table,t.sectionForm.value.fieldType===t.SectionType.Table)),e.xp6(1),e.Q6J("ngTemplateOutlet",r),e.xp6(1),e.Q6J("ngIf",t.sectionForm.value.fieldType===t.SectionType.Table),e.xp6(3),e.Q6J("ngTemplateOutlet",c)}}function dn(i,o){1&i&&e.GkF(0)}function pn(i,o){if(1&i&&e.YNc(0,dn,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(22);e.Q6J("ngTemplateOutlet",t)}}function mn(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"ul",105,106),e.NdJ("navChange",function(l){e.CHM(t);const a=e.oxw(3);return e.KtG(a.onTabsWithAiCoachChange(l,3))}
1),e.TgZ(3,"li",81)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,_n,23,22,"ng-template",83),e.qZA(),e.TgZ(8,"li",81)(9,"a",82),e._uU(10),e.ALo(11,"translate"),e.TgZ(12,"span",84),e._uU(13,"BETA"),e.qZA()(),e.YNc(14,pn,1,1,"ng-template",83),e.qZA(),e.TgZ(15,"li",81)(16,"button",107),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.openAiModal())}),e._uU(17),e.ALo(18,"translate"),e.qZA()()(),e._UZ(19,"div",85),e.qZA()}if(2&i){const t=e.MAs(2);e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,7,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(2),e.hij(" ",e.lcZ(11,9,"FORM.Security")," "),e.xp6(5),e.Q6J("ngbNavItem",3),e.xp6(2),e.Oqu(e.lcZ(18,11,"AI-ASSISTANT.Ai-Assistant")),e.xp6(2),e.Q6J("ngbNavOutlet",t)}}function gn(i,o){1&i&&e.GkF(0)}function un(i,o){1&i&&e.GkF(0)}function fn(i,o){if(1&i&&(e.TgZ(0,"div",98),e.YNc(1,un,1,0,"ng-container",77),e.qZA()),2&i){e.oxw(4);const t=e.MAs(20);e.xp6(1),e.Q6J("ngTemplateOutlet",t)}}function vn(i,o){if(1&i&&(e.TgZ(0,"div",74)(1,"div",75)(2,"div"),e.YNc(3,gn,1,0,"ng-container",77),e.qZA(),e.YNc(4,fn,2,1,"div",122),e.qZA()()),2&i){const t=e.oxw(3),n=e.MAs(18);e.xp6(2),e.ekj("col-md-12",t.fieldForm.value.validationType===t.ValidationType.Optional)("col-md-6",t.fieldForm.value.validationType!==t.ValidationType.Optional),e.xp6(1),e.Q6J("ngTemplateOutlet",n),e.xp6(1),e.Q6J("ngIf",t.fieldForm.value.validationType!==t.ValidationType.Optional)}}function hn(i,o){1&i&&e.GkF(0)}function xn(i,o){1&i&&(e.TgZ(0,"span",126),e._UZ(1,"i",127),e._uU(2," Invalid options. Make sure you remove empty and duplicated ones. "),e.qZA())}function Tn(i,o){if(1&i){const t=e.EpF();e.YNc(0,hn,1,0,"ng-container",77),e.TgZ(1,"div",99)(2,"label",87),e._uU(3,"Enter Commands - Each Option in a new Line"),e.qZA(),e.TgZ(4,"textarea",124),e.NdJ("input",function(){e.CHM(t);const l=e.oxw(4);return e.KtG(l.validateTextArea())}),e.qZA(),e.YNc(5,xn,3,0,"span",125),e.qZA()}if(2&i){const t=e.oxw(4),n=e.MAs(28);e.Q6J("ngTemplateOutlet",n),e.xp6(4),e.ekj("invalid-input",null==t.fieldForm.controls.typeLogic.errors?null:t.fieldForm.controls.typeLogic.errors.textAreaError),e.Q6J("required",!0),e.xp6(1),e.Q6J("ngIf",null==t.fieldForm.controls.typeLogic.errors?null:t.fieldForm.controls.typeLogic.errors.textAreaError)}}function bn(i,o){1&i&&e.GkF(0)}function wn(i,o){if(1&i&&e.YNc(0,bn,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(22);e.Q6J("ngTemplateOutlet",t)}}function yn(i,o){1&i&&e.GkF(0)}function Fn(i,o){if(1&i&&e.YNc(0,yn,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(30);e.Q6J("ngTemplateOutlet",t)}}function Zn(i,o){if(1&i&&(e.TgZ(0,"div")(1,"ul",79,123)(3,"li",81)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,Tn,6,5,"ng-template",83),e.qZA(),e.TgZ(8,"li",81)(9,"a",82),e._uU(10),e.ALo(11,"translate"),e.TgZ(12,"span",84),e._uU(13,"BETA"),e.qZA()(),e.YNc(14,wn,1,1,"ng-template",83),e.qZA(),e.TgZ(15,"li",81)(16,"a",82),e._uU(17,"Advanced"),e.qZA(),e.YNc(18,Fn,1,1,"ng-template",83),e.qZA()(),e._UZ(19,"div",85),e.qZA()),2&i){const t=e.MAs(2);e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,6,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(2),e.hij(" ",e.lcZ(11,8,"FORM.Security")," "),e.xp6(5),e.Q6J("ngbNavItem",3),e.xp6(4),e.Q6J("ngbNavOutlet",t)}}function An(i,o){1&i&&e.GkF(0)}function Cn(i,o){if(1&i){const t=e.EpF();e.YNc(0,An,1,0,"ng-container",77),e.TgZ(1,"div",75)(2,"div",129)(3,"label",87),e._uU(4,"Line Label"),e.qZA(),e.TgZ(5,"input",130),e.NdJ("input",function(l){e.CHM(t);const a=e.oxw(4);return e.KtG(a.onDynamicLabelsChange(l,"apiObjectName"))}),e.qZA()(),e.TgZ(6,"div",129)(7,"label",87),e._uU(8,"X Axis Label"),e.qZA(),e.TgZ(9,"input",131),e.NdJ("input",function(l){e.CHM(t);const a=e.oxw(4);return e.KtG(a.onDynamicLabelsChange(l,"apiObjectName"))}),e.qZA()(),e.TgZ(10,"div",129)(11,"label",87),e._uU(12,"Y Axis Label"),e.qZA(),e.TgZ(13,"input",132),e.NdJ("input",function(l){e.CHM(t);const a=e.oxw(4);return e.KtG(a.onDynamicLabelsChange(l,"apiObjectName"))}),e.qZA()()()}if(2&i){const t=e.oxw(4),n=e.MAs(28);e.Q6J("ngTemplateOutlet",n),e.xp6(5),e.Q6J("value",t.splittedApiObjectName[2]),e.xp6(4),e.Q6J("value",t.splittedApiObjectName[0]),e.xp6(4),e.Q6J("value",t.splittedApiObjectName[1])}}function kn(i,o){1&i&&e.GkF(0)}function Sn(i,o){if(1&i&&e.YNc(0,kn,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(22);e.Q6J("ngTemplateOutlet",t)}}function Nn(i,o){1&i&&e.GkF(0)}function qn(i,o){if(1&i&&e.YNc(0,Nn,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(30);e.Q6J("ngTemplateOutlet",t)}}function On(i,o){if(1&i&&(e.TgZ(0,"div")(1,"ul",79,128)(3,"li",8
11)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,Cn,14,4,"ng-template",83),e.qZA(),e.TgZ(8,"li",81)(9,"a",82),e._uU(10),e.ALo(11,"translate"),e.TgZ(12,"span",84),e._uU(13,"BETA"),e.qZA()(),e.YNc(14,Sn,1,1,"ng-template",83),e.qZA(),e.TgZ(15,"li",81)(16,"a",82),e._uU(17,"Advanced"),e.qZA(),e.YNc(18,qn,1,1,"ng-template",83),e.qZA()(),e._UZ(19,"div",85),e.qZA()),2&i){const t=e.MAs(2);e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,6,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(2),e.hij(" ",e.lcZ(11,8,"FORM.Security")," "),e.xp6(5),e.Q6J("ngbNavItem",3),e.xp6(4),e.Q6J("ngbNavOutlet",t)}}function Un(i,o){1&i&&e.GkF(0)}function In(i,o){1&i&&e.GkF(0)}function Pn(i,o){1&i&&e._UZ(0,"i",137)}function Ln(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",117),e.YNc(1,Pn,1,0,"i",135),e.TgZ(2,"label",87),e._uU(3),e.qZA(),e.TgZ(4,"input",136),e.NdJ("input",function(l){e.CHM(t);const a=e.oxw(5);return e.KtG(a.onDynamicLabelsChange(l,"typeLogic"))}),e.qZA()()}if(2&i){const t=o.$implicit,n=o.index,l=e.oxw(5);e.xp6(1),e.Q6J("ngIf",3===n),e.xp6(2),e.Oqu(t),e.xp6(1),e.Q6J("name",n)("value",l.splittedTypeLogic[n])}}function Mn(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",99)(1,"label",87),e._uU(2),e.qZA(),e.TgZ(3,"input",139),e.NdJ("input",function(l){e.CHM(t);const a=e.oxw(6);return e.KtG(a.onDynamicLabelsChange(l,"triggerMessage"))}),e.qZA()()}if(2&i){const t=e.oxw(),n=t.$implicit,l=t.index,a=e.oxw(5);e.xp6(2),e.hij("",n," Action Instructions"),e.xp6(1),e.Q6J("name",l)("value",a.splittedTriggerMessage[l]||"")}}function Jn(i,o){if(1&i&&(e.ynx(0),e.YNc(1,Mn,4,3,"div",138),e.BQk()),2&i){const t=o.index,n=e.oxw(5);e.xp6(1),e.Q6J("ngIf",n.splittedTypeLogic[t])}}function Dn(i,o){1&i&&e.GkF(0)}function En(i,o){1&i&&e.GkF(0)}function Qn(i,o){1&i&&e.GkF(0)}function Bn(i,o){if(1&i&&(e.TgZ(0,"div",104),e.YNc(1,Qn,1,0,"ng-container",77),e.qZA()),2&i){e.oxw(5);const t=e.MAs(16);e.xp6(1),e.Q6J("ngTemplateOutlet",t)}}function Yn(i,o){1&i&&e.GkF(0)}const Vn=function(){return["Max Value","Low Value","Target","Deviation"]};function Rn(i,o){if(1&i&&(e.YNc(0,Un,1,0,"ng-container",77),e.YNc(1,In,1,0,"ng-container",77),e.TgZ(2,"div",75),e.YNc(3,Ln,5,4,"div",113),e.qZA(),e.YNc(4,Jn,2,1,"ng-container",114),e.TgZ(5,"div",75)(6,"div",115),e.YNc(7,Dn,1,0,"ng-container",77),e.qZA(),e.TgZ(8,"div",115),e.YNc(9,En,1,0,"ng-container",77),e.qZA(),e.YNc(10,Bn,2,1,"div",116),e.qZA(),e.TgZ(11,"div")(12,"div",134),e.YNc(13,Yn,1,0,"ng-container",77),e.qZA()()),2&i){const t=e.oxw(4),n=e.MAs(28),l=e.MAs(24),a=e.MAs(26),r=e.MAs(18),c=e.MAs(20);e.Q6J("ngTemplateOutlet",n),e.xp6(1),e.Q6J("ngTemplateOutlet",l),e.xp6(2),e.Q6J("ngForOf",e.DdM(12,Vn))("ngForTrackBy",t.trackByIndex),e.xp6(1),e.Q6J("ngForOf",e.DdM(13,Je))("ngForTrackBy",t.trackByIndex),e.xp6(2),e.Q6J("ngClass",e.WLB(14,j,t.sectionForm.value.fieldType!==t.SectionType.Table,t.sectionForm.value.fieldType===t.SectionType.Table)),e.xp6(1),e.Q6J("ngTemplateOutlet",a),e.xp6(1),e.Q6J("ngClass",e.WLB(17,j,t.sectionForm.value.fieldType!==t.SectionType.Table,t.sectionForm.value.fieldType===t.SectionType.Table)),e.xp6(1),e.Q6J("ngTemplateOutlet",r),e.xp6(1),e.Q6J("ngIf",t.sectionForm.value.fieldType===t.SectionType.Table),e.xp6(3),e.Q6J("ngTemplateOutlet",c)}}function Hn(i,o){1&i&&e.GkF(0)}function Gn(i,o){if(1&i&&e.YNc(0,Hn,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(22);e.Q6J("ngTemplateOutlet",t)}}function $n(i,o){1&i&&e.GkF(0)}function jn(i,o){if(1&i&&e.YNc(0,$n,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(30);e.Q6J("ngTemplateOutlet",t)}}function Kn(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"ul",79,133)(3,"li",81)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,Rn,14,20,"ng-template",83),e.qZA(),e.TgZ(8,"li",81)(9,"a",82),e._uU(10),e.ALo(11,"translate"),e.TgZ(12,"span",84),e._uU(13,"BETA"),e.qZA()(),e.YNc(14,Gn,1,1,"ng-template",83),e.qZA(),e.TgZ(15,"li",81)(16,"a",82),e._uU(17,"Advanced"),e.qZA(),e.YNc(18,jn,1,1,"ng-template",83),e.qZA(),e.TgZ(19,"li")(20,"button",107),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.openAiModal())}),e._uU(21),e.ALo(22,"translate"),e.qZA()()(),e._UZ(23,"div",85),e.qZA()}if(2&i){const t=e.MAs(2);
1e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,7,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(2),e.hij(" ",e.lcZ(11,9,"FORM.Security")," "),e.xp6(5),e.Q6J("ngbNavItem",3),e.xp6(6),e.Oqu(e.lcZ(22,11,"AI-ASSISTANT.Ai-Assistant")),e.xp6(2),e.Q6J("ngbNavOutlet",t)}}function zn(i,o){1&i&&e.GkF(0)}function Wn(i,o){if(1&i&&(e.TgZ(0,"option",145),e.ALo(1,"findItemByKey"),e._uU(2),e.qZA()),2&i){const t=o.$implicit,n=e.oxw(5);let l;e.Q6J("value",n.isReferenceDataAsChoices&&n.currentReferenceData?null==(l=e.Dn7(1,2,n.currentReferenceData.items,n.currentReferenceData.items[0].label?"label":"value",t))?null:l.id:t),e.xp6(2),e.Oqu(t)}}function Xn(i,o){1&i&&e.GkF(0)}function eo(i,o){1&i&&e.GkF(0)}function to(i,o){if(1&i&&(e.YNc(0,zn,1,0,"ng-container",77),e.TgZ(1,"div",75)(2,"div",98)(3,"label",87),e._uU(4,"Default Value"),e.qZA(),e.TgZ(5,"fieldset",109)(6,"select",143)(7,"option",89),e._uU(8,"None"),e.qZA(),e.YNc(9,Wn,3,6,"option",144),e.qZA()()(),e.TgZ(10,"div",98),e.YNc(11,Xn,1,0,"ng-container",77),e.qZA()(),e.TgZ(12,"div")(13,"div",99),e.YNc(14,eo,1,0,"ng-container",77),e.qZA()()),2&i){const t=e.oxw(4),n=e.MAs(2),l=e.MAs(18),a=e.MAs(20);e.Q6J("ngTemplateOutlet",n),e.xp6(5),e.Q6J("disabled",t.isUsersAsChoices),e.xp6(2),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngForOf",t.splittedTextAreaType)("ngForTrackBy",t.trackByIndex),e.xp6(2),e.Q6J("ngTemplateOutlet",l),e.xp6(3),e.Q6J("ngTemplateOutlet",a)}}function io(i,o){1&i&&e.GkF(0)}function no(i,o){if(1&i&&e.YNc(0,io,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(22);e.Q6J("ngTemplateOutlet",t)}}function oo(i,o){1&i&&e.GkF(0)}function lo(i,o){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,oo,1,0,"ng-container",77),e.qZA()),2&i){e.oxw(5);const t=e.MAs(32);e.xp6(1),e.Q6J("ngTemplateOutlet",t)}}function ao(i,o){1&i&&(e.TgZ(0,"li",81)(1,"a",82),e._uU(2,"Advanced"),e.qZA(),e.YNc(3,lo,2,1,"ng-template",83),e.qZA()),2&i&&e.Q6J("ngbNavItem",3)}function ro(i,o){if(1&i&&(e.TgZ(0,"div",140)(1,"ul",141,142)(3,"li",81)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,to,15,7,"ng-template",83),e.qZA(),e.TgZ(8,"li",81)(9,"a",82),e._uU(10),e.ALo(11,"translate"),e.TgZ(12,"span",84),e._uU(13,"BETA"),e.qZA()(),e.YNc(14,no,1,1,"ng-template",83),e.qZA(),e.YNc(15,ao,4,1,"li",102),e.qZA(),e._UZ(16,"div",85),e.qZA()),2&i){const t=e.MAs(2),n=e.oxw(3);e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,6,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(2),e.hij(" ",e.lcZ(11,8,"FORM.Security")," "),e.xp6(5),e.Q6J("ngIf",(n.sectionForm.value.fieldType===n.SectionType.Section||n.sectionForm.value.fieldType===n.SectionType.Trigger)&&!n.isUsersAsChoices),e.xp6(1),e.Q6J("ngbNavOutlet",t)}}function so(i,o){1&i&&e.GkF(0)}function co(i,o){if(1&i&&e._uU(0),2&i){const t=o.$implicit;let n;e.hij(" ",null!==(n=null!==(n=t.label)&&void 0!==n?n:t.value)&&void 0!==n?n:t.id," ")}}function _o(i,o){1&i&&e.GkF(0)}function po(i,o){1&i&&e.GkF(0)}function mo(i,o){if(1&i&&(e.YNc(0,so,1,0,"ng-container",77),e.TgZ(1,"div",75)(2,"div",98)(3,"label",87),e._uU(4,"Default Value"),e.qZA(),e.TgZ(5,"fieldset",109)(6,"ff-select-multiple-items",147),e.YNc(7,co,1,1,"ng-template",null,148,e.W1O),e.qZA()()(),e.TgZ(9,"div",98),e.YNc(10,_o,1,0,"ng-container",77),e.qZA()(),e.TgZ(11,"div",75)(12,"div",99),e.YNc(13,po,1,0,"ng-container",77),e.qZA()()),2&i){const t=e.oxw(4),n=e.MAs(2),l=e.MAs(18),a=e.MAs(20);e.Q6J("ngTemplateOutlet",n),e.xp6(5),e.Q6J("disabled",t.isUsersAsChoices),e.xp6(1),e.Q6J("searchName",t.multiSelectItems.length&&t.multiSelectItems[0].name?"name":"id")("searchEnabled",!1)("items",t.multiSelectItems)("selectedFilterItems",t.selectedMultiSelectItems),e.xp6(4),e.Q6J("ngTemplateOutlet",l),e.xp6(3),e.Q6J("ngTemplateOutlet",a)}}function go(i,o){1&i&&e.GkF(0)}function uo(i,o){if(1&i&&e.YNc(0,go,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(22);e.Q6J("ngTemplateOutlet",t)}}function fo(i,o){if(1&i&&(e.TgZ(0,"div",78)(1,"ul",79,146)(3,"li",81)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,mo,14,8,"ng-template",83),e.qZA(),e.TgZ(8,"li",81)(9,"a",82),e._uU(10),e.ALo(11,"translate"),e.TgZ(12,"span",84),e._uU(13,"BETA"),e.qZA()(),e.YNc(14,uo,1,1,"ng-template",83),e.qZA()(),e._UZ(15,"div",85),e.qZA()),2&i){const t=e.MAs(2);
1e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,5,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(2),e.hij(" ",e.lcZ(11,7,"FORM.Security")," "),e.xp6(5),e.Q6J("ngbNavOutlet",t)}}function vo(i,o){if(1&i&&(e.TgZ(0,"option",89),e._uU(1,"Date + Time"),e.qZA()),2&i){const t=e.oxw(5);e.Q6J("ngValue",t.DateTimeTypeLogic.DateTime)}}function ho(i,o){if(1&i&&(e.TgZ(0,"option",89),e._uU(1,"Date + Time"),e.qZA()),2&i){const t=e.oxw(5);e.Q6J("ngValue",t.DateTimeTypeLogic.DateTime24h)}}function xo(i,o){if(1&i&&(e.TgZ(0,"option",89),e._uU(1,"Time Only"),e.qZA()),2&i){const t=e.oxw(5);e.Q6J("ngValue",t.DateTimeTypeLogic.TimeOnly)}}function To(i,o){if(1&i&&(e.TgZ(0,"option",89),e._uU(1,"Time Only"),e.qZA()),2&i){const t=e.oxw(5);e.Q6J("ngValue",t.DateTimeTypeLogic.TimeOnly24h)}}function bo(i,o){if(1&i&&(e.ynx(0),e._UZ(1,"input",156),e.TgZ(2,"label",157),e._uU(3,"24Hs"),e.qZA(),e.BQk()),2&i){const t=e.oxw(5);e.xp6(1),e.s9C("id","btn-check"+t.fieldForm.value.id),e.Q6J("checked",t.fieldForm.value.typeLogic===t.DateTimeTypeLogic.DateTime24h||t.fieldForm.value.typeLogic===t.DateTimeTypeLogic.TimeOnly24h),e.xp6(1),e.s9C("for","btn-check"+t.fieldForm.value.id)}}function wo(i,o){1&i&&e.GkF(0)}function yo(i,o){1&i&&e.GkF(0)}function Fo(i,o){1&i&&e.GkF(0)}function Zo(i,o){1&i&&(e.TgZ(0,"div",163)(1,"div",166),e._UZ(2,"ff-date-picker",167),e.qZA()())}function Ao(i,o){1&i&&(e.TgZ(0,"div",168),e._UZ(1,"ngb-timepicker",169),e.qZA()),2&i&&(e.xp6(1),e.Q6J("meridian",!0)("spinners",!1))}function Co(i,o){1&i&&(e.TgZ(0,"div",168),e._UZ(1,"ngb-timepicker",169),e.qZA()),2&i&&(e.xp6(1),e.Q6J("meridian",!1)("spinners",!1))}function ko(i,o){if(1&i&&(e.TgZ(0,"div",163)(1,"div",164),e._UZ(2,"ff-date-picker",167),e.YNc(3,Ao,2,2,"div",165),e.YNc(4,Co,2,2,"div",165),e.qZA()()),2&i){const t=e.oxw(6);e.xp6(1),e.Tol(t.sectionForm.value.fieldName),e.xp6(2),e.Q6J("ngSwitchCase",t.DateTimeTypeLogic.DateTime),e.xp6(1),e.Q6J("ngSwitchCase",t.DateTimeTypeLogic.DateTime24h)}}function So(i,o){1&i&&(e.TgZ(0,"div",168),e._UZ(1,"ngb-timepicker",169),e.qZA()),2&i&&(e.xp6(1),e.Q6J("meridian",!0)("spinners",!1))}function No(i,o){1&i&&(e.TgZ(0,"div",168),e._UZ(1,"ngb-timepicker",169),e.qZA()),2&i&&(e.xp6(1),e.Q6J("meridian",!1)("spinners",!1))}function qo(i,o){if(1&i&&(e.TgZ(0,"div",158)(1,"label",159),e._uU(2,"-"),e.qZA(),e.TgZ(3,"div",160),e.YNc(4,Zo,3,0,"div",161),e.YNc(5,ko,5,4,"div",162),e.TgZ(6,"div",163)(7,"div",164)(8,"div"),e.YNc(9,So,2,2,"div",165),e.YNc(10,No,2,2,"div",165),e.qZA()()()()()),2&i){const t=e.oxw(5);e.xp6(3),e.Q6J("ngSwitch",t.fieldForm.value.typeLogic),e.xp6(1),e.Q6J("ngSwitchCase",t.DateTimeTypeLogic.DateOnly),e.xp6(1),e.Q6J("ngIf",t.fieldForm.value.typeLogic===t.DateTimeTypeLogic.DateTime||t.fieldForm.value.typeLogic===t.DateTimeTypeLogic.DateTime24h),e.xp6(4),e.Q6J("ngSwitchCase",t.DateTimeTypeLogic.TimeOnly),e.xp6(1),e.Q6J("ngSwitchCase",t.DateTimeTypeLogic.TimeOnly24h)}}function Oo(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",75)(1,"div",108)(2,"label",87),e._uU(3,"Element Type"),e.qZA(),e.TgZ(4,"div",151)(5,"select",152),e.NdJ("change",function(){e.CHM(t);const l=e.oxw(4);return e.KtG(l.dateTimeFormat(l.fieldForm.value.hourFormat))}),e.YNc(6,vo,2,1,"option",153),e.YNc(7,ho,2,1,"option",153),e.TgZ(8,"option",89),e._uU(9,"Date Only"),e.qZA(),e.YNc(10,xo,2,1,"option",153),e.YNc(11,To,2,1,"option",153),e.qZA(),e.YNc(12,bo,4,3,"ng-container",21),e.qZA()(),e.TgZ(13,"div",108),e.YNc(14,wo,1,0,"ng-container",77),e.qZA()(),e.TgZ(15,"div",75)(16,"div"),e.YNc(17,yo,1,0,"ng-container",77),e.qZA(),e.TgZ(18,"div",154),e.YNc(19,Fo,1,0,"ng-container",77),e.qZA()(),e.TgZ(20,"div",75)(21,"div",76)(22,"label",87),e._uU(23,"Default value"),e.qZA(),e.TgZ(24,"select",143)(25,"option",89),e._uU(26,"None"),e.qZA(),e.TgZ(27,"option",145),e._uU(28,"Now"),e.qZA(),e.TgZ(29,"option",145),e._uU(30,"Custom"),e.qZA()()(),e.YNc(31,qo,11,5,"div",155),e.qZA()}if(2&i){const t=e.oxw(4),n=e.MAs(24),l=e.MAs(18),a=e.MAs(20);e.xp6(6),e.Q6J("ngIf",!t.fieldForm.value.hourFormat),e.xp6(1),e.Q6J("ngIf",t.fieldForm.value.hourFormat),e.xp6(1),e.Q6J("ngValue",t.DateTimeTypeLogic.DateOnly),e.xp6(2),e.Q6J("ngIf",!t.fieldForm.value.hourFormat),e.xp6(1),e.Q6J("ngIf",t.fieldForm.value.hourFormat),e.xp6(1),e.Q6J("ngIf",t.fieldForm.value.typeLogic!==t.DateTimeTypeL
1ogic.DateOnly),e.xp6(2),e.Q6J("ngTemplateOutlet",n),e.xp6(2),e.ekj("col-4",t.fieldForm.value.validationType!==t.ValidationType.Optional)("col-12",t.fieldForm.value.validationType===t.ValidationType.Optional),e.xp6(1),e.Q6J("ngTemplateOutlet",l),e.xp6(1),e.Q6J("hidden",t.fieldForm.value.validationType===t.ValidationType.Optional),e.xp6(1),e.Q6J("ngTemplateOutlet",a),e.xp6(2),e.ekj("col-lg-4",t.isCustomDateField),e.xp6(4),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("value",t.DateDefaultValue.Now),e.xp6(2),e.Q6J("value",t.DateDefaultValue.Custom),e.xp6(2),e.Q6J("ngIf",t.isCustomDateField)}}function Uo(i,o){1&i&&e.GkF(0)}function Io(i,o){if(1&i&&e.YNc(0,Uo,1,0,"ng-container",77),2&i){e.oxw(4);const t=e.MAs(22);e.Q6J("ngTemplateOutlet",t)}}function Po(i,o){if(1&i&&(e.TgZ(0,"div",78)(1,"ul",79,149)(3,"li",81)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,Oo,32,20,"ng-template",83),e.qZA(),e.TgZ(8,"li",81)(9,"a",82),e._uU(10),e.ALo(11,"translate"),e.TgZ(12,"span",84),e._uU(13,"BETA"),e.qZA()(),e.YNc(14,Io,1,1,"ng-template",83),e.qZA()(),e._UZ(15,"div",150),e.qZA()),2&i){const t=e.MAs(2);e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,5,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavItem",2),e.xp6(2),e.hij(" ",e.lcZ(11,7,"FORM.Security")," "),e.xp6(5),e.Q6J("ngbNavOutlet",t)}}function Lo(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",174)(1,"select",175),e.NdJ("change",function(l){e.CHM(t);const a=e.oxw(4);return e.KtG(a.triggerLabelChange(l,"taskComment"))}),e.TgZ(2,"option",145),e._uU(3,"Trigger label"),e.qZA(),e.TgZ(4,"option",145),e._uU(5,"Trigger value"),e.qZA(),e.TgZ(6,"option",145),e._uU(7,"Trigger message"),e.qZA()()()}if(2&i){const t=e.oxw(4);e.xp6(2),e.Q6J("value",t.FieldLogic.TriggerLabel),e.xp6(2),e.Q6J("value",t.FieldLogic.TriggerValue),e.xp6(2),e.Q6J("value",t.FieldLogic.TriggerMessage)}}function Mo(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",170)(1,"label"),e._uU(2,"Start a new activity?"),e.qZA(),e.TgZ(3,"ff-select-single-item",171),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.loadWorkflows())}),e.ALo(4,"getFilteredWorkflows"),e.ALo(5,"async"),e.ALo(6,"async"),e.qZA(),e.TgZ(7,"label",87),e._uU(8,"Comments"),e.qZA(),e._UZ(9,"textarea",172),e.YNc(10,Lo,8,3,"div",173),e.qZA()}if(2&i){const t=e.oxw(3);let n;e.xp6(3),e.Q6J("withReset",!0)("items",e.lcZ(4,6,e.lcZ(5,8,t.workflows$)))("placeholder",t.fieldForm.value.taskWorkflow||"No")("showSpinner",!(null!=(n=e.lcZ(6,10,t.workflows$))&&n.length))("searchPlaceholder","workflow"),e.xp6(7),e.Q6J("ngIf",t.sectionForm.value.fieldType===t.SectionType.Table)}}function Jo(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",176)(1,"label"),e._uU(2,"Select Child Workflow"),e.qZA(),e.TgZ(3,"ff-select-single-item",177),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.loadWorkflows())}),e.ALo(4,"getFilteredWorkflows"),e.ALo(5,"async"),e.ALo(6,"async"),e.qZA(),e.TgZ(7,"label",87),e._uU(8),e.ALo(9,"translate"),e.qZA(),e._UZ(10,"textarea",178),e.TgZ(11,"div",179),e._UZ(12,"input",180),e.TgZ(13,"label",181),e._uU(14,"Is Trigger"),e.qZA()()()}if(2&i){const t=e.oxw(3);let n;e.ekj("pb-3",t.sectionForm.value.fieldType!==t.SectionType.Table)("pb-4",t.sectionForm.value.fieldType===t.SectionType.Table),e.xp6(3),e.Q6J("withReset",!0)("items",e.lcZ(4,11,e.lcZ(5,13,t.workflows$)))("placeholder",t.fieldForm.value.addChildWorkflow||"Choose a workflow")("showSpinner",!(null!=(n=e.lcZ(6,15,t.workflows$))&&n.length))("searchPlaceholder","workflow"),e.xp6(5),e.Oqu(e.l
1cZ(9,17,"REPORT.Comments")),e.xp6(3),e.Q6J("hidden",t.sectionForm.value.fieldType===t.SectionType.Table)}}function Do(i,o){1&i&&(e.TgZ(0,"div",170)(1,"label"),e._uU(2,"Image Url"),e.qZA(),e._UZ(3,"input",182),e.qZA())}function Eo(i,o){if(1&i&&(e.TgZ(0,"option",89),e._uU(1),e.qZA()),2&i){const t=o.$implicit;e.Q6J("ngValue",t.id),e.xp6(1),e.Oqu(t.name)}}function Qo(i,o){1&i&&e.GkF(0)}function Bo(i,o){1&i&&e.GkF(0)}function Yo(i,o){if(1&i&&(e.TgZ(0,"div",75)(1,"div",98)(2,"label",87),e._uU(3,"Select Hierarchy"),e.qZA(),e.TgZ(4,"select",183)(5,"option",89),e._uU(6,"None"),e.qZA(),e.YNc(7,Eo,2,2,"option",184),e.qZA()(),e.TgZ(8,"div",98),e.YNc(9,Qo,1,0,"ng-container",77),e.qZA()(),e.TgZ(10,"div")(11,"div",99),e.YNc(12,Bo,1,0,"ng-container",77),e.qZA()()),2&i){const t=e.oxw(4),n=e.MAs(18),l=e.MAs(20);e.xp6(5),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngForOf",t.hierarchies)("ngForTrackBy",t.trackByIndex),e.xp6(2),e.Q6J("ngTemplateOutlet",n),e.xp6(3),e.Q6J("ngTemplateOutlet",l)}}function Vo(i,o){if(1&i&&(e.TgZ(0,"div",140)(1,"ul",141,142)(3,"li",81)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,Yo,13,5,"ng-template",83),e.qZA()(),e._UZ(8,"div",85),e.qZA()),2&i){const t=e.MAs(2);e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,3,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavOutlet",t)}}function Ro(i,o){1&i&&(e.TgZ(0,"div",170)(1,"label"),e._uU(2,"Website Url"),e.qZA(),e._UZ(3,"input",185),e.qZA())}function Ho(i,o){if(1&i&&(e.TgZ(0,"option",89),e._uU(1),e.qZA()),2&i){const t=o.$implicit;e.Q6J("ngValue",t.fieldName),e.xp6(1),e.Oqu(t.label)}}function Go(i,o){if(1&i&&(e.ynx(0),e.YNc(1,Ho,2,2,"option",184),e.BQk()),2&i){const t=e.oxw(5);e.xp6(1),e.Q6J("ngForOf",t.hierarchyFieldsUsedInWorkflow)("ngForTrackBy",t.trackByIndex)}}function $o(i,o){1&i&&(e.TgZ(0,"option",190)(1,"span",191),e._uU(2,"Loading..."),e.qZA()())}function jo(i,o){if(1&i&&(e.TgZ(0,"option",89),e._uU(1),e.qZA()),2&i){const t=o.$implicit;e.Q6J("ngValue",t.id),e.xp6(1),e.Oqu(t.name)}}function Ko(i,o){1&i&&e.GkF(0)}function zo(i,o){1&i&&e.GkF(0)}function Wo(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",75)(1,"div",186)(2,"label",87),e._uU(3,"Hierarchy filter"),e.qZA(),e.TgZ(4,"select",187),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(4);return e.KtG(l.loadUsedHierarchies())}),e.TgZ(5,"option",89),e._uU(6,"None"),e.qZA(),e.YNc(7,Go,2,2,"ng-container",21),e.YNc(8,$o,3,0,"option",188),e.qZA()(),e.TgZ(9,"div",99)(10,"label",87),e._uU(11,"Asset Type filter"),e.qZA(),e.TgZ(12,"select",189)(13,"option",89),e._uU(14,"None"),e.qZA(),e.YNc(15,jo,2,2,"option",184),e.qZA()(),e.TgZ(16,"div",99),e.YNc(17,Ko,1,0,"ng-container",77),e.qZA()(),e.TgZ(18,"div",75)(19,"div",76),e.YNc(20,zo,1,0,"ng-container",77),e.qZA()()}if(2&i){const t=e.oxw(4),n=e.MAs(18),l=e.MAs(20);e.xp6(5),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngIf",!t.loadingUsedHierarchyFields),e.xp6(1),e.Q6J("ngIf",t.loadingUsedHierarchyFields),e.xp6(1),e.ekj("col-lg-4",t.hierarchyFieldsUsedInWorkflow.length)("col-lg-6",!t.hierarchyFieldsUsedInWorkflow.length),e.xp6(4),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngForOf",t.assetTypes)("ngForTrackBy",t.trackByIndex),e.xp6(1),e.ekj("col-lg-4",t.hierarchyFieldsUsedInWorkflow.length)("col-lg-6",!t.hierarchyFieldsUsedInWorkflow.length),e.xp6(1),e.Q6J("ngTemplateOutlet",n),e.xp6(3),e.Q6J("ngTemplateOutlet",l)}}function Xo(i,o){if(1&i&&(e.TgZ(0,"div",140)(1,"ul",141,142)(3,"li",81)(4,"a",82),e._uU(5),e.ALo(6,"translate"),e.qZA(),e.YNc(7,Wo,21,16,"ng-template",83),e.qZA()(),e._UZ(8,"div",85),e.qZA()),2&i){const t=e.MAs(2);e.xp6(3),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(6,3,"FORM.Basic")),e.xp6(3),e.Q6J("ngbNavOutlet",t)}}function el(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"input",204,205),e.NdJ("change",function(l){e.CHM(t);const a=e.oxw(4);return e.KtG(a.onFileSelect(l))}),e.qZA()}if(2&i){const t=e.oxw(4);e.Q6J("name",t.fieldForm.value.id)("id","insertFile"+t.fieldForm.value.id)}}function tl(i,o){1&i&&e._UZ(0,"i",206)}function il(i,o){1&i&&(e.TgZ(0,"div",207)(1,"small",163),e._uU(2,"Users will be able to upload files while reporting."),e.qZA(),e._UZ(3,"i",208),e.qZA())}function nl(i,o){1&i&&e._UZ(0,"i",206)}function ol(i,o){1&i&&(e.TgZ(0,"div",209),e._UZ(1,"i",210),e.TgZ(2,"small",163),e._uU(3,"NO FILE"),e.qZA()())}function ll(i,o){if(1&i&&(e._UZ(0,"i",223),e.ALo(1,"fileFormatIconClass"),e.ALo(2,"slice")),2&i){const t=e.oxw(6);e.Q6J("ngClass",e.lcZ(1,1,e.xi3(2,3,t.splittedTypeLogic[t.splittedTypeLogic.length-1],-3)))}}function al(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",207),e.YNc(1,ll,3,6,"i",212),e.TgZ(2,"small",213),e._uU(3),e.ALo(4,"slice"),e.qZA(),e.TgZ(5,"div",214,215)(7,"button",216),e._UZ(8,"i",217),e.qZA(),e.TgZ(9,"div",218)(10,"small",219),e._uU(11,"Do you want to delete this file?"),e.qZA(),e.TgZ(12,"div",166)(13,"button",220),e.NdJ("click",function(){e.CHM(t);const l=e.MAs(6);return e.KtG(l.close())}),e.TgZ(14,"span",221),e._uU(15,"No"),e.qZA()(),e.TgZ(16,"button",222),e.NdJ("click",function(){const a=e.CHM(t).index,r=e.MAs(6);return e.oxw(5).removeFile(a),e.KtG(r.close())}),e._uU(17,"Yes"),e.qZA()()()()()}if(2&i){const t=o.$implicit,n=e.oxw(5);e.xp6(1),e.Q6J("ngIf","upload"!==n.fieldForm.value.typeLogic),e.xp6(2),e.Oqu(e.xi3(4,2,t,7))}}function rl(i,o){if(1&i&&(e.ynx(0),e.YNc(1,al,18,5,"div",211),e.BQk()),2&i){const t=e.oxw(4);e.xp6(1),e.Q6J("ngForOf",t.splittedTypeLogic)("ngForTrackBy",t.trackByIndex)}}function sl(i,o){if(1&i&&(e.TgZ(0,"div",224),e._UZ(1,"ngb-progressbar",225),e.qZA()),2&i){const t=e.oxw(4);e.xp6(1),e.Q6J("value",t.uploadProgress)("striped",!0)("animated",!0)}}function cl(i,o){if(1&i&&(e.TgZ(0,"div",224)(1,"span",226),e._UZ(2,"i",127),e._uU(3),e.qZA()()),2&i){const t=e.oxw(4);e.xp6(3),e.hij(" ",t.filesUploadingStatus," ")}}function _l(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",227),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(4);return e.KtG(l.addFile())}),e.TgZ(1,"small",163),e._uU(2,"Upload Files"),e._uU(3,"."),e.qZA(),e._UZ(4,"i",228),e.qZA()}}function dl(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"small",229),e._uU(1," Allowed file types: "),e.TgZ(2,"strong"),e._uU(3,".mp4, .jpg, .png, .gif, .pdf, .ppt, .pptx, .rtf, .doc, .docx, .xls, .xlsx, .csv, .txt, .dwg, .dwf"),e.qZA(),e._uU(4,". "),e.TgZ(5,"button",230),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(4);return e.KtG(l.triggerChat())}),e._uU(6,"Need help?"),e.qZA()()}}const De=function(i,o){return{"bg-light text-dark":i,"bg-primary-dark":o}};function pl(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",192)(1,"div",75)(2,"div",99)(3,"h6")(4,"strong"),e._uU(5,"Select one of the options below"),e.qZA()(),e.YNc(6,el,2,2,"input",193),e.TgZ(7,"div",194)(8,"button",195),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.attachOrUpload(1))}),e.TgZ(9,"strong",196),e._uU(10,"1"),e.qZA(),e.TgZ(11,"small",163),e._uU(12,"You need users to upload files while reporting."),e.qZA(),e.YNc(13,tl,1,0,"i",197),e.qZA(),e.YNc(14,il,4,0,"div",198),e.qZA(),e.TgZ(15,"h5",199),e._uU(16,"- or -"),e.qZA(),e.TgZ(17,"div",194)(18,"button",195),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.attachOrUpload(2))}),e.TgZ(19,"strong",196),e._uU(20,"2"),e.qZA(),e.TgZ(21,"small",163),e._uU(22,"You need to attach files to this workflow element."),e.qZA(),e.YNc(23,nl,1,0,"i",197),e.qZA(),e.YNc(24,ol,4,0,"div",200),e.YNc(25,rl,2,2,"ng-container",21),e.YNc(26,sl,2,3,"div",201),e.YNc(27,cl,4,1,"div",201),e.YNc(28,_l,5,0,"button",202),e.qZA(),e.YNc(29,dl,7,0,"small",203),e.qZA()()()}if(2&i){const t=e.oxw(3);e.xp6(6),e.Q6J("ngIf",!t.filesUploading&&"upload"!==t.fieldForm.value.typeLogic),e.xp6(2),e.ekj("active","upload"===t.fieldForm.value.typeLogic),e.xp6(1),e.Q6J("ngClass",e.WLB(16,De,"upload"!==t.fieldForm.value.typeLogic,"upload"===t.fieldForm.value.typeLogic)),e.xp6(4),e.Q6J("ngIf","upload"===t.fieldForm.value.typeLogic),e.xp6(1),e.Q6J("ngIf",!t.fieldForm.value.typeLogicParsed&&"upload"===t.fieldForm.value.typeLogic),e.xp6(4),e.ekj("active","upload"!==t.fieldForm.value.typeLogic),e.xp6(1),e.Q6J("ngClass",e.WLB(19,De,"upload"===t.fieldForm.value.typeLogic,"upload"!==t.fieldForm.value.typeLogic)),e.xp6(4),e.Q6J("ngIf","upload"!==t.fieldForm.value.typeLogic),e.xp6(1),e.Q6J("ngIf",!t.fieldForm.value.typeLogic&&"upload"!==t.fieldForm.value.typeLogic),e.xp6(1),e.Q6J("ngIf","upload"!==t.fieldForm.value.typeLogic),e.xp6(1),e.Q6J("ngIf","upload"!==t.fieldForm.value.typeLogic&&t.filesUploading),e.xp6(1),e.Q6J("ngIf","upload"!==t.fieldForm.value.typeLogic&&t.filesUploadingStatus),e.xp6(1),e.Q6J("ngIf","upload"!==t.fieldForm.value.typeLogic),e.xp6(1),e.Q6J("ngIf","upload"!==t.fieldForm.value.typeLogic)}}function ml(i,o){if(1&i&&(e.TgZ(0,"div",1)(1,"div",65),e.YNc(2,Xt,6,2,"div",66),e.YNc(3,ri,16,9,"div",67),e.YNc(4,si,2,2,"div",68),e.YNc(5,hi,16,9,"div",67),e.YNc(6,Zi,16,9,"div",67),e.YNc(7,Mi,17,10,"div",67),e.YNc(8,Ki,17,10,"div",67),e.YNc(9,mn,20,13,"div",69),e.YNc(10,vn,5,6,"div",66),e.YNc(11,Zn,20,10,"div",69),e.YNc(12,On,20,10,"div",69),e.YNc(13,Kn,24,13,"div",69),e.YNc(14,ro,17,10,"div",70),e.YNc(15,fo,16,9,"div",67),e.YNc(16,Po,16,9,"div",67),e.YNc(17,Mo,11,12,"div",71),e.YNc(18,Jo,15,19,"div",72),e.YNc(19,Do,4,0,"div",71),e.YNc(20,Vo,9,5,"div",70),e.YNc(21,Ro,4,0,"div",71),e.YNc(22,Xo,9,5,"div",70),e.YNc(23,pl,30,22,"div",73),e.qZA()()),2&i){const t=e.oxw(2);e.Q6J("formGroup",t.fieldForm),e.xp6(1),e.Q6J("ngSwitch",t.fieldForm.value.fieldType),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.Signature),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.Location),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.Label),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.SingleLineText),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.MultiLineText),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.Boolean),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.Trilean),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.Numeric),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.Barcode),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.IotDeviceCmd),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.IotDeviceChart),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.IotDeviceDataPoint),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.SingleSelect),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.MultiSelect),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.DateTime),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.Task),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.AddChild),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.ImageViewer),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.Hierarchy),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.WebViewer),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.Asset),e.xp6(1),e.Q6J("ngSwitchCase",t.SectionFieldType.InsertFile)}}function gl(i,o){if(1&i&&(e.TgZ(0,"div",18)(1,"ngb-accordion",null,19)(3,"ngb-panel",20),e.YNc(4,Yt,1,0,null,21),e.YNc(5,Kt,1,0,null,21),e.YNc(6,ml,24,24,"ng-template",22),e.qZA()()()),2&i){const t=e.oxw();e.Q6J("formGroup",t.fieldForm),e.xp6(3),e.Q6J("id",t.fieldForm.value.id),e.xp6(1),e.Q6J("ngIf",!t.lockedSection),e.xp6(1),e.Q6J("ngIf",t.lockedSection)}}function ul(i,o){if(1&i&&(e.TgZ(0,"option",89),e._uU(1),e.qZA()),2&i){const t=o.$implicit,n=e.oxw(2);e.Q6J("ngValue",n.FieldLogic.ReferenceDataId+t.id),e.xp6(1),e.Oqu(t.name)}}function fl(i,o){1&i&&(e.TgZ(0,"label",87),e._uU(1,"Enter Choices"),e.qZA())}function vl(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"li",236)(1,"div",239),e.ALo(2,"validateChoice"),e.TgZ(3,"input",240,241),e.NdJ("paste",function(l){const r=e.CHM(t).index,c=e.oxw(3);return e.KtG(c.onChoicesPaste(l,r))})("input",function(l){const r=e.CHM(t).index,c=e.oxw(3);return e.KtG(c.updateChoice(l,r))})("keydown",function(l){const r=e.CHM(t).index,c=e.oxw(3);return e.KtG(c.handleChoicesKeydown(l,r))})("blur",function(){const a=e.CHM(t).index,r=e.oxw(3);return e.KtG(r.onChoiceBlur(a))}),e.ALo(5,"validateChoice"),e.qZA(),e.TgZ(6,"button",242),e.NdJ("click",function(){const a=e.CHM(t).index,r=e.oxw(3);return e.KtG(r.removeChoice(a))}),e._UZ(7,"i",243),e.qZA()()()}if(2&i){const t=o.$implicit,n=o.index,l=e.oxw(3);e.xp6(1),e.ekj("bg-danger-subtle",e.xi3(2,5,l.duplicatedChoicesIndexes,n)||l.splittedTextAreaType.length>1&&!t),e.xp6(2),e.ekj("text-danger",e.xi3(5,8,l.duplicatedChoicesIndexes,n)||l.splittedTextAreaType.length>1&&!t),e.Q6J("value",t)}}function hl(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"ul",194),e.YNc(1,vl,8,11,"li",235),e.TgZ(2,"li",236)(3,"button",237),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.addChoice())}),e._uU(4," Add a choice "),e._UZ(5,"i",238),e.qZA()()()}if(2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.splittedTextAreaType)("ngForTrackBy",t.trackByIndex)}}function xl(i,o){1&i&&(e.TgZ(0,"span",126),e._UZ(1,"i",127),e._uU(2," Invalid choices. Make sure you remove empty and duplicated ones. "),e.qZA())}function Tl(i,o){if(1&i&&(e.TgZ(0,"div",99)(1,"label",87),e._uU(2,"Reference Data Choices"),e.qZA(),e.TgZ(3,"fieldset",244)(4,"textarea",245),e._uU(5),e.qZA()()()),2&i){const t=e.oxw(2);e.xp6(5),e.Oqu(t.textareaValue)}}function bl(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",246)(1,"button",247),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.copyAllChoices())}),e._uU(2,"Copy all"),e.qZA(),e.TgZ(3,"button",248),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.deleteAllChoices())}),e._uU(4,"Delete all"),e.qZA()()}}function wl(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",76)(1,"label",87),e._uU(2,"Choices automation"),e.qZA(),e.TgZ(3,"fieldset")(4,"select",231),e.NdJ("change",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.onAutomationChange())}),e.TgZ(5,"option",89),e._uU(6,"No automation"),e.qZA(),e.TgZ(7,"option",89),e._uU(8,"Use current team users as choices"),e.qZA(),e.YNc(9,ul,2,2,"option",184),e.qZA()()(),e.TgZ(10,"div",99),e.YNc(11,fl,2,0,"label",232),e.TgZ(12,"fieldset",109),e.YNc(13,hl,6,2,"ul",233),e.qZA(),e.YNc(14,xl,3,0,"span",125),e.qZA(),e.YNc(15,Tl,6,1,"div",138),e.YNc(16,bl,5,0,"div",234)}if(2&i){const t=e.oxw();e.xp6(5),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngValue",t.FieldLogic.TeamCurrent),e.xp6(2),e.Q6J("ngForOf",t.referenceData)("ngForTrackBy",t.trackByIndex),e.xp6(2),e.Q6J("ngIf",!t.isUsersAsChoices&&!t.isReferenceDataAsChoices),e.xp6(1),e.Q6J("disabled",t.isUsersAsChoices),e.xp6(1),e.Q6J("ngIf",!t.isUsersAsChoices&&!t.isReferenceDataAsChoices),e.xp6(1),e.Q6J("ngIf",null==t.fieldForm.controls.typeLogic.errors?null:t.fieldForm.controls.typeLogic.errors.textAreaError),e.xp6(1),e.Q6J("ngIf",t.isReferenceDataAsChoices),e.xp6(1),e.Q6J("ngIf",!t.isReferenceDataAsChoices&&!t.isUsersAsChoices)}}function yl(i,o){1&i&&(e.TgZ(0,"span"),e._uU(1,"Get"),e.qZA())}function Fl(i,o){1&i&&(e.TgZ(0,"span"),e._UZ(1,"i",258),e.qZA())}function Zl(i,o){if(1&i&&(e.TgZ(0,"div")(1,"div",99)(2,"label",87),e._uU(3,"Data Retrieved"),e.qZA(),e.TgZ(4,"textarea",259),e._uU(5),e.qZA()()()),2&i){const t=e.oxw(2);e.xp6(5),e.Oqu(t.currentApiStatus)}}function Al(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"div",99)(2,"label",87),e._uU(3,"URL To Retrieve Data"),e.qZA(),e.TgZ(4,"div",151),e._UZ(5,"input",249),e.TgZ(6,"button",250),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();
1return e.KtG(l.getApiResults(l.fieldForm.value.apiURL,l.fieldForm.value.apiUserName,l.fieldForm.value.apiPassword))}),e.YNc(7,yl,2,0,"span",21),e.YNc(8,Fl,2,0,"span",21),e.qZA()()(),e.YNc(9,Zl,6,1,"div",21),e.qZA(),e.TgZ(10,"div",75)(11,"div",104)(12,"label",87),e._uU(13,"Field Name"),e.qZA(),e.TgZ(14,"select",251)(15,"option",252),e._uU(16,"Option"),e.qZA()()(),e.TgZ(17,"div",104)(18,"label",87),e._uU(19,"User Name"),e.qZA(),e._UZ(20,"input",253),e.qZA(),e.TgZ(21,"div",104)(22,"label",87),e._uU(23,"Password"),e.qZA(),e._UZ(24,"input",254),e.qZA()(),e.TgZ(25,"div",75)(26,"div",104)(27,"label",87),e._uU(28,"Data Store Name"),e.qZA(),e._UZ(29,"input",255),e.qZA(),e.TgZ(30,"div",104)(31,"label",87),e._uU(32,"Variable Name for API"),e.qZA(),e._UZ(33,"input",256),e.qZA(),e.TgZ(34,"div",104)(35,"label",87),e._uU(36,"Object Name"),e.qZA(),e._UZ(37,"input",257),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(6),e.Q6J("disabled","loading"===t.currentApiStatus),e.xp6(1),e.Q6J("ngIf","loading"!==t.currentApiStatus),e.xp6(1),e.Q6J("ngIf","loading"===t.currentApiStatus),e.xp6(1),e.Q6J("ngIf",null!==t.currentApiStatus)}}function Cl(i,o){1&i&&(e.TgZ(0,"div",263),e._uU(1," Can't be activated while the variable name contains a math calculation. "),e.qZA())}function kl(i,o){1&i&&(e.TgZ(0,"div",98)(1,"label",87),e._UZ(2,"i",264),e._uU(3," Starting Value "),e.qZA(),e._UZ(4,"input",265),e.qZA())}function Sl(i,o){if(1&i&&(e.TgZ(0,"div",75)(1,"div")(2,"label",87),e._UZ(3,"i",260),e._uU(4," Next Number Mode "),e.qZA(),e.TgZ(5,"fieldset",109)(6,"select",261)(7,"option",89),e._uU(8,"Active"),e.qZA(),e.TgZ(9,"option",89),e._uU(10,"Deactive"),e.qZA()()(),e.YNc(11,Cl,2,0,"div",262),e.qZA(),e.YNc(12,kl,5,0,"div",122),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.ekj("col-md-6",t.fieldForm.value.isNextNumberActive)("col-md-12",!t.fieldForm.value.isNextNumberActive),e.xp6(4),e.Q6J("disabled",t.isVariableNameMathOperation||t.fieldForm.value.parsedTypeLogic.isHidden),e.xp6(2),e.Q6J("ngValue",!0),e.xp6(2),e.Q6J("ngValue",!1),e.xp6(2),e.Q6J("ngIf",t.isVariableNameMathOperation),e.xp6(1),e.Q6J("ngIf",t.fieldForm.value.isNextNumberActive)}}function Nl(i,o){if(1&i&&(e.TgZ(0,"option",89),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.Q6J("ngValue",t.splittedTypeLogic[2]),e.xp6(1),e.Oqu(t.splittedTypeLogic[2])}}function ql(i,o){if(1&i&&(e.TgZ(0,"label",87),e._uU(1,"Default value"),e.qZA(),e.TgZ(2,"select",143)(3,"option",89),e._uU(4,"None"),e.qZA(),e.TgZ(5,"option",89),e._uU(6),e.qZA(),e.TgZ(7,"option",89),e._uU(8),e.qZA(),e.YNc(9,Nl,2,2,"option",153),e.qZA()),2&i){const t=e.oxw();e.xp6(3),e.Q6J("ngValue",null),e.xp6(2),e.Q6J("ngValue",t.splittedTypeLogic[0]),e.xp6(1),e.Oqu(t.splittedTypeLogic[0]),e.xp6(1),e.Q6J("ngValue",t.splittedTypeLogic[1]),e.xp6(1),e.Oqu(t.splittedTypeLogic[1]),e.xp6(1),e.Q6J("ngIf",t.fieldForm.value.fieldType===t.SectionFieldType.Trilean)}}function Ol(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"label",87),e._uU(1,"Label for True"),e.qZA(),e.TgZ(2,"input",266),e.NdJ("input",function(l){e.CHM(t);const a=e.oxw();return e.KtG(a.onDynamicLabelsChange(l,"typeLogic"))}),e.qZA()}if(2&i){const t=e.oxw();e.xp6(2),e.Q6J("value",t.splittedTypeLogic[0])}}function Ul(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"label",87),e._uU(1,"Label for False"),e.qZA(),e.TgZ(2,"input",267),e.NdJ("input",function(l){e.CHM(t);const a=e.oxw();return e.KtG(a.onDynamicLabelsChange(l,"typeLogic"))}),e.qZA()}if(2&i){const t=e.oxw();e.xp6(2),e.Q6J("value",t.splittedTypeLogic[1])}}function Il(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"label",87),e._uU(1,"Label for Indeterminate"),e.qZA(),e.TgZ(2,"input",268),e.NdJ("input",function(l){e.CHM(t);const a=e.oxw();return e.KtG(a.onDynamicLabelsChange(l,"typeLogic"))}),e.qZA()}if(2&i){const t=e.oxw();e.xp6(2),e.Q6J("value",t.splittedTypeLogic[2])}}function Pl(i,o){1&i&&(e.TgZ(0,"span",275),e._uU(1,"No"),e.qZA())}function Ll(i,o){if(1&i&&(e.TgZ(0,"span",276),e._uU(1),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Oqu(t.fieldForm.value.calculatedFunction)}}function Ml(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",277),e.NdJ("click",function(){const a=e.CHM(t).$implicit,r=e.oxw(2);return e.KtG(r.updateCalculatedFunction(a))}),e._uU(1),e.qZA()}if(2&i){const t=o.$implicit;e.xp6(1),e.Oqu(null===t?"No":t)}}const Jl=function(i,o,t){return[null,i,o,t]};function Dl(i,o){if(1&i&&(e.TgZ(0,"label",87),e._uU(1,"Calculate total"),e.qZA(),e.TgZ(2,"div",269)(3,"button",270),e.YNc(4,Pl,2,0,"span",271),e.YNc(5,Ll,2,1,"span",272),e.qZA(),e.TgZ(6,"div",273),e.YNc(7,Ml,2,1,"button",274),e.qZA()()),2&i){const t=e.oxw();e.xp6(4),e.Q6J("ngIf",!t.fieldForm.value.hasCalculation||!t.fieldForm.value.calculatedFunction),e.xp6(1),e.Q6J("ngIf",t.fieldForm.value.hasCalculation&&t.fieldForm.value.calculatedFunction),e.xp6(2),e.Q6J("ngForOf",e.kEZ(4,Jl,t.CalculatedFunction.Sum,t.CalculatedFunction.Count,t.CalculatedFunction.Average))("ngForTrackBy",t.trackByIndex)}}function El(i,o){if(1&i&&(e.TgZ(0,"option",89),e._uU(1,"RegEx "),e.qZA()),2&i){const t=e.oxw(2);e.Q6J("ngValue",t.ValidationType.Regex)}}function Ql(i,o){if(1&i&&(e.TgZ(0,"option",89),e._uU(1,"Email Adress "),e.qZA()),2&i){const t=e.oxw(2);e.Q6J("ngValue",t.ValidationType.Email)}}function Bl(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"label",87),e._uU(1,"Validation"),e.qZA(),e.TgZ(2,"fieldset",109)(3,"select",278),e.NdJ("change",function(l){e.CHM(t);const a=e.oxw();return e.KtG(a.handleValidationTypeChange(l))}),e.TgZ(4,"option",89),e._uU(5,"Optional"),e.qZA(),e.TgZ(6,"option",89),e._uU(7,"Mandatory"),e.qZA(),e.YNc(8,El,2,1,"option",153),e.YNc(9,Ql,2,1,"option",153),e.ALo(10,"basicValidationEmailOption"),e.qZA()()}if(2&i){const t=e.oxw();e.xp6(2),e.Q6J("disabled",t.sectionForm.value.label===t.SectionFieldType.Invisible||t.isDefaultSelectWithNoOptions),e.xp6(2),e.Q6J("ngValue",t.ValidationType.Optional),e.xp6(2),e.Q6J("ngValue",t.ValidationType.Mandatory),e.xp6(2),e.Q6J("ngIf",t.fieldForm.value.fieldType!==t.SectionFieldType.Boolean&&t.fieldForm.value.fieldType!==t.SectionFieldType.Trilean&&t.fieldForm.value.fieldType!==t.SectionFieldType.DateTime&&t.fieldForm.value.fieldType!==t.SectionFieldType.Barcode),e.xp6(1),e.Q6J("ngIf",e.lcZ(10,5,t.fieldForm.value.fieldType))}}function Yl(i,o){1&i&&(e.ynx(0),e.TgZ(1,"label",87),e._uU(2,"Message to display on validation error"),e.qZA(),e._UZ(3,"input",279),e.BQk())}function Vl(i,o){if(1&i&&e.YNc(0,Yl,4,0,"ng-container",21),2&i){const t=e.oxw();e.Q6J("ngIf",t.fieldForm.value.validationType!==t.ValidationType.Optional&&"0"!==t.fieldForm.value.validationType)}}function Rl(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",285)(1,"button",286),e.NdJ("click",function(){e.CHM(t);const l=e.oxw().index,a=e.oxw(2);return e.KtG(a.removeFieldSecurity(l))}),e._UZ(2,"i",287),e.qZA(),e.TgZ(3,"div",75)(4,"div",98)(5,"label"),e._uU(6,"User Role"),e.qZA(),e.TgZ(7,"select",288)(8,"option",252),e._uU(9,"Select"),e.qZA(),e.TgZ(10,"option",89),e._uU(11),e.qZA(),e.TgZ(12,"option",89),e._uU(13),e.qZA(),e.TgZ(14,"option",89),e._uU(15),e.qZA()()(),e.TgZ(16,"div",98)(17,"label"),e._uU(18,"User Acce
1ss"),e.qZA(),e.TgZ(19,"select",289)(20,"option",290),e._uU(21,"Select"),e.qZA(),e.TgZ(22,"option",291),e._uU(23,"RW"),e.qZA(),e.TgZ(24,"option",292),e._uU(25,"RO"),e.qZA(),e.TgZ(26,"option",293),e._uU(27,"NA"),e.qZA()()()()()}if(2&i){const t=e.oxw().index,n=e.oxw(2);e.Q6J("formGroupName",t),e.xp6(10),e.Q6J("ngValue",n.UserRoles.Admin),e.xp6(1),e.Oqu(n.UserRoles.Admin),e.xp6(1),e.Q6J("ngValue",n.UserRoles.Manager),e.xp6(1),e.Oqu(n.UserRoles.Manager),e.xp6(1),e.Q6J("ngValue",n.UserRoles.Reporter),e.xp6(1),e.Oqu(n.UserRoles.Reporter)}}function Hl(i,o){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,Rl,28,7,"div",284),e.qZA()),2&i){const t=o.$implicit;e.xp6(1),e.Q6J("ngIf",!t.value.isDeleted)}}function Gl(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",280)(1,"div",281),e.YNc(2,Hl,2,1,"div",114),e.ALo(3,"getFormArrayControls"),e.qZA()(),e.TgZ(4,"div",75)(5,"div",99)(6,"button",282),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.addFieldSecurity())}),e._UZ(7,"i",283),e._uU(8),e.ALo(9,"translate"),e.qZA()()()}if(2&i){const t=e.oxw();e.xp6(2),e.Q6J("ngForOf",e.xi3(3,3,t.fieldForm,"fieldSecurity"))("ngForTrackBy",t.trackByItem),e.xp6(6),e.hij(" ",e.lcZ(9,6,"FORM.Add Security Role")," ")}}function $l(i,o){1&i&&(e.TgZ(0,"span",300),e._UZ(1,"i",127),e.TgZ(2,"span"),e._uU(3),e.ALo(4,"translate"),e.qZA()()),2&i&&(e.xp6(3),e.Oqu(e.lcZ(4,1,"FORM.This Variable Name is already in use")))}function jl(i,o){1&i&&(e.TgZ(0,"span",301),e._UZ(1,"i",302),e.TgZ(2,"span"),e._uU(3),e.ALo(4,"translate"),e.qZA()()),2&i&&(e.xp6(3),e.Oqu(e.lcZ(4,1,"FORM.Only numbers, functions & existing Variable Names are allowed")))}function Kl(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"li",307),e.NdJ("click",function(){const a=e.CHM(t).$implicit,r=e.oxw(4);return e.KtG(r.onVariableNameDropdownClick(a))}),e._uU(1),e.qZA()}if(2&i){const t=o.$implicit;e.xp6(1),e.hij(" ",t," ")}}function zl(i,o){if(1&i&&(e.TgZ(0,"div",305),e.YNc(1,Kl,2,1,"li",306),e.qZA()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.variableNames)("ngForTrackBy",t.trackByIndex)}}function Wl(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"li",307),e.NdJ("click",function(){const a=e.CHM(t).$implicit,r=e.oxw(4);return e.KtG(r.onVariableNameDropdownClick(a+"()"))}),e._uU(1),e.qZA()}if(2&i){const t=o.$implicit;e.xp6(1),e.hij(" ",t," ")}}function Xl(i,o){if(1&i&&(e.TgZ(0,"div",305),e.YNc(1,Wl,2,1,"li",306),e.qZA()),2&i){const t=e.oxw(3);e.xp6(1),e.Q6J("ngForOf",t.filteredMathFunctions)("ngForTrackBy",t.trackByIndex)}}function ea(i,o){if(1&i&&(e.TgZ(0,"ul",303),e.YNc(1,zl,2,2,"div",304),e.YNc(2,Xl,2,2,"div",304),e.qZA()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf","variable"===t.variableNameAutocomplete&&t.variableNames.length),e.xp6(1),e.Q6J("ngIf","math"===t.variableNameAutocomplete&&t.filteredMathFunctions.length)}}function ta(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",294),e.NdJ("outsideClick",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.showVariableNameAutocomplete=!1)}),e.TgZ(1,"div",134)(2,"label",295),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"input",296),e.NdJ("input",function(l){e.CHM(t);const a=e.oxw();return e.KtG(a.variableNameChange(l))})("click",function(l){e.CHM(t);const a=e.oxw();return e.KtG(a.updateCursorPosition(l))}),e.ALo(6,"translate"),e.qZA()(),e.YNc(7,$l,5,3,"span",297),e.YNc(8,jl,5,3,"span",298),e.YNc(9,ea,3,2,"ul",299),e.qZA()}if(2&i){const t=e.oxw();e.xp6(3),e.Oqu(e.lcZ(4,7,"FORM.Variable Name")),e.xp6(2),e.ekj("invalid-input",null==t.fieldForm.controls.variableName.errors?null:t.fieldForm.controls.variableName.errors.variableNameInUse),e.s9C("placeholder",e.lcZ(6,9,"FORM.Enter Variable Name")),e.xp6(2),e.Q6J("ngIf",null==t.fieldForm.controls.variableName.errors?null:t.fieldForm.controls.variableName.errors.variableNameInUse),e.xp6(1),e.Q6J("ngIf",t.fieldForm.value.variableNameNotExist),e.xp6(1),e.Q6J("ngIf",t.fieldForm.value.fieldType===t.SectionFieldType.Numeric&&t.showVariableNameAutocomplete)}}function ia(i,o){1&i&&(e.TgZ(0,"label",87),e._uU(1),e.ALo(2,"translate"),e.qZA(),e._UZ(3,"input",308)),2&i&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"FORM.Default value")))}function na(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"label",87),e._uU(1),e.ALo(2,"translate"),e.qZA(),e.TgZ(3,"div",309),e._UZ(4,"input",310),e.TgZ(5,"button",311),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.testApiUrl())}),e._uU(6),e.ALo(7,"translate"),e.qZA()()}
12&i&&(e.xp6(1),e.Oqu(e.lcZ(2,2,"FORM.Device IP Address / URL")),e.xp6(5),e.Oqu(e.lcZ(7,4,"FORM.Test")))}function oa(i,o){1&i&&(e.TgZ(0,"div",75)(1,"div",129)(2,"label",87),e._uU(3),e.ALo(4,"translate"),e.qZA(),e._UZ(5,"input",253),e.qZA(),e.TgZ(6,"div",129)(7,"label",87),e._uU(8),e.ALo(9,"translate"),e.qZA(),e._UZ(10,"input",312),e.ALo(11,"translate"),e.qZA()()),2&i&&(e.xp6(3),e.Oqu(e.lcZ(4,3,"FORM.User Name")),e.xp6(5),e.Oqu(e.lcZ(9,5,"FORM.Password")),e.xp6(2),e.s9C("placeholder",e.lcZ(11,7,"FORM.Enter Password")))}function la(i,o){if(1&i&&(e.TgZ(0,"option",145),e._uU(1),e.qZA()),2&i){const t=o.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function aa(i,o){if(1&i&&(e.ynx(0),e.YNc(1,la,2,2,"option",144),e.BQk()),2&i){const t=e.oxw(5);e.xp6(1),e.Q6J("ngForOf",t.splittedTypeLogic)("ngForTrackBy",t.trackByIndex)}}function ra(i,o){if(1&i&&(e.TgZ(0,"option",145),e.ALo(1,"findItemByKey"),e._uU(2),e.qZA()),2&i){const t=o.$implicit,n=e.oxw(6);let l;e.Q6J("value",n.isReferenceDataAsChoices&&n.currentReferenceData?null==(l=e.Dn7(1,2,n.currentReferenceData.items,n.currentReferenceData.items[0].label?"label":"value",t))?null:l.id:t),e.xp6(2),e.Oqu(t)}}function sa(i,o){if(1&i&&(e.ynx(0),e.YNc(1,ra,3,6,"option",144),e.BQk()),2&i){const t=e.oxw(5);e.xp6(1),e.Q6J("ngForOf",t.splittedTextAreaType)("ngForTrackBy",t.trackByIndex)}}function ca(i,o){if(1&i&&(e.TgZ(0,"option",327),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.Q6J("selected","default"===t.value.triggerType),e.xp6(1),e.Oqu(e.lcZ(2,2,"FORM.Default Comment/Photo"))}}function _a(i,o){1&i&&(e.TgZ(0,"option",328),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"FORM.Create task")))}function da(i,o){if(1&i&&(e.TgZ(0,"option",145),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i){const t=o.$implicit;e.Q6J("value","trigger.table."+(t.fieldName||t.id)),e.xp6(1),e.AsE(" ",e.lcZ(2,3,"FORM.Add row to"),": ",t.label," ")}}function pa(i,o){if(1&i&&(e.ynx(0),e.YNc(1,da,3,5,"option",144),e.BQk()),2&i){const t=e.oxw(6);e.xp6(1),e.Q6J("ngForOf",t.tableSections)("ngForTrackBy",t.trackByIndex)}}function ma(i,o){if(1&i&&(e.TgZ(0,"option",145),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i){const t=o.$implicit;e.Q6J("value",t.label),e.xp6(1),e.AsE("",e.lcZ(2,3,"FORM.Trigger section"),": ",t.label,"")}}function ga(i,o){if(1&i&&(e.TgZ(0,"option",145),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i){const t=o.$implicit;e.Q6J("value","trigger.addchild."+(t.fieldName||t.id)),e.xp6(1),e.AsE("",e.lcZ(2,3,"FORM.Add Child"),": ",t.label,"")}}function ua(i,o){if(1&i&&(e.ynx(0),e.YNc(1,pa,2,2,"ng-container",21),e.YNc(2,ma,3,5,"option",144),e.YNc(3,ga,3,5,"option",144),e.BQk()),2&i){const t=e.oxw(2).$implicit,n=e.oxw(3);e.xp6(1),e.Q6J("ngIf",null===n.triggerTypeTableInUse||n.triggerTypeTableInUse===t.value.triggerType),e.xp6(1),e.Q6J("ngForOf",n.triggerSections)("ngForTrackBy",n.trackByIndex),e.xp6(1),e.Q6J("ngForOf",n.addChildTriggerFields)("ngForTrackBy",n.trackByIndex)}}function fa(i,o){if(1&i&&(e.TgZ(0,"div",75)(1,"div",329),e._UZ(2,"ff-handle-assignees",330),e.ALo(3,"getFormArrayControls"),e.qZA()()),2&i){const t=e.oxw(2).index,n=e.oxw(3);e.xp6(2),e.Q6J("fromPage",n.AssigneesPages.FormBuilder)("users",n.users)("teams",n.teams)("assigneesForm",e.xi3(3,4,n.fieldForm,"fieldTriggers")[t])}}function va(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",318)(1,"a",319),e.NdJ("click",function(){e.CHM(t);const l=e.oxw().index,a=e.oxw(3);return e.KtG(a.removeSmartResponse(l))}),e._UZ(2,"i",287),e.qZA(),e.TgZ(3,"div",320)(4,"div",75)(5,"div",98)(6,"label"),e._uU(7),e.ALo(8,"translate"),e.qZA(),e.TgZ(9,"select",321,322),e.NdJ("change",function(){e.CHM(t);const l=e.oxw().index,a=e.oxw(3);return e.KtG(a.onSmartTriggerSelect(l))}),e.TgZ(11,"option",252),e._uU(12),e.ALo(13,"translate"),e.qZA(),e.YNc(14,aa,2,2,"ng-container",21),e.YNc(15,sa,2,2,"ng-container",21),e.qZA()(),e.TgZ(16,"div",98)(17,"label"),e._uU(18),e.ALo(19,"translate"),e.qZA(),e.TgZ(20,"select",323)(21,"option",252),e._uU(22),e.ALo(23,"translate"),e.qZA(),e.YNc(24,ca,3,4,"option",324),e.ALo(25,"defaultSmartResponseInUse"),e.YNc(26,_a,3,3,"option",325),e.YNc(27,ua,4,5,"ng-container",21),e.qZA()()(),e.YNc(28,fa,4,7,"div",97),e.TgZ(29,"div",75)(30,"div",99)(31,"label",87),e._uU(32),e.qZA(),e._UZ(33,"textarea",326),e.qZA()()()()}if(2&i){const t=e.MAs(10),n=e.oxw(),l=n.index,a=n.$implicit,r=e.oxw(3);
1e.xp6(3),e.Q6J("formGroupName",l),e.xp6(4),e.Oqu(e.lcZ(8,12,"FORM.Trigger Value")),e.xp6(5),e.Oqu(e.lcZ(13,14,"FORM.Choose one")),e.xp6(2),e.Q6J("ngIf",r.fieldForm.value.parsedTypeLogic&&r.fieldForm.value.fieldType===r.SectionFieldType.Boolean||r.fieldForm.value.fieldType===r.SectionFieldType.Trilean),e.xp6(1),e.Q6J("ngIf",r.fieldForm.value.parsedTypeLogic&&r.fieldForm.value.fieldType===r.SectionFieldType.SingleSelect),e.xp6(3),e.Oqu(e.lcZ(19,16,"FORM.Trigger Type")),e.xp6(4),e.Oqu(e.lcZ(23,18,"FORM.Choose one")),e.xp6(2),e.Q6J("ngIf",!e.Dn7(25,20,r.fieldForm.value.fieldTriggers,t.value,l)),e.xp6(2),e.Q6J("ngIf",r.sectionForm.value.fieldType===r.SectionType.Section),e.xp6(1),e.Q6J("ngIf",r.sectionForm.value.fieldType===r.SectionType.Section),e.xp6(1),e.Q6J("ngIf","trigger.task"===a.value.triggerType),e.xp6(4),e.Oqu("trigger.task"===a.value.triggerType?"Default task comments":"Trigger Instructions")}}function ha(i,o){if(1&i&&(e.ynx(0),e.YNc(1,va,34,24,"div",317),e.BQk()),2&i){const t=o.$implicit;e.xp6(1),e.Q6J("ngIf",!t.value.isDeleted)}}function xa(i,o){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",313),e._UZ(2,"i",314),e.TgZ(3,"small"),e._uU(4),e.ALo(5,"translate"),e.qZA()(),e.TgZ(6,"div",315),e.YNc(7,ha,2,1,"ng-container",114),e.ALo(8,"getFormArrayControls"),e.qZA(),e.TgZ(9,"div",99)(10,"button",282),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.addSmartResponse())}),e._UZ(11,"i",316),e._uU(12),e.ALo(13,"translate"),e.qZA()(),e.BQk()}if(2&i){const t=e.oxw(2);e.xp6(4),e.Oqu(e.lcZ(5,4,"FORM.Trigger smart response depending on the answer")),e.xp6(3),e.Q6J("ngForOf",e.xi3(8,6,t.fieldForm,"fieldTriggers"))("ngForTrackBy",t.trackByItem),e.xp6(5),e.hij(" ",e.lcZ(13,9,"FORM.Add Smart Response")," ")}}function Ta(i,o){if(1&i&&e.YNc(0,xa,14,11,"ng-container",21),2&i){const t=e.oxw();e.Q6J("ngIf",t.sectionForm.value.fieldType===t.SectionType.Section||t.sectionForm.value.fieldType===t.SectionType.Trigger)}}let se=class xe{constructor(o,t,n,l,a,r,c){this.formBuilder=o,this.modalService=t,this.http=n,this.fileService=l,this.cdr=a,this.loadFormsService=r,this.dragHandling=c,this.lockedSection=!1,this.deleteField=new e.vpe,this.requiredFieldMessage="This is a required field.",this.sectionFieldVisible=!0,this.SectionFieldType=s.ii,this.DateDefaultValue=U.X3,this.FieldLogic=k.a,this.SectionType=s.bA,this.mathFunctions=Ce,this.currentApiStatus=null,this.autoCompleteLocation="",this.ValidationType=s.xT,this.UserRoles=B.vX,this.DateTimeTypeLogic=s.b3,this.variableNames=[],this.variableNameCursorPosition=0,this.mathFormula="",this.isVariableNameMathOperation=!1,this.filteredMathFunctions=[],this.variableNameAutocomplete=null,this.showVariableNameAutocomplete=!1,this.triggerTypeTableInUse=null,this.workflows$=this.loadFormsService.workflows,this.AssigneesPages=Ue.R,this.CalculatedFunction=s.Ip,this.mapOptions={center:{lat:0,lng:0},zoom:14},this.mapCollapsed=!0,this.summernoteConfig={disableDragAndDrop:!0,spellCheck:!1,focus:!0,codeViewFilter:!0,codeViewIframeFilter:!0,toolbar:[["edit",["undo","redo"]],["fontsize",["fontsize"]],["style",["bold","italic","underline"]],["fontclr",["color"]],["alignment",["ul","ol","paragraph","lineheight"]],["table",["table"]]]},this.tempTypeLogic="",this.textareaValue="",this.duplicatedChoicesIndexes=[],this.isReferenceDataAsChoices=!1,this.isUsersAsChoices=!1,this.hierarchyFieldsUsedInWorkflow=[],this.loadingUsedHierarchyFields=!1}get isCustomDateField(){return Ze.N.isCustomDefaultValue(this.fieldForm?.value?.defaultValue)}get automationFieldControl(){return this.fieldForm.controls.automation}get isDefaultSelectWithNoOptions(){return[s.ii.SingleSelect,s.ii.MultiSelect].includes(this.fieldForm.value.fieldType)&&!this.isUsersAsChoices&&!this.isReferenceDataAsChoices&&1===this.splittedTextAreaType?.length&&""===this.splittedTextAreaType[0]}ngOnInit(){this.fieldForm=this.workflowForm.get("sections").at(this.sectionIndex).get("fields").at(this.fieldIndex),this.sectionForm=this.workflowForm.get("sections").at(this.sectionIndex),this.fieldSecurityArray=this.fieldForm.get("fieldSecurity"),this.fieldTriggersArray=this.fieldForm.get("fieldTriggers"),this.handleHtmlLabelField(),this.handleDuplicatedVarNamesPanel(),this.updateSectionFieldVisibility(),this.updateSplittedValues(),this.handleDateTimeField(),this.handleTaskField(),this.handleMultiSelectField(),this.handleLocationField(),this.handleVariableName(),this.handleNextNumberModeFields(),this.get
1SectionsByType(),this.workflowForm?.get("sections")?.valueChanges.pipe((0,v.b)(()=>this.getSectionsByType()),(0,u.t)(this)).subscribe(),this.handleEmptyDefaultValue(),y.checkVariableNamesExisting(this.workflowForm),this.observeNotExistingVariableNames(),this.handleVariableNameAutocompleteState(""),this.handleAssetField(),this.loadUsedHierarchies(),this.handleHierarchies(),this.handleAddChildField()}ngAfterViewInit(){this.workflowForm.value.duplicatedVariableNameIds?.length&&this.sectionFieldPanel&&this.workflowForm.value.duplicatedVariableNameIds.forEach(o=>this.sectionFieldPanel.expand(o)),this.cdr.detectChanges()}onDragHandlingChange(o){this.dragHandling.isDragging.next(o)}handleAssetField(){if(this.fieldForm.value.fieldType===s.ii.Asset){if(this.fieldForm.value.typeLogic){const o=w.b.splitFieldLogic(this.fieldForm.value.typeLogic);this.fieldForm.patchValue({hierarchyField:"null"!==o[2]?o[2]:null,assetTypeId:"null"!==o[4]?o[4]:null})}this.fieldForm.controls.hierarchyField.valueChanges.pipe((0,v.b)(o=>{this.fieldForm.patchValue({typeLogic:o&&"null"!==this.fieldForm.value.assetTypeId?`${k.a.HierarchyField}${o}${k.a.AssetTypeId}${this.fieldForm.value.assetTypeId}`:null})}),(0,u.t)(this)).subscribe(),this.fieldForm.controls.assetTypeId.valueChanges.pipe((0,v.b)(o=>{this.fieldForm.patchValue({typeLogic:o&&"null"!==this.fieldForm.value.hierarchyField?`${k.a.HierarchyField}${this.fieldForm.value.hierarchyField}${k.a.AssetTypeId}${o}`:null})}),(0,u.t)(this)).subscribe()}}handleHierarchies(){this.fieldForm.value.fieldType===s.ii.Hierarchy&&this.sectionForm.value.fieldType===s.ii.Table&&this.sectionForm.value.parsedTypeLogic?.advanceTable&&this.fieldForm.controls.typeLogic.valueChanges.pipe((0,v.b)(()=>this.section.get("parsedRows").controls.forEach(o=>o.patchValue({...o,[this.fieldForm.value.fieldName]:null}))),(0,u.t)(this)).subscribe()}loadUsedHierarchies(){this.loadingUsedHierarchyFields=!0,this.hierarchyFieldsUsedInWorkflow=[],this.workflowForm.value.sections.forEach(o=>{o.fields.filter(t=>!t.isDeleted&&t.label?.trim()&&t.fieldType===s.ii.Hierarchy).forEach(t=>{this.hierarchyFieldsUsedInWorkflow.some(n=>n.fieldName===t.fieldName)||this.hierarchyFieldsUsedInWorkflow.push(t)})}),this.loadingUsedHierarchyFields=!1}addChoice(){this.splittedTextAreaType.push(""),this.fieldForm.patchValue({splittedTextAreaType:this.splittedTextAreaType,typeLogic:this.splittedTextAreaType.join("\n")}),this.validateTextArea(),this.fieldForm.markAsDirty()}removeChoice(o){this.splittedTextAreaType?.length>1?this.splittedTextAreaType.splice(o,1):1===this.splittedTextAreaType?.length&&(this.splittedTextAreaType=[""]),this.fieldForm.patchValue({splittedTextAreaType:this.splittedTextAreaType,typeLogic:this.splittedTextAreaType.join("\n")}),this.multiSelectItems=this.splittedTextAreaType.map(t=>({id:t})),this.validateTextArea(),this.fieldForm.markAsDirty()}onChoiceBlur(o){!this.splittedTextAreaType[o]?.length&&this.splittedTextAreaType?.length>1&&(this.splittedTextAreaType.splice(o,1),this.fieldForm.patchValue({splittedTextAreaType:this.splittedTextAreaType,typeLogic:this.splittedTextAreaType.join("\n")}),this.fieldForm.markAsDirty())}setCursorOnChoice(o){const t=this.choices.toArray()[o];t&&t.nativeElement.focus()}handleChoicesKeydown(o,t){const n=o?.keyCode;13===n&&this.splittedTextAreaType[t]?.length&&(this.splittedTextAreaType.splice(t+1,0,""),this.fieldForm.patchValue({splittedTextAreaType:this.splittedTextAreaType,typeLogic:this.splittedTextAreaType.join("\n")}),this.fieldForm.markAsDirty(),setTimeout(()=>this.setCursorOnChoice(t+1))),8===n&&this.splittedTextAreaType?.length>1&&!this.splittedTextAreaType[t]?.length&&(this.splittedTextAreaType.splice(t,1),this.fieldForm.patchValue({splittedTextAreaType:this.splittedTextAreaType,typeLogic:this.splittedTextAreaType.join("\n")}),this.setCursorOnChoice(t-1),this.fieldForm.markAsDirty(),o.preventDefault()),this.validateTextArea()}onChoicesPaste(o,t){o.preventDefault();const l=(o.clipboardData||window.clipboardData).getData("text");if(l.includes("\n")){const a=l.split(/\n|\r|\r\n/).map(r=>r.trim()).filter(r=>r);this.splittedTextAreaType.splice(t+1,0,...a),this.fieldForm.patchValue({splittedTextAreaType:this.splittedTextAreaType,typeLogic:this.splittedTextAreaType.join("\n")}),setTimeout(()=>{this.validateTextArea()},10),this.fieldForm.markAsDirty(),setTimeout(()=>this.setCursorOnChoice(t+a.length))}else o.target.value+=l,this.updateChoice(o,t)}updateChoice(o,t){this.splittedTextAreaType[t]=o.target.value,this.fieldForm.patchValue({splittedTextAreaType:this.splittedTextAreaType,typeLogic:this.splittedTextAreaType.join("\n")}),this.multiSelectItems=this.splittedTextAreaType.map(l=>({id:l})),this.validateTextArea(),this.fieldForm.markAsDirty()}copyAllChoices(){navigator.clipboard.writeText(this.fieldForm.controls.typeLogic.value)}deleteAllChoices(){this.fieldForm.controls.typeLogic.setValue(""),this.splittedTextAreaType=[""],this.validateTextArea(),this.fieldForm.markAsDirty()}onAutomationChange(){const o=this.automationFieldControl.value?w.b.getAutomationType(this.automationFieldControl.value):null;o?"team.current"===o?this.onUsersAutomationType():this.onReferenceDataAutomationType():this.onDefaultAutomationType()}onDefaultAutomationType(){this.isUsersAsChoices=!1,this.isReferenceDataAsChoices=!1,this.multiSelectItems=[],this.cdr.detectChanges(),this.fieldForm.patchValue({typeLogic:this.tempTypeLogic,defaultValue:null}),this.splittedTextAreaType=this.tempTypeLogic.split("\n"),this.multiSelectItems=this.tempMultiSelectItems,this.isDefaultSelectWithNoOptions&&this.fieldForm.patchValue({validationType:0})}onUsersAutomationType(){this.isUsersAsChoices=!0,this.tempMultiSelectItems=this.isReferenceDataAsChoices?this.tempMultiSelectItems:this.multiSelectItems,this.isReferenceDataAsChoices=!1,this.fieldForm.patchValue({typeLogic:k.a.TeamCurrent,defaultValue:null}),this.splittedTextAreaType=[""],this.isReferenceDataAsChoices=!1,this.multiSelectItems=[],this.fieldForm.value.fieldType===s.ii.SingleSelect&&this.sectionForm.value.parsedTypeLogic?.advanceTable&&(this.sectionForm.controls.parsedRows.controls.forEac
1h(o=>o.patchValue({...o.value,[this.fieldForm.value.fieldName]:""})),this.sectionForm.value.parsedTypeLogic.isColLocked[this.fieldForm.value.fieldName]=!1)}onReferenceDataAutomationType(){if(this.tempMultiSelectItems=this.isUsersAsChoices||this.isReferenceDataAsChoices?this.tempMultiSelectItems:this.multiSelectItems,this.isUsersAsChoices=!1,this.isReferenceDataAsChoices=!0,this.multiSelectItems=[],this.cdr.detectChanges(),this.currentReferenceData=this.referenceData.find(o=>o.id===w.b.getAutomationData(this.automationFieldControl.value))??null,this.currentReferenceData){const o=this.currentReferenceData?.items.map(t=>t.label??t.value);this.textareaValue=o.join("\n"),this.splittedTextAreaType=o,this.multiSelectItems=this.currentReferenceData.items.map(t=>({...t,name:t.label??t.value}))}this.fieldForm.patchValue({typeLogic:`${k.a.ReferenceDataId}${this.currentReferenceData?.id||""}`,defaultValue:null,parsedTypeLogic:this.splittedTextAreaType})}observeNotExistingVariableNames(){this.fieldForm.get("variableNameNotExist")?.valueChanges.pipe((0,v.b)(o=>o?this.sectionFieldPanel?.expand(this.fieldForm.value.id):null),(0,u.t)(this)).subscribe()}handleDuplicatedVarNamesPanel(){this.workflowForm.get("duplicatedVariableNameIds")?.valueChanges.pipe((0,v.b)(o=>{o.length&&o.forEach(t=>this.sectionFieldPanel?.expand(t))}),(0,u.t)(this)).subscribe()}handleHtmlLabelField(){this.fieldForm?.value.fieldType===s.ii.Label&&(this.fieldForm.addControl("htmlLabel",this.formBuilder.control(this.fieldForm.value.label)),this.extractTextFromLabelHTML(this.fieldForm.get("label")?.value),this.fieldForm.get("htmlLabel")?.valueChanges.pipe((0,v.b)(o=>this.extractTextFromLabelHTML(o)),(0,u.t)(this)).subscribe())}onLabelChange(o){const t=o.target?.value;w.b.isVariableNameField(this.fieldForm?.value.fieldType)&&(this.setVariableNameFormat(t),y.handleDuplicateVariableNames(this.workflowForm),y.checkVariableNamesExisting(this.workflowForm)),this.fieldForm.value.fieldType===s.ii.Hierarchy&&y.validateHierarchyFields(this.workflowForm)}onPanelToggle(){this.fieldForm.value.fieldType===s.ii.Hierarchy&&y.validateHierarchyFields(this.workflowForm)}setVariableNameFormat(o){if(this.fieldForm.value.fieldType!==s.ii.Numeric||this.fieldForm.value.fieldType===s.ii.Numeric&&!w.b.isMathOperation(this.fieldForm.value.variableName)){const t=String(o).replace(/[^A-Z0-9]+/gi,"");let n="";n=-1===t.indexOf("@")?"@"+t.toUpperCase():t.toUpperCase(),this.fieldForm.get("variableName")?.setValue(n)}}extractTextFromLabelHTML(o){const t=this.fieldForm.get("label"),l=o?.replace(/(<([^>]+)>)/gi,"");t&&t.setValue(l)}updateSectionFieldVisibility(){this.sectionFieldVisible=!this.fieldForm.value.parsedTypeLogic.isHidden}toggleSectionFieldVisibility(){this.sectionFieldVisible=!this.sectionFieldVisible,this.fieldForm.patchValue({isNextNumberActive:!this.sectionFieldVisible,typeLogic:JSON.stringify({isHidden:!this.sectionFieldVisible}),parsedTypeLogic:{isHidden:!this.sectionFieldVisible}}),this.workflowForm.markAsDirty()}onDeleteField(){this.deleteField.emit()}updateCalculatedFunction(o){this.fieldForm.patchValue({calculatedFunction:o,hasCalculation:null!==o}),this.fieldForm.markAsDirty()}onTabsWithAiCoachChange(o,t){o.nextId===t&&o.preventDefault()}onSmartTriggerSelect(o){const t=this.fieldForm.value.fieldTriggers.filter(a=>!a.isDeleted),n=t[o],l=t.find((a,r)=>a.trigger===n?.trigger&&r!==o);n&&l&&"default"===n.triggerType&&this.fieldForm.get("fieldTriggers")?.at(o).patchValue({triggerType:"trigger.task"})}handleLocationField(){this.fieldForm?.value.fieldType===s.ii.Location&&(this.fieldForm?.addControl("locationDropdownValue",this.formBuilder.control(null)),this.fieldForm?.get("locationDropdownValue")?.valueChanges.pipe((0,v.b)(o=>{this.fieldForm?.get("defaultValue")?.setValue(o)}),(0,u.t)(this)).subscribe())}handleTaskField(){this.fieldForm.value.fieldType===s.ii.Task&&(this.fieldForm?.addControl("taskWorkflow",this.formBuilder.control(JSON.parse(this.fieldForm.value.typeLogic)?.formName||null)),this.fieldForm?.addControl("taskComment",this.formBuilder.control(JSON.parse(this.fieldForm.value.typeLogic)?.comments||null)),this.fieldForm?.get("taskComment")?.valueChanges.pipe((0,v.b)(o=>this.updateTypeLogic({comments:o})),(0,u.t)(this)).subscribe(),this.fieldForm?.get("taskWorkflow")?.valueChanges.pipe((0,v.b)(o=>this.updateTypeLogic({formId:o?.id||null,formName:o?.formName||null})),(0,u.t)(this)).subscribe())}updateTypeLogic(o){const t={...this.fieldForm.value.parsedTypeLogic,...o};this.fieldForm.patchValue({typeLogic:JSON.stringify(t),parsedTypeLogic:t})}loadWorkflows(){this.loadFormsService.workflows.value.length||this.loadFormsService.loadWorkflows.next(!0)}handleValidationTypeChange(o){const t=o.target.value;t.includes(s.xT.Mandatory.toString())&&this.fieldForm.patchValue({validationMessage:"Required field"}),t.includes(s.xT.Optional.toString())&&this.fieldForm.patchValue({validationMessage:null})}setTriggerTypeTableInUse(){let o=null;this.fieldForm.value.fieldTriggers.filter(t=>
1!t.isDeleted).forEach(t=>{t.triggerType.includes("trigger.table")&&(o=t.triggerType)}),this.triggerTypeTableInUse=o}getSectionsByType(){this.tableSections=this.getTableSectionsByType(s.ii.Table),this.triggerSections=this.getTableSectionsByType(s.ii.TriggerSection),this.addChildTriggerFields=this.getAddChildTriggerFields(),this.setTriggerTypeTableInUse()}handleNextNumberModeFields(){(this.fieldForm?.value.fieldType===s.ii.Numeric||this.fieldForm?.value.fieldType===s.ii.SingleLineText)&&this.fieldForm.patchValue({nextNumberValue:this.fieldForm.value.nextNumberValue||0})}getTableSectionsByType(o){return this.workflowForm.value.sections.filter(t=>t.fieldType===o).map(t=>({fieldName:t.fieldName,label:t.label,id:t.id}))}getAddChildTriggerFields(){const o=[];return this.workflowForm.value.sections.forEach(t=>{t.fields.forEach(n=>{n.fieldType===s.ii.AddChild&&"object"==typeof n.parsedTypeLogic&&null!==n.parsedTypeLogic&&"isTrigger"in n.parsedTypeLogic&&!0===n.parsedTypeLogic.isTrigger&&!n.isDeleted&&o.push({fieldName:n.fieldName||n.id,label:n.label||"Add Child",id:n.id})})}),o}variableNameChange(o=null){const t=this.fieldForm.get("variableName"),n=this.fixVariableNameFormat(t?.value);t?.setValue(n),this.workflowForm.get("duplicatedVariableNameIds")?.valueChanges.pipe((0,v.b)(l=>{l.includes(this.fieldForm.value.id)?(this.fieldForm?.patchValue({variableNameInUse:!0}),t?.setErrors({variableNameInUse:!0})):(this.fieldForm?.patchValue({variableNameInUse:!1}),t?.setErrors(null))}),(0,u.t)(this)).subscribe(),this.handleVariableNameAutocompleteState(n),this.filteredMathFunctions=this.mathFunctions.filter(l=>l.replace(/\./g,"").toLowerCase().includes(this.getCurrentVariableNamePart(n).toLowerCase())),y.handleDuplicateVariableNames(this.workflowForm),this.isVariableNameMathOperation=w.b.isMathOperation(n),this.updateCursorPosition(o,n),y.checkVariableNamesExisting(this.workflowForm),this.cdr.detectChanges()}handleVariableNameAutocompleteState(o){this.variableNameAutocomplete=null,this.getCurrentVariableNamePart(o).includes("@")?this.variableNameAutocomplete="variable":this.checkMathFunctionIncluding(this.getCurrentVariableNamePart(o))&&(this.variableNameAutocomplete="math"),this.showVariableNameAutocomplete=!!this.variableNameAutocomplete}checkMathFunctionIncluding(o){return this.mathFunctions.some(t=>t.replace(/\./g,"").toLocaleLowerCase().includes(o.toLowerCase()))}updateCursorPosition(o,t=""){t||(t=o?.target?.value),this.variableNameCursorPosition=o?.target?.selectionStart||0,this.setDropdownVariableNames(this.getCurrentVariableNamePart(t||this.fieldForm.value.variableName)),this.handleVariableNameAutocompleteState(t||this.fieldForm.value.variableName),this.showVariableNameAutocomplete=!!this.variableNameAutocomplete}isDelimiter(o){return["+","-","*","/","(",")"].includes(o)}getCurrentVariableNamePart(o){let t=this.variableNameCursorPosition,n=this.variableNameCursorPosition;for(;t>0&&!this.isDelimiter(o[t-1]);)t--;for(;n<o.length-1&&!this.isDelimiter(o[n+1]);)n++;return o.substring(t,n+1).replace(/[^0-9a-zA-Z@]/g,"")}setDropdownVariableNames(o){this.variableNames=[],this.workflowForm.value.sections.filter(t=>!t.isDeleted).forEach(t=>{t.fields.forEach(n=>{!n.isDeleted&&n.variableName&&!w.b.isMathOperation(n.variableName)&&n.variableName.includes(o)&&this.variableNames.push(n.variableName)})}),this.variableNames=[...new Set(this.variableNames)]}onVariableNameDropdownClick(o){const t=this.fieldForm.value.variableName;let n=o;if(w.b.isMathOperation(this.fieldForm.value.variableName)){const l=this.getCharFromIndex(),a=this.getCharUntilIndex(l);n=t.slice(0,l)+o+t.slice(a,t.length)}this.fieldForm.patchValue({variableName:n}),y.handleDuplicateVariableNames(this.workflowForm),y.checkVariableNamesExisting(this.workflowForm),this.observeNotExistingVariableNames(),this.variableNameAutocomplete=null}getCharFromIndex(){for(let t=this.mathFormula.slice(0,this.variableNameCursorPosition).length;t>=0;--t){const n=this.mathFormula.slice(t-1,t);if(/[\(\)*+/-]+/.test(n))return t}return 0}getCharUntilIndex(o){if(this.variableNameCursorPosition<=this.mathFormula.length)for(let t=o+1;t<this.mathFormula.length;t++){const n=this.mathFormula.substr(t,1);if(/[\(\)*+/-]+/.test(n))return t}return this.mathFormula.length}isVariableName(o){const t=JSON.stringify(Ce).toUpperCase();return-1===o.indexOf("@")&&t.indexOf(o.toUpperCase())<0&&!/[,"]+/.test(String(o))}fixVariableNameFormat(o){let t="",n=o;const l=this.fieldForm.value.fieldType;if(l===s.ii.Numeric){if(t=o.replace(/[^A-Z0-9+\-\/*()@.]+/gi,""),w.b.isMathOperation(o)){const a=t.split(/[\(\)*+/-]+/);a.length>0&&(t=this.processMathOperation(a,t))}else t=this.isVariableName(t)?"@"+t.toUpperCase():t.toUpperCase();n=t,this.mathFormula=t}else l===s.ii.DateTime&&(t=o.replace(/[^A-Z0-9@]+/gi,"").toUpperCase(),(!t.startsWith("@")||t.split("@").length>2)&&(t=o.replace(/[@]+/gi,""),t="@"+t.toUpperCase()),"@"===t&&(t=""),n=t);return n}processMathOperation(o,t){let n=t;for(const l of o)""!==l&&l.startsWith("@")&&(n=n.replace(new RegExp(l),l.toUpperCase()));return n}triggerChat(){window.Intercom("show")}handleEmptyDefaultValue(){const o=this.fieldForm?.get("defaultValue");this.fieldForm&&""===o?.value&&o?.setValue(null)}getVariableNameFormat(o){return"@"+o.replace(/[^a-zA-Z0-9@]/g,"").toUpperCase()}handleVariableName(){if(w.b.isVariableNameField(this.fieldForm?.value.fieldType)){const o=this.fieldForm.get("label")?.value;let t=this.fieldForm.get("variableName")?.value;t||(this.fieldForm.patchValue({variableName:this.getVariableNameFormat(o)}),t=this.getVariableNameFormat(o)),t.slice(t.indexOf("@")+1).length<=0&&this.fieldForm.get("variableName")?.setValue(this.getVariableNameFormat(o)),this.variableNameChange()}}addSmartResponse(){const o=this.fieldForm.value.fieldType===s.ii.SingleSelect?this.splittedTextAreaType[0]:this.splittedTypeLogic[0],t=this.fieldForm.value.fieldTriggers?.filter(l=>!l.isDeleted&&"default"===l.triggerType&&l.trigger===o);this.fieldTriggersArray.push(this.formBuilder.group({assignees:"",isDeleted:!1,trigger:o,triggerMessage:"",triggerType:t?.length?"trigger.task":"default",parsedAssignees:{teams:[],users:[]}})),this.cdr.detectChanges(),this.fieldForm.markAsDirty()}removeSmartResponse(o){this.fieldTriggersArray.at(o).patchValue({isDeleted:!0}
1),this.fieldForm.markAsDirty()}addFile(){this.fileInput.nativeElement.click()}removeFile(o){this.fieldForm.get("typeLogic")?.setValue(this.splittedTypeLogic.filter((t,n)=>n!==o).join("|")),this.fieldForm.value.typeLogic.length?this.updateSplittedValues():this.splittedTypeLogic=[],this.typeLogicBackup=this.fieldForm.value.typeLogic,this.workflowForm.markAsDirty()}onFileSelect(o){this.filesUploadingStatus=null;const t=this.fieldForm?.value,n=o.target.files;let l=!0;if(n){const a=Array.from(n);for(const r of a){if(r&&"video/mp4"===r.type&&r.size>501e5){this.filesUploadingStatus="MP4 files must be less than 50MB.",l=!1;break}if(!r||r&&"video/mp4"!==r.type&&r.size>51e5){this.filesUploadingStatus="Non-video file sizes must be less than 5MB.",l=!1;break}}}else l=!1;if(l){this.filesUploading=!0;const a=new FormData;this.uploadProgress=0;for(const r of Array.from(n)){const c=Array.from(n).length;a.append("file",r,r.name),this.fileService.uploadFile$(a).pipe((0,v.b)(_=>{if(_.type===D.dt.UploadProgress&&_.total&&(this.uploadProgress+=Math.round(100*_.loaded/_.total)/c),_.type===D.dt.Response&&_.body){const h=_.body;this.typeLogicBackup=t.typeLogic,this.filesUploading=!1,this.splittedTypeLogic.push(h.uploadedFile),this.fieldForm.get("typeLogic")?.setValue(this.splittedTypeLogic.join("|"))}this.workflowForm.markAsDirty()}),(0,u.t)(this)).subscribe()}}}attachOrUpload(o){const t=this.fieldForm?.value;this.splittedTypeLogic=[],"upload"!==t.typeLogic&&1===o?this.fieldForm.get("typeLogic")?.setValue("upload"):"upload"===t.typeLogic&&2===o&&(this.fieldForm.get("typeLogic")?.setValue(this.typeLogicBackup||null),this.typeLogicBackup&&this.typeLogicBackup.indexOf("|")>-1?this.splittedTypeLogic=this.typeLogicBackup.split("|"):this.typeLogicBackup&&this.splittedTypeLogic.push(this.typeLogicBackup)),this.workflowForm.markAsDirty()}handleDateTimeField(){if(this.fieldForm.value.fieldType===s.ii.DateTime&&(this.fieldForm.addControl("hourFormat",this.formBuilder.control(this.fieldForm.value.typeLogic===s.b3.DateTime24h||this.fieldForm.value.typeLogic===s.b3.TimeOnly24h)),this.isCustomDateField)){const o=ie.E.getDateObject(this.fieldForm.value.defaultValue);if(o){const{day:t,month:n,year:l,hour:a,minute:r}=o;this.fieldForm.patchValue({date:{day:t,month:n,year:l,hour:a,minute:r},time:{hour:a,minute:r},defaultValue:U.X3.Custom})}}this.fieldForm.get("hourFormat")?.valueChanges.pipe((0,v.b)(o=>this.dateTimeFormat(o)),(0,u.t)(this)).subscribe()}dateTimeFormat(o){const t=this.fieldForm?.get("typeLogic"),n=this.fieldForm?.value.typeLogic;n===s.b3.DateOnly&&(o=!1),o?(n===s.b3.DateTime&&t?.setValue(s.b3.DateTime24h),n===s.b3.TimeOnly&&t?.setValue(s.b3.TimeOnly24h)):(n===s.b3.TimeOnly24h&&t?.setValue(s.b3.TimeOnly),n===s.b3.DateTime24h&&t?.setValue(s.b3.DateTime))}handleMultiSelectField(){if(this.fieldForm.value.fieldType===s.ii.MultiSelect||this.fieldForm.value.fieldType===s.ii.SingleSelect){if(this.splittedTextAreaType=this.fieldForm.value.typeLogic?.split(/\n|\r|\r\n/),this.multiSelectItems=this.splittedTextAreaType.map(o=>({id:o})),this.tempMultiSelectItems=this.multiSelectItems,this.selectedMultiSelectItems=this.fieldForm.value.defaultValue?.split("|").join(","),this.tempTypeLogic="",this.fieldForm.value.typeLogic.includes(k.a.TeamCurrent))this.isUsersAsChoices=!0,this.automationFieldControl.setValue(this.fieldForm.value.typeLogic);else if(this.fieldForm.value.typeLogic.includes(k.a.ReferenceDataId)){if(this.isReferenceDataAsChoices=!0,this.automationFieldControl.setValue(this.fieldForm.value.typeLogic),this.currentReferenceData=this.referenceData.find(o=>o.id===w.b.getAutomationData(this.automationFieldControl.value))??null,this.currentReferenceData){const o=this.currentReferenceData?.items.map(t=>t.label??t.value);this.textareaValue=o.join("\n"),this.splittedTextAreaType=o,this.multiSelectItems=this.currentReferenceData.items.map(t=>({...t,name:t.label??t.value}))}}else this.tempTypeLogic=this.fieldForm.value.typeLogic,this.splittedTextAreaType=this.tempTypeLogic.split("\n");this.fieldForm.get("multiSelectDefaultValues")?.valueChanges.pipe((0,v.b)(o=>{const t=o.map(n=>n.id).join("|");this.fieldForm.get("defaultValue")?.setValue(t)}),(0,u.t)(this)).subscribe(),this.cdr.markForCheck()}}getApiResults(o,t,n){this.currentApiStatus="loading";const l=(new D.WM).set("Authorization","Bearer "+btoa(encodeURIComponent(t+":"+n)));this.http.get(o,{headers:l,responseType:"text"}).pipe((0,v.b)(a=>{this.currentApiStatus=a}),(0,I.K)(()=>this.currentApiStatus="Error"),(0,u.t)(this)).subscribe()}validateTextArea(){const o=this.splittedTextAreaType.filter((n,l)=>this.splittedTextAreaType.indexOf(n)!==l),t=this.splittedTextAreaType.filter(n=>!n);(o.length||t.length&&this.splittedTextAreaType.filter(n=>n.trim()).length)&&this.fieldForm.get("typeLogic")?.setErrors({textAreaError:!0}),this.setDuplicatedChoicesIndexes(o),this.updateSplittedValues(),this.fieldForm.patchValue({parsedTypeLogic:this.splittedTextAreaType}),this.isDefaultSelectWithNoOptions&&this.fieldForm.patchValue({validationType:0})}setDuplicatedChoicesIndexes(o){this.duplicatedChoicesIndexes=[],this.splittedTextAreaType.forEach((t,n)=>o.includes(t)?this.duplicatedChoicesIndexes.push(n):null)}updateSplittedValues(){this.splittedTypeLogic=this.fieldForm.value.typeLogic?this.fieldForm.value.typeLogic.split("|"):[],this.splittedTriggerMessage=this.fieldForm.value.triggerMessage?.split("|")||[],this.splittedTextAreaType=this.fieldForm.value.typeLogic?.split(/\n|\r|\r\n/),this.splittedApiObjectName=this.fieldForm.value.a
1piObjectName?.split("|"),this.tempTypeLogic=this.fieldForm.value.typeLogic}onDynamicLabelsChange(o,t){const n=o.target.name,l=o.target.value;if("apiObjectName"===t){this.splittedApiObjectName[+n]=l;const a=this.splittedApiObjectName.join("|");this.fieldForm.get("apiObjectName")?.setValue(a)}if("triggerMessage"===t){this.splittedTriggerMessage[+n]=l;const a=this.splittedTriggerMessage.join("|");this.fieldForm.get("triggerMessage")?.setValue(a)}if("typeLogic"===t){"monetary"!==n&&(this.splittedTypeLogic[+n]=l);const a=this.fieldForm.get("isMonetary")?.value;null!==a&&this.fieldForm.value.fieldType===s.ii.Numeric&&(this.splittedTypeLogic[4]=a?"false":"true");const r=this.splittedTypeLogic.join("|");this.fieldForm.patchValue({typeLogic:r,parsedTypeLogic:r})}this.fieldForm.markAsDirty()}triggerLabelChange(o,t){const n=o.target.value,l=this.fieldForm.get(t);l?.setValue((l?.value??"")+n),this.fieldForm.markAsDirty()}handleSummernoteContentChange(o){this.fieldForm.get("htmlLabel")?.setValue(o),this.fieldForm.markAsDirty()}testApiUrl(){const o=this.fieldForm.get("apiURL")?.value,t=this.modalService.open(q._8);t.componentInstance.options={modalText:"Loading",modalHeader:'<i class="fas fa-sync-alt fa-3x"></i>'},this.http.get(o,{responseType:"text"}).pipe((0,v.b)(n=>{t.componentInstance.options={modalText:`<textarea class="w-100">${n}</textarea>`,modalHeader:'<i class="fa fa-check fa-3x"></i>',confirmationLabel:"Close"}}),(0,I.K)(n=>(t.componentInstance.options={modalText:"error",modalHeader:'<i class="fa fa-exclamation-triangle fa-3x"></i>'},(0,ee.of)(n))),(0,u.t)(this)).subscribe()}addFieldSecurity(){this.fieldSecurityArray.value.filter(t=>!t.isDeleted).length>=3||(this.fieldSecurityArray.push(this.formBuilder.group({isDeleted:!1,userRole:"",userAccess:""})),this.fieldForm.markAsDirty())}removeFieldSecurity(o){const t=this.fieldSecurityArray.at(o);t.value.id?t.patchValue({isDeleted:!0}):this.fieldSecurityArray.removeAt(o),this.fieldForm.markAsDirty(),this.cdr.detectChanges()}openAiModal(){this.modalService.open(q.W9,{size:"lg",centered:!0}).componentInstance.triggerLocation="builder"}trackByItem(o,t){return t}trackByFieldTrigger(o,t){return t.id}trackByIndex(o){return o}handleAddChildField(){if(this.fieldForm.value.fieldType===s.ii.AddChild){let o;try{o=JSON.parse(this.fieldForm.value.typeLogic||"{}")}catch{o={formId:null,formName:null,comments:"",isTrigger:!1}}this.fieldForm.patchValue({parsedTypeLogic:o}),this.fieldForm?.addControl("addChildWorkflow",this.formBuilder.control(o?.formName||null)),this.fieldForm?.addControl("addChildComment",this.formBuilder.control(o?.comments||"")),this.fieldForm?.addControl("addChildIsTrigger",this.formBuilder.control(o?.isTrigger||!1)),this.fieldForm?.get("addChildComment")?.valueChanges.pipe((0,v.b)(t=>this.updateTypeLogic({comments:t})),(0,u.t)(this)).subscribe(),this.fieldForm?.get("addChildWorkflow")?.valueChanges.pipe((0,v.b)(t=>this.updateTypeLogic({formId:t?.id||null,formName:t?.formName||null})),(0,u.t)(this)).subscribe(),this.fieldForm?.get("addChildIsTrigger")?.valueChanges.pipe((0,v.b)(t=>this.updateTypeLogic({isTrigger:t})),(0,u.t)(this)).subscribe()}}copyToClipboard(o){navigator.clipboard.writeText(o)}static#e=this.\u0275fac=function(t){return new(t||xe)(e.Y36(m.qu),e.Y36(p.FF),e.Y36(D.eN),e.Y36(yt.n),e.Y36(e.sBO),e.Y36(ae),e.Y36($))};static#t=this.\u0275cmp=e.Xpm({type:xe,selectors:[["ff-field-element"]],viewQuery:function(t,n){if(1&t&&(e.Gf(qt,5),e.Gf(Ot,5),e.Gf(Ut,5),e.Gf(It,5)),2&t){let l;e.iGM(l=e.CRH())&&(n.sectionFieldPanel=l.first),e.iGM(l=e.CRH())&&(n.fileInput=l.first),e.iGM(l=e.CRH())&&(n.autoCompleteRef=l.first),e.iGM(l=e.CRH())&&(n.choices=l)}},inputs:{field:"field",section:"section",lastField:"lastField",lockedSection:"lockedSection",workflowForm:"workflowForm",sectionIndex:"sectionIndex",fieldIndex:"fieldIndex",users:"users",teams:"teams",referenceData:"referenceData",hierarchies:"hierarchies",assetTypes:"assetTypes",currentAssigneesDropdownId:"currentAssigneesDropdownId"},outputs:{deleteField:"deleteField"},decls:33,vars:17,consts:[["data-cy","sectionFieldElement",3,"formGroup",4,"ngIf"],[3,"formGroup"],["enterChoices",""],["multiSelectAdvanced",""],["nextNumber",""],["booleanSelect",""],["booleanTrueLabel",""],["booleanFalseL
1abel",""],["booleanIndeterminateLabel",""],["calculateColumnTotal",""],["basicValidationSelect",""],["basicValidationMessage",""],["securityBeta",""],["variableName",""],["defaultTriggerValue",""],["iotApiUrl",""],["iotAdvancedTab",""],["triggerSmartResponse",""],["data-cy","sectionFieldElement",3,"formGroup"],["sectionFieldPanel","ngbAccordion"],[3,"id"],[4,"ngIf"],["ngbPanelContent",""],["ngbPanelHeader",""],["cdkDrag","",1,"d-flex","px-2","py-1","align-items-center","justify-content-between","element",3,"cdkDragData","cdkDragStarted","cdkDragDropped"],[1,"d-flex","w-100"],["cdkDragHandle","",1,"d-flex","justify-content-between","align-items-center"],[1,"d-flex","flex-row","ms-1","me-2"],[1,"fa","fa-ellipsis-v","fa-lg","opacity-25"],[1,"d-flex","flex-column","align-items-center","w-100"],[1,"input-group","d-flex","align-items-center","h-100","w-100"],["triggers","click","tooltipClass","xs-tooltip disolve-tooltip","ngbTooltip","fieldName copied!",1,"fa","opacity-25",3,"closeDelay","ngClass","click"],[1,"flex-grow-1",3,"disabled"],["formControlName","label","data-cy","fieldName","type","text","placeholder","Enter Label for the field",1,"element","lh-1","form-control","w-100",3,"required","input"],["class","bg-danger m-0 lh-1 w-100 error-span",4,"ngIf"],[1,"list-unstyled","d-flex","flex-row"],["type","button","data-cy","deleteField",1,"action","btn","btn-outline-danger","btn-sm","lh-1","py-2",3,"click"],[1,"far","fa-trash-alt","fa-lg"],["ngbPanelToggle","","type","button","class","action btn btn-outline-secondary btn-sm lh-1 py-2",3,"click",4,"ngIf","ngIfElse"],["type","button","class","action btn btn-outline-secondary btn-sm lh-1 py-2",4,"ngIf"],["disableToggle",""],[1,"bg-danger","m-0","lh-1","w-100","error-span"],[1,"fa","fa-exclamation-triangle","text-light","pe-1"],[1,"text-light"],["ngbPanelToggle","","type","button",1,"action","btn","btn-outline-secondary","btn-sm","lh-1","py-2",3,"click"],[1,"fa","fa-lg"],["type","button",1,"action","btn","btn-outline-secondary","btn-sm","lh-1","py-2"],["type","button","class","action btn btn-light text-dark opacity-25 btn-sm lh-1 py-2","disabled","",4,"ngIf"],["type","button","disabled","",1,"action","btn","btn-light","text-dark","opacity-25","btn-sm","lh-1","py-2"],[1,"fa","fa-lg","fa-angle-down"],[1,"d-flex","px-2","py-1","justify-content-between","align-items-center"],[1,"mx-2","d-flex","flex-row","align-items-center"],["ngbTooltip","This item should remain in this position","tooltipClass","text-white",1,"fa","fa-lock","opacity-25",3,"disableTooltip"],[1,"d-flex","justify-content-between","align-items-center","flex-grow-1"],[1,"input-group","d-flex","align-items-center"],["formControlName","label","type","text","placeholder","Enter Label for the field",1,"element","lh-1","form-control","w-100",3,"required"],["class","bg-danger m-0 w-100 error-span",4,"ngIf"],[1,"list-unstyled","d-flex","flex-row","align-items-center"],["type","button","class","action btn btn-outline-danger btn-sm lh-1 py-2",3,"hidden","click",4,"ngIf"],["type","button","class","action btn btn-outline-secondary btn-sm fs-12 lh-1 py-2",3,"hidenField","click",4,"ngIf"],["ngbPanelToggle","","type","button",1,"action","btn","btn-outline-secondary","btn-sm","lh-1","py-2"],[1,"bg-danger","m-0","w-100","error-span"],[1,"fa","fa-exclamation-triangle","text-light"],["type","button",1,"action","btn","btn-outline-danger","btn-sm","lh-1","py-2",3,"hidden","click"],["type","button",1,"action","btn","btn-outline-secondary","btn-sm","fs-12","lh-1","py-2",3,"click"],[3,"ngSwitch"],["class","px-4 pb-4 pt-0",4,"ngSwitchCase"],["class","",4,"ngSwitchCase"],["class","p-4",4,"ngSwitchCase"],[4,"ngSwitchCase"],["class","pt-0",4,"ngSwitchCase"],["class","px-4 pb-4 pt-2",4,"ngSwitchCase"],["class","px-4 pt-2",3,"pb-3","pb-4",4,"ngSwitchCase"],["class","px-4 pb-4 pt-3",4,"ngSwitchCase"],[1,"px-4","pb-4","pt-0"],[1,"row"],[1,"col-12"],[4,"ngTemplateOutlet"],[1,""],["ngbNav","",1,"nav-tabs","pt-2","bg-light"],["locationTabs","ngbNav"],[3,"ngbNavItem"],["ngbNavLink","",1,"py-2","px-3","lh-base","text-decoration-none"],["ngbNavContent",""],[1,"badge","bg-danger","py-1","px-2","lh-1","rounded-pill"],[1,"px-4","pb-4","pt-1",3,"ngbNavOutlet"],["class","col-md-8",4,"ngIf"],[1,"mt-3"],["formControlName","locationDropdownValue",1,"form-select"],[3,"ngValue"],[3,"ngValue","selected"],[3,"value","selected"],[1,"col-md-8"],[3,"fieldForm"],[1,"p-4"],[3,"ngxSummernoteView","ngxSummernote","summernoteModelChange"],["singleLineTabs","ngbNav"],["class","row",4,"ngIf"],[1,"col-md-6"],[1,"col-md-12"],["multiLineTabs","ngbNav"],["booleanTabs","ngbNav"],[3,"ngbNavItem",4,"ngIf"],["trileanTabs","ngbNav"],[1,"col-md-4"],["ngbNav","",1,"nav-tabs","pt-2","bg-light",3,"navChange"],["numericTabs","ngbNav"],["ngbNavLink","",1,"nav-link","py-2","px-3","lh-base",3,"click"],[1,"col-6"],[3,"disabled"],["for","isMonetary",1,"mt-3"],[1,"form-check","form-switch","mt-1"],["type","checkbox","formControlName","isMonetary","id","isMonetary","name","monetary",1,"form-check-input",3,"click"],["class","col-md-3",4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"col-12",3,"ngClass"],["class","col-md-4",4,"ngIf"],[1,"col-md-3"],["class","fa fa-question-circle text-info me-1","ngbTooltip","For example enter 0.25 to represent 25% of deviation tolerance",4,"ngIf"],["type","number","min","0","placeholder","Decimal as a %",1,"form-control",3,"name","value","input"],["ngbTooltip","For example enter 0.25 to represent 25% of deviation tolerance",1,"fa","fa-question-circle","text-info","me-1"],["type","text","placeholder","Enter instrucions",1,"form-control",3,"name","value","input"],["class","col-md-6",4,"ngIf"],["IotDeviceCmdTabs","ngbNav"],["placeholder","Commands","formControlName","typeLogic",1,"form-control",3,"required","input"],["class","text-danger error-span fs-13 lh-sm",4,"ngIf"],[1,"text-danger","error-span","fs-13","lh-sm"],[1,"fa","fa-exclamation-triangle"],["IotDeviceChartTabs","ngbNav"],[1,"col-md"],["type","text","placeholder","Enter Line Label",1,"form-control",3,"value","input"],["type","text","placeholder","Enter X Axis Label",1,"form-control",3,"value","input"],["type","text","placeholder","Enter Y Axis
1Label",1,"form-control",3,"value","input"],["IotDeviceDataPointTabs","ngbNav"],[1,"form-group"],["class","fa fa-question-circle text-info","ngbTooltip","For example enter 0.25 to represent 25% of deviation tolerance",4,"ngIf"],["type","number","min","0",1,"form-control",3,"name","value","input"],["ngbTooltip","For example enter 0.25 to represent 25% of deviation tolerance",1,"fa","fa-question-circle","text-info"],["class","col-md-12",4,"ngIf"],["type","text",1,"form-control",3,"name","value","input"],[1,"pt-0"],["ngbNav","",1,"nav-tabs"],["singleSelectTabs","ngbNav"],["formControlName","defaultValue",1,"form-select"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],["multiSelectTabs","ngbNav"],["formControlName","multiSelectDefaultValues",3,"searchName","searchEnabled","items","selectedFilterItems"],["element",""],["dateTimeTabs","ngbNav"],[1,"px-4","pb-4","pt-1","rounded-bottom",3,"ngbNavOutlet"],[1,"input-group"],["formControlName","typeLogic",1,"form-select",3,"change"],[3,"ngValue",4,"ngIf"],[1,"col-8",3,"hidden"],["class","col-12 col-lg-8",4,"ngIf"],["type","checkbox","formControlName","hourFormat","autocomplete","off",1,"btn-check",3,"id","checked"],[1,"btn","btn-outline-secondary",3,"for"],[1,"col-12","col-lg-8"],[1,"mt-3","opacity-0"],[1,"",3,"ngSwitch"],["class","flex-grow-1",4,"ngSwitchCase"],["class","flex-grow-1",4,"ngIf"],[1,"flex-grow-1"],[1,"d-flex","flex-row","gap-2"],["class","datetime",4,"ngSwitchCase"],[1,"d-flex","flex-row"],["formControlName","date","placeholder","Enter date"],[1,"datetime"],["formControlName","time",3,"meridian","spinners"],[1,"px-4","pb-4","pt-2"],["formControlName","taskWorkflow","searchName","formName","resetOptionText","No",3,"withReset","items","placeholder","showSpinner","searchPlaceholder","click"],["rows","3","placeholder","Default task comments","formControlName","taskComment",1,"form-control"],["class","input-group-btn",4,"ngIf"],[1,"input-group-btn"],[1,"form-select",3,"change"],[1,"px-4","pt-2"],["formControlName","addChildWorkflow","searchName","formName","resetOptionText","",3,"withReset","items","placeholder","showSpinner","searchPlaceholder","click"],["rows","3","placeholder","Default child comments","formControlName","addChildComment",1,"form-control"],[1,"form-check","mt-3",3,"hidden"],["type","checkbox","id","addChildIsTrigger","formControlName","addChildIsTrigger",1,"form-check-input"],["for","addChildIsTrigger",1,"form-check-label"],["type","url","placeholder","Image Url","formControlName","typeLogic",1,"form-control"],["formControlName","typeLogic",1,"form-select"],[3,"ngValue",4,"ngFor","ngForOf","ngForTrackBy"],["type","url","placeholder","Website Url","formControlName","typeLogic",1,"form-control"],[1,"col-md-12","col-lg-4"],["formControlName","hierarchyField",1,"form-select",3,"click"],["class","spinner-border","role","status",4,"ngIf"],["formControlName","assetTypeId",1,"form-select"],["role","status",1,"spinner-border"],[1,"visually-hidden"],[1,"px-4","pb-4","pt-3"],["multiple","","type","file","accept",".doc,.docx,.xls,.xlsx,.pdf,.ppt,.pptx,.rtf,image/*,.dwg,.dwf,video/mp4","class","btn btn-default inputfile hide",3,"name","id","change",4,"ngIf"],[1,"list-group"],["type","button",1,"list-group-item","list-group-item-action","text-start","d-flex","align-items-center","p-2",3,"click"],[1,"me-2","badge","rounded-circle",3,"ngClass"],["class","fa fa-check pe-1 text-primary-darker",4,"ngIf"],["class","list-group-item d-flex align-items-center p-2",4,"ngIf"],[1,"py-2","fw-semibold","text-center"],["class","list-group-item d-flex align-items-center py-2 px-3",4,"ngIf"],["class","list-group-item p-2",4,"ngIf"],["class","list-group-item list-group-item-action text-start d-flex align-items-center p-2",3,"click",4,"ngIf"],["class","d-block pt-2",4,"ngIf"],["multiple","","type","file","accept",".doc,.docx,.xls,.xlsx,.pdf,.ppt,.pptx,.rtf,image/*,.dwg,.dwf,video/mp4",1,"btn","btn-default","inputfile","hide",3,"name","id","change"],["fileInput",""],[1,"fa","fa-check","pe-1","text-primary-darker"],[1,"list-group-item","d-flex","align-items-center","p-2"],[1,"fa","fa-cloud-upload-alt","type","text-primary-hover"],[1,"list-group-item","d-flex","align-items-center","py-2","px-3"],[1,"fa","fa-file","type","text-secondary","pe-2"],["class","list-group-item d-flex align-items-center p-2",4,"ngFor","ngForOf","ngForTrackBy"],["class","far type text-primary-hover pe-2",3,"ngClass",4,"ngIf"],[1,"flex-grow-1","text-nowrap","d-inline-block","text-truncate"],["ngbDropdown","",1,"btn-group"],["fileDropdown","ngbDropdown"],["ngbDropdownToggle","","type","button",1,"btn","btn-outline-danger","btn-sm","ms-1","hide-arrow","lh-1"],[1,"fa","fa-times"],["ngbDropdownMenu","",1,"pb-0","overflow-hidden"],[1,"p-2","d-block","text-center"],["type","button",1,"flex-grow-1","btn","btn-sm","btn-light","rounded-0",3,"click"],[1,"text-dark"],["type","button",1,"flex-grow-1","btn","btn-sm","btn-danger","rounded-0",3,"click"],[1,"far","type","text-primary-hover","pe-2",3,"ngClass"],[1,"list-group-item","p-2"],["type","primary",3,"value","striped","animated"],[1,"text-danger","fs-14"],[1,"list-group-item","list-group-item-action","text-start","d-flex","align-items-center","p-2",3,"click"],[1,"fa","fa-plus","pe-1","text-primary-hover"],[1,"d-block","pt-2"],["type","button",1,"btn","btn-link","border-0","m-0","p-0",3,"click"],["formControlName","automation",1,"form-select",3,"change"],["class","mt-3",4,"ngIf"],["class","list-group",4,"ngIf"],["class","btn-group btn-group-sm","role","group",4,"ngIf"],["class","list-group-item p-0",4,"ngFor","ngForOf","ngForTrackBy"],[1,"list-group-item","p-0"],["type","button",1,"btn","btn-light","text-primary","w-100","text-start","position-relative","fs-13","rounded-0","rounded-bottom","fw-bold",3,"click"],[1,"fa-solid","fa-plus","fa-lg","position-absolute","top-0","end-0","p-2","lh-1","me-1"],[1,"position-relative"],["placeholder","Type a choice or paste your choices here",1,"form-control","border-0","pe-4","bg-transparent",3,"value","paste","input","keydown","blur"],["choice",""],["type","button",1,"btn","btn-outline-danger","border-0","position-absolute","top-50","end-0","lh-1","py-1","px-2","translate-middle-y","me-1",3,"click"],[1,"fas","fa-times"],["disabled",""],[1,"form-control"],["role","group",1,"btn-group","btn-group-sm"],[1,"btn","btn-outline-secondary","btn-sm","text-nowrap","py-0","fs-12",3,"click"],[1,"btn","btn-outline-danger","btn-sm","text-nowrap","py-0","fs-12",3,"click"],["type","text","placeholder","Enter Api Url","formControlName","apiURL",1,"form-control"],[1,"btn","btn-primary",3,"disabled","click"],["formControlName","fieldName",1,"form-select"],["value",""],["type","text","formControlName","apiUserName","placeholder","Enter Username",1,"form-control"],["type","password","formControlName","apiPassword","placeholder","Enter Password",1,"form-control"],["type","text","formControlName","offlineDSN","placeholder","Data Store Name",1,"form-control"],["type","text","formControlName","apiVariableName","placeholder","Variable name for API",1,"form-control"],["type","text","formControlName","apiObjectName","placeholder","Object Name",1,"form-control"],[1,"fas","fa-sync-alt","fa-spin"],["readonly","",1,"form-control"],["ngbTooltip","Once activated, this field will become uneditable & populated with a number (increased by 1 with each submission).",1,"fa","fa-question-circle","text-info"],["formControlName","isNextNumberActive",1,"form-select"],["class","bg-info text-white rounded-bottom py-1 px-2 fs-12",4,"ngIf"],[1,"bg-info","text-white","rounded-bottom","py-1","px-2","fs-12"],["ngbTooltip","Next submission will print this number + 1",1,"fa","fa-question-circle","text-info"],["type","number","placeholder","Enter Value","formControlName","nextNumberValue",1,"form-control"],["type","text","placeholder","true value","name","0",1,"form-control",3,"value","input"],["type","text","placeholder","false value","name","1",1,"form-control",3,"value","input"],["type","text","placeholder","indeterminate value","name","2",1,"form-control",3,"value","input"],["ngbDropdown",""],["type","button","ngbDropdownToggle","",1,"form-select","no-dropdown-icon","text-start","w-100","lh-base"],["class","fs-13 lh-base",4,"ngIf"],["class","text-capitalize",4,"ngIf"],["ngbDropdownMenu",""],["type","button","class","text-capitalize","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"fs-13","lh-base"],[1,"text-capitalize"],["type","button","ngbDropdownItem","",1,"text-capitalize",3,"click"],["formControlName","validationType",1,"form-select",3,"change"],["type","text","placeholder","Validation message","formControlName","validationMessage",1,"form-control"],[1,"row","mt-4"],["formArrayName","fieldSecurity",1,"col-md-12"],[1,"btn","btn-light","w-100",3,"click"],[1,"fa","fa-lock"],["class","px-3 pb-3 pt-2 mb-3 bg-light rounded position-relative",3,"formGroupName",4,"ngIf"],[1,"px-3","pb-3","pt-2","mb-3","bg-light","rounded","position-relative",3,"formGroupName"],["type","button","ngbTooltip","Delete",1,"btn","btn-link","position-absolute","top-0","end-0","btn-sm",3,"click"],[1,"fas","fa-times","text-secondary","fw-bold"],["formControlName","userRole",1,"form-select"],["formControlName","userAccess",1,"form-select"],["value","",1,""],["value","RW"],["value","RO"],["value","NA"],["ffOutsideClick","",3,"outsideClick"],["for","variableName",1,"mt-3"],["id","variableName","type","text","formControlName","variableName",1,"form-control",3,"placeholder","input","click"],["class","text-danger error-span fs-11 lh-sm",4,"ngIf"],["class","text-danger error-span fs-11 lh-sm d-flex flex-row mt-1",4,"ngIf"],["class","list-unstyled",4,"ngIf"],[1,"text-danger","error-span","fs-11","lh-sm"],[1,"text-danger","error-span","fs-11","lh-sm","d-flex","flex-row","mt-1"],[1,"fa","fa-exclamation-triangle","pe-1","flex-shrink-1"],[1,"list-unstyled"],["class","rounded shadow p-2",4,"ngIf"],[1,"rounded","shadow","p-2"],[3,"click",4,"ngFor","ngForOf","ngForTrackBy"],[3,"click"],["type","text","placeholder","Default Value","formControlName","defaultValue",1,"form-control"],[1,"input-group","mb-3"],["type","text","formControlName","apiURL","placeholder","Enter device URL",1,"form-control"],["type","button",1,"btn","btn-primary",3,"click"],["type","password","formControlName","apiPassword",1,"form-control",3,"placeholder"],[1,"d-flex","align-items-center","bg-info","py-1","px-2","text-white","rounded","my-3","position-relative"],[1,"fa","fa-caret-down","fa-2x","position-absolute","top-50","start-0","lh-1","ms-3","text-info"],["formArrayName","fieldTriggers"],[1,"fa","fa-plus-circle"],["class","px-3 pb-3 pt-2 mb-3 bg-light rounded position-relative",4,"ngIf"],[1,"px-3","pb-3","pt-2","mb-3","bg-light","rounded","position-relative"],["ngbTooltip","Delete",1,"btn","btn-link","position-absolute","top-0","end-0","btn-sm",3,"click"],[3,"formGroupName"],["formControlName","trigger",1,"form-select",3,"change"],["triggerValue",""],["formControlName","triggerType",1,"form-select"],["value","default",3,"selected",4,"ngIf"],["value","trigger.task",4,"ngIf"],["type","text","formControlName","triggerMessage",1,"form-control"],["value","default",3,"selected"],["value","trigger.task"],[1,"col-12","mt-3"],[3,"fromPage","users","teams","assigneesForm"]],template:function(t,n){1&t&&(e.YNc(0,gl,7,4,"div",0),e.YNc(1,wl,17,10,"ng-template",1,2,e.W1O),e.YNc(3,Al,38,4,"ng-template",1,3,e.W1O),e.YNc(5,Sl,13,9,"ng-template",1,4,e.W1O),e.YNc(7,ql,10,6,"ng-template",1,5,e.W1O),e.YNc(9,Ol,3,1,"ng-template",1,6,e.W1O),e.YNc(11,Ul,3,1,"ng-template",1,7,e.W1O),e.YNc(13,Il,3,1,"ng-template",1,8,e.W1O),e.YNc(15,Dl,8,8,"ng-template",1,9,e.W1O),e.YNc(17,Bl,11,7,"ng-template",1,10,e.W1O),e.YNc(19,Vl,1,1,"ng-template",1,11,e.W1O),e.YNc(21,Gl,10,8,"
1ng-template",1,12,e.W1O),e.YNc(23,ta,10,11,"ng-template",1,13,e.W1O),e.YNc(25,ia,4,3,"ng-template",1,14,e.W1O),e.YNc(27,na,8,6,"ng-template",1,15,e.W1O),e.YNc(29,oa,12,9,"ng-template",1,16,e.W1O),e.YNc(31,Ta,1,1,"ng-template",1,17,e.W1O)),2&t&&(e.Q6J("ngIf",!n.fieldForm.value.isDeleted),e.xp6(1),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm),e.xp6(2),e.Q6J("formGroup",n.fieldForm))},dependencies:[g.mk,g.sg,g.O5,g.tP,g.RF,g.n9,p.gY,p.Gk,p.gW,p.k9,p.I_,m.YN,m.Kr,m.Fj,m.wV,m.Wl,m.EJ,m.JJ,m.JL,m.Q7,m.sg,m.u,m.x0,m.CE,p.uN,p.Pz,p.nv,p.Is,p.Vx,p.Fh,p.tO,p.Dy,p._L,ke.P,Se.L,p.jt,p.iD,p.Vi,p.TH,X.J$,X.mJ,p.Ly,C.Zt,C.Bh,Ft._,Ie.k,Zt,Oe.L,p.Pm,g.Ov,g.OU,Pe.m,At.s,M.H,Z.X$,re,Ct,kt,St,Nt],styles:["label[_ngcontent-%COMP%]{font-size:12px}input.form-control[_ngcontent-%COMP%], select.form-select[_ngcontent-%COMP%], textarea.form-control[_ngcontent-%COMP%]{font-size:13px}p.hint[_ngcontent-%COMP%]{font-size:12px}ul.list-group[_ngcontent-%COMP%] > li.list-group-item[_ngcontent-%COMP%] > div.position-relative.bg-danger-subtle[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:var(--bs-danger)}.cdk-drag-handle[_ngcontent-%COMP%] .fa-ellipsis-v.fa-lg[_ngcontent-%COMP%]{width:7px}"]})};se=(0,P.gn)([(0,u.c)()],se);var ce=d(8076);let ba=(()=>{class i{transform(t,n){return t.indexOf(n)}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275pipe=e.Yjl({name:"indexOfArray",type:i,pure:!0})}return i})();var Ee=d(3069),K=d(5745);let wa=(()=>{class i{transform(t,n){return t===s.ii.SingleSelect?"team.current"!==w.b.getAutomationType(n):!Object.values(Me).includes(t)}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275pipe=e.Yjl({name:"cellColLocked",type:i,pure:!0})}return i})(),ya=(()=>{class i{transform(t){return{...t,hierarchyItems:this.filterHierarchy(t.hierarchyItems)}}filterHierarchy(t){return t.filter(n=>!n.isDeleted).map(n=>({...n,hierarchyItems:n.hierarchyItems?this.filterHierarchy(n.hierarchyItems):[]}))}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275pipe=e.Yjl({name:"filterDeletedHierarchyItems",type:i,pure:!0})}return i})();const Fa=["sectionPanel"];function Za(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"ff-field-element",20),e.NdJ("deleteField",function(){const a=e.CHM(t).$implicit,r=e.oxw(3).index,c=e.oxw();return e.KtG(c.deleteField(a.value,r))}),e.ALo(2,"filterArrayByValue"),e.qZA()()}if(2&i){const t=o.$implicit,n=o.last,l=o.index,a=e.oxw(3),r=a.$implicit,c=a.index,_=e.oxw();e.xp6(1),e.Q6J("users",_.users)("teams",_.teams)("referenceData",_.referenceData)("hierarchies",e.Dn7(2,13,_.hierarchies,"isDeleted",!1))("assetTypes",_.assetTypes)("lockedSection",!0)("field",t)("section",r)("sectionIndex",c)("fieldIndex",l)("lastField",n)("workflowForm",_.workflowForm)("currentAssigneesDropdownId",_.currentAssigneesDropdownId)}}function Aa(i,o){if(1&i&&(e.TgZ(0,"div",18),e.YNc(1,Za,3,17,"div",19),e.ALo(2,"getFormArrayControls"),e.qZA()),2&i){const t=e.oxw(2),n=t.index,l=t.$implicit,a=e.oxw();e.ekj("bg-secondary",n>0&&l.value.fieldType!==a.SectionType.Approval)("bg-success",l.value.fieldType===a.SectionType.Approval),e.xp6(1),e.Q6J("ngForOf",e.xi3(2,6,l,"fields"))("ngForTrackBy",a.trackByRow)}}function Ca(i,o){1&i&&(e.TgZ(0,"p",42),e._UZ(1,"i",43),e.TgZ(2,"span",44),e._uU(3),e.ALo(4,"translate"),e.qZA()()),2&i&&(e.xp6(3),e.Oqu(e.lcZ(4,1,"FORM.Section name already taken")))}function ka(i,o){if(1&i&&(e.TgZ(0,"p",42),e._UZ(1,"i",43),e.TgZ(2,"span",44),e._uU(3),e.qZA()()),2&i){const t=e.oxw(5);e.xp6(3),e.Oqu(t.requiredFieldMessage)}}function Sa(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"li")(1,"button",45),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(4).$implicit,a=e.oxw();return e.KtG(a.onCloneSection(l.value))}),e._UZ(2,"i",46),e.qZA()()}if(2&i){const t=e.oxw(4).$implicit,n=e.oxw();e.xp6(1),e.ekj("btn-outline-dark",t.value.fieldType===n.SectionType.Section||t.value.fieldType===n.SectionType.Table)("bt
1n-outline-success",t.value.fieldType===n.SectionType.Approval)("btn-outline-info",t.value.fieldType===n.SectionType.Trigger),e.Q6J("disabled",t.value.fieldType===n.SectionType.Approval),e.xp6(1),e.ekj("text-light",t.value.label!==n.SectionFieldLabel.Invisible)("text-black-50",t.value.label===n.SectionFieldLabel.Invisible)}}function Na(i,o){if(1&i&&(e.TgZ(0,"button",47),e._UZ(1,"i",48),e.qZA()),2&i){const t=e.oxw().opened,n=e.oxw(3).$implicit,l=e.oxw();e.ekj("btn-outline-dark",n.value.fieldType===l.SectionType.Section||n.value.fieldType===l.SectionType.Table)("btn-outline-info",n.value.fieldType===l.SectionType.Trigger),e.xp6(1),e.ekj("text-light",n.value.label!==l.SectionFieldLabel.Invisible)("text-black-50",n.value.label===l.SectionFieldLabel.Invisible)("fa-angle-down",!t)("fa-angle-up",t)}}function qa(i,o){if(1&i&&(e.TgZ(0,"button",49),e._UZ(1,"i",50),e.qZA()),2&i){const t=e.oxw(4).$implicit,n=e.oxw();e.Q6J("disabled",t.value.fieldType===n.SectionType.Approval)}}function Oa(i,o){if(1&i&&e._UZ(0,"ff-section-header",51),2&i){const t=e.oxw().opened,n=e.oxw(3),l=n.$implicit,a=n.index,r=e.oxw();e.Q6J("workflowForm",r.workflowForm)("section",l)("sectionIndex",a)("users",r.users)("teams",r.teams)("opened",t)("currentAssigneesDropdownId",r.currentAssigneesDropdownId)}}function Ua(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",24),e.NdJ("mouseenter",function(){e.CHM(t);const l=e.oxw(3).index,a=e.oxw();return e.KtG(a.onTargetDropListEntered(l))}),e.TgZ(1,"div",25)(2,"div",26)(3,"div",27),e._UZ(4,"i",28)(5,"i",28)(6,"i",28),e.qZA()(),e.TgZ(7,"div",29)(8,"div",30)(9,"i",31),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3).$implicit,a=e.oxw();return e.KtG(a.copyToClipboard(l.value.fieldName))}),e.ALo(10,"fieldTypeIconClass"),e.qZA(),e.TgZ(11,"fieldset",32)(12,"input",33,34),e.NdJ("input",function(){e.CHM(t);const l=e.oxw(3).$implicit,a=e.oxw();return e.KtG(a.onSectionNameChange(l.value))}),e.qZA(),e.YNc(14,Ca,5,3,"p",35),e.YNc(15,ka,4,1,"p",35),e.qZA()()()(),e.TgZ(16,"div")(17,"ul",36)(18,"li")(19,"button",37),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3).$implicit,a=e.oxw();return e.KtG(a.deleteSection(l.value))}),e._UZ(20,"i",38),e.qZA()(),e.YNc(21,Sa,3,11,"li",23),e.TgZ(22,"li"),e.YNc(23,Na,2,12,"button",39),e.YNc(24,qa,2,1,"button",40),e.qZA()()()(),e.YNc(25,Oa,1,7,"ff-section-header",41)}if(2&i){const t=o.opened,n=e.oxw(3).$implicit,l=e.oxw();let a,r,c;e.ekj("rounded",!l.workflowForm.value.isWorkflow&&!t)("rounded-top",l.workflowForm.value.isWorkflow||t)("rounded-start",l.workflowForm.value.isWorkflow||t)("bg-secondary",n.value.fieldType===l.SectionType.Section||n.value.fieldType===l.SectionType.Table)("bg-success",n.value.fieldType===l.SectionType.Approval)("bg-primary",n.value.fieldType===l.SectionType.Trigger),e.xp6(9),e.Q6J("closeDelay",500)("ngClass",e.lcZ(10,25,n.value.fieldType)),e.xp6(3),e.ekj("invalid-section-name",(null==(a=n.get("label"))||null==a.errors?null:a.errors.required)||(null==(a=n.get("label"))||null==a.errors?null:a.errors.duplicateSectionName)),e.Q6J("required",!n.value.isDeleted),e.xp6(2),e.Q6J("ngIf",null==(r=n.get("label"))||null==r.errors?null:r.errors.duplicateSectionName),e.xp6(1),e.Q6J("ngIf",null==(c=n.get("label"))||null==c.errors?null:c.errors.required),e.xp6(4),e.ekj("text-light",n.value.fieldType===l.SectionType.Approval),e.xp6(2),e.Q6J("ngIf",n.value.order>1),e.xp6(2),e.Q6J("ngIf",n.value.fieldType!==l.SectionType.Approval),e.xp6(1),e.Q6J("ngIf",n.value.fieldType===l.SectionType.Approval),e.xp6(1),e.Q6J("ngIf",n.value.fieldType!==l.SectionType.Trigger&&l.workflowForm.value.isWorkflow)}}function Ia(i,o){1&i&&(e.ynx(0,52),e.TgZ(1,"p",64),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.BQk()),2&i&&(e.xp6(2),e.hij("",e.lcZ(3,1,"FORM.Empty section. Drag & drop elements"),"!"))}function Pa(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"ff-field-element",65),e.NdJ("deleteField",function(){const a=e.CHM(t).$implicit,r=e.oxw(6).index,c=e.oxw();return e.KtG(c.deleteField(a.value,r))}),e.ALo(2,"filterArrayByValue"),e.qZA()()}if(2&i){const t=o.$implicit,n=o.last,l=o.index,a=e.oxw(6),r=a.$implicit,c=a.index,_=e.oxw();e.xp6(1),e.Q6J("users",_.users)("referenceData",_.referenceData)("hierarchies",e.Dn7(2,12,_.hierarchies,"isDeleted",!1))("assetTypes",_.assetTypes)("teams",_.teams)("field",t)("section",r)("sectionIndex",c)("fieldIndex",l)("lastField",n)("workflowForm",_.workflowForm)("currentAssigneesDropdownId",_.currentAssigneesDropdownId)}}function La(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",61),e.NdJ("cdkDropListDropped",function(l){e.CHM(t);const a=e.oxw(6);return e.KtG(a.onDragAndDropField(l))}),e.ALo(1,"getFormArrayControls"),e.YNc(2,Ia,4,3,"ng-container",62),e.ALo(3,"filterArrayByValue"),e.TgZ(4,"div",63),e.YNc(5,Pa,3,16,"div",19),e.ALo(6,"getFormArrayControls"),e.qZA()()}if(2&i){const t=e.oxw(5),n=t.index,l=t.$implicit,a=e.oxw();e.Q6J("id","fieldsDropList"+n)("cdkDropListConnectedTo",a.fieldsDropList)("cdkDropListData",e.xi3(1,6,l,"fields")),e.xp6(2),e.Q6J("ngIf",!e.Dn7(3,9,l.value.fields,"isDeleted",!1).length&&l.value.fieldType!==a.SectionType.Approval),e.xp6(3),e.Q6J("ngForOf",e.xi3(6,13,l,"fields"))("ngForTrackBy",a.trackByRow)}}function Ma(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"span",66),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(6);return e.KtG(l.scrollToError())}),e.TgZ(1,"a",67),e._uU(2),e.ALo(3,"translate"),e._UZ(4,"i",68),e.qZA()()}2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"FORM.Advanced")," "))}function Ja(i,o){1&i&&(e.TgZ(0,"span")(1,"a",69),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&i&&(e.xp6(2),e.hij(" ",e.lcZ(3,1,"FORM.Advanced")," "))}function Da(i,o){1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.Oqu(e.l
1cZ(2,1,"FORM.See example")))}function Ea(i,o){1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"FORM.Hide example")))}function Qa(i,o){1&i&&(e.ynx(0),e.TgZ(1,"div",87)(2,"div",88),e._UZ(3,"input",93),e.TgZ(4,"label",90),e._UZ(5,"i",94),e._uU(6),e.ALo(7,"translate"),e.qZA()()(),e.TgZ(8,"div",87)(9,"div",88),e._UZ(10,"input",95),e.TgZ(11,"label",90),e._UZ(12,"i",96),e._uU(13),e.ALo(14,"translate"),e.qZA()()(),e.TgZ(15,"div",87)(16,"div",88),e._UZ(17,"input",97),e.TgZ(18,"label",90),e._UZ(19,"i",98),e._uU(20),e.ALo(21,"translate"),e.qZA()()(),e.BQk()),2&i&&(e.xp6(6),e.hij(" ",e.lcZ(7,3,"FORM.Edit")," "),e.xp6(7),e.hij(" ",e.lcZ(14,5,"FORM.Add")," "),e.xp6(7),e.hij(" ",e.lcZ(21,7,"FORM.Delete")," "))}const Ba=function(i,o){return{"fa-lock text-info":i,"fa-unlock text-grey":o}};function Ya(i,o){if(1&i&&e._UZ(0,"i",110),2&i){const t=e.oxw(2).$implicit,n=e.oxw(8).$implicit;e.Q6J("ngbTooltip",n.value.parsedTypeLogic.isColLocked[t.fieldName]?"Not editable":"Editable")("ngClass",e.WLB(2,Ba,n.value.parsedTypeLogic.isColLocked[t.fieldName],!n.value.parsedTypeLogic.isColLocked[t.fieldName]))}}function Va(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",107),e.NdJ("click",function(){e.CHM(t);const l=e.oxw().$implicit,a=e.oxw(8).index,r=e.oxw();return e.KtG(r.switchColLock(a,l.fieldName))}),e.TgZ(1,"span",108),e._uU(2),e.qZA(),e.YNc(3,Ya,1,5,"i",109),e.qZA()}if(2&i){const t=e.oxw().$implicit;e.xp6(2),e.Oqu(t.label),e.xp6(1),e.Q6J("ngIf",t.fieldName)}}function Ra(i,o){if(1&i&&(e.TgZ(0,"div")(1,"p",111),e._uU(2),e.qZA()()),2&i){const t=e.oxw().$implicit;e.xp6(2),e.Oqu(t.label)}}function Ha(i,o){if(1&i&&(e.TgZ(0,"th"),e.YNc(1,Va,4,2,"button",106),e.ALo(2,"cellColLocked"),e.YNc(3,Ra,3,1,"div",23),e.ALo(4,"cellColLocked"),e.qZA()),2&i){const t=o.$implicit;e.xp6(1),e.Q6J("ngIf",e.xi3(2,2,t.fieldType,t.typeLogic)),e.xp6(2),e.Q6J("ngIf",!e.xi3(4,5,t.fieldType,t.typeLogic))}}function Ga(i,o){if(1&i&&(e.TgZ(0,"thead")(1,"tr"),e._UZ(2,"th",105),e.YNc(3,Ha,5,8,"th",19),e.qZA()()),2&i){const t=e.oxw(7).$implicit,n=e.oxw();e.xp6(3),e.Q6J("ngForOf",t.value.fields)("ngForTrackBy",n.trackBy)}}function $a(i,o){if(1&i&&(e.TgZ(0,"td",81),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i){const t=e.oxw(8).$implicit;e.uIk("colspan",t.value.fields.length+1),e.xp6(1),e.hij(" ",e.lcZ(2,2,"FORM.No data")," ")}}function ja(i,o){1&i&&(e.TgZ(0,"td",81),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORM.This section is empty")," "))}function Ka(i,o){if(1&i&&(e.TgZ(0,"tr"),e.YNc(1,$a,3,4,"td",112),e.YNc(2,ja,3,3,"td",112),e.qZA()),2&i){const t=e.oxw(7).$implicit;e.xp6(1),e.Q6J("ngIf",t.value.fields.length),e.xp6(1),e.Q6J("ngIf",!t.value.fields.length)}}function za(i,o){if(1&i&&e._UZ(0,"input",121),2&i){const t=e.oxw(2).$implicit,n=e.oxw(9);e.Q6J("type",t.fieldType===n.SectionFieldType.Numeric?"number":"text")("formControlName",t.fieldName)}}function Wa(i,o){if(1&i&&(e.TgZ(0,"option",128),e._uU(1),e.qZA()),2&i){const t=o.$implicit;let n;e.Q6J("value",t.id),e.xp6(1),e.Oqu(null!==(n=t.label)&&void 0!==n?n:t.value)}}function Xa(i,o){if(1&i&&(e.ynx(0),e.YNc(1,Wa,2,2,"option",127),e.ALo(2,"findItemByKey"),e.ALo(3,"split"),e.BQk()),2&i){const t=e.oxw(3).$implicit,n=e.oxw(9);let l;e.xp6(1),e.Q6J("ngForOf",null==(l=e.Dn7(2,2,n.referenceData,"id",e.xi3(3,6,t.typeLogic,"%")[2]))?null:l.items)("ngForTrackBy",n.trackBy)}}function er(i,o){if(1&i&&(e.TgZ(0,"option",128),e._uU(1),e.qZA()),2&i){const t=o.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function tr(i,o){if(1&i&&(e.ynx(0),e.YNc(1,er,2,2,"option",127),e.BQk()),2&i){const t=e.oxw(3).$implicit,n=e.oxw(9);e.xp6(1),e.Q6J("ngForOf",t.splittedTextAreaType)("ngForTrackBy",n.trackBy)}}function ir(i,o){if(1&i&&(e.TgZ(0,"select",122)(1,"option",123),e._uU(2,"Choose one"),e.qZA(),e.ynx(3,124),e.ALo(4,"split"),e.YNc(5,Xa,4,9,"ng-container",125),e.YNc(6,tr,2,2,"ng-container",126),e.BQk(),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.Q6J("formControlName",t.fieldName),e.xp6(3),e.Q6J("ngSwitch",e.xi3(4,3,t.typeLogic,"%")[1]),e.xp6(2),e.Q6J("ngSwitchCase","reference.data.id")}}function nr(i,o){if(1&i&&(e.TgZ(0,"option",128),e._uU(1),e.qZA()),2&i){const t=o.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function or(i,o){if(1&i&&(e.TgZ(0,"select",122)(1,"option",123),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.YNc(4,nr,2,2,"option",127),e.ALo(5,"split"),e.qZA()),2&i){const t=e.oxw(2).$implicit,n=e.oxw(9);
1e.Q6J("formControlName",t.fieldName),e.xp6(2),e.Oqu(e.lcZ(3,4,"FORM.Choose one")),e.xp6(2),e.Q6J("ngForOf",e.xi3(5,6,t.typeLogic,"|"))("ngForTrackBy",n.trackBy)}}function lr(i,o){if(1&i&&(e.TgZ(0,"div",135)(1,"div",134),e._UZ(2,"ff-date-picker",136),e.qZA()()),2&i){const t=e.oxw(3).$implicit,n=e.oxw(9);e.xp6(2),e.Q6J("formControlName",t.fieldName+n.DateLogic.DateRaw)}}function ar(i,o){if(1&i&&(e.TgZ(0,"div",139),e._UZ(1,"ngb-timepicker",140),e.qZA()),2&i){const t=e.oxw(4).$implicit,n=e.oxw(9);e.xp6(1),e.Q6J("formControlName",t.fieldName+n.DateLogic.TimeRaw)("meridian",!0)("spinners",!1)}}function rr(i,o){if(1&i&&(e.TgZ(0,"div",139),e._UZ(1,"ngb-timepicker",140),e.qZA()),2&i){const t=e.oxw(4).$implicit,n=e.oxw(9);e.xp6(1),e.Q6J("formControlName",t.fieldName+n.DateLogic.TimeRaw)("meridian",!1)("spinners",!1)}}function sr(i,o){if(1&i&&(e.TgZ(0,"div",137)(1,"div",134),e._UZ(2,"ff-date-picker",136),e.YNc(3,ar,2,3,"div",138),e.YNc(4,rr,2,3,"div",138),e.qZA()()),2&i){const t=e.oxw(3).$implicit,n=e.oxw(8).$implicit,l=e.oxw();e.xp6(1),e.Tol(n.value.fieldName),e.xp6(1),e.Q6J("formControlName",t.fieldName+l.DateLogic.DateRaw),e.xp6(1),e.Q6J("ngSwitchCase",l.DateTimeTypeLogic.DateTime),e.xp6(1),e.Q6J("ngSwitchCase",l.DateTimeTypeLogic.DateTime24h)}}function cr(i,o){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"ngb-timepicker",140),e.qZA()),2&i){const t=e.oxw(3).$implicit,n=e.oxw(9);e.xp6(1),e.Q6J("formControlName",t.fieldName+n.DateLogic.TimeRaw)("meridian",!0)("spinners",!1)}}function _r(i,o){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"ngb-timepicker",140),e.qZA()),2&i){const t=e.oxw(3).$implicit,n=e.oxw(9);e.xp6(1),e.Q6J("formControlName",t.fieldName+n.DateLogic.TimeRaw)("meridian",!1)("spinners",!1)}}function dr(i,o){if(1&i&&(e.TgZ(0,"div")(1,"div",129)(2,"div",130),e.YNc(3,lr,3,1,"div",131),e.YNc(4,sr,5,5,"div",132),e.TgZ(5,"div",133)(6,"div",134)(7,"div"),e.YNc(8,cr,2,3,"div",125),e.YNc(9,_r,2,3,"div",125),e.qZA()()()()()()),2&i){const t=e.oxw(2).$implicit,n=e.oxw(9);e.xp6(2),e.Q6J("ngSwitch",t.typeLogic),e.xp6(1),e.Q6J("ngSwitchCase",n.DateTimeTypeLogic.DateOnly),e.xp6(1),e.Q6J("ngIf",t.typeLogic===n.DateTimeTypeLogic.DateTime||t.typeLogic===n.DateTimeTypeLogic.DateTime24h),e.xp6(4),e.Q6J("ngSwitchCase",n.DateTimeTypeLogic.TimeOnly),e.xp6(1),e.Q6J("ngSwitchCase",n.DateTimeTypeLogic.TimeOnly24h)}}const pr=function(i){return[i]};function mr(i,o){if(1&i&&(e.TgZ(0,"fieldset",143),e._UZ(1,"ff-select-hierarchy",144),e.ALo(2,"filterDeletedHierarchyItems"),e.ALo(3,"valueByKey"),e.qZA()),2&i){const t=e.oxw(3).$implicit,n=e.oxw().$implicit,l=e.oxw(8);let a;e.Q6J("disabled",null==l.advanceTableHierarchies[t.fieldName]?null:l.advanceTableHierarchies[t.fieldName].isDeleted),e.xp6(1),e.Q6J("formControlName",t.fieldName)("data",e.VKq(9,pr,e.lcZ(2,4,null!==(a=l.advanceTableHierarchies[t.fieldName])&&void 0!==a?a:l.hierarchies[0])))("defaultValue",e.xi3(3,6,n.value,t.fieldName))}}function gr(i,o){1&i&&(e.TgZ(0,"div",145)(1,"p",146),e._uU(2),e.ALo(3,"translate"),e.qZA()()),2&i&&(e.xp6(2),e.Oqu(e.lcZ(3,1,"FORM.No selected Hierarchy")))}function ur(i,o){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,mr,4,11,"fieldset",141),e.YNc(2,gr,4,3,"div",142),e.qZA()),2&i){const t=e.oxw(2).$implicit,n=e.oxw(9);e.xp6(1),e.Q6J("ngIf",n.advanceTableHierarchies[t.fieldName]),e.xp6(1),e.Q6J("ngIf",!n.advanceTableHierarchies[t.fieldName])}}const fr=function(i,o){return[i,o]};function vr(i,o){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,za,1,2,"input",119),e.YNc(2,ir,7,6,"select",120),e.YNc(3,or,6,9,"select",120),e.ALo(4,"includes"),e.YNc(5,dr,10,5,"div",23),e.YNc(6,ur,3,2,"div",23),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw(9);e.xp6(1),e.Q6J("ngIf",t.fieldType!==n.SectionFieldType.Boolean&&t.fieldType!==n.SectionFieldType.Trilean&&t.fieldType!==n.SectionFieldType.SingleSelect&&t.fieldType!==n.SectionFieldType.DateTime&&t.fieldType!==n.SectionFieldType.Hierarchy),e.xp6(1),e.Q6J("ngIf",t.fieldType===n.SectionFieldType.SingleSelect),e.xp6(1),e.Q6J("ngIf",e.xi3(4,5,e.WLB(8,fr,n.SectionFieldType.Boolean,n.SectionFieldType.Trilean),t.fieldType)),e.xp6(2),e.Q6J("ngIf",t.fieldType===n.SectionFieldType.DateTime),e.xp6(1),e.Q6J("ngIf",t.fieldType===n.SectionFieldType.Hierarchy)}}function hr(i,o){1&i&&(e.TgZ(0,"div",147),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.Oqu(e.l
1cZ(2,1,"FORM.N/A")))}function xr(i,o){if(1&i&&(e.TgZ(0,"td",117),e.YNc(1,vr,7,11,"div",23),e.ALo(2,"cellColLocked"),e.YNc(3,hr,3,3,"div",118),e.ALo(4,"cellColLocked"),e.qZA()),2&i){const t=o.$implicit;e.xp6(1),e.Q6J("ngIf",e.xi3(2,2,t.fieldType,t.typeLogic)),e.xp6(2),e.Q6J("ngIf",!e.xi3(4,5,t.fieldType,t.typeLogic))}}function Tr(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"tr",113)(1,"td",114)(2,"button",115),e.NdJ("click",function(){const a=e.CHM(t).index,r=e.oxw(7).index,c=e.oxw();return e.KtG(c.removeRow(r,a))}),e._UZ(3,"i",38),e.qZA()(),e.YNc(4,xr,5,8,"td",116),e.qZA()}if(2&i){const t=o.index,n=e.oxw(7).$implicit,l=e.oxw();e.Q6J("formGroupName",t),e.xp6(4),e.Q6J("ngForOf",n.value.fields)("ngForTrackBy",l.trackBy)}}function br(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",148),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(7).index,a=e.oxw();return e.KtG(a.addRow(l))}),e._uU(1),e.ALo(2,"translate"),e._UZ(3,"i",149),e.qZA()}2&i&&(e.xp6(1),e.hij(" ",e.lcZ(2,1,"FORM.Add row")," "))}function wr(i,o){if(1&i&&(e.TgZ(0,"div",99)(1,"div",100)(2,"table",101),e.YNc(3,Ga,4,2,"thead",23),e.TgZ(4,"tbody"),e.YNc(5,Ka,3,2,"tr",23),e.ynx(6,102),e.YNc(7,Tr,5,3,"tr",103),e.ALo(8,"getFormArrayControls"),e.BQk(),e.qZA()()(),e.YNc(9,br,4,3,"button",104),e.qZA()),2&i){const t=e.oxw(6).$implicit,n=e.oxw();e.xp6(3),e.Q6J("ngIf",t.value.fields.length),e.xp6(2),e.Q6J("ngIf",!t.value.parsedRows.length),e.xp6(2),e.Q6J("ngForOf",e.xi3(8,5,t,"parsedRows"))("ngForTrackBy",n.trackByRow),e.xp6(2),e.Q6J("ngIf",t.value.fields.length)}}function yr(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",70)(1,"div",71)(2,"h3",72),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"p",73),e._UZ(6,"i",74),e._uU(7),e.ALo(8,"translate"),e.TgZ(9,"button",75),e.NdJ("click",function(){e.CHM(t);const l=e.MAs(14);return e.KtG(l.toggle())}),e.YNc(10,Da,3,3,"span",23),e.YNc(11,Ea,3,3,"span",23),e._UZ(12,"i",76),e.qZA()(),e.TgZ(13,"div",77,78),e.NdJ("ngbCollapseChange",function(l){e.CHM(t);const a=e.oxw(5).$implicit;return e.KtG(a.value.horizontalExampleCollapsed=l)}),e.TgZ(15,"table",79)(16,"thead")(17,"tr",80)(18,"th",81),e._uU(19),e.ALo(20,"translate"),e.qZA(),e.TgZ(21,"th",81),e._uU(22),e.ALo(23,"translate"),e.qZA()()(),e.TgZ(24,"tbody")(25,"tr")(26,"td",82)(27,"strong"),e._uU(28,"A."),e.qZA(),e._uU(29),e.ALo(30,"translate"),e.qZA(),e._UZ(31,"td",83),e.qZA(),e.TgZ(32,"tr")(33,"td",82)(34,"strong"),e._uU(35,"B."),e.qZA(),e._uU(36),e.ALo(37,"translate"),e.qZA(),e._UZ(38,"td",83),e.qZA(),e.TgZ(39,"tr")(40,"td",82)(41,"strong"),e._uU(42,"C."),e.qZA(),e._uU(43),e.ALo(44,"translate"),e.qZA(),e._UZ(45,"td",83),e.qZA()()(),e.TgZ(46,"p",84),e._UZ(47,"i",74),e._uU(48),e.ALo(49,"translate"),e.qZA()()(),e.TgZ(50,"div",85)(51,"div",86)(52,"div",87)(53,"div",88)(54,"input",89),e.NdJ("click",function(l){e.CHM(t);const a=e.oxw(5).index,r=e.oxw();return e.KtG(r.handleAdvanceTableState(l,a))}),e.qZA(),e.TgZ(55,"label",90),e._UZ(56,"i",91),e._uU(57),e.ALo(58,"translate"),e.qZA()()(),e.YNc(59,Qa,22,9,"ng-container",23),e.qZA()(),e.YNc(60,wr,10,8,"div",92),e.qZA()}if(2&i){const t=e.oxw(5).$implicit;e.xp6(3),e.Oqu(e.lcZ(4,19,"FORM.Horizontal section rules")),e.xp6(4),e.hij(" ",e.lcZ(8,21,"FORM.Add rows by default and prevent users from deleting, editing or adding rows")," "),e.xp6(3),e.Q6J("ngIf",t.value.horizontalExampleCollapsed),e.xp6(1),e.Q6J("ngIf",!t.value.horizontalExampleCollapsed),e.xp6(1),e.ekj("fa-angle-down",t.value.horizontalExampleCollapsed)("fa-angle-up",!t.value.horizontalExampleCollapsed),e.xp6(1),e.Q6J("ngbCollapse",t.value.horizontalExampleCollapsed),e.xp6(6),e.Oqu(e.lcZ(20,23,"FORM.Question")),e.xp6(3),e.Oqu(e.lcZ(23,25,"FORM.Answer")),e.xp6(7),e.hij(" ",e.lcZ(30,27,"FORM.Are you clear on the task?"),""),e.xp6(7),e.hij(" ",e.lcZ(37,29,"FORM.Do you have the right PPE?"),""),e.xp6(7),e.hij(" ",e.lcZ(44,31,"FORM.IS the task safe?"),""),e.xp6(5),e.hij(" ",e.lcZ(49,33,"FORM.Advanced Table Description"),""),e.xp6(6),e.Q6J("checked",t.value.parsedTypeLogic.advanceTable),e.xp6(3),e.hij(" ",e.lcZ(58,35,"FORM.Enable")," "),e.xp6(2),e.Q6J("ngIf",t.value.parsedTypeLogic.advanceTable),e.xp6(1),e.Q6J("ngIf",t.value.parsedTypeLogic.advanceTable)}}function Fr(i,o){if(1&i&&(e.TgZ(0,"ul",53,54)(2,"li",55)(3,"a",56),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.YNc(6,La,7,16,"ng-template",57),e.qZA(),e.TgZ(7,"li",58),e.YNc(8,Ma,5,3,"span",59),e.YNc(9,Ja,4,3,"span",23),e.YNc(10,yr,61,37,"ng-template",57),e.qZA()(),e._UZ(11,"div",60)),2&i){const t=e.MAs(1),n=e.oxw(4).$implicit,l=e.oxw();
1e.xp6(2),e.Q6J("ngbNavItem",1),e.xp6(2),e.Oqu(e.lcZ(5,7,"FORM.Elements")),e.xp6(3),e.Q6J("ngbNavItem",2)("disabled",n.value.requireLabel||(null==l.workflowForm.controls.process.errors?null:l.workflowForm.controls.process.errors.required)),e.xp6(1),e.Q6J("ngIf",n.value.requireLabel||(null==l.workflowForm.controls.process.errors?null:l.workflowForm.controls.process.errors.required)),e.xp6(1),e.Q6J("ngIf",!(n.value.requireLabel||null!=l.workflowForm.controls.process.errors&&l.workflowForm.controls.process.errors.required)),e.xp6(2),e.Q6J("ngbNavOutlet",t)}}function Zr(i,o){1&i&&e.YNc(0,Fr,12,9,"ng-template",52)}function Ar(i,o){1&i&&(e.ynx(0,52),e.TgZ(1,"p",64),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.BQk()),2&i&&(e.xp6(2),e.hij("",e.lcZ(3,1,"FORM.Empty section. Drag & drop elements"),"!"))}function Cr(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"ff-field-element",65),e.NdJ("deleteField",function(){const a=e.CHM(t).$implicit,r=e.oxw(5).index,c=e.oxw();return e.KtG(c.deleteField(a.value,r))}),e.ALo(2,"filterArrayByValue"),e.qZA()()}if(2&i){const t=o.$implicit,n=o.last,l=o.index,a=e.oxw(5),r=a.$implicit,c=a.index,_=e.oxw();e.xp6(1),e.Q6J("users",_.users)("referenceData",_.referenceData)("hierarchies",e.Dn7(2,12,_.hierarchies,"isDeleted",!1))("assetTypes",_.assetTypes)("teams",_.teams)("field",t)("section",r)("sectionIndex",c)("fieldIndex",l)("lastField",n)("workflowForm",_.workflowForm)("currentAssigneesDropdownId",_.currentAssigneesDropdownId)}}function kr(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"ul",150)(1,"li",151)(2,"div",152),e.NdJ("cdkDropListDropped",function(l){e.CHM(t);const a=e.oxw(5);return e.KtG(a.onDragAndDropField(l))}),e.ALo(3,"getFormArrayControls"),e.YNc(4,Ar,4,3,"ng-container",62),e.ALo(5,"filterArrayByValue"),e.TgZ(6,"div",63),e.YNc(7,Cr,3,16,"div",19),e.ALo(8,"getFormArrayControls"),e.qZA()()()()}if(2&i){const t=e.oxw(4),n=t.index,l=t.$implicit,a=e.oxw();e.xp6(2),e.Q6J("id","fieldsDropList"+n)("cdkDropListData",e.xi3(3,6,l,"fields"))("cdkDropListConnectedTo",a.fieldsDropList),e.xp6(2),e.Q6J("ngIf",!e.Dn7(5,9,l.value.fields,"isDeleted",!1).length&&l.value.fieldType!==a.SectionType.Approval),e.xp6(3),e.Q6J("ngForOf",e.xi3(8,13,l,"fields"))("ngForTrackBy",a.trackByRow)}}function Sr(i,o){1&i&&e.YNc(0,kr,9,16,"ng-template",52)}function Nr(i,o){if(1&i&&(e.TgZ(0,"ngb-panel",21),e.YNc(1,Ua,26,27,"ng-template",22),e.YNc(2,Zr,1,0,null,23),e.YNc(3,Sr,1,0,null,23),e.qZA()),2&i){const t=e.oxw(2),n=t.index,l=t.$implicit,a=e.oxw();e.Q6J("id","custom-section-panel-"+n),e.xp6(2),e.Q6J("ngIf",l.value.fieldType===a.SectionType.Table),e.xp6(1),e.Q6J("ngIf",l.value.fieldType!==a.SectionType.Table)}}function qr(i,o){1&i&&e._UZ(0,"div",153)}function Or(i,o){1&i&&e._UZ(0,"div",154)}function Ur(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",11),e.YNc(1,Aa,3,9,"div",12),e.TgZ(2,"ngb-accordion",13,14),e.NdJ("panelChange",function(l){e.CHM(t);const a=e.oxw(),r=a.index,c=a.$implicit,_=e.oxw();return e.KtG(_.sectionPanelChange(l,r,c.value.id))}),e.YNc(4,Nr,4,3,"ngb-panel",15),e.qZA(),e.YNc(5,qr,1,0,"div",16),e.YNc(6,Or,1,0,"div",17),e.qZA()}if(2&i){const t=e.oxw().index,n=e.oxw();e.Q6J("formGroupName",t),e.xp6(1),e.Q6J("ngIf",0===t),e.xp6(1),e.Q6J("activeIds",n.openedSectionsIds)("destroyOnHide",!1),e.xp6(2),e.Q6J("ngIf",0!==t),e.xp6(1),e.Q6J("ngIf",n.workflowForm.value.isWorkflow&&n.workflowForm.value.sections[t].isPaused&&t>0&&n.lastSectionId!==t),e.xp6(1),e.Q6J("ngIf",t>0)}}function Ir(i,o){if(1&i&&(e.TgZ(0,"li",9),e.ALo(1,"indexOfArray"),e.YNc(2,Ur,7,7,"div",10),e.qZA()),2&i){const t=o.$implicit,n=o.index,l=e.oxw();e.ekj("invisibleSection",t.value.typeLogic===l.SectionFieldType.Invisible||0===n)("canBeSorted",t.value.typeLogic!==l.SectionFieldType.Invisible)("specialSection",t.value.fieldType===l.SectionType.Trigger)("approvalSection",t.value.fieldType===l.SectionType.Approval)("pause",t.value.isPaused&&l.workflowForm.value.isWorkflow)("last",l.lastSectionId===n)("hideFlow",e.xi3(1,16,l.lastHideFlowIds,t.value.id)>-1),e.Q6J("cdkDragDisabled",0===n),e.xp6(2),e.Q6J("ngIf",!t.value.isDeleted)}}function Pr(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"li",155)(1,"h3",156),e._uU(2),e.ALo(3,"translate"),e.qZA(),e.TgZ(4,"div",157)(5,"button",158),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.addSection(l.SectionType.Section))}),e._UZ(6,"i",159),e._uU(7),e.ALo(8,"translate"),e.qZA(),e.TgZ(9,"button",158),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.addSection(l.SectionType.Table))}),e._UZ(10,"i",160),e._uU(11),e.ALo(12,"translate"),e.qZA()()()}
12&i&&(e.xp6(2),e.Oqu(e.lcZ(3,3,"FORM.Add your first section")),e.xp6(5),e.hij(" ",e.lcZ(8,5,"FORM.Vertical Section")," "),e.xp6(4),e.hij(" ",e.lcZ(12,7,"FORM.Horizontal Section")," "))}function Lr(i,o){1&i&&e._UZ(0,"ff-tutorial",161)}let z=class Te{constructor(o,t,n,l,a){this.formBuilder=o,this.cdr=t,this.onboardingService=n,this.modalService=l,this.dragHandling=a,this.lastHideFlowIds=[],this.fieldsDropList=[],this.advanceTableHierarchies={},this.dragFieldsDropListChange=new e.vpe,this.orderChange=new e.vpe,this.openedSectionsIdsChange=new e.vpe,this.panelChange=new e.vpe,this.removeSection=new e.vpe,this.removeField=new e.vpe,this.cloneSection=new e.vpe,this.addNewSectionField=new e.vpe,this.addNewSection=new e.vpe,this.sectionNameChange=new e.vpe,this.requiredFieldMessage="This is a required field.",this.SectionType=s.bA,this.SectionFieldType=s.ii,this.SectionFieldLabel=s.b$,this.DateTimeTypeLogic=s.b3,this.DateDefaultValue=U.X3,this.DateLogic=U.S8,this.customPanelPrefix="custom-section-panel-",this.OnboardingStepId=Y.L,this.currentAssigneesDropdownId=""}ngOnInit(){this.tutorial$=this.onboardingService.tutorial$,this.workflowForm.get("duplicatedVariableNameIds")?.valueChanges.pipe((0,v.b)(o=>{o.length&&(this.workflowForm.value.sections.forEach((t,n)=>{t.fields.forEach(l=>{l.variableNameInUse&&this.openedSectionsIds.push(this.customPanelPrefix+n)})}),this.cdr.detectChanges())}),(0,u.t)(this)).subscribe(),this.checkSectionFieldsLabel()}ngAfterViewInit(){setTimeout(()=>this.dragFieldsDropListChange.emit())}onTargetDropListEntered(o){const t=this.panels.toArray().find(a=>a.panels.first?.id===this.customPanelPrefix+o),n=this.dropListElements.toArray().find(a=>a.id===`fieldsDropList${o}`),l=this.dragHandling.isDragging.value;!this.openedSectionsIds.includes(this.customPanelPrefix+o)&&l&&t&&n&&(this.openedSectionsIds.push(this.customPanelPrefix+o),t.expandAll(),n.element.nativeElement.scrollIntoView())}onSectionNameChange(o){this.sectionNameChange.emit(o)}checkSectionFieldsLabel(){this.workflowForm?.get("sections")?.valueChanges.pipe((0,v.b)(()=>{this.workflowForm?.get("sections")?.controls.forEach(t=>{const l=t.get("fields").controls.some(a=>null!==a.get("label")?.errors);t.get("requireLabel")?.setValue(l,{emitEvent:!1})})}),(0,u.t)(this)).subscribe()}onOpenedSectionsIdsChange(){this.openedSectionsIdsChange.emit(this.openedSectionsIds)}sectionPanelChange(o,t,n){if(this.workflowForm.get("sections").at(t)?.patchValue({panelExpanded:o.nextState}),o.nextState&&!this.openedSectionsIds.includes(this.customPanelPrefix+t)&&this.openedSectionsIds.push(this.customPanelPrefix+t),this.validateSections(this.workflowForm),this.workflowForm.value.sectionsWithErrors.includes(n))return this.scrollToError(),void o.preventDefault();o.nextState?this.dragFieldsDropListChange.emit():this.panelChange.emit(this.customPanelPrefix+t)}validateSections(o){const t=o.get("sections");this.workflowForm.patchValue({sectionsWithErrors:[]});const n=[];for(let l=0;l<t.length;l++){const a=t.at(l),r=a.get("fields");for(let c=0;c<r.length;c++){const _=r.at(c);(null!==_.errors||_.invalid)&&n.push(a.value.id)}}this.workflowForm.patchValue({sectionsWithErrors:[...new Set(n)]})}handleSectionAccordionState(){this.openedSectionsIds=[],this.workflowForm.value.sections.forEach((o,t)=>{o.panelExpanded&&this.openedSectionsIds.push(this.customPanelPrefix+t)})}getExpandedSections(){const o=[];return this.workflowForm.value.sections.forEach((t,n)=>{t.panelExpanded&&o.push(this.customPanelPrefix+n)}),o}scrollToError(){const o=document.querySelector(".error-process"),t=document.querySelector(".error-span");return o?(o.scrollIntoView({behavior:"smooth",block:"center"}),!0):!!t&&(t.scrollIntoView({behavior:"smooth",block:"center"}),!0)}onDragAndDropSection(o){if(o.previousContainer===o.container)this.moveSection(o.previousIndex,0!==o.currentIndex?o.currentIndex:1);else{const t=+o.previousContainer.id;null!==t&&this.addNewSection.emit({section:V[t],newIndex:o.currentIndex})}this.handleSectionAccordionState(),this.onOpenedSectionsIdsChange(),this.orderChange.emit(),this.workflowForm.markAsDirty()}onDragAndDropField(o){const t=o.item.data,n=t.fieldType?t.fieldType:t.value.fieldType,a=o.previousContainer.id,r=o.container.id.match(/\d+$/g),
1c=a.match(/\d+$/g),_=r?parseInt(r[r.length-1],10):null,h=c?parseInt(c[c.length-1],10):null;if(n&&(n!==s.ii.AddChild||_&&this.workflowForm.value.sections[_].fieldType!==s.bA.Table)){if(o.previousContainer===o.container&&h){const T=this.workflowForm.get("sections").at(h).get("fields");this.moveSectionField(T,o.previousIndex,o.currentIndex)}else if(o.previousContainer.id.includes("fieldsDropList")){if(h&&_){const f=this.workflowForm.get("sections").at(_).get("fields"),x=this.workflowForm.get("sections").at(h).get("fields");this.moveSectionField(f,o.previousIndex,o.currentIndex,x);const A=this.getParsedRowsArray(_),ue=f.at(o.currentIndex);A.controls.forEach(fe=>Object.entries(this.getParsedRowField(ue.value)).forEach(([ve,he])=>fe.addControl(ve,new m.NI(he))))}}else{let T=o.previousIndex;this.user$&&!this.user$.value.companyHasAsset&&o.previousIndex>=9&&(T+=2),this.addNewSectionField.emit({field:oe[T],newIndex:o.currentIndex,newSectionIndex:_})}this.orderChange.emit(),this.workflowForm.markAsDirty()}}moveSectionField(o,t,n,l=null){let a=new m.cw({});(function r(_){const h=l?.controls||o.controls,T=l||o;let f=0;for(let x=0;x<h.length;x++)if(!h[x].get("isDeleted")?.value){if(f===_)return a=T.at(x),void T.removeAt(x);f++}})(t),function c(_,h){const T=o.controls;let f=0;for(let x=0;x<T.length;x++)if(!T[x].get("isDeleted")?.value){if(f===_)return void o.insert(x,h);f++}o.push(h)}(n,a)}moveSection(o,t){const n=this.workflowForm.get("sections"),l=n.at(o);n.removeAt(o),n.insert(t,l)}addSection(o){const t=V.find(n=>n.fieldType===o);t&&this.addNewSection.emit({section:t,newIndex:null})}switchColLock(o,t){const n=this.workflowForm.get("sections").at(o).get("parsedTypeLogic")?.get("isColLocked")?.value[t],l=this.workflowForm.get("sections").at(o).get("parsedTypeLogic")?.get("isColLocked");l?.setValue({...l.value,[t]:!n})}handleAdvanceTableState(o,t){const n=o.target.checked,l=this.workflowForm.get("sections")?.at(t),a=this.getParsedRowsArray(t)?.value||[],r=()=>{l.setControl("parsedRows",this.formBuilder.array([])),l.get("parsedTypeLogic")?.patchValue({advanceTable:n}),l.markAsDirty()};if(!n&&a.length){o.preventDefault();const c=this.modalService.open(q._8,{size:"sm"});c.componentInstance.options={cancelButton:!0,modalHeader:"Disable advance table?",modalText:"All pre-populated rows will be removed!",modalType:te.i.Danger},c.componentInstance.modalAccept.pipe((0,v.b)(()=>r()),(0,u.t)(this)).subscribe()}else r()}addRow(o){const t=this.workflowForm.value.sections[o],n=this.getParsedRowsArray(o),l=t.fields.map(r=>this.getParsedRowField(r)),a={};l?.forEach(r=>Object.assign(a,r)),n.push(this.formBuilder.group(a)),this.workflowForm.markAsDirty()}getParsedRowField(o){return o.fieldType===s.ii.DateTime?{[o.fieldName+U.S8.DateRaw]:{},[o.fieldName+U.S8.TimeRaw]:{}}:{[o.fieldName]:""}}removeRow(o,t){this.getParsedRowsArray(o).removeAt(t),this.workflowForm.markAsDirty()}getParsedRowsArray(o){return this.workflowForm.get("sections").at(o).get("parsedRows")}onCloneSection(o){this.cloneSection.emit(o)}deleteSection(o){this.removeSection.emit(o)}deleteField(o,t){this.removeField.emit({field:o,sectionId:t})}trackByIndex(o,t){return t.value.id}trackBy(o){return o}trackByRow(o,t){return t}trackBySection(o,t){return t}copyToClipboard(o){navigator.clipboard.writeText(o)}static#e=this.\u0275fac=function(t){return new(t||Te)(e.Y36(m.qu),e.Y36(e.sBO),e.Y36(H.D),e.Y36(p.FF),e.Y36($))};static#t=this.\u0275cmp=e.Xpm({type:Te,selectors:[["ff-form-builder"]],viewQuery:function(t,n){if(1&t&&(e.Gf(qe,5),e.Gf(Fa,5),e.Gf(C.Wj,5)),2&t){let l;e.iGM(l=e.CRH())&&(n.formSettingsComponent=l.first),e.iGM(l=e.CRH())&&(n.panels=l),e.iGM(l=e.CRH())&&(n.dropListElements=l)}},inputs:{users:"users",teams:"teams",referenceData:"referenceData",hierarchies:"hierarchies",workflowForm:"workflowForm",selectedOwners:"selectedOwners",workflow:"workflow",classifications:"classifications",selectedPrivateUsers:"selectedPrivateUsers",blockElements:"blockElements",lastSectionId:"lastSectionId",lastHideFlowIds:"lastHideFlowIds",fieldsDropList:"fieldsDropList",openedSectionsIds:"openedSectionsIds",isOwner:"isOwner",user$:"user$",assetTypes:"assetTypes",advanceTableHierarchies:"advanceTableHierarchies"},outputs:{dragFieldsDropListChange:"dragFieldsDropListChange",orderChange:"orderChange",openedSectionsIdsChange:"openedSectionsIdsChange",panelChange:"panelChange",removeSection:"removeSection",removeField:"removeField",cloneSection:"cloneSection",addNewSectionField:"addNewSectionField",addNewSection:"addNewSection",sectionNameChange:"sectionNameChange"},decls:15,vars:28,consts:[[1,"wrap"],[3,"formGroup","joyrideStep","stepPosition","stepContent"],[3,"workflowForm","workflow","classifications","selectedOwners","selectedPrivateUsers","isOwner","user$"],[1,"text-uppercase","fw-semibold","title"],[1,"arrow"],["
1id","sectionsDropList","cdkDropList","","formArrayName","sections",1,"list-unstyled","sectionWrapper",3,"cdkDropListData","cdkDropListDropped"],["cdkDrag","","class","sectionItem",3,"invisibleSection","canBeSorted","specialSection","approvalSection","pause","last","hideFlow","cdkDragDisabled",4,"ngFor","ngForOf","ngForTrackBy"],["class","add-section-alert mt-2 p-0 bg-light rounded",4,"ngIf"],["stepContent5",""],["cdkDrag","",1,"sectionItem",3,"cdkDragDisabled"],["data-cy","section",3,"formGroupName",4,"ngIf"],["data-cy","section",3,"formGroupName"],["class","elements shadow-sm rounded bg-white","formArrayName","fields",3,"bg-secondary","bg-success",4,"ngIf"],[3,"activeIds","destroyOnHide","panelChange"],["sectionPanel","ngbAccordion"],[3,"id",4,"ngIf"],["class","pauseSwitch active",4,"ngIf"],["class","flow",4,"ngIf"],["formArrayName","fields",1,"elements","shadow-sm","rounded","bg-white"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"users","teams","referenceData","hierarchies","assetTypes","lockedSection","field","section","sectionIndex","fieldIndex","lastField","workflowForm","currentAssigneesDropdownId","deleteField"],[3,"id"],["ngbPanelHeader",""],[4,"ngIf"],[1,"d-flex","bg-secondary","px-2","py-1","align-items-center","justify-content-between",3,"mouseenter"],[1,"d-flex","w-100"],["cdkDragHandle","",1,"cdk-drag-handle","d-flex","justify-content-between","align-items-center"],[1,"d-flex","flex-row","ms-1","me-2"],[1,"fa","fa-ellipsis-v","fa-lg","opacity-50"],[1,"d-flex","flex-column","align-items-center","w-100"],[1,"input-group","d-flex","align-items-center","h-100","w-100"],["triggers","click","tooltipClass","xs-tooltip disolve-tooltip","ngbTooltip","fieldName copied!",1,"fa","opacity-50","text-white",3,"closeDelay","ngClass","click"],[1,"flex-grow-1","px-2","py-1"],["formControlName","label","data-cy","sectionName","type","text","placeholder","Enter Section Title",1,"section","lh-1","form-control","fs-6","text-white","w-100","p-1","bg-transparent",3,"required","input"],["sectionName",""],["class","bg-danger lh-1 m-0 error-span-section-name",4,"ngIf"],[1,"list-unstyled","d-flex","flex-row"],["type","button","data-cy","deleteSection",1,"action","btn","btn-outline-danger","section","btn-sm","lh-1","py-2","border-0",3,"click"],[1,"far","fa-trash-alt","fa-lg"],["ngbPanelToggle","","data-cy","sectionToggle","type","button","class","action btn section btn-sm lh-1 py-2 border-0",3,"btn-outline-dark","btn-outline-info",4,"ngIf"],["type","button","class","action btn section btn-sm lh-1 py-2 border-0 btn-outline-success",3,"disabled",4,"ngIf"],[3,"workflowForm","section","sectionIndex","users","teams","opened","currentAssigneesDropdownId",4,"ngIf"],[1,"bg-danger","lh-1","m-0","error-span-section-name"],[1,"fa","fa-exclamation-triangle","text-white","pe-1"],[1,"text-white"],["type","button","data-cy","cloneSection",1,"action","btn","section","btn-sm","lh-1","py-2","border-0",3,"disabled","click"],[1,"far","fa-copy","fa-lg"],["ngbPanelToggle","","data-cy","sectionToggle","type","button",1,"action","btn","section","btn-sm","lh-1","py-2","border-0"],[1,"fa","fa-lg"],["type","button",1,"action","btn","section","btn-sm","lh-1","py-2","border-0","btn-outline-success",3,"disabled"],[1,"fa","fa-lg","fa-angle-down","text-light"],[3,"workflowForm","section","sectionIndex","users","teams","opened","currentAssigneesDropdownId"],["ngbPanelContent",""],["ngbNav","",1,"nav-tabs","shadow-sm"],["nav","ngbNav"],[3,"ngbNavItem"],["ngbNavLink",""],["ngbNavContent",""],[3,"ngbNavItem","disabled"],["ngbTooltip","Some elements on this section require your attention before switching to Advanced","placement","top",3,"click",4,"ngIf"],[1,"m-0",3,"ngbNavOutlet"],["cdkDropList","",3,"id","cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped"],["ngbPanelContent","",4,"ngIf"],["formArrayName","fields",1,"elements","shadow-sm","rounded-bottom","bg-white"],[1,"m-0","p-3","text-center","text-grey","bg-white","rounded-bottom","shadow-sm"],[3,"users","referenceData","hierarchies","assetTypes","teams","field","section","sectionIndex","fieldIndex","lastField","workflowForm","currentAssigneesDropdownId","deleteField"],["ngbTooltip","Some elements on this section require your attention before switching to Advanced","placement","top",3,"click"],["ngbNavLink","",1,"text-danger"],[1,"fa","fa-exclamation-triangle","text-danger"],["ngbNavLink","","data-cy","advancedTab"],["data-cy","advancedTabContent",1,"w-100","bg-white","p-4","shadow-sm","rounded-bottom"],[1,"w-100"],[1,"fs-12","text-uppercase","fw-bold"],[1,"fs-13","text-grey-dark","m-0"],[1,"fa","fa-question-circle","text-info"],["type","button",1,"btn","btn-link","btn-sm","fs-12","px-0",3,"click"],[1,"fa","ps-1"],[1,"p-3","shadow-sm","rounded",3,"ngbCollapse","ngbCollapseChange"],["horizontalExample","ngbCollapse"],[1,"table","table-striped"],[1,"border-bottom","border-2"],[1,"fs-12"],[1,"fs-12","border-0"],[1,"border-0"],[1,"fs-12","m-0"],["formGroupName","parsedTypeLogic"],[1,"row","mt-4"],[1,"col-3"],[1,"form-check","form-switch","fs-12"],["type","checkbox",1,"form-check-input",3,"checked","click"],[1,"text-grey-dark"],["ngbTooltip","Enable row pre-population",1,"fa","fa-question-circle","text-info"],["class","advancedTable w-100",4,"ngIf"],["type","checkbox","formControlName","editRows",1,"form-check-input"],["ngbTooltip","Allow users to edit rows to this section",1,"fa","fa-question-circle","text-info"],["type","checkbox","formControlName","addRows",1,"form-check-input"],["ngbTooltip","Allow users to add rows to this section",1,"fa","fa-question-circle","text-info"],["type","checkbox","formControlName","deleteRows",1,"form-check-input"],["ngbTooltip","Allow users to delete rows to this section",1,"fa","fa-question-circle","text-info"],[1,"advancedTable","w-100"],[1,"overflow-auto"],[1,"table","w-100"],["formArrayName","parsedRows"],[3,"formGroupName",4,"ngFor","ngForOf","ngForTrackBy"],["type","button","class","mt-2 btn btn-light btn-sm w-100",3,"click",4,"ngIf"],[1,"action"],["type","button","class","btn btn-light btn-sm text-nowrap text-truncate position-relative pe-4 w-100 text-start",3,"click",4,"ngIf"],["type","button",1,"btn","btn-light","btn-sm","text-nowrap","text-truncate","position-relative","pe-4","w-100","text-start",3,"click"],[1,"fs-12","fw-bold"],["class","fa position-absolute top-50 end-0 translate-middle-y me-2",3,"ngbTooltip","ngClass",4,"ngIf"],[1,"fa","position-absolute","top-50","end-0","translate-middle-y","me-2",3,"ngbTooltip","ngClass"],[1,"m-0","fs-12","pb-1"],["class","fs-12",4,"ngIf"],[3,"formGroupName"],[1,"action","px-0","align-middle"],["type","button",1,"btn","btn-outline-danger","btn-sm","border-0",3,"click"],["class","align-middle",4,"ngFor","ngForOf","ngForTrackBy"],[1,"align-middle"],["class","text-grey fs-12",4,"ngIf"],["class","form-control form-control-sm","placeholder","Enter value",3,"type","formControlName",4,"ngIf"],["class","form-select",3,"formControlName",4,"ngIf"],["placeholder","Enter value",1,"form-control","form-control-sm",3,"type","formControlName"],[1,"form-select",3,"formControlName"],["value",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],[1,"row"],[1,"datetime",3,"ngSwitch"],["class","flex-grow-1 date",4,"ngSwitchCase"],["class","flex-grow-1 date-time",4,"ngIf"],[1,"flex-grow-1","time"],[1,"d-flex","flex-row"],[1,"flex-grow-1","date"],["placeholder","Enter date",3,"formControlName"],[1,"flex-grow-1","date-time"],["class","ms-2",4,"ngSwitchCase"],[1,"ms-2"],[3,"formControlName","meridian","spinners"],[3,"disabled",4,"ngIf"],["class","form-control bg-light border-light py-2",4,"ngIf"],[3,"disabled"],[3,"formControlName","data","defaultValue"],[1,"form-control","bg-light","border-light","py-2"],[1,"text-grey","fs-12","m-0","text-truncate"],[1,"text-grey","fs-12"],["type","button",1,"mt-2","btn","btn-light","btn-sm","w-100",3,"click"],[1,"fa","fa-plus"],["ngbNav","",1,"nav-tabs","shadow-sm","px-0",2,"padding-top","1px"],[1,"w-100","px-0"],["cdkDropList","",3,"id","cdkDropListData","cdkDropListConnectedTo","cdkDropListDropped"],[1,"pauseSwitch","active"],[1,"flow"],[1,"add-section-alert","mt-2","p-0","bg-light","rounded"],[1,"text-grey","fw-bold","fs-6","lh-1","text-center","m-0","text-uppercase","p-4"],[1,"row","m-0","bg-white","rounded-bottom"],["type","button",1,"btn","btn-outline-info","col-6","border-0","shadow-sm","py-2",3,"click"],[1,"fa","fa-list-alt","me-1"],[1,"fa","fa-table","me-1"],["text","Here are the current sections and elements that make up your workflow."]],template:function(t,n){if(1&t&&(e.TgZ(0,"div",0)(1,"form",1),e.ALo(2,"async"),e._UZ(3,"ff-form-settings",2),e.TgZ(4,"label",3),e._UZ(5,"div",4),e._uU(6),e.ALo(7,"translate"),e.qZA(),e.TgZ(8,"ul",5),e.NdJ("cdkDropListDropped",function(a){return n.onDragAndDropSection(a)}),e.ALo(9,"getFormArrayControls"),e.YNc(10,Ir,3,19,"li",6),e.ALo(11,"getFormArrayControls"),e.YNc(12,Pr,13,9,"li",7),e.qZA()()(),e.YNc(13,Lr,1,0,"ng-template",null,8,e.W1O)),2&t){const l=e.MAs(14);let a;e.xp6(1),e.ekj("disable-tutorial-click",null==(a=e.lcZ(2,18,n.tutorial$))?null:a.disableClick),e.Q6J("formGroup",n.workflowForm)("joyrideStep",n.OnboardingStepId.WorkflowNew+"-5")("stepPosition","left")("stepContent",l),e.xp6(2),e.Q6J("workflowForm",n.workflowForm)("workflow",n.workflow)("classifications",n.classifications)("selectedOwners",n.selectedOwners)("selectedPrivateUsers",n.selectedPrivateUsers)("isOwner",n.isOwner)("user$",n.user$),e.xp6(3),e.Oqu(e.l
1cZ(7,20,"FORM.Current elements on Workflow")),e.xp6(2),e.Q6J("cdkDropListData",e.xi3(9,22,n.workflowForm,"sections")),e.xp6(2),e.Q6J("ngForOf",e.xi3(11,25,n.workflowForm,"sections"))("ngForTrackBy",n.trackBySection),e.xp6(2),e.Q6J("ngIf",n.blockElements)}},dependencies:[g.mk,g.sg,g.O5,g.RF,g.n9,g.ED,p.gY,p.Gk,p.gW,p.k9,p.I_,m._Y,m.YN,m.Kr,m.Fj,m.Wl,m.EJ,m.JJ,m.JL,m.Q7,m.sg,m.u,m.x0,m.CE,p.uN,p.Pz,p.nv,p.Is,p.Vx,p.tO,p.Dy,p._D,p._L,ht.x,C.Wj,C.Zt,C.Bh,le.g,Oe.L,p.Pm,J.ym,wt,se,qe,g.Ov,ce.c,Pe.m,R.k,ba,Ee.Z,M.H,K.l,Z.X$,re,wa,ya],styles:["label.title[_ngcontent-%COMP%]{padding:0 0 0 46px;position:relative}label.title[_ngcontent-%COMP%] .arrow[_ngcontent-%COMP%]{position:absolute;background:url(flow.78934a7b4f2b1643.png) no-repeat scroll 0 0 transparent;height:40px;width:43px;top:0;left:0}.add-section-alert[_ngcontent-%COMP%]{box-shadow:inset 0 0 30px #0000001a}.add-section-alert[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:first-child{border-radius:0 0 0 7px;border-right:1px solid #ddd}.add-section-alert[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:last-child{border-radius:0 0 7px}.add-section-alert[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:#fff;box-shadow:inset 0 3px 20px #0003}.add-section-alert[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%]{color:#32414e}.add-section-alert[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:var(--bs-info)}ul.sectionWrapper[_ngcontent-%COMP%]{z-index:0;margin:0;padding:0;position:relative;background:url(flowPlain.622fc58385f45462.png) repeat-y scroll 0 0 transparent}ul.sectionWrapper[_ngcontent-%COMP%] li.sectionItem[_ngcontent-%COMP%]{padding:0;margin:0;background:transparent;position:relative}ul.sectionWrapper[_ngcontent-%COMP%] li.sectionItem[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{padding:0 0 15px 45px}ul.sectionWrapper[_ngcontent-%COMP%] li.sectionItem[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] button.btn-outline-dark[_ngcontent-%COMP%]:hover{background-color:#00000059}ul.sectionWrapper[_ngcontent-%COMP%] li.sectionItem[_ngcontent-%COMP%] .pauseSwitch[_ngcontent-%COMP%]{outline:none;position:absolute;min-width:1px!important;padding:0;margin:0;z-index:1;
1background:url(flow.78934a7b4f2b1643.png) no-repeat scroll -100px bottom #f6f6f6;bottom:0;left:0;width:30px;height:50px}ul.sectionWrapper[_ngcontent-%COMP%] li.sectionItem[_ngcontent-%COMP%] .flow[_ngcontent-%COMP%]{background:url(flow.78934a7b4f2b1643.png) no-repeat scroll -50px 0 transparent;transition:background-color .5s;position:absolute;top:0;left:0;width:43px;height:100%}ul.sectionWrapper[_ngcontent-%COMP%] li.sectionItem.pause[_ngcontent-%COMP%] .flow[_ngcontent-%COMP%], ul.sectionWrapper[_ngcontent-%COMP%] li.sectionItem.last[_ngcontent-%COMP%] .flow[_ngcontent-%COMP%], ul.sectionWrapper[_ngcontent-%COMP%] li.sectionItem.last.pause[_ngcontent-%COMP%] .flow[_ngcontent-%COMP%]{background:url(flow.78934a7b4f2b1643.png) no-repeat scroll -150px 0 #f6f6f6;height:100%}ul.sectionWrapper[_ngcontent-%COMP%] li.sectionItem.specialSection[_ngcontent-%COMP%] .flow[_ngcontent-%COMP%], ul.sectionWrapper[_ngcontent-%COMP%] li.sectionItem.approvalSection[_ngcontent-%COMP%] .flow[_ngcontent-%COMP%]{background:none}ul.sectionWrapper[_ngcontent-%COMP%] li.sectionItem.specialSection.hideFlow[_ngcontent-%COMP%] .flow[_ngcontent-%COMP%], ul.sectionWrapper[_ngcontent-%COMP%] li.sectionItem.approvalSection.hideFlow[_ngcontent-%COMP%] .flow[_ngcontent-%COMP%]{background:#f6f6f6;height:100%}.advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{min-width:100px}.advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.action[_ngcontent-%COMP%], .advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.action[_ngcontent-%COMP%]{width:34px;min-width:34px}.advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus, .advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus, .advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus, .advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus{min-width:300px}.advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] .datetime[_ngcontent-%COMP%] .date-time[_ngcontent-%COMP%], .advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .datetime[_ngcontent-%COMP%] .date-time[_ngcontent-%COMP%]{min-width:265px}.advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] .datetime[_ngcontent-%COMP%] .date[_ngcontent-%COMP%], .advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .datetime[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{min-width:130px}.advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] .datetime[_ngcontent-%COMP%] .time[_ngcontent-%COMP%], .advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .datetime[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{min-width:100px}.advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], .advancedTable[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{max-width:300px}.cdk-drag-handle[_ngcontent-%COMP%] .fa-ellipsis-v.fa-lg[_ngcontent-%COMP%]{width:7px}"]})};z=(0,P.gn)([(0,u.c)()],z);var Qe=d(6873);let Mr=(()=>{class i{transform(t,n){let l=!1;return t&&t.forEach(a=>{a.fieldType===s.bA.Approval&&!a.isDeleted&&(l=!0)}),n||(l=!0),l}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275pipe=e.Yjl({name:"isThereAnApproval",type:i,pure:!0})}return i})(),Jr=(()=>{class i{transform(t){return s.b$[t]||""}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275pipe=e.Yjl({name:"fieldTypeDesc",type:i,pure:!0})}return i})();function Dr(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",8),e.NdJ("cdkDropListExited",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.onDropListEntered(l,"section"))})("cdkDropListEntered",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.setDraggedItemPlaceholderState(!0))}),e.TgZ(1,"button",9),e.NdJ("cdkDragDropped",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.onDragDropped(l,"section"))})("click",function(){const a=e.CHM(t).$implicit,r=e.oxw(2);return e.KtG(r.addSection(a))}),e.ALo(2,"isThereAnApproval"),e._UZ(3,"i",10),e.ALo(4,"fieldTypeIconClass"),e.TgZ(5,"span",11),e._uU(6),e.ALo(7,"fieldTypeDesc"),e.qZA(),e._UZ(8,"i",12),e.qZA()()}if(2&i){const t=o.$implicit,n=o.index,l=e.oxw(2);e.Q6J("id",n+"")("cdkDropListData",l.FormBuilderSections),e.xp6(1),e.Q6J("cdkDragData",t)("disabled",(t.fieldType===l.SectionType.Trigger||t.fieldType===l.SectionType.Approval)&&l.blockElements||t.fieldType===l.SectionType.Approval&&e.xi3(2,7,l.workflowForm.value.sections,l.workflowForm.value.isWorkflow)),e.uIk("dragIndex",n),e.xp6(2),e.Q6J("ngClass",e.lcZ(4,10,t.fieldType)),e.xp6(3),e.Oqu(e.l
1cZ(7,12,t.fieldType))}}function Er(i,o){1&i&&(e.TgZ(0,"span",20),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.hij("",e.lcZ(2,1,"FORM.New"),"!"))}function Qr(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",17),e.NdJ("cdkDragStarted",function(){e.CHM(t);const l=e.oxw(4);return e.KtG(l.onDragStart())})("cdkDragDropped",function(l){e.CHM(t);const a=e.oxw(4);return e.KtG(a.onDragDropped(l,"field"))})("click",function(){e.CHM(t);const l=e.oxw(2).$implicit,a=e.oxw(2);return e.KtG(a.addField(l))}),e._UZ(1,"i",10),e.ALo(2,"fieldTypeIconClass"),e.TgZ(3,"span",18),e._uU(4),e.ALo(5,"fieldTypeDesc"),e.qZA(),e.YNc(6,Er,3,3,"span",19),e._UZ(7,"i",12),e.qZA()}if(2&i){const t=e.oxw(2),n=t.$implicit,l=t.index,a=e.oxw(2);e.Q6J("cdkDragData",n)("disabled",a.blockElements),e.uIk("dragIndex",l),e.xp6(1),e.Q6J("ngClass",e.lcZ(2,6,n.fieldType)),e.xp6(3),e.Oqu(e.lcZ(5,8,n.fieldType)),e.xp6(2),e.Q6J("ngIf",n.fieldType===a.SectionFieldType.AddChild)}}function Br(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"button",21),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2).$implicit,a=e.oxw(2);return e.KtG(a.featureRequest(l.fieldType))}),e._UZ(1,"i",10),e.ALo(2,"fieldTypeIconClass"),e.TgZ(3,"span",22),e._uU(4),e.ALo(5,"fieldTypeDesc"),e.qZA(),e.TgZ(6,"span",20),e._uU(7),e.ALo(8,"translate"),e.qZA()()}if(2&i){const t=e.oxw(2).$implicit;e.xp6(1),e.Q6J("ngClass",e.lcZ(2,3,t.fieldType)),e.xp6(3),e.hij(" ",e.lcZ(5,5,t.fieldType),""),e.xp6(3),e.hij("",e.lcZ(8,7,"FORM.New"),"!")}}function Yr(i,o){if(1&i&&(e.TgZ(0,"div",14),e.YNc(1,Qr,8,10,"button",15),e.YNc(2,Br,9,9,"button",16),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("ngIf",n.user.companyHasAsset||t.fieldType!==n.SectionFieldType.Asset&&t.fieldType!==n.SectionFieldType.Hierarchy),e.xp6(1),e.Q6J("ngIf",!n.user.companyHasAsset&&(t.fieldType===n.SectionFieldType.Asset||t.fieldType===n.SectionFieldType.Hierarchy))}}function Vr(i,o){if(1&i&&(e.ynx(0),e.YNc(1,Yr,3,2,"div",13),e.BQk()),2&i){const t=o.$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.fieldType!==n.SectionFieldType.CustomScript&&t.fieldType!==n.SectionFieldType.IotDeviceDataPoint&&t.fieldType!==n.SectionFieldType.IotDeviceChart&&t.fieldType!==n.SectionFieldType.IotDeviceCmd)}}function Rr(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",14)(1,"button",23),e.NdJ("click",function(){e.CHM(t);const l=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a.addField(l))}),e._UZ(2,"i",10),e.ALo(3,"fieldTypeIconClass"),e.TgZ(4,"span",11),e._uU(5),e.ALo(6,"fieldTypeDesc"),e.qZA(),e._UZ(7,"i",12),e.qZA()()}if(2&i){const t=e.oxw().$implicit;e.oxw(2),e.xp6(1),e.Q6J("disabled",!0),e.xp6(1),e.Q6J("ngClass",e.lcZ(3,3,t.fieldType)),e.xp6(3),e.Oqu(e.lcZ(6,5,t.fieldType))}}function Hr(i,o){if(1&i&&(e.ynx(0),e.YNc(1,Rr,8,7,"div",13),e.BQk()),2&i){const t=o.$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.fieldType===n.SectionFieldType.IotDeviceDataPoint||t.fieldType===n.SectionFieldType.IotDeviceChart||t.fieldType===n.SectionFieldType.IotDeviceCmd)}}function Gr(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",2),e.ALo(1,"async"),e.TgZ(2,"div",3)(3,"h6"),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"div",4),e.YNc(7,Dr,9,14,"div",5),e.qZA(),e.TgZ(8,"div",6),e.NdJ("cdkDropListExited",function(l){e.CHM(t);const a=e.oxw();return e.KtG(a.onDropListEntered(l,"field"))})("cdkDropListEntered",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.setDraggedItemPlaceholderState(!0))}),e.TgZ(9,"h6"),e._uU(10),e.ALo(11,"translate"),e.qZA(),e.TgZ(12,"div",4),e.YNc(13,Vr,2,1,"ng-container",7),e.qZA(),e.TgZ(14,"h6"),e._uU(15),e.ALo(16,"translate"),e.qZA(),e.TgZ(17,"div",4),e.YNc(18,Hr,2,1,"ng-container",7),e.qZA()()()()}if(2&i){const t=e.oxw(),n=e.MAs(2);let l;e.ekj("disable-tutorial-click",null==(l=e.lcZ(1,18,t.tutorial$))?null:l.disableClick)("hide-drag-placeholder",t.hideDraggedItemPlaceholder),e.Q6J("joyrideStep",t.OnboardingStepId.WorkflowNew+"-4")("stepPosition","right")("stepContent",n),e.xp6(4),e.Oqu(e.lcZ(5,20,"FORM.Workflow Sections")),e.xp6(3),e.Q6J("ngForOf",t.FormBuilderSections)("ngForTrackBy",t.trackBy),e.xp6(1),e.Q6J("cdkDropListConnectedTo",t.fieldsDropList)("cdkDropListData",t.FormBuilderElements),e.xp6(2),e.Oqu(e.l
1cZ(11,22,"FORM.Workflow Elements")),e.xp6(3),e.Q6J("ngForOf",t.FormBuilderElements)("ngForTrackBy",t.trackBy),e.xp6(2),e.Oqu(e.lcZ(16,24,"FORM.Workflow IoT Elements")),e.xp6(3),e.Q6J("ngForOf",t.FormBuilderElements)("ngForTrackBy",t.trackBy)}}function $r(i,o){1&i&&e._UZ(0,"ff-tutorial",24)}let jr=(()=>{class i{constructor(t,n,l){this.onboardingService=t,this.mixpanelService=n,this.dragHandling=l,this.fieldsDropList=[],this.addNewSectionField=new e.vpe,this.addNewSection=new e.vpe,this.IntercomTrackEvent=O.Q,this.FormBuilderElements=oe,this.FormBuilderSections=V,this.dragFieldsLength=oe.length,this.dragSectionsLength=V.length,this.OnboardingStepId=Y.L,this.SectionType=s.bA,this.SectionFieldType=s.ii,this.hideDraggedItemPlaceholder=!1}ngOnInit(){this.tutorial$=this.onboardingService.tutorial$}onDragStart(){this.dragHandling.isDragging.next(!0)}onDropListEntered(t,n){const l=t.item.element.nativeElement.getAttribute("dragIndex");l&&("field"===n&&t.container.data.length===this.dragFieldsLength&&this.FormBuilderElements.splice(+l,0,this.FormBuilderElements[+l]),"section"===n&&t.container.data.length===this.dragSectionsLength&&this.FormBuilderSections.splice(+l,0,this.FormBuilderSections[+l]))}onDragDropped(t,n){this.setDraggedItemPlaceholderState(!1);const l=t.item.element.nativeElement.getAttribute("dragIndex");l&&("field"===n&&t.previousContainer.data.length>this.dragFieldsLength&&this.FormBuilderElements.splice(+l,1),"section"===n&&t.previousContainer.data.length>this.dragSectionsLength&&this.FormBuilderSections.splice(+l,1)),this.dragHandling.isDragging.next(!1)}setDraggedItemPlaceholderState(t){this.hideDraggedItemPlaceholder=t}featureRequest(t){window.Intercom("showNewMessage",`Hello, I'm interested in the '${t}' feature.`);const l={feature:t,fullname:this.user.fullName,email:this.user.email};window.Intercom("trackEvent",O.Q.IntegrationClick,l),this.mixpanelService.track(O.Q.IntegrationClick,l)}addField(t){[s.ii.IotDeviceChart,s.ii.IotDeviceDataPoint,s.ii.IotDeviceCmd].includes(t.fieldType)&&(window.Intercom("trackEvent",O.Q[t.fieldType]),this.mixpanelService.track(O.Q[t.fieldType]),window.Intercom("update",{last_request_at:Math.floor(Date.now()/1e3)})),this.addNewSectionField.emit({field:t,newIndex:null,newSectionIndex:null})}addSection(t){this.addNewSection.emit({section:t,newIndex:null})}trackBy(t,n){return n.fieldType}static#e=this.\u0275fac=function(n){return new(n||i)(e.Y36(H.D),e.Y36(Qe.h),e.Y36($))};static#t=this.\u0275cmp=e.Xpm({type:i,selectors:[["ff-new-element-sidebar"]],inputs:{user:"user",workflowForm:"workflowForm",blockElements:"blockElements",fieldsDropList:"fieldsDropList"},outputs:{addNewSectionField:"addNewSectionField",addNewSection:"addNewSection"},decls:3,vars:1,consts:[["class","wrap drop-list-data",3,"joyrideStep","stepPosition","stepContent","disable-tutorial-click","hide-drag-placeholder",4,"ngIf"],["stepContent4",""],[1,"wrap","drop-list-data",3,"joyrideStep","stepPosition","stepContent"],[1,"bg-white"],[1,"list-group"],["class","list-group-item list-group-item-action p-0","cdkDropList","","cdkDropListConnectedTo","sectionsDropList","cdkDropListSortingDisabled","",3,"id","cdkDropListData","cdkDropListExited","cdkDropListEntered",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDropList","","cdkDropListSortingDisabled","",3,"cdkDropListConnectedTo","cdkDropListData","cdkDropListExited","cdkDropListEntered"],[4,"ngFor","ngForOf","ngForTrackBy"],["cdkDropList","","cdkDropListConnectedTo","sectionsDropList","cdkDropListSortingDisabled","",1,"list-group-item","list-group-item-action","p-0",3,"id","cdkDropListData","cdkDropListExited","cdkDropListEntered"],["cdkDrag","","type","button","data-cy","addSection",1,"btn","border-0","w-100","d-flex","justify-content-between","align-items-center",3,"cdkDragData","disabled","cdkDragDropped","click"],[1,"fa","mx-2","flex-shrink-1",3,"ngClass"],[1,"text-start","flex-grow-1"],[1,"fa","fa-chevron-right","flex-shrink-1","pe-1"],["class","list-group-item list-group-item-action p-0",4,"ngIf"],[1,"list-group-item","list-group-item-action","p-0"],["cdkDrag","","type","button","data-cy","addField","class","btn border-0 w-100 d-flex justify-content-between align-items-center",3,"cdkDragData","disabled","cdkDragStarted","cdkDragDropped","click",4,"ngIf"],["type","button","class","btn border-0 bg-light w-100 d-flex justify-content-between align-items-center",3,"click",4,"ngIf"],["cdkDrag","","type","button","data-cy","addField",1,"btn","border-0","w-100","d-flex","justify-content-between","align-items-center",3,"cdkDragData","disabled","cdkDragStarted","cdkDragDropped","click"],["data-cy","fieldFieldType",1,"text-start","flex-grow-1"],["class","badge text-bg-danger fs-11 rounded-pill me-1",4,"ngIf"],[1,"badge","text-bg-danger","fs-11","rounded-pill","me-1"],["type","button",1,"btn","border-0","bg-light","w-100","d-flex","justify-content-between","align-items-center",3,"click"],["data-cy","fieldFieldType",1,"text-start","text-grey-dark","flex-grow-1"],["cdkDrag","","type","button",1,"btn","border-0","w-100","d-flex","justify-content-between","align-items-center",3,"disabled","click"],["text","Drag & drop sections or elements to customize your workflow."]],template:function(n,l){1&n&&(e.YNc(0,Gr,19,26,"div",0),e.YNc(1,$r,1,0,"ng-template",null,1,e.W1O)),2&n&&e.Q6J("ngIf",l.workflowForm)},dependencies:[g.mk,g.sg,g.O5,C.Wj,C.Zt,le.g,J.ym,g.Ov,Z.X$,Mr,re,Jr],styles:["h6[_ngcontent-%COMP%]{font-size:12px;font-weight:700;text-transform:uppercase;margin:0;padding:20px 15px 10px;color:var(--color-grey-dark)}.list-group[_ngcontent-%COMP%]{border-radius:0}.list-group[_ngcontent-%COMP%] > .list-group-item[_ngcontent-%COMP%]{border-left:none;border-right:none;border-color:#eee}.list-group[_ngcontent-%COMP%] > .list-group-item[_ngcontent-%COMP%] button.btn.w-100[_ngcontent-%COMP%]{font-size:13px;line-height:1.5;padding:4px 5px 4px 0;border-radius:0}@media (max-width: 991px){.list-group[_ngcontent-%COMP%] > .list-group-item[_ngcontent-%COMP%] button.btn.w-100[_ngcontent-%COMP%]{padding:4px 8px}}.list-group[_ngcontent-%COMP%] > .list-group-item[_ngcontent-%COMP%] button.btn.w-100[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:var(--color-grey)}@media (max-width: 991px){.list-group[_ngcontent-%COMP%] > .list-group-item[_ngcontent-%COMP%] button.btn.w-100[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{display:none}}.list-group[_ngcontent-%COMP%] > .list-group-item[_ngcontent-%COMP%] button.btn.w-100[_ngcontent-%COMP%]:active i[_ngcontent-%COMP%]{color:var(--bs-info)}.list-group[_ngcontent-%COMP%] > .list-group-item[_ngcontent-%COMP%] button.btn.w-100[_ngcontent-%COMP%]:disabled{border-color:transparent;opacity:.2}.cdk-drag-placeholder[_ngcontent-%COMP%]{box-shadow:0 0 20px #0000001a inset;background-color:var(--color-white);opacity:.75;padding:10px;font-size:14px}.cdk-drag-placeholder[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:var(--color-grey)}.cdk-drag-preview[_ngcontent-%COMP%]{border-radius:10px!important;width:280px;max-width:280px;background-color:var(--color-white);opacity:.5;font-size:14px;height:47px!important;box-shadow:0 5px 5px -3px #0003;display:block;line-height:2;padding:13px 10px!important}.hide-drag-placeholder[_ngcontent-%COMP%] .cdk-drag-placeholder[_ngcontent-%COMP%]{display:none!important}"]})}return i})(),_e=(()=>{class i{constructor(){this.previewTriggerSections$=new G.X({})}setPreviewSection(t,n){const l=this.previewTriggerSections$.getValue();l[t]={show:!0,section:n},this.previewTriggerSections$.next(l)}togglePreviewTrigger(t,n){const l=this.previewTriggerSections$.getValue();l[t].show=n,this.previewTriggerSections$.next(l)}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275prov=e.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function Kr(i,o){1&i&&e._UZ(0,"i",8)}function zr(i,o){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"findItemByKey"),e.qZA()),2&i){const t=o.$implicit,n=e.oxw(3);let l;e.xp6(1),e.hij(" ",null==(l=e.Dn7(2,1,n.teams,"id",t))?null:l.teamName," ")}}function Wr(i,o){1&i&&e._UZ(0,"i",9)}function Xr(i,o){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"findItemByKey"),e.qZA()),2&i){const t=o.$implicit,n=e.oxw(3);let l;e.xp6(1),e.hij(" ",null==(l=e.Dn7(2,1,n.users,"id",t))?null:l.fullName," ")}}function es(i,o){1&i&&e._UZ(0,"i",10)}function ts(i,o){1&i&&(e.TgZ(0,"span"),e._uU(1," Unassigned "),e.qZA())}function is(i,o){if(1&i&&(e.TgZ(0,"div",4),e._uU(1),e.ALo(2,"translate"),e.TgZ(3,"div"),e.YNc(4,Kr,1,0,"i",5),e.YNc(5,zr,3,5,"span",2),e.YNc(6,Wr,1,0,"i",6),e.YNc(7,Xr,3,5,"span",2),e.YNc(8,es,1,0,"i",7),e.YNc(9,ts,2,0,"span",1),e.qZA()()),2&i){const t=e.oxw(2);e.xp6(1),e.hij(" ",e.lcZ(2,9,"FORM.Assigned to")," "),e.xp6(3),e.Q6J("ngIf",null==t.section.parsedAssignees||null==t.section.parsedAssignees.teams?null:t.section.parsedAssignees.teams.length),e.xp6(1),e.Q6J("ngForOf",null==t.section.parsedAssignees?null:t.section.parsedAssignees.teams)("ngForTrackBy",t.trackByItem),e.xp6(1),e.Q6J("ngIf",null==t.section.parsedAssignees||null==t.section.parsedAssignees.users?null:t.section.parsedAssignees.users.length),e.xp6(1),e.Q6J("ngForOf",null==t.section.parsedAssignees?null:t.section.parsedAssignees.users)("ngForTrackBy",t.trackByItem),e.xp6(1),e.Q6J("ngIf",!(null!=t.section.parsedAssignees&&null!=t.section.parsedAssignees.teams&&t.section.parsedAssignees.teams.length||null!=t.section.parsedAssignees&&null!=t.section.parsedAssignees.users&&t.section.parsedAssignees.users.length)),e.xp6(1),e.Q6J("ngIf",!(null!=t.section.parsedAssignees&&null!=t.section.parsedAssignees.teams&&t.section.parsedAssignees.teams.length||null!=t.section.parsedAssignees&&null!=t.section.parsedAssignees.users&&t.section.parsedAssignees.users.length))}}
1function ns(i,o){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,is,10,11,"div",3),e.qZA()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.workflowForm.value.isWorkflow)}}function os(i,o){if(1&i&&(e.TgZ(0,"div",4)(1,"div",12)(2,"h6",13),e._uU(3),e.qZA(),e.TgZ(4,"div",14),e._UZ(5,"input",15),e.TgZ(6,"label",16),e._uU(7),e.ALo(8,"translate"),e._UZ(9,"i",17),e.qZA(),e._UZ(10,"input",18),e.TgZ(11,"label",19),e._uU(12),e.ALo(13,"translate"),e._UZ(14,"i",20),e.qZA()()()()),2&i){const t=e.oxw(),n=t.$implicit,l=t.index;e.xp6(3),e.Oqu(n.label),e.xp6(2),e.MGl("id","",n.id,"1"),e.Q6J("name","btnradio"+l),e.xp6(1),e.MGl("for","",n.id,"1"),e.xp6(1),e.hij("",e.lcZ(8,9,"FORM.Approve")," "),e.xp6(3),e.MGl("id","",n.id,"2"),e.Q6J("name","btnradio"+l),e.xp6(1),e.MGl("for","",n.id,"2"),e.xp6(1),e.hij("",e.lcZ(13,11,"FORM.Reject")," ")}}function ls(i,o){if(1&i&&(e.TgZ(0,"div"),e.YNc(1,os,15,13,"div",11),e.qZA()),2&i){const t=o.$implicit,n=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.isDeleted&&t.label!==n.SectionFieldLabel.Invisible&&t.fieldType!==n.SectionType.Approval&&t.fieldType!==n.SectionType.Trigger)}}let as=(()=>{class i{constructor(){this.SectionFieldType=s.ii,this.SectionFieldLabel=s.b$,this.SectionType=s.bA}trackById(t,n){return n.id}trackByItem(t,n){return n}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275cmp=e.Xpm({type:i,selectors:[["ff-form-preview-approval-section"]],inputs:{section:"section",workflowForm:"workflowForm",users:"users",teams:"teams"},decls:4,vars:4,consts:[[1,"m-2","my-3","fw-semibold"],[4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["class"," bg-white border rounded p-3 m-1 mb-0 shadow",4,"ngIf"],[1,"bg-white","border","rounded","p-3","m-1","mb-0","shadow"],["class","fa fa-users text-info",4,"ngIf"],["class","fa fa-user text-info",4,"ngIf"],["class","fa fa-user-times text-info",4,"ngIf"],[1,"fa","fa-users","text-info"],[1,"fa","fa-user","text-info"],[1,"fa","fa-user-times","text-info"],["class","bg-white border rounded p-3 m-1 mb-0 shadow",4,"ngIf"],[1,"switchGroup"],["data-cy","fieldName",1,"fw-semibold","m-0"],["role","group","aria-label","Basic radio toggle button group",1,"btn-group","w-100","my-1"],["checked","","type","radio","autocomplete","off",1,"btn-check",3,"id","name"],[1,"btn","btn-outline-success","btn-sm",3,"for"],[1,"far","fa-thumbs-up"],["type","radio","autocomplete","off",1,"btn-check",3,"id","name"],[1,"btn","btn-outline-danger","btn-sm",3,"for"],[1,"far","fa-thumbs-down"]],template:function(n,l){1&n&&(e.TgZ(0,"p",0),e._uU(1),e.qZA(),e.YNc(2,ns,2,1,"div",1),e.YNc(3,ls,2,1,"div",2)),2&n&&(e.xp6(1),e.Oqu(l.section.label),e.xp6(1),e.Q6J("ngIf",l.workflowForm.value.isWorkflow),e.xp6(1),e.Q6J("ngForOf",l.workflowForm.value.sections)("ngForTrackBy",l.trackById))},dependencies:[g.sg,g.O5,M.H,Z.X$],encapsulation:2})}return i})();var Be=d(9942);let rs=(()=>{class i{transform(t){let n=!1;return"trigger.task"===t.triggerType&&(t?.parsedAssignees?.users?.length||t?.parsedAssignees?.teams?.length)&&(n=!0),n}static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275pipe=e.Yjl({name:"showCreateTaskPreview",type:i,pure:!0})}return i})();function ss(i,o){1&i&&e._UZ(0,"i",15)}function cs(i,o){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"findItemByKey"),e.qZA()),2&i){const t=o.$implicit,n=e.oxw(3);let l;e.xp6(1),e.hij(" ",null==(l=e.Dn7(2,1,n.teams,"id",t))?null:l.teamName," ")}}function _s(i,o){1&i&&e._UZ(0,"i",16)}function ds(i,o){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"findItemByKey"),e.qZA()),2&i){const t=o.$implicit,n=e.oxw(3);let l;e.xp6(1),e.hij(" ",null==(l=e.Dn7(2,1,n.users,"id",t))?null:l.fullName," ")}}function ps(i,o){1&i&&e._UZ(0,"i",17)}function ms(i,o){1&i&&(e.TgZ(0,"span",18),e._uU(1," Unassigned"),e.qZA())}function gs(i,o){if(1&i&&(e.TgZ(0,"div",7)(1,"div",8)(2,"div",9)(3,"h6",5),e._uU(4,"Assigned to"),e.qZA(),e.TgZ(5,"p",10),e.YNc(6,ss,1,0,"i",11),e.YNc(7,cs,3,5,"span",2),e.YNc(8,_s,1,0,"i",12),e.YNc(9,ds,3,5,"span",2),e.YNc(10,ps,1,0,"i",13),e.YNc(11,ms,2,0,"span",14),e.qZA()()()()),2&i){const t=e.oxw(2);e.xp6(6),e.Q6J("ngIf",null==t.section.parsedAssignees||null==t.section.parsedAssignees.teams?null:t.section.parsedAssignees.teams.length),e.xp6(1),e.Q6J("ngForOf",null==t.section.parsedAssignees?null:t.section.parsedAssignees.teams)("ngForTrackBy",t.trackByItem),e.xp6(1),e.Q6J("ngIf",null==t.section.parsedAssignees||null==t.section.parsedAssignees.users?null:t.section.parsedAssignees.users.length),e.xp6(1),e.Q6J("ngForOf",null==t.section.parsedAssignees?null:t.section.parsedAssignees.users)("ngForTrackBy",t.trackByItem),e.xp6(1),e.Q6J("ngIf",!(null!=t.section.parsedAssignees&&null!=t.section.parsedAssignees.teams&&t.section.parsedAssignees.teams.length||null!=t.section.parsedAssignees&&null!=t.section.parsedAssignees.users&&t.section.parsedAssignees.users.length)),e.xp6(1),e.Q6J("ngIf",!(null!=t.section.parsedAssignees&&null!=t.section.parsedAssignees.teams&&t.section.parsedAssignees.teams.length||null!=t.section.parsedAssignees&&null!=t.section.parsedAssignees.users&&t.section.parsedAssignees.users.length))}}function us(i,o){if(1&i&&(e.TgZ(0,"div")(1,"div",4)(2,"h5",5),e._uU(3),e.qZA()(),e.YNc(4,gs,12,8,"div",6),e.qZA()),2&i){const t=e.oxw();e.xp6(3),e.Oqu(t.section.label),e.xp6(1),e.Q6J("ngIf",t.workflowForm.value.isWorkflow)}}function fs(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e._uU(5,"123 Sample Address"),e._UZ(6,"br"),e.TgZ(7,"small")(8,"strong"),e._uU(9," Lat: "),e.qZA(),e._uU(10," XX / "),e.TgZ(11,"strong"),e._uU(12," Long: "),e.qZA(),e._uU(13," XX"),e.qZA()()(),e._UZ(14,"i",25),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label)}}function vs(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e._uU(5,"9876543210"),e.qZA()(),e._UZ(6,"i",26),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label)}}function hs(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",27),e._uU(5,"Tap here to assign"),e.qZA()(),e._UZ(6,"i",28),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label)}}function xs(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e._uU(5,"95"),e.qZA()(),e._UZ(6,"i",29),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label)}}function Ts(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e._uU(5,"Commands"),e.qZA()(),e._UZ(6,"i",30),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label)}}function bs(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e._uU(5,"View Chart"),e.qZA()(),e._UZ(6,"i",31),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label)}}function ws(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e._uU(5,"Sample text #1"),e.qZA()()()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label)}}function ys(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e._uU(5,"95"),e.qZA()()()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label)}}function Fs(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e._uU(5,"Sample text..."),e.qZA()()()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label)}}function Zs(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",38),e._uU(2),e.TgZ(3,"div",39)(4,"div",8)(5,"div",9)(6,"h6",5),e._uU(7,"Comment"),e.qZA(),e.TgZ(8,"p",40),e._uU(9,"Tap here to add comments"),e.qZA()()()(),e.TgZ(10,"div",41)(11,"div",8)(12,"div",9)(13,"h6",5),e._uU(14,"Photos"),e.qZA(),e.TgZ(15,"p",40),e._uU(16,"Tap here to edit"),e.qZA()(),e._UZ(17,"i",42),e.qZA()()(),e.BQk()),2&i){const t=o.$implicit;e.xp6(2),e.hij(" ",t.triggerMessage," ")}}function As(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",38),e._uU(2),e.ALo(3,"valueByKey"),e.qZA(),e.BQk()),2&i){const t=e.oxw(3).$implicit,n=e.oxw();e.xp6(2),e.hij(" ",e.xi3(3,1,n.smartResponseStates[t.id].triggersByType.table[0],"triggerMessage")," ")}}function Cs(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",38),e._uU(2),e.qZA(),e.BQk()),2&i){const t=o.$implicit;e.xp6(2),e.hij(" ",t.triggerMessage," ")}}function ks(i,o){1&i&&(e.TgZ(0,"div",38),e._uU(1," A task will be assigned. "),e.qZA())}function Ss(i,o){if(1&i&&(e.ynx(0),e.YNc(1,ks,2,0,"div",43),e.ALo(2,"showCreateTaskPreview"),e.BQk()),2&i){const t=o.$implicit;e.xp6(1),e.Q6J("ngIf",e.lcZ(2,1,t))}}const S=function(){return[]};function Ns(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",32)(1,"h6",24),e._uU(2),e.qZA(),e.TgZ(3,"div",33)(4,"input",34),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2).$implicit,a=e.oxw();return e.KtG(a.setFieldState(l,0))}),e.ALo(5,"split"),e.qZA(),e.TgZ(6,"label",35),e._uU(7),e.ALo(8,"split"),e.qZA(),e.TgZ(9,"input",36),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2).$implicit,a=e.oxw();return e.KtG(a.setFieldState(l,1))}),e.ALo(10,"split"),e.ALo(11,"split"),e.qZA(),e.TgZ(12,"label",37),e._uU(13),e.ALo(14,"split"),e.qZA()(),e.YNc(15,Zs,18,1,"ng-container",2),e.ALo(16,"filterArrayByValue"),e.YNc(17,As,4,4,"ng-container",0),e.YNc(18,Cs,3,1,"ng-container",2),e.ALo(19,"filterArrayByValue"),e.YNc(20,Ss,3,3,"ng-container",2),e.ALo(21,"filterArrayByValue"),e.qZA()}if(2&i){const t=e.oxw(2),n=t.$implicit,l=t.index,a=e.oxw();let r,c,_,h,T;e.xp6(2),e.Oqu(n.label),e.xp6(2),e.MGl("id","",n.id,"1"),e.Q6J("name","boolean"+l)("checked",n.defaultValue===(null==(r=e.xi3(5,19,n.typeLogic,"|"))?null:r[0])),e.xp6(2),e.MGl("for","",n.id,"1"),e.xp6(1),e.Oqu((null==(c=e.xi3(8,22,n.typeLogic,"|"))?null:c[0])||"Yes"),e.xp6(2),e.MGl("id","",n.id,"2"),e.Q6J("name","boolean"+l)("value",null==(_=e.xi3(10,25,n.typeLogic,"|"))?null:_[0])("checked",n.defaultValue===(null==(h=e.xi3(11,28,n.typeLogic,"|"))?null:h[1])),e.xp6(3),e.MGl("for","",n.id,"2"),e.xp6(1),e.Oqu((null==(T=e.xi3(14,31,n.typeLogic,"|"))?null:T[1])||"No"),e.xp6(2),e.Q6J("ngForOf",e.Dn7(16,34,(null==a.smartResponseStates[n.id]||null==a.smartResponseStates[n.id].triggersByType?null:a.smartResponseStates[n.id].triggersByType.commentPhoto)||e.DdM(46,S),"trigger",(null==a.smartResponseStates[n.id]?null:a.smartResponseStates[n.id].state)||""))("ngForTrackBy",a.trackById),e.xp6(2),e.Q6J("ngIf",(null==a.smartResponseStates[n.id]||null==a.smartResponseStates[n.id].triggersByType||null==a.smartResponseStates[n.id].triggersByType.table||null==a.smartResponseStates[n.id].triggersByType.table[0]?null:a.smartResponseStates[n.id].triggersByType.table[0].trigger)&&(null==a.smartResponseStates[n.id]||null==a.smartResponseStates[n.id].triggersByType||null==a.smartResponseStates[n.id].triggersByType.table||null==a.smartResponseStates[n.id].triggersByType.table[0]?null:a.smartResponseStates[n.id].triggersByType.table[0].trigger)===(null==a.smartResponseStates[n.id]?null:a.smartResponseStates[n.id].state)),e.xp6(1),e.Q6J("ngForOf",e.Dn7(19,38,(null==a.smartResponseStates[n.id]||null==a.smartResponseStates[n.id].triggersByType?null:a.smartResponseStates[n.id].triggersByType.triggerSection)||e.DdM(47,S),"trigger",(null==a.smartResponseStates[n.id]?null:a.smartResponseStates[n.id].state)||""))("ngForTrackBy",a.trackById),e.xp6(2),e.Q6J("ngForOf",e.Dn7(21,42,(null==a.smartResponseStates[n.id]||null==a.smartResponseStates[n.id].triggersByType?null:a.smartResponseStates[n.id].triggersByType.task)||e.DdM(48,S),"trigger",(null==a.smartResponseStates[n.id]?null:a.smartResponseStates[n.id].state)||""))("ngForTrackBy",a.trackById)}}function qs(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",38),e._uU(2),e.TgZ(3,"div",39)(4,"div",8)(5,"div",9)(6,"h6",5),e._uU(7,"Comment"),e.qZA(),e.TgZ(8,"p",40),e._uU(9,"Tap here to add comments"),e.qZA()()()(),e.TgZ(10,"div",41)(11,"div",8)(12,"div",9)(13,"h6",5),e._uU(14,"Photos"),e.qZA(),e.TgZ(15,"p",40),e._uU(16,"Tap here to edit"),e.qZA()(),e._UZ(17,"i",42),e.qZA()()(),e.BQk()),2&i){const t=o.$implicit;e.xp6(2),e.hij(" ",t.triggerMessage," ")}}function Os(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",38),e._uU(2),e.ALo(3,"valueByKey"),e.qZA(),e.BQk()),2&i){const t=e.oxw(3).$implicit,n=e.oxw();e.xp6(2),e.hij(" ",e.xi3(3,1,n.smartResponseStates[t.id].triggersByType.table[0],"triggerMessage")," ")}}function Us(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",38),e._uU(2),e.qZA(),e.BQk()),2&i){const t=o.$implicit;e.xp6(2),e.hij(" ",t.triggerMessage," ")}}function Is(i,o){1&i&&(e.TgZ(0,"div",38),e._uU(1," A task will be assigned. "),e.qZA())}function Ps(i,o){if(1&i&&(e.ynx(0),e.YNc(1,Is,2,0,"div",43),e.ALo(2,"showCreateTaskPreview"),e.BQk()),2&i){const t=o.$implicit;e.xp6(1),e.Q6J("ngIf",e.lcZ(2,1,t))}}function Ls(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",32)(1,"h6",24),e._uU(2),e.qZA(),e.TgZ(3,"div",33)(4,"input",34),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2).$implicit,a=e.oxw();return e.KtG(a.setFieldState(l,0))}),e.ALo(5,"split"),e.qZA(),e.TgZ(6,"label",35),e._uU(7),e.ALo(8,"split"),e.qZA(),e.TgZ(9,"input",34),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2).$implicit,a=e.oxw();return e.KtG(a.setFieldState(l,1))}),e.ALo(10,"split"),e.qZA(),e.TgZ(11,"label",37),e._uU(12),e.ALo(13,"split"),e.qZA(),e.TgZ(14,"input",34),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2).$implicit,a=e.oxw();return e.KtG(a.setFieldState(l,2))}),e.ALo(15,"split"),e.qZA(),e.TgZ(16,"label",44),e._uU(17),e.ALo(18,"split"),e.qZA()(),e.YNc(19,qs,18,1,"ng-container",2),e.ALo(20,"filterArrayByValue"),e.YNc(21,Os,4,4,"ng-container",0),e.YNc(22,Us,3,1,"ng-container",2),e.ALo(23,"filterArrayByValue"),e.YNc(24,Ps,3,3,"ng-container",2),e.ALo(25,"filterArrayByValue"),e.qZA()}if(2&i){const t=e.oxw(2),n=t.$implicit,l=t.index,a=e.oxw();let r,c,_,h,T,f;e.xp6(2),e.Oqu(n.label),e.xp6(2),e.MGl("id","",n.id,"1"),e.Q6J("name","trilean"+l)("checked",n.defaultValue===(null==(r=e.xi3(5,23,n.typeLogic,"|"))?null:r[0])),e.xp6(2),e.MGl("for","",n.id,"1"),e.xp6(1),e.Oqu((null==(c=e.xi3(8,26,n.typeLogic,"|"))?null:c[0])||"Yes"),e.xp6(2),e.MGl("id","",n.id,"2"),e.Q6J("name","trilean"+l)("checked",n.defaultValue===(null==(_=e.xi3(10,29,n.typeLogic,"|"))?null:_[1])),e.xp6(2),e.MGl("for","",n.id,"2"),e.xp6(1),e.Oqu((null==(h=e.xi3(13,32,n.typeLogic,"|"))?null:h[1])||"No"),e.xp6(2),e.MGl("id","",n.id,"3"),e.Q6J("name","trilean"+l)("checked",n.defaultValue===(null==(T=e.xi3(15,35,n.typeLogic,"|"))?null:T[2])),e.xp6(2),e.MGl("for","",n.id,"3"),e.xp6(1),e.Oqu((null==(f=e.xi3(18,38,n.typeLogic,"|"))?null:f[2])||"N/A"),e.xp6(2),e.Q6J("ngForOf",e.Dn7(20,41,(null==a.smartResponseStates[n.id]||null==a.smartResponseStates[n.id].triggersByType?null:a.smartResponseStates[n.id].triggersByType.commentPhoto)||e.DdM(53,S),"trigger",(null==a.smartResponseStates[n.id]?null:a.smartResponseStates[n.id].state)||""))("ngForTrackBy",a.trackById),e.xp6(2),e.Q6J("ngIf",(null==a.smartResponseStates[n.id]||null==a.smartResponseStates[n.id].triggersByType||null==a.smartResponseStates[n.id].triggersByType.table||null==a.smartResponseStates[n.id].triggersByType.table[0]?null:a.smartResponseStates[n.id].triggersByType.table[0].trigger)&&(null==a.smartResponseStates[n.id]||null==a.smartResponseStates[n.id].triggersByType||null==a.smartResponseStates[n.id].triggersByType.table||null==a.smartResponseStates[n.id].triggersByType.table[0]?null:a.smartResponseStates[n.id].triggersByType.table[0].trigger)===(null==a.smartResponseStates[n.id]?null:a.smartResponseStates[n.id].state)),e.xp6(1),e.Q6J("ngForOf",e.Dn7(23,45,(null==a.smartResponseStates[n.id]||null==a.smartResponseStates[n.id].triggersByType?null:a.smartResponseStates[n.id].triggersByType.triggerSection)||e.DdM(54,S),"trigger",(null==a.smartResponseStates[n.id]?null:a.smartResponseStates[n.id].state)||""))("ngForTrackBy",a.trackById),e.xp6(2),e.Q6J("ngForOf",e.Dn7(25,49,(null==a.smartResponseStates[n.id]||null==a.smartResponseStates[n.id].triggersByType?null:a.smartResponseStates[n.id].triggersByType.task)||e.DdM(55,S),"trigger",(null==a.smartResponseStates[n.id]?null:a.smartResponseStates[n.id].state)||""))("ngForTrackBy",a.trackById)}}function Ms(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",40),e._uU(5,"Tap here to edit"),e.qZA()(),e._UZ(6,"i",42),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label)}}function Js(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9),e._UZ(2,"div",45),e.ALo(3,"safeHtml"),e.qZA()()),2&i){const t=e.oxw(2).$implicit;e.xp6(2),e.Q6J("innerHtml",e.lcZ(3,1,t.htmlLabel||t.label),e.oJD)}}function Ds(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",38),e._uU(2),e.TgZ(3,"div",39)(4,"div",8)(5,"div",9)
1(6,"h6",5),e._uU(7,"Comment"),e.qZA(),e.TgZ(8,"p",40),e._uU(9,"Tap here to add comments"),e.qZA()()()(),e.TgZ(10,"div",41)(11,"div",8)(12,"div",9)(13,"h6",5),e._uU(14,"Photos"),e.qZA(),e.TgZ(15,"p",40),e._uU(16,"Tap here to edit"),e.qZA()(),e._UZ(17,"i",42),e.qZA()()(),e.BQk()),2&i){const t=o.$implicit;e.xp6(2),e.hij(" ",t.triggerMessage," ")}}function Es(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",38),e._uU(2),e.ALo(3,"valueByKey"),e.qZA(),e.BQk()),2&i){const t=e.oxw(3).$implicit,n=e.oxw();e.xp6(2),e.hij(" ",e.xi3(3,1,n.smartResponseStates[t.id].triggersByType.table[0],"triggerMessage")," ")}}function Qs(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",38),e._uU(2),e.qZA(),e.BQk()),2&i){const t=o.$implicit;e.xp6(2),e.hij(" ",t.triggerMessage," ")}}function Bs(i,o){1&i&&(e.TgZ(0,"div",38),e._uU(1," A task will be assigned. "),e.qZA())}function Ys(i,o){if(1&i&&(e.ynx(0),e.YNc(1,Bs,2,0,"div",43),e.ALo(2,"showCreateTaskPreview"),e.BQk()),2&i){const t=o.$implicit;e.xp6(1),e.Q6J("ngIf",e.lcZ(2,1,t))}}function Vs(i,o){1&i&&(e.TgZ(0,"p",27),e._uU(1,"Tap to edit"),e.qZA())}function Rs(i,o){if(1&i&&(e.TgZ(0,"div",1)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e._uU(5),e.qZA()(),e.YNc(6,Ds,18,1,"ng-container",2),e.ALo(7,"filterArrayByValue"),e.YNc(8,Es,4,4,"ng-container",0),e.YNc(9,Qs,3,1,"ng-container",2),e.ALo(10,"filterArrayByValue"),e.YNc(11,Ys,3,3,"ng-container",2),e.ALo(12,"filterArrayByValue"),e.YNc(13,Vs,2,0,"p",46),e.qZA()),2&i){const t=e.oxw(2).$implicit,n=e.oxw();e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Oqu(n.selectedChoices[t.id]||t.defaultValue),e.xp6(1),e.Q6J("ngForOf",e.Dn7(7,10,(null==n.smartResponseStates[t.id]||null==n.smartResponseStates[t.id].triggersByType?null:n.smartResponseStates[t.id].triggersByType.commentPhoto)||e.DdM(22,S),"trigger",(null==n.smartResponseStates[t.id]?null:n.smartResponseStates[t.id].state)||""))("ngForTrackBy",n.trackById),e.xp6(2),e.Q6J("ngIf",(null==n.smartResponseStates[t.id]||null==n.smartResponseStates[t.id].triggersByType||null==n.smartResponseStates[t.id].triggersByType.table||null==n.smartResponseStates[t.id].triggersByType.table[0]?null:n.smartResponseStates[t.id].triggersByType.table[0].trigger)&&(null==n.smartResponseStates[t.id]||null==n.smartResponseStates[t.id].triggersByType||null==n.smartResponseStates[t.id].triggersByType.table||null==n.smartResponseStates[t.id].triggersByType.table[0]?null:n.smartResponseStates[t.id].triggersByType.table[0].trigger)===(null==n.smartResponseStates[t.id]?null:n.smartResponseStates[t.id].state)),e.xp6(1),e.Q6J("ngForOf",e.Dn7(10,14,(null==n.smartResponseStates[t.id]||null==n.smartResponseStates[t.id].triggersByType?null:n.smartResponseStates[t.id].triggersByType.triggerSection)||e.DdM(23,S
1),"trigger",(null==n.smartResponseStates[t.id]?null:n.smartResponseStates[t.id].state)||""))("ngForTrackBy",n.trackById),e.xp6(2),e.Q6J("ngForOf",e.Dn7(12,18,(null==n.smartResponseStates[t.id]||null==n.smartResponseStates[t.id].triggersByType?null:n.smartResponseStates[t.id].triggersByType.task)||e.DdM(24,S),"trigger",(null==n.smartResponseStates[t.id]?null:n.smartResponseStates[t.id].state)||""))("ngForTrackBy",n.trackById),e.xp6(2),e.Q6J("ngIf",!n.selectedChoices[t.id]&&!t.defaultValue)}}function Hs(i,o){1&i&&(e.ynx(0),e._uU(1,", "),e.BQk())}function Gs(i,o){if(1&i&&(e.ynx(0),e._uU(1),e.YNc(2,Hs,2,0,"ng-container",0),e.BQk()),2&i){const t=o.$implicit,n=o.last;e.xp6(1),e.hij(" ",t,""),e.xp6(1),e.Q6J("ngIf",!n)}}function $s(i,o){if(1&i&&(e.ynx(0),e.YNc(1,Gs,3,2,"ng-container",2),e.BQk()),2&i){const t=e.oxw(3).$implicit,n=e.oxw();e.xp6(1),e.Q6J("ngForOf",n.selectedChoices[t.id])("ngForTrackBy",n.trackByItem)}}function js(i,o){1&i&&(e.ynx(0),e._uU(1,"Choose options"),e.BQk())}function Ks(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e.YNc(5,$s,2,2,"ng-container",0),e.YNc(6,js,2,0,"ng-container",0),e.qZA()()()),2&i){const t=e.oxw(2).$implicit,n=e.oxw();e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Q6J("ngIf",null==n.selectedChoices[t.id]?null:n.selectedChoices[t.id].length),e.xp6(1),e.Q6J("ngIf",!(null!=n.selectedChoices[t.id]&&n.selectedChoices[t.id].length))}}function zs(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10)(5,"span"),e._uU(6," Today 6:36 PM "),e.qZA(),e.TgZ(7,"span"),e._uU(8," May 10, 2014 "),e.qZA(),e.TgZ(9,"span"),e._uU(10," 18:36 "),e.qZA()()()()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label)}}function Ws(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",27),e._uU(5),e.ALo(6,"translate"),e.qZA()(),e._UZ(7,"i",47),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Oqu(e.lcZ(6,2,"FORM.Tap here to edit"))}}function Xs(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e._uU(5),e.ALo(6,"translate"),e.qZA()(),e._UZ(7,"i",48),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Oqu(e.lcZ(6,2,"FORM.Tap here to view"))}}function ec(i,o){if(1&i&&(e.TgZ(0,"div",51),e._UZ(1,"img",52),e.qZA()),2&i){const t=e.oxw(3).$implicit;e.xp6(1),e.Q6J("src",t.typeLogic,e.LSH)}}function tc(i,o){1&i&&e._UZ(0,"i",53)}function ic(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.YNc(4,ec,2,1,"div",49),e.YNc(5,tc,1,0,"i",50),e.qZA()()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label),e.xp6(1),e.Q6J("ngIf",t.typeLogic),e.xp6(1),e.Q6J("ngIf",!t.typeLogic)}}function nc(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",27),e._uU(5),e.ALo(6,"translate"),e.qZA()()()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Oqu(e.lcZ(6,2,"FORM.Tap here to view"))}}function oc(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e._uU(5),e.ALo(6,"translate"),e.qZA()()()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Oqu(e.lcZ(6,2,"FORM.Sample hierarchy"))}}function lc(i,o){if(1&i&&(e.TgZ(0,"div",8)(1,"div",9)(2,"h6",24),e._uU(3),e.qZA(),e.TgZ(4,"p",10),e._uU(5),e.ALo(6,"translate"),e.qZA()()()),2&i){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Oqu(e.lcZ(6,2,"FORM.Sample asset"))}}function ac(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",20),e.NdJ("click",function(){e.CHM(t);const l=e.oxw().$implicit,a=e.oxw();return e.KtG(a.setPreviewState.emit(l))}),e.YNc(1,fs,15,1,"div",21),e.YNc(2,vs,7,1,"div",21),e.YNc(3,hs,7,1,"div",21),e.YNc(4,xs,7,1,"div",21),e.YNc(5,Ts,7,1,"div",21),e.YNc(6,bs,7,1,"div",21),e.YNc(7,ws,6,1,"div",21),e.YNc(8,ys,6,1,"div",21),e.YNc(9,Fs,6,1,"div",21),e.YNc(10,Ns,22,49,"div",22),e.YNc(11,Ls,26,56,"div",22),e.YNc(12,Ms,7,1,"div",21),e.YNc(13,Js,4,3,"div",21),e.YNc(14,Rs,14,25,"div",23),e.YNc(15,Ks,7,3,"div",21),e.YNc(16,zs,11,1,"div",21),e.YNc(17,Ws,8,4,"div",21),e.YNc(18,Xs,8,4,"div",21),e.YNc(19,ic,6,3,"div",21),e.YNc(20,nc,7,4,"div",21),e.YNc(21,oc,7,4,"div",21),e.YNc(22,lc,7,4,"div",21),e.qZA()}if(2&i){const t=e.oxw().$implicit,n=e.oxw();e.ekj("bg-transparent",t.fieldType===n.SectionFieldType.Label)("border-0",t.fieldType===n.SectionFieldType.Label),e.Q6J("ngSwitch",t.fieldType),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Location),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Barcode),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Task),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.IotDeviceDataPoint),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.IotDeviceCmd),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.IotDeviceChart),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.SingleLineText),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Numeric),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.MultiLineText),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Boolean),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Trilean),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Photo),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Label),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.SingleSelect),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.MultiSelect),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.DateTime),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Signature),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.InsertFile),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.ImageViewer),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.WebViewer),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Hierarchy),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Asset)}}function rc(i,o){if(1&i&&(e.ynx(0),e.YNc(1,ac,23,27,"div",19),e.ALo(2,"valueByKey"),e.BQk()),2&i){const t=o.$implicit;e.xp6(1),e.Q6J("ngIf",!e.xi3(2,1,t.parsedTypeLogic,"isHidden"))}}function sc(i,o){1&i&&(e.TgZ(0,"div",54)(1,"div",55)(2,"div",9)(3,"h6",5),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"p",10),e._uU(7),e.ALo(8,"translate"),e.qZA()(),e._UZ(9,"
1i",56),e.qZA()()),2&i&&(e.xp6(4),e.Oqu(e.lcZ(5,2,"FORM.Complete section")),e.xp6(3),e.Oqu(e.lcZ(8,4,"FORM.Remember to save changes to share these updates with your team")))}let de=class be{constructor(o){this.previewService=o,this.setPreviewState=new e.vpe,this.smartResponseState=new e.vpe,this.SectionFieldType=s.ii,this.SectionFieldLabel=s.b$,this.FileType=s.Tv,this.SectionType=s.bA,this.smartResponseStates={}}ngOnInit(){this.workflowForm.value.sections.forEach(o=>this.handleSmartResponseState(o)),this.workflowForm.get("sections").at(this.sectionIndex).valueChanges.pipe((0,v.b)(o=>this.handleSmartResponseState(o)),(0,u.t)(this)).subscribe()}handleSmartResponseState(o){o.fieldType===s.ii.Section&&(o.fields.filter(n=>!n.isDeleted&&n.fieldType===s.ii.Boolean||n.fieldType===s.ii.Trilean||n.fieldType===s.ii.SingleSelect).forEach(n=>{const l=n.typeLogic?.split("|")?.findIndex(a=>a===n.defaultValue);this.smartResponseStates[n.id]={...this.smartResponseStates?.[n.id],triggersByType:this.getTriggersByType(n?.fieldTriggers)},void 0!==l&&-1!==l&&this.setFieldState(n,l),n.fieldType===s.ii.SingleSelect&&(this.smartResponseStates[n.id].state=n.defaultValue||""),null===n.defaultValue&&(this.smartResponseStates[n.id]={...this.smartResponseStates?.[n.id],state:this.smartResponseStates?.[n.id]?.state||null})}),this.smartResponseState.emit({states:this.smartResponseStates,fromField:""}))}getTriggersByType(o){return o=o?.filter(t=>!t.isDeleted),o?{commentPhoto:o.filter(t=>"default"===t.triggerType),task:o.filter(t=>"trigger.task"===t.triggerType),table:o.filter(t=>t.triggerType.includes("trigger.table.")),triggerSection:o.filter(t=>"default"!==t.triggerType&&"trigger.task"!==t.triggerType&&!t.triggerType.includes("trigger.table."))}:{commentPhoto:[],task:[],table:[],triggerSection:[]}}setFieldState(o,t){(o.fieldType===s.ii.Boolean||o.fieldType===s.ii.Trilean||o.fieldType===s.ii.SingleSelect)&&(this.smartResponseStates[o.id]={...this.smartResponseStates?.[o.id],state:o.typeLogic?.split("|")?.[t]||""}),this.smartResponseState.emit({states:this.smartResponseStates,fromField:o.id});const n=[];this.smartResponseStates[o.id]?.triggersByType?.table?.filter(l=>l.trigger===this.smartResponseStates[o.id].state)?.forEach(l=>n.push(l?.triggerType?.split(".")?.pop()||"")),this.smartResponseStates[o.id]?.triggersByType?.triggerSection?.f
1ilter(l=>l.trigger===this.smartResponseStates[o.id].state)?.forEach(l=>{const a=this.workflowForm.value.sections.find(r=>r.label===l.triggerType);a&&n.push(a.id)}),n.filter(l=>l).forEach(l=>{const a=this.workflowForm.value.sections.find(r=>r.id===l||r.fieldName===l);a&&this.previewService.setPreviewSection(l,a)})}trackById(o,t){return t.id}trackByItem(o,t){return t}static#e=this.\u0275fac=function(t){return new(t||be)(e.Y36(_e))};static#t=this.\u0275cmp=e.Xpm({type:be,selectors:[["ff-form-preview-vertical-section"]],inputs:{section:"section",sectionIndex:"sectionIndex",workflowForm:"workflowForm",users:"users",teams:"teams",selectedChoices:"selectedChoices",triggerSections:"triggerSections"},outputs:{setPreviewState:"setPreviewState",smartResponseState:"smartResponseState"},decls:5,vars:8,consts:[[4,"ngIf"],[1,"d-flex","flex-column"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","bg-white border rounded m-1 mb-0 element",4,"ngIf"],[1,"sectionHeader"],[1,"fw-semibold","m-0"],["class","rounded p-2 m-1 mb-0 assignees",4,"ngIf"],[1,"rounded","p-2","m-1","mb-0","assignees"],[1,"d-flex","align-items-center"],[1,"flex-grow-1"],[1,"m-0"],["class","fa fa-users",4,"ngIf"],["class","fa fa-user",4,"ngIf"],["class","fa fa-user-times text-grey",4,"ngIf"],["class","text-grey",4,"ngIf"],[1,"fa","fa-users"],[1,"fa","fa-user"],[1,"fa","fa-user-times","text-grey"],[1,"text-grey"],["role","button","class","bg-white border rounded m-1 mb-0 element shadow-sm",3,"bg-transparent","border-0","ngSwitch","click",4,"ngIf"],["role","button",1,"bg-white","border","rounded","m-1","mb-0","element","shadow-sm",3,"ngSwitch","click"],["class","d-flex align-items-center",4,"ngSwitchCase"],["class","switchGroup",4,"ngSwitchCase"],["class","d-flex flex-column",4,"ngSwitchCase"],["data-cy","fieldName",1,"fw-semibold","m-0"],[1,"fa","fa-map-marker-alt","fa-lg","text-grey"],[1,"fa","fa-barcode","fa-lg","text-grey"],[1,"m-0","text-grey"],[1,"fa","fa-briefcase","fa-lg","text-grey"],[1,"fa","fa-podcast","fa-lg","text-grey"],[1,"fa","fa-bolt","fa-lg","text-grey"],[1,"fa","fa-chart-line","fa-lg","text-grey"],[1,"switchGroup"],["role","group","aria-label","Basic radio toggle button group",1,"btn-group","w-100","my-1"],["type","radio","autocomplete","off",1,"btn-check",3,"id","name","checked","click"],[1,"btn","btn-outline-success","btn-sm",3,"for"],["type","radio","autocomplete","off",1,"btn-check",3,"id","name","value","checked","click"],[1,"btn","btn-outline-danger","btn-sm",3,"for"],[1,"bg-light","rounded","p-2","mt-1","fs-12"],[1,"bg-white","rounded","mx-0","mt-1","element","shadow-sm"],[1,"mb-0","text-grey"],[1,"bg-white","rounded","mx-0","mt-2","mb-0","element","shadow-sm"],[1,"fa","fa-camera","fa-lg","text-grey"],["class","bg-light rounded p-2 mt-1 fs-12",4,"ngIf"],[1,"btn","btn-outline-secondary","btn-sm",3,"for"],[1,"label",3,"innerHtml"],["class","m-0 text-grey",4,"ngIf"],[1,"fa","fa-pencil-alt","fa-lg","text-grey"],[1,"fa","fa-paperclip","fa-lg","text-grey"],["class","webImg m-3 text-center",4,"ngIf"],["class","far fa-image fa-5x text-grey w-100 text-center",4,"ngIf"],[1,"webImg","m-3","text-center"],[1,"rounded",3,"src"],[1,"far","fa-image","fa-5x","text-grey","w-100","text-center"],[1,"bg-white","border","rounded","m-1","mb-0","element"],["role","button",1,"d-flex","align-items-center"],[1,"far","fa-square","fa-lg","text-grey","ms-2"]],template:function(t,n){1&t&&(e.YNc(0,us,5,2,"div",0),e.TgZ(1,"div",1),e.YNc(2,rc,3,4,"ng-container",2),e.ALo(3,"filterArrayByValue"),e.qZA(),e.YNc(4,sc,10,6,"div",3)),2&t&&(e.Q6J("ngIf",n.section.label!==n.SectionFieldLabel.Invisible),e.xp6(2),e.Q6J("ngForOf",e.Dn7(3,4,n.section.fields,"isDeleted",!1))("ngForTrackBy",n.trackById),e.xp6(2),e.Q6J("ngIf",n.section.label!==n.SectionFieldLabel.Invisible&&n.workflowForm.value.isWorkflow))},dependencies:[g.sg,g.O5,g.RF,g.n9,ce.c,R.k,Be.z,M.H,K.l,Z.X$,rs],styles:[".sectionHeader[_ngcontent-%COMP%]{background:#fafafa;background-image:linear-gradient(#fafafa,#eaeaea);overflow:hidden;padding:14px 10px 10px;margin:5px 0 0}.sectionHeader[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font:700 14px/16px Raleway,Helvetica,Arial,sans-serif;color:#506e84}.element[_ngcontent-%COMP%]{padding:8px 10px}.assignees[_ngcontent-%COMP%]{border:1px dashed var(--bs-primary-disabled)}.assignees[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:var(--bs-primary)}h6[_ngcontent-%COMP%]{font-size:14px}p[_ngcontent-%COMP%]{font-size:12px}small[_ngcontent-%COMP%]{font-size:11px}.label[_ngcontent-%COMP%]{scale:.9;margin:0 -10px}.webImg[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;max-height:250px}.switchGroup[_ngcontent-%COMP%] .btn-check[_ngcontent-%COMP%]:not(:checked) + label.btn[_ngcontent-%COMP%]{border-color:var(--color-grey-dark);color:var(--color-grey-dark)}"]})};function cc(i,o){1&i&&e._UZ(0,"i",21)}function _c(i,o){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"findItemByKey"),e.qZA()),2&i){const t=o.$implicit,n=e.oxw(2);let l;e.xp6(1),e.hij(" ",null==(l=e.Dn7(2,1,n.teams,"id",t))?null:l.teamName," ")}}function dc(i,o){1&i&&e._UZ(0,"i",22)}function pc(i,o){if(1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"findItemByKey"),e.qZA()),2&i){const t=o.$implicit,n=e.oxw(2);let l;e.xp6(1),e.hij(" ",null==(l=e.Dn7(2,1,n.users,"id",t))?null:l.fullName," ")}}function mc(i,o){1&i&&e._UZ(0,"i",23)}function gc(i,o){1&i&&(e.TgZ(0,"span",24),e._uU(1," Unassigned"),e.qZA())}function uc(i,o){if(1&i&&(e.TgZ(0,"div",13)(1,"div",14)(2,"div",15)(3,"h6",1),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"p",16),e.YNc(7,cc,1,0,"i",17),e.YNc(8,_c,3,5,"span",12),e.YNc(9,dc,1,0,"i",18),e.YNc(10,pc,3,5,"span",12),e.YNc(11,mc,1,0,"i",19),e.YNc(12,gc,2,0,"span",20),e.qZA()()()()),2&i){const t=e.oxw();
1e.xp6(4),e.Oqu(e.lcZ(5,9,"FORM.Assigned to")),e.xp6(3),e.Q6J("ngIf",null==t.section.parsedAssignees||null==t.section.parsedAssignees.teams?null:t.section.parsedAssignees.teams.length),e.xp6(1),e.Q6J("ngForOf",null==t.section.parsedAssignees?null:t.section.parsedAssignees.teams)("ngForTrackBy",t.trackByItem),e.xp6(1),e.Q6J("ngIf",null==t.section.parsedAssignees||null==t.section.parsedAssignees.users?null:t.section.parsedAssignees.users.length),e.xp6(1),e.Q6J("ngForOf",null==t.section.parsedAssignees?null:t.section.parsedAssignees.users)("ngForTrackBy",t.trackByItem),e.xp6(1),e.Q6J("ngIf",!(null!=t.section.parsedAssignees&&null!=t.section.parsedAssignees.teams&&t.section.parsedAssignees.teams.length||null!=t.section.parsedAssignees&&null!=t.section.parsedAssignees.users&&t.section.parsedAssignees.users.length)),e.xp6(1),e.Q6J("ngIf",!(null!=t.section.parsedAssignees&&null!=t.section.parsedAssignees.teams&&t.section.parsedAssignees.teams.length||null!=t.section.parsedAssignees&&null!=t.section.parsedAssignees.users&&t.section.parsedAssignees.users.length))}}function fc(i,o){if(1&i&&(e.TgZ(0,"th",25)(1,"span",26),e._uU(2),e.qZA()()),2&i){const t=o.$implicit;e.xp6(2),e.Oqu("Label"!==t.fieldType?t.label:"-")}}function vc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"123 Sample Address"),e.qZA())}function hc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"Sample text #1"),e.qZA())}function xc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"95"),e.qZA())}function Tc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"Sample text..."),e.qZA())}function bc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"Yes"),e.qZA())}function wc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"N/A"),e.qZA())}function yc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"-"),e.qZA())}function Fc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"-"),e.qZA())}function Zc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"Choice #3"),e.qZA())}function Ac(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"Choice #1, Choice..."),e.qZA())}function Cc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"May 10, 2014"),e.qZA())}function kc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"-"),e.qZA())}function Sc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"110109"),e.qZA())}function Nc(i,o){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"i",30),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw();e.xp6(1),e.ekj("fa-file",null===t.typeLogic)("fa-file-image",t.typeLogic===n.FileType.IMG)("fa-file-excel",t.typeLogic===n.FileType.XLS)("fa-file-word",t.typeLogic===n.FileType.DOC)("fa-file-pdf",t.typeLogic===n.FileType.PDF)("fa-file-powerpoint",t.typeLogic===n.FileType.PPT)("fa-file-alt",t.typeLogic===n.FileType.TXT)}}function qc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"-"),e.qZA())}function Oc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1,"sample.com"),e.qZA())}function Uc(i,o){if(1&i&&(e.TgZ(0,"td",27)(1,"div",28),e.YNc(2,vc,2,0,"div",29),e.YNc(3,hc,2,0,"div",29),e.YNc(4,xc,2,0,"div",29),e.YNc(5,Tc,2,0,"div",29),e.YNc(6,bc,2,0,"div",29),e.YNc(7,wc,2,0,"div",29),e.YNc(8,yc,2,0,"div",29),e.YNc(9,Fc,2,0,"div",29),e.YNc(10,Zc,2,0,"div",29),e.YNc(11,Ac,2,0,"div",29),e.YNc(12,Cc,2,0,"div",29),e.YNc(13,kc,2,0,"div",29),e.YNc(14,Sc,2,0,"div",29),e.YNc(15,Nc,2,14,"div",29),e.YNc(16,qc,2,0,"div",29),e.YNc(17,Oc,2,0,"div",29),e.qZA()()),2&i){const t=o.$implicit,n=e.oxw();e.xp6(1),e.Q6J("ngSwitch",t.fieldType),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Location),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.SingleLineText),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Numeric),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.MultiLineText),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Boolean),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Trilean),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Photo),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Label),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.SingleSelect),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.MultiSelect),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.DateTime),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Signature),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Barcode),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.InsertFile),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.ImageViewer),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.WebViewer)}}function Ic(i,o){1&i&&(e.TgZ(0,"div",31)(1,"div",32)(2,"div",15)(3,"h6",1),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"p",16),e._uU(7),e.ALo(8,"translate"),e.qZA()(),e._UZ(9,"
1i",33),e.qZA()()),2&i&&(e.xp6(4),e.Oqu(e.lcZ(5,2,"FORM.Complete section")),e.xp6(3),e.Oqu(e.lcZ(8,4,"FORM.Remember to save changes to share these updates with your team")))}function Pc(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",16),e._uU(5,"123 Sample Address"),e._UZ(6,"br"),e.TgZ(7,"small")(8,"strong"),e._uU(9," Lat: "),e.qZA(),e._uU(10," XX / "),e.TgZ(11,"strong"),e._uU(12," Long: "),e.qZA(),e._uU(13," XX"),e.qZA()()(),e._UZ(14,"i",46),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label)}}function Lc(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",16),e._uU(5,"9876543210"),e.qZA()(),e._UZ(6,"i",47),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label)}}function Mc(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",48),e._uU(5,"Tap here to assign"),e.qZA()(),e._UZ(6,"i",49),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label)}}function Jc(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",16),e._uU(5,"95"),e.qZA()(),e._UZ(6,"i",50),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label)}}function Dc(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",16),e._uU(5,"Commands"),e.qZA()(),e._UZ(6,"i",51),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label)}}function Ec(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",16),e._uU(5,"View Chart"),e.qZA()(),e._UZ(6,"i",52),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label)}}function Qc(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",16),e._uU(5,"Sample text #1"),e.qZA()()()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label)}}function Bc(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",16),e._uU(5,"95"),e.qZA()()()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label)}}function Yc(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",16),e._uU(5,"Sample text..."),e.qZA()()()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label)}}function Vc(i,o){1&i&&(e.TgZ(0,"div"),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"FORM.COMMENTS AND PHOTOS")))}function Rc(i,o){if(1&i&&(e.TgZ(0,"div",53)(1,"h6",1),e._uU(2),e.qZA(),e.TgZ(3,"div",54),e._UZ(4,"input",55),e.TgZ(5,"label",56),e._uU(6),e.qZA(),e._UZ(7,"input",55),e.TgZ(8,"label",57),e._uU(9),e.qZA()(),e.YNc(10,Vc,3,3,"div",58),e.ALo(11,"split"),e.qZA()),2&i){const t=e.oxw().$implicit;let n;e.xp6(2),e.Oqu(t.label),e.xp6(2),e.MGl("id","",t.id,"1"),e.xp6(1),e.MGl("for","",t.id,"1"),e.xp6(1),e.Oqu(t.typeLogicTrue||"Yes"),e.xp6(1),e.MGl("id","",t.id,"2"),e.xp6(1),e.MGl("for","",t.id,"2"),e.xp6(1),e.Oqu(t.typeLogicFalse||"No"),e.xp6(1),e.Q6J("ngIf",t.defaultValue===(null==(n=e.xi3(11,8,t.typeLogic,"|"))?null:n[0]))}}function Hc(i,o){if(1&i&&(e.TgZ(0,"div",53)(1,"h6",1),e._uU(2),e.qZA(),e.TgZ(3,"div",54),e._UZ(4,"input",55),e.TgZ(5,"label",56),e._uU(6),e.qZA(),e._UZ(7,"input",55),e.TgZ(8,"label",57),e._uU(9),e.qZA(),e._UZ(10,"input",55),e.TgZ(11,"label",59),e._uU(12),e.qZA()()()),2&i){const t=e.oxw().$implicit;e.xp6(2),e.Oqu(t.label),e.xp6(2),e.MGl("id","",t.id,"1"),e.xp6(1),e.MGl("for","",t.id,"1"),e.xp6(1),e.Oqu(t.typeLogicTrue||"Yes"),e.xp6(1),e.MGl("id","",t.id,"2"),e.xp6(1),e.MGl("for","",t.id,"2"),e.xp6(1),e.Oqu(t.typeLogicFalse||"No"),e.xp6(1),e.MGl("id","",t.id,"3"),e.xp6(1),e.MGl("for","",t.id,"3"),e.xp6(1),e.Oqu(t.typeLogicIndeterminate||"N/A")}}function Gc(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",60),e._uU(5),e.ALo(6,"translate"),e.qZA()(),e._UZ(7,"i",61),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Oqu(e.lcZ(6,2,"FORM.Tap here to edit"))}}function $c(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15),e._UZ(2,"div",62),e.ALo(3,"safeHtml"),e.qZA()()),2&i){const t=e.oxw().$implicit;e.xp6(2),e.Q6J("innerHtml",e.lcZ(3,1,t.htmlLabel),e.oJD)}}function jc(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",16),e._uU(5),e.qZA()()()),2&i){const t=e.oxw().$implicit,n=e.oxw(2);e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Oqu(n.selectedChoices[t.id]||"Choose option")}}function Kc(i,o){1&i&&(e.ynx(0),e._uU(1,", "),e.BQk())}function zc(i,o){if(1&i&&(e.ynx(0),e._uU(1),e.YNc(2,Kc,2,0,"ng-container",58),e.BQk()),2&i){const t=o.$implicit,n=o.last;e.xp6(1),e.hij(" ",t,""),e.xp6(1),e.Q6J("ngIf",!n)}}function Wc(i,o){if(1&i&&(e.ynx(0),e.YNc(1,zc,3,2,"ng-container",12),e.BQk()),2&i){const t=e.oxw(2).$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",n.selectedChoices[t.id])("ngForTrackBy",n.trackByItem)}}function Xc(i,o){1&i&&(e.ynx(0),e._uU(1),e.ALo(2,"translate"),e.BQk()),2&i&&(e.xp6(1),e.Oqu(e.l
1cZ(2,1,"FORM.Choose options")))}function e_(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",16),e.YNc(5,Wc,2,2,"ng-container",58),e.YNc(6,Xc,3,3,"ng-container",58),e.qZA()()()),2&i){const t=e.oxw().$implicit,n=e.oxw(2);e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Q6J("ngIf",null==n.selectedChoices[t.id]?null:n.selectedChoices[t.id].length),e.xp6(1),e.Q6J("ngIf",!(null!=n.selectedChoices[t.id]&&n.selectedChoices[t.id].length))}}function t_(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",16)(5,"span"),e._uU(6," Today 6:36 PM "),e.qZA(),e.TgZ(7,"span"),e._uU(8," May 10, 2014 "),e.qZA(),e.TgZ(9,"span"),e._uU(10," 18:36 "),e.qZA()()()()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label)}}function i_(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",48),e._uU(5),e.ALo(6,"translate"),e.qZA()(),e._UZ(7,"i",63),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Oqu(e.lcZ(6,2,"FORM.Tap here to edit"))}}function n_(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",16),e._uU(5),e.ALo(6,"translate"),e.qZA()(),e._UZ(7,"i",64),e.qZA()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Oqu(e.lcZ(6,2,"FORM.Tap here to view"))}}function o_(i,o){if(1&i&&(e.TgZ(0,"div",67),e._UZ(1,"img",68),e.qZA()),2&i){const t=e.oxw(2).$implicit;e.xp6(1),e.s9C("src",t.typeLogic,e.LSH)}}function l_(i,o){1&i&&e._UZ(0,"i",69)}function a_(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.YNc(4,o_,2,1,"div",65),e.YNc(5,l_,1,0,"i",66),e.qZA()()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label),e.xp6(1),e.Q6J("ngIf",t.typeLogic),e.xp6(1),e.Q6J("ngIf",!t.typeLogic)}}function r_(i,o){if(1&i&&(e.TgZ(0,"div",14)(1,"div",15)(2,"h6",1),e._uU(3),e.qZA(),e.TgZ(4,"p",48),e._uU(5),e.ALo(6,"translate"),e.qZA()()()),2&i){const t=e.oxw().$implicit;e.xp6(3),e.Oqu(t.label),e.xp6(2),e.Oqu(e.lcZ(6,2,"FORM.Tap here to view"))}}function s_(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",43),e.NdJ("click",function(){const a=e.CHM(t).$implicit,r=e.oxw(2);return e.KtG(r.setPreviewState.emit(a))}),e.YNc(1,Pc,15,1,"div",44),e.YNc(2,Lc,7,1,"div",44),e.YNc(3,Mc,7,1,"div",44),e.YNc(4,Jc,7,1,"div",44),e.YNc(5,Dc,7,1,"div",44),e.YNc(6,Ec,7,1,"div",44),e.YNc(7,Qc,6,1,"div",44),e.YNc(8,Bc,6,1,"div",44),e.YNc(9,Yc,6,1,"div",44),e.YNc(10,Rc,12,11,"div",45),e.YNc(11,Hc,13,10,"div",45),e.YNc(12,Gc,8,4,"div",44),e.YNc(13,$c,4,3,"div",44),e.YNc(14,jc,6,2,"div",44),e.YNc(15,e_,7,3,"div",44),e.YNc(16,t_,11,1,"div",44),e.YNc(17,i_,8,4,"div",44),e.YNc(18,n_,8,4,"div",44),e.YNc(19,a_,6,3,"div",44),e.YNc(20,r_,7,4,"div",44),e.qZA()}if(2&i){const t=o.$implicit,n=e.oxw(2);e.ekj("bg-transparent",t.fieldType===n.SectionFieldType.Label)("border-0",t.fieldType===n.SectionFieldType.Label),e.Q6J("ngSwitch",t.fieldType),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Location),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Barcode),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Task),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.IotDeviceDataPoint),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.IotDeviceCmd),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.IotDeviceChart),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.SingleLineText),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Numeric),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.MultiLineText),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Boolean),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Trilean),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Photo),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Label),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.SingleSelect),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.MultiSelect),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.DateTime),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.Signature),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.InsertFile),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.ImageViewer),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionFieldType.WebViewer)}}function c_(i,o){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",34)(2,"div",35)(3,"button",36),e.NdJ("click",function(){const a=e.CHM(t).$implicit,r=e.oxw();return e.KtG(r.tableBack(a.key))}),e._UZ(4,"i",37),e.qZA(),e.TgZ(5,"h6",38)(6,"span"),e._uU(7),e.qZA()(),e.TgZ(8,"button",36),e.NdJ("click",function(){const a=e.CHM(t).$implicit,r=e.oxw();return e.KtG(r.tableBack(a.key))}
1),e._UZ(9,"i",39),e.qZA()(),e.TgZ(10,"div",40)(11,"div",41),e.YNc(12,s_,21,25,"div",42),e.qZA()()(),e.BQk()}if(2&i){const t=o.$implicit,n=e.oxw();e.xp6(1),e.ekj("top-0",t.value.show)("top-100",!t.value.show),e.xp6(6),e.Oqu(t.value.section.label),e.xp6(5),e.Q6J("ngForOf",t.value.section.fields)("ngForTrackBy",n.trackById)}}de=(0,P.gn)([(0,u.c)()],de);let __=(()=>{class i{constructor(t){this.previewService=t,this.setPreviewState=new e.vpe,this.SectionFieldType=s.ii,this.FileType=s.Tv,this.SectionType=s.bA,this.previewTriggerSections$=this.previewService.previewTriggerSections$}openTablePreview(){this.previewService.setPreviewSection(this.section.id||"",this.section)}tableBack(t){this.previewService.togglePreviewTrigger(t,!1)}trackById(t,n){return n.id}trackByItem(t,n){return n}trackByIndex(t){return t}static#e=this.\u0275fac=function(n){return new(n||i)(e.Y36(_e))};static#t=this.\u0275cmp=e.Xpm({type:i,selectors:[["ff-form-preview-horizontal-section"]],inputs:{section:"section",workflowForm:"workflowForm",users:"users",teams:"teams",selectedChoices:"selectedChoices"},outputs:{setPreviewState:"setPreviewState"},decls:22,vars:21,consts:[[1,"sectionHeader"],[1,"fw-semibold","m-0"],["class","rounded p-2 m-1 mb-0 assignees shadow",4,"ngIf"],[1,"mt-1","horizontal"],[1,"table","w-100"],[1,"bg-primary"],["class","p-1",4,"ngFor","ngForOf","ngForTrackBy"],["class","bg-white py-0 px-1","role","button",4,"ngFor","ngForOf","ngForTrackBy"],[1,"m-2"],["type","button",1,"w-100","btn","btn-sm","btn-light","text-info",3,"click"],[1,"fa","fa-plus","fa-lg"],["class","bg-white border rounded m-1 mb-0 element",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"rounded","p-2","m-1","mb-0","assignees","shadow"],[1,"d-flex","align-items-center"],[1,"flex-grow-1"],[1,"m-0"],["class","fa fa-users text-info",4,"ngIf"],["class","fa fa-user text-info",4,"ngIf"],["class","fa fa-user-times text-info",4,"ngIf"],["class","text-grey",4,"ngIf"],[1,"fa","fa-users","text-info"],[1,"fa","fa-user","text-info"],[1,"fa","fa-user-times","text-info"],[1,"text-grey"],[1,"p-1"],[1,"text-nowrap","px-1","text-white"],["role","button",1,"bg-white","py-0","px-1"],[1,"px-1","py-2",3,"ngSwitch"],[4,"ngSwitchCase"],[1,"type","fa-lg","far"],[1,"bg-white","border","rounded","m-1","mb-0","element"],["role","button",1,"d-flex","align-items-center","p-2"],[1,"far","fa-square","fa-lg","text-grey","ms-2"],[1,"horizontal-section-panel","position-absolute","start-0","h-100","w-100"],[1,"header","d-flex","align-items-center","bg-white","shadow-sm","position-absolute","top-0","left-0","w-100"],["type","button",1,"btn","btn-link","text-decoration-none","btn-sm","py-0",3,"click"],[1,"fa","fa-times","text-danger","lh-1"],["data-cy","fieldName",1,"flex-grow-1","text-center","text-nowrap","text-truncate","m-0"],[1,"fa","fa-check","text-primary-hover","lh-1"],[1,"body"],[1,"overflow-auto","d-flex","flex-column"],["role","button","class","bg-white border rounded m-1 mb-0 element",3,"bg-transparent","border-0","ngSwitch","click",4,"ngFor","ngForOf","ngForTrackBy"],["role","button",1,"bg-white","border","rounded","m-1","mb-0","element",3,"ngSwitch","click"],["class","d-flex align-items-center",4,"ngSwitchCase"],["class","switchGroup",4,"ngSwitchCase"],[1,"fa","fa-map-marker-alt","fa-lg","text-grey"],[1,"fa","fa-barcode","fa-lg","text-grey"],[1,"m-0","text-grey"],[1,"fa","fa-briefcase","fa-lg","text-grey"],[1,"fa","fa-podcast","fa-lg","text-grey"],[1,"fa","fa-bolt","fa-lg","text-grey"],[1,"fa","fa-chart-line","fa-lg","text-grey"],[1,"switchGroup"],["role","group","aria-label","Basic radio toggle button group",1,"btn-group","w-100","my-1"],["type","radio","name","btnradio","autocomplete","off",1,"btn-check",3,"id"],[1,"btn","btn-outline-success","btn-sm",3,"for"],[1,"btn","btn-outline-danger","btn-sm",3,"for"],[4,"ngIf"],[1,"btn","btn-outline-secondary","btn-sm",3,"for"],[1,"mb-0","text-grey"],[1,"fa","fa-camera","fa-lg","text-grey"],[1,"label",3,"innerHtml"],[1,"fa","fa-pencil-alt","fa-lg","text-grey"],[1,"fa","fa-paperclip","fa-lg","text-grey"],["class","webImg m-3 text-center",4,"ngIf"],["class","far fa-image fa-5x text-grey w-100 text-center",4,"ngIf"],[1,"webImg","m-3","text-center"],[1,"rounded",3,"src"],[1,"far","fa-image","fa-5x","text-grey","w-100","text-center"]],template:function(n,l){1&n&&(e.TgZ(0,"div",0)(1,"h5",1),e._uU(2),e.qZA()(),e.YNc(3,uc,13,11,"div",2),e.TgZ(4,"div",3)(5,"table",4)(6,"thead")(7,"tr",5),e.YNc(8,fc,3,1,"th",6),e.ALo(9,"filterArrayByValue"),e.qZA()(),e.TgZ(10,"tbody")(11,"tr"),e.YNc(12,Uc,18,17,"td",7),e.ALo(13,"filterArrayByValue"),e.qZA()()()(),e.TgZ(14,"div",8)(15,"button",9),e.NdJ("click",function(){return l.openTablePreview()}),e._uU(16," Add row "),e._UZ(17,"i",10),e.qZA()(),e.YNc(18,Ic,10,6,"div",11),e.YNc(19,c_,13,7,"ng-container",12),e.ALo(20,"keyvalue"),e.ALo(21,"async")),2&n&&(e.xp6(2),e.Oqu(l.section.label),e.xp6(1),e.Q6J("ngIf",l.workflowForm.value.isWorkflow),e.xp6(
15),e.Q6J("ngForOf",e.Dn7(9,9,l.section.fields,"isDeleted",!1))("ngForTrackBy",l.trackById),e.xp6(4),e.Q6J("ngForOf",e.Dn7(13,13,l.section.fields,"isDeleted",!1))("ngForTrackBy",l.trackById),e.xp6(6),e.Q6J("ngIf",l.workflowForm.value.isWorkflow),e.xp6(1),e.Q6J("ngForOf",e.lcZ(20,17,e.lcZ(21,19,l.previewTriggerSections$)))("ngForTrackBy",l.trackByIndex))},dependencies:[g.sg,g.O5,g.RF,g.n9,g.Ov,g.Nd,R.k,Be.z,M.H,K.l,Z.X$],styles:[".sectionHeader[_ngcontent-%COMP%]{background:#fafafa;background-image:linear-gradient(#fafafa,#eaeaea);overflow:hidden;padding:14px 10px 10px;margin:5px 0 0}.sectionHeader[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font:700 14px/16px Raleway,Helvetica,Arial,sans-serif;color:#506e84}.element[_ngcontent-%COMP%]{padding:8px 10px}.assignees[_ngcontent-%COMP%]{border:1px dashed var(--bs-primary-disabled)}.assignees[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:var(--bs-primary)}h6[_ngcontent-%COMP%]{font-size:14px}p[_ngcontent-%COMP%]{font-size:12px}small[_ngcontent-%COMP%]{font-size:11px}.label[_ngcontent-%COMP%]{scale:.9;margin:0 -10px}.webImg[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;max-height:250px}.switchGroup[_ngcontent-%COMP%] .btn-check[_ngcontent-%COMP%]:not(:checked) + label.btn[_ngcontent-%COMP%]{border-color:var(--color-grey-dark);color:var(--color-grey-dark)}.horizontal[_ngcontent-%COMP%]{overflow-x:auto}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{min-width:75px}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:12px}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{min-width:75px}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{font-size:12px;white-space:nowrap}.horizontal-section-panel[_ngcontent-%COMP%]{background:#eee;background-size:contain;z-index:1;transition:top .2s ease-in-out}.header[_ngcontent-%COMP%]{padding:10px 8px;z-index:1}.body[_ngcontent-%COMP%]{padding-top:44px;height:519px;position:relative}.body[_ngcontent-%COMP%] > div.overflow-auto[_ngcontent-%COMP%]{height:475px;padding-bottom:5px}"]})}return i})();function d_(i,o){1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e._UZ(3,"i",17),e.qZA()),2&i&&(e.xp6(1),e.hij("",e.lcZ(2,1,"FORM.Show Preview")," "))}function p_(i,o){1&i&&(e.TgZ(0,"span"),e._uU(1),e.ALo(2,"translate"),e._UZ(3,"i",18),e.qZA()),2&i&&(e.xp6(1),e.hij("",e.lcZ(2,1,"FORM.HIDE")," "))}function m_(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"ff-form-preview-vertical-section",25),e.NdJ("setPreviewState",function(l){e.CHM(t);const a=e.oxw(4);return e.KtG(a.setPreviewState(l))})("smartResponseState",function(l){e.CHM(t);const a=e.oxw(4);return e.KtG(a.triggerSectionState(l))}),e.qZA()}if(2&i){const t=e.oxw(2),n=t.$implicit,l=t.index,a=e.oxw(2);e.Q6J("workflowForm",a.workflowForm)("section",n)("sectionIndex",l)("users",a.users)("teams",a.teams)("selectedChoices",a.selectedChoices)("triggerSections",a.triggerSections)}}function g_(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"ff-form-preview-vertical-section",27),e.NdJ("setPreviewState",function(l){e.CHM(t);const a=e.oxw(5);return e.KtG(a.setPreviewState(l))}),e.qZA()}if(2&i){const t=e.oxw(3),n=t.$implicit,l=t.index,a=e.oxw(2);e.Q6J("workflowForm",a.workflowForm)("section",n)("sectionIndex",l)("users",a.users)("teams",a.teams)("selectedChoices",a.selectedChoices)("triggerSections",a.triggerSections)}}function u_(i,o){if(1&i&&(e.ynx(0),e.YNc(1,g_,1,7,"ff-form-preview-vertical-section",26),e.BQk()),2&i){const t=e.oxw(4);e.xp6(1),e.Q6J("ngSwitchCase",t.SectionType.Trigger)}}function f_(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"ff-form-preview-horizontal-section",28),e.NdJ("setPreviewState",function(l){e.CHM(t);const a=e.oxw(4);return e.KtG(a.setPreviewState(l))}),e.qZA()}if(2&i){const t=e.oxw(2).$implicit,n=e.oxw(2);e.Q6J("workflowForm",n.workflowForm)("section",t)("users",n.users)("teams",n.teams)("selectedChoices",n.selectedChoices)}}function v_(i,o){if(1&i&&e._UZ(0,"ff-form-preview-approval-section",29),2&i){const t=e.oxw(2).$implicit,n=e.oxw(2);e.Q6J("workflowForm",n.workflowForm)("section",t)("users",n.users)("teams",n.teams)}}function h_(i,o){if(1&i&&(e.TgZ(0,"div",21),e.YNc(1,m_,1,7,"ff-form-preview-vertical-section",22),e.YNc(2,u_,2,1,"ng-container",4),e.ALo(3,"findItemByKey"),e.YNc(4,f_,1,5,"ff-form-preview-horizontal-section",23),e.YNc(5,v_,1,4,"ff-form-preview-approval-section",24),e.qZA()),2&i){const t=e.oxw().$implicit,n=e.oxw(2);let l;e.Q6J("ngSwitch",t.fieldType),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionType.Section),e.xp6(1),e.Q6J("ngIf",null==(l=e.Dn7(3,5,n.triggerSections,"id",t.id))?null:l.show),e.xp6(2),e.Q6J("ngSwitchCase",n.SectionType.Table),e.xp6(1),e.Q6J("ngSwitchCase",n.SectionType.Approval)}}function x_(i,o){if(1&i&&(e.TgZ(0,"div",19),e.YNc(1,h_,6,9,"div",20),e.qZA()),2&i){const t=o.$implicit;e.xp6(1),e.Q6J("ngIf",!t.isDeleted)}}function T_(i,o){1&i&&(e.ynx(0),e.TgZ(1,"div",31)(2,"div",32)(3,"div",33)(4,"span"),e._uU(5,"May 2023"),e.qZA(),e._UZ(6,"i",34),e.qZA(),e.TgZ(7,"div"),e._UZ(8,"i",35)(9,"i",36),e.qZA()(),e.TgZ(10,"div",37)(11,"div",38),e._uU(12,"S"),e.qZA(),e.TgZ(13,"div",38),e._uU(14,"M"),e.qZA(),e.TgZ(15,"div",38),e._uU(16,"T"),e.qZA(),e.TgZ(17,"div",38),e._uU(18,"W"),e.qZA(),e.TgZ(19,"div",38),e._uU(20,"T"),e.qZA(),e.TgZ(21,"div",38),e._uU(22,"F"),e.qZA(),e.TgZ(23,"div",38),e._uU(24,"S"),e.qZA()(),e.TgZ(25,"div",37)(26,"div",38),e._uU(27,"\xa0"),e.qZA(),e.TgZ(28,"div",39),e._uU(29,"1"),e.qZA(),e.TgZ(30,"div",39),e._uU(31,"2"),e.qZA(),e.TgZ(32,"div",39),e._uU(33,"3"),e.qZA(),e.TgZ(34,"div",39),e._uU(35,"4"),e.qZA(),e.TgZ(36,"div",39),e._uU(37,"5"),e.qZA(),e.TgZ(38,"div",39),e._uU(39,"6"),e.qZA()(),e.TgZ(40,"div",37)(41,"div",39),e._uU(42,"7"),e.qZA(),e.TgZ(43,"div",39),e._uU(44,"8"),e.qZA(),e.TgZ(45,"div",39),e._uU(46,"9"),e.qZA(),e.TgZ(47,"div",39),e._uU(48,"10"),e.qZA(),e.TgZ(49,"div",38)(50,"span",40),e._uU(51,"11"),e.qZA()(),e.TgZ(52,"div",39),e._uU(53,"12"),e.qZA(),e.TgZ(54,"div",39),e._uU(55,"13"),e.qZA()(),e.TgZ(56,"div",37)(57,"div",39),e._uU(58,"14"),e.qZA(),e.TgZ(59,"div",39),e._uU(60,"15"),e.qZA(),e.TgZ(61,"div",39),e._uU(62,"16"),e.qZA(),e.TgZ(63,"div",39),e._uU(64,"17"),e.qZA(),e.TgZ(65,"div",39),e._uU(66,"18"),e.qZA(),e.TgZ(67,"div",39),e._uU(68,"19"),e.qZA(),e.TgZ(69,"div",39),e._uU(70,"20"),e.qZA()(),e.TgZ(71,"div",37)(72,"div",39),e._uU(73,"21"),e.qZA(),e.TgZ(74,"div",39),e._uU(75,"22"),e.qZA(),e.TgZ(76,"div",39),e._uU(77,"23"),e.qZA(),e.TgZ(78,"div",39),e._uU(79,"24"),e.qZA(),e.TgZ(80,"div",39),e._uU(81,"25"),e.qZA(),e.TgZ(82,"div",39),e._uU(83,"26"),e.qZA(),e.TgZ(84,"div",39),e._uU(85,"27"),e.qZA()(),e.TgZ(86,"div",37)(87,"div",39),e._uU(88,"28"),e.qZA(),e.TgZ(89,"div",39),e._uU(90,"29"),e.qZA(),e.TgZ(91,"div",39),e._uU(92,"30"),e.qZA(),e.TgZ(93,"div",39),e._uU(94,"31"),e.qZA(),e.TgZ(95,"div",38),e._uU(96,"\xa0"),e.qZA(),e.TgZ(97,"div",38),e._uU(98,"\xa0"),e.qZA(),e.TgZ(99,"div",38),e._uU(100,"\xa0"),e.qZA()(),e.TgZ(101,"div",41)(102,"div"),e._uU(103),e.ALo(104,"translate"),e.qZA(),e.TgZ(105,"p",42),e._uU(106,"6:57 PM"),e.qZA()()(),e.BQk()),2&i&&(e.xp6(103),e.Oqu(e.l
1cZ(104,1,"FORM.Time")))}function b_(i,o){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"input",45),e.NdJ("change",function(){const a=e.CHM(t).$implicit,r=e.oxw(4);return e.KtG(r.toggleChoice(r.currentField.id,a))}),e.ALo(2,"includes"),e.qZA(),e.TgZ(3,"label",46)(4,"span"),e._uU(5),e.qZA(),e._UZ(6,"i",47),e.qZA(),e.BQk()}if(2&i){const t=o.$implicit,n=o.index,l=e.oxw(4);e.xp6(1),e.Q6J("id","btncheck"+n)("checked",e.xi3(2,5,l.selectedChoices[l.currentField.id],t))("value",t),e.xp6(2),e.Q6J("for","btncheck"+n),e.xp6(2),e.Oqu(t)}}function w_(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",43),e.YNc(2,b_,7,8,"ng-container",44),e.ALo(3,"valueByKey"),e.qZA(),e.BQk()),2&i){const t=e.oxw(3);e.xp6(2),e.Q6J("ngForOf",e.xi3(3,2,t.currentField,"splittedTextAreaType"))("ngForTrackBy",t.trackById)}}function y_(i,o){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",48)(2,"label",49),e._uU(3),e.qZA(),e.TgZ(4,"input",50),e.NdJ("change",function(){const a=e.CHM(t).$implicit,r=e.oxw(4);return e.KtG(r.toggleChoice(r.currentField.id,a,!0))}),e.ALo(5,"includes"),e.qZA()(),e.BQk()}if(2&i){const t=o.$implicit,n=o.index,l=e.oxw(4);e.xp6(2),e.Q6J("for","choice"+n),e.xp6(1),e.Oqu(t),e.xp6(1),e.Q6J("id","choice"+n)("checked",e.xi3(5,6,l.selectedChoices[l.currentField.id],t))("name",l.currentField.id)("value",t)}}function F_(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",43),e.YNc(2,y_,6,9,"ng-container",44),e.ALo(3,"split"),e.ALo(4,"valueByKey"),e.qZA(),e.BQk()),2&i){const t=e.oxw(3);e.xp6(2),e.Q6J("ngForOf",e.xi3(3,2,e.xi3(4,5,t.currentField,"typeLogic"),"\n"))("ngForTrackBy",t.trackByIndex)}}function Z_(i,o){1&i&&(e.ynx(0),e.TgZ(1,"div",51)(2,"p"),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.TgZ(5,"div",52),e._UZ(6,"i",53)(7,"i",54),e.qZA(),e.TgZ(8,"div",55),e._UZ(9,"i",56)(10,"i",57),e.qZA()(),e.BQk()),2&i&&(e.xp6(3),e.Oqu(e.lcZ(4,1,"FORM.View or upload files")))}function A_(i,o){1&i&&(e.ynx(0),e.TgZ(1,"div",51)(2,"p"),e._uU(3),e.ALo(4,"translate"),e.qZA(),e._UZ(5,"i",58),e.qZA(),e.BQk()),2&i&&(e.xp6(3),e.Oqu(e.lcZ(4,1,"FORM.Create a task")))}function C_(i,o){1&i&&(e.ynx(0),e.TgZ(1,"div",59),e._UZ(2,"img",60),e.qZA(),e.BQk())}function k_(i,o){1&i&&(e.ynx(0),e.TgZ(1,"div",61),e._UZ(2,"img",62),e.qZA(),e.BQk())}function S_(i,o){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",43)(2,"button",63),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.setPreviewState(null))}),e.TgZ(3,"span"),e._uU(4),e.ALo(5,"translate"),e.qZA(),e._UZ(6,"i",64),e.qZA(),e.TgZ(7,"button",63),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.setPreviewState(null))}),e.TgZ(8,"span"),e._uU(9),e.ALo(10,"translate"),e.qZA(),e._UZ(11,"i",64),e.qZA(),e.TgZ(12,"button",63),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.setPreviewState(null))}),e.TgZ(13,"span"),e._uU(14),e.ALo(15,"translate"),e.qZA(),e._UZ(16,"i",64),e.qZA(),e.TgZ(17,"button",63),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.setPreviewState(null))}),e.TgZ(18,"span"),e._uU(19),e.ALo(20,"translate"),e.qZA(),e._UZ(21,"i",64),e.qZA(),e.TgZ(22,"button",63),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.setPreviewState(null))}),e.TgZ(23,"span"),e._uU(24),e.ALo(25,"translate"),e.qZA(),e._UZ(26,"i",64),e.qZA()(),e.BQk()}
12&i&&(e.xp6(4),e.Oqu(e.lcZ(5,5,"FORM.Open")),e.xp6(5),e.Oqu(e.lcZ(10,7,"FORM.Close")),e.xp6(5),e.Oqu(e.lcZ(15,9,"FORM.Start")),e.xp6(5),e.Oqu(e.lcZ(20,11,"FORM.Stop")),e.xp6(5),e.Oqu(e.lcZ(25,13,"FORM.Emergency shut down")))}function N_(i,o){1&i&&(e.ynx(0),e.TgZ(1,"div",65),e._UZ(2,"i",66),e.qZA(),e.BQk())}function q_(i,o){1&i&&(e.ynx(0),e.TgZ(1,"div",65),e._UZ(2,"i",67),e.qZA(),e.BQk())}function O_(i,o){1&i&&(e.ynx(0),e.TgZ(1,"div",65),e._UZ(2,"i",68),e.qZA(),e.BQk())}function U_(i,o){1&i&&(e.ynx(0),e.TgZ(1,"div",69)(2,"div",70)(3,"div",71),e._UZ(4,"div",72)(5,"div",73)(6,"i",74),e.qZA()()(),e.BQk())}function I_(i,o){1&i&&(e.ynx(0),e.TgZ(1,"div",75),e._UZ(2,"i",76),e.TgZ(3,"p",77)(4,"small"),e._uU(5),e.ALo(6,"translate"),e.qZA()()(),e.TgZ(7,"div",78)(8,"div",79)(9,"p",80)(10,"small"),e._uU(11),e.ALo(12,"translate"),e.qZA()(),e.TgZ(13,"p",81)(14,"small"),e._uU(15),e.ALo(16,"translate"),e.qZA()()(),e._UZ(17,"i",82),e.qZA(),e.BQk()),2&i&&(e.xp6(5),e.Oqu(e.lcZ(6,3,"FORM.Once confirmed, signature is no longer editable.")),e.xp6(6),e.Oqu(e.lcZ(12,5,"FORM.Signed by")),e.xp6(4),e.Oqu(e.lcZ(16,7,"FORM.Enter full name")))}function P_(i,o){1&i&&(e.TgZ(0,"span",86),e._uU(1,"\xa0"),e._UZ(2,"br"),e._uU(3,"\xa0"),e._UZ(4,"br"),e._uU(5,"\xa0"),e._UZ(6,"br"),e.qZA())}function L_(i,o){1&i&&(e.TgZ(0,"div",87)(1,"div",88)(2,"div",89),e._uU(3,"1"),e.qZA(),e.TgZ(4,"div",89),e._uU(5,"2"),e.qZA(),e.TgZ(6,"div",89),e._uU(7,"3"),e.qZA(),e.TgZ(8,"div",89),e._UZ(9,"i",90),e.qZA()(),e.TgZ(10,"div",88)(11,"div",89),e._uU(12,"4"),e.qZA(),e.TgZ(13,"div",89),e._uU(14,"5"),e.qZA(),e.TgZ(15,"div",89),e._uU(16,"6"),e.qZA(),e.TgZ(17,"div",89),e._uU(18,"."),e.qZA()(),e.TgZ(19,"div",88)(20,"div",89),e._uU(21,"7"),e.qZA(),e.TgZ(22,"div",89),e._uU(23,"8"),e.qZA(),e.TgZ(24,"div",89),e._uU(25,"9"),e.qZA(),e.TgZ(26,"div",89),e._uU(27,","),e.qZA()(),e.TgZ(28,"div",88)(29,"div",91),e._uU(30,"\xa0"),e.qZA(),e.TgZ(31,"div",89),e._uU(32,"0"),e.qZA(),e.TgZ(33,"div",91),e._uU(34,"\xa0"),e.qZA(),e.TgZ(35,"div",91),e._uU(36,"\xa0"),e.qZA()()())}function M_(i,o){1&i&&(e.TgZ(0,"div",87)(1,"div",92)(2,"div",93),e._uU(3,"1"),e.qZA(),e.TgZ(4,"div",93),e._uU(5,"2"),e.qZA(),e.TgZ(6,"div",93),e._uU(7,"3"),e.qZA(),e.TgZ(8,"div",93),e._uU(9,"4"),e.qZA(),e.TgZ(10,"div",93),e._uU(11,"5"),e.qZA(),e.TgZ(12,"div",93),e._uU(13,"6"),e.qZA(),e.TgZ(14,"div",93),e._uU(15,"7"),e.qZA(),e.TgZ(16,"div",93),e._uU(17,"8"),e.qZA(),e.TgZ(18,"div",93),e._uU(19,"9"),e.qZA(),e.TgZ(20,"div",93),e._uU(21,"0"),e.qZA()(),e.TgZ(22,"div",92)(23,"div",93),e._uU(24,"q"),e.qZA(),e.TgZ(25,"div",93),e._uU(26,"w"),e.qZA(),e.TgZ(27,"div",93),e._uU(28,"e"),e.qZA(),e.TgZ(29,"div",93),e._uU(30,"r"),e.qZA(),e.TgZ(31,"div",93),e._uU(32,"t"),e.qZA(),e.TgZ(33,"div",93),e._uU(34,"y"),e.qZA(),e.TgZ(35,"div",93),e._uU(36,"u"),e.qZA(),e.TgZ(37,"div",93),e._uU(38,"i"),e.qZA(),e.TgZ(39,"div",93),e._uU(40,"o"),e.qZA(),e.TgZ(41,"div",93),e._uU(42,"p"),e.qZA()(),e.TgZ(43,"div",92)(44,"div",93),e._uU(45,"a"),e.qZA(),e.TgZ(46,"div",93),e._uU(47,"s"),e.qZA(),e.TgZ(48,"div",93),e._uU(49,"d"),e.qZA(),e.TgZ(50,"div",93),e._uU(51,"f"),e.qZA(),e.TgZ(52,"div",93),e._uU(53,"g"),e.qZA(),e.TgZ(54,"div",93),e._uU(55,"h"),e.qZA(),e.TgZ(56,"div",93),e._uU(57,"j"),e.qZA(),e.TgZ(58,"div",93),e._uU(59,"k"),e.qZA(),e.TgZ(60,"div",93),e._uU(61,"l"),e.qZA(),e.TgZ(62,"div",93),e._uU(63,"#"),e.qZA()(),e.TgZ(64,"div",92)(65,"div",93),e._uU(66,"z"),e.qZA(),e.TgZ(67,"div",93),e._uU(68,"x"),e.qZA(),e.TgZ(69,"div",93),e._uU(70,"c"),e.qZA(),e.TgZ(71,"div",93),e._uU(72,"v"),e.qZA(),e.TgZ(73,"div",93),e._uU(74,"b"),e.qZA(),e.TgZ(75,"div",93),e._uU(76,"n"),e.qZA(),e.TgZ(77,"div",93),e._uU(78,"m"),e.qZA(),e.TgZ(79,"div",93),e._uU(80,"."),e.qZA(),e.TgZ(81,"div",93),e._uU(82,","),e.qZA(),e.TgZ(83,"div",93),e._uU(84,"@"),e.qZA()()())}function J_(i,o){if(1&i&&(e.ynx(0),e.TgZ(1,"div",83)(2,"p",80),e._uU(3),e.ALo(4,"translate"),e.qZA(),e.YNc(5,P_,7,0,"span",84),e.qZA(),e.YNc(6,L_,37,0,"div",85),e.YNc(7,M_,85,0,"div",85),e.BQk()),2&i){const t=e.oxw(3);e.xp6(3),e.hij("",e.lcZ(4,4,"FORM.Type here"),"..."),e.xp6(2),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.MultiLineText),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.Numeric),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState!==t.SectionFieldType.Numeric)}}function D_(i,o){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",7)(2,"button",30),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.setPreviewState(null))}),e._UZ(3,"i",9),e.qZA(),e.TgZ(4,"h6",10),e._uU(5),e.qZA(),e.TgZ(6,"button",30),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.setPreviewState(null))}),e._UZ(7,"i",11),e.qZA()(),e.TgZ(8,"div",12),e.YNc(9,T_,107,3,"ng-container",4),e.YNc(10,w_,4,5,"ng-container",4),e.YNc(11,F_,5,8,"ng-container",4),e.YNc(12,Z_,11,3,"ng-container",4),e.YNc(13,A_,6,3,"ng-container",4),e.YNc(14,C_,3,0,"ng-container",4),e.YNc(15,k_,3,0,"ng-container",4),e.YNc(16,S_,27,15,"ng-container",4),e.YNc(17,N_,3,0,"ng-container",4),e.YNc(18,q_,3,0,"ng-container",4),e.YNc(19,O_,3,0,"ng-container",4),e.YNc(20,U_,7,0,"ng-container",4),e.YNc(21,I_,18,9,"ng-container",4),e.YNc(22,J_,8,6,"ng-container",4),e.qZA(),e.BQk()}if(2&i){const t=e.oxw(2);e.xp6(5),e.Oqu(t.currentPreviewState),e.xp6(4),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.DateTime),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.MultiSelect),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.SingleSelect),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.InsertFile),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.Task),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.Location),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.IotDeviceChart),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.IotDeviceCmd),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.IotDeviceDataPoint),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.WebViewer),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.ImageViewer),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.Barcode),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.Signature),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.SingleLineText||t.currentPreviewState===t.SectionFieldType.MultiLineText||t.currentPreviewState===t.SectionFieldType.Numeric)}}function E_(i,o){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",94)(2,"div",43)(3,"div",95),e._uU(4),e.ALo(5,"translate"),e.qZA(),e.TgZ(6,"button",96),e._UZ(7,"i",97),e._uU(8),e.ALo(9,"translate"),e.qZA(),e.TgZ(10,"button",96),e._UZ(11,"i",98),e._uU(12),e.ALo(13,"translate"),e.qZA(),e.TgZ(14,"button",99),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.setPreviewState(null))}),e._UZ(15,"i",100),e._uU(16),e.ALo(17,"translate"),e.qZA()()(),e.BQk()}
12&i&&(e.xp6(4),e.Oqu(e.lcZ(5,4,"FORM.Add a photo")),e.xp6(4),e.hij(" ",e.lcZ(9,6,"FORM.Use camera"),""),e.xp6(4),e.hij(" ",e.lcZ(13,8,"FORM.Add from library"),""),e.xp6(4),e.hij(" ",e.lcZ(17,10,"FORM.Cancel"),""))}const Q_=function(i,o){return{"rounded-top btn-secondary":i,"btn-dark btn-sm rounded-pill":o}},B_=function(i,o,t,n){return{"top-0":i,"top-100":o,"bg-light":t,"bg-black-opacity-50":n}};function Y_(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",2)(1,"button",3),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.handlePreview())}),e.YNc(2,d_,4,3,"span",4),e.YNc(3,p_,4,3,"span",4),e.qZA(),e.TgZ(4,"div")(5,"div",5)(6,"div",6)(7,"div",7)(8,"button",8),e._UZ(9,"i",9),e.qZA(),e.TgZ(10,"h6",10),e._uU(11),e.qZA(),e.TgZ(12,"button",8),e._UZ(13,"i",11),e.qZA()(),e.TgZ(14,"div",12)(15,"div",13),e.YNc(16,x_,2,1,"div",14),e.qZA()(),e.ynx(17),e.TgZ(18,"div",15)(19,"div",16),e.YNc(20,D_,23,15,"ng-container",4),e.YNc(21,E_,18,12,"ng-container",4),e.qZA()(),e.BQk(),e.qZA()()()()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngClass",e.WLB(9,Q_,!t.showPreview,t.showPreview)),e.xp6(1),e.Q6J("ngIf",!t.showPreview),e.xp6(1),e.Q6J("ngIf",t.showPreview),e.xp6(8),e.Oqu(t.workflowForm.value.formName),e.xp6(5),e.Q6J("ngForOf",t.workflowForm.value.sections)("ngForTrackBy",t.trackById),e.xp6(2),e.Q6J("ngClass",e.l5B(12,B_,t.currentPreviewState,!t.currentPreviewState,t.currentPreviewState!==t.SectionFieldType.Photo,t.currentPreviewState===t.SectionFieldType.Photo)),e.xp6(2),e.Q6J("ngIf",t.currentPreviewState!==t.SectionFieldType.Photo),e.xp6(1),e.Q6J("ngIf",t.currentPreviewState===t.SectionFieldType.Photo)}}let pe=class we{constructor(o){this.previewService=o,this.SectionFieldType=s.ii,this.SectionType=s.bA,this.showPreview=!1,this.selectedChoices={},this.triggerSections=[],this.tableToShowId=""}ngOnInit(){this.getTriggerSections(),this.workflowForm.get("sections").valueChanges.pipe((0,v.b)(o=>this.updateCurrentFieldValue(o)),(0,u.t)(this)).subscribe()}updateCurrentFieldValue(o){let t=!1;o.forEach(n=>{if(t)return;const l=n.fields.find(a=>a.id===this.currentField?.id);l&&(this.currentField=l,t=!0)})}triggerSectionState(o){this.tableToShowId="",this.smartResponseStates=o.states;const t=[];Object.keys(o.states).forEach(n=>{const l=o.states?.[n]?.state,a=o.states?.[n]?.triggersByType?.table;a&&a.forEach(r=>{if(r.trigger===l&&o?.fromField===n){const c=r.triggerType.split("trigger.table.")?.[1];setTimeout(()=>this.tableToShowId=c)}}),this.workflowForm.value.sections.forEach(r=>r.fields.forEach(c=>c.id===n?t.push(c):null))}),this.triggerSections.forEach(n=>{n.show=!1,t.forEach(l=>{l.fieldTriggers?.forEach(a=>{a.triggerType===n?.label&&o.states?.[l.id]?.state===a.trigger&&(n.show=!0)})})})}getTriggerSections(){this.workflowForm.value.sections.forEach(o=>{o.fieldType===s.ii.TriggerSection&&this.triggerSections.push({id:o.id,label:o.label,show:!1})})}toggleChoice(o,t,n=!1){if(this.selectedChoices[o]||(this.selectedChoices[o]=[]),n){this.selectedChoices[o]=[t],this.smartResponseStates[o]&&(this.smartResponseStates[o].state=t),this.triggerSectionState({states:this.smartResponseStates,fromField:this.currentField.id});const l=[];this.smartResponseStates[o]?.triggersByType?.table?.filter(a=>a.trigger===this.smartResponseStates[o].state)?.forEach(a=>l.push(a?.triggerType?.split(".")?.pop()||"")),this.smartResponseStates[o]?.triggersByType?.triggerSection?.f
1ilter(a=>a.trigger===this.smartResponseStates[o].state)?.forEach(a=>{const r=this.workflowForm.value.sections.find(c=>c.label===a.triggerType);r&&l.push(r.id)}),l.filter(a=>a).forEach(a=>{const r=this.workflowForm.value.sections.find(c=>c.id===a||c.fieldName===a);r&&this.previewService.setPreviewSection(a,r)})}else this.selectedChoices[o].includes(t)?this.selectedChoices[o]=this.selectedChoices[o].filter(l=>l!==t):this.selectedChoices[o].push(t)}handlePreview(){this.showPreview=!this.showPreview}trackById(o,t){return t.id}trackByIndex(o){return o}setPreviewState(o){o?o?.fieldType!==s.ii.Boolean&&o?.fieldType!==s.ii.Trilean&&o?.fieldType!==s.ii.Label&&(this.currentPreviewState=o?.fieldType,this.currentField=o):this.currentPreviewState=null}static#e=this.\u0275fac=function(t){return new(t||we)(e.Y36(_e))};static#t=this.\u0275cmp=e.Xpm({type:we,selectors:[["ff-form-preview"]],inputs:{workflowForm:"workflowForm",users:"users",teams:"teams"},decls:2,vars:3,consts:[["data-cy","activityPreview",1,"preview"],["class","wrap pt-4",4,"ngIf"],[1,"wrap","pt-4"],["type","button","data-cy","activityPreviewToggle",1,"btn",3,"ngClass","click"],[4,"ngIf"],[1,"case","shadow"],[1,"screen"],[1,"header","d-flex","align-items-center","bg-white","shadow-sm","position-absolute","top-0","left-0","w-100"],["type","button",1,"btn","btn-link","text-decoration-none","btn-sm","py-0","opacity-25"],[1,"fa","fa-times","text-danger","lh-1"],[1,"flex-grow-1","text-center","text-nowrap","text-truncate","m-0"],[1,"fa","fa-check","text-primary-hover","lh-1"],[1,"body"],[1,"overflow-auto"],["data-cy","sectionPreview",4,"ngFor","ngForOf","ngForTrackBy"],[1,"keyboard-panel","z-2","h-100","w-100","position-absolute","start-0",3,"ngClass"],[1,"position-relative","h-100"],[1,"fa","fa-chevron-up","text-info"],[1,"fa","fa-times","text-danger"],["data-cy","sectionPreview"],[3,"ngSwitch",4,"ngIf"],[3,"ngSwitch"],[3,"workflowForm","section","sectionIndex","users","teams","selectedChoices","triggerSections","setPreviewState","smartResponseState",4,"ngSwitchCase"],[3,"workflowForm","section","users","teams","selectedChoices","setPreviewState",4,"ngSwitchCase"],[3,"workflowForm","section","users","teams",4,"ngSwitchCase"],[3,"workflowForm","section","sectionIndex","users","teams","selectedChoices","triggerSections","setPreviewState","smartResponseState"],[3,"workflowForm","section","sectionIndex","users","teams","selectedChoices","triggerSections","setPreviewState",4,"ngSwitchCase"],[3,"workflowForm","section","sectionIndex","users","teams","selectedChoices","triggerSections","setPreviewState"],[3,"workflowForm","section","users","teams","selectedChoices","setPreviewState"],[3,"workflowForm","section","users","teams"],["type","button",1,"btn","btn-link","text-decoration-none","btn-sm","py-0",3,"click"],[1,"p-3","bg-white","shadow-sm","text-center"],[1,"d-flex","align-items-center","justify-content-between","pb-4"],[1,"d-flex","align-items-center","flex-grow-1"],[1,"fas","fa-caret-down","text-grey","ps-2"],[1,"fas","fa-chevron-left","text-grey","pe-2"],[1,"fas","fa-chevron-right","text-grey"],[1,"row","pb-3"],[1,"col","text-center","lh-1"],[1,"col","text-center","lh-1","text-grey"],[1,"bg-primary","text-white","rounded-circle","px-1"],[1,"mt-3","d-flex","align-items-center","justify-content-between","pb-3"],[1,"m-0","px-2","py-1","lh-1","rounded","bg-light"],[1,"list-group","list-group-flush"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","checkbox","autocomplete","off",1,"btn-check",3,"id","checked","value","change"],[1,"btn","list-group-item","list-group-item-action","d-flex","align-items-center","justify-content-between","rounded-0",3,"for"],[1,"fas","fa-check","text-white"],[1,"list-group-item","list-group-item-action","d-flex","align-items-center","justify-content-between"],[1,"w-100",3,"for"],["type","radio",3,"id","checked","name","value","change"],[1,"h-100","d-flex","flex-column","align-items-center","justify-content-center"],[1,"d-flex","align-items-center","justify-content-between","pb-3","px-5"],[1,"far","fa-file-word","fa-4x","text-grey","px-2"],[1,"far","fa-file-pdf","fa-4x","text-grey","px-2"],[1,"d-flex","align-items-center","justify-content-between","px-5"],[1,"far","fa-file-excel","fa-4x","text-grey","px-2"],[1,"far","fa-file-image","fa-4x","text-grey","px-2"],[1,"fas","fa-briefcase","fa-5x","text-grey"],[1,"location","h-100","d-flex","align-items-center","justify-content-center"],["src","../../../assets/img/formBuilder/panel_map.jpg",1,"shadow-sm"],[1,"h-100"],["src","../../../assets/img/formBuilder/panel_iotChart.jpg",1,"shadow-sm"],["type","button",1,"list-group-item","list-group-item-action","d-flex","align-items-center","justify-content-between",3,"click"],[1,"far","fa-circle","text-primary-hover"],[1,"h-100","d-flex","align-items-center","justify-content-center"],[1,"fas","fa-podcast","fa-5x","text-grey"],[1,"fas","fa-globe","fa-5x","text-grey"],[1,"far","fa-image","fa-5x","text-grey"],[1,"h-100","d-flex","align-items-center"],[1,"position-relative","w-100"],[1,"m-5","border","border-5","border-primary","text-center"],[1,"position-absolute","w-50","h-100","start-50","top-50","bg-light","translate-middle"],[1,"position-absolute","w-100","h-50","start-50","top-50","bg-light","translate-middle"],[1,"fas","fa-barcode","fa-5x","text-grey","py-5","z-3","position-relative"],[1,"px-4","pt-3","d-flex","justify-content-center","align-items-center","opacity-50"],[1,"fas","fa-info-circle","fa-2x","text-danger","pe-2"],[1,"m-0","lh-sm"],[1,"p-3","m-3","bg-white","shadow","rounded-2","text-center"],[1,"border-bottom","d-flex","align-items-center","justify-content-between"],[1,"m-0"],[1,"m-0","text-grey"],[1,"fas","fa-signature","fa-5x","text-grey","py-5"],[1,"bg-white","p-3"],["class","d-block",4,"ngIf"],["class","p-2 position-absolute bottom-0 left-0 w-100",4,"ngIf"],[1,"d-block"],[1,"p-2","position-absolute","bottom-0","left-0","w-100"],[1,"keyRow","clearfix","d-flex","flex-row","justify-content-between"],[1,"col","key","bg-white","text-center","rounded-1","shadow-sm","flex-grow-1","py-2","fs-4"],[1,"far","fa-arrow-alt-circle-left"],[1,"col","key","text-center","rounded-1","shadow-sm","flex-grow-1","py-2","fs-4"],[1,"keyRow","d-flex","flex-row","justify-content-between"],[1,"key","bg-white","text-center","rounded-1","shadow-sm","flex-grow-1","py-2","fw-bold"],[1,"position-absolute","bottom-0","start-0","w-100"],[1,"list-group-item"],["type","button","disabled","",1,"list-group-item","list-group-item-action"],[1,"fa","fa-camera"],[1,"far","fa-images"],["type","button",1,"list-group-item","list-group-item-action",3,"click"],[1,"fa","fa-times"]],template:function(t,n){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Y_,22,17,"div",1),e.qZA()),2&t&&(e.ekj("show-preview",n.showPreview),e.xp6(1),e.Q6J("ngIf",n.workflowForm))},dependencies:[g.mk,g.sg,g.O5,g.RF,g.n9,as,de,__,ce.c,Ee.Z,M.H,K.l,Z.X$],styles:[".preview[_ngcontent-%COMP%]{width:345px;position:fixed;right:0;transition:right .2s;top:60px;height:calc(100vh - 60px)}.preview[_ngcontent-%COMP%] > .wrap[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{display:none;position:fixed;transition:right .2s}@media (max-width: 1450px){.preview[_ngcontent-%COMP%]{right:-355px}.preview[_ngcontent-%COMP%]:not(.show-preview) > .wrap[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{display:block;rotate:-90deg;top:142px;right:-59px}.preview.show-preview[_ngcontent-%COMP%]{right:0}.preview.show-preview[_ngcontent-%COMP%] > .wrap[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{display:block;top:96px;right:28px}}.case[_ngcontent-%COMP%]{background:url(iPhoneCase.24383d5959ecaefe.png) no-repeat scroll center 0 transparent;height:661px;padding:80px 0 0;width:328px;border-radius:23px}.case[_ngcontent-%COMP%] .screen[_ngcontent-%COMP%]{border-radius:3px;position:relative;background-color:#eee;padding:0;width:308px;margin:0 auto;height:519px;box-shadow:0 0 3px #0000004d inset;overflow:hidden}.case[_ngcontent-%COMP%] .screen[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{padding:10px 8px;z-index:1}
1.case[_ngcontent-%COMP%] .screen[_ngcontent-%COMP%] .body[_ngcontent-%COMP%]{padding-top:44px;height:519px;position:relative}.case[_ngcontent-%COMP%] .screen[_ngcontent-%COMP%] .body[_ngcontent-%COMP%] > div.overflow-auto[_ngcontent-%COMP%]{height:475px;padding-bottom:5px}.keyboard-panel[_ngcontent-%COMP%]{background-size:contain;z-index:1;transition:top .2s ease-in-out}.keyboard-panel[_ngcontent-%COMP%] .keyRow[_ngcontent-%COMP%]{gap:4px;margin-top:4px}.keyboard-panel[_ngcontent-%COMP%] .keyRow[_ngcontent-%COMP%] > .key[_ngcontent-%COMP%]{font-size:12px}"]})};function V_(i,o){1&i&&(e.TgZ(0,"small",9),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.hij("> ",e.lcZ(2,1,"FORM.Edit"),""))}function R_(i,o){1&i&&(e.TgZ(0,"small",9),e._uU(1),e.ALo(2,"translate"),e.qZA()),2&i&&(e.xp6(1),e.hij("> ",e.lcZ(2,1,"FORM.New"),""))}function H_(i,o){1&i&&e._UZ(0,"i",14)}function G_(i,o){1&i&&(e.TgZ(0,"div",15)(1,"span",16),e._uU(2,"Loading..."),e.qZA()())}function $_(i,o){if(1&i&&(e.TgZ(0,"ul",10)(1,"li",11),e.YNc(2,H_,1,0,"i",12),e.YNc(3,G_,3,0,"div",13),e.qZA()()),2&i){const t=e.oxw();e.xp6(2),e.Q6J("ngIf",t.saving),e.xp6(1),e.Q6J("ngIf",t.loading)}}pe=(0,P.gn)([(0,u.c)()],pe);const j_=function(){return["/schedules"]};function K_(i,o){1&i&&(e.TgZ(0,"li",26)(1,"button",27),e._uU(2),e.ALo(3,"translate"),e._UZ(4,"i",28),e.qZA()()),2&i&&(e.xp6(1),e.Q6J("routerLink",e.DdM(4,j_)),e.xp6(1),e.hij(" ",e.lcZ(3,2,"FORM.New Schedule")," "))}function z_(i,o){1&i&&(e.ynx(0),e._uU(1),e.ALo(2,"translate"),e.BQk()),2&i&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"FORM.Published")))}function W_(i,o){1&i&&(e.ynx(0),e._uU(1),e.ALo(2,"translate"),e.BQk()),2&i&&(e.xp6(1),e.Oqu(e.lcZ(2,1,"FORM.Draft")))}function X_(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",29)(1,"input",30),e.NdJ("click",function(l){e.CHM(t);const a=e.oxw(3);return e.KtG(a.setPublishedState(l))}),e.qZA()()}if(2&i){const t=e.oxw(3);e.xp6(1),e.ekj("checked",""!==t.formId&&(null==t.workflowForm?null:t.workflowForm.value.isPublished)),e.Q6J("checked",null==t.workflowForm?null:t.workflowForm.value.isPublished)("disabled",t.user$.value.role!==t.UserRoles.Admin&&!t.isOwner)}}function ed(i,o){if(1&i){const t=e.EpF();e.ynx(0),e.TgZ(1,"li",18)(2,"button",31),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.onSave(!1))}),e._uU(3),e.ALo(4,"translate"),e._UZ(5,"i",32),e.qZA()(),e.TgZ(6,"li",18)(7,"button",33),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.onSave(!0))}),e._uU(8),e.ALo(9,"translate"),e._UZ(10,"i",32),e.qZA()(),e.BQk()}if(2&i){const t=e.oxw(3);e.xp6(1),e.ekj("show",null==t.workflowForm?null:t.workflowForm.valid),e.xp6(1),e.Q6J("disabled",(null==t.workflowForm?null:t.workflowForm.pristine)&&t.formId),e.xp6(1),e.hij(" ",e.lcZ(4,8,"FORM.Save"),""),e.xp6(3),e.ekj("show",null==t.workflowForm?null:t.workflowForm.valid),e.xp6(1),e.Q6J("disabled",(null==t.workflowForm?null:t.workflowForm.pristine)&&t.formId),e.xp6(1),e.hij(" ",e.lcZ(9,10,"FORM.Save & Go Back"),"")}}function td(i,o){if(1&i&&(e.ynx(0),e.YNc(1,K_,5,5,"li",21),e.TgZ(2,"li",22)(3,"div",23)(4,"span",24),e.YNc(5,z_,3,3,"ng-container",17),e.YNc(6,W_,3,3,"ng-container",17),e.qZA(),e.YNc(7,X_,2,4,"div",25),e.qZA()(),e.YNc(8,ed,11,12,"ng-container",17),e.BQk()),2&i){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.formId&&(null==t.workflowForm?null:t.workflowForm.value.isPublished)),e.xp6(1),e.ekj("published",null==t.workflowForm?null:t.workflowForm.value.isPublished),e.xp6(3),e.Q6J("ngIf",null==t.workflowForm?null:t.workflowForm.value.isPublished),e.xp6(1),e.Q6J("ngIf",!(null!=t.workflowForm&&t.workflowForm.value.isPublished)),e.xp6(1),e.Q6J("ngIf",null==t.workflowForm?null:t.workflowForm.value.assignableUsers),e.xp6(1),e.Q6J("ngIf",t.isOwner||t.user$.value.role===t.UserRoles.Admin)}}function id(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"ul",10),e.YNc(1,td,9,7,"ng-container",17),e.TgZ(2,"li",18)(3,"button",19),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.goBack())}),e._UZ(4,"i",20),e._uU(5),e.ALo(6,"translate"),e.qZA()()()}if(2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.initError),e.xp6(4),e.hij("",e.lcZ(6,2,"FORM.Go Back")," ")}}
1function nd(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"ff-tutorial",34),e.NdJ("tutorialDone",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.onTutorialDone())}),e.qZA()}}let me=class ye{constructor(o,t,n){this.modalService=o,this.onboardingService=t,this.router=n,this.save=new e.vpe,this.publishedStateChange=new e.vpe,this.UserRoles=B.vX,this.OnboardingStepId=Y.L}ngOnInit(){this.tutorial$=this.onboardingService.tutorial$}goBack(){if(this.workflowForm?.dirty){const o=this.modalService.open(q._8,{modalDialogClass:"shadow-lg",size:"sm"});o.componentInstance.options={cancelButton:!0,modalHeader:"Do you want to go back without saving your changes?",confirmationLabel:"Yes, go back",modalType:te.i.Danger},o.componentInstance.modalAccept.pipe((0,v.b)(()=>{this.router.navigate(["forms"])}),(0,u.t)(this)).subscribe()}else this.router.navigate(["forms"])}onTutorialDone(){this.onboardingService.setCurrentStep(Y.L.DownloadApp,!1,!0),this.onboardingService.updateOnboarding({showPanel:!0})}onSave(o){this.save.emit(o)}setPublishedState(o){const t=o.target.checked;if(this.workflowForm?.get("id")?.value){o.preventDefault();const n=this.modalService.open(q._8,{modalDialogClass:"shadow-lg",size:"sm"});n.componentInstance.options={cancelButton:!0,modalHeader:`Are you sure you want to ${t?"publish":"unpublish"} this Workflow?`},n.componentInstance.modalAccept.pipe((0,v.b)(()=>{o.target.checked=!t,this.workflowForm?.markAsDirty(),this.workflowForm?.get("isPublished")?.setValue(t),this.publishedStateChange.emit(t)}),(0,u.t)(this)).subscribe()}else this.workflowForm?.markAsDirty(),this.workflowForm?.get("isPublished")?.setValue(t)}static#e=this.\u0275fac=function(t){return new(t||ye)(e.Y36(p.FF),e.Y36(H.D),e.Y36(N.F0))};static#t=this.\u0275cmp=e.Xpm({type:ye,selectors:[["ff-form-header"]],inputs:{loading:"loading",saving:"saving",workflowForm:"workflowForm",formId:"formId",isOwner:"isOwner",user$:"user$",initError:"initError"},outputs:{save:"save",publishedStateChange:"publishedStateChange"},decls:15,vars:14,consts:[[1,"fixed-top"],[1,"d-flex","flex-wrap","justify-content-between","ps-3","pe-2"],[1,"d-flex","align-items-center","me-md-auto","name"],[1,"lh-base","d-none","d-md-inline-block","far","fa-file","fa-lg"],[1,"fs-4","m-0"],["class","fs-6 text-grey",4,"ngIf"],[1,"d-flex",3,"joyrideStep","stepPosition","stepContent"],["class","nav",4,"ngIf"],["stepContent6",""],[1,"fs-6","text-grey"],[1,"nav"],[1,"me-1","loading"],["class","fas fa-cog fa-spin fa-lg",4,"ngIf"],["class","spinner-border text-light position-relative","role","status",4,"ngIf"],[1,"fas","fa-cog","fa-spin","fa-lg"],["role","status",1,"spinner-border","text-light","position-relative"],[1,"visually-hidden"],[4,"ngIf"],[1,"ms-2"],["type","button","data-cy","goBack",1,"btn","btn-outline-danger",3,"click"],[1,"fa","fa-chevron-left","d-none","d-lg-inline-block","pe-1"],["class","ms-2 d-none d-lg-block",4,"ngIf"],[1,"ms-2","pt-3","switch"],[1,"d-flex","flex-column","border-start","ps-2","border-end","pe-2","border-light"],[1,"d-block","text-grey-dark","fs-10","lh-1","pt-0","pb-1"],["class","form-check form-switch fs-14 m-0 p-0",4,"ngIf"],[1,"ms-2","d-none","d-lg-block"],["type","button","data-cy","goToSchedule",1,"btn","btn-outline-light",3,"routerLink"],[1,"fas","fa-calendar-plus","ps-1"],[1,"form-check","form-switch","fs-14","m-0","p-0"],["type","checkbox","data-cy","isPublished",1,"form-check-input","m-0",3,"checked","disabled","click"],["type","button","data-cy","save",1,"btn","btn-primary",3,"disabled","click"],[1,"fa","fa-save","d-none","d-lg-inline-block","ps-1"],["type","button","data-cy","saveAndGoBack",1,"btn","btn-outline-light","text-secondary",3,"disabled","click"],["text","Congratulations! Your workflow is now ready.","subText",'You can continue to customize and click "Save" when finished.',3,"tutorialDone"]],template:function(t,n){if(1&t&&(e.TgZ(0,"header",0)(1,"div",1)(2,"div",2),e._UZ(3,"i",3),e.TgZ(4,"h1",4),e._uU(5),e.ALo(6,"translate"),e.YNc(7,V_,3,3,"small",5),e.YNc(8,R_,3,3,"small",5),e.qZA()(),e.TgZ(9,"div",6),e.ALo(10,"async"),e.YNc(11,$_,4,2,"ul",7),e.YNc(12,id,7,4,"ul",7),e.qZA()()(),e.YNc(13,nd,1,0,"ng-template",null,8,e.W1O)),2&t){const l=e.MAs(14);let a;e.xp6(5),e.hij(" ",e.lcZ(6,10,"FORM.Workflow")," "),e.xp6(2),e.Q6J("ngIf",n.formId),e.xp6(1),e.Q6J("ngIf",!n.formId),e.xp6(1),e.ekj("disable-tutorial-click",null==(a=e.lcZ(10,12,n.tutorial$))?null:a.disableClick),e.Q6J("joyrideStep",n.OnboardingStepId.WorkflowNew+"-6")("stepPosition","bottom")("stepContent",l),e.xp6(2),e.Q6J("ngIf",n.loading||n.saving),e.xp6(1),e.Q6J("ngIf",!n.loading&&!n.saving)}},dependencies:[g.O5,le.g,J.ym,N.rH,g.Ov,Z.X$],encapsulation:2})};me=(0,P.gn)([(0,u.c)()],me);var od=d(3845),ld=d(5752),ad=d(5789),rd=d(8929),sd=d(6920),cd=d(3001),_d=d(6611),dd=d(7445),pd=d(1213),md=d(7140);function gd(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",13)(1,"button",14),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(3);return e.KtG(l.openAiBuilder())}),e._UZ(2,"i",15),e._uU(3," Build with AI "),e.qZA()()}}function ud(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",5)(1,"div",6),e.ALo(2,"async"),e.YNc(3,gd,4,0,"div",7),e.TgZ(4,"ff-new-element-sidebar",8),e.NdJ("addNewSection",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.addSection(l))})("addNewSectionField",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.addSectionField(l))}),e.qZA()(),e.TgZ(5,"div",9),e.ALo(6,"async"),e.TgZ(7,"ff-form-builder",10),e.NdJ("removeSection",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.removeSection(l))})("removeField",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.removeField(l))})("cloneSection",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.cloneSection(l))})("addNewSection",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.addSection(l))})("addNewSectionField",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.addSectionField(l))})("panelChange",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.sectionPanelChange(l))})("openedSectionsIdsChange",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.onOpenedSectionsIdsChange(l))})("orderChange",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.handleSectionAndFieldOrder())})("dragFieldsDropListChange",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.onDragFieldsDropListChange())})("sectionNameChange",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.checkSectionNamesForDuplicates())}),e.qZA()(),e.TgZ(8,"div",11),e._UZ(9,"ff-form-preview",12),e.qZA()()}if(2&i){const t=e.oxw(2);e.xp6(1),e.ekj("sidebar-collapsed",e.lcZ(2,29,t.sidebarCollapsed$)),e.xp6(2),e.Q6J("ngIf",!t.formId),e.xp6(1),e.Q6J("user",t.user$.value)("workflowForm",t.workflowForm)("blockElements",t.blockElements)("fieldsDropList",t.fieldsDropList),e.xp6(1),e.ekj("sidebar-collapsed",e.lcZ(6,31,t.sidebarCollapsed$)),e.xp6(2),e.Q6J("workflowForm",t.workflowForm)("users",t.users)("user$",t.user$)("teams",t.teams)("referenceData",t.referenceData)("hierarchies",t.hierarchies)("assetTypes",t.assetTypes)("isOwner",t.isOwner)("blockElements",t.blockElements)("lastSectionId",t.lastSectionId)("lastHideFlowIds",t.lastHideFlowIds)("classifications",t.classifications)("fieldsDropList",t.fieldsDropList)("openedSectionsIds",t.openedSectionsIds)("selectedOwners",t.selectedOwners)("selectedPrivateUsers",t.selectedPrivateUsers)("advanceTableHierarchies",t.advanceTableHierarchies),e.xp6(2),e.Q6J("workflowForm",t.workflowForm)("users",t.users)("teams",t.teams)}}function fd(i,o){1&i&&e._UZ(0,"ff-loading-state")}function vd(i,o){if(1&i&&(e.ynx(0),e.YNc(1,ud,10,33,"div",4),e.YNc(2,fd,1,0,"ff-loading-state",1),e.BQk()),2&i){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.loading),e.xp6(1),e.Q6J("ngIf",t.loading)}}function hd(i,o){if(1&i&&(e.TgZ(0,"div",16)(1,"div",17),e._uU(2),e.qZA()()),2&i){const t=e.oxw();e.xp6(2),e.hij(" ",t.initError,"! ")}}function xd(i,o){1&i&&e._UZ(0,"span",34)}function Td(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"p",28),e._uU(2,"Describe the workflow you want to build and AI will generate it for you."),e.qZA(),e.TgZ(3,"textarea",29),e.NdJ("ngModelChange",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.aiPrompt=l)})("focus",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.pauseAiPlaceholder())})("blur",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.resumeAiPlaceholder())})("keydown.control.enter",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.generateFormWithAi())}),e.qZA(),e.TgZ(4,"div",30)(5,"button",31),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.closeAiBuilder())}),e._uU(6,"Cancel"),e.qZA(),e.TgZ(7,"button",32),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.generateFormWithAi())}),e.YNc(8,xd,1,0,"span",33),e._uU(9),e.qZA()()()}if(2&i){const t=e.oxw(2);e.xp6(3),e.Q6J("placeholder",t.aiPlaceholder)("disabled",t.aiGenerating)("ngModel",t.aiPrompt),e.xp6(2),e.Q6J("disabled",t.aiGenerating),e.xp6(2),e.Q6J("disabled",t.aiGenerateDisabled),e.xp6(1),e.Q6J("ngIf",t.aiGenerating),e.xp6(1),e.hij(" ",t.aiGenerating?"Generating...":"Generate Workflow"," ")}}function bd(i,o){1&i&&(e.TgZ(0,"div"),e._UZ(1,"i",38),e.TgZ(2,"p",39),e._uU(3,"Drag & drop a PDF here or click to browse"),e.qZA()())}function wd(i,o){if(1&i&&(e.TgZ(0,"div"),e._UZ(1,"i",40),e.TgZ(2,"p",21),e._uU(3),e.qZA(),e.TgZ(4,"small",41),e._uU(5),e.qZA()()),2&i){const t=e.oxw(3);e.xp6(3),e.Oqu(t.aiPdfFile.name),e.xp6(2),e.hij("",t.aiPdfFileSizeKb," KB")}}function yd(i,o){1&i&&e._UZ(0,"span",34)}function Fd(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div")(1,"p",28),e._uU(2,"Upload a PDF and AI will generate a workflow based on its content."),e.qZA(),e.TgZ(3,"div",35),e.NdJ("dragover",function(l){return e.CHM(t),e.oxw(2).pdfDragOver=!0,e.KtG(l.preventDefault())})("dragleave",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.pdfDragOver=!1)})("drop",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.onPdfDrop(l))})("click",function(){e.CHM(t);const l=e.MAs(5);return e.KtG(l.click())}),e.TgZ(4,"input",36,37),e.NdJ("change",function(l){e.CHM(t);const a=e.oxw(2);return e.KtG(a.onPdfFileSelected(l))}),e.qZA(),e.YNc(6,bd,4,0,"div",1),e.YNc(7,wd,6,2,"div",1),e.qZA(),e.TgZ(8,"div",30)(9,"button",31),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.closeAiBuilder())}),e._uU(10,"Cancel"),e.qZA(),e.TgZ(11,"button",32),e.NdJ("click",function(){e.CHM(t);const l=e.oxw(2);return e.KtG(l.generateFormFromPdf())}),e.YNc(12,yd,1,0,"span",33),e._uU(13),e.qZA()()()}if(2&i){const t=e.oxw(2);e.xp6(3),e.ekj("border-primary",t.pdfDragOver),e.xp6(3),e.Q6J("ngIf",!t.aiPdfFile),e.xp6(1),e.Q6J("ngIf",t.aiPdfFile),e.xp6(2),e.Q6J("disabled",t.aiGenerating),e.xp6(2),e.Q6J("disabled",!t.aiPdfFile||t.aiGenerating),e.xp6(1),e.Q6J("ngIf",t.aiGenerating),e.xp6(1),e.hij(" ",t.aiGenerating?"Generating...":"Generate Workflow"," ")}}function Zd(i,o){if(1&i){const t=e.EpF();e.TgZ(0,"div",18),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.closeAiBuilder())}),e.TgZ(1,"div",19),e.NdJ("click",function(l){return l.stopPropagation()}),e.TgZ(2,"div",20)(3,"h5",21),e._UZ(4,"i",22),e._uU(5,"Build with AI"),e.qZA(),e.TgZ(6,"button",23),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.closeAiBuilder())}),e.qZA()(),e.TgZ(7,"div",24)(8,"ul",25)(9,"li",26)(10,"button",27),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.aiBuilderTab="prompt")}),e._uU(11,"Describe It"),e.qZA()(),e.TgZ(12,"li",26)(13,"button",27),e.NdJ("click",function(){e.CHM(t);const l=e.oxw();return e.KtG(l.aiBuilderTab="pdf")}
1),e._uU(14,"Upload PDF"),e.qZA()()(),e.YNc(15,Td,10,7,"div",1),e.YNc(16,Fd,14,8,"div",1),e.qZA()()()}if(2&i){const t=e.oxw();e.xp6(10),e.ekj("active","prompt"===t.aiBuilderTab),e.xp6(3),e.ekj("active","pdf"===t.aiBuilderTab),e.xp6(2),e.Q6J("ngIf","prompt"===t.aiBuilderTab),e.xp6(1),e.Q6J("ngIf","pdf"===t.aiBuilderTab)}}let ge=class Fe{constructor(o,t,n,l,a,r,c,_,h,T,f,x,A,ue,fe,ve,he){this.route=o,this.router=t,this.userService=n,this.teamService=l,this.referenceDataService=a,this.hierarchyService=r,this.formService=c,this.formBuilder=_,this.modalService=h,this.changeDetector=T,this.sidebarService=f,this.onboardingService=x,this.joyrideStepService=A,this.mixpanelService=ue,this.loadFormsService=fe,this.errorHandlingService=ve,this.assetTypesService=he,this.formId=this.route.snapshot.paramMap.get("id")??"",this.user$=this.userService.user$,this.blockElements=!1,this.lastSectionId=0,this.lastHideFlowIds=[],this.fieldsDropList=[],this.openedSectionsIds=["custom-section-panel-1"],this.sidebarCollapsed$=this.sidebarService.sidebarCollapsed,this.IntercomTrackEvent=O.Q,this.advanceTableHierarchies={},this.showAiBuilder=!1,this.aiPrompt="",this.aiGenerating=!1,this.aiBuilderTab="prompt",this.aiPdfFile=null,this.pdfDragOver=!1,this.aiPlaceholder="",this.aiPlaceholderSuggestions=["Create an HSE inspection checklist","Build a preventative maintenance work order","Create a turnaround task tracking workflow","Build a permit to work workflow","Create a toolbox talk sign-off sheet","Build a JSA (Job Safety Analysis) workflow","Create a daily drilling report","Build an equipment inspection checklist","Create a management of change workflow","Build a safety observation report"],this.aiPlaceholderTimer=null,this.aiTypingTimer=null,this.aiPlaceholderIndex=0,this.aiPlaceholderPaused=!1}get aiGenerateDisabled(){return!this.aiPrompt.trim()||this.aiGenerating}get aiPdfFileSizeKb(){return this.aiPdfFile?(this.aiPdfFile.size/1024).toFixed(0):""}ngOnInit(){this.loading=!0,(0,Xe.D)([this.userService.getUsers$(),this.teamService.getTeams$(!1),this.userService.getReferences$("PROCESS"),this.loadForm$(),this.referenceDataService.getExpandedReferenceData$(),this.hierarchyService.getHierarchies$(!0),this.assetTypesService.getAssetTypesWithoutItems$()]).pipe((0,v.b)(([o,t,n,l,a,r,c])=>{this.assetTypes=c,this.hierarchies=r,this.referenceData=a,this.users=o,this.teams=t,this.classifications=n,this.setupForm(l),this.handleTaskFieldsControls(),this.updateFieldsDropList(),this.isOwner=this.workflowForm.value.owner.filter(_=>_).map(_=>_.id).includes(this.user$.value.id)||!JSON.parse(l.owner)?.users?.length||!l.owner,this.workflowForm.value.id&&this.checkFormNameExists(this.workflowForm.value.formName,this.workflowForm.value.id,this.workflowForm?.get("formName"))}),(0,I.K)(o=>(this.initError="Could not find the workflow",this.loading=!1,o instanceof D.UA&&(this.initError=o.statusText),(0,ee.of)(o))),(0,L.x)(()=>{this.checkBlockElements(),this.loading=!1,this.onboardingService.tutorial$.value.active&&this.joyrideStepService.next(),this.handleAiBuilderQueryParam()}),(0,u.t)(this)).subscribe(),this.loadFormsService.loadWorkflows.pipe((0,et.h)(o=>o),(0,tt.w)(()=>this.formService.getAllForms$()),(0,v.b)(o=>this.loadFormsService.workflows.next(o)),(0,u.t)(this)).subscribe()}handleTaskFieldsControls(){this.workflowForm?.get("sections")?.controls.forEach(o=>{o?.get("fields")?.controls.forEach(t=>{if(t.value.fieldType===s.ii.Task){try{JSON.parse(t.value.typeLogic),t.get("parsedTypeLogic")?.patchValue({formId:t.value.parsedTypeLogic?.formId||null,formName:t.value.parsedTypeLogic?.formName||null,comments:t.value.parsedTypeLogic?.comments||null})}catch{t.get("parsedTypeLogic")?.patchValue({formId:t.value.parsedTypeLogic?.formId||null,formName:t.value.parsedTypeLogic?.formName||null,comments:t.value.typeLogic+""})}t?.get("typeLogic")?.patchValue(JSON.stringify(t.value.parsedTypeLogic))}})})}sectionPanelChange(o){this.openedSectionsIds=this.openedSectionsIds.filter(t=>t!==o),this.updateFieldsDropList()}onDragFieldsDropListChange(){this.updateFieldsDropList()}checkFormNameExists(o,t,n){n&&this.formService.checkFormName$(o,t).pi
1pe((0,it.U)(l=>{n?.setErrors(l?{formNameExists:!0}:null)}),(0,u.t)(this)).subscribe()}formNameValidator(){return o=>{const t=o.value,n=this.workflowForm?.value.formName;if(!n||t===this.currentFormName||n===t)return;this.currentFormName=t;const l=this.workflowForm?.get("id")?.value;t&&this.checkFormNameExists(t,l,o)}}updateFieldsDropList(o=null){this.changeDetector.detectChanges(),o&&(this.openedSectionsIds=this.openedSectionsIds.filter(t=>+t.slice(t.lastIndexOf("-")+1)!==o)),this.formBuilderComponent&&(this.fieldsDropList=this.formBuilderComponent.dropListElements.toArray().map(t=>t.id).filter(t=>t.includes("fieldsDropList")))}setlastSectionId(){const o=this.workflowForm?.value,t=function n(){for(let a=o?.sections.length-1;a>=0;a--){const r=o.sections[a];if(!r.isDeleted&&r.fieldType!==s.bA.Trigger&&r.fieldType!==s.bA.Approval)return{id:r.id,index:a}}return{id:null,index:0}}();this.lastSectionId=t.index,this.lastHideFlowIds=function l(a){const r=[];for(let c=a;c<o?.sections.length;c++){const _=o.sections[c];!_.isDeleted&&(_.fieldType===s.bA.Trigger||_.fieldType===s.bA.Approval)&&r.push(_.id)}return r}(t.index)}checkBlockElements(){let t=0;this.workflowForm.value.sections.forEach(n=>{!n.isDeleted&&n.fieldType!==s.bA.Trigger&&n.fieldType!==s.bA.Approval&&(t+=1)}),this.blockElements=t<2}getSectionFieldsForm(o,t=!1){return this.formBuilder.array(o.fields.map(n=>(t&&(b.gb.dropValues(n,["href","fieldName"]),n.id=b.A5.getUuid()),w.b.isVariableNameField(n.fieldType)||b.gb.dropValues(n,["variableName"]),this.formBuilder.group({...n,nextNumberValue:n.nextNumberValue||0,variableNameInUse:!1,variableNameNotExist:!1,splittedTextAreaType:[n.typeLogic?.split(/\n|\r|\r\n/),[]],isMonetary:"true"===n.typeLogic?.split("|")[4]||!1,fieldSecurity:this.formBuilder.array(n.fieldSecurity.map(l=>this.formBuilder.group(l))),fieldTriggers:this.formBuilder.array((n.fieldTriggers||[]).map(l=>this.formBuilder.group({...l,parsedAssignees:this.parseJSON(l.assignees||"")||{teams:[],users:[]}}))),parsedTypeLogic:this.parseJSON(n.typeLogic||""),label:[t?this.getUniqueClonedVariable(n,!1):n.label,n.fieldType===s.ii.Label?[]:[(0,b.JL)()]],variableName:t?this.getUniqueClonedVariable(n):n.variableName,multiSelectDefaultValues:[n.typeLogic?.split(/\n|\r|\r\n/).map(l=>({id:l})),[]],date:null,time:null,automation:null,hierarchyField:null,assetTypeId:null}))))}getSectionForm(o,t=!1){const n=this.parseJSON(o.typeLogic||"").rows?.map(c=>c.row),l=o.fields.map(c=>({[c.fieldName]:""})),a={};l?.forEach(c=>Object.assign(a,c));const r=n?.map(c=>this.formBuilder.group({...a,...c}));return{...o,label:[o.label,[(0,b.JL)()]],parsedTypeLogic:this.formBuilder.group(this.parseJSON(o.typeLogic||"")),parsedRows:this.formBuilder.array(r||[]),parsedAssignees:this.parseJSON(o.assignees||"")||{teams:[],users:[]},horizontalExampleCollapsed:!0,fields:this.getSectionFieldsForm(o,t),requireLabel:!1}}loadForm$(){return this.formId?this.formService.getForm$(this.formId):(0,ee.of)({assignableUsers:[],description:"",id:null,owner:JSON.stringify({teams:[],users:[]}),formName:"",privacyUsers:[],onSubmit:"false|",aiLogic:"false|1|day||false",isPublished:!0,isPrivacyEnabled:!1,isWorkflow:!1,sections:Ae.map(o=>({...o,id:b.A5.getUuid()})),isDeleted:!1,teamId:null,teamName:null,processId:null,icon:null,ownerParsed:null})}parseJSON(o){try{return JSON.parse(o)}catch{return o}}cloneSection(o){b.gb.dropValues(o,["href","fieldName"]);const t=this.modalService.open(q._8,{size:"sm"});t.componentInstance.options={cancelButton:!0,modalHeader:"Do you want to clone this section?",modalType:te.i.Primary,showIcon:!1},t.componentInstance.modalAccept.pipe((0,v.b)(()=>{const[n]=this.getFormArrays(),l=this.formBuilder.group({...this.getSectionForm(o,!0),id:b.A5.getUuid(),label:[o.label?o.label+" (Copy)":"(Copy)",[(0,b.JL)()]]});n.push(l),this.workflowForm.markAsDirty(),this.changeDetector.detectChanges(),setTimeout(()=>{this.checkBlockElements(),this.setlastSectionId(),this.handleSectionPanel(),this.handleSectionAndFieldOrder(),this.updateFieldsDropList(),this.checkSectionNamesForDuplicates(),y.validateHierarchyFields(this.workflowForm)})}),(0,u.t)(this)).subscribe()}checkSectionNamesForDuplicates(){const o=this.workflowForm.value.sections.filter((l,a)=>!l.isDeleted&&0!==a).map(l=>l.label?.toLowerCase()?.trim()).filter(l=>l),t={};o.forEach(l=>t[l]?t[l]++:t[l]=1);const[n]=this.getFormArrays();
1n.controls.forEach(l=>{const a=l.get("label")?.value?.toLowerCase()?.trim(),r=l.get("label")?.errors??{};t[a]>1?r.duplicateSectionName=!0:b.gb.dropValues(r,["duplicateSectionName"]),l.get("label")?.setErrors(Object.keys(r).length?r:null)})}getUniqueClonedVariable(o,t=!0){if(w.b.isVariableNameField(o.fieldType)){let n=0;return this.workflowForm?.value.sections.forEach(l=>{l.fields.forEach(a=>{w.b.isVariableNameField(a.fieldType)&&(n+=1)})}),t?w.b.isMathOperation(o.variableName||"")?o.variableName:"@"+((o.label||"")+n).replace(/\s/g,"").toUpperCase():w.b.isMathOperation(o.variableName||"")?o.label:(o.label||"")+n}return o.fieldType===s.ii.Hierarchy&&!t&&(o.label+=" copy"),t?null:o.label}removeField(o){const[t,n]=this.getFormArrays(o.sectionId),l=n.controls.find(a=>a.value.id===o.field.id);this.openDeleteConfirmationModal(()=>{l&&(l.patchValue({isDeleted:!0}),this.setMyFormAsValid(l),this.handleSectionAndFieldOrder(),y.checkVariableNamesExisting(this.workflowForm),y.handleDuplicateVariableNames(this.workflowForm),y.validateHierarchyFields(this.workflowForm),this.workflowForm.markAsDirty(),this.changeDetector.detectChanges())})}removeSection(o){const[t]=this.getFormArrays(),n=t.controls.find(a=>a.value.id===o.id),l=t.controls.findIndex(a=>a.value.id===o.id);this.openDeleteConfirmationModal(()=>{n&&(n.patchValue({isDeleted:!0}),this.setMyFormAsValid(n),this.checkBlockElements(),this.setlastSectionId(),this.handleSectionAndFieldOrder(),this.checkSectionNamesForDuplicates(),this.updateFieldsDropList(l),y.checkVariableNamesExisting(this.workflowForm),y.handleDuplicateVariableNames(this.workflowForm),y.validateHierarchyFields(this.workflowForm),this.workflowForm.markAsDirty(),this.changeDetector.detectChanges())})}setMyFormAsValid(o){Object.keys(o.controls).forEach(t=>{const n=o.get(t);n instanceof m.cw||n instanceof m.Oe?this.setMyFormAsValid(n):n?.setErrors(null)})}openDeleteConfirmationModal(o){const t=this.modalService.open(q._8,{size:"sm"});t.componentInstance.options={cancelButton:!0,modalHeader:"Are you sure you want to delete this?",modalText:"Any changes to this workflow will reflect in all previously submitted activities.",confirmationLabel:"Yes, Delete"},t.componentInstance.modalAccept.pipe((0,v.b)(o),(0,u.t)(this)).subscribe()}addSection(o){const{section:t,newIndex:n}=o,[l]=this.getFormArrays(),a="0"===t.id?b.A5.getUuid():t.id,r=this.getItemOrder(),c={...this.getSectionForm(t),id:a,order:r,fields:this.getSectionFieldsForm(t),parsedAssignees:this.parseJSON(t.assignees||"")||{teams:[],users:[]},panelExpanded:!0};if(n){const _=l.at(n)||l.at(n-1);c.order=_.value.order,l.insert(n,this.formBuilder.group(c))}else l.push(this.formBuilder.group(c));this.checkBlockElements(),this.handleSectionPanel(n),this.setlastSectionId(),this.workflowForm.markAsDirty(),this.changeDetector.detectChanges()}getTargetSectionIndex(o){const t=this.workflowForm.get("sections");let n=o??t.length-1;for(;n>0&&(t.at(n).value?.isDeleted||t.at(n).value?.fieldType===s.bA.Approval);)n--;return n}addSectionField(o){const{field:t,newIndex:n,newSectionIndex:l}=o,a=this.getTargetSectionIndex(l),c=this.workflowForm.get("sections").at(a).value;if(t.fieldType!==s.ii.AddChild||c.fieldType!==s.bA.Table){const[_,h]=this.getFormArrays(l||-1),T="0"===t.id?b.A5.getUuid():t.id,f=this.getItemOrder(),x=this.formBuilder.group({...t,fieldName:t.fieldName||T,variableNameNotExist:!1,id:T,fieldSecurity:this.formBuilder.array([]),order:f,parsedTypeLogic:this.parseJSON(t.typeLogic||""),label:[t.label,t.fieldType===s.ii.Label?[]:[(0,b.JL)()]],splittedTextAreaType:[t.typeLogic?.split(/\n|\r|\r\n/),[]],multiSelectDefaultValues:[t.typeLogic?.split(/\n|\r|\r\n/).map(A=>({id:A})),[]],fieldTriggers:this.formBuilder.array((t.fieldTriggers||[]).map(A=>this.formBuilder.group({...A,parsedAssignees:this.parseJSON(A.assignees||"")||{teams:[],users:[]}})))});if(null!==n){const A=h.at(n)||h.at(n-1);x.patchValue({order:A?.value.order}),this.insertItemIntoFormArray(n,x,h),this.updateSplittedTextAreaType(h?.at(n),x.value.fieldType)}else h.push(x),this.updateSplittedTextAreaType(h?.at(this.workflowForm.value.sections.length-1),x.value.fieldType);this.updateParsedRows(l||this.workflowForm.value.sections.length-1,t.fieldName||T,t),this.checkBlockElements(),this.handleSectionPanel(l),this.handleSectionAndFieldOrder(),this.workflowForm.markAsDirty(),this.changeDetector.detectChanges()}}insertItemIntoFormArray(o,t,n){let l=0;const a=n.controls;for(let r=0;r<a.length;r++)if(!a[r].get("isDeleted")?.value){if(l===o)return void n.insert(r,t);l++}n.push(t)}handleSectionAndFieldOrder(){const o=this.workflowForm.get("sections");let t=1;o.controls.filter(n=>
1!n.value.isDeleted).forEach(n=>{const l=n.get("fields"),a=l.length;n.get("order")?.patchValue(t),l.controls.filter(r=>!r.value.isDeleted).forEach((r,c)=>{const _=t+c+1;r.get("order")?.patchValue(_)}),t+=a+1}),this.setlastSectionId()}getItemOrder(){let o=1;return this.workflowForm?.value.sections.forEach(t=>{o++,t.fields.forEach(()=>o++)}),o}updateSplittedTextAreaType(o,t){t===s.ii.SingleSelect&&o?.get("typeLogic")?.valueChanges.pipe((0,v.b)(n=>o.get("splittedTextAreaType")?.setValue(n?.split(/\n|\r|\r\n/))),(0,u.t)(this)).subscribe()}updateParsedRows(o,t,n){let l=o;this.workflowForm.value?.sections[o]?.fieldType===s.ii.ApprovalSection&&l--,this.workflowForm.get("sections")?.at(l)?.get("parsedRows")?.controls.forEach(a=>{n.fieldType===s.ii.DateTime?(a.addControl(t+U.S8.DateRaw,this.formBuilder.control({})),a.addControl(t+U.S8.TimeRaw,this.formBuilder.control({}))):a.addControl(t,this.formBuilder.control(""))})}handleSectionPanel(o=null){let t=o||this.workflowForm.value.sections.length-1;for(this.workflowForm.value?.sections[t]?.fieldType===s.ii.ApprovalSection&&t--;t>0&&(this.workflowForm.value?.sections[t]?.fieldType===s.ii.ApprovalSection||this.workflowForm.value?.sections[t]?.isDeleted);)t--;const n="custom-section-panel-"+t;this.openedSectionsIds.includes(n)&&(this.openedSectionsIds=this.openedSectionsIds.filter(a=>a!==n));const l=document.getElementById(n);l&&l.classList.add("show"),this.openedSectionsIds.push(n),this.workflowForm.get("sections").at(t)?.patchValue({panelExpanded:!0}),this.updateFieldsDropList()}onOpenedSectionsIdsChange(o){this.openedSectionsIds=o,this.updateFieldsDropList()}getFormGroupIndex(o,t){return o.value.indexOf(t)}getFormArrays(o=-1){const t=this.workflowForm.get("sections");let n=-1===o?t.length-1:o;for(;n>0&&(t.value[n]?.fieldType===s.ii.ApprovalSection||t.value[n]?.isDeleted);)n--;const l=t.at(n)?.get("fields");return[t,l]}isSectionField(o){return Object.values(s.bA).includes(o.fieldType)}getTypeLogicWithParsedRows(o){const t=o.parsedRows?.map(n=>Object.fromEntries(Object.entries(n).filter(([l,a])=>{const r=l?.split("%"),c=o.fields.find(_=>_.fieldName===r[0]);return!(!c||c.isDeleted)&&""!==a}))).map(n=>({row:{...n}}));return JSON.stringify({...o.parsedTypeLogic,rows:t})}setPublishedState(o){this.saving=!0,this.formService.updateForm$({...this.workflow,isPublished:o}).pipe((0,L.x)(()=>{this.saving=!1}),(0,u.t)(this)).subscribe()}scrollToError(){const o=document.querySelector(".error-process"),t=document.querySelector(".error-span"),n=document.querySelector(".error-span-section-name"),l=document.querySelector(".invalid-input"),a=document.querySelector(".invalid-section-name");o&&(o.scrollIntoView({behavior:"smooth",block:"center"}),l&&l.focus()),t&&(t.scrollIntoView({behavior:"smooth",block:"center"}),l&&l.focus()),n&&(n.scrollIntoView({behavior:"smooth",block:"center"}),a&&a.focus())}handleCustomDate(o){const t=new Date,n={day:o.date?.day||t.getDate(),month:o.date?.month||t.getMonth()+1,year:o.date?.year||t.getFullYear(),hour:o.time?.hour||o.date?.hour||12,minute:o.time?.minute||o.date?.minute||0};o.defaultValue=ie.E.switchDateFormat(ie.E.changeDateFormat(n)||"")}saveForm(o){if(this.workflowForm.invalid)this.workflowForm.markAllAsTouched(),this.workflowForm.get("formName")?.markAsDirty(),this.scrollToError();else{this.saving=!0;const t=this.workflowForm.value,n={...this.workflow,...t,owner:JSON.stringify({teams:[],users:t.owner.map(l=>l.id)}),ownerParsed:{teams:[],users:t.owner},processValue:t.process.value,processId:t.process.id,privacyUsers:t.privacyUsers.map(l=>l?.id).filter(l=>l),aiLogic:`${t.frequencyForm.isFrequencyEnabled}|${t.frequencyForm.frequencyAmount}|${t.frequencyForm.frequencyPeriod}|${t.frequencyForm.frequencyNotify?.id??""}|false`,onSubmit:`${t.isNotificationEnabled}|${t.notificateUser.id}`,errors:{}};t.sections.forEach((l,a)=>{l.label?.trim()||(l.label=l.fieldType+a),l.typeLogic!==s.ii.Invisible&&(l.typeLogic=JSON.stringify(l.parsedTypeLogic)),l.fieldType===s.bA.Table&&(l.typeLogic=this.getTypeLogicWithParsedRows(l)),l.assignees=JSON.stringify(l.parsedAssignees),l.fields.forEach(r=>{this.processFieldBeforeSave(r)})}),this.workflowForm.markAsPristine(),t.id?this.updateForm(n,o):(window.Intercom("trackEvent",O.Q.SaveTemplate),this.mixpanelService.track(O.Q.SaveTemplate.toLowerCase()),this.createForm(n,o))}}updateForm(o,t){this.saving=!0,this.formService.updateForm$(o).pipe((0,v.b)(n=>{t&&this.router.navigate(["forms"]),this.setupForm(n,!1)}),(0,I.K)(n=>this.errorHandlingService.handleHttpError(n)),(0,L.x)(()=>this.saving=!1),(0,u.t)(this)).subscribe()}createForm(o,t){this.saving=!0,this.formService.createForm$(o).pipe((0,v.b)(n=>{t&&this.router.navigate(["forms"]),this.setupForm(n,!1)}),(0,I.K)(n=>this.errorHandlingService.handleHttpError(n)),(0,L.x)(()=>this.saving=!1),(0,u.t)(this)).subscribe()}processFieldBeforeSave(o){this.processFieldTypeSpecificLogic(o),this.setFieldDefaults(o)}processFieldTypeSpecificLogic(o){if((o.fieldType===s.ii.IotDeviceChart||o.fieldType===s.ii.IotDeviceCmd)&&(o.variableName="@"+o.label?.toUpperCase()),o.fieldType===s.ii.DateTime&&Ze.N.isCustomDefaultValue(o.defaultValue)){if(!o.date&&!o.time)return;this.handleCustomDate(o)}(o.fieldType===s.ii.AddChild||o.fieldType===s.ii.Task)&&o.parsedTypeLogic&&(o.typeLogic=JSON.stringify(o.parsedTypeLogic))}setFieldDefaults(o){o.label=o.htmlLabel||o.label,o.fieldTriggers=o.fieldTriggers??[],o.fieldSecurity=o.fieldSecurity??[]}handleSectionsChange(){this.workflowForm.valueChanges.pipe((0,v.b)(o=>{o.sections.forEach(t=>{t.fieldType===s.ii.Table&&t.fields.forEach(n=>{if(n.fieldType===s.ii.Hierarchy&&n.fieldName){const l=this.hierarchies.find(a=>a.id===n.typeLogic);this.advanceTableHierarchies[n.fieldName]=l??null}})})}),(0,u.t)(this)).subscribe()}ngOnDestroy(){this.clearAiPlaceholderTimers()}pauseAiPlaceholder(){this.aiPlaceholderPaused=!0,this.clearAiPlaceholderTimers(),this.aiPrompt||(this.aiPlaceholder=this.aiPlaceholderSuggestions[this.aiPlaceholderIndex])}resumeAiPlaceholder(){this.aiPrompt||(this.aiPlaceholderPaused=!1,this.startAiPlaceholderCycle())}
1handleAiBuilderQueryParam(){const o=this.route.snapshot.queryParamMap.get("aiBuilder");if(o&&!this.formId)if("generated"===o){const t=this.formService.generatedForm$.value;if(t){this.formService.generatedForm$.next(null);const n=this.normalizeAiFormResponse(t);this.setupForm(n),this.handleTaskFieldsControls(),this.updateFieldsDropList(),this.handleSectionAndFieldOrder(),this.checkBlockElements(),this.workflowForm.markAsDirty(),this.changeDetector.detectChanges(),this.formBuilderComponent?.formSettingsComponent&&(this.formBuilderComponent.formSettingsComponent.activePanelId=[])}}else"pdf"===o?(this.aiBuilderTab="pdf",this.showAiBuilder=!0,this.startAiPlaceholderCycle()):"prompt"===o&&(this.aiBuilderTab="prompt",this.showAiBuilder=!0,this.aiPlaceholderPaused=!1,this.startAiPlaceholderCycle())}openAiBuilder(){this.showAiBuilder=!0,this.aiPrompt="",this.aiPdfFile=null,this.aiBuilderTab="prompt",this.pdfDragOver=!1,this.aiPlaceholderPaused=!1,this.startAiPlaceholderCycle()}closeAiBuilder(){this.showAiBuilder=!1,this.aiPrompt="",this.aiPdfFile=null,this.pdfDragOver=!1,this.clearAiPlaceholderTimers()}generateFormWithAi(){!this.aiPrompt.trim()||this.aiGenerating||(this.aiGenerating=!0,this.formService.generateForm$(this.aiPrompt.trim()).pipe((0,v.b)(o=>{const t=this.normalizeAiFormResponse(o);this.setupForm(t),this.handleTaskFieldsControls(),this.updateFieldsDropList(),this.handleSectionAndFieldOrder(),this.checkBlockElements(),this.workflowForm.markAsDirty(),this.changeDetector.detectChanges(),this.formBuilderComponent?.formSettingsComponent&&(this.formBuilderComponent.formSettingsComponent.activePanelId=[]),this.showAiBuilder=!1,this.aiPrompt=""}),(0,I.K)(o=>this.errorHandlingService.handleHttpError(o)),(0,L.x)(()=>this.aiGenerating=!1),(0,u.t)(this)).subscribe())}onPdfFileSelected(o){const t=o.target;t.files?.length&&(this.aiPdfFile=t.files[0])}onPdfDrop(o){o.preventDefault(),this.pdfDragOver=!1;const t=o.dataTransfer?.files[0];t&&"application/pdf"===t.type&&(this.aiPdfFile=t)}generateFormFromPdf(){!this.aiPdfFile||this.aiGenerating||(this.aiGenerating=!0,this.formService.generateFormFromPdf$(this.aiPdfFile).pipe((0,v.b)(o=>{const t=this.normalizeAiFormResponse(o);this.setupForm(t),this.handleTaskFieldsControls(),this.updateFieldsDropList(),this.handleSectionAndFieldOrder(),this.checkBlockElements(),this.workflowForm.markAsDirty(),this.changeDetector.detectChanges(),this.formBuilderComponent?.formSettingsComponent&&(this.formBuilderComponent.formSettingsComponent.activePanelId=[]),this.showAiBuilder=!1,this.aiPdfFile=null}),(0,I.K)(o=>this.errorHandlingService.handleHttpError(o)),(0,L.x)(()=>this.aiGenerating=!1),(0,u.t)(this)).subscribe())}getDefaultTypeLogic(o){switch(o){case s.ii.Boolean:return"Yes|No";case s.ii.Trilean:return"Yes|No|N/A";case s.ii.Numeric:case s.ii.SingleLineText:return"0";default:return""}}normalizeAiFormResponse(o){const t=Ae[0],n=(o.sections||[]).map(l=>({...l,id:l.id||b.A5.getUuid(),isDeleted:l.isDeleted??!1,isNextNumberActive:l.isNextNumberActive??!1,assignees:l.assignees||null,isPaused:l.isPaused??!1,validationType:l.validationType??0,typeLogic:l.typeLogic||JSON.stringify({assignable:!0}),fieldSecurity:l.fieldSecurity||[],parsedAssignees:{teams:[],users:[]},parsedTypeLogic:{assignable:!0},fields:(l.fields||[]).map(a=>({...a,id:a.id||b.A5.getUuid(),isDeleted:a.isDeleted??!1,isNextNumberActive:a.isNextNumberActive??!1,validationType:a.validationType??0,typeLogic:a.typeLogic||this.getDefaultTypeLogic(a.fieldType),fieldSecurity:a.fieldSecurity||[],fieldTriggers:a.fieldTriggers||[],defaultValue:a.defaultValue??null}))}));return{...o,id:o.id||null,owner:o.owner||JSON.stringify({teams:[],users:[]}),privacyUsers:o.privacyUsers||[],assignableUsers:o.assignableUsers||[],aiLogic:o.aiLogic||"false|1|day||false",onSubmit:o.onSubmit||"false|",isPublished:!0,isPrivacyEnabled:o.isPrivacyEnabled??!1,isWorkflow:o.isWorkflow??!1,formName:o.formName||"",description:o.description||"",sections:[{...t,id:b.A5.getUuid()},...n]}}setupForm(o,t=!0){const n=this.openedSectionsIds.map(f=>+f.split("custom-section-panel-")[1]),l=this.user$.value;this.workflow=o,this.selectedPrivateUsers=o.privacyUsers.join(",");const a=JSON.parse(o.owner);this.selectedOwners=o?.id?a?.users.join(","):l.id;const r=this.users.filter(f=>!f.isDisabled&&(f.role===B.vX.Reporter||a?.users.includes(f.id))).concat(o.assignableUsers,l),c=this.selectedOwners?.length?[this.selectedOwners.split(",").map(f=>r.find(x=>!x.isDisabled&&x.id===f)).filter(f=>f?.id)]:[[]],_=(o.aiLogic||"false|1|day||false").split("|"),h=(o.onSubmit||"false|").split("|"),T=o.sections.map((f,x)=>1===x&&t?{...f,panelExpanded:!0}:x>0?{...f,panelExpanded:n.includes(x)}:f);this.workflowForm=this.formBuilder.group({...o,sectionsWithErrors:[],duplicatedVariableNameIds:[],formName:[o.formName,[m.kI.required,this.formNameValidator()]],assignableUsers:[b.BB.getUniqItems(r,"id"),[]],owner:c,process:this.classifications.find(f=>f.id===o.processId)||"",frequencyForm:this.formBuilder.group({isFrequencyEnabled:"true"===_[0],frequencyAmount:_[1],frequencyPeriod:_[2],frequencyNotify:_[3]?r.find(f=>f.id===_[3]):l}),privacyUsers:[o.privacyUsers.map(f=>r.find(x=>x.id===f))||l.id,[]],notificateUser:r.find(f=>f.id===h[1])||l,isNotificationEnabled:"true"===h[0],sections:this.formBuilder.array(T.map(f=>this.formBuilder.group(this.getSectionForm(f))))}),this.workflowForm.get("sections").at(0).removeControl("parsedTypeLogic"),this.setlastSectionId(),this.handleSectionsChange()}startAiPlaceholderCycle(){this.clearAiPlaceholderTimers(),this.typeOutPlaceholder(this.aiPlaceholderSuggestions[this.aiPlaceholderIndex])}typeOutPlaceholder(o){let t=0;this.aiPlaceholder="";const n=()=>{this.aiPlaceholderPaused||(t<o.length?(this.aiPlaceholder=o.substring(0,t+1),t++,this.aiTypingTimer=setTimeout(n,50)):this.aiPlaceholderTimer=setTimeout(()=>{this.aiPlaceholderPaused||(this.aiPlaceholderIndex=(this.aiPlaceholderIndex+1)%this.aiPlaceholderSuggestions.length,this.typeOutPlaceholder(this.aiPlaceholderSuggestions[this.aiPlaceholderIndex]))},3e3))};this.aiTypingTimer=setTimeout(n,50)}clearAiPlaceholderTimers(){this.aiPlaceholderTimer&&(clearTimeout(this.aiPlaceholderTimer),this.aiPlaceholderTimer=null),this.aiTypingTimer&&(clearTimeout(this.aiTypingTimer),this.aiTypingTimer=null)}static#e=this.\u0275fac=function(t){return new(t||Fe)(e.Y36(N.gz),e.Y36(N.F0),e.Y36(od.K),e.Y36(ld.U),e.Y36(ad.F),e.Y36(rd._),e.Y36(sd.s),e.Y36(m.qu),e.Y36(p.FF),e.Y36(e.sBO),e.Y36(cd.P),e.Y36(H.D),e.Y36(J.c8),e.Y36(Qe.h),e.Y36(ae),e.Y36(_d.r),e.Y36(dd.N))};static#t=this.\u0275cmp=e.Xpm({type:Fe,selectors:[["ff-form-edit-page"]],viewQuery:function(t,n){if(1&t&&e.Gf(z,5),2&t){let l;e.iGM(l=e.CRH())&&(n.formBuilderComponent=l.first)}}
1,decls:5,vars:10,consts:[[3,"initError","loading","saving","workflowForm","formId","isOwner","user$","publishedStateChange","save"],[4,"ngIf"],["class","p-5",4,"ngIf"],["class","ai-builder-overlay",3,"click",4,"ngIf"],["class","builder",4,"ngIf"],[1,"builder"],[1,"elements","rounded","shadow-sm"],["class","p-3 border-bottom",4,"ngIf"],[3,"user","workflowForm","blockElements","fieldsDropList","addNewSection","addNewSectionField"],[1,"formDefinition","mb-4"],[3,"workflowForm","users","user$","teams","referenceData","hierarchies","assetTypes","isOwner","blockElements","lastSectionId","lastHideFlowIds","classifications","fieldsDropList","openedSectionsIds","selectedOwners","selectedPrivateUsers","advanceTableHierarchies","removeSection","removeField","cloneSection","addNewSection","addNewSectionField","panelChange","openedSectionsIdsChange","orderChange","dragFieldsDropListChange","sectionNameChange"],[1,"preview"],[3,"workflowForm","users","teams"],[1,"p-3","border-bottom"],[1,"btn","btn-primary","w-100","py-2",3,"click"],[1,"fa-solid","fa-wand-magic-sparkles","me-1","ai-sparkle-icon"],[1,"p-5"],["role","alert",1,"alert","alert-danger"],[1,"ai-builder-overlay",3,"click"],[1,"ai-builder-modal","card","shadow",3,"click"],[1,"card-header","d-flex","justify-content-between","align-items-center"],[1,"mb-0"],[1,"fa-solid","fa-wand-magic-sparkles","me-2"],["type","button",1,"btn-close",3,"click"],[1,"card-body"],[1,"nav","nav-tabs","mb-3"],[1,"nav-item"],[1,"nav-link",3,"click"],[1,"text-muted","mb-3"],["rows","4",1,"form-control","mb-3",3,"placeholder","disabled","ngModel","ngModelChange","focus","blur","keydown.control.enter"],[1,"d-flex","justify-content-end","gap-2"],[1,"btn","btn-outline-secondary",3,"disabled","click"],[1,"btn","btn-primary",3,"disabled","click"],["class","spinner-border spinner-border-sm me-1",4,"ngIf"],[1,"spinner-border","spinner-border-sm","me-1"],[1,"ai-pdf-dropzone","mb-3","text-center","p-4","rounded","border",3,"dragover","dragleave","drop","click"],["type","file","accept",".pdf",1,"d-none",3,"change"],["pdfFileInput",""],[1,"fa-solid","fa-file-pdf","fa-2x","text-muted","mb-2"],[1,"mb-0","text-muted"],[1,"fa-solid","fa-file-pdf","fa-2x","text-primary","mb-2"],[1,"text-muted"]],template:function(t,n){1&t&&(e.TgZ(0,"ff-layout")(1,"ff-form-header",0),e.NdJ("publishedStateChange",function(a){return n.setPublishedState(a)})("save",function(a){return n.saveForm(a)}),e.qZA(),e.YNc(2,vd,3,2,"ng-container",1),e.YNc(3,hd,3,1,"div",2),e.YNc(4,Zd,17,6,"div",3),e.qZA()),2&t&&(e.xp6(1),e.Q6J("initError",n.initError)("loading",n.loading)("saving",n.saving)("workflowForm",n.workflowForm)("formId",n.formId)("isOwner",n.isOwner)("user$",n.user$),e.xp6(1),e.Q6J("ngIf",!n.initError),e.xp6(1),e.Q6J("ngIf",n.initError),e.xp6(1),e.Q6J("ngIf",n.showAiBuilder))},dependencies:[g.O5,pd.$,m.Fj,m.JJ,m.On,md.X,z,jr,pe,me,g.Ov],styles:[".builder[_ngcontent-%COMP%]{padding:15px 0 0}.builder[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%]{display:block;position:fixed;width:262px;left:215px;top:75px;max-height:calc(100vh - 90px);overflow-y:auto;transition:all .3s ease-in-out}@media (max-width: 991px){.builder[_ngcontent-%COMP%] .elements[_ngcontent-%COMP%]{left:180px;width:200px}}.builder[_ngcontent-%COMP%] .elements.sidebar-collapsed[_ngcontent-%COMP%]{left:15px}.builder[_ngcontent-%COMP%] .formDefinition[_ngcontent-%COMP%]{display:block;width:calc(100vw - 915px);margin:5px 0 0 310px;transition:all .2s linear}.builder[_ngcontent-%COMP%] .formDefinition.sidebar-collapsed[_ngcontent-%COMP%]{width:calc(100vw - 780px)}@media (max-width: 1450px){.builder[_ngcontent-%COMP%] .formDefinition[_ngcontent-%COMP%]{width:calc(100vw - 575px)}.builder[_ngcontent-%COMP%] .formDefinition.sidebar-collapsed[_ngcontent-%COMP%]{width:calc(100vw - 440px)}}@media (max-width: 991px){.builder[_ngcontent-%COMP%] .formDefinition[_ngcontent-%COMP%]{margin-left:240px;width:calc(100vw - 450px)}.builder[_ngcontent-%COMP%] .formDefinition.sidebar-collapsed[_ngcontent-%COMP%]{width:calc(100vw - 370px)}}@keyframes _ngcontent-%COMP%_sparkle-pulse{0%,to{color:#fff}50%{color:var(--bs-primary);filter:brightness(1.5)}}.ai-sparkle-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_sparkle-pulse 2s ease-in-out infinite}.ai-builder-overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:1050}.ai-builder-modal[_ngcontent-%COMP%]{width:520px;max-width:90vw}.ai-pdf-dropzone[_ngcontent-%COMP%]{cursor:pointer;border-style:dashed!important;transition:border-color .2s}.ai-pdf-dropzone[_ngcontent-%COMP%]:hover, .ai-pdf-dropzone.border-primary[_ngcontent-%COMP%]{border-color:var(--bs-primary)!important;background-color:rgba(var(--bs-primary-rgb),.04)}"]})};ge=(0,P.gn)([(0,u.c)()],ge);let Ad=(()=>
1{class i{static#e=this.\u0275fac=function(n){return new(n||i)};static#t=this.\u0275mod=e.oAB({type:i});static#i=this.\u0275inj=e.cJS({providers:[ae,p.nv,$],imports:[g.ez,W.x,p.Gs,m.UX,Re.D,p.Oz,p.lQ,p.HK,F.s,p.XC,X.OI,p.ZQ,m.u5,Ve.Y4,He.Xe,C._t,Ge.z,$e.R,je.T,ze.T,We.r,Ke.r,p.UL,Z.aw,J.Mc.forChild(),N.Bz.forChild([{path:"",component:ge}]),Q.I]})}return i})()},2894:(Ye,E,d)=>{d.d(E,{JJ:()=>W,S8:()=>N,X3:()=>Q,c1:()=>g});const g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],W=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var N=function(F){return F.Date="date",F.Time="time",F.DateRaw="%date%",F.TimeRaw="%time%",F}(N||{}),Q=function(F){return F.Now="%date.now%",F.Custom="%custom%",F}(Q||{})}}]);
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.