@resolveio/client-lib-core 21.4.13 → 21.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i0 from"@angular/core";import{Injectable,HostListener,Input,Component,Directive,ViewChild,ChangeDetectionStrategy,Pipe,LOCALE_ID,Inject,EventEmitter,Output,ViewChildren,ElementRef,NgModule,Optional,ViewEncapsulation,InjectionToken,HostBinding}from"@angular/core";import{BehaviorSubject,Subject,fromEvent,ReplaySubject,merge,Observable,of}from"rxjs";import*as i1$4 from"ngx-device-detector";import{DeviceDetectorService}from"ngx-device-detector";import{debounceTime,finalize,map}from"rxjs/operators";import*as i2 from"@angular/forms";import{UntypedFormControl,Validators,FormGroup,FormArray,FormsModule,ReactiveFormsModule}from"@angular/forms";import*as i1 from"ngx-toastr";import{ToastrModule}from"ngx-toastr";import moment from"moment-timezone";import{unpack,pack}from"msgpackr";import{detailedDiff}from"deep-object-diff";import*as CryptoJS from"crypto-js";import*as i1$1 from"@angular/router";import{RouterModule}from"@angular/router";import*as i4 from"@angular/common/http";import{HttpHeaders,provideHttpClient,withInterceptorsFromDi}from"@angular/common/http";import*as i1$2 from"@ng-bootstrap/ng-bootstrap";import{NgbTooltipModule,NgbModule,NgbAccordionModule,NgbModalModule}from"@ng-bootstrap/ng-bootstrap";import*as i7 from"@angular/common";import{getCurrencySymbol,formatDate,formatPercent,formatCurrency,formatNumber,CommonModule}from"@angular/common";import*as i5 from"@resolveio/client-lib-rio-select";import{RioSelectModule,RIO_SELECT_STICKY_ADAPTER}from"@resolveio/client-lib-rio-select";import*as i7$1 from"@resolveio/client-lib-date-picker";import{RioDatePickerModule,RIO_DATE_PICKER_CONFIG}from"@resolveio/client-lib-date-picker";import{UserAgentApplication}from"msal";import*as i1$3 from"@angular/platform-browser";import{BrowserAnimationsModule}from"@angular/platform-browser/animations";import moment$1 from"moment";import*as i7$2 from"ngx-file-drop";import{NgxFileDropModule}from"ngx-file-drop";import*as i8 from"@resolveio/client-lib-pdf-viewer";import{PdfViewerModule}from"@resolveio/client-lib-pdf-viewer";class CoreService{isDevice=new BehaviorSubject(!1);fullScreen=new BehaviorSubject(!1);fsActivated=new BehaviorSubject(!1);hasConnected=new BehaviorSubject(!1);navbarModuleData=new BehaviorSubject({title:"",module:"",description:"",description_name:"",tabs:[]});hasStatusMessage=new BehaviorSubject(!1);alertData=new BehaviorSubject({type:"",message:"",timer:0,showing:!1});isInvalidSW=new BehaviorSubject(!1);environment=new BehaviorSubject(null);client=new BehaviorSubject("");publicProgram=new BehaviorSubject(!1);navTabs=new BehaviorSubject([]);tourStops=new BehaviorSubject([]);tourStarted=new BehaviorSubject(!1);isDemo=new BehaviorSubject(!1);isLoggingOut=new BehaviorSubject(!1);constructor(){}setFullScreen(t){this.fullScreen.next(t)}setFsActivated(t){this.fsActivated.next(t)}setHasConnected(t){this.hasConnected.next(t)}setNavbarModuleData(t){const e=t.tabs.filter(t=>null===t.params).concat(t.tabs.filter(t=>null!==t.params)),n={...t,tabs:e};Promise.resolve().then(()=>this.navbarModuleData.next(n))}setHasStatusMessage(t){this.hasStatusMessage.next(t)}setIsDevice(t){this.isDevice.next(t)}setIsInvalidSW(t){this.isInvalidSW.next(t)}setEnvironment(t){this.environment.next(t)}setClient(t){this.client.next(t)}setPublicProgram(t){this.publicProgram.next(t)}setNavTabs(t){const e=Array.isArray(t)?t.slice():t;Promise.resolve().then(()=>this.navTabs.next(e))}setTourStops(t){this.tourStops.next(t)}setTourStarted(t){this.tourStarted.next(t)}setDemo(t){this.isDemo.next(t)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreService,providedIn:"root"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[]});class ResizeService{get onResize$(){return this.resizeSubject.asObservable()}resizeSubject;subscription;constructor(){this.resizeSubject=new Subject,"undefined"!=typeof window&&(this.subscription=fromEvent(window,"resize").pipe(debounceTime(150)).subscribe(t=>this.onResize(t)))}onResize(t){this.resizeSubject.next(t.target)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResizeService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResizeService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResizeService,decorators:[{type:Injectable}],ctorParameters:()=>[]});class AlertService{_toastr;constructor(t){this._toastr=t}clearAlert(t){t?this._toastr.clear(t):this._toastr.clear()}registerTapToClear(t){return t&&t.onTap&&t.onTap.subscribe(()=>this._toastr.clear(t.toastId)),t}titleForType(t){return"success"===t?"Success":"info"===t?"Info":"warning"===t?"Warning":"error"===t?"Error":"update"===t?"Update":"Info"}updateAlert(t,e,n="info",o=0){const r=t?.toastRef?.componentInstance;return r?(r.message=e,void 0!==r.title&&(r.title=this.titleForType(n)),t):(t?.toastId&&this._toastr.clear(t.toastId),this.setAlert(n,e,o))}setAlert(t,e,n=5e3){return"success"===t?n?this.registerTapToClear(this._toastr.success(e,"Success",{timeOut:n,tapToDismiss:!0})):this.registerTapToClear(this._toastr.success(e,"Success",{disableTimeOut:!0,tapToDismiss:!0})):"info"===t?n?this.registerTapToClear(this._toastr.info(e,"Info",{timeOut:n,tapToDismiss:!0})):this.registerTapToClear(this._toastr.info(e,"Info",{disableTimeOut:!0,tapToDismiss:!0})):"warning"===t?n?this.registerTapToClear(this._toastr.warning(e,"Warning",{timeOut:n,tapToDismiss:!0})):this.registerTapToClear(this._toastr.warning(e,"Warning",{disableTimeOut:!0,tapToDismiss:!0})):"error"===t?n?this.registerTapToClear(this._toastr.error(e,"Error",{timeOut:n,tapToDismiss:!0})):this.registerTapToClear(this._toastr.error(e,"Error",{disableTimeOut:!0,tapToDismiss:!0})):"update"===t?this.registerTapToClear(this._toastr.show(e,"Update",{disableTimeOut:!0,tapToDismiss:!0,toastClass:"ngx-toastr toast-secondary"})):void 0}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AlertService,deps:[{token:i1.ToastrService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AlertService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AlertService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:i1.ToastrService}]});class LocalStorageService{get(t){return"undefined"==typeof localStorage?null:localStorage.getItem(t)}set(t,e){"undefined"!=typeof localStorage&&localStorage.setItem(t,e)}remove(t){"undefined"!=typeof localStorage&&localStorage.removeItem(t)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:LocalStorageService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:LocalStorageService,providedIn:"root"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:LocalStorageService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}]});class SocketService{_storage;debug=!1;reconnectInterval=1e3;timeoutInterval=5e3;timeout=null;readyState;readyState$=new BehaviorSubject(0);protocols=[];ws=null;url;timezone;pingInterval=null;pongTimeout=null;pingIntervalTime=15e3;pongTimeoutTime=12e3;lastActivity=Date.now();missedPongs=0;maxMissedPongs=3;wakeReconnectThreshold=3e5;focusReconnectDebounce=null;onopen=t=>{};onclose=t=>{};onconnecting=()=>{};onmessage=t=>{};onerror=t=>{};constructor(t){this._storage=t,"undefined"!=typeof document&&document.addEventListener("visibilitychange",this.handleVisibilityChange),"undefined"!=typeof window&&window.addEventListener("focus",this.handleWindowFocus)}openSocket(t,e){this.url=t.WS_URL,this.protocols=e,this.timezone=t.TZ_CLIENT,this.connect()}onOpenHandler=t=>{this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.log(new Date,"WS","onopen",this.url),this.readyState=WebSocket.OPEN,this.readyState$.next(this.readyState),this.recordActivity(),this.onopen(t),this.startPinging()};onCloseHandler=t=>{this.ws&&this.readyState!==WebSocket.CLOSED&&(this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.ws.removeEventListener("open",this.onOpenHandler),this.ws.removeEventListener("close",this.onCloseHandler),this.ws.removeEventListener("message",this.onMessageHandler),this.ws.removeEventListener("error",this.onErrorHandler),this.ws=null,this.readyState=WebSocket.CLOSED,this.readyState$.next(this.readyState),this.log(new Date,"WS","onclose",this.url),this.onclose(t),setTimeout(()=>this.connect(),this.reconnectInterval),this.stopPinging())};onMessageHandler=t=>{if(this.recordActivity(),"pong"===t.data)return void this.log(new Date,"WS","pong received");if("ping"===t.data)return this.log(new Date,"WS","ping received"),void this.send("pong");const e=(t,e=0,n)=>{const o=void 0!==n?new Uint8Array(t,e,n):new Uint8Array(t,e);try{let t=unpack(o);t=this.convertUTCDateToLocalDate(t),this.onmessage(t)}catch(t){this.log(new Date,"WS","failed to unpack payload",t);try{const t=(new TextDecoder).decode(o),e=JSON.parse(t),n=this.convertUTCDateToLocalDate(e);this.onmessage(n)}catch(t){this.log(new Date,"WS","unable to fallback decode payload",t)}}};if(t.data instanceof ArrayBuffer)e(t.data);else if(ArrayBuffer.isView(t.data)){const n=t.data;e(n.buffer,n.byteOffset,n.byteLength)}else if(t.data instanceof Blob)t.data.arrayBuffer().then(t=>e(t)).catch(t=>this.log(new Date,"WS","failed to decode blob payload",t));else if("string"==typeof t.data)try{const e=JSON.parse(t.data),n=this.convertUTCDateToLocalDate(e);this.onmessage(n)}catch(e){this.log(new Date,"WS","failed to parse text payload",e),this.onmessage(this.convertUTCDateToLocalDate(t.data))}else this.log(new Date,"WS","unsupported message type",typeof t.data,t.data)};onErrorHandler=t=>{this.log(new Date,"WS","onerror",this,t),this.onerror(t),this.reconnect()};connect(){!this.ws&&this.readyState!==WebSocket.CONNECTING&&this._storage.get("accessToken")&&(this.readyState=WebSocket.CONNECTING,this.readyState$.next(this.readyState),this.timeout&&clearTimeout(this.timeout),this.ws=new WebSocket(this.url,this.protocols),this.ws.binaryType="arraybuffer",this.onconnecting(),this.log(new Date,"WS","attempt-connect",this.url),this.timeout=setTimeout(()=>{this.log(new Date,"WS","connection-timeout",this.url),this.close()},this.timeoutInterval),this.ws.onopen=this.onOpenHandler,this.ws.onclose=this.onCloseHandler,this.ws.onmessage=this.onMessageHandler,this.ws.onerror=this.onErrorHandler)}convertUTCDateToLocalDate(t){if(Array.isArray(t))return t.map(t=>this.convertUTCDateToLocalDate(t));if(t&&"object"==typeof t)return Object.keys(t).reduce((e,n)=>(e[n]=this.convertUTCDateToLocalDate(t[n]),e),t);if("string"==typeof t){if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/.test(t))return new Date(t)}return t}clearPongTimeout(){this.pongTimeout&&(clearTimeout(this.pongTimeout),this.pongTimeout=null)}recordActivity(){this.lastActivity=Date.now(),this.missedPongs=0,this.clearPongTimeout()}schedulePongTimeout(){this.clearPongTimeout(),this.pongTimeout=setTimeout(()=>{this.handleMissedPong()},this.pongTimeoutTime)}handleMissedPong(){this.pongTimeout=null,this.missedPongs++,this.log(new Date,"WS","pong not received",this.missedPongs,"/",this.maxMissedPongs),this.missedPongs>=this.maxMissedPongs&&(this.log(new Date,"WS","max missed pongs reached, closing connection"),this.reconnect())}startPinging(){this.stopPinging(),this.pingInterval=setInterval(()=>{if(!this.isWebSocketActive())return void this.reconnect();Date.now()-this.lastActivity<this.pingIntervalTime||this.pongTimeout||this.send("ping")&&this.schedulePongTimeout()},this.pingIntervalTime)}stopPinging(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null),this.clearPongTimeout(),this.missedPongs=0}convertDatesToUTC(t,e=new WeakSet){"object"!=typeof t||null===t||e.has(t)||(e.add(t),Object.keys(t).forEach(n=>{if(t[n]instanceof Date){let e=t[n];this.timezone&&this.isLocalMidnight(e)&&(e=moment.tz({year:e.getFullYear(),month:e.getMonth(),date:e.getDate()},this.timezone).startOf("day").toDate()),t[n]=moment(e).utc().toDate()}else"object"==typeof t[n]&&null!==t[n]&&this.convertDatesToUTC(t[n],e)}))}isLocalMidnight(t){return 0===t.getHours()&&0===t.getMinutes()&&0===t.getSeconds()&&0===t.getMilliseconds()}send(...t){if(!this.isWebSocketActive())return this.log(new Date,"WS","send error",this.readyState),this.reconnect(),!1;t.forEach(t=>this.convertDatesToUTC(t));const e=1===t.length?t[0]:t;if("string"==typeof e)this.ws.send(e);else{const t=pack(e);this.ws.send(t)}return!0}close(){return!!this.ws&&(this.log(new Date,"WS","closing socket"),this.readyState=WebSocket.CLOSING,this.readyState$.next(this.readyState),this.ws.close(),!0)}reconnect(){this.log(new Date,"WS","reconnect",this.readyState),this.readyState!==WebSocket.CONNECTING&&this.close()}getBufferAmount(){return this.ws?this.ws.bufferedAmount:20480}log(...t){this.debug&&console.log(...t)}handleVisibilityChange=()=>{"visible"===document.visibilityState&&this.handleWindowFocus()};handleWindowFocus=()=>{this.focusReconnectDebounce&&clearTimeout(this.focusReconnectDebounce),this.focusReconnectDebounce=setTimeout(()=>{if(this.focusReconnectDebounce=null,!this.isWebSocketActive())return void this.reconnect();Date.now()-this.lastActivity>this.wakeReconnectThreshold?this.reconnect():this.send("ping")},200)};isWebSocketActive(){return!!this.ws&&this.ws.readyState===WebSocket.OPEN}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SocketService,deps:[{token:LocalStorageService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SocketService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SocketService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:LocalStorageService}]});const isObject$1=t=>t instanceof Object&&"Object"===t.constructor.name;function round(t,e=0){const n=Math.pow(10,e);return Math.round(t*n+1e-6)/n}function toTitleCase(t){return t.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()})}function isUpperCase(t){return/^[A-Z]*$/.test(t)}function pad(t,e){let n=t+"";for(;n.length<e;)n="0"+n;return n}function deepCopy(t){return JSON.parse(JSON.stringify(t),dateReviver)}function dateReviver(t,e){if("string"==typeof e){let t=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(e);if(t)return new Date(Date.UTC(+t[1],+t[2]-1,+t[3],+t[4],+t[5],+t[6].split(".")[0],+t[6].split(".")[1]))}return e}function momentTz(t,e){return t?null!=e?moment(e).tz(t):moment.tz(t):null!=e?moment(e):moment()}function dateOnlyStartOfDayTz(t,e){return t?e?t instanceof Date?moment.tz({year:t.getFullYear(),month:t.getMonth(),date:t.getDate()},e).startOf("day").toDate():"object"==typeof t&&t.year&&t.month&&t.day?moment.tz({year:t.year,month:t.month-1,date:t.day},e).startOf("day").toDate():momentTz(e,t).startOf("day").toDate():moment(t).startOf("day").toDate():null}function b64toBlobURL(t,e,n){t=t.replace("data:application/pdf;base64,",""),e=e||"",n=n||512;let o=atob(t),r=[];for(let t=0;t<o.length;t+=n){let e=o.slice(t,t+n),i=new Array(e.length);for(let t=0;t<e.length;t++)i[t]=e.charCodeAt(t);let s=new Uint8Array(i);r.push(s)}let i=new Blob(r,{type:e});return URL.createObjectURL(i)}function blobToFile(t,e){return t.lastModifiedDate=new Date,t.name=e,t}function toDataURL(t,e){let n=new XMLHttpRequest;n.onload=function(){let t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n.response)},n.open("GET",t),n.responseType="blob",n.send()}function deepDiffDetails(t,e){let n=deepCopy(t),o=deepCopy(e),r=detailedDiff(n,o),i="";const s=t=>t instanceof Date?moment(t).format("llll"):"object"==typeof t&&null!==t?(Object.keys(t).filter(t=>t.startsWith("_id")||t.startsWith("id_")).forEach(e=>{delete t[e]}),JSON.stringify(t)):"string"==typeof t?`"${t}"`:String(t),a=(t,e)=>null===t||null===e||"object"!=typeof t||"object"!=typeof e?`from: ${s(t)} to: ${s(e)}`:Array.isArray(t)||Array.isArray(e)?((t,e)=>{let n=[];const o=Math.max(t.length,e.length);for(let r=0;r<o;r++)t[r]&&!e[r]?n.push(`Removed at index ${r}: ${s(t[r])}`):!t[r]&&e[r]?n.push(`Added at index ${r}: ${s(e[r])}`):t[r]&&e[r]&&JSON.stringify(t[r])!==JSON.stringify(e[r])&&n.push(`Changed at index ${r}: {${a(t[r],e[r])}}`);return n.join(", ")})(Array.isArray(t)?t:[],Array.isArray(e)?e:[]):Object.keys({...t,...e}).filter(t=>!t.startsWith("_id")&&!t.startsWith("id_")).map(n=>{const o=t?t[n]:void 0,r=e?e[n]:void 0;return`${toTitleCase(n)}: ${a(o,r)}`}).join(", ");return["added","deleted","updated"].forEach(t=>{if(Object.keys(r[t]).length>0){const e=Object.keys(r[t]).filter(e=>"added"===t||("deleted"===t?!r.added[e]:!r.added[e]&&!r.deleted[e])).filter(t=>!t.startsWith("_id")&&!t.startsWith("id_")).map(t=>`\n${toTitleCase(t)}: ${a(n[t],o[t])}`).join(",");i+=e?`${e}`:""}}),i}function generateCronStringFromDate(t){return t.getSeconds()+" "+t.getMinutes()+" "+t.getHours()+" "+t.getDate()+" "+(t.getMonth()+1)+" "+t.getDay()}function s2ab(t){let e=new ArrayBuffer(t.length),n=new Uint8Array(e);for(let e=0;e!==t.length;++e)n[e]=255&t.charCodeAt(e);return e}function mergeDeep(t,...e){if(!e.length)return t;const n=e.shift();if(isObject$1(t)&&isObject$1(n))for(const e in n)isObject$1(n[e])?(t[e]||Object.assign(t,{[e]:{}}),mergeDeep(t[e],n[e])):Object.assign(t,{[e]:n[e]});return mergeDeep(t,...e)}function applyMongoUpdate(t,e){const n=deepCopy(t);return e&&(e.$rename&&handleRename(t,e.$rename),e.$set&&handleSet(t,e.$set),e.$inc&&handleInc(t,e.$inc),e.$unset&&handleUnset(t,e.$unset),e.$pull&&handlePull(t,n,e.$pull),e.$push&&handlePush(t,e.$push)),t}function handleRename(t,e){for(const n in e){const o=e[n],[r,i]=resolve(t,n),[s,a]=resolve(t,o);r&&1===i.length?s&&1===a.length?(s[a[0]]=r[i[0]],delete r[i[0]]):logError(s,a,t,o):logError(r,i,t,n)}}function handleSet(t,e){for(const n in e){const o=e[n],[r,i]=resolve(t,n,{force:!0});r&&1===i.length?r[i[0]]=o:logError(r,i,t,n)}}function handleInc(t,e){for(const n in e){const o=e[n],[r,i]=resolve(t,n,{force:!0});r&&1===i.length?r[i[0]]=(r[i[0]]||0)+o:logError(r,i,t,n)}}function handleUnset(t,e){for(const n in e){const[e,o]=resolve(t,n);e&&1===o.length?delete e[o[0]]:logError(e,o,t,n)}}function handlePull(t,e,n){for(const o in n){const r=n[o];for(let n of r){const[r,i]=resolve(t,o),[s,a]=resolve(e,o);r&&1===i.length?r[i[0]].splice(s[a[0]].findIndex(t=>JSON.stringify(t)===JSON.stringify(n)),1):logError(r,i,t,o)}}}function handlePush(t,e){for(const n in e){const o=e[n];for(let e of o){const[o,r]=resolve(t,n);o&&1===r.length?o[r[0]].push(e):logError(o,r,t,n)}}}function logError(t,e,n,o){console.log("Error",t+"/"+e+" - couldn't resolve for "+JSON.stringify(n)+" "+o)}function resolve(t,e,n={}){const o=arrize(e);let r=[];o.length>0&&r.unshift(o.pop());let i=t;for(;o.length>0;){const t=o.shift();if(void 0!==i[t])i=i[t];else{if(!n.force){r.unshift(t),r=o.concat(r);break}const e="number"==typeof o[0],s=0===o.length&&"number"==typeof r[0];i[t]=e||s?[]:{},i=i[t]}}return[i,r]}function arrize(t,e="."){return Array.isArray(t)?t.slice():null==t||!1===t||""===t?[]:t.toString().split(e).map(t=>[void 0,null,!1,""].includes(t)?null:t.toString()).filter(t=>null!==t)}class StorageDB{storage=null;database=null;primaryKey=null;secretKey=null;sep="";constructor(t){t=t||{},this.storage=t.storage||window&&window.localStorage,this.database=t.database||"db",this.primaryKey=t.primaryKey||"_id",this.sep=t.sep||":",this.secretKey=t.secretKey||"",isSupported(this.storage)||(this.storage=null)}encryptData(t){const e=JSON.stringify(t);return CryptoJS.AES.encrypt(e,this.secretKey).toString()}decryptData(t){const e=CryptoJS.AES.decrypt(t,this.secretKey);try{const t=e.toString(CryptoJS.enc.Utf8);return JSON.parse(t,dateReviver)}catch(t){return null}}get(t,e){return new Collection(this,t,e)}getCollections(){let t=[];return Object.keys(this.storage).filter(t=>t.split(":").length>2).forEach(e=>{t.some(t=>t===e.split(":")[1])||t.push(e.split(":")[1])}),t}collection(t,e){return this.get(t,e)}}class Collection{name="";storage=null;path="";primaryKey="";cache={};cacheable=!1;db=null;constructor(t,e,n){n=n||{},this.name=e,this.storage=t.storage||new MockStorage,this.path=t.database+t.sep+e+t.sep,this.primaryKey=n.primaryKey||t.primaryKey,this.cache={},this.cacheable=!t.storage,this.db=t}_initCache(){let t={},e=new RegExp("^"+this.path);for(let n of Object.keys(this.storage))if(e.test(n)){const e=this.storage.getItem(n);t[n]=this.db.decryptData(e)}this.cache=t,this.cacheable=!0}_filter(t,e){e.type=e.type||"data",e.multi=e.multi||!1,this.cacheable||this._initCache();let n,o=[],r="id"===e.type;if("string"==typeof t)t=new RegExp(t);else if("function"==typeof t)n=!0;else if(!t){let t=r?Object.keys(this.cache):Object.values(this.cache);return e.multi?t:t[0]||null}for(let i of Object.keys(this.cache)){let s=this.cache[i];if(n){if(t(i,s.data)){let t=r?i:s;if(!e.multi)return t;o.push(t)}}else if(t.test(i)){let t=r?i:s;if(!e.multi)return t;o.push(t)}}return e.multi?o:null}insert(t,e,n){let o=t instanceof Array;if(o){if(0===t.length)return[]}else t=[t];let r=this.primaryKey,i=this.cacheable;for(let n of t){if(!isObject(n))throw new Error("TypeError: insert data must be an object or an object array");void 0===n[r]&&(n[r]=(new ID).toString());let t=new Date,o={offlineDate:t,offlineDateExpires:e||new Date(t.getTime()+6048e5),data:n};const s=this.db.encryptData(o);i&&(this.cache[this.path+n[r]]=o),this.storage.setItem(this.path+n[r],s)}return o?t.map(t=>t._id):t[0]._id}find(t,e,n){let o;t=t||{},(e=e||{}).skip=e.skip||0,e.limit=e.limit,e.sort=e.sort;let r=isObject(t)?null:t instanceof Array?t:[t],i={type:e._filterType||"data",multi:!0};if(r){let t=new RegExp("^"+this.path+"("+r.join("|")+")$");o=this._filter(t,i)}else o=Object.keys(t).length?this._filter((e,n)=>queryMatch(t,n),i):this._filter(null,i);return n||(o=o.map(t=>t.data)),e.sort&&o.sort((t,n)=>sortCompare(e.sort,t,n)),e.limit?o=o.slice(e.skip,e.skip+e.limit):e.skip&&(o=o.slice(e.skip)),o}findOne(t,e){let n;e=e||{};let o=isObject(t=t||{})?null:t,r=isObject(t)?Object.keys(t):[],i=!1,s=!!e.sort,a={type:e._filterType||"data",multi:!1};if(r.length&&r.includes(this.primaryKey)&&(o=t[this.primaryKey],i=!0),o){if(n=this.storage.getItem(this.path+o),n=n?this.db.decryptData(n).data:null,n&&i&&!queryMatch(t,n))return null}else r.length?s?n=this.find(t,e):(n=this._filter((e,n)=>queryMatch(t,n),a),Array.isArray(n)?n=n.map(t=>t.data):n&&(n=n.data)):n=s?this.find(t,e):this._filter(null,a);return!o&&s&&n&&(n=n[0].data||null),n&&"id"===a.type&&(n=this.path+n[this.primaryKey]),n}remove(t,e){if(!t)throw new Error("remove needs a query");(e=e||{}).multi=void 0===e.multi||e.multi;let n=e.multi?"find":"findOne",o=null;o="find"===n?this[n](t,{_filterType:"id"},!0):this[n](t,{_filterType:"id"});let r=this.cacheable;if(e.multi&&!o.length||!e.multi&&!o)return 0;e.multi||(o=[o]);for(let t of o)r&&delete this.cache[t],this.storage.removeItem(t);return o.length}update(t,e,n){if(!t)throw new Error("update needs a query");if(!e||!isObject(e))throw new Error("update needs an object");(n=n||{}).multi=void 0!==n.multi&&n.multi;let o=this[n.multi?"find":"findOne"](t,{_filterType:"id"}),r=this.primaryKey,i=this.cacheable;if(n.multi&&!o.length||!n.multi&&!o)return 0;if(n.multi){if(delete e[r],!Object.keys(e).length)return 0;for(let t of o){let n=i?this.cache[t]:this.db.decryptData(this.storage.getItem(t)),o=Object.assign({},n.data,e);i&&(this.cache[t]={offlineDate:n.offlineDate,offlineDateExpires:n.offlineDateExpires,data:o});const r=this.db.encryptData({offlineDate:n.offlineDate,offlineDateExpires:n.offlineDateExpires,data:o});this.storage.setItem(t,r)}return o.length}{let t=o,n=i?this.cache[t]:this.db.decryptData(this.storage.getItem(t)),s=e[r]&&e[r]!==n.data[r],a=s?this.path+e[r]:t;if(s&&this.findOne(e[r]))throw new Error("Duplicate value '"+e[r]+"' for unique field '"+r+"'");let l=Object.assign({},n.data,e);i&&(this.cache[a]={offlineDate:n.offlineDate,offlineDateExpires:n.offlineDateExpires,data:l},s&&delete this.cache[t]);const c=this.db.encryptData({offlineDate:n.offlineDate,offlineDateExpires:n.offlineDateExpires,data:l});return this.storage.setItem(a,c),s&&this.storage.removeItem(t),l}}drop(){return this.remove({}),!0}}class ID{constructor(){}toString(){return((new Date).getTime()/1e3).toString(16).substr(-4)+Math.random().toString(16).substr(2,12)}}class MockStorage{length=0;constructor(){this.length=0}key(){}setItem(){}getItem(){}removeItem(){}}const isSupported=t=>{if(!(t&&t instanceof Object))return!1;try{return t.setItem("_supported","1"),t.removeItem("_supported"),!0}catch(t){return!1}},isObject=t=>t instanceof Object&&"Object"===t.constructor.name,queryMatch=(t,e)=>{if(!t||!Object.keys(t).length)return!0;for(let n of Object.keys(t)){let o=t[n];if("$or"===n&&Array.isArray(o))return o.some(t=>queryMatch(t,e));if("$and"===n&&Array.isArray(o))return o.every(t=>queryMatch(t,e));if("$in"===n&&Array.isArray(o))return o.includes(e);if("$nin"===n&&Array.isArray(o))return!o.includes(e);if("$exists"===n&&"boolean"==typeof o)return o?void 0!==e:void 0===e;let r=e[n];if(r||n.split(".").forEach(t=>{r=r?r[t]:e[t]}),o instanceof RegExp){if(!o.test(r))return!1}else if(isObject(o)){for(let t of Object.keys(o))if(Operator._checkExist(t)&&!Operator[t](o[t],r))return!1}else if(o!==r)return!1}return!0},sortCompare=(t,e,n,o,r)=>{o=o||0;let i=(r=r||Object.keys(t))[o];return i?e[i]===n[i]?(o++,sortCompare(t,e,n,o,r)):1===t[i]?e[i]-n[i]:-1===t[i]?n[i]-e[i]:void 0:0},ops=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin"],isNotNumber=t=>"number"!=typeof t;class Operator{static $eq(t,e){return e===t}static $gt(t,e){if(isNotNumber(t))throw new Error("'$gt' value must be a number");return e>t}static $gte(t,e){if(isNotNumber(t))throw new Error("'$gte' value must be a number");return e>=t}static $lt(t,e){if(isNotNumber(t))throw new Error("'$lt' value must be a number");return e<t}static $lte(t,e){if(isNotNumber(t))throw new Error("'$lte' value must be a number");return e<=t}static $ne(t,e){return e!==t}static $in(t,e){if(!(t instanceof Array))throw new Error("'$in' value must be an array");return t.includes(e)}static $nin(t,e){if(!(t instanceof Array))throw new Error("'$nin' value must be an array");return!t.includes(e)}static $exists(t,e){return t?void 0!==e:void 0===e}static $regex(t,e){if(!(t instanceof RegExp))throw new Error("'$regex' value must be a RegExp");return t.test(e)}static _checkExist(t){if(["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$exists","$regex"].includes(t))return!0;throw new Error("unknown operator: '"+t+"'")}}class OfflineManagerService{_storage;storageInitialized=new BehaviorSubject(!1);offlineMode=new BehaviorSubject(!0);_offlineDB;constructor(t){this._storage=t}initStorage(t){this._offlineDB=new StorageDB({storage:window.localStorage,database:"offlineDB",primaryKey:"_id",secretKey:t}),this._offlineDB.getCollections().forEach(t=>{let e=this.find(t,{},{},!0);e.some(t=>!t)?this.dropCollection(t):e.forEach(e=>{e&&e.offlineDateExpires&&"function"==typeof e.offlineDateExpires.getTime&&Date.now()>=e.offlineDateExpires.getTime()&&this.removeDocument(t,e.data._id)})});let e=this._storage.get("user");if(e){if(null===this._offlineDB.decryptData(e)){const t=this._offlineDB.encryptData(e);this._storage.set("user",t)}}let n=this._storage.get("lastURL");if(n){if(null===this._offlineDB.decryptData(n)){const t=this._offlineDB.encryptData(n);this._storage.set("lastURL",t)}}let o=this._storage.get("accessToken");if(o){if(null===this._offlineDB.decryptData(o)){const t=this._offlineDB.encryptData(o);this._storage.set("accessToken",t)}}let r=this._storage.get("refreshToken");if(r){if(null===this._offlineDB.decryptData(r)){const t=this._offlineDB.encryptData(r);this._storage.set("refreshToken",t)}}this.storageInitialized.next(!0)}getStorage(){return this._offlineDB}setOffline(t){this.offlineMode.next(t)}saveUser(t){return this._storage.set("user",this._offlineDB.encryptData(t))}getUser(){return this._storage.get("user")?this._offlineDB.decryptData(this._storage.get("user")):null}removeUser(){this._storage.remove("user")}find(t,e,n={},o=!1){const r=this._offlineDB.get(t);return r?r.find(e,n,o):[]}findOne(t,e){const n=this._offlineDB.get(t);return n?n.findOne(e):null}insertDocument(t,e,n){const o=this._offlineDB.get(t);let r="";return o&&e&&(!Array.isArray(e)||e.length)&&(r=o.insert(e,n)),r}updateDocument(t,e){const n=this._offlineDB.get(t);if(n){if(n.findOne({_id:e._id}))return e.__v+=1,n.update(e._id,e),1}return 0}updateDocumentProps(t,e,n,o){const r=this._offlineDB.get(t);if(r){let t=r.findOne({_id:e});if(t)return n.forEach(e=>{t[e.prop]=e.data}),t.__v+=1,r.update({_id:e},t),1}return 0}removeDocument(t,e){const n=this._offlineDB.get(t);n&&n.remove(e)}dropCollection(t){this._offlineDB.get(t).drop()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:OfflineManagerService,deps:[{token:LocalStorageService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:OfflineManagerService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:OfflineManagerService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:LocalStorageService}]});class TokenManagerService{_storage;_offline;constructor(t,e){this._storage=t,this._offline=e}getToken(t){let e=this._storage.get(t);if(e){const t=this._offline.getStorage();if(!t||"function"!=typeof t.decryptData)return e;const n=t.decryptData(e);return null===n?e:n}return null}setToken(t,e){const n=this._offline.getStorage();n&&"function"==typeof n.encryptData?this._storage.set(t,n.encryptData(e)):this._storage.set(t,e)}removeToken(t){null!==this.getToken(t)&&this._storage.remove(t)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:TokenManagerService,deps:[{token:LocalStorageService},{token:OfflineManagerService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:TokenManagerService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:TokenManagerService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:LocalStorageService},{type:OfflineManagerService}]});class SocketManagerService{_socket;_offline;_alert;_router;_token;socketStatus;messageId=0;_cbMap=new Map;_subMap=new Map;_subKeyMap=new Map;_offlineUpdates=[];_pendingMessages=[];_sendTimeout=null;_currentLockId="";_chunkAssemblies=new Map;_chunkProgressThresholdBytes=5242880;_chunkTextDecoder=new TextDecoder;_connectionDelayTimeout=null;onerror=function(){};constructor(t,e,n,o,r){this._socket=t,this._offline=e,this._alert=n,this._router=o,this._token=r}getSubArray(){return Array.from(this._subMap.values())}initSocketManager(){this._socket.readyState$.subscribe(t=>{this.socketStatus=t}),this._socket.onmessage=t=>{this.handleMessage(t)},this._socket.onopen=t=>{this._connectionDelayTimeout=setTimeout(async()=>{if(this._connectionDelayTimeout=null,this._offline.setOffline(!1),this._subMap.forEach(t=>{this.send(t.messageRoute,new Date,t.messageId,"subscription","sub",t.subscription,...t.parameters)}),!await this.acquireLock("processingOfflineUpdates"))return;let t=this._offline.find("collectionOffline",{}).sort((t,e)=>t.date.getTime()-e.date.getTime()),e=this._offline.find("methodOffline",{}).sort((t,e)=>t.date.getTime()-e.date.getTime());t.length||e.length?(t.forEach(t=>{let e=this.messageId++;this._offlineUpdates.push({id_offline_doc:t._id,messageId:e,type:"collectionOffline"}),t.data[2]=e,"updateDocument"===t.type?(t.data[4]="updateDocumentOffline",t.data[0]="Offline - "+t.data[0]):"updateDocumentProps"===t.type?(t.data[4]="updateDocumentPropsOffline",t.data[0]="Offline - "+t.data[0]):t.data[0]="Offline - "+t.data[0]}),e.forEach(t=>{let e=this.messageId++;this._offlineUpdates.push({id_offline_doc:t._id,messageId:e,type:"methodOffline"}),t.data[2]=e,t.data[0]="Offline - "+t.data[0]}),this.send("Offline Updates",new Date,this.messageId++,"offline",t.concat(e).sort((t,e)=>t.date.getTime()-e.date.getTime()))):this.releaseLock("processingOfflineUpdates")},100)},this._socket.onerror=t=>{this._connectionDelayTimeout&&clearTimeout(this._connectionDelayTimeout),console.log(new Date,"SOCKET ERROR",t),this.onerror()},this._socket.onclose=t=>{this._connectionDelayTimeout&&clearTimeout(this._connectionDelayTimeout),this._chunkAssemblies.forEach(t=>this.dismissChunkAlert(t)),this._chunkAssemblies.clear()}}handleMessage(t){for(let e of t)this.processReceivedMessage(e)}async acquireLock(t,e=6e4,n=100){let o=Date.now(),r=this.generateUniqueId(),i=JSON.stringify({lockId:r,timestamp:o}),s=this._token.getToken(t);if(s){let{lockId:n,timestamp:r}=JSON.parse(s);if(!(o>r+e))return!1;this._token.setToken(t,i)}else this._token.setToken(t,i);await this.sleep(n);let a=this._token.getToken(t);if(a){let{lockId:t,timestamp:n}=JSON.parse(a);if(t===r&&o<=n+e)return this._currentLockId=r,!0}return!1}sleep(t){return new Promise(e=>setTimeout(e,t))}releaseLock(t){let e=this._token.getToken(t);if(e){let{lockId:n}=JSON.parse(e);n===this._currentLockId&&this._token.removeToken(t)}}generateUniqueId(){return`${Date.now()}-${Math.random().toString(36).substr(2,9)}`}processReceivedMessage(t){if(this.handleChunkedPayload(t))return;let e=this._offlineUpdates.findIndex(e=>e.messageId===t.messageId);if(e>=0&&(this._offline.removeDocument(this._offlineUpdates[e].type,this._offlineUpdates[e].id_offline_doc),this._offlineUpdates.splice(e,1),this._offlineUpdates.length||this.releaseLock("processingOfflineUpdates")),"ACK"!==t.data&&"NACK"!==t.data){const e=this._cbMap.get(t.messageId);if(e)return e.cb?(e.cb(t.hasError?t.data:null,t.hasError?null:t.data),e.resolveFn(t.hasError?t.data:null)):t.hasError?e.rejectFn(t.data):e.resolveFn(t.data),void this._cbMap.delete(t.messageId);const n=this._subMap.get(t.messageId);n&&n.subject.next(t.data)}}handleChunkedPayload(t){const e=t&&t.data;if(!e||"object"!=typeof e||!e.__chunked)return!1;const n=e.chunkId;if(!n)return!0;if("start"===e.chunkStatus)return this._chunkAssemblies.set(n,this.createChunkAssembly(n,t,e)),!0;const o=this._chunkAssemblies.get(n);if(!o)return!0;if("chunk"===e.chunkStatus)return this.appendChunkPayload(o,e),this.emitChunkProgress(o),!0;if("end"===e.chunkStatus){if(o.totalChunks&&o.receivedChunks!==o.totalChunks)return this.handleChunkFailure(o,"Incomplete chunk sequence"),this._chunkAssemblies.delete(n),!0;const e=this.tryDecodeChunkBuffer(o,!0);return void 0===e?(this.handleChunkFailure(o,"Failed to decode chunk payload"),this._chunkAssemblies.delete(n),!0):(t.data=e,this.dismissChunkAlert(o),this._chunkAssemblies.delete(n),!1)}return!0}createChunkAssembly(t,e,n){const o=n.totalBytes||0,r={chunkId:t,messageId:e.messageId,hasError:!!e.hasError,encoding:"msgpack"===n.encoding?"msgpack":"json",totalChunks:n.totalChunks||0,totalBytes:o,buffer:o?new Uint8Array(o):new Uint8Array(0),filledBytes:0,receivedChunks:0,targetType:null,showProgress:!1,lastPercent:-1},i=this._subMap.get(e.messageId);if(i)r.targetType="subscription",r.subscription=i;else{const t=this._cbMap.get(e.messageId);t&&(r.targetType="callback",r.callback=t)}return this.initializeChunkProgress(r),r}initializeChunkProgress(t){this.shouldShowChunkProgress(t)&&(t.showProgress=!0,t.lastPercent=-1,this.updateChunkProgress(t,!0))}shouldShowChunkProgress(t){return t.totalBytes?t.totalBytes>=this._chunkProgressThresholdBytes:t.totalChunks>1}appendChunkPayload(t,e){const n=this.extractChunkBytes(e,t.encoding);if(n&&n.byteLength){if(t.buffer&&t.buffer.byteLength>=t.filledBytes+n.byteLength)t.buffer.set(n,t.filledBytes);else if(t.buffer&&t.buffer.byteLength){const e=new Uint8Array(t.filledBytes+n.byteLength);e.set(t.buffer.subarray(0,t.filledBytes),0),e.set(n,t.filledBytes),t.buffer=e,t.totalBytes=t.buffer.byteLength}else t.buffer=new Uint8Array(n),t.totalBytes=t.buffer.byteLength;t.filledBytes+=n.byteLength,t.receivedChunks++,this.updateChunkProgress(t)}}updateChunkProgress(t,e=!1){if(!t.showProgress&&!e)return;if(!t.showProgress&&this.shouldShowChunkProgress(t))t.showProgress=!0;else if(!t.showProgress)return;const n=this.getChunkProgressPercent(t);if(null===n)return;if(!e){if(t.lastPercent>=n)return;if(t.lastPercent>=0&&n<100&&n-t.lastPercent<5)return}t.lastPercent=n;const o=this.buildChunkProgressMessage(t,n);t.alertToast?this.updateChunkAlertMessage(t.alertToast,o):(t.alertToast=this._alert.setAlert("update",o,0),this.configureChunkAlert(t.alertToast))}emitChunkProgress(t){if("subscription"!==t.targetType||!t.subscription)return;if(t.totalChunks&&t.receivedChunks>=t.totalChunks)return;const e=this.tryDecodeChunkBuffer(t,!1);void 0!==e&&t.subscription.subject.next(e)}handleChunkFailure(t,e){const n={chunkId:t.chunkId,message:e};if(console.error(new Date,"WEBSOCKET CHUNK",e,t.chunkId),this.dismissChunkAlert(t),"subscription"===t.targetType&&t.subscription)return void t.subscription.subject.error(n);const o=this._cbMap.get(t.messageId);o&&(o.cb&&o.cb(n,null),o.rejectFn?o.rejectFn(n):o.resolveFn&&o.resolveFn(n),this._cbMap.delete(t.messageId))}tryDecodeChunkBuffer(t,e){if(t.buffer&&t.filledBytes)try{const e=t.filledBytes===t.buffer.byteLength?t.buffer:t.buffer.subarray(0,t.filledBytes);if("msgpack"===t.encoding)return unpack(e);const n=this._chunkTextDecoder.decode(e);return JSON.parse(n,dateReviver)}catch(n){return void(e&&console.error(new Date,"WEBSOCKET CHUNK","Failed to decode chunk payload",t.chunkId,n))}}extractChunkBytes(t,e){return"msgpack"===e?this.ensureUint8Array(t.payload):"string"==typeof t.payload?this.base64ToUint8Array(t.payload):null}ensureUint8Array(t){return t?t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)?new Uint8Array(t):"string"==typeof t?this.base64ToUint8Array(t):null:null}base64ToUint8Array(t){const e=atob(t),n=new Uint8Array(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return n}dismissChunkAlert(t){t.alertToast&&(this._alert.clearAlert(t.alertToast.toastId),t.alertToast=void 0),t.showProgress=!1,t.lastPercent=-1}getChunkProgressPercent(t){if(t.totalBytes){const e=Math.min(t.filledBytes,t.totalBytes);return Math.min(100,Math.floor(e/t.totalBytes*100))}if(t.totalChunks){const e=Math.min(t.receivedChunks,t.totalChunks);return Math.min(100,Math.floor(e/t.totalChunks*100))}return null}buildChunkProgressMessage(t,e){const n=t.totalBytes,o=n?Math.min(t.filledBytes,n):0;if(n)return`Downloading data (${e}% • ${this.formatBytes(o)} of ${this.formatBytes(n)})`;if(t.totalChunks){return`Downloading data (${e}% • chunk ${Math.min(t.receivedChunks,t.totalChunks)} of ${t.totalChunks})`}return`Downloading data (${e}%)`}formatBytes(t){if(!t)return"0 B";const e=["B","KB","MB","GB","TB"],n=Math.min(e.length-1,Math.floor(Math.log(t)/Math.log(1024))),o=t/Math.pow(1024,n);return`${o>=10?o.toFixed(0):o.toFixed(1)} ${e[n]}`}configureChunkAlert(t){t&&(t.message=t.message||"",t.portal?.instance&&(t.portal.instance.options.disableTimeOut=!0,t.portal.instance.options.tapToDismiss=!0,t.portal.instance.options.closeButton=!1,t.portal.instance.message=t.message),t.toastRef?.componentInstance&&(t.toastRef.componentInstance.options.disableTimeOut=!0,t.toastRef.componentInstance.options.tapToDismiss=!0,t.toastRef.componentInstance.options.closeButton=!1,t.toastRef.componentInstance.message=t.message))}updateChunkAlertMessage(t,e){t.message=e,t.portal?.instance&&(t.portal.instance.message=e),t.toastRef?.componentInstance&&(t.toastRef.componentInstance.message=e)}openSocket(t,e){this._socket.openSocket(t,e)}closeSocket(){this._token.removeToken("accessToken"),this._socket.close()}resolveCurrentRoute(){const t=this._router?.url||"";return t.includes("?")?t.substring(0,t.indexOf("?")):t}buildSubscriptionKey(t,e,n){let o="";try{o=JSON.stringify(n??[])}catch{o=String(n??"")}return`${t}::${e}::${o}`}sendUnsubscribe(t,e,n,o){this.send(t,new Date,e,"subscription","unsub",n,...o)}releaseSharedSubscription(t){const e=this._subKeyMap.get(t);e&&(e.refCount-=1,e.refCount>0||(this._subKeyMap.delete(t),this.sendUnsubscribe(e.messageRoute,e.messageId,e.subscription,e.parameters),this._subMap.delete(e.messageId)))}call(t,...e){let n=null,o=null,r=new Promise((t,e)=>{n=t,o=e}),i=this.messageId++;const s=e[e.length-1]&&"function"==typeof e[e.length-1]?e.pop():null;this._cbMap.set(i,{messageId:i,cb:s,resolveFn:n,rejectFn:o,retryCnt:0});let a=e.length;for(;(void 0===e[e.length-1]||null===e[e.length-1])&&a>0;)e.pop(),a=e.length;return this.send(this._router.url.includes("?")?this._router.url.substring(0,this._router.url.indexOf("?")):this._router.url,new Date,i,"method",t,...e),r}subscribe(t,...e){const n=deepCopy(e),o=this.resolveCurrentRoute(),r=this.buildSubscriptionKey(o,t,n),i=this._subKeyMap.get(r);if(i)return i.refCount+=1,i.subject.pipe(finalize(()=>{this.releaseSharedSubscription(r)}));const s=new ReplaySubject(1),a=this.messageId++,l={key:r,messageId:a,messageRoute:o,subscription:t,parameters:n,subject:s,refCount:1};this._subMap.set(a,l),this._subKeyMap.set(r,l);const c=s.pipe(finalize(()=>{this.releaseSharedSubscription(r)}));return this.send(o,new Date,a,"subscription","sub",t,...n),c}subscribeBypassRoute(t,...e){const n=deepCopy(e),o="Bypass",r=this.buildSubscriptionKey(o,t,n),i=this._subKeyMap.get(r);if(i)return i.refCount+=1,i.subject.pipe(finalize(()=>{this.releaseSharedSubscription(r)}));const s=new ReplaySubject(1),a=this.messageId++,l={key:r,messageId:a,messageRoute:o,subscription:t,parameters:n,subject:s,refCount:1};this._subMap.set(a,l),this._subKeyMap.set(r,l);const c=s.pipe(finalize(()=>{this.releaseSharedSubscription(r)}));return this.send("Bypass",new Date,a,"subscription","sub",t,...n),c}unsubscribe(t,e,...n){this.send(this.resolveCurrentRoute(),new Date,t,"subscription","unsub",e,...n)}send(...t){this.socketStatus===WebSocket.OPEN?(this._pendingMessages.push(t),this._sendTimeout||(this._sendTimeout=setTimeout(()=>{this._sendTimeout=null;const t=[...this._pendingMessages];this._pendingMessages=[],this._socket.send(t)},25))):"method"===t[3]&&this.handleOfflineMethod(t)}handleOfflineMethod(t){if("insertDocument"===t[4]){if("driver-gps"===t[5])return;this._alert.setAlert("warning","This insert command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!"),this._offline.insertDocument("collectionOffline",{type:"insert",data:t,date:new Date});let e=this._offline.insertDocument(t[5],t[6]),n=this._cbMap.get(t[2]);n&&n.cb&&(n.cb(null,e),this._cbMap.delete(t[2]))}else if("updateDocument"===t[4]){this._alert.setAlert("warning","This update command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!"),this._offline.insertDocument("collectionOffline",{type:"updateDocument",data:t,date:new Date}),this._offline.findOne(t[5],{_id:t[6]._id})?this._offline.updateDocument(t[5],t[6]):console.log("Could not find Offline data",t[5],t[6]);let e=this._cbMap.get(t[2]);e&&e.cb&&(e.cb(null,1),this._cbMap.delete(t[2]))}else if("updateDocumentProps"===t[4]){this._alert.setAlert("warning","This update command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!"),this._offline.insertDocument("collectionOffline",{type:"updateDocumentProps",data:t,date:new Date}),this._offline.findOne(t[5],{_id:t[6]})?this._offline.updateDocumentProps(t[5],t[6],t[7],t[8]):console.log("Could not find Offline data",t[5],t[6]);let e=this._cbMap.get(t[2]);e&&e.cb&&(e.cb(null,1),this._cbMap.delete(t[2]))}else if("removeDocument"===t[4]){this._alert.setAlert("warning","This remove command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!"),this._offline.insertDocument("collectionOffline",{type:"removeDocument",data:t,date:new Date}),this._offline.findOne(t[5],{_id:t[6]})?this._offline.removeDocument(t[5],t[6]):console.log("Could not find Offline data",t[5],t[6]);let e=this._cbMap.get(t[2]);e&&e.cb&&(e.cb(null,1),this._cbMap.delete(t[2]))}else t[0].includes("/dashboard/driver/")&&this._offline.insertDocument("methodOffline",{type:t[4],data:t,date:new Date})}getStatus(){return this._socket.readyState$}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SocketManagerService,deps:[{token:SocketService},{token:OfflineManagerService},{token:AlertService},{token:i1$1.Router},{token:TokenManagerService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SocketManagerService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SocketManagerService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:SocketService},{type:OfflineManagerService},{type:AlertService},{type:i1$1.Router},{type:TokenManagerService}]});class AccountManagerService{_router;_socket;_token;_http;_alert;_offline;user=new BehaviorSubject(null);initCompleted=new BehaviorSubject(!1);loginCompleted=new BehaviorSubject(!1);publicClient=new BehaviorSubject(null);user$;environment=null;publicTokenKey="publicToken";publicActivityKey="publicTokenActivity";publicSessionMaxIdleMs=36e5;publicActivityThrottleMs=15e3;publicActivityListenerBound=!1;publicActivityInterval=null;lastPublicActivityWrite=0;constructor(t,e,n,o,r,i){this._router=t,this._socket=e,this._token=n,this._http=o,this._alert=r,this._offline=i}normalizeUser(t){if(!t)return null;const e=t.roles||{},n={...e,super_admin:!!e.super_admin,approvals:Array.isArray(e.approvals)?e.approvals:[],groups:Array.isArray(e.groups)?e.groups:[],notifications:Array.isArray(e.notifications)?e.notifications:[],miscs:Array.isArray(e.miscs)?e.miscs:[]},o=t.other&&"object"==typeof t.other?t.other:{};return{...t,roles:n,other:o}}initLoginManager(t){this.environment=t,this._offline.storageInitialized.subscribe(t=>{this._socket.initSocketManager(),this.initPublicSessionTracking();let e=this._token.getToken("refreshToken");e?(this.initLogin(e),setInterval(()=>{e=this._token.getToken("refreshToken"),this.initLogin(e)},3e3)):this.initCompleted.next(!0)})}initPublicSessionTracking(t={}){if("number"==typeof t.maxIdleMs&&t.maxIdleMs>0&&(this.publicSessionMaxIdleMs=t.maxIdleMs),"number"==typeof t.throttleMs&&t.throttleMs>0&&(this.publicActivityThrottleMs=t.throttleMs),!this.publicActivityListenerBound&&"undefined"!=typeof window){const t=()=>this.touchPublicSession();window.addEventListener("click",t,{passive:!0}),window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("keydown",t,{passive:!0}),window.addEventListener("scroll",t,{passive:!0}),window.addEventListener("touchstart",t,{passive:!0}),this.publicActivityListenerBound=!0}this.publicActivityInterval&&clearInterval(this.publicActivityInterval);const e="number"==typeof t.checkIntervalMs&&t.checkIntervalMs>0?t.checkIntervalMs:6e4;this.publicActivityInterval=setInterval(()=>this.enforcePublicSession(),e),this.restorePublicSession()}initLogin(t){if(navigator.onLine)this._offline.offlineMode.getValue()&&(this._offline.setOffline(!1),this.getAccessToken(t));else if(!this._offline.offlineMode.getValue()||!this.initCompleted.getValue()){this.closeSocket(),this._offline.setOffline(!0);let t=this._offline.getUser();t&&this.setUser(t),this.initCompleted.getValue()||this.initCompleted.next(!0)}}getAccessToken(t){t&&this._http.post(this.environment.SERVER_URL+"/accessToken",{refreshToken:t}).toPromise().then(t=>{t.error?this.initCompleted.next(!0):(this._token.setToken("accessToken",t.result.token),this.setUser(t.result.user),this.openSocket(t.result.token),this.user$&&this.user$.unsubscribe(),this.user$=this._socket.subscribeBypassRoute("userWithId",t.result.user._id).subscribe(t=>{t&&(this.user.getValue()&&this.user.getValue()._id!==t._id?this._socket.call("incorrectUser",this.user.getValue(),t,this._socket.getSubArray()):(this.setUser(t),this.loginCompleted.next(!0),this.initCompleted.next(!0),this._offline.saveUser(t)))}))},t=>{this.initCompleted.next(!0)})}logIn(t,e){return new Promise((n,o)=>{this._http.post(this.environment.SERVER_URL+"/login",{username:t,password:e}).toPromise().then(t=>{t.error?(this._alert.setAlert("error",t.result),o(t.result)):(this._token.setToken("refreshToken",t.result.token),this.getAccessToken(t.result.token),n(t.result.token))},t=>{})})}publicLogIn(t,e){return new Promise((n,o)=>{this._http.post(this.environment.SERVER_URL+"/public/login",{email:t,password:e}).toPromise().then(t=>{t?.error?(this._alert.setAlert("error",t.result||"Unable to sign in"),o(t.result||"Unable to sign in")):(t?.result?.token&&(this._token.setToken(this.publicTokenKey,t.result.token),this.touchPublicSession(!0)),t?.result?.client&&this.publicClient.next(t.result.client),n(t.result))},()=>{this._alert.setAlert("error","Unable to sign in"),o("Unable to sign in")})})}publicRegister(t){return new Promise((e,n)=>{this._http.post(this.environment.SERVER_URL+"/public/register",t).toPromise().then(t=>{t?.error?(this._alert.setAlert("error",t.result||"Unable to create account"),n(t.result||"Unable to create account")):(t?.result?.token&&(this._token.setToken(this.publicTokenKey,t.result.token),this.touchPublicSession(!0)),t?.result?.client&&this.publicClient.next(t.result.client),e(t.result))},()=>{this._alert.setAlert("error","Unable to create account"),n("Unable to create account")})})}publicFetchMe(){return new Promise((t,e)=>{if(this.isPublicSessionExpired())return this.publicLogOut(),void e("No session");const n=this._token.getToken(this.publicTokenKey);if(!n)return this.publicClient.next(null),void e("No session");const o=new HttpHeaders({Authorization:`Bearer ${n}`});this._http.get(this.environment.SERVER_URL+"/public/me",{headers:o}).toPromise().then(n=>{n?.error?(this.publicClient.next(null),e(n.result||"Unable to load session")):(this.publicClient.next(n.result?.client||null),this.touchPublicSession(),t(n.result))},()=>{e("Unable to load session")})})}publicFetchDashboard(){return new Promise((t,e)=>{if(this.isPublicSessionExpired())return this.publicLogOut(),void e("No session");const n=this._token.getToken(this.publicTokenKey);if(!n)return void e("No session");const o=new HttpHeaders({Authorization:`Bearer ${n}`});this._http.get(this.environment.SERVER_URL+"/public/dashboard",{headers:o}).toPromise().then(n=>{n?.error?e(n.result||"Unable to load dashboard"):(this.touchPublicSession(),t(n.result))},()=>{e("Unable to load dashboard")})})}publicLogOut(){this._token.removeToken(this.publicTokenKey),this._token.removeToken(this.publicActivityKey),this.publicClient.next(null)}restorePublicSession(){if(this.publicClient.getValue())return;this._token.getToken(this.publicTokenKey)&&(this.isPublicSessionExpired()?this.publicLogOut():(this.touchPublicSession(!0),this.publicFetchMe().catch(()=>{})))}enforcePublicSession(){this.isPublicSessionExpired()&&this.publicLogOut()}isPublicSessionExpired(){if(!this._token.getToken(this.publicTokenKey))return!1;const t=this.getPublicActivityTimestamp();return!!t&&Date.now()-t>this.publicSessionMaxIdleMs}getPublicActivityTimestamp(){const t=this._token.getToken(this.publicActivityKey);if(!t)return 0;const e=Number(t);return Number.isFinite(e)?e:0}touchPublicSession(t=!1){if(!this._token.getToken(this.publicTokenKey))return;const e=Date.now();!t&&e-this.lastPublicActivityWrite<this.publicActivityThrottleMs||(this.lastPublicActivityWrite=e,this._token.setToken(this.publicActivityKey,String(e)))}logIn365(t){return new Promise((e,n)=>{this._http.post(this.environment.SERVER_URL+"/login365",{id_token:t}).toPromise().then(t=>{t.error?(this._alert.setAlert("error",t.result),n(t.result)):(this._token.setToken("refreshToken",t.result.token),this.getAccessToken(t.result.token),e(t.result.token))},t=>{})})}resetUserPassword(t){return new Promise((e,n)=>{this._http.post(this.environment.SERVER_URL+"/resetPassword",{username:t}).toPromise().then(t=>{e(!0)},t=>{})})}logOut(){return new Promise((t,e)=>{this._router.navigateByUrl("/home"),setTimeout(()=>{this.setUser(null),this._token.removeToken("refreshToken"),this._offline.removeUser(),this.closeSocket(),t(!0)},500)})}openSocket(t){this._socket.openSocket(this.environment,[t])}closeSocket(){this._socket.closeSocket()}setUser(t){this.user.next(this.normalizeUser(t))}getUser(){return this.user.getValue()}getSocketStatus(){return this._socket.getStatus()}isUserInView(t){let e=!1;if(this.isUserSuperAdmin())return!0;let n=this.user.getValue();if(n&&n.roles){const o=Array.isArray(n.roles.groups)?n.roles.groups:[],r=Array.isArray(n.roles.miscs)?n.roles.miscs:[];o.forEach(n=>{n.views.filter(e=>e.startsWith(t)).length&&(e=!0)}),r.filter(e=>e.startsWith(t)).length&&(e=!0),o.filter(e=>e.name===t).length&&(e=!0)}return e}isUserSuperAdmin(){const t=this.user.getValue();return!!(t&&t.roles&&t.roles.super_admin)}isInitCompleted(){return new Promise((t,e)=>{if(this.initCompleted.value)t(!0);else{let e=this.initCompleted.subscribe(n=>{n&&(e.unsubscribe(),t(!0))},()=>{})}})}isLoginCompleted(){return new Promise((t,e)=>{if(this.loginCompleted.value)t(!0);else{let e=this.loginCompleted.subscribe(n=>{n&&(e.unsubscribe(),t(!0))})}})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AccountManagerService,deps:[{token:i1$1.Router},{token:SocketManagerService},{token:TokenManagerService},{token:i4.HttpClient},{token:AlertService},{token:OfflineManagerService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AccountManagerService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AccountManagerService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:i1$1.Router},{type:SocketManagerService},{type:TokenManagerService},{type:i4.HttpClient},{type:AlertService},{type:OfflineManagerService}]});class ValidationService{constructor(){}wholeNumbersAllowNegative(t){return""===t.value||null===t.value||/^[\-]?\d+$/.test(t.value)?null:{wholeNumbersAllowNegative:{valid:!1}}}wholeNumbersWithZero(t){return""===t.value||null===t.value||/^[0-9]*$/.test(t.value)?null:{wholeNumbersWithZero:{valid:!1}}}wholeNumbersGreaterThanZero(t){return""===t.value||null===t.value||/^[1-9]+[0-9]*$/.test(t.value)?null:{wholeNumbersGreaterThanZero:{valid:!1}}}decimalWithZero(t){return""===t.value||null===t.value||/^\d*\.?\d*$/.test(t.value)?null:{decimalWithZero:{valid:!1}}}decimalGreaterThanZero(t){return""===t.value||null===t.value||/^\s*(?=.*[1-9])\d*(?:\.\d{1,10})?\s*$/.test(t.value)?null:{decimalGreaterThanZero:{valid:!1}}}currency(t){return""===t.value||null===t.value||/^[0-9]\d*(\.\d+)?$/.test(t.value)?null:{currency:{valid:!1}}}currencyGreaterThanZero(t){return""===t.value||null===t.value||/^[0-9]\d*(\.\d+)?$/.test(t.value)&&t.value>0?null:{currency:{valid:!1}}}currencyAllowNegative(t){return""===t.value||null===t.value||/^[\-]?[0-9]\d*(\.\d+)?$/.test(t.value)?null:{currency:{valid:!1}}}phoneNumber(t){return""===t.value||null===t.value||/^1?([2-9])(\d{9})/.test(t.value)?null:{phoneNumber:{valid:!1}}}email(t){return""===t.value||null===t.value||/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t.value)?null:{email:{valid:!1}}}matchPassword(t){let e=t.controls.password,n=t.controls.confirm_password;return e.value&&n.value?e.value===n.value?null:{matchPassword:{isValid:!1}}:null}density(t){return""===t.value||null===t.value||/^[\-]?\d*\.?\d*$/.test(t.value)?null:{density:{valid:!1}}}maxValue(t){return e=>("string"==typeof e.value?parseFloat(e.value):e.value)>t?{maxValue:{max:t}}:null}minValue(t){return e=>("string"==typeof e.value?parseFloat(e.value):e.value)<t?{minValue:{min:t}}:null}multipleOf(t){return e=>("string"==typeof e.value?parseFloat(e.value):e.value)%t!==0?{multipleOf:{value:t}}:null}minLengthArray(t){return e=>e.value&&e.value.length>=t?null:{minLengthArray:{valid:!1}}}maxLengthArray(t){return e=>e.value&&e.value.length<=t?null:{maxLengthArray:{valid:!1}}}validIPAddress(t){return""===t.value||null===t.value||/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(t.value)?null:{validIPAddress:{valid:!1}}}alphaNumericWithDashes(t){return""===t.value||null===t.value||/^[a-zA-Z0-9-_]+$/.test(t.value)?null:{alphaNumericWithDashes:{valid:!1}}}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ValidationService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ValidationService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ValidationService,decorators:[{type:Injectable}],ctorParameters:()=>[]});class AwsService{_socket;constructor(t){this._socket=t}dataURItoFile(t,e){let n=atob(t.split(",")[1]),o=t.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(n.length),i=new Uint8Array(r);for(let t=0;t<n.length;t++)i[t]=n.charCodeAt(t);let s=new Blob([r],{type:o});return s.lastModifiedDate=new Date,s.name=e,s}uploadFile(t,e,n,o){return new Promise((r,i)=>{t.size?this.getBase64(t).then(s=>{this._socket.call("uploadFileAndSave",o||t.name,s,t.size,n||-1,e,!0,(t,e)=>{e?r(e):i(t)})}):i("Invalid File")})}getFileWithKey(t,e){this._socket.call("getFile",t,e)}getFileWithId(t,e){this._socket.call("findOne","files",{_id:t},(t,n)=>{this.getFileWithKey(n.key,e)})}deleteFile(t,e){this._socket.call("deleteFile",t,e)}deleteFileWithId(t,e){this._socket.call("findOne","files",{_id:t},(t,n)=>{this.deleteFile(n.key,e)})}deleteFilesWithKeys(t,e){this._socket.call("deleteFiles",t,e)}getBase64(t){return new Promise((e,n)=>{const o=new FileReader;o.readAsDataURL(t),o.onload=()=>e(o.result),o.onerror=t=>n(t)})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AwsService,deps:[{token:SocketManagerService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AwsService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AwsService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:SocketManagerService}]});class BaseComponent{providerService;constructor(t){this.providerService=t}}class ProviderService{_app;_router;_socket;_account;_alert;_vs;_aws;_fb;constructor(t,e,n,o,r,i,s,a){this._app=t,this._router=e,this._socket=n,this._account=o,this._alert=r,this._vs=i,this._aws=s,this._fb=a}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ProviderService,deps:[{token:CoreService},{token:i1$1.Router},{token:SocketManagerService},{token:AccountManagerService},{token:AlertService},{token:ValidationService},{token:AwsService},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ProviderService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ProviderService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:CoreService},{type:i1$1.Router},{type:SocketManagerService},{type:AccountManagerService},{type:AlertService},{type:ValidationService},{type:AwsService},{type:i2.FormBuilder}]});class DialogNotifyContent{activeModal;title;body;handleKeyboardEvent(t){13===t.keyCode&&this.activeModal.close()}constructor(t){this.activeModal=t}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogNotifyContent,deps:[{token:i1$2.NgbActiveModal}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:DialogNotifyContent,isStandalone:!1,selector:"resolveio-dialog.notify",inputs:{title:"title",body:"body"},host:{listeners:{"document:keypress":"handleKeyboardEvent($event)"}},ngImport:i0,template:'\n\t\t<div class="modal-header">\n\t\t\t<h4 class="modal-title"><i class="fa fa-info-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t \t\t<button type="button" class="btn-close ms-auto" aria-label="Close" (click)="activeModal.dismiss(\'Cross click\')"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t \t \t<p>{{ body }}</p>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t \t\t<button type="button" class="btn btn-secondary" (click)="activeModal.close(\'Close click\')">Ok</button>\n\t\t</div>\n ',isInline:!0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogNotifyContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.notify",template:'\n\t\t<div class="modal-header">\n\t\t\t<h4 class="modal-title"><i class="fa fa-info-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t \t\t<button type="button" class="btn-close ms-auto" aria-label="Close" (click)="activeModal.dismiss(\'Cross click\')"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t \t \t<p>{{ body }}</p>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t \t\t<button type="button" class="btn btn-secondary" (click)="activeModal.close(\'Close click\')">Ok</button>\n\t\t</div>\n ',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal}],propDecorators:{title:[{type:Input}],body:[{type:Input}],handleKeyboardEvent:[{type:HostListener,args:["document:keypress",["$event"]]}]}});class AiFormRegistryService{forms=[];counter=0;registerForm(t){if(!t?.form)return()=>{};const e={id:"ai-form-"+ ++this.counter,...t};return this.forms.push(e),()=>this.unregisterForm(e)}unregisterForm(t){const e="string"==typeof t?t:t?.id;e&&(this.forms=this.forms.filter(t=>t.id!==e))}getFormsForRoute(t){const e=this.normalizeRoute(t);return e?this.forms.filter(t=>this.normalizeRoute(t.route)===e):[...this.forms]}normalizeRoute(t){const e=String(t||"").trim();if(!e)return"";return e.split("?")[0].split("#")[0].trim()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiFormRegistryService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiFormRegistryService,providedIn:"root"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiFormRegistryService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}]});class AiFormAutoRegisterDirective{formDirective;registry;router;elementRef;aiFormAutoRegister=!0;aiFormLabel="";aiFormIgnore=!1;unregister;constructor(t,e,n,o){this.formDirective=t,this.registry=e,this.router=n,this.elementRef=o}ngOnInit(){this.register()}ngOnDestroy(){this.unregister&&this.unregister()}register(){if(!this.aiFormAutoRegister||this.aiFormIgnore)return;const t=this.elementRef?.nativeElement;if("ignore"===t?.getAttribute("data-ai-form")||"true"===t?.getAttribute("data-ai-ignore"))return;const e=this.formDirective?.form;if(!e)return;const n=this.router?.url||"";this.unregister=this.registry.registerForm({form:e,route:n,element:t,label:(this.aiFormLabel||"").trim()||void 0})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiFormAutoRegisterDirective,deps:[{token:i2.FormGroupDirective},{token:AiFormRegistryService},{token:i1$1.Router},{token:i0.ElementRef}],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:AiFormAutoRegisterDirective,isStandalone:!0,selector:"form[formGroup]",inputs:{aiFormAutoRegister:"aiFormAutoRegister",aiFormLabel:"aiFormLabel",aiFormIgnore:"aiFormIgnore"},ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiFormAutoRegisterDirective,decorators:[{type:Directive,args:[{selector:"form[formGroup]",standalone:!0}]}],ctorParameters:()=>[{type:i2.FormGroupDirective},{type:AiFormRegistryService},{type:i1$1.Router},{type:i0.ElementRef}],propDecorators:{aiFormAutoRegister:[{type:Input}],aiFormLabel:[{type:Input}],aiFormIgnore:[{type:Input}]}});class FormButtonComponent extends BaseComponent{_services;form;disabled=!1;type="submit";formButton;constructor(t){super(t),this._services=t}getTipErrors(){let t=[];if(this.form&&this.form.invalid&&"object"==typeof this.form.controls){Object.keys(this.form.controls).forEach(e=>{let n=this.form.controls[e];if(n.invalid&&(t.push(e.replace("_id","").replace("id_","").replace("_"," ").replace(/\b\S/g,function(t){return t.toUpperCase()})+" is invalid"),"object"==typeof n.value&&Array.isArray(n.value)&&n.controls))for(let e=0;e<n.controls.length;e++){let o=n.controls[e];if(o.controls){Object.keys(o.controls).forEach(n=>{o.controls[n].invalid&&t.push("["+e+"] -> "+n.replace("_id","").replace("id_","").replace("_"," ").replace(/\b\S/g,function(t){return t.toUpperCase()})+" is invalid")})}}})}return t}isSuperAdmin(){return!(!this._services._account.getUser()||!this._services._account.getUser().roles.super_admin)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FormButtonComponent,deps:[{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:FormButtonComponent,isStandalone:!1,selector:"form-button",inputs:{form:"form",disabled:"disabled",type:"type"},providers:[ProviderService],viewQueries:[{propertyName:"formButton",first:!0,predicate:["formButton"],descendants:!0}],usesInheritance:!0,ngImport:i0,template:'\n\t\t<div style="position: relative; text-align: left; width: 100%">\n\t\t <ng-template #tipContent>\n\t\t <span style="font-weight: bold">Errors:<br></span>\n\t\t <ul>\n\t\t @for (error of getTipErrors(); track error) {\n\t\t <li>{{error}}</li>\n\t\t }\n\t\t </ul>\n\t\t </ng-template>\n\t\t <div [ngbTooltip]="(getTipErrors().length ? tipContent : \'\')" placement="top-left" #t>\n\t\t <button [type]="type" [ngClass]="[\'btn\', form && form.valid ? \'btn-success\' : \'btn-danger\']" [disabled]="!form || !form.valid || disabled" style="width: 200px" [autofocus]="true" #formButton>Submit</button>\n\t\t </div>\n\t\t</div>\n\t\t',isInline:!0,dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:i1$2.NgbTooltip,selector:"[ngbTooltip]",inputs:["animation","autoClose","placement","popperOptions","triggers","positionTarget","container","disableTooltip","tooltipClass","tooltipContext","openDelay","closeDelay","ngbTooltip"],outputs:["shown","hidden"],exportAs:["ngbTooltip"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FormButtonComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"form-button",template:'\n\t\t<div style="position: relative; text-align: left; width: 100%">\n\t\t <ng-template #tipContent>\n\t\t <span style="font-weight: bold">Errors:<br></span>\n\t\t <ul>\n\t\t @for (error of getTipErrors(); track error) {\n\t\t <li>{{error}}</li>\n\t\t }\n\t\t </ul>\n\t\t </ng-template>\n\t\t <div [ngbTooltip]="(getTipErrors().length ? tipContent : \'\')" placement="top-left" #t>\n\t\t <button [type]="type" [ngClass]="[\'btn\', form && form.valid ? \'btn-success\' : \'btn-danger\']" [disabled]="!form || !form.valid || disabled" style="width: 200px" [autofocus]="true" #formButton>Submit</button>\n\t\t </div>\n\t\t</div>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:ProviderService}],propDecorators:{form:[{type:Input}],disabled:[{type:Input}],type:[{type:Input}],formButton:[{type:ViewChild,args:["formButton",{static:!1}]}]}});class DialogInputContent{_activeModal;_fb;title="";inputFields=[];formInput;states=["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"];constructor(t,e){this._activeModal=t,this._fb=e}ngOnInit(){this.formInput=this._fb.group({});for(let t=0;t<this.inputFields.length;t++){let e=this.inputFields[t].data;"datetime"===this.inputFields[t].type&&(e=this.normalizeDateTimeValue(this.inputFields[t].data)),null===this.inputFields[t].validators?this.formInput.addControl(this.inputFields[t].form,new UntypedFormControl({value:e,disabled:this.inputFields[t].disabled})):this.formInput.addControl(this.inputFields[t].form,new UntypedFormControl({value:e,disabled:this.inputFields[t].disabled},this.inputFields[t].validators))}}normalizeDateTimeValue(t){if(!t)return null;if(Array.isArray(t))return this.mergeDateTimeParts(t[0],t[1]);if(t instanceof Date)return this.mergeDateTimeParts(t,t);if(t.date||t.time||this.isDateStruct(t)||this.isTimeStruct(t)){const e=this.toDateStruct(t.date?t.date:t),n=this.toTimeStruct(t.time?t.time:t);return this.mergeDateTimeParts(e,n||null,t.mode)}return t}mergeDateTimeParts(t,e,n="datetime"){const o={mode:n},r=this.toDateStruct(t),i=this.toTimeStruct(e);return r&&(o.date=r),i&&(o.time=i),o}isDateStruct(t){return t&&void 0!==t.year&&void 0!==t.month&&void 0!==t.day}isTimeStruct(t){return t&&void 0!==t.hour&&void 0!==t.minute}toDateStruct(t){return t?t instanceof Date?{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}:this.isDateStruct(t)?{year:t.year,month:t.month,day:t.day}:t.date?this.toDateStruct(t.date):null:null}toTimeStruct(t){return t?t instanceof Date?{hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),ms:t.getMilliseconds()}:this.isTimeStruct(t)?{hour:t.hour,minute:t.minute,second:t.second||0,ms:t.ms||0}:t.time?this.toTimeStruct(t.time):null:null}validateInput(t,e){if(t.disabled)return"";let n=!0;for(let o=0;o<t.validators.length;o++)e.controls[t.form].hasError([t.validatorErrors[o]])&&(n=!1);return n&&null!==e.controls[t.form].value?"is-valid":!t.validators.length||!t.required&&n?"":"is-invalid"}getErrorMessages(t,e){let n=[];for(let o=0;o<t.validators.length;o++)e.controls[t.form].hasError([t.validatorErrors[o]])&&n.push(t.validatorMsg[o]);return n}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogInputContent,deps:[{token:i1$2.NgbActiveModal},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogInputContent,isStandalone:!1,selector:"resolveio-dialog.input",inputs:{title:"title",inputFields:"inputFields"},ngImport:i0,template:'\n\t\t<form [formGroup]="formInput" novalidate (ngSubmit)="_activeModal.close(this.formInput.controls)">\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-plus-circle" style="color: green; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()"></button>\n\t\t </div>\n\t\t <div class="modal-body">\n\t\t @for (inputField of inputFields; track inputField.label; let i = $index) {\n\t\t <div class="form-group">\n\t\t <label class="form-control-label">{{inputField.label}}</label>\n\t\t @if (formInput.controls[inputField.form].hasError(\'required\') && inputField.required) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t @if (!formInput.controls[inputField.form].hasError(\'required\') && formInput.controls[inputField.form].invalid) {\n\t\t <em>- Invalid</em>\n\t\t }\n\t\t @if (inputField.type !== \'date\' && inputField.type !== \'datetime\' && inputField.type !== \'state\' && inputField.type !== \'textarea\' && inputField.type !== \'number\' && inputField.type !== \'select\' && inputField.type !== \'boolean\') {\n\t\t <input [autofocus]="i === 0 ? true : false" [focus]="i === 0 ? true : false" [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]" [type]="(inputField.type ? inputField.type : \'text\')">\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'select\') {\n\t\t <rio-select [formControlName]="inputField.form" [ngClass]="[validateInput(inputField, formInput)]" [placeholder]="inputField.placeholder" [options]="inputField.options" optionValueKey="value" optionLabelKey="text"></rio-select>\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'state\') {\n\t\t <select [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]">\n\t\t <option value="">Select State</option>\n\t\t @for (state of states; track state) {\n\t\t <option [value]="state">{{state}}</option>\n\t\t }\n\t\t </select>\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'textarea\') {\n\t\t <textarea rows="4" [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]"></textarea>\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'number\') {\n\t\t <input [formControlName]="inputField.form" type="number" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]">\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'date\') {\n\t\t <div class="input-group">\n\t\t <rio-date-picker [formControlName]="inputField.form" placeholder="yyyy-mm-dd" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]" selectionMode="date" [enableTime]="false"></rio-date-picker>\n\t\t </div>\n\t\t }\n\t\t @if (inputField.type === \'datetime\') {\n\t\t <div class="input-group">\n\t\t <rio-date-picker [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]" selectionMode="datetime"></rio-date-picker>\n\t\t </div>\n\t\t }\n\t\t @if (inputField.type === \'boolean\') {\n\t\t <div (click)="formInput.controls[inputField.form].setValue(!formInput.controls[inputField.form].value)">\n\t\t @if (formInput.controls[inputField.form].value) {\n\t\t <i class="fa fa-check" style="color: green; font-size: 24px;" aria-hidden="true"></i>\n\t\t }\n\t\t @if (!formInput.controls[inputField.form].value) {\n\t\t <i class="fa fa-times" style="color: red; font-size: 24px;" aria-hidden="true"></i>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t <div class="modal-footer">\n\t\t <form-button [form]="formInput"></form-button>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t </div>\n\t\t</form>\n\t\t',isInline:!0,dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.NgSelectOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:i2.ɵNgSelectMultipleOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:i2.SelectControlValueAccessor,selector:"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]",inputs:["compareWith"]},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"component",type:FormButtonComponent,selector:"form-button",inputs:["form","disabled","type"]},{kind:"component",type:i5.RioSelectComponent,selector:"rio-select",inputs:["placeholder","multiple","panelMaxHeight","panelMaxViewportRatio","optionHeight","virtualBuffer","overlayZIndex","autoSizePanel","panelPosition","autoCenterPanel","viewportMargin","panelWidth","panelFullscreenWidth","clearable","templateLabelFromView","searchable","searchMatchMode","defaultSearch","textWrap","compareWith","options","optionLabelKey","optionLabelFn","optionValueKey","optionDisabledKey","optionIdKey","optionGroupKey","disabled","emitOptionObject","debugLog","stickyKey","stickyAutoSave"],outputs:["change"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"component",type:i7$1.RioDatePickerComponent,selector:"rio-date-picker",inputs:["enableDate","enableTime","selectionMode","firstDayOfWeek","toggleWeekFirstDay","timezone","minDate","maxDate","disabled","label","allowSeconds","minuteStep","panelWidth"],outputs:["change"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogInputContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.input",template:'\n\t\t<form [formGroup]="formInput" novalidate (ngSubmit)="_activeModal.close(this.formInput.controls)">\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-plus-circle" style="color: green; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()"></button>\n\t\t </div>\n\t\t <div class="modal-body">\n\t\t @for (inputField of inputFields; track inputField.label; let i = $index) {\n\t\t <div class="form-group">\n\t\t <label class="form-control-label">{{inputField.label}}</label>\n\t\t @if (formInput.controls[inputField.form].hasError(\'required\') && inputField.required) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t @if (!formInput.controls[inputField.form].hasError(\'required\') && formInput.controls[inputField.form].invalid) {\n\t\t <em>- Invalid</em>\n\t\t }\n\t\t @if (inputField.type !== \'date\' && inputField.type !== \'datetime\' && inputField.type !== \'state\' && inputField.type !== \'textarea\' && inputField.type !== \'number\' && inputField.type !== \'select\' && inputField.type !== \'boolean\') {\n\t\t <input [autofocus]="i === 0 ? true : false" [focus]="i === 0 ? true : false" [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]" [type]="(inputField.type ? inputField.type : \'text\')">\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'select\') {\n\t\t <rio-select [formControlName]="inputField.form" [ngClass]="[validateInput(inputField, formInput)]" [placeholder]="inputField.placeholder" [options]="inputField.options" optionValueKey="value" optionLabelKey="text"></rio-select>\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'state\') {\n\t\t <select [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]">\n\t\t <option value="">Select State</option>\n\t\t @for (state of states; track state) {\n\t\t <option [value]="state">{{state}}</option>\n\t\t }\n\t\t </select>\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'textarea\') {\n\t\t <textarea rows="4" [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]"></textarea>\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'number\') {\n\t\t <input [formControlName]="inputField.form" type="number" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]">\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'date\') {\n\t\t <div class="input-group">\n\t\t <rio-date-picker [formControlName]="inputField.form" placeholder="yyyy-mm-dd" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]" selectionMode="date" [enableTime]="false"></rio-date-picker>\n\t\t </div>\n\t\t }\n\t\t @if (inputField.type === \'datetime\') {\n\t\t <div class="input-group">\n\t\t <rio-date-picker [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]" selectionMode="datetime"></rio-date-picker>\n\t\t </div>\n\t\t }\n\t\t @if (inputField.type === \'boolean\') {\n\t\t <div (click)="formInput.controls[inputField.form].setValue(!formInput.controls[inputField.form].value)">\n\t\t @if (formInput.controls[inputField.form].value) {\n\t\t <i class="fa fa-check" style="color: green; font-size: 24px;" aria-hidden="true"></i>\n\t\t }\n\t\t @if (!formInput.controls[inputField.form].value) {\n\t\t <i class="fa fa-times" style="color: red; font-size: 24px;" aria-hidden="true"></i>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t <div class="modal-footer">\n\t\t <form-button [form]="formInput"></form-button>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t </div>\n\t\t</form>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:i2.FormBuilder}],propDecorators:{title:[{type:Input}],inputFields:[{type:Input}]}});class DialogErrorContent{activeModal;title;body;handleKeyboardEvent(t){13===t.keyCode&&this.activeModal.close()}constructor(t){this.activeModal=t}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogErrorContent,deps:[{token:i1$2.NgbActiveModal}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:DialogErrorContent,isStandalone:!1,selector:"resolveio-dialog.error",inputs:{title:"title",body:"body"},host:{listeners:{"document:keypress":"handleKeyboardEvent($event)"}},ngImport:i0,template:'\n\t\t<div class="modal-header">\n\t\t\t<h4 class="modal-title"><i class="fa fa-times-circle" style="color: red; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t\t<button type="button" class="btn-close ms-auto" aria-label="Close" (click)="activeModal.dismiss(\'Cross click\')"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t\t<p>{{ body }}</p>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t\t<button type="button" class="btn btn-secondary" (click)="activeModal.close(\'Close click\')">Ok</button>\n\t\t</div>\n \t',isInline:!0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogErrorContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.error",template:'\n\t\t<div class="modal-header">\n\t\t\t<h4 class="modal-title"><i class="fa fa-times-circle" style="color: red; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t\t<button type="button" class="btn-close ms-auto" aria-label="Close" (click)="activeModal.dismiss(\'Cross click\')"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t\t<p>{{ body }}</p>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t\t<button type="button" class="btn btn-secondary" (click)="activeModal.close(\'Close click\')">Ok</button>\n\t\t</div>\n \t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal}],propDecorators:{title:[{type:Input}],body:[{type:Input}],handleKeyboardEvent:[{type:HostListener,args:["document:keypress",["$event"]]}]}});class DialogConfirmContent{activeModal;title;body;html;handleKeyboardEvent(t){13===t.keyCode&&this.activeModal.close()}constructor(t){this.activeModal=t}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogConfirmContent,deps:[{token:i1$2.NgbActiveModal}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:DialogConfirmContent,isStandalone:!1,selector:"resolveio-dialog.confirm",inputs:{title:"title",body:"body",html:"html"},host:{listeners:{"document:keypress":"handleKeyboardEvent($event)"}},ngImport:i0,template:'\n\t\t<div class="modal-header">\n\t\t\t<h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t\t<button type="button" class="btn-close ms-auto" aria-label="Close" (click)="activeModal.dismiss(\'Cross click\')"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t\t<p>{{ body }}</p>\n\t\t\t<div [innerHTML]="html"></div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t\t<button type="button" class="btn btn-success" (click)="activeModal.close()">Yes</button>\n\t\t\t<button type="button" class="btn btn-danger" (click)="activeModal.dismiss()">No</button>\n\t\t</div>\n \t',isInline:!0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogConfirmContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.confirm",template:'\n\t\t<div class="modal-header">\n\t\t\t<h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t\t<button type="button" class="btn-close ms-auto" aria-label="Close" (click)="activeModal.dismiss(\'Cross click\')"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t\t<p>{{ body }}</p>\n\t\t\t<div [innerHTML]="html"></div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t\t<button type="button" class="btn btn-success" (click)="activeModal.close()">Yes</button>\n\t\t\t<button type="button" class="btn btn-danger" (click)="activeModal.dismiss()">No</button>\n\t\t</div>\n \t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal}],propDecorators:{title:[{type:Input}],body:[{type:Input}],html:[{type:Input}],handleKeyboardEvent:[{type:HostListener,args:["document:keypress",["$event"]]}]}});class DialogSelectDateTimeContent{_activeModal;_fb;title="";date;showTime=!0;close;allElements;form;constructor(t,e){this._activeModal=t,this._fb=e}ngOnInit(){this.date||(this.date=new Date),this.form=this._fb.group({time:[{hour:this.date.getHours(),minute:this.date.getMinutes(),second:0},[Validators.required]],date:[{year:this.date.getFullYear(),month:this.date.getMonth()+1,day:this.date.getDate()},[Validators.required]]})}ngAfterViewInit(){setTimeout(()=>{let t=this.recursiveFindFirstElement(this.allElements.nativeElement);t?t.focus():(this.close.nativeElement.focus(),this.close.nativeElement.blur())},100)}recursiveFindFirstElement(t){let e=null,n=t.children;for(let t=0;t<Object.keys(n).length;t++){let o=n[Object.keys(n)[t]];if(o.children&&o.children.length)e=this.recursiveFindFirstElement(o);else{if("BUTTON"===o.tagName&&o.classList.contains("close"))return null;if(!("BUTTON"!==o.tagName&&"INPUT"!==o.tagName&&"SELECT"!==o.tagName&&"TEXTAREA"!==o.tagName||o.hidden||o.disabled))return o}if(e)break}return e}submitForm(){this._activeModal.close(new Date(this.form.value.date.year,parseInt(this.form.value.date.month)-1,this.form.value.date.day,this.form.value.time.hour,this.form.value.time.minute,this.form.value.time.second,0))}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectDateTimeContent,deps:[{token:i1$2.NgbActiveModal},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogSelectDateTimeContent,isStandalone:!1,selector:"resolveio-dialog.select-datetime",inputs:{title:"title",date:"date",showTime:"showTime"},viewQueries:[{propertyName:"close",first:!0,predicate:["close"],descendants:!0},{propertyName:"allElements",first:!0,predicate:["allElements"],descendants:!0}],ngImport:i0,template:'\n\t \t<style>\n\t \t table {\n\t \t width: 100%;\n\t \t table-layout: fixed;\n\t \t}\n\t \t\n\t \ttr {\n\t \twidth: 100%;\n\t \t}\n\t \t\n\t \ttd {\n\t \twidth: 100%;\n\t \ttext-align: center;\n\t \t}\n\t \t</style>\n\t \t<div #allElements>\n\t \t <form [formGroup]="form" novalidate (ngSubmit)="submitForm()">\n\t \t <div class="modal-header">\n\t \t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t \t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t \t </div>\n\t \t <div class="modal-body">\n\t \t <table>\n\t \t <tr>\n\t \t <td style="border: none;">\n\t \t <div class="input-group">\n\t \t <rio-date-picker class="form-control" placeholder="yyyy-mm-dd" name="dp" formControlName="date" selectionMode="date" [enableTime]="false"></rio-date-picker>\n\t \t </div>\n\t \t </td>\n\t \t @if (showTime) {\n\t \t <td style="border: none;">\n\t \t <div class="offset-3">\n\t \t <rio-date-picker formControlName="time" selectionMode="time" [enableDate]="false"></rio-date-picker>\n\t \t </div>\n\t \t </td>\n\t \t }\n\t \t </tr>\n\t \t </table>\n\t \t </div>\n\t \t <div class="modal-footer">\n\t \t <form-button [form]="form"></form-button>\n\t \t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t \t </div>\n\t \t </form>\n\t \t</div>\n\t \t',isInline:!0,styles:["table{width:100%;table-layout:fixed}tr{width:100%}td{width:100%;text-align:center}\n"],dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"component",type:FormButtonComponent,selector:"form-button",inputs:["form","disabled","type"]},{kind:"component",type:i7$1.RioDatePickerComponent,selector:"rio-date-picker",inputs:["enableDate","enableTime","selectionMode","firstDayOfWeek","toggleWeekFirstDay","timezone","minDate","maxDate","disabled","label","allowSeconds","minuteStep","panelWidth"],outputs:["change"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectDateTimeContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.select-datetime",template:'\n\t \t<style>\n\t \t table {\n\t \t width: 100%;\n\t \t table-layout: fixed;\n\t \t}\n\t \t\n\t \ttr {\n\t \twidth: 100%;\n\t \t}\n\t \t\n\t \ttd {\n\t \twidth: 100%;\n\t \ttext-align: center;\n\t \t}\n\t \t</style>\n\t \t<div #allElements>\n\t \t <form [formGroup]="form" novalidate (ngSubmit)="submitForm()">\n\t \t <div class="modal-header">\n\t \t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t \t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t \t </div>\n\t \t <div class="modal-body">\n\t \t <table>\n\t \t <tr>\n\t \t <td style="border: none;">\n\t \t <div class="input-group">\n\t \t <rio-date-picker class="form-control" placeholder="yyyy-mm-dd" name="dp" formControlName="date" selectionMode="date" [enableTime]="false"></rio-date-picker>\n\t \t </div>\n\t \t </td>\n\t \t @if (showTime) {\n\t \t <td style="border: none;">\n\t \t <div class="offset-3">\n\t \t <rio-date-picker formControlName="time" selectionMode="time" [enableDate]="false"></rio-date-picker>\n\t \t </div>\n\t \t </td>\n\t \t }\n\t \t </tr>\n\t \t </table>\n\t \t </div>\n\t \t <div class="modal-footer">\n\t \t <form-button [form]="form"></form-button>\n\t \t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t \t </div>\n\t \t </form>\n\t \t</div>\n\t \t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:i2.FormBuilder}],propDecorators:{title:[{type:Input}],date:[{type:Input}],showTime:[{type:Input}],close:[{type:ViewChild,args:["close",{static:!1}]}],allElements:[{type:ViewChild,args:["allElements",{static:!1}]}]}});class DialogSelectDataLabelsContent{_activeModal;_fb;title="";subtitle="";data;showArraySubData;form;dialogData=[];constructor(t,e){this._activeModal=t,this._fb=e}ngOnInit(){this.getKeys()}getKeys(){let t=Object.keys(this.data),e="";t.filter(t=>"_id"!==t&&!t.startsWith("id_")&&"__v"!==t&&"createdAt"!==t&&"updatedAt"!==t).forEach(t=>{if(e=typeof this.data[t],"object"===e)if(Array.isArray(this.data[t])){if(e="array",this.dialogData.push({label:t.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),data:t,selected:!0,type:e,subLabel:null,subData:null,subtype:null}),!0===this.showArraySubData){Object.keys(this.data[t][0]).filter(t=>"_id"!==t&&!t.startsWith("id_")).forEach(n=>{this.dialogData.push({label:t.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),subLabel:n.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),data:t,type:e,subData:n,selected:!0,subtype:typeof n})})}}else{let n=Object.keys(this.data[t]);n.length?n.filter(t=>"_id"!==t&&!t.startsWith("id_")).forEach(n=>{this.dialogData.push({label:t.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),subLabel:n.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),data:t,subData:n,subtype:null,selected:!0,type:e})}):this.dialogData.push({label:t.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),data:t,selected:!0,type:e,subData:null,subLabel:null,subtype:null})}else this.dialogData.push({label:t.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),data:t,selected:!0,type:e,subData:null,subLabel:null,subtype:null})})}changeSelected(t){t.selected=!t.selected,"array"===t.type&&null===t.subtype&&this.dialogData.filter(e=>e.label===t.label).forEach(e=>{e.selected=t.selected})}submit(){return this.dialogData}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectDataLabelsContent,deps:[{token:i1$2.NgbActiveModal},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogSelectDataLabelsContent,isStandalone:!1,selector:"resolveio-dialog.select-data-labels",inputs:{title:"title",subtitle:"subtitle",data:"data",showArraySubData:"showArraySubData"},ngImport:i0,template:'\n\t\t<div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.75em" aria-hidden="true"></i> {{ title }} - {{ subtitle }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t <div class="col-lg-12">\n\t\t <div class="row">\n\t\t <div class="col-lg-12">\n\t\t @for (label of dialogData; track label.label) {\n\t\t <div class="row">\n\t\t @if (label.subtype === null && label.type !== \'object\') {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.label }}\n\t\t </div>\n\t\t }\n\t\t @if (label.subtype === null && label.type === \'object\' && label.subLabel !== null) {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.subLabel }}\n\t\t </div>\n\t\t }\n\t\t @if (label.subtype === null && label.type === \'object\' && label.subLabel === null) {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.label }}\n\t\t </div>\n\t\t }\n\t\t @if (label.subtype !== null) {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.subLabel }}\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t <button type="button" class="btn btn-success" (click)="_activeModal.close(dialogData)">Submit</button>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t</div>\n\t\t',isInline:!0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectDataLabelsContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.select-data-labels",template:'\n\t\t<div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.75em" aria-hidden="true"></i> {{ title }} - {{ subtitle }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t <div class="col-lg-12">\n\t\t <div class="row">\n\t\t <div class="col-lg-12">\n\t\t @for (label of dialogData; track label.label) {\n\t\t <div class="row">\n\t\t @if (label.subtype === null && label.type !== \'object\') {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.label }}\n\t\t </div>\n\t\t }\n\t\t @if (label.subtype === null && label.type === \'object\' && label.subLabel !== null) {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.subLabel }}\n\t\t </div>\n\t\t }\n\t\t @if (label.subtype === null && label.type === \'object\' && label.subLabel === null) {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.label }}\n\t\t </div>\n\t\t }\n\t\t @if (label.subtype !== null) {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.subLabel }}\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t <button type="button" class="btn btn-success" (click)="_activeModal.close(dialogData)">Submit</button>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t</div>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:i2.FormBuilder}],propDecorators:{title:[{type:Input}],subtitle:[{type:Input}],data:[{type:Input}],showArraySubData:[{type:Input}]}});class DialogLoginContent{_activeModal;_fb;msAllowed=!1;showLoginText=!0;publicProgram=!1;usernameInput;form;publicForm;publicRegisterForm;publicMode="login";loginTab="customer";focusTimeout=null;constructor(t,e){this._activeModal=t,this._fb=e}ngOnInit(){this.form=this._fb.group({username:["",[Validators.required]],password:["",[Validators.required]],forgotPassword:[!1]}),this.publicForm=this._fb.group({email:["",[Validators.required,Validators.email]],password:["",[Validators.required]]}),this.publicRegisterForm=this._fb.group({companyName:["",[Validators.required]],contactName:[""],email:["",[Validators.required,Validators.email]],password:["",[Validators.required]],confirmPassword:["",[Validators.required]],phone:[""]})}ngAfterViewInit(){this.queueUsernameFocus()}ngOnDestroy(){this.focusTimeout&&(clearTimeout(this.focusTimeout),this.focusTimeout=null)}queueUsernameFocus(){this.focusTimeout=setTimeout(()=>{this.focusTimeout=null,this.usernameInput?.nativeElement?.focus()})}setPublicMode(t){this.publicMode=t}setLoginTab(t){this.loginTab=t,"employee"===t&&this.queueUsernameFocus()}submitPublicLogin(){this.publicForm.invalid?this.publicForm.markAllAsTouched():this._activeModal.close({form:this.publicForm,type:"PUBLIC_LOGIN"})}submitPublicRegister(){this.publicRegisterForm.invalid?this.publicRegisterForm.markAllAsTouched():this.publicRegisterForm.value.password===this.publicRegisterForm.value.confirmPassword?this._activeModal.close({form:this.publicRegisterForm,type:"PUBLIC_REGISTER"}):this.publicRegisterForm.controls.confirmPassword.setErrors({mismatch:!0})}toggleForgotPassword(){this.form.controls.forgotPassword.setValue(!this.form.controls.forgotPassword.value),this.form.controls.forgotPassword.value?(this.form.controls.password.setValue(""),this.form.controls.password.clearValidators(),this.form.controls.password.disable()):(this.form.controls.password.setValidators([Validators.required]),this.form.controls.password.enable()),this.form.controls.password.updateValueAndValidity()}close(t){this._activeModal.close({form:this.form,type:t})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogLoginContent,deps:[{token:i1$2.NgbActiveModal},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogLoginContent,isStandalone:!1,selector:"resolveio-dialog.login",inputs:{msAllowed:"msAllowed",showLoginText:"showLoginText",publicProgram:"publicProgram"},viewQueries:[{propertyName:"usernameInput",first:!0,predicate:["usernameInput"],descendants:!0}],ngImport:i0,template:'\n\t\t<style>\n\t\t .login-modal {\n\t\t font-family: "Sora", "Space Grotesk", "Segoe UI", Arial, sans-serif;\n\t\t color: #0f172a;\n\t\t }\n\n\t\t .login-modal .modal-body {\n\t\t background: #ffffff;\n\t\t padding: 0;\n\t\t }\n\n\t\t .login-body {\n\t\t position: relative;\n\t\t display: flex;\n\t\t justify-content: center;\n\t\t width: 100%;\n\t\t }\n\n\t\t .login-body .row {\n\t\t --bs-gutter-x: 0;\n\t\t --bs-gutter-y: 0;\n\t\t margin: 0;\n\t\t width: 100%;\n\t\t }\n\n\t\t .login-body [class^="col-"],\n\t\t .login-body [class*=" col-"] {\n\t\t padding: 0;\n\t\t }\n\n\t\t .login-card {\n\t\t margin-bottom: 0;\n\t\t padding: 18px;\n\t\t border-radius: 16px;\n\t\t background: #ffffff;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);\n\t\t width: 100%;\n\t\t position: relative;\n\t\t }\n\n\t\t .login-close {\n\t\t position: absolute;\n\t\t top: 12px;\n\t\t right: 12px;\n\t\t width: 44px;\n\t\t height: 44px;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t border-radius: 12px;\n\t\t background: rgba(15, 23, 42, 0.04);\n\t\t color: #0f172a;\n\t\t font-size: 22px;\n\t\t font-weight: 600;\n\t\t line-height: 1;\n\t\t display: flex;\n\t\t align-items: center;\n\t\t justify-content: center;\n\t\t box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);\n\t\t transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;\n\t\t }\n\n\t\t .login-close:hover {\n\t\t background: #0f172a;\n\t\t color: #ffffff;\n\t\t transform: translateY(-1px) scale(1.02);\n\t\t box-shadow: 0 10px 22px rgba(15, 23, 42, 0.2);\n\t\t }\n\n\t\t .login-close:active {\n\t\t transform: translateY(0) scale(0.98);\n\t\t box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);\n\t\t }\n\n\t\t .login-close:focus-visible {\n\t\t outline: none;\n\t\t box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), 0 6px 18px rgba(15, 23, 42, 0.12);\n\t\t }\n\n\t\t .login-header {\n\t\t font-size: 22px;\n\t\t font-weight: 600;\n\t\t color: #0f172a;\n\t\t margin-bottom: 12px;\n\t\t text-align: center;\n\t\t background: linear-gradient(120deg, #0f172a, #2563eb);\n\t\t -webkit-background-clip: text;\n\t\t background-clip: text;\n\t\t -webkit-text-fill-color: transparent;\n\t\t }\n\n\t\t .login-toggle,\n\t\t .public-toggle {\n\t\t display: inline-flex;\n\t\t gap: 6px;\n\t\t align-items: center;\n\t\t justify-content: center;\n\t\t padding: 6px;\n\t\t border-radius: 999px;\n\t\t background: #f1f5f9;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t margin: 0 auto 16px;\n\t\t }\n\n\t\t .login-tab-row {\n\t\t display: flex;\n\t\t align-items: center;\n\t\t justify-content: space-between;\n\t\t gap: 12px;\n\t\t flex-wrap: wrap;\n\t\t margin-bottom: 12px;\n\t\t }\n\n\t\t .login-tab-row .login-header {\n\t\t margin-bottom: 0;\n\t\t text-align: center;\n\t\t flex: 1;\n\t\t }\n\n\t\t .login-subtoggle {\n\t\t display: flex;\n\t\t justify-content: flex-start;\n\t\t }\n\n\t\t .login-subtoggle .public-toggle {\n\t\t margin: 0 0 16px;\n\t\t }\n\n\t\t .login-toggle .btn,\n\t\t .public-toggle .btn {\n\t\t border-radius: 999px;\n\t\t font-weight: 600;\n\t\t padding: 6px 16px;\n\t\t border: 1px solid transparent;\n\t\t }\n\n\t\t .login-toggle .btn-outline-secondary,\n\t\t .public-toggle .btn-outline-secondary {\n\t\t color: #475569;\n\t\t border-color: rgba(71, 85, 105, 0.35);\n\t\t background: transparent;\n\t\t }\n\n\t\t .login-toggle .btn-primary,\n\t\t .public-toggle .btn-primary {\n\t\t background: linear-gradient(135deg, #2563eb, #38bdf8);\n\t\t border-color: transparent;\n\t\t box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);\n\t\t }\n\n\t\t .loginform {\n\t\t margin-top: 10px;\n\t\t }\n\n\t\t .loginform label,\n\t\t .third-party-login-section label {\n\t\t font-size: 13px;\n\t\t font-weight: 600;\n\t\t letter-spacing: 0.4px;\n\t\t text-transform: uppercase;\n\t\t color: #475569;\n\t\t }\n\n\t\t .login-modal .form-control {\n\t\t background: #ffffff;\n\t\t border: 1px solid rgba(71, 85, 105, 0.35);\n\t\t color: #0f172a;\n\t\t height: 48px;\n\t\t border-radius: 12px;\n\t\t padding: 0 14px;\n\t\t }\n\n\t\t .login-modal .form-control::placeholder {\n\t\t color: rgba(15, 23, 42, 0.5);\n\t\t }\n\n\t\t .login-modal .form-control:focus {\n\t\t border-color: #2563eb;\n\t\t box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);\n\t\t }\n\n\t\t .login-modal .form-control.is-invalid {\n\t\t border-color: rgba(239, 68, 68, 0.8);\n\t\t box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);\n\t\t }\n\n\t\t .employee-login-btn,\n\t\t .third-party-login-btn {\n\t\t width: 100%;\n\t\t border-radius: 12px;\n\t\t height: 46px;\n\t\t border: none;\n\t\t font-weight: 600;\n\t\t letter-spacing: 0.3px;\n\t\t }\n\n\t\t .employee-login-btn {\n\t\t background: linear-gradient(135deg, #2563eb, #22d3ee);\n\t\t color: #ffffff;\n\t\t }\n\n\t\t .third-party-login-btn {\n\t\t background: linear-gradient(135deg, #22c55e, #16a34a);\n\t\t color: #ffffff;\n\t\t margin-top: 12px;\n\t\t }\n\n\t\t .disabled-btn {\n\t\t background: rgba(15, 23, 42, 0.05);\n\t\t color: rgba(15, 23, 42, 0.45);\n\t\t border: 1px dashed rgba(15, 23, 42, 0.2);\n\t\t cursor: not-allowed;\n\t\t }\n\n\t\t .third-party-login-section {\n\t\t background: #f8fafc;\n\t\t border-radius: 14px;\n\t\t padding: 16px;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t }\n\n\t\t .employee-login-section,\n\t\t .third-party-login-section {\n\t\t text-align: center;\n\t\t }\n\n\t\t .public-section {\n\t\t padding: 8px;\n\t\t }\n\n\t\t .contactimg {\n\t\t position: relative;\n\t\t border-radius: 16px;\n\t\t overflow: hidden;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t }\n\n\t\t .contactimg::after {\n\t\t content: "";\n\t\t position: absolute;\n\t\t inset: 0;\n\t\t background: linear-gradient(160deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.35));\n\t\t }\n\n\t\t .contactimg > img {\n\t\t width: 100%;\n\t\t display: block;\n\t\t filter: saturate(1.1);\n\t\t }\n\n\t\t .textbox {\n\t\t position: absolute;\n\t\t inset: 0;\n\t\t display: flex;\n\t\t align-items: center;\n\t\t justify-content: center;\n\t\t text-align: center;\n\t\t color: #ffffff;\n\t\t padding: 30px;\n\t\t z-index: 1;\n\t\t }\n\n\t\t .login-logo {\n\t\t margin-bottom: 20px;\n\t\t }\n\n\t\t .form-check a {\n\t\t color: #2563eb;\n\t\t text-decoration: none;\n\t\t }\n\n\t\t .form-check a:hover {\n\t\t color: #1d4ed8;\n\t\t text-decoration: underline;\n\t\t }\n\n\t\t .login-modal .btn-secondary {\n\t\t background: transparent;\n\t\t border: 1px solid rgba(71, 85, 105, 0.35);\n\t\t color: #475569;\n\t\t border-radius: 10px;\n\t\t }\n\t\t</style>\n\t\t<form [formGroup]="form" novalidate class="login-modal">\n\t\t @if (form) {\n\t\t <div class="modal-body">\n\t\t @if (publicProgram) {\n\t\t <div class="login-body">\n\t\t <div class="row g-4">\n\t\t <div class="col-12">\n\t\t <div class="login-card">\n\t\t <button type="button" class="login-close" aria-label="Close" (click)="_activeModal.dismiss()">×</button>\n\t\t <div class="login-tab-row">\n\t\t <div class="login-toggle">\n\t\t <button type="button" class="btn btn-sm" [ngClass]="loginTab === \'customer\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setLoginTab(\'customer\')">Customer</button>\n\t\t <button type="button" class="btn btn-sm" [ngClass]="loginTab === \'employee\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setLoginTab(\'employee\')">Employee</button>\n\t\t </div>\n\t\t <h3 class="login-header">{{ loginTab === \'customer\' ? \'Customer Access\' : \'Employee Sign In\' }}</h3>\n\t\t </div>\n\t\t @if (loginTab === \'customer\') {\n\t\t <div class="login-subtoggle">\n\t\t <div class="public-toggle">\n\t\t <button type="button" class="btn btn-sm" [ngClass]="publicMode === \'login\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setPublicMode(\'login\')">Sign in</button>\n\t\t <button type="button" class="btn btn-sm" [ngClass]="publicMode === \'register\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setPublicMode(\'register\')">Create account</button>\n\t\t </div>\n\t\t </div>\n\t\t @if (publicMode === \'login\') {\n\t\t <div class="third-party-login-section public-section" [formGroup]="publicForm">\n\t\t <div class="form-group">\n\t\t <label>Email</label>\n\t\t @if (publicForm.controls.email.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="email" [ngClass]="[\'form-control\', publicForm.controls.email.valid ? \'is-valid\' : \'is-invalid\']" formControlName="email" placeholder="you@company.com" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (publicForm.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', publicForm.controls.password.valid ? \'is-valid\' : \'is-invalid\']" formControlName="password" placeholder="Your password" autocomplete="current-password">\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="submitPublicLogin()">Sign in</button>\n\t\t <button type="button" class="btn third-party-login-btn disabled-btn" disabled>Google sign-in (coming soon)</button>\n\t\t </div>\n\t\t }\n\t\t @if (publicMode === \'register\') {\n\t\t <div class="third-party-login-section public-section" [formGroup]="publicRegisterForm">\n\t\t <div class="form-group">\n\t\t <label>Company name</label>\n\t\t @if (publicRegisterForm.controls.companyName.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" [ngClass]="[\'form-control\', publicRegisterForm.controls.companyName.valid ? \'is-valid\' : \'is-invalid\']" formControlName="companyName" placeholder="Your company name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Contact name</label>\n\t\t <input type="text" class="form-control" formControlName="contactName" placeholder="Your name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Email</label>\n\t\t @if (publicRegisterForm.controls.email.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="email" [ngClass]="[\'form-control\', publicRegisterForm.controls.email.valid ? \'is-valid\' : \'is-invalid\']" formControlName="email" placeholder="you@company.com" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (publicRegisterForm.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', publicRegisterForm.controls.password.valid ? \'is-valid\' : \'is-invalid\']" formControlName="password" placeholder="Create a password" autocomplete="new-password">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Confirm password</label>\n\t\t @if (publicRegisterForm.controls.confirmPassword.hasError(\'mismatch\')) {\n\t\t <em>- Passwords must match</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', publicRegisterForm.controls.confirmPassword.valid ? \'is-valid\' : \'is-invalid\']" formControlName="confirmPassword" placeholder="Confirm password" autocomplete="new-password">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Phone (optional)</label>\n\t\t <input type="text" class="form-control" formControlName="phone" placeholder="Phone number">\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="submitPublicRegister()">Create account</button>\n\t\t </div>\n\t\t }\n\t\t }\n\t\t @if (loginTab === \'employee\') {\n\t\t @if (msAllowed) {\n\t\t <div class="employee-login-section">\n\t\t <button type="submit" class="btn employee-login-btn" (click)="close(\'MS\')">Employee Login</button>\n\t\t </div>\n\t\t }\n\t\t @if (!msAllowed) {\n\t\t <div class="third-party-login-section">\n\t\t <div class="form-group">\n\t\t <label>Username/Email</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input #usernameInput type="email" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" aria-describedby="emailHelp" placeholder="Your Username/Email" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (form.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', form.controls.password.enabled ? (form.controls.password.valid ? \'is-valid\' : \'is-invalid\') : \'\']" formControlName="password" placeholder="Your Password" autocomplete="current-password">\n\t\t </div>\n\t\t <div class="form-check text-right">\n\t\t <label class="form-check-label"><a href="javascript:void(0)" (click)="toggleForgotPassword()"> {{!form.controls.forgotPassword.value ? \'Forgot Password?\' : \'Enter Password\'}} </a></label>\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="close(\'ResolveIO\')">{{!form.controls.forgotPassword.value ? \'Login\' : \'Submit\'}}</button>\n\t\t </div>\n\t\t }\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t @else {\n\t\t <div class="login-body">\n\t\t <div class="row justify-content-md-center">\n\t\t <div class="col-lg-12">\n\t\t <div class="row">\n\t\t <div class="col-lg-6">\n\t\t <div class="contactimg">\n\t\t <img src="/assets/images/loginsignup/formimg.jpg" alt="images" class="img-fluid">\n\t\t @if (showLoginText) {\n\t\t <div class="textbox">\n\t\t <div class="login-logo"><img src="/assets/images/loginsignup/login-logo.png" alt="images"></div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t <div class="col-lg-6">\n\t\t <div class="log-box">\n\t\t <div class="loginform" style="margin: 0px;">\n\t\t @if (!msAllowed) {\n\t\t <div class="login-card">\n\t\t <button type="button" class="login-close" aria-label="Close" (click)="_activeModal.dismiss()">×</button>\n\t\t <h3 class="login-header">Employee/Customer Login</h3>\n\t\t <div class="third-party-login-section">\n\t\t <div class="form-group">\n\t\t <label>Username/Email</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input #usernameInput type="email" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" aria-describedby="emailHelp" placeholder="Your Username/Email" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (form.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', form.controls.password.enabled ? (form.controls.password.valid ? \'is-valid\' : \'is-invalid\') : \'\']" formControlName="password" placeholder="Your Password" autocomplete="current-password">\n\t\t </div>\n\t\t <div class="form-check text-right">\n\t\t <label class="form-check-label"><a href="javascript:void(0)" (click)="toggleForgotPassword()"> {{!form.controls.forgotPassword.value ? \'Forgot Password?\' : \'Enter Password\'}} </a></label>\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="close(\'ResolveIO\')">{{!form.controls.forgotPassword.value ? \'Login\' : \'Submit\'}}</button>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t @if (msAllowed) {\n\t\t <div class="login-card">\n\t\t <button type="button" class="login-close" aria-label="Close" (click)="_activeModal.dismiss()">×</button>\n\t\t <h3 class="login-header">Employee Login</h3>\n\t\t <div class="employee-login-section">\n\t\t <button type="submit" class="btn employee-login-btn" (click)="close(\'MS\')">Employee Login</button>\n\t\t </div>\n\t\t </div>\n\t\t <div class="login-card">\n\t\t <h3 class="login-header">Third Party Login</h3>\n\t\t <div class="third-party-login-section">\n\t\t <div class="form-group">\n\t\t <label>Username/Email</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input #usernameInput type="email" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" aria-describedby="emailHelp" placeholder="Your Username/Email" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (form.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', form.controls.password.enabled ? (form.controls.password.valid ? \'is-valid\' : \'is-invalid\') : \'\']" formControlName="password" placeholder="Your Password" autocomplete="current-password">\n\t\t </div>\n\t\t <div class="form-check text-right">\n\t\t <label class="form-check-label"><a href="javascript:void(0)" (click)="toggleForgotPassword()"> {{!form.controls.forgotPassword.value ? \'Forgot Password?\' : \'Enter Password\'}} </a></label>\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="close(\'ResolveIO\')">{{!form.controls.forgotPassword.value ? \'Login\' : \'Submit\'}}</button>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t</form>\n\t\t',isInline:!0,styles:['.login-modal{font-family:Sora,Space Grotesk,Segoe UI,Arial,sans-serif;color:#0f172a}.login-modal .modal-body{background:#fff;padding:0}.login-body{position:relative;display:flex;justify-content:center;width:100%}.login-body .row{--bs-gutter-x: 0;--bs-gutter-y: 0;margin:0;width:100%}.login-body [class^=col-],.login-body [class*=" col-"]{padding:0}.login-card{margin-bottom:0;padding:18px;border-radius:16px;background:#fff;border:1px solid rgba(15,23,42,.08);box-shadow:0 12px 28px #0f172a1a;width:100%;position:relative}.login-close{position:absolute;top:12px;right:12px;width:44px;height:44px;border:1px solid rgba(15,23,42,.08);border-radius:12px;background:#0f172a0a;color:#0f172a;font-size:22px;font-weight:600;line-height:1;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 18px #0f172a1f;transition:transform .18s ease,box-shadow .18s ease,background .18s ease,color .18s ease}.login-close:hover{background:#0f172a;color:#fff;transform:translateY(-1px) scale(1.02);box-shadow:0 10px 22px #0f172a33}.login-close:active{transform:translateY(0) scale(.98);box-shadow:0 4px 12px #0f172a29}.login-close:focus-visible{outline:none;box-shadow:0 0 0 3px #2563eb59,0 6px 18px #0f172a1f}.login-header{font-size:22px;font-weight:600;color:#0f172a;margin-bottom:12px;text-align:center;background:linear-gradient(120deg,#0f172a,#2563eb);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.login-toggle,.public-toggle{display:inline-flex;gap:6px;align-items:center;justify-content:center;padding:6px;border-radius:999px;background:#f1f5f9;border:1px solid rgba(15,23,42,.08);margin:0 auto 16px}.login-tab-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}.login-tab-row .login-header{margin-bottom:0;text-align:center;flex:1}.login-subtoggle{display:flex;justify-content:flex-start}.login-subtoggle .public-toggle{margin:0 0 16px}.login-toggle .btn,.public-toggle .btn{border-radius:999px;font-weight:600;padding:6px 16px;border:1px solid transparent}.login-toggle .btn-outline-secondary,.public-toggle .btn-outline-secondary{color:#475569;border-color:#47556959;background:transparent}.login-toggle .btn-primary,.public-toggle .btn-primary{background:linear-gradient(135deg,#2563eb,#38bdf8);border-color:transparent;box-shadow:0 10px 20px #2563eb33}.loginform{margin-top:10px}.loginform label,.third-party-login-section label{font-size:13px;font-weight:600;letter-spacing:.4px;text-transform:uppercase;color:#475569}.login-modal .form-control{background:#fff;border:1px solid rgba(71,85,105,.35);color:#0f172a;height:48px;border-radius:12px;padding:0 14px}.login-modal .form-control::placeholder{color:#0f172a80}.login-modal .form-control:focus{border-color:#2563eb;box-shadow:0 0 0 3px #2563eb33}.login-modal .form-control.is-invalid{border-color:#ef4444cc;box-shadow:0 0 0 2px #ef444426}.employee-login-btn,.third-party-login-btn{width:100%;border-radius:12px;height:46px;border:none;font-weight:600;letter-spacing:.3px}.employee-login-btn{background:linear-gradient(135deg,#2563eb,#22d3ee);color:#fff}.third-party-login-btn{background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;margin-top:12px}.disabled-btn{background:#0f172a0d;color:#0f172a73;border:1px dashed rgba(15,23,42,.2);cursor:not-allowed}.third-party-login-section{background:#f8fafc;border-radius:14px;padding:16px;border:1px solid rgba(15,23,42,.08)}.employee-login-section,.third-party-login-section{text-align:center}.public-section{padding:8px}.contactimg{position:relative;border-radius:16px;overflow:hidden;border:1px solid rgba(15,23,42,.08)}.contactimg:after{content:"";position:absolute;inset:0;background:linear-gradient(160deg,#0f172a0d,#0f172a59)}.contactimg>img{width:100%;display:block;filter:saturate(1.1)}.textbox{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;color:#fff;padding:30px;z-index:1}.login-logo{margin-bottom:20px}.form-check a{color:#2563eb;text-decoration:none}.form-check a:hover{color:#1d4ed8;text-decoration:underline}.login-modal .btn-secondary{background:transparent;border:1px solid rgba(71,85,105,.35);color:#475569;border-radius:10px}\n'],dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogLoginContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.login",template:'\n\t\t<style>\n\t\t .login-modal {\n\t\t font-family: "Sora", "Space Grotesk", "Segoe UI", Arial, sans-serif;\n\t\t color: #0f172a;\n\t\t }\n\n\t\t .login-modal .modal-body {\n\t\t background: #ffffff;\n\t\t padding: 0;\n\t\t }\n\n\t\t .login-body {\n\t\t position: relative;\n\t\t display: flex;\n\t\t justify-content: center;\n\t\t width: 100%;\n\t\t }\n\n\t\t .login-body .row {\n\t\t --bs-gutter-x: 0;\n\t\t --bs-gutter-y: 0;\n\t\t margin: 0;\n\t\t width: 100%;\n\t\t }\n\n\t\t .login-body [class^="col-"],\n\t\t .login-body [class*=" col-"] {\n\t\t padding: 0;\n\t\t }\n\n\t\t .login-card {\n\t\t margin-bottom: 0;\n\t\t padding: 18px;\n\t\t border-radius: 16px;\n\t\t background: #ffffff;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);\n\t\t width: 100%;\n\t\t position: relative;\n\t\t }\n\n\t\t .login-close {\n\t\t position: absolute;\n\t\t top: 12px;\n\t\t right: 12px;\n\t\t width: 44px;\n\t\t height: 44px;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t border-radius: 12px;\n\t\t background: rgba(15, 23, 42, 0.04);\n\t\t color: #0f172a;\n\t\t font-size: 22px;\n\t\t font-weight: 600;\n\t\t line-height: 1;\n\t\t display: flex;\n\t\t align-items: center;\n\t\t justify-content: center;\n\t\t box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);\n\t\t transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;\n\t\t }\n\n\t\t .login-close:hover {\n\t\t background: #0f172a;\n\t\t color: #ffffff;\n\t\t transform: translateY(-1px) scale(1.02);\n\t\t box-shadow: 0 10px 22px rgba(15, 23, 42, 0.2);\n\t\t }\n\n\t\t .login-close:active {\n\t\t transform: translateY(0) scale(0.98);\n\t\t box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);\n\t\t }\n\n\t\t .login-close:focus-visible {\n\t\t outline: none;\n\t\t box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), 0 6px 18px rgba(15, 23, 42, 0.12);\n\t\t }\n\n\t\t .login-header {\n\t\t font-size: 22px;\n\t\t font-weight: 600;\n\t\t color: #0f172a;\n\t\t margin-bottom: 12px;\n\t\t text-align: center;\n\t\t background: linear-gradient(120deg, #0f172a, #2563eb);\n\t\t -webkit-background-clip: text;\n\t\t background-clip: text;\n\t\t -webkit-text-fill-color: transparent;\n\t\t }\n\n\t\t .login-toggle,\n\t\t .public-toggle {\n\t\t display: inline-flex;\n\t\t gap: 6px;\n\t\t align-items: center;\n\t\t justify-content: center;\n\t\t padding: 6px;\n\t\t border-radius: 999px;\n\t\t background: #f1f5f9;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t margin: 0 auto 16px;\n\t\t }\n\n\t\t .login-tab-row {\n\t\t display: flex;\n\t\t align-items: center;\n\t\t justify-content: space-between;\n\t\t gap: 12px;\n\t\t flex-wrap: wrap;\n\t\t margin-bottom: 12px;\n\t\t }\n\n\t\t .login-tab-row .login-header {\n\t\t margin-bottom: 0;\n\t\t text-align: center;\n\t\t flex: 1;\n\t\t }\n\n\t\t .login-subtoggle {\n\t\t display: flex;\n\t\t justify-content: flex-start;\n\t\t }\n\n\t\t .login-subtoggle .public-toggle {\n\t\t margin: 0 0 16px;\n\t\t }\n\n\t\t .login-toggle .btn,\n\t\t .public-toggle .btn {\n\t\t border-radius: 999px;\n\t\t font-weight: 600;\n\t\t padding: 6px 16px;\n\t\t border: 1px solid transparent;\n\t\t }\n\n\t\t .login-toggle .btn-outline-secondary,\n\t\t .public-toggle .btn-outline-secondary {\n\t\t color: #475569;\n\t\t border-color: rgba(71, 85, 105, 0.35);\n\t\t background: transparent;\n\t\t }\n\n\t\t .login-toggle .btn-primary,\n\t\t .public-toggle .btn-primary {\n\t\t background: linear-gradient(135deg, #2563eb, #38bdf8);\n\t\t border-color: transparent;\n\t\t box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);\n\t\t }\n\n\t\t .loginform {\n\t\t margin-top: 10px;\n\t\t }\n\n\t\t .loginform label,\n\t\t .third-party-login-section label {\n\t\t font-size: 13px;\n\t\t font-weight: 600;\n\t\t letter-spacing: 0.4px;\n\t\t text-transform: uppercase;\n\t\t color: #475569;\n\t\t }\n\n\t\t .login-modal .form-control {\n\t\t background: #ffffff;\n\t\t border: 1px solid rgba(71, 85, 105, 0.35);\n\t\t color: #0f172a;\n\t\t height: 48px;\n\t\t border-radius: 12px;\n\t\t padding: 0 14px;\n\t\t }\n\n\t\t .login-modal .form-control::placeholder {\n\t\t color: rgba(15, 23, 42, 0.5);\n\t\t }\n\n\t\t .login-modal .form-control:focus {\n\t\t border-color: #2563eb;\n\t\t box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);\n\t\t }\n\n\t\t .login-modal .form-control.is-invalid {\n\t\t border-color: rgba(239, 68, 68, 0.8);\n\t\t box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);\n\t\t }\n\n\t\t .employee-login-btn,\n\t\t .third-party-login-btn {\n\t\t width: 100%;\n\t\t border-radius: 12px;\n\t\t height: 46px;\n\t\t border: none;\n\t\t font-weight: 600;\n\t\t letter-spacing: 0.3px;\n\t\t }\n\n\t\t .employee-login-btn {\n\t\t background: linear-gradient(135deg, #2563eb, #22d3ee);\n\t\t color: #ffffff;\n\t\t }\n\n\t\t .third-party-login-btn {\n\t\t background: linear-gradient(135deg, #22c55e, #16a34a);\n\t\t color: #ffffff;\n\t\t margin-top: 12px;\n\t\t }\n\n\t\t .disabled-btn {\n\t\t background: rgba(15, 23, 42, 0.05);\n\t\t color: rgba(15, 23, 42, 0.45);\n\t\t border: 1px dashed rgba(15, 23, 42, 0.2);\n\t\t cursor: not-allowed;\n\t\t }\n\n\t\t .third-party-login-section {\n\t\t background: #f8fafc;\n\t\t border-radius: 14px;\n\t\t padding: 16px;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t }\n\n\t\t .employee-login-section,\n\t\t .third-party-login-section {\n\t\t text-align: center;\n\t\t }\n\n\t\t .public-section {\n\t\t padding: 8px;\n\t\t }\n\n\t\t .contactimg {\n\t\t position: relative;\n\t\t border-radius: 16px;\n\t\t overflow: hidden;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t }\n\n\t\t .contactimg::after {\n\t\t content: "";\n\t\t position: absolute;\n\t\t inset: 0;\n\t\t background: linear-gradient(160deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.35));\n\t\t }\n\n\t\t .contactimg > img {\n\t\t width: 100%;\n\t\t display: block;\n\t\t filter: saturate(1.1);\n\t\t }\n\n\t\t .textbox {\n\t\t position: absolute;\n\t\t inset: 0;\n\t\t display: flex;\n\t\t align-items: center;\n\t\t justify-content: center;\n\t\t text-align: center;\n\t\t color: #ffffff;\n\t\t padding: 30px;\n\t\t z-index: 1;\n\t\t }\n\n\t\t .login-logo {\n\t\t margin-bottom: 20px;\n\t\t }\n\n\t\t .form-check a {\n\t\t color: #2563eb;\n\t\t text-decoration: none;\n\t\t }\n\n\t\t .form-check a:hover {\n\t\t color: #1d4ed8;\n\t\t text-decoration: underline;\n\t\t }\n\n\t\t .login-modal .btn-secondary {\n\t\t background: transparent;\n\t\t border: 1px solid rgba(71, 85, 105, 0.35);\n\t\t color: #475569;\n\t\t border-radius: 10px;\n\t\t }\n\t\t</style>\n\t\t<form [formGroup]="form" novalidate class="login-modal">\n\t\t @if (form) {\n\t\t <div class="modal-body">\n\t\t @if (publicProgram) {\n\t\t <div class="login-body">\n\t\t <div class="row g-4">\n\t\t <div class="col-12">\n\t\t <div class="login-card">\n\t\t <button type="button" class="login-close" aria-label="Close" (click)="_activeModal.dismiss()">×</button>\n\t\t <div class="login-tab-row">\n\t\t <div class="login-toggle">\n\t\t <button type="button" class="btn btn-sm" [ngClass]="loginTab === \'customer\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setLoginTab(\'customer\')">Customer</button>\n\t\t <button type="button" class="btn btn-sm" [ngClass]="loginTab === \'employee\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setLoginTab(\'employee\')">Employee</button>\n\t\t </div>\n\t\t <h3 class="login-header">{{ loginTab === \'customer\' ? \'Customer Access\' : \'Employee Sign In\' }}</h3>\n\t\t </div>\n\t\t @if (loginTab === \'customer\') {\n\t\t <div class="login-subtoggle">\n\t\t <div class="public-toggle">\n\t\t <button type="button" class="btn btn-sm" [ngClass]="publicMode === \'login\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setPublicMode(\'login\')">Sign in</button>\n\t\t <button type="button" class="btn btn-sm" [ngClass]="publicMode === \'register\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setPublicMode(\'register\')">Create account</button>\n\t\t </div>\n\t\t </div>\n\t\t @if (publicMode === \'login\') {\n\t\t <div class="third-party-login-section public-section" [formGroup]="publicForm">\n\t\t <div class="form-group">\n\t\t <label>Email</label>\n\t\t @if (publicForm.controls.email.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="email" [ngClass]="[\'form-control\', publicForm.controls.email.valid ? \'is-valid\' : \'is-invalid\']" formControlName="email" placeholder="you@company.com" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (publicForm.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', publicForm.controls.password.valid ? \'is-valid\' : \'is-invalid\']" formControlName="password" placeholder="Your password" autocomplete="current-password">\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="submitPublicLogin()">Sign in</button>\n\t\t <button type="button" class="btn third-party-login-btn disabled-btn" disabled>Google sign-in (coming soon)</button>\n\t\t </div>\n\t\t }\n\t\t @if (publicMode === \'register\') {\n\t\t <div class="third-party-login-section public-section" [formGroup]="publicRegisterForm">\n\t\t <div class="form-group">\n\t\t <label>Company name</label>\n\t\t @if (publicRegisterForm.controls.companyName.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" [ngClass]="[\'form-control\', publicRegisterForm.controls.companyName.valid ? \'is-valid\' : \'is-invalid\']" formControlName="companyName" placeholder="Your company name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Contact name</label>\n\t\t <input type="text" class="form-control" formControlName="contactName" placeholder="Your name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Email</label>\n\t\t @if (publicRegisterForm.controls.email.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="email" [ngClass]="[\'form-control\', publicRegisterForm.controls.email.valid ? \'is-valid\' : \'is-invalid\']" formControlName="email" placeholder="you@company.com" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (publicRegisterForm.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', publicRegisterForm.controls.password.valid ? \'is-valid\' : \'is-invalid\']" formControlName="password" placeholder="Create a password" autocomplete="new-password">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Confirm password</label>\n\t\t @if (publicRegisterForm.controls.confirmPassword.hasError(\'mismatch\')) {\n\t\t <em>- Passwords must match</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', publicRegisterForm.controls.confirmPassword.valid ? \'is-valid\' : \'is-invalid\']" formControlName="confirmPassword" placeholder="Confirm password" autocomplete="new-password">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Phone (optional)</label>\n\t\t <input type="text" class="form-control" formControlName="phone" placeholder="Phone number">\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="submitPublicRegister()">Create account</button>\n\t\t </div>\n\t\t }\n\t\t }\n\t\t @if (loginTab === \'employee\') {\n\t\t @if (msAllowed) {\n\t\t <div class="employee-login-section">\n\t\t <button type="submit" class="btn employee-login-btn" (click)="close(\'MS\')">Employee Login</button>\n\t\t </div>\n\t\t }\n\t\t @if (!msAllowed) {\n\t\t <div class="third-party-login-section">\n\t\t <div class="form-group">\n\t\t <label>Username/Email</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input #usernameInput type="email" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" aria-describedby="emailHelp" placeholder="Your Username/Email" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (form.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', form.controls.password.enabled ? (form.controls.password.valid ? \'is-valid\' : \'is-invalid\') : \'\']" formControlName="password" placeholder="Your Password" autocomplete="current-password">\n\t\t </div>\n\t\t <div class="form-check text-right">\n\t\t <label class="form-check-label"><a href="javascript:void(0)" (click)="toggleForgotPassword()"> {{!form.controls.forgotPassword.value ? \'Forgot Password?\' : \'Enter Password\'}} </a></label>\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="close(\'ResolveIO\')">{{!form.controls.forgotPassword.value ? \'Login\' : \'Submit\'}}</button>\n\t\t </div>\n\t\t }\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t @else {\n\t\t <div class="login-body">\n\t\t <div class="row justify-content-md-center">\n\t\t <div class="col-lg-12">\n\t\t <div class="row">\n\t\t <div class="col-lg-6">\n\t\t <div class="contactimg">\n\t\t <img src="/assets/images/loginsignup/formimg.jpg" alt="images" class="img-fluid">\n\t\t @if (showLoginText) {\n\t\t <div class="textbox">\n\t\t <div class="login-logo"><img src="/assets/images/loginsignup/login-logo.png" alt="images"></div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t <div class="col-lg-6">\n\t\t <div class="log-box">\n\t\t <div class="loginform" style="margin: 0px;">\n\t\t @if (!msAllowed) {\n\t\t <div class="login-card">\n\t\t <button type="button" class="login-close" aria-label="Close" (click)="_activeModal.dismiss()">×</button>\n\t\t <h3 class="login-header">Employee/Customer Login</h3>\n\t\t <div class="third-party-login-section">\n\t\t <div class="form-group">\n\t\t <label>Username/Email</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input #usernameInput type="email" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" aria-describedby="emailHelp" placeholder="Your Username/Email" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (form.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', form.controls.password.enabled ? (form.controls.password.valid ? \'is-valid\' : \'is-invalid\') : \'\']" formControlName="password" placeholder="Your Password" autocomplete="current-password">\n\t\t </div>\n\t\t <div class="form-check text-right">\n\t\t <label class="form-check-label"><a href="javascript:void(0)" (click)="toggleForgotPassword()"> {{!form.controls.forgotPassword.value ? \'Forgot Password?\' : \'Enter Password\'}} </a></label>\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="close(\'ResolveIO\')">{{!form.controls.forgotPassword.value ? \'Login\' : \'Submit\'}}</button>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t @if (msAllowed) {\n\t\t <div class="login-card">\n\t\t <button type="button" class="login-close" aria-label="Close" (click)="_activeModal.dismiss()">×</button>\n\t\t <h3 class="login-header">Employee Login</h3>\n\t\t <div class="employee-login-section">\n\t\t <button type="submit" class="btn employee-login-btn" (click)="close(\'MS\')">Employee Login</button>\n\t\t </div>\n\t\t </div>\n\t\t <div class="login-card">\n\t\t <h3 class="login-header">Third Party Login</h3>\n\t\t <div class="third-party-login-section">\n\t\t <div class="form-group">\n\t\t <label>Username/Email</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input #usernameInput type="email" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" aria-describedby="emailHelp" placeholder="Your Username/Email" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (form.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', form.controls.password.enabled ? (form.controls.password.valid ? \'is-valid\' : \'is-invalid\') : \'\']" formControlName="password" placeholder="Your Password" autocomplete="current-password">\n\t\t </div>\n\t\t <div class="form-check text-right">\n\t\t <label class="form-check-label"><a href="javascript:void(0)" (click)="toggleForgotPassword()"> {{!form.controls.forgotPassword.value ? \'Forgot Password?\' : \'Enter Password\'}} </a></label>\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="close(\'ResolveIO\')">{{!form.controls.forgotPassword.value ? \'Login\' : \'Submit\'}}</button>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t</form>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:i2.FormBuilder}],propDecorators:{msAllowed:[{type:Input}],showLoginText:[{type:Input}],publicProgram:[{type:Input}],usernameInput:[{type:ViewChild,args:["usernameInput"]}]}});class ResponsiveButtonGroupComponent extends BaseComponent{_cdRef;_resizeService;_services;collapseSize=900;windowSize=window.innerWidth;windowSizeSubscription=null;constructor(t,e,n){super(n),this._cdRef=t,this._resizeService=e,this._services=n}ngOnInit(){this.windowSizeSubscription=this._resizeService.onResize$.subscribe(t=>{t&&(this.windowSize=t.innerWidth,this._cdRef.detectChanges())})}ngOnDestroy(){this.windowSizeSubscription.unsubscribe()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResponsiveButtonGroupComponent,deps:[{token:i0.ChangeDetectorRef},{token:ResizeService},{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:ResponsiveButtonGroupComponent,isStandalone:!1,selector:"responsive-button-group",inputs:{collapseSize:"collapseSize"},providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:"<style>\n\t@media screen and (min-width: 900px) {\n\t\t:host ::ng-deep .xsBtnGroup {\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup {\n\t\t\tdisplay: inline-flex !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup button {\n\t\t\tmargin-left: 5px !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup a {\n\t\t\tmargin-left: 5px !important;\n\t\t}\n\t}\n\n\t@media screen and (max-width: 900px) {\n\t\t:host ::ng-deep .xsBtnGroup {\n\t\t\tdisplay: inherit !important;\n\t\t}\n\n\t\t:host ::ng-deep .xsBtnGroup button {\n\t\t\tmargin-top: 5px !important;\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t:host ::ng-deep .xsBtnGroup a {\n\t\t\tmargin-top: 5px !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n</style>\n\n<div [ngClass]=\"windowSize <= collapseSize ? ['btn-group-vertical', 'xsBtnGroup'] : ['btn-group', 'lgBtnGroup']\">\n\t<ng-content></ng-content>\n</div>\n",styles:["@media screen and (min-width:900px){:host ::ng-deep .xsBtnGroup{display:none!important}:host ::ng-deep .lgBtnGroup{display:inline-flex!important}:host ::ng-deep .lgBtnGroup button{margin-left:5px!important}:host ::ng-deep .lgBtnGroup a{margin-left:5px!important}}@media screen and (max-width:900px){:host ::ng-deep .xsBtnGroup{display:inherit!important}:host ::ng-deep .xsBtnGroup button{margin-top:5px!important;width:100%!important}:host ::ng-deep .xsBtnGroup a{margin-top:5px!important}:host ::ng-deep .lgBtnGroup{display:none!important}}\n"],dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResponsiveButtonGroupComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"responsive-button-group",standalone:!1,template:"<style>\n\t@media screen and (min-width: 900px) {\n\t\t:host ::ng-deep .xsBtnGroup {\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup {\n\t\t\tdisplay: inline-flex !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup button {\n\t\t\tmargin-left: 5px !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup a {\n\t\t\tmargin-left: 5px !important;\n\t\t}\n\t}\n\n\t@media screen and (max-width: 900px) {\n\t\t:host ::ng-deep .xsBtnGroup {\n\t\t\tdisplay: inherit !important;\n\t\t}\n\n\t\t:host ::ng-deep .xsBtnGroup button {\n\t\t\tmargin-top: 5px !important;\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t:host ::ng-deep .xsBtnGroup a {\n\t\t\tmargin-top: 5px !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n</style>\n\n<div [ngClass]=\"windowSize <= collapseSize ? ['btn-group-vertical', 'xsBtnGroup'] : ['btn-group', 'lgBtnGroup']\">\n\t<ng-content></ng-content>\n</div>\n"}]}],ctorParameters:()=>[{type:i0.ChangeDetectorRef},{type:ResizeService},{type:ProviderService}],propDecorators:{collapseSize:[{type:Input}]}});class DialogRegisterContent{_activeModal;_fb;form;constructor(t,e){this._activeModal=t,this._fb=e}ngOnInit(){this.form=this._fb.group({username:["",[Validators.required]],name:["",[Validators.required]],phone:["",[Validators.required]],company:["",[Validators.required]],email:["",[Validators.required]]})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogRegisterContent,deps:[{token:i1$2.NgbActiveModal},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogRegisterContent,isStandalone:!1,selector:"resolveio-dialog.register",ngImport:i0,template:'\n\t\t<style>\n\t\t collapse-table {\n\t\t width: 100%;\n\t\t}\n\t\t\n\t\t.navbar-light .navbar-nav .active>.nav-link, .navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link.show, .navbar-light .navbar-nav .show>.nav-link {\n\t\tcolor: #0b4499;\n\t\t}\n\t\t.navbar-light .navbar-nav .nav-link {\n\t\tcolor:#333;\n\t\t}\n\t\ta.nav-link.loginreg {\n\t\tbackground-color: #0b4499;\n\t\tcolor: #fff !important;\n\t\tborder-radius: 40px;\n\t\t}\n\t\ta.nav-link.loginreg:hover {\n\t\tbackground: #1668e2;\n\t\t}\n\t\t.nav-link {\n\t\tcolor: #333333;\n\t\tfont-size: 150%\n\t\t}\n\t\t.nav-item a.nav-link.active {\n\t\tcolor: #0b4499;\n\t\t}\n\t\t.contactimg>img{\n\t\twidth: 100%;\n\t\t}\n\t\t\n\t\t.log-box {\n\t\tpadding-top: 26px;\n\t\tpadding-bottom: 26px;\n\t\t}\n\t\t.loginform .form-control, .register-form .form-control {\n\t\tcolor: #000;\n\t\theight: 52px;\n\t\t}\n\t\t.loginform {\n\t\tmargin-top: 35px;\n\t\t}\n\t\t.loginform label {\n\t\tfont-size: 18px;\n\t\tfont-weight: 600;\n\t\t}\n\t\t\n\t\t.loginbtn {\n\t\tbackground: #0b4499;\n\t\twidth: 100%;\n\t\tmargin-top: 44px;\n\t\theight: 52px;\n\t\tfont-size: 22px;\n\t\tborder-radius: 2px;\n\t\tcolor: #fff !important;\n\t\t}\n\t\t\n\t\t.contactimg {\n\t\tposition: relative;\n\t\t}\n\t\t.login-logo {\n\t\tmargin-bottom: 20px;\n\t\t}\n\t\t\n\t\t.textbox {\n\t\tposition: absolute;\n\t\ttop: 50%;\n\t\tcolor: #fff;\n\t\tpadding: 40px;\n\t\ttransform: translate(0%, -50%);\n\t\ttext-align: center;\n\t\t}\n\t\t.sign-btn {\n\t\tbackground: #0b4499;\n\t\twidth: 100%;\n\t\tmargin-top: 14px;\n\t\theight: 52px;\n\t\tfont-size: 22px;\n\t\tborder-radius: 2px;\n\t\tcolor: #fff !important;\n\t\t}\n\t\t\n\t\tbutton.btn.sign-btn:hover {\n\t\tbackground: #1668e2;\n\t\t}\n\t\t</style>\n\t\t<form [formGroup]="form" novalidate (ngSubmit)="_activeModal.close(form)">\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> Register</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()"></button>\n\t\t </div>\n\t\t @if (form) {\n\t\t <div class="modal-body">\n\t\t <div class="row justify-content-md-center">\n\t\t <div class="col-lg-12">\n\t\t <div class="row bg-white">\n\t\t <div class="col-lg-6">\n\t\t <div class="contactimg">\n\t\t <img src="/assets/images/loginsignup/formimg.jpg" alt="images" class="img-fluid">\n\t\t <div class="textbox">\n\t\t <div class="login-logo"><img src="/assets/images/loginsignup/login-logo.png" alt="images"></div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t <div class="col-lg-6">\n\t\t <div class="log-box">\n\t\t <div class="register-form">\n\t\t <div class="form-group">\n\t\t <label>User Name</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" [focus]="true" aria-describedby="emailHelp" placeholder="User Name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Full Name</label>\n\t\t @if (form.controls.name.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.name.valid ? \'is-valid\' : \'is-invalid\']" formControlName="name" aria-describedby="emailHelp" placeholder="Name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Phone Number</label>\n\t\t @if (form.controls.phone.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.phone.valid ? \'is-valid\' : \'is-invalid\']" formControlName="phone" placeholder="Phone Number">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Company</label>\n\t\t @if (form.controls.company.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.company.valid ? \'is-valid\' : \'is-invalid\']" formControlName="company" placeholder="Company Name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Email</label>\n\t\t @if (form.controls.email.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="email" class="form-control" [ngClass]="[\'form-control\', form.controls.email.valid ? \'is-valid\' : \'is-invalid\']" formControlName="email" placeholder="Email">\n\t\t </div>\n\t\t <button type="submit" class="btn sign-btn">Signup</button>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t <div class="modal-footer">\n\t\t <responsive-button-group>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t </responsive-button-group>\n\t\t </div>\n\t\t</form>\n\t\t',isInline:!0,styles:["collapse-table{width:100%}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:#0b4499}.navbar-light .navbar-nav .nav-link{color:#333}a.nav-link.loginreg{background-color:#0b4499;color:#fff!important;border-radius:40px}a.nav-link.loginreg:hover{background:#1668e2}.nav-link{color:#333;font-size:150%}.nav-item a.nav-link.active{color:#0b4499}.contactimg>img{width:100%}.log-box{padding-top:26px;padding-bottom:26px}.loginform .form-control,.register-form .form-control{color:#000;height:52px}.loginform{margin-top:35px}.loginform label{font-size:18px;font-weight:600}.loginbtn{background:#0b4499;width:100%;margin-top:44px;height:52px;font-size:22px;border-radius:2px;color:#fff!important}.contactimg{position:relative}.login-logo{margin-bottom:20px}.textbox{position:absolute;top:50%;color:#fff;padding:40px;transform:translateY(-50%);text-align:center}.sign-btn{background:#0b4499;width:100%;margin-top:14px;height:52px;font-size:22px;border-radius:2px;color:#fff!important}button.btn.sign-btn:hover{background:#1668e2}\n"],dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"component",type:ResponsiveButtonGroupComponent,selector:"responsive-button-group",inputs:["collapseSize"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogRegisterContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.register",template:'\n\t\t<style>\n\t\t collapse-table {\n\t\t width: 100%;\n\t\t}\n\t\t\n\t\t.navbar-light .navbar-nav .active>.nav-link, .navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link.show, .navbar-light .navbar-nav .show>.nav-link {\n\t\tcolor: #0b4499;\n\t\t}\n\t\t.navbar-light .navbar-nav .nav-link {\n\t\tcolor:#333;\n\t\t}\n\t\ta.nav-link.loginreg {\n\t\tbackground-color: #0b4499;\n\t\tcolor: #fff !important;\n\t\tborder-radius: 40px;\n\t\t}\n\t\ta.nav-link.loginreg:hover {\n\t\tbackground: #1668e2;\n\t\t}\n\t\t.nav-link {\n\t\tcolor: #333333;\n\t\tfont-size: 150%\n\t\t}\n\t\t.nav-item a.nav-link.active {\n\t\tcolor: #0b4499;\n\t\t}\n\t\t.contactimg>img{\n\t\twidth: 100%;\n\t\t}\n\t\t\n\t\t.log-box {\n\t\tpadding-top: 26px;\n\t\tpadding-bottom: 26px;\n\t\t}\n\t\t.loginform .form-control, .register-form .form-control {\n\t\tcolor: #000;\n\t\theight: 52px;\n\t\t}\n\t\t.loginform {\n\t\tmargin-top: 35px;\n\t\t}\n\t\t.loginform label {\n\t\tfont-size: 18px;\n\t\tfont-weight: 600;\n\t\t}\n\t\t\n\t\t.loginbtn {\n\t\tbackground: #0b4499;\n\t\twidth: 100%;\n\t\tmargin-top: 44px;\n\t\theight: 52px;\n\t\tfont-size: 22px;\n\t\tborder-radius: 2px;\n\t\tcolor: #fff !important;\n\t\t}\n\t\t\n\t\t.contactimg {\n\t\tposition: relative;\n\t\t}\n\t\t.login-logo {\n\t\tmargin-bottom: 20px;\n\t\t}\n\t\t\n\t\t.textbox {\n\t\tposition: absolute;\n\t\ttop: 50%;\n\t\tcolor: #fff;\n\t\tpadding: 40px;\n\t\ttransform: translate(0%, -50%);\n\t\ttext-align: center;\n\t\t}\n\t\t.sign-btn {\n\t\tbackground: #0b4499;\n\t\twidth: 100%;\n\t\tmargin-top: 14px;\n\t\theight: 52px;\n\t\tfont-size: 22px;\n\t\tborder-radius: 2px;\n\t\tcolor: #fff !important;\n\t\t}\n\t\t\n\t\tbutton.btn.sign-btn:hover {\n\t\tbackground: #1668e2;\n\t\t}\n\t\t</style>\n\t\t<form [formGroup]="form" novalidate (ngSubmit)="_activeModal.close(form)">\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> Register</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()"></button>\n\t\t </div>\n\t\t @if (form) {\n\t\t <div class="modal-body">\n\t\t <div class="row justify-content-md-center">\n\t\t <div class="col-lg-12">\n\t\t <div class="row bg-white">\n\t\t <div class="col-lg-6">\n\t\t <div class="contactimg">\n\t\t <img src="/assets/images/loginsignup/formimg.jpg" alt="images" class="img-fluid">\n\t\t <div class="textbox">\n\t\t <div class="login-logo"><img src="/assets/images/loginsignup/login-logo.png" alt="images"></div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t <div class="col-lg-6">\n\t\t <div class="log-box">\n\t\t <div class="register-form">\n\t\t <div class="form-group">\n\t\t <label>User Name</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" [focus]="true" aria-describedby="emailHelp" placeholder="User Name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Full Name</label>\n\t\t @if (form.controls.name.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.name.valid ? \'is-valid\' : \'is-invalid\']" formControlName="name" aria-describedby="emailHelp" placeholder="Name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Phone Number</label>\n\t\t @if (form.controls.phone.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.phone.valid ? \'is-valid\' : \'is-invalid\']" formControlName="phone" placeholder="Phone Number">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Company</label>\n\t\t @if (form.controls.company.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.company.valid ? \'is-valid\' : \'is-invalid\']" formControlName="company" placeholder="Company Name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Email</label>\n\t\t @if (form.controls.email.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="email" class="form-control" [ngClass]="[\'form-control\', form.controls.email.valid ? \'is-valid\' : \'is-invalid\']" formControlName="email" placeholder="Email">\n\t\t </div>\n\t\t <button type="submit" class="btn sign-btn">Signup</button>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t <div class="modal-footer">\n\t\t <responsive-button-group>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t </responsive-button-group>\n\t\t </div>\n\t\t</form>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:i2.FormBuilder}]});class DialogSelectWithButtonsURLContent{_activeModal;_account;url="";close;allElements;title="Select Window Type";selectedType="";options=[{value:"same_tab",text:"Same Tab"},{value:"new_tab",text:"New Tab"},{value:"new_window",text:"New Window"}];constructor(t,e){this._activeModal=t,this._account=e}ngOnInit(){this._account.getUser().settings.routing_preference&&"alwaysAsk"!==this._account.getUser().settings.routing_preference&&("sameTab"===this._account.getUser().settings.routing_preference&&window.open(this.url,"_self"),"newTab"===this._account.getUser().settings.routing_preference&&window.open(this.url,"_blank"),"newWindow"===this._account.getUser().settings.routing_preference&&window.open(this.url,"_blank","toolbar=1,location=1,menubar=1"),this._activeModal.close())}ngAfterViewInit(){setTimeout(()=>{let t=this.recursiveFindFirstElement(this.allElements.nativeElement);t?t.focus():(this.close.nativeElement.focus(),this.close.nativeElement.blur())},100)}recursiveFindFirstElement(t){let e=null,n=t.children;for(let t=0;t<Object.keys(n).length;t++){let o=n[Object.keys(n)[t]];if(o.children&&o.children.length)e=this.recursiveFindFirstElement(o);else{if("BUTTON"===o.tagName&&o.classList.contains("close"))return null;if(!("BUTTON"!==o.tagName&&"INPUT"!==o.tagName&&"SELECT"!==o.tagName&&"TEXTAREA"!==o.tagName||o.hidden||o.disabled))return o}if(e)break}return e}onSelectType(t){this.selectedType=t,this.submit()}submit(){"same_tab"===this.selectedType&&window.open(this.url,"_self"),"new_tab"===this.selectedType&&window.open(this.url,"_blank"),"new_window"===this.selectedType&&window.open(this.url,"_blank","toolbar=1,location=1,menubar=1"),this._activeModal.close()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectWithButtonsURLContent,deps:[{token:i1$2.NgbActiveModal},{token:AccountManagerService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogSelectWithButtonsURLContent,isStandalone:!1,selector:"resolveio-dialog.select-with-buttons-url",inputs:{url:"url"},viewQueries:[{propertyName:"close",first:!0,predicate:["close"],descendants:!0},{propertyName:"allElements",first:!0,predicate:["allElements"],descendants:!0}],ngImport:i0,template:'\n\t\t<style>\n\t\t collapse-table tr:hover {\n\t\t background-color: lightblue;\n\t\t cursor: pointer;\n\t\t}\n\t\t\n\t\t.selected {\n\t\tbackground-color: lightblue;\n\t\t}\n\t\t\n\t\tcollapse-table {\n\t\twidth: 100%;\n\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t\t </div>\n\t\t <div class="modal-body">\n\t\t <div class="row">\n\t\t @for (option of options; track option.value) {\n\t\t <div class="col">\n\t\t <button style="width: 100%" type="button" [ngClass]="[\'btn\', selectedType === option.value ? \'btn-success\' : \'btn-warning\']" (click)="onSelectType(option.value)">{{option.text}}</button>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t</div>\n\t\t',isInline:!0,styles:["collapse-table tr:hover{background-color:#add8e6;cursor:pointer}.selected{background-color:#add8e6}collapse-table{width:100%}\n"],dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectWithButtonsURLContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.select-with-buttons-url",template:'\n\t\t<style>\n\t\t collapse-table tr:hover {\n\t\t background-color: lightblue;\n\t\t cursor: pointer;\n\t\t}\n\t\t\n\t\t.selected {\n\t\tbackground-color: lightblue;\n\t\t}\n\t\t\n\t\tcollapse-table {\n\t\twidth: 100%;\n\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t\t </div>\n\t\t <div class="modal-body">\n\t\t <div class="row">\n\t\t @for (option of options; track option.value) {\n\t\t <div class="col">\n\t\t <button style="width: 100%" type="button" [ngClass]="[\'btn\', selectedType === option.value ? \'btn-success\' : \'btn-warning\']" (click)="onSelectType(option.value)">{{option.text}}</button>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t</div>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:AccountManagerService}],propDecorators:{url:[{type:Input}],close:[{type:ViewChild,args:["close",{static:!1}]}],allElements:[{type:ViewChild,args:["allElements",{static:!1}]}]}});class CollapseTableComponent{_resizeService;_account;collapseSize;tableFixed=!1;headerFixed=!1;secondaryColor=!1;tertiaryColor=!1;windowSize=window.innerWidth;windowSizeSubscription=null;constructor(t,e){this._resizeService=t,this._account=e}ngOnInit(){this.windowSizeSubscription=this._resizeService.onResize$.subscribe(t=>{this.windowSize=t.innerWidth}),this._account.getUser()&&this._account.getUser().settings&&(document.documentElement.style.setProperty("--primary-table-color",this._account.getUser().settings.table_color),document.documentElement.style.setProperty("--primary-table-font-color",this._account.getUser().settings.table_font_color),document.documentElement.style.setProperty("--font-size",this._account.getUser().settings.font_size+"px"),document.documentElement.style.setProperty("--secondary-table-color",this._account.getUser().settings.secondary_table_color),document.documentElement.style.setProperty("--secondary-table-font-color",this._account.getUser().settings.secondary_table_font_color),document.documentElement.style.setProperty("--tertiary-table-color",this._account.getUser().settings.tertiary_table_color),document.documentElement.style.setProperty("--tertiary-table-font-color",this._account.getUser().settings.tertiary_table_font_color))}ngOnDestroy(){this.windowSizeSubscription.unsubscribe()}onClick(t){}getCollapseClass(){let t=["table"];return this.secondaryColor?t.push("collapseTable-sec"):this.tertiaryColor?t.push("collapseTable-tert"):t.push("collapseTable"),t}getPrimaryColor(){return this._account.getUser()?this._account.getUser().settings.table_color:"#3b3ee3"}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CollapseTableComponent,deps:[{token:ResizeService},{token:AccountManagerService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:CollapseTableComponent,isStandalone:!1,selector:"collapse-table",inputs:{collapseSize:"collapseSize",tableFixed:"tableFixed",headerFixed:"headerFixed",secondaryColor:"secondaryColor",tertiaryColor:"tertiaryColor"},ngImport:i0,template:'<style>\n\t:host ::ng-deep :root {\n\t\t--primary-table-color: #3b3ee3;\n\t\t--primary-table-font-color: white;\n\t\t--font-size: 12px;\n\t\t--secondary-table-color: #87ceeb;\n\t\t--secondary-table-font-color: #000000;\n\t\t--tertiary-table-color: #ff4500;\n\t\t--tertiary-table-font-color: #000000;\n\t}\n\n\t:host {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t}\n\n\t.table-responsive-xl {\n\t\toverflow-y: visible;\n\t\toverflow-x: auto;\n\t\tposition: relative;\n\t}\n\n\t:host ::ng-deep .collapseTable {\n\t\tborder: 1px solid #ccc;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\tposition: relative;\n\t\t/*table-layout: fixed;*/\n\t}\n\t:host ::ng-deep .collapseTable tr {\n\t\tborder: 1px solid #ddd;\n\t\tpadding: 0.35em;\n\t}\n\t:host ::ng-deep .collapseTable th,\n\t:host ::ng-deep .collapseTable td {\n\t\tpadding: 0.625em;\n\t\ttext-align: center;\n\t\tvertical-align: middle;\n\t}\n\t:host ::ng-deep .collapseTable th {\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tbackground-color: var(--primary-table-color);\n\t\tcolor: var(--primary-table-font-color);\n\t\tfont-size: var(--font-size);\n\t\tposition: sticky;\n\t\tz-index: 10;\n\t\ttop: 0;\n\t}\n\t:host ::ng-deep .collapseTable-sec {\n\t\tborder: 1px solid #ccc;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\tposition: relative;\n\t}\n\t:host ::ng-deep .collapseTable-sec tr {\n\t\tborder: 1px solid #ddd;\n\t\tpadding: 0.35em;\n\t}\n\t:host ::ng-deep .collapseTable-sec th,\n\t:host ::ng-deep .collapseTable-sec td {\n\t\tpadding: 0.625em;\n\t\ttext-align: center;\n\t}\n\t:host ::ng-deep .collapseTable-sec th {\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tbackground-color: var(--secondary-table-color);\n\t\tcolor: var(--secondary-table-font-color);\n\t\tfont-size: var(--font-size);\n\t\tposition: sticky;\n\t\tz-index: 10;\n\t\ttop: 0;\n\t}\n\t:host ::ng-deep .collapseTable-tert {\n\t\tborder: 1px solid #ccc;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\tposition: relative;\n\t}\n\t:host ::ng-deep .collapseTable-tert tr {\n\t\tborder: 1px solid #ddd;\n\t\tpadding: 0.35em;\n\t}\n\t:host ::ng-deep .collapseTable-tert th,\n\t:host ::ng-deep .collapseTable-tert td {\n\t\tpadding: 0.625em;\n\t\ttext-align: center;\n\t}\n\t:host ::ng-deep .collapseTable-tert th {\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tbackground-color: var(--tertiary-table-color);\n\t\tcolor: var(--tertiary-table-font-color);\n\t\tfont-size: var(--font-size);\n\t\tposition: sticky;\n\t\tz-index: 10;\n\t\ttop: 0;\n\t}\n\n\t.fixed {\n\t\ttable-layout: fixed;\n\t}\n\n\t:host ::ng-deep .headerFixed thead,\n\t:host ::ng-deep .headerFixed tbody tr {\n\t\tdisplay: table;\n\t\twidth: 100%;\n\t\ttable-layout: fixed;\n\t}\n\n\t:host ::ng-deep .collapseTable,\n\t:host ::ng-deep .collapseTable-sec,\n\t:host ::ng-deep .collapseTable-tert {\n\t\tbox-shadow: 0 0 15px rgba(0, 0, 0, 0.25);\n\t}\n\n\t:host ::ng-deep .collapseTable > thead:first-of-type > tr:first-child > th:first-child,\n\t:host ::ng-deep .collapseTable-sec > thead:first-of-type > tr:first-child > th:first-child,\n\t:host ::ng-deep .collapseTable-tert > thead:first-of-type > tr:first-child > th:first-child {\n\t\tborder-top-left-radius: 10px;\n\t}\n\n\t:host ::ng-deep .collapseTable > thead:first-of-type > tr:first-child > th:last-child,\n\t:host ::ng-deep .collapseTable-sec > thead:first-of-type > tr:first-child > th:last-child,\n\t:host ::ng-deep .collapseTable-tert > thead:first-of-type > tr:first-child > th:last-child {\n\t\tborder-top-right-radius: 10px;\n\t}\n\n\t:host ::ng-deep .collapseTable > tbody:last-of-type > tr:last-child > td:first-child,\n\t:host ::ng-deep .collapseTable-sec > tbody:last-of-type > tr:last-child > td:first-child,\n\t:host ::ng-deep .collapseTable-tert > tbody:last-of-type > tr:last-child > td:first-child {\n\t\tborder-bottom-left-radius: 10px;\n\t}\n\n\t:host ::ng-deep .collapseTable > tbody:last-of-type > tr:last-child > td:last-child,\n\t:host ::ng-deep .collapseTable-sec > tbody:last-of-type > tr:last-child > td:last-child,\n\t:host ::ng-deep .collapseTable-tert > tbody:last-of-type > tr:last-child > td:last-child {\n\t\tborder-bottom-right-radius: 10px;\n\t}\n\n\t.hide {\n\t\tdisplay: none;\n\t}\n\n\t.table-responsive-xl {\n\t\toverflow: visible !important;\n\t\tposition: relative;\n\t}\n</style>\n\n<div class="table-responsive-xl">\n\t<table [ngClass]="getCollapseClass()" style="border: none" cellspacing="0" cellpadding="0">\n\t\t<ng-content></ng-content>\n\t</table>\n</div>\n',styles:[":host ::ng-deep :root{--primary-table-color: #3b3ee3;--primary-table-font-color: white;--font-size: 12px;--secondary-table-color: #87ceeb;--secondary-table-font-color: #000000;--tertiary-table-color: #ff4500;--tertiary-table-font-color: #000000}:host{display:block;width:100%}.table-responsive-xl{overflow-y:visible;overflow-x:auto;position:relative}:host ::ng-deep .collapseTable{border:1px solid #ccc;margin:0;padding:0;width:100%;overflow:visible;position:relative}:host ::ng-deep .collapseTable tr{border:1px solid #ddd;padding:.35em}:host ::ng-deep .collapseTable th,:host ::ng-deep .collapseTable td{padding:.625em;text-align:center;vertical-align:middle}:host ::ng-deep .collapseTable th{letter-spacing:.1em;text-transform:uppercase;background-color:var(--primary-table-color);color:var(--primary-table-font-color);font-size:var(--font-size);position:sticky;z-index:10;top:0}:host ::ng-deep .collapseTable-sec{border:1px solid #ccc;margin:0;padding:0;width:100%;overflow:visible;position:relative}:host ::ng-deep .collapseTable-sec tr{border:1px solid #ddd;padding:.35em}:host ::ng-deep .collapseTable-sec th,:host ::ng-deep .collapseTable-sec td{padding:.625em;text-align:center}:host ::ng-deep .collapseTable-sec th{letter-spacing:.1em;text-transform:uppercase;background-color:var(--secondary-table-color);color:var(--secondary-table-font-color);font-size:var(--font-size);position:sticky;z-index:10;top:0}:host ::ng-deep .collapseTable-tert{border:1px solid #ccc;margin:0;padding:0;width:100%;overflow:visible;position:relative}:host ::ng-deep .collapseTable-tert tr{border:1px solid #ddd;padding:.35em}:host ::ng-deep .collapseTable-tert th,:host ::ng-deep .collapseTable-tert td{padding:.625em;text-align:center}:host ::ng-deep .collapseTable-tert th{letter-spacing:.1em;text-transform:uppercase;background-color:var(--tertiary-table-color);color:var(--tertiary-table-font-color);font-size:var(--font-size);position:sticky;z-index:10;top:0}.fixed{table-layout:fixed}:host ::ng-deep .headerFixed thead,:host ::ng-deep .headerFixed tbody tr{display:table;width:100%;table-layout:fixed}:host ::ng-deep .collapseTable,:host ::ng-deep .collapseTable-sec,:host ::ng-deep .collapseTable-tert{box-shadow:0 0 15px #00000040}:host ::ng-deep .collapseTable>thead:first-of-type>tr:first-child>th:first-child,:host ::ng-deep .collapseTable-sec>thead:first-of-type>tr:first-child>th:first-child,:host ::ng-deep .collapseTable-tert>thead:first-of-type>tr:first-child>th:first-child{border-top-left-radius:10px}:host ::ng-deep .collapseTable>thead:first-of-type>tr:first-child>th:last-child,:host ::ng-deep .collapseTable-sec>thead:first-of-type>tr:first-child>th:last-child,:host ::ng-deep .collapseTable-tert>thead:first-of-type>tr:first-child>th:last-child{border-top-right-radius:10px}:host ::ng-deep .collapseTable>tbody:last-of-type>tr:last-child>td:first-child,:host ::ng-deep .collapseTable-sec>tbody:last-of-type>tr:last-child>td:first-child,:host ::ng-deep .collapseTable-tert>tbody:last-of-type>tr:last-child>td:first-child{border-bottom-left-radius:10px}:host ::ng-deep .collapseTable>tbody:last-of-type>tr:last-child>td:last-child,:host ::ng-deep .collapseTable-sec>tbody:last-of-type>tr:last-child>td:last-child,:host ::ng-deep .collapseTable-tert>tbody:last-of-type>tr:last-child>td:last-child{border-bottom-right-radius:10px}.hide{display:none}.table-responsive-xl{overflow:visible!important;position:relative}\n"],dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CollapseTableComponent,decorators:[{type:Component,args:[{selector:"collapse-table",standalone:!1,template:'<style>\n\t:host ::ng-deep :root {\n\t\t--primary-table-color: #3b3ee3;\n\t\t--primary-table-font-color: white;\n\t\t--font-size: 12px;\n\t\t--secondary-table-color: #87ceeb;\n\t\t--secondary-table-font-color: #000000;\n\t\t--tertiary-table-color: #ff4500;\n\t\t--tertiary-table-font-color: #000000;\n\t}\n\n\t:host {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t}\n\n\t.table-responsive-xl {\n\t\toverflow-y: visible;\n\t\toverflow-x: auto;\n\t\tposition: relative;\n\t}\n\n\t:host ::ng-deep .collapseTable {\n\t\tborder: 1px solid #ccc;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\tposition: relative;\n\t\t/*table-layout: fixed;*/\n\t}\n\t:host ::ng-deep .collapseTable tr {\n\t\tborder: 1px solid #ddd;\n\t\tpadding: 0.35em;\n\t}\n\t:host ::ng-deep .collapseTable th,\n\t:host ::ng-deep .collapseTable td {\n\t\tpadding: 0.625em;\n\t\ttext-align: center;\n\t\tvertical-align: middle;\n\t}\n\t:host ::ng-deep .collapseTable th {\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tbackground-color: var(--primary-table-color);\n\t\tcolor: var(--primary-table-font-color);\n\t\tfont-size: var(--font-size);\n\t\tposition: sticky;\n\t\tz-index: 10;\n\t\ttop: 0;\n\t}\n\t:host ::ng-deep .collapseTable-sec {\n\t\tborder: 1px solid #ccc;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\tposition: relative;\n\t}\n\t:host ::ng-deep .collapseTable-sec tr {\n\t\tborder: 1px solid #ddd;\n\t\tpadding: 0.35em;\n\t}\n\t:host ::ng-deep .collapseTable-sec th,\n\t:host ::ng-deep .collapseTable-sec td {\n\t\tpadding: 0.625em;\n\t\ttext-align: center;\n\t}\n\t:host ::ng-deep .collapseTable-sec th {\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tbackground-color: var(--secondary-table-color);\n\t\tcolor: var(--secondary-table-font-color);\n\t\tfont-size: var(--font-size);\n\t\tposition: sticky;\n\t\tz-index: 10;\n\t\ttop: 0;\n\t}\n\t:host ::ng-deep .collapseTable-tert {\n\t\tborder: 1px solid #ccc;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\tposition: relative;\n\t}\n\t:host ::ng-deep .collapseTable-tert tr {\n\t\tborder: 1px solid #ddd;\n\t\tpadding: 0.35em;\n\t}\n\t:host ::ng-deep .collapseTable-tert th,\n\t:host ::ng-deep .collapseTable-tert td {\n\t\tpadding: 0.625em;\n\t\ttext-align: center;\n\t}\n\t:host ::ng-deep .collapseTable-tert th {\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tbackground-color: var(--tertiary-table-color);\n\t\tcolor: var(--tertiary-table-font-color);\n\t\tfont-size: var(--font-size);\n\t\tposition: sticky;\n\t\tz-index: 10;\n\t\ttop: 0;\n\t}\n\n\t.fixed {\n\t\ttable-layout: fixed;\n\t}\n\n\t:host ::ng-deep .headerFixed thead,\n\t:host ::ng-deep .headerFixed tbody tr {\n\t\tdisplay: table;\n\t\twidth: 100%;\n\t\ttable-layout: fixed;\n\t}\n\n\t:host ::ng-deep .collapseTable,\n\t:host ::ng-deep .collapseTable-sec,\n\t:host ::ng-deep .collapseTable-tert {\n\t\tbox-shadow: 0 0 15px rgba(0, 0, 0, 0.25);\n\t}\n\n\t:host ::ng-deep .collapseTable > thead:first-of-type > tr:first-child > th:first-child,\n\t:host ::ng-deep .collapseTable-sec > thead:first-of-type > tr:first-child > th:first-child,\n\t:host ::ng-deep .collapseTable-tert > thead:first-of-type > tr:first-child > th:first-child {\n\t\tborder-top-left-radius: 10px;\n\t}\n\n\t:host ::ng-deep .collapseTable > thead:first-of-type > tr:first-child > th:last-child,\n\t:host ::ng-deep .collapseTable-sec > thead:first-of-type > tr:first-child > th:last-child,\n\t:host ::ng-deep .collapseTable-tert > thead:first-of-type > tr:first-child > th:last-child {\n\t\tborder-top-right-radius: 10px;\n\t}\n\n\t:host ::ng-deep .collapseTable > tbody:last-of-type > tr:last-child > td:first-child,\n\t:host ::ng-deep .collapseTable-sec > tbody:last-of-type > tr:last-child > td:first-child,\n\t:host ::ng-deep .collapseTable-tert > tbody:last-of-type > tr:last-child > td:first-child {\n\t\tborder-bottom-left-radius: 10px;\n\t}\n\n\t:host ::ng-deep .collapseTable > tbody:last-of-type > tr:last-child > td:last-child,\n\t:host ::ng-deep .collapseTable-sec > tbody:last-of-type > tr:last-child > td:last-child,\n\t:host ::ng-deep .collapseTable-tert > tbody:last-of-type > tr:last-child > td:last-child {\n\t\tborder-bottom-right-radius: 10px;\n\t}\n\n\t.hide {\n\t\tdisplay: none;\n\t}\n\n\t.table-responsive-xl {\n\t\toverflow: visible !important;\n\t\tposition: relative;\n\t}\n</style>\n\n<div class="table-responsive-xl">\n\t<table [ngClass]="getCollapseClass()" style="border: none" cellspacing="0" cellpadding="0">\n\t\t<ng-content></ng-content>\n\t</table>\n</div>\n'}]}],ctorParameters:()=>[{type:ResizeService},{type:AccountManagerService}],propDecorators:{collapseSize:[{type:Input}],tableFixed:[{type:Input}],headerFixed:[{type:Input}],secondaryColor:[{type:Input}],tertiaryColor:[{type:Input}]}});class DialogSelectArrayObjsContent{_activeModal;title="";objects=[];multiple=!1;allowNone=!1;close;allElements;selectedIndex=null;selectedItem=null;selectedIndexes=[];selectedItems=[];constructor(t){this._activeModal=t}ngAfterViewInit(){setTimeout(()=>{let t=this.recursiveFindFirstElement(this.allElements.nativeElement);t?t.focus():(this.close.nativeElement.focus(),this.close.nativeElement.blur())},100),this.objects.forEach((t,e)=>{t.selected&&(this.selectedIndexes.push(e),this.selectedItems.push(t))})}recursiveFindFirstElement(t){let e=null,n=t.children;for(let t=0;t<Object.keys(n).length;t++){let o=n[Object.keys(n)[t]];if(o.children&&o.children.length)e=this.recursiveFindFirstElement(o);else{if("BUTTON"===o.tagName&&o.classList.contains("close"))return null;if(!("BUTTON"!==o.tagName&&"INPUT"!==o.tagName&&"SELECT"!==o.tagName&&"TEXTAREA"!==o.tagName||o.hidden||o.disabled))return o}if(e)break}return e}onSelectItem(t){this.multiple?this.selectedItems.some(e=>e.value===this.objects[t].value)?(this.selectedIndexes.splice(this.selectedIndexes.indexOf(t),1),this.selectedItems.splice(this.selectedItems.map(t=>t.value).indexOf(this.objects[t].value),1)):(this.selectedIndexes.push(t),this.selectedItems.push(this.objects[t])):this.objects[t]===this.selectedItem?(this.selectedItem=null,this.selectedIndex=null):(this.selectedItem=this.objects[t],this.selectedIndex=t)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectArrayObjsContent,deps:[{token:i1$2.NgbActiveModal}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogSelectArrayObjsContent,isStandalone:!1,selector:"resolveio-dialog.select-array-objs",inputs:{title:"title",objects:"objects",multiple:"multiple",allowNone:"allowNone"},viewQueries:[{propertyName:"close",first:!0,predicate:["close"],descendants:!0},{propertyName:"allElements",first:!0,predicate:["allElements"],descendants:!0}],ngImport:i0,template:'\n\t\t<style>\n\t\t collapse-table tr:hover {\n\t\t background-color: lightblue;\n\t\t cursor: pointer;\n\t\t}\n\t\t\n\t\t.selected {\n\t\tbackground-color: lightblue;\n\t\t}\n\t\t\n\t\tcollapse-table {\n\t\twidth: 100%;\n\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t\t </div>\n\t\t <div class="modal-body">\n\t\t <div style="height: 60vh; overflow-y: auto">\n\t\t <collapse-table collapseSize="900">\n\t\t <thead>\n\t\t <tr>\n\t\t <th>List</th>\n\t\t </tr>\n\t\t </thead>\n\t\t <tbody>\n\t\t @for (object of objects; track object.text; let i = $index) {\n\t\t <tr (click)="onSelectItem(i)" [ngClass]="{\'selected\' : i === selectedIndex || selectedIndexes.includes(i)}">\n\t\t <td>{{object.text}}</td>\n\t\t </tr>\n\t\t }\n\t\t </tbody>\n\t\t </collapse-table>\n\t\t </div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t @if (!allowNone) {\n\t\t <button type="button" [ngClass]="[\'btn\', (selectedItem || selectedItems.length) ? \'btn-success\' : \'btn-danger\']" [disabled]="!selectedItem && !selectedItems.length" (click)="_activeModal.close(selectedItem || selectedItems)">Submit</button>\n\t\t }\n\t\t @if (allowNone) {\n\t\t <button type="button" class="btn btn-success" (click)="_activeModal.close(selectedItem || selectedItems)">Submit</button>\n\t\t }\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t</div>\n\t\t</div>\n\t\t',isInline:!0,styles:["collapse-table tr:hover{background-color:#add8e6;cursor:pointer}.selected{background-color:#add8e6}collapse-table{width:100%}\n"],dependencies:[{kind:"component",type:CollapseTableComponent,selector:"collapse-table",inputs:["collapseSize","tableFixed","headerFixed","secondaryColor","tertiaryColor"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectArrayObjsContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.select-array-objs",template:'\n\t\t<style>\n\t\t collapse-table tr:hover {\n\t\t background-color: lightblue;\n\t\t cursor: pointer;\n\t\t}\n\t\t\n\t\t.selected {\n\t\tbackground-color: lightblue;\n\t\t}\n\t\t\n\t\tcollapse-table {\n\t\twidth: 100%;\n\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t\t </div>\n\t\t <div class="modal-body">\n\t\t <div style="height: 60vh; overflow-y: auto">\n\t\t <collapse-table collapseSize="900">\n\t\t <thead>\n\t\t <tr>\n\t\t <th>List</th>\n\t\t </tr>\n\t\t </thead>\n\t\t <tbody>\n\t\t @for (object of objects; track object.text; let i = $index) {\n\t\t <tr (click)="onSelectItem(i)" [ngClass]="{\'selected\' : i === selectedIndex || selectedIndexes.includes(i)}">\n\t\t <td>{{object.text}}</td>\n\t\t </tr>\n\t\t }\n\t\t </tbody>\n\t\t </collapse-table>\n\t\t </div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t @if (!allowNone) {\n\t\t <button type="button" [ngClass]="[\'btn\', (selectedItem || selectedItems.length) ? \'btn-success\' : \'btn-danger\']" [disabled]="!selectedItem && !selectedItems.length" (click)="_activeModal.close(selectedItem || selectedItems)">Submit</button>\n\t\t }\n\t\t @if (allowNone) {\n\t\t <button type="button" class="btn btn-success" (click)="_activeModal.close(selectedItem || selectedItems)">Submit</button>\n\t\t }\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t</div>\n\t\t</div>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal}],propDecorators:{title:[{type:Input}],objects:[{type:Input}],multiple:[{type:Input}],allowNone:[{type:Input}],close:[{type:ViewChild,args:["close",{static:!1}]}],allElements:[{type:ViewChild,args:["allElements",{static:!1}]}]}});class DialogSelectArrayContent{_activeModal;_cdRef;title="";array=[];multiple;selectedIndexes=[];close;allElements;method="list";mappedArray=[];selectIndexes=[];constructor(t,e){this._activeModal=t,this._cdRef=e}ngOnInit(){this.mappedArray=this.array.map((t,e)=>({value:e,text:t})),this.selectedIndexes.forEach(t=>{this.selectIndexes.push(t)})}ngAfterViewInit(){setTimeout(()=>{let t=this.recursiveFindFirstElement(this.allElements.nativeElement);t?t.focus():(this.close.nativeElement.focus(),this.close.nativeElement.blur())},100)}recursiveFindFirstElement(t){let e=null,n=t.children;for(let t=0;t<Object.keys(n).length;t++){let o=n[Object.keys(n)[t]];if(o.children&&o.children.length)e=this.recursiveFindFirstElement(o);else{if("BUTTON"===o.tagName&&o.classList.contains("close"))return null;if(!("BUTTON"!==o.tagName&&"INPUT"!==o.tagName&&"SELECT"!==o.tagName&&"TEXTAREA"!==o.tagName||o.hidden||o.disabled))return o}if(e)break}return e}addDropDown(){let t=this.array.filter((t,e)=>!this.selectedIndexes.includes(e))[0],e=this.array.findIndex(e=>e===t);this.selectedIndexes.push(e),this.selectIndexes.push(e)}onSelectDropdown(t,e){this.onSelectItem(this.selectedIndexes[e]),this.onSelectItem(t)}availableAdd(){return!!this.array.filter((t,e)=>!this.selectedIndexes.includes(e))[0]}getFilteredArray(t){return this.mappedArray.filter(e=>e.value===t||!this.selectedIndexes.includes(e.value))}isInSelectedIndex(t){return!!this.selectedIndexes.includes(t)}onSelectItem(t){this.multiple?this.selectedIndexes.includes(t)?(this.selectedIndexes.splice(this.selectedIndexes.indexOf(t),1),this.selectIndexes.splice(this.selectIndexes.indexOf(t),1)):(this.selectedIndexes.push(t),this.selectIndexes.push(t)):this.selectedIndexes.includes(t)?(this.selectedIndexes=[],this.selectIndexes=[]):(this.selectedIndexes=[t],this.selectIndexes=[t])}getArray(){let t=[];return this.selectedIndexes.forEach(e=>{t.push(this.array[e])}),t}selectAll(){this.selectedIndexes=[],this.selectIndexes=[],this.array.forEach((t,e)=>{this.selectedIndexes.push(e),this.selectIndexes.push(e)})}removeAll(){this.selectedIndexes=[],this.selectIndexes=[]}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectArrayContent,deps:[{token:i1$2.NgbActiveModal},{token:i0.ChangeDetectorRef}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogSelectArrayContent,isStandalone:!1,selector:"resolveio-dialog.select-array",inputs:{title:"title",array:"array",multiple:"multiple",selectedIndexes:"selectedIndexes"},viewQueries:[{propertyName:"close",first:!0,predicate:["close"],descendants:!0},{propertyName:"allElements",first:!0,predicate:["allElements"],descendants:!0}],ngImport:i0,template:'\n\t\t<style>\n\t\t collapse-table tr:hover {\n\t\t background-color: lightblue;\n\t\t cursor: pointer;\n\t\t}\n\t\t\n\t\t.selected {\n\t\tbackground-color: lightblue;\n\t\t}\n\t\t\n\t\tcollapse-table {\n\t\twidth: 100%;\n\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t\t </div>\n\t\t <div class="modal-body" style="height: 60vh;">\n\t\t <responsive-button-group>\n\t\t @if (multiple) {\n\t\t <button type="button" class="btn btn-primary" (click)="selectAll()">Select All</button>\n\t\t <button type="button" class="btn btn-danger" (click)="removeAll()">Remove All</button>\n\t\t }\n\t\t <button type="button" [ngClass]="[\'btn\', method === \'list\' ? \'btn-success\' : \'btn-warning\']" (click)="method = \'list\'">Use List</button>\n\t\t <button type="button" [ngClass]="[\'btn\', method === \'dropdown\' ? \'btn-success\' : \'btn-warning\']" (click)="method = \'dropdown\'">Use Dropdown</button>\n\t\t </responsive-button-group>\n\t\t <div style="height: 50vh; overflow-y: auto; margin-top: 10px">\n\t\t @if (method === \'list\') {\n\t\t <collapse-table collapseSize="900">\n\t\t <thead>\n\t\t <tr>\n\t\t <th>List</th>\n\t\t </tr>\n\t\t </thead>\n\t\t <tbody>\n\t\t @for (data of array; track data; let i = $index) {\n\t\t <tr (click)="onSelectItem(i)" [ngClass]="{\'selected\' : isInSelectedIndex(i)}">\n\t\t <td>{{data}}</td>\n\t\t </tr>\n\t\t }\n\t\t </tbody>\n\t\t </collapse-table>\n\t\t }\n\t\t @if (method === \'dropdown\') {\n\t\t <collapse-table collapseSize="900">\n\t\t <thead>\n\t\t <tr>\n\t\t <th>Item</th>\n\t\t <th>Remove</th>\n\t\t </tr>\n\t\t </thead>\n\t\t <tbody>\n\t\t @for (item of selectIndexes; track item; let i = $index) {\n\t\t <tr>\n\t\t <td>\n\t\t <rio-select placeholder="Select Item" [ngModel]="item" (change)="onSelectDropdown($event, i)">\n\t\t @for (data of getFilteredArray(item); track data.value) {\n\t\t <rio-option [value]="data.value">{{data.text}}</rio-option>\n\t\t }\n\t\t </rio-select>\n\t\t </td>\n\t\t <td>\n\t\t <button type="button" class="btn btn-danger" (click)="onSelectItem(item)">Remove</button>\n\t\t </td>\n\t\t </tr>\n\t\t }\n\t\t </tbody>\n\t\t </collapse-table>\n\t\t @if (multiple || !selectIndexes.length) {\n\t\t <button type="button" class="btn btn-success" (click)="addDropDown()" [disabled]="!availableAdd()">Add</button>\n\t\t }\n\t\t }\n\t\t</div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t <button type="button" [ngClass]="[\'btn\', selectedIndexes.length ? \'btn-success\' : \'btn-danger\']" [disabled]="!selectedIndexes.length || this.selectedIndexes.includes(null)" (click)="_activeModal.close(this.multiple ? getArray() : array[selectedIndexes[0]])">Submit</button>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t</div>\n\t\t</div>\n\t\t',isInline:!0,styles:["collapse-table tr:hover{background-color:#add8e6;cursor:pointer}.selected{background-color:#add8e6}collapse-table{width:100%}\n"],dependencies:[{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"component",type:CollapseTableComponent,selector:"collapse-table",inputs:["collapseSize","tableFixed","headerFixed","secondaryColor","tertiaryColor"]},{kind:"component",type:ResponsiveButtonGroupComponent,selector:"responsive-button-group",inputs:["collapseSize"]},{kind:"component",type:i5.RioSelectComponent,selector:"rio-select",inputs:["placeholder","multiple","panelMaxHeight","panelMaxViewportRatio","optionHeight","virtualBuffer","overlayZIndex","autoSizePanel","panelPosition","autoCenterPanel","viewportMargin","panelWidth","panelFullscreenWidth","clearable","templateLabelFromView","searchable","searchMatchMode","defaultSearch","textWrap","compareWith","options","optionLabelKey","optionLabelFn","optionValueKey","optionDisabledKey","optionIdKey","optionGroupKey","disabled","emitOptionObject","debugLog","stickyKey","stickyAutoSave"],outputs:["change"]},{kind:"component",type:i5.RioOptionComponent,selector:"rio-option",inputs:["value","disabled","label","id"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}],changeDetection:i0.ChangeDetectionStrategy.OnPush})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectArrayContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.select-array",template:'\n\t\t<style>\n\t\t collapse-table tr:hover {\n\t\t background-color: lightblue;\n\t\t cursor: pointer;\n\t\t}\n\t\t\n\t\t.selected {\n\t\tbackground-color: lightblue;\n\t\t}\n\t\t\n\t\tcollapse-table {\n\t\twidth: 100%;\n\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t\t </div>\n\t\t <div class="modal-body" style="height: 60vh;">\n\t\t <responsive-button-group>\n\t\t @if (multiple) {\n\t\t <button type="button" class="btn btn-primary" (click)="selectAll()">Select All</button>\n\t\t <button type="button" class="btn btn-danger" (click)="removeAll()">Remove All</button>\n\t\t }\n\t\t <button type="button" [ngClass]="[\'btn\', method === \'list\' ? \'btn-success\' : \'btn-warning\']" (click)="method = \'list\'">Use List</button>\n\t\t <button type="button" [ngClass]="[\'btn\', method === \'dropdown\' ? \'btn-success\' : \'btn-warning\']" (click)="method = \'dropdown\'">Use Dropdown</button>\n\t\t </responsive-button-group>\n\t\t <div style="height: 50vh; overflow-y: auto; margin-top: 10px">\n\t\t @if (method === \'list\') {\n\t\t <collapse-table collapseSize="900">\n\t\t <thead>\n\t\t <tr>\n\t\t <th>List</th>\n\t\t </tr>\n\t\t </thead>\n\t\t <tbody>\n\t\t @for (data of array; track data; let i = $index) {\n\t\t <tr (click)="onSelectItem(i)" [ngClass]="{\'selected\' : isInSelectedIndex(i)}">\n\t\t <td>{{data}}</td>\n\t\t </tr>\n\t\t }\n\t\t </tbody>\n\t\t </collapse-table>\n\t\t }\n\t\t @if (method === \'dropdown\') {\n\t\t <collapse-table collapseSize="900">\n\t\t <thead>\n\t\t <tr>\n\t\t <th>Item</th>\n\t\t <th>Remove</th>\n\t\t </tr>\n\t\t </thead>\n\t\t <tbody>\n\t\t @for (item of selectIndexes; track item; let i = $index) {\n\t\t <tr>\n\t\t <td>\n\t\t <rio-select placeholder="Select Item" [ngModel]="item" (change)="onSelectDropdown($event, i)">\n\t\t @for (data of getFilteredArray(item); track data.value) {\n\t\t <rio-option [value]="data.value">{{data.text}}</rio-option>\n\t\t }\n\t\t </rio-select>\n\t\t </td>\n\t\t <td>\n\t\t <button type="button" class="btn btn-danger" (click)="onSelectItem(item)">Remove</button>\n\t\t </td>\n\t\t </tr>\n\t\t }\n\t\t </tbody>\n\t\t </collapse-table>\n\t\t @if (multiple || !selectIndexes.length) {\n\t\t <button type="button" class="btn btn-success" (click)="addDropDown()" [disabled]="!availableAdd()">Add</button>\n\t\t }\n\t\t }\n\t\t</div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t <button type="button" [ngClass]="[\'btn\', selectedIndexes.length ? \'btn-success\' : \'btn-danger\']" [disabled]="!selectedIndexes.length || this.selectedIndexes.includes(null)" (click)="_activeModal.close(this.multiple ? getArray() : array[selectedIndexes[0]])">Submit</button>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t</div>\n\t\t</div>\n\t\t',changeDetection:ChangeDetectionStrategy.OnPush,standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:i0.ChangeDetectorRef}],propDecorators:{title:[{type:Input}],array:[{type:Input}],multiple:[{type:Input}],selectedIndexes:[{type:Input}],close:[{type:ViewChild,args:["close",{static:!1}]}],allElements:[{type:ViewChild,args:["allElements",{static:!1}]}]}});class DialogService{modalService;constructor(t){this.modalService=t}openDialog(t,e={size:"lg",backdrop:"static"}){return this.modalService.open(t,e)}notify(t){const e=this.openDialog(DialogNotifyContent);e.componentInstance.title="Notify",e.componentInstance.body=t}input(t,e){const n=this.openDialog(DialogInputContent);return n.componentInstance.title=t,n.componentInstance.inputFields=e,n.result}error(t){const e=this.openDialog(DialogErrorContent);e.componentInstance.title="Error",e.componentInstance.body=t}confirm(t,e){const n=this.openDialog(DialogConfirmContent);return n.componentInstance.title="Confirm",n.componentInstance.body=t,n.componentInstance.html=e,n.result}selectDateTime(t,e=!0){const n=this.openDialog(DialogSelectDateTimeContent);return n.componentInstance.title="Select Date"+(e?" and Time":""),n.componentInstance.date=t,n.componentInstance.showTime=e,n.result}selectDataLabel(t,e=!0){const n=this.openDialog(DialogSelectDataLabelsContent,{size:"sm",backdrop:"static"});return n.componentInstance.title="Select Data Labels",n.componentInstance.data=t,n.componentInstance.showArraySubData=e,n.result}login(t,e=!0,n=!1){const o=this.openDialog(DialogLoginContent);return o.componentInstance.msAllowed=t,o.componentInstance.showLoginText=e,o.componentInstance.publicProgram=n,o.result}register(){return this.openDialog(DialogRegisterContent).result}selectWithButtonsURL(t){const e=this.openDialog(DialogSelectWithButtonsURLContent);return e.componentInstance.url=t,e.result}selectWithArrayObjs(t,e,n=!1,o=!1){const r=this.openDialog(DialogSelectArrayObjsContent);return r.componentInstance.title=t,r.componentInstance.objects=e,r.componentInstance.multiple=n,r.componentInstance.allowNone=o,r.result}selectArray(t,e,n=!1,o=[]){const r=this.openDialog(DialogSelectArrayContent);return r.componentInstance.title=t,r.componentInstance.array=e,r.componentInstance.multiple=n,r.componentInstance.selectedIndexes=o,r.result}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogService,deps:[{token:i1$2.NgbModal}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:i1$2.NgbModal}]});class AuthService{_ds;_vs;_alert;_account;_socket;_core;_router;environment=null;userHasPhoneNumber=!1;userData;userAgentApplication;constructor(t,e,n,o,r,i,s){this._ds=t,this._vs=e,this._alert=n,this._account=o,this._socket=r,this._core=i,this._router=s}setupMSSingleSignOn(t){this.environment=t,"/auth365"===window.location.pathname&&window.location.hash&&window.location.hash.startsWith("#id_token=")&&(this.environment.MS_id_token=window.location.hash.replace("#","")),this.userAgentApplication=new UserAgentApplication({auth:{clientId:this.environment.MS_clientId,authority:this.environment.MS_authority,redirectUri:this.environment.MS_redirectUri,validateAuthority:!1,navigateToLoginRequestUrl:!1},framework:{isAngular:!0}})}setEnvironment(t){this.environment=t}setUserHasPhoneNumber(t){this.userHasPhoneNumber=t}registerUser(t,e=!0){return new Promise((n,o)=>{let r=[{label:"User Name",form:"username",data:"",validators:[Validators.required],validatorErrors:["required"],validatorMsg:["Username is required"],required:!0},{label:"Full Name",form:"fullname",data:"",validators:[Validators.required],validatorErrors:["required"],validatorMsg:["Full name is required"],required:!0},{label:"Email",form:"email",data:"",validators:[Validators.required,this._vs.email],validatorErrors:["required","email"],validatorMsg:["Email is required","Email is invalid"],required:!0}];this.userHasPhoneNumber&&r.push({label:"Phone",form:"phonenumber",data:"",validators:[this._vs.phoneNumber],validatorErrors:["phoneNumber"],validatorMsg:["Phone number is invalid"],type:"text"}),this._ds.input("Register New User",r).then(r=>{let i={username:r.username.value.trim().toLowerCase(),email:r.email.value.trim().toLowerCase(),fullname:r.fullname.value.trim(),roles:{super_admin:!1,approvals:[],groups:[],notifications:[],miscs:[]},active:!0,readonly:!1,phonenumber:r.phonenumber?r.phonenumber.value:"",other:t,attempts:0,salt:"",hash:""};this._socket.call("createUserAndEmailEnrollment",i,e,(t,e)=>{t?o(t):n(e)})},t=>o())})}editUser(t){let e=[{label:"User Name",form:"username",data:t.username,validators:[Validators.required],validatorErrors:["required"],validatorMsg:["Username is required"],required:!0},{label:"Full Name",form:"fullname",data:t.fullname,validators:[Validators.required],validatorErrors:["required"],validatorMsg:["Full name is required"],required:!0},{label:"Email",form:"email",data:t.email,validators:[Validators.required,this._vs.email],validatorErrors:["required","email"],validatorMsg:["Email is required","Email is invalid"],required:!0}];return this.userHasPhoneNumber&&e.push({label:"Phone",form:"phonenumber",data:t.phonenumber||"",validators:[this._vs.phoneNumber],validatorErrors:["phoneNumber"],validatorMsg:["Phone number is invalid"],type:"text"}),new Promise((n,o)=>{this._ds.input("Edit User",e).then(e=>{e.phonenumber&&e.phonenumber.value?t.phonenumber=e.phonenumber.value:t.phonenumber="",t.email=e.email.value.trim(),this._socket.call("editUser",t._id,e.username.value.trim().toLowerCase(),e.fullname.value.trim(),e.email.value.trim().toLowerCase(),t.phonenumber,(r,i)=>{if(r)this._socket.call("insertErrorLog","AuthService - edituser",[t,r]),o(r);else{let t={username:e.username.value.trim(),fullname:e.fullname.value.trim(),email:e.email.value.trim()};this._alert.setAlert("success","User has been edited"),n(t)}})},t=>{n(!0)})})}loginUser(){return new Promise((t,e)=>{this.loginModal().then(n=>{"PUBLIC_LOGIN"!==n.type?"PUBLIC_REGISTER"!==n.type?"MS"===n.type?this.microsoftSignOn():n.form.value.forgotPassword?this._account.resetUserPassword(n.form.value.username):this._account.logIn(n.form.value.username,n.form.value.password).then(e=>{t(e)},t=>e("Invalid login")):this._account.publicRegister({companyName:n.form.value.companyName,contactName:n.form.value.contactName,email:n.form.value.email,password:n.form.value.password,phone:n.form.value.phone}).then(e=>{this._router.navigateByUrl("/dashboard/client"),t(e)},t=>e(t)):this._account.publicLogIn(n.form.value.email,n.form.value.password).then(e=>{this._router.navigateByUrl("/dashboard/client"),t(e)},t=>e(t))},t=>e())})}microsoftSignOn(){this.userAgentApplication.loginRedirect(["user.read","mail.send"])}loginModal(){const t=!(!this.environment||!this.environment.MS_ALLOWED),e=!this.environment||!this.environment.HIDE_LOGIN_TEXT,n=this._core.publicProgram.getValue();return this._ds.login(t,e,n)}removeUser(t){return new Promise((e,n)=>{this._socket.call("removeDocument","users",t,(o,r)=>{o?(this._ds.error("Could not remove user"),this._socket.call("insertErrorLog","AuthService - removeUser",[t,o]),n(o)):e(!0)})})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthService,deps:[{token:DialogService},{token:ValidationService},{token:AlertService},{token:AccountManagerService},{token:SocketManagerService},{token:CoreService},{token:i1$1.Router}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:DialogService},{type:ValidationService},{type:AlertService},{type:AccountManagerService},{type:SocketManagerService},{type:CoreService},{type:i1$1.Router}]});class AuthPermissionService{modules=[];constructor(){}registerModule(t){this.modules.push(t),this.modules.sort((t,e)=>{let n=t.name,o=e.name;return n<o?-1:n>o?1:0})}getAllModulePermissions(){return this.modules}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthPermissionService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthPermissionService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthPermissionService,decorators:[{type:Injectable}],ctorParameters:()=>[]});class FeatureGateService{_app;constructor(t){this._app=t}isEnabled(t,e=!0){if(!t)return!0;const n=this.getGateConfig();return n?Array.isArray(n)?n.includes(t):"object"==typeof n&&t in n?!!n[t]:e:e}isLinkEnabled(t,e,n=!1){if(!t)return!0;const o=this.normalizeLink(t),r=Array.isArray(e)?e:[];for(let t=0;t<r.length;t++){const e=r[t],i=Array.isArray(e.views)?e.views:[];for(let t=0;t<i.length;t++){const r=i[t];if(this.isLinkMatch(r,o,n))return!(e.gate&&!this.isEnabled(e.gate,!0))&&!(r.gate&&!this.isEnabled(r.gate,!0))}}return!0}getGateConfig(){const t=this._app.environment.value||{};return t.FEATURE_GATES?t.FEATURE_GATES:t.MODULE_GATES?t.MODULE_GATES:t.FEATURE_FLAGS?t.FEATURE_FLAGS:null}normalizeLink(t){if(!t)return"";let e=t.replace(/\?.+$/,"");return e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e}isLinkMatch(t,e,n){if(!t||!t.link||!e)return!1;if(t.link===e)return!0;if(t.has_parameter){const n=t.link.endsWith("/")?t.link:t.link+"/";if(e.startsWith(n))return!0}if(n){const n=e.endsWith("/")?e:e+"/";if(t.link.startsWith(n))return!0}return!1}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FeatureGateService,deps:[{token:CoreService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FeatureGateService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FeatureGateService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:CoreService}]});class AiTerminalService{provider;constructor(t){this.provider=t}call(t,...e){return this.provider._socket.call(t,...e)}subscribe(t,...e){return this.provider._socket.subscribe(t,...e)}subscribeBypass(t,...e){return this.provider._socket.subscribeBypassRoute(t,...e)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalService,deps:[{token:ProviderService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:ProviderService}]});class AiPageRouterService{adapters=[];registerAdapter(t){return t?(this.adapters.includes(t)||this.adapters.push(t),()=>this.unregisterAdapter(t)):()=>{}}unregisterAdapter(t){this.adapters=this.adapters.filter(e=>e!==t)}getAdapter(t){const e=this.adapters.filter(e=>e&&e.matches(t)).sort((t,e)=>(e.priority||0)-(t.priority||0));return e.length?e[0]:null}async handleMessage(t){const e=t?.context||{},n=this.getAdapter(e);if(!n)return{handled:!1};try{return await n.handle(t)}catch(t){const e=t?.message||"Unable to handle this request.";return{handled:!0,reply:e,error:e}}}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiPageRouterService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiPageRouterService,providedIn:"root"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiPageRouterService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}]});const DEFAULT_FORM_PATCH_METHOD="aiFormPatch";class AiPageFormAdapterService{router;registry;terminal;id="generic-form";priority=-10;constructor(t,e,n){this.router=t,this.registry=e,this.terminal=n,this.router.registerAdapter(this)}matches(t){return!0}async handle(t){if("all"===t?.context?.mode)return{handled:!1};const e=this.registry.getFormsForRoute(t?.context?.route).filter(t=>!t.element||!1!==t.element.isConnected);if(1!==e.length)return{handled:!1};const n=e[0],o=n?.form;if(!o)return{handled:!1};const r=this.buildFieldCatalog(o);if(!r.length)return{handled:!1};let i;try{i=await this.terminal.call("aiFormPatch",{message:t.message,allowed_fields:r,patch_format:this.buildPatchFormat(),route:t?.context?.route,id_client:t?.context?.idClient,id_app:t?.context?.idApp})}catch(t){const e=t?.message||"Unable to build a form patch.";return{handled:!0,reply:e,error:e}}if(i?.error){const t=i.error||"Unable to build a form patch.";return{handled:!0,reply:t,error:t}}const s=this.normalizePatchFields(i?.patch??i);if(!s.length){return{handled:!0,reply:i?.notes||"No matching fields found for this form."}}const a=this.applyFormPatch(o,s);return{handled:!0,reply:i?.notes||this.buildApplyReply(a),data:{patch:{fields:s},applied_fields:a.applied,skipped_fields:a.invalid}}}buildPatchFormat(){return["{",' "notes": "Short, plain-language explanation of what you filled in.",',' "patch": {',' "fields": [',' { "path": "field_name", "value": "any" }'," ]"," }","}"].join("\n")}buildFieldCatalog(t){const e=[];return this.walkControls(t,"",e),e}walkControls(t,e,n){if(t instanceof FormGroup)Object.keys(t.controls||{}).forEach(o=>{const r=t.controls[o],i=e?`${e}.${o}`:o;this.walkControls(r,i,n)});else{if(t instanceof FormArray){e&&n.push({name:e,type:"array"});const o=t.controls?.[0];return void(o instanceof FormGroup&&Object.keys(o.controls||{}).forEach(t=>{const r=e?`${e}.0.${t}`:`0.${t}`;this.walkControls(o.controls[t],r,n)}))}e&&n.push({name:e,type:this.inferType(t?.value)})}}inferType(t){if(t instanceof Date)return"date";if(Array.isArray(t))return"array";if(null==t)return"unknown";const e=typeof t;return"string"===e||"number"===e||"boolean"===e?e:"object"===e?"object":"unknown"}normalizePatchFields(t){return t?Array.isArray(t)?t.map(t=>this.normalizePatchField(t)).filter(t=>!!t):Array.isArray(t?.fields)?t.fields.map(t=>this.normalizePatchField(t)).filter(t=>!!t):t?.fields&&"object"==typeof t.fields?Object.entries(t.fields).map(([t,e])=>({path:t,value:e})):"object"==typeof t?Object.entries(t).map(([t,e])=>({path:t,value:e})):[]:[]}normalizePatchField(t){if(!t||"object"!=typeof t)return null;const e=String(t.path||t.field||t.name||"").trim();return e?{path:e,value:t.value}:null}applyFormPatch(t,e){const n=[],o=[];return e.forEach(e=>{const r=this.normalizePath(e.path);if(!r)return;const i=t.get(r);if(i)try{void 0!==e.value&&("function"==typeof i.patchValue&&e.value&&"object"==typeof e.value?i.patchValue(e.value):"function"==typeof i.setValue&&i.setValue(e.value),i.markAsDirty({onlySelf:!0}),i.markAsTouched({onlySelf:!0}),i.updateValueAndValidity({onlySelf:!0}),n.push(r))}catch{o.push(r)}else o.push(r)}),t.updateValueAndValidity({emitEvent:!0}),{applied:n,invalid:o}}normalizePath(t){const e=String(t||"").trim();return e?e.replace(/\[(\d+)\]/g,".$1"):""}buildApplyReply(t){return t.applied.length?t.invalid.length?`Applied ${t.applied.length} field${1===t.applied.length?"":"s"}. Skipped ${t.invalid.length} unknown field${1===t.invalid.length?"":"s"}.`:`Applied ${t.applied.length} field${1===t.applied.length?"":"s"} to the form.`:"No matching fields were applied to this form."}applyPatch(t,e){}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiPageFormAdapterService,deps:[{token:AiPageRouterService},{token:AiFormRegistryService},{token:AiTerminalService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiPageFormAdapterService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiPageFormAdapterService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:AiPageRouterService},{type:AiFormRegistryService},{type:AiTerminalService}]});const CSV_EOL="\r\n",CSV_BOM="\ufeff",CSV_DEFAULTS={filename:"export",fieldSeparator:",",quoteStrings:'"',decimalseparator:".",showLabels:!1,showTitle:!1,title:"My Report",useBom:!0,headers:[]};function exportCsv(t,e,n){const o=Array.isArray(t)?t:tryParse(t);if(!Array.isArray(o)||!o.length)return void console.log("Invalid data");const r={...CSV_DEFAULTS,...n};e&&(r.filename=e);const i=normalizeData(o,r);i.title&&!r.showTitle&&(r.showTitle=!0,r.title||(r.title=i.title));let s="";r.useBom&&(s+="\ufeff"),r.showTitle&&r.title&&(s+=`${r.title}\r\n\r\n`);const a=resolveHeaders(r,i.data),l=stripHeaderRow(i.data,a,r),c=resolveRowKeys(l,a);a.length&&(s+=`${a.join(r.fieldSeparator)}\r\n`),l.forEach(t=>{s+=`${resolveRow(t,c,r)}\r\n`});const d=new Blob([s],{type:"text/csv;charset=utf-8;"}),p=`${(r.filename||CSV_DEFAULTS.filename).replace(/ /g,"_")}.csv`;if(navigator.msSaveBlob)navigator.msSaveBlob(d,p);else{const t=document.createElement("a");t.href=URL.createObjectURL(d),t.setAttribute("visibility","hidden"),t.download=p,document.body.appendChild(t),t.click(),document.body.removeChild(t)}}function resolveHeaders(t,e){return t.headers&&t.headers.length?t.headers:t.showLabels&&e.length&&!Array.isArray(e[0])&&"object"==typeof e[0]?collectKeysInOrder(e):[]}function resolveRowKeys(t,e){return e.length?e:!t.length||Array.isArray(t[0])||"object"!=typeof t[0]?[]:Object.keys(t[0])}function resolveRow(t,e,n){return Array.isArray(t)?t.map(t=>formatValue(t,n)).join(n.fieldSeparator):e.length?e.map(e=>formatValue(t[e],n)).join(n.fieldSeparator):Object.keys(t).map(e=>formatValue(t[e],n)).join(n.fieldSeparator)}function formatValue(t,e){if("locale"===e.decimalseparator&&isFloat(t))return t.toLocaleString();if("."!==e.decimalseparator&&isFloat(t))return t.toString().replace(".",e.decimalseparator);if("string"==typeof t){const n=parseIsoDate(t);n&&(t=n.toLocaleString());let o=t.replace(/"/g,'""');return(e.quoteStrings||t.indexOf(",")>-1||t.indexOf("\n")>-1||t.indexOf("\r")>-1)&&(o=`${e.quoteStrings}${o}${e.quoteStrings}`),o}return"boolean"==typeof t?t?"TRUE":"FALSE":null==t?"":t}function normalizeData(t,e){if(!e.showLabels||!t.length||Array.isArray(t[0])||"object"!=typeof t[0])return{data:t};const[n,...o]=t;if(isTitleRow(n)){const t=Object.keys(n);return{data:o,title:String(n[t[0]])}}return{data:t}}function stripHeaderRow(t,e,n){if(!n.showLabels||!e.length||!t.length)return t;const[o,...r]=t;return isHeaderValueRow(o,e)?r:t}function collectKeysInOrder(t){const e=[];return t.forEach(t=>{Array.isArray(t)||"object"!=typeof t||Object.keys(t).forEach(t=>{-1===e.indexOf(t)&&e.push(t)})}),e}function isHeaderValueRow(t,e){return!(Array.isArray(t)||"object"!=typeof t||!e.length)&&e.every(e=>t[e]===e)}function isTitleRow(t){if(Array.isArray(t)||"object"!=typeof t||null===t)return!1;const e=Object.keys(t);if(1!==e.length)return!1;const n=t[e[0]];return"string"==typeof n&&n===e[0]}function tryParse(t){try{return JSON.parse(t)}catch(t){return console.log("Invalid CSV data",t),[]}}function isFloat(t){return+t===t&&(!isFinite(t)||Boolean(t%1))}const ISO_DATE_REGEX=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})$/;function parseIsoDate(t){if(!ISO_DATE_REGEX.test(t))return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}class DomSanitizorPipe{_sanitizer;constructor(t){this._sanitizer=t}transform(t,e="html"){switch(e){case"html":return this._sanitizer.bypassSecurityTrustHtml(t);case"style":return this._sanitizer.bypassSecurityTrustStyle(t);case"script":return this._sanitizer.bypassSecurityTrustScript(t);case"url":return this._sanitizer.bypassSecurityTrustUrl(t);case"resourceUrl":return this._sanitizer.bypassSecurityTrustResourceUrl(t);default:throw new Error(`Invalid safe type specified: ${e}`)}}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DomSanitizorPipe,deps:[{token:i1$3.DomSanitizer}],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:DomSanitizorPipe,isStandalone:!1,name:"safe"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DomSanitizorPipe,decorators:[{type:Pipe,args:[{name:"safe",standalone:!1}]}],ctorParameters:()=>[{type:i1$3.DomSanitizer}]});const AI_TERMINAL_SUBSCRIPTION_COOLDOWN_MS=5e3,AI_TERMINAL_PROGRESS_LOOKUP_MS=4500,AI_TERMINAL_PROGRESS_DRAFT_MS=9e3,AI_TERMINAL_DEFAULT_TITLE="Ask AI About the System",AI_TERMINAL_LOCAL_CONVERSATION_PREFIX="local-convo",AI_TERMINAL_REQUEST_PREFIX="req",AI_TERMINAL_EXPORT_MAX_ROWS=5e3,AI_TERMINAL_USD_CURRENCY_TEXT_PATTERN=/\b(?:USD|US\$)(?:\s| | |[\u00A0\u202F\u2007])*\$?\s*([-+]?[0-9][0-9,]*(?:\.[0-9]+)?)/gi,DEFAULT_METHODS={conversationCreate:"aiTerminalConversationCreate",conversationUpdate:"aiTerminalConversationUpdate",conversationDelete:"aiTerminalConversationDelete",runOpenAI:"aiTerminalRun",uploadOpenAI:"aiTerminalUploadFile",runCodex:"aiCoderTerminalRunCodex",uploadCodex:"aiCoderTerminalUploadFile",deployTest:"aiCoderTerminalDeployTest",conversationsPublication:"aiTerminalConversations",messagesPublication:"aiTerminalMessages"};class AiTerminalComponent{terminal;services;pageRouter;_pageFormAdapter;locale;idClient="";idApp="";title="AI Terminal";config=null;conversationStatus="active";messageLimit=200;placeholder="Describe the change or ask a question...";singleConversation=!1;contextMode="auto";contextRoute="";paused=!1;bypassRouteSubscriptions=!1;messageScroll;conversations=[];messages=[];activeConversationId="";activeConversation=null;messageText="";pendingFiles=[];isSending=!1;isDeployingTest=!1;isLoading=!1;errorMessage="";infoMessage="";editingConversationId="";editingTitle="";messagePartsCache=new Map;messageMarkdownCache=new Map;messageContentOverrides=new Map;messageDisplayOverrides=new Map;supportTicketMap=new Map;supportTicketInFlight=new Set;serverMessages=[];localMessagesByConversation=new Map;localMessageCounter=0;requestCounter=0;localConversationCounter=0;collapsedTableIds=new Set;expandedDebugIds=new Set;pendingProgressTimers=new Map;supportTicketStorageKey="resolveioAiSupportTicketMap";mongoReadCache=new Map;mongoReadInFlight=new Set;exportingMessageIds=new Set;subscribedConversationId="";conversationsSub;messagesSub;conversationsSubKey="";messagesSubKey="";subscriptionsPaused=!1;pauseTimer=null;pendingConversationId="";pendingConversation=null;createConversationPromise=null;currencySymbol="$";constructor(t,e,n,o,r){this.terminal=t,this.services=e,this.pageRouter=n,this._pageFormAdapter=o,this.locale=r;try{this.currencySymbol=getCurrencySymbol("USD","narrow",this.locale)}catch{this.currencySymbol="$"}}get _services(){return this.services}ngOnInit(){this.loadSupportTicketMap(),this.paused||this.subscribeConversations()}ngOnChanges(t){t.paused&&(this.paused?this.schedulePause():(this.cancelPause(),(this.subscriptionsPaused||!this.conversationsSub||this.conversationsSub.closed)&&(this.subscriptionsPaused=!1,this.subscribeConversations(!0)),this.ensureMessageSubscription())),(t.idClient||t.idApp||t.config)&&(this.paused||this.subscribeConversations())}ngOnDestroy(){this.cancelPause(),this.pendingProgressTimers.forEach(t=>t.forEach(t=>clearTimeout(t))),this.pendingProgressTimers.clear(),this.unsubscribeAll()}isCodexMode(){return"codex"===this.resolveMode()}showAdvanced(){return!0===this.resolveConfig()?.showAdvanced}showToolMessages(){const t=this.resolveConfig();return void 0!==t?.showToolMessages?!!t.showToolMessages:this.showAdvanced()}allowUploads(){return!1!==this.resolveConfig()?.allowUploads}maxFileMb(){return Number(this.resolveConfig()?.maxFileMb)||50}maxTotalMb(){return Number(this.resolveConfig()?.maxTotalMb)||100}deleteFilesAfterRun(){const t=this.resolveConfig();return!1!==t?.deleteFilesAfterRun}totalTokens(){return(this.messages||[]).reduce((t,e)=>t+(e?.usage?.total_tokens||0),0)}filteredMessages(){return this.showToolMessages()?this.messages:(this.messages||[]).filter(t=>"tool"!==t.role)}messageParts(t){const e=this.getMessageContent(t);if(!e)return[];const n=`${t?._id||"message"}:${t?.updatedAt||""}:${e}`,o=this.messagePartsCache.get(n);if(o)return o;const r=this.splitMessageContent(e);return this.messagePartsCache.set(n,r),r}messageMarkdown(t){let e=this.getMessageContent(t);if(!e)return"";t?.metadata?.tool_result?.output?.display&&(e=this.stripMarkdownTables(e));const n=`${t?._id||"message"}:${t?.updatedAt||""}:${e}`,o=this.messageMarkdownCache.get(n);if(o)return o;const r=this.markdownToHtml(e);return this.messageMarkdownCache.set(n,r),r}clearMessageRenderCaches(){this.messagePartsCache.clear(),this.messageMarkdownCache.clear()}trackByMessagePart(t,e){return e?.route?`route-${e.route}-${t}`:`text-${t}-${e.text?.length||0}`}markdownToHtml(t){const e=String(t||"").replace(/\r\n/g,"\n");if(!e.trim())return"";const n=e.split("\n"),o=[];let r=[],i=!1,s=!1;const a=()=>{if(!r.length)return;const t=r.map(t=>this.formatInlineMarkdown(t)).join("<br>");o.push(`<p>${t}</p>`),r=[]},l=()=>{i&&(o.push("</ul>"),i=!1),s&&(o.push("</ol>"),s=!1)};for(let t=0;t<n.length;t+=1){const e=n[t],c=e.trim();if(this.isMarkdownTableHeader(e,n[t+1])){a(),l();const e=this.parseMarkdownTable(n,t);o.push(e.html),t=e.nextIndex-1;continue}const d=e.match(/^\s*(#{1,6})\s+(.*)$/);if(d){a(),l();const t=d[1].length;o.push(`<h${t}>${this.formatInlineMarkdown(d[2])}</h${t}>`);continue}const p=e.match(/^\s*[-*\u2022]\s+(.*)$/);if(p){a(),s&&(o.push("</ol>"),s=!1),i||(o.push("<ul>"),i=!0),o.push(`<li>${this.formatInlineMarkdown(p[1])}</li>`);continue}const u=e.match(/^\s*\d+\.\s+(.*)$/);u?(a(),i&&(o.push("</ul>"),i=!1),s||(o.push("<ol>"),s=!0),o.push(`<li>${this.formatInlineMarkdown(u[1])}</li>`)):c?r.push(e):(a(),l())}return a(),l(),o.join("\n").trim()}formatInlineMarkdown(t){let e=this.escapeHtml(t);const n=[];e=e.replace(/`([^`]+)`/g,(t,e)=>{const o=`__CODE_${n.length}__`;return n.push(`<code>${e}</code>`),o});const o=[];return e=e.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(t,e,n)=>{const r=`__LINK_${o.length}__`;return o.push(this.buildAnchor(e,n)),r}),e=e.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),e=e.replace(/(^|[^*])\*([^*]+)\*(?!\*)/g,"$1<em>$2</em>"),e=this.linkifyRoutes(e),o.forEach((t,n)=>{e=e.replace(`__LINK_${n}__`,t)}),n.forEach((t,n)=>{e=e.replace(`__CODE_${n}__`,t)}),e}escapeHtml(t){return String(t||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}linkifyRoutes(t){return t.replace(/\/[a-z0-9][a-z0-9/_-]*(?:\?[a-z0-9=&%._-]+)?(?:#[a-z0-9._-]+)?/gi,(e,n,o)=>{const r="number"==typeof n?n:0,i="string"==typeof o?o:t;return">"===(r>0?i[r-1]:"")||this.isRouteBoundary(i,r)?this.buildAnchor(e,e):e})}buildAnchor(t,e){const n=String(e||"").trim();if(!n)return t;const o=/^https?:\/\//i.test(n);return n.startsWith("/")||o?`<a href="${n}" target="_blank" rel="noopener" class="ai-terminal-route-link">${t}</a>`:t}isMarkdownTableHeader(t,e){if(!t||!e)return!1;if(!t.includes("|"))return!1;const n=e.trim();return!!n.includes("|")&&(/^[:|\-\s]+$/.test(n)&&n.includes("-"))}parseMarkdownTable(t,e){const n=this.splitMarkdownTableRow(t[e]);let o=e+2;const r=[];for(;o<t.length;){const e=t[o];if(!e.trim()||!e.includes("|"))break;r.push(this.splitMarkdownTableRow(e)),o+=1}const i=n.length||1,s=t=>{const e=t.slice(0,i);for(;e.length<i;)e.push("");return e};return{html:`<div class="ai-terminal-table-wrap"><table class="ai-terminal-table"><thead><tr>${s(n).map(t=>`<th>${this.formatInlineMarkdown(t)}</th>`).join("")}</tr></thead><tbody>${r.map(t=>`<tr>${s(t).map(t=>`<td>${this.formatInlineMarkdown(t)}</td>`).join("")}</tr>`).join("")}</tbody></table></div>`,nextIndex:o}}splitMarkdownTableRow(t){const e=String(t||"").trim();if(!e)return[];return e.replace(/^\|/,"").replace(/\|$/,"").split("|").map(t=>t.trim())}formatFileSize(t){if(!t||!Number.isFinite(t))return"0 B";if(t<1024)return`${t} B`;const e=t/1024;if(e<1024)return`${e.toFixed(1)} KB`;return`${(e/1024).toFixed(1)} MB`}trackByConversation(t,e){return e?._id||`convo-${t}`}trackByMessage(t,e){return e?._id||`message-${t}`}async createConversation(){this.errorMessage="";try{const{id:t,conversation:e}=await this.createNewConversation();if(!t||!e)return;this.pendingConversationId=t,this.pendingConversation=e,this.activeConversationId=t,this.activeConversation=e,this.conversations=this.mergePendingConversation(this.conversations),this.localMessagesByConversation.set(t,[]),this.refreshMergedMessages(),this.paused||this.subscribeMessages(t)}catch(t){this.errorMessage=t?.message||"Unable to create a new conversation."}}setActiveConversation(t){t?._id&&(this.activeConversationId=t._id,this.activeConversation=t,this.subscribeMessages(t._id))}startRename(t){t?._id&&(this.editingConversationId=t._id,this.editingTitle=t.title||"")}cancelRename(){this.editingConversationId="",this.editingTitle=""}async saveRename(t){if(!t?._id)return;const e=(this.editingTitle||"").trim();if(e)try{await this.terminal.call(this.methodNames().conversationUpdate||DEFAULT_METHODS.conversationUpdate,t._id,{title:e}),this.cancelRename()}catch(t){this.errorMessage=t?.message||"Unable to rename conversation."}else this.cancelRename()}async deleteConversation(t){if(!t?._id)return;if(window.confirm("Delete this conversation?"))try{await this.terminal.call(this.methodNames().conversationDelete||DEFAULT_METHODS.conversationDelete,t._id),this.localMessagesByConversation.delete(t._id),this.activeConversationId===t._id&&(this.activeConversationId="",this.activeConversation=null,this.messages=[])}catch(t){this.errorMessage=t?.message||"Unable to delete conversation."}}async sendMessage(){if(this.isSending)return;const t=(this.messageText||"").trim();if(!t)return;this.errorMessage="",this.isSending=!0;const e=this.generateRequestId();this.messageText="";let n="",o="",r="",i="";try{n=this.ensureLocalConversationForSend(),o=n;if(!0===this.resolveConfig()?.pageRouterEnabled&&!this.pendingFiles.length){const o=this.buildPageRouterContext(t),i=await this.pageRouter.handleMessage({message:t,context:o});if(i?.handled){r=this.appendLocalMessage(n,"user",t,{request_id:e});const o=i.reply||(i.error?`Unable to complete request: ${i.error}`:"Done.");return o&&this.appendLocalMessage(n,"assistant",o,{...i.data||{},request_id:e}),i.error&&(this.errorMessage=i.error),void(this.pendingFiles=[])}}r=this.appendLocalMessage(n,"user",t,{request_id:e}),i=this.appendLocalMessage(n,"assistant","Queued...",{progress:["Queued"],request_id:e},{pending:!0}),i&&this.schedulePendingProgress(i),n=await this.ensureConversationId(),n&&o&&n!==o&&this.reparentLocalConversation(o,n),n&&i&&this.updateLocalMessage(n,i,{content:"Planning...",metadata:{progress:["Planning"],pending:!0,request_id:e}}),n&&this.subscribedConversationId!==n&&this.subscribeMessages(n);const s=await this.uploadPendingFiles(),a={id_conversation:n||void 0,id_client:this.idClient||void 0,id_app:this.idApp||void 0,message:t,request_id:e,attachments:s,delete_files_after_run:this.deleteFilesAfterRun(),context:this.buildMessageContext(t)};if("openai"===this.resolveMode()){a.guardrails=!1!==this.resolveConfig()?.guardrails,a.profile_id=this.resolveConfig()?.profileId,a.config={mode:"openai",model:this.resolveConfig()?.model,system_prompt:this.resolveConfig()?.systemPrompt,user_prompt_template:this.resolveConfig()?.userPromptTemplate,response_format:this.resolveConfig()?.responseFormat,temperature:this.resolveConfig()?.temperature,max_tokens:this.resolveConfig()?.maxTokens};const t=await this.terminal.call(this.methodNames().runOpenAI||DEFAULT_METHODS.runOpenAI,a);this.applyServerMessageToLocal(n,e,t?.message),this.afterRunResponse(t?.conversation)}else{if(!a.id_app)throw new Error("App id is required for code changes.");const t=this.resolveMongoConfig();t&&(a.mongo=t);const o=this.resolveCodexPayloadConfig();o&&(a.config=o);const r=await this.terminal.call(this.methodNames().runCodex||DEFAULT_METHODS.runCodex,a);this.applyServerMessageToLocal(n,e,r?.message,r?.tool_result),this.afterRunResponse(r?.conversation)}this.pendingFiles=[]}catch(t){this.errorMessage=t?.message||"Unable to send message.",n&&r&&this.removeLocalMessage(n,r),n&&i&&this.removeLocalMessage(n,i)}finally{this.isSending=!1}}async startNewConversation(){this.pendingConversationId="",this.pendingConversation=null,this.activeConversationId="",this.activeConversation=null,this.subscribedConversationId="",this.serverMessages=[],this.messages=[],this.refreshMergedMessages(),await this.createConversation()}async deployTest(){if(this.activeConversationId&&!this.isDeployingTest){this.errorMessage="",this.infoMessage="",this.isDeployingTest=!0;try{const t=await this.terminal.call(this.methodNames().deployTest||DEFAULT_METHODS.deployTest,this.activeConversationId);this.infoMessage=t?.build_id?`Test deploy started (${t.build_id}).`:"Test deploy started."}catch(t){this.errorMessage=t?.message||"Unable to deploy test build."}finally{this.isDeployingTest=!1}}}handleFileSelect(t){const e=t.target,n=Array.from(e?.files||[]);if(!n.length)return;const o=1024*this.maxFileMb()*1024,r=1024*this.maxTotalMb()*1024;let i=this.pendingFiles.reduce((t,e)=>t+e.size,0);n.forEach(t=>{t.size>o?this.errorMessage=`File ${t.name} exceeds ${this.maxFileMb()}MB.`:i+t.size>r?this.errorMessage=`Total upload size exceeds ${this.maxTotalMb()}MB.`:(i+=t.size,this.pendingFiles.push(t))}),e.value=""}removePendingFile(t){this.pendingFiles.splice(t,1)}clearComposer(){this.messageText="",this.pendingFiles=[]}resolveConfig(){return this.config||null}resolveMongoConfig(){const t=this.resolveConfig()?.mongo;return t?void 0===t.access&&void 0!==t.readonly?{...t,access:t.readonly?"read":"readWrite"}:t:null}resolveMode(){return this.resolveConfig()?.mode||"openai"}resolveCodexPayloadConfig(){const t=this.resolveConfig();if(!t)return null;const e=String(t.model||"").trim(),n=this.resolveCodexFallbackModels(t);if(!e&&!n.length)return null;const o={mode:"codex"};return e&&(o.model=e),1===n.length?o.fallback_model=n[0]:n.length>1&&(o.fallback_models=n),o}resolveCodexFallbackModels(t){const e=[],n=t=>{const n=String(t||"").trim();n&&!e.includes(n)&&e.push(n)};if(Array.isArray(t.fallbackModels))t.fallbackModels.forEach(n);else{const e=String(t?.fallbackModels||"").trim();e&&e.split(",").forEach(n)}return n(t.fallbackModel),e}resolveBranchEnabled(){const t=this.resolveConfig();return void 0!==t?.branchEnabled?!!t.branchEnabled:"codex"===this.resolveMode()}methodNames(){return{...DEFAULT_METHODS,...this.resolveConfig()?.methodNames||{}}}subscribeConversations(t=!1){if(this.paused)return void(this.isLoading=!1);const e=this.methodNames().conversationsPublication||DEFAULT_METHODS.conversationsPublication,n=JSON.stringify({publication:e,idClient:this.idClient||"",idApp:this.idApp||"",status:this.conversationStatus||"active",bypass:!!this.bypassRouteSubscriptions});if(this.conversationsSub&&!this.conversationsSub.closed&&this.conversationsSubKey===n)return this.conversations=this.filterConversations(this.conversations||[]),this.ensureActiveConversation(t),void(this.isLoading=!1);this.conversationsSubKey=n,this.conversationsSub?.unsubscribe(),this.isLoading=!0;const o=this.bypassRouteSubscriptions?this.terminal.subscribeBypass(e,this.idClient||"",this.idApp||"",this.conversationStatus||"active"):this.terminal.subscribe(e,this.idClient||"",this.idApp||"",this.conversationStatus||"active");this.conversationsSub=o.subscribe({next:e=>{this.conversations=this.mergePendingConversation(this.filterConversations(e||[])),this.ensureActiveConversation(t),this.isLoading=!1},error:()=>{this.errorMessage="Unable to load conversations.",this.isLoading=!1}})}filterConversations(t){const e=this.resolveMode();return(t||[]).filter(t=>!e||(!t.mode||t.mode===e))}ensureActiveConversation(t=!1){if(this.activeConversationId){const e=this.conversations.find(t=>t._id===this.activeConversationId);if(e)return this.activeConversation=e,void(t&&this.subscribeMessages(e._id,!0))}this.conversations.length?this.setActiveConversation(this.conversations[0]):(this.activeConversationId="",this.activeConversation=null,this.messages=[],this.serverMessages=[],this.refreshMergedMessages(),this.messagesSub?.unsubscribe())}subscribeMessages(t,e=!1){if(this.paused)return;const n=this.methodNames().messagesPublication||DEFAULT_METHODS.messagesPublication,o=JSON.stringify({publication:n,conversationId:t,limit:this.messageLimit,bypass:!!this.bypassRouteSubscriptions});if(this.messagesSub&&!this.messagesSub.closed&&this.messagesSubKey===o)return;this.messagesSubKey=o,this.messagesSub?.unsubscribe();const r=this.subscribedConversationId===t;this.subscribedConversationId=t,e&&r||(this.serverMessages=[],this.refreshMergedMessages());const i=this.bypassRouteSubscriptions?this.terminal.subscribeBypass(n,t,this.messageLimit):this.terminal.subscribe(n,t,this.messageLimit);this.messagesSub=i.subscribe({next:t=>{this.serverMessages=t||[],this.refreshMergedMessages()},error:()=>{this.errorMessage="Unable to load messages."}})}async uploadPendingFiles(){if(!this.allowUploads()||!this.pendingFiles.length)return[];const t=await this.ensureConversationId(),e=[];for(const n of this.pendingFiles){const o=await this.readFileAsBase64(n),r="codex"===this.resolveMode()?this.methodNames().uploadCodex||DEFAULT_METHODS.uploadCodex:this.methodNames().uploadOpenAI||DEFAULT_METHODS.uploadOpenAI,i=await this.terminal.call(r,t,n.name,o,n.size,n.type);e.push({id:i?.id_file||i?.id,name:i?.name||n.name,type:i?.type||n.type,size:i?.size||n.size,local_path:i?.local_path})}return e}readFileAsBase64(t){return new Promise((e,n)=>{const o=new FileReader;o.onload=()=>{const t="string"==typeof o.result?o.result:"",n=t.includes(",")?t.split(",")[1]:t;e(n)},o.onerror=()=>{n(o.error||new Error("Unable to read file."))},o.readAsDataURL(t)})}afterRunResponse(t){if(t?._id){const e=this.subscribedConversationId!==t._id;this.activeConversationId=t._id,this.activeConversation=t,!this.paused&&e&&this.subscribeMessages(t._id)}}handleComposerKeydown(t){t.isComposing||"Enter"===t.key&&(t.shiftKey||(t.preventDefault(),!this.isSending&&(this.messageText||"").trim()&&this.sendMessage()))}buildMessageContext(t){const e=String(this.contextRoute||"").trim();if("all"===this.contextMode)return{mode:"all"};if("current"===this.contextMode)return e?{mode:"current",route:e}:{mode:"all"};if(!e)return{mode:"all"};const n=String(t||"").toLowerCase();return[/\bthis\s+(page|screen|view|panel|form|tab|section|dialog|modal|drawer)\b/,/\bon\s+this\b/,/\bcurrent\s+(page|screen|view)\b/,/\bhere\b/,/\bwhy\s+is\s+(this|it)\b/,/\bwhy\s+does\s+(this|it)\b/,/\bwhat\s+is\s+(this|it)\b/].some(t=>t.test(n))?{mode:"current",route:e}:{mode:"all"}}buildPageRouterContext(t){const e=String(this.contextRoute||"").trim(),n=this.buildMessageContext(t).mode,o=this.services?._app?.environment?.value||{},r=o.FEATURE_FLAGS&&"object"==typeof o.FEATURE_FLAGS?o.FEATURE_FLAGS:o.FEATURE_GATES&&"object"==typeof o.FEATURE_GATES?o.FEATURE_GATES:o.MODULE_GATES&&"object"==typeof o.MODULE_GATES?o.MODULE_GATES:void 0;return{route:e||void 0,mode:n,idClient:this.idClient||void 0,idApp:this.idApp||void 0,featureFlags:r}}refreshMergedMessages(){const t=this.activeConversationId||"";let e=t&&this.localMessagesByConversation.get(t)||[];e=this.syncLocalMessages(t,e,this.serverMessages),this.messages=this.mergeMessages(this.serverMessages,e),this.applyStoredSupportTicketOverrides(),this.applyStoredMongoReadOverrides(),this.processSupportTicketDirectives(this.messages),this.processMongoDirectives(this.messages),this.scrollToBottom()}mergeMessages(t,e){const n=new Set;(e||[]).forEach(t=>{if(!this.isPendingAssistantMessage(t))return;const e=String(t?.metadata?.request_id||"").trim();e&&n.add(e)});const o=[...(t||[]).filter(t=>{if("assistant"!==t?.role||!0!==t?.metadata?.pending)return!0;const e=String(t?.metadata?.request_id||"").trim();return!e||!n.has(e)}),...e||[]],r=new Set;return o.filter(t=>{const e=String(t?._id||"").trim()||`${t?.role||"message"}:${this.messageTimestamp(t)}:${t?.content||""}`;return!r.has(e)&&(r.add(e),!0)}).sort((t,e)=>this.compareMessages(t,e))}syncLocalMessages(t,e,n){if(!t||!e.length||!n.length)return e;const o=new Map,r=[],i=new Set,s=new Set,a=new Map;n.forEach(t=>{const e=t?.role||"",n=this.normalizeMessageContent(t?.content);if(e&&n){const t=`${e}::${n}`;o.set(t,(o.get(t)||0)+1)}if("assistant"===e){const e=this.messageTimestamp(t);e>0&&r.push(e)}const l=String(t?.metadata?.request_id||"").trim();l&&(i.add(l),"assistant"===e&&(s.add(l),a.has(l)||a.set(l,t)))});let l=!1;a.size&&(e=(e||[]).map(t=>{if(!this.isPendingAssistantMessage(t))return t;const e=String(t?.metadata?.request_id||"").trim();if(!e)return t;const n=a.get(e);if(!n?.metadata?.pending)return t;const o=this.mergeProgressLists(t?.metadata?.progress,n?.metadata?.progress),r=Array.isArray(t?.metadata?.progress)?t.metadata?.progress:[];if(!o.length)return t;return o.length!==r.length||o.some((t,e)=>t!==r[e])?(l=!0,{...t,metadata:{...t.metadata||{},progress:o},updatedAt:new Date}):t}));const c=[],d=e.filter(t=>{if(!this.isLocalMessage(t))return!0;const e=String(t?.metadata?.request_id||"").trim();if(this.isPendingAssistantMessage(t)){if(e){const n=a.get(e);if(n)return!0===n?.metadata?.pending||(t?._id&&c.push(String(t._id)),!1)}const n=this.messageTimestamp(t);if(e&&s.has(e))return t?._id&&c.push(String(t._id)),!1;if(!n||!r.length)return!0;const o=!r.some(t=>t>=n);return!o&&t?._id&&c.push(String(t._id)),o}if(e&&i.has(e))return t?._id&&c.push(String(t._id)),!1;const n=t?.role||"",l=this.normalizeMessageContent(t?.content);if(!n||!l)return!0;const d=`${n}::${l}`,p=o.get(d)||0;return!(p>0)||(o.set(d,p-1),t?._id&&c.push(String(t._id)),!1)});return d.length!==e.length?(this.localMessagesByConversation.set(t,d),c.forEach(t=>this.clearPendingProgressTimers(t))):l&&this.localMessagesByConversation.set(t,d),d}messageTimestamp(t){const e=t?.createdAt,n=t?.updatedAt,o=e?new Date(e).getTime():0;if(o)return o;const r=n?new Date(n).getTime():0;if(r)return r;const i=String(t?.metadata?.request_id||"").trim();if(i){const t=i.match(/-(\d{10,})-/);if(t?.[1]){const e=Number(t[1]);if(Number.isFinite(e)&&e>0)return e}}return 0}compareMessages(t,e){const n=this.messageTimestamp(t),o=this.messageTimestamp(e),r=String(t?.role||"").toLowerCase(),i=String(e?.role||"").toLowerCase(),s=String(t?.metadata?.request_id||"").trim(),a=String(e?.metadata?.request_id||"").trim();if("assistant"===r&&"user"===i&&s&&(!a||s===a))return 1;if("assistant"===i&&"user"===r&&a&&(!s||s===a))return-1;if(0===n&&0!==o)return 1;if(0===o&&0!==n)return-1;if(n!==o)return n-o;if(s&&s===a){const n=this.roleSortRank(t)-this.roleSortRank(e);if(0!==n)return n}const l=this.roleSortRank(t)-this.roleSortRank(e);if(0!==l)return l;const c=String(t?._id||""),d=String(e?._id||"");if(c&&d&&c!==d)return c.localeCompare(d);const p=String(t?.content||""),u=String(e?.content||"");return p.localeCompare(u)}roleSortRank(t){const e=String(t?.role||"").toLowerCase();return"user"===e?0:"assistant"===e?1:"tool"===e?2:3}isLocalMessage(t){return!0===t?.metadata?.local}isPendingAssistantMessage(t){return this.isLocalMessage(t)&&"assistant"===t?.role&&!0===t?.metadata?.pending}normalizeMessageContent(t){return this.normalizeUsdCurrencyText(String(t||"").trim())}normalizeUsdCurrencyText(t){const e=String(t||"");return e?e.replace(AI_TERMINAL_USD_CURRENCY_TEXT_PATTERN,(t,e)=>`$${e}`):""}mergeProgressLists(t,e){const n=[],o=new Set,r=t=>{const e=String(t||"").trim();if(!e)return;const r=e.toLowerCase();o.has(r)||(o.add(r),n.push(e))};return(Array.isArray(t)?t:[]).forEach(r),(Array.isArray(e)?e:[]).forEach(r),n}appendLocalMessage(t,e,n,o,r){const i=String(n||"").trim();if(!t||!i)return"";const s=new Date,a=`local-${s.getTime()}-${this.localMessageCounter++}`,l={...o||{},local:!0};r?.pending&&(l.pending=!0);const c={_id:a,id_conversation:t,role:e,content:i,metadata:l,createdAt:s,updatedAt:s},d=this.localMessagesByConversation.get(t)||[];return d.push(c),this.localMessagesByConversation.set(t,d),this.refreshMergedMessages(),a}removeLocalMessage(t,e){if(!t||!e)return;const n=this.localMessagesByConversation.get(t)||[];if(!n.length)return;const o=n.filter(t=>t?._id!==e);o.length!==n.length&&(this.localMessagesByConversation.set(t,o),this.clearPendingProgressTimers(e),this.refreshMergedMessages())}updateLocalMessage(t,e,n){if(!t||!e)return;const o=this.localMessagesByConversation.get(t)||[];if(!o.length)return;const r=o.findIndex(t=>t?._id===e);if(-1===r)return;const i=o[r],s={...i,...n,metadata:{...i.metadata||{},...n.metadata||{}},updatedAt:n.updatedAt||new Date};o[r]=s,this.localMessagesByConversation.set(t,o),this.refreshMergedMessages()}findLocalMessageById(t){if(!t)return null;for(const[e,n]of this.localMessagesByConversation.entries()){const o=(n||[]).find(e=>e?._id===t);if(o)return{conversationId:e,message:o}}return null}schedulePendingProgress(t){if(!t)return;this.clearPendingProgressTimers(t);const e=[];[{delay:4500,label:"Grabbing Data"},{delay:9e3,label:"Drafting response"}].forEach(n=>{const o=setTimeout(()=>{const e=this.findLocalMessageById(t);if(!e||!e.message?.metadata?.pending)return void this.clearPendingProgressTimers(t);const o=Array.isArray(e.message.metadata?.progress)?[...e.message.metadata.progress]:[];o.map(t=>String(t||"").toLowerCase()).includes(n.label.toLowerCase())||(o.push(n.label),this.updateLocalMessage(e.conversationId,t,{metadata:{progress:o}}))},n.delay);e.push(o)}),this.pendingProgressTimers.set(t,e)}clearPendingProgressTimers(t){const e=this.pendingProgressTimers.get(t);e&&(e.forEach(t=>clearTimeout(t)),this.pendingProgressTimers.delete(t))}applyServerMessageToLocal(t,e,n,o){if(!t||!e||!n)return;const r=this.localMessagesByConversation.get(t)||[],i=r.findIndex(t=>"assistant"===t?.role&&t?.metadata?.request_id===e);if(-1===i)return;const s=r[i],a={...s.metadata||{},...n.metadata||{},pending:!1};o&&(a.tool_result=o);const l={...s,content:n.content||s.content,metadata:a,usage:n.usage||s.usage,createdAt:n.createdAt||s.createdAt,updatedAt:n.updatedAt||new Date};r[i]=l,this.localMessagesByConversation.set(t,r),this.clearPendingProgressTimers(s?._id||n._id||""),this.refreshMergedMessages()}async ensureConversationId(){if(this.activeConversationId&&!this.isLocalConversationId(this.activeConversationId))return this.activeConversationId;const t=this.activeConversationId,{id:e,conversation:n}=await this.createNewConversation();return e&&(this.activeConversationId=e,n&&(this.pendingConversationId=e,this.pendingConversation=n,this.conversations=this.mergePendingConversation(this.conversations)),t&&t!==e&&this.reparentLocalConversation(t,e)),e}ensureLocalConversationForSend(){if(this.activeConversationId)return this.activeConversationId;const t=new Date,e=`local-convo-${t.getTime()}-${this.localConversationCounter++}`,n={_id:e,id_client:this.idClient||void 0,id_app:this.idApp||void 0,title:"Ask AI About the System",mode:this.resolveMode(),status:this.conversationStatus||"active",profile_id:this.resolveConfig()?.profileId,metadata:{pending:!0,local:!0},createdAt:t,updatedAt:t};return this.pendingConversationId=e,this.pendingConversation=n,this.activeConversationId=e,this.activeConversation=n,this.conversations=this.mergePendingConversation(this.conversations),this.localMessagesByConversation.has(e)||this.localMessagesByConversation.set(e,[]),this.refreshMergedMessages(),e}isLocalConversationId(t){return String(t||"").startsWith("local-convo-")}reparentLocalConversation(t,e){if(!t||!e||t===e)return;const n=this.localMessagesByConversation.get(t)||[];if(n.length){const t=n.map(t=>({...t,id_conversation:e})),o=this.localMessagesByConversation.get(e)||[];this.localMessagesByConversation.set(e,[...o,...t])}this.localMessagesByConversation.delete(t),this.activeConversationId===t&&(this.activeConversationId=e),this.subscribedConversationId===t&&(this.subscribedConversationId=e),this.pendingConversationId===t&&(this.pendingConversationId=e),this.pendingConversation&&this.pendingConversation._id===t&&(this.pendingConversation={...this.pendingConversation,_id:e})}generateRequestId(){return`req-${Date.now()}-${this.requestCounter++}`}scrollToBottom(){setTimeout(()=>{const t=this.messageScroll?.nativeElement;t&&(t.scrollTop=t.scrollHeight)},50)}splitMessageContent(t){const e=String(t||"");if(!e)return[];const n=/\/[a-z0-9][a-z0-9/_-]*(?:\?[a-z0-9=&%_-]+)?(?:#[a-z0-9_-]+)?/g,o=[];let r,i=0;for(;null!==(r=n.exec(e));){const t=r[0],n=r.index;if(!this.isRouteBoundary(e,n))continue;n>i&&o.push({text:e.slice(i,n)});const s=this.shouldLinkRoute(t);o.push(s?{text:t,route:t}:{text:t}),i=n+t.length}return i<e.length&&o.push({text:e.slice(i)}),o.length?o:[{text:e}]}isRouteBoundary(t,e){if(0===e)return!0;const n=t[e-1];return/[\s\[\]({'"`.,;:!?]/.test(n)}getMessageContent(t){const e=String(t?._id||"").trim();return e&&this.messageContentOverrides.has(e)?this.normalizeUsdCurrencyText(this.messageContentOverrides.get(e)||""):this.normalizeUsdCurrencyText(String(t?.content||""))}displayTableForMessage(t){const e=this.resolveDisplayTable(t);if(!e)return null;const n=this.getMessageContent(t);return this.containsMarkdownTable(n)&&!t?.metadata?.tool_result?.output?.display?null:e}isTableCollapsed(t){const e=String(t?._id||"").trim();return!!e&&this.collapsedTableIds.has(e)}toggleTable(t){const e=String(t?._id||"").trim();e&&(this.collapsedTableIds.has(e)?this.collapsedTableIds.delete(e):this.collapsedTableIds.add(e))}get timeZoneLabel(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"Local"}catch{return"Local"}}pendingProgress(t){if(!t?.metadata?.pending)return null;const e=t?.metadata?.progress,n=Array.isArray(e)?e.map(t=>String(t||"").trim()).filter(Boolean):[],o=n.length?n:["Planning"],r=this.resolvePendingElapsed(t),i=[];r>=4500&&i.push("Grabbing Data"),r>=9e3&&i.push("Drafting response");const s=[],a=new Set;return[...o,...i].forEach(t=>{const e=String(t||"").trim();if(!e)return;const n=e.toLowerCase();a.has(n)||(a.add(n),s.push(e))}),s.length?s:null}resolvePendingElapsed(t){const e=this.messageTimestamp(t);return e?Math.max(0,Date.now()-e):0}ensureMessageSubscription(){if(this.paused)return;const t=this.activeConversationId||"";if(!t||this.isLocalConversationId(t))return;const e=this.methodNames().messagesPublication||DEFAULT_METHODS.messagesPublication,n=JSON.stringify({publication:e,conversationId:t,limit:this.messageLimit,bypass:!!this.bypassRouteSubscriptions});(!this.messagesSub||this.messagesSub.closed||this.messagesSubKey!==n)&&this.subscribeMessages(t,!0)}formatDisplayCell(t,e){if(null==t||""===t)return"N/A";if(Array.isArray(t))return this.truncateText(t.map(t=>String(t)).join(", "),200);if(t instanceof Date)return formatDate(t,"short",this.locale);if("object"==typeof t)try{return this.truncateText(JSON.stringify(t),200)}catch{return this.truncateText(String(t),200)}const n=this.formatScalarValue(t,e);return this.truncateText(n,200)}formatScalarValue(t,e){const n=this.resolveNumericValue(t),o=String(e||"").toLowerCase();if(this.isDateColumn(o)&&this.isLikelyDateValue(t)){const e=t instanceof Date?t:new Date(t);if(!Number.isNaN(e.getTime()))return formatDate(e,"short",this.locale)}if(null!==n){if(this.isPercentColumn(o)){return formatPercent(n>1&&n<=100?n/100:n,this.locale,"1.0-2")}return this.isCurrencyColumn(o)?formatCurrency(n,this.locale,this.currencySymbol,"USD","1.2-2"):formatNumber(n,this.locale,"1.0-2")}if(this.isLikelyDateValue(t)&&this.isDateColumn(o)){const e=t instanceof Date?t:new Date(t);if(!Number.isNaN(e.getTime()))return formatDate(e,"short",this.locale)}return String(t)}resolveNumericValue(t){if("number"==typeof t&&Number.isFinite(t))return t;if("string"==typeof t){const e=t.replace(/[^0-9.+-]/g,"");if(!e)return null;const n=Number(e);return Number.isFinite(n)?n:null}return null}isPercentColumn(t){return/(percent|pct|percentage|ratio|rate)\b/.test(t)}isCurrencyColumn(t){return/(amount|total|price|cost|balance|fee|revenue|invoice|usd|tax|subtotal)\b/.test(t)}isDateColumn(t){return/(date|time|created|updated|timestamp|at)\b/.test(t)}isLikelyDateValue(t){if(!t)return!1;if(t instanceof Date)return!0;if("string"==typeof t){if(!/[0-9]/.test(t))return!1;const e=Date.parse(t);return!Number.isNaN(e)}return!1}resolveDisplayTable(t){const e=String(t?._id||"").trim(),n=e?this.messageDisplayOverrides.get(e):null,o=t?.metadata?.tool_result?.output?.display,r=n||o;if(!r||!Array.isArray(r.columns)||!Array.isArray(r.rows))return null;const i=!0===r.includeIds,s=r.columns.filter(t=>i||!this.shouldHideDisplayColumn(t)).map(t=>({key:t,label:this.formatDisplayColumn(t)}));if(!s.length)return null;const a=(r.rows||[]).map(t=>{const e={};return s.forEach(({key:n,label:o})=>{e[o]=t?.[n]??t?.[o]}),e});return{...r,columns:s.map(t=>t.label),rows:a}}isSuperAdmin(){return!!this.services?._account?.isUserSuperAdmin()}resolveDebugPayload(t){const e=t?.metadata?.debug;if(e&&"object"==typeof e)return e;const n=t?.metadata?.tool_result?.output?.debug;if(n&&"object"==typeof n)return n;const o=t?.metadata?.tool_result?.debug;return o&&"object"==typeof o?o:null}showDebugForMessage(t){return!!this.isSuperAdmin()&&("assistant"===t?.role&&!!this.resolveDebugPayload(t))}canCopyMessage(t){return!(!t||t.metadata?.pending||"assistant"!==t.role&&"user"!==t.role)}async copyMessage(t){if(!this.canCopyMessage(t))return;const e=this.buildCopyText(t);if(!e)return;let n=!1;try{navigator?.clipboard?.writeText&&(await navigator.clipboard.writeText(e),n=!0)}catch{}n||(n=this.copyTextFallback(e)),n&&this._services._alert.setAlert("success","Copied to clipboard")}async copyAssistantResponse(t){await this.copyMessage(t)}buildCopyText(t){const e=this.getMessageContent(t);let n=String(e||"").trim();if(this.isSuperAdmin()){const e=this.resolveDebugPayload(t);if(e){const t=this.stringifyCopyDebug(e);t&&(n=n?`${n}\n\nDebug:\n${t}`:`Debug:\n${t}`)}}return n.trim()}stringifyCopyDebug(t){try{return JSON.stringify(t,null,2)}catch{return String(t||"")}}copyTextFallback(t){const e=String(t||"");if(!e)return!1;const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly","true"),n.style.position="fixed",n.style.top="-1000px",n.style.opacity="0",document.body.appendChild(n),n.select();let o=!1;try{o=document.execCommand("copy")}catch{}finally{document.body.removeChild(n)}return o}toggleDebug(t){const e=String(t?._id||"").trim();e&&(this.expandedDebugIds.has(e)?this.expandedDebugIds.delete(e):this.expandedDebugIds.add(e))}isDebugCollapsed(t){const e=String(t?._id||"").trim();return!e||!this.expandedDebugIds.has(e)}debugText(t){const e=this.resolveDebugPayload(t);if(!e)return"";try{return this.truncateText(JSON.stringify(e,null,2),8e3)}catch{return this.truncateText(String(e),8e3)}}canExportMessage(t){const e=t?.metadata?.tool_result;return!(!e?.input||!e?.type)&&("mongo_read"===e.type||"mongo_agg"===e.type)}isExportingMessage(t){const e=String(t?._id||"").trim();return!!e&&this.exportingMessageIds.has(e)}async exportMessageTable(t){const e=String(t?._id||"").trim();if(!e||this.isExportingMessage(t)||!this.canExportMessage(t))return;const n=t?.metadata?.tool_result;if(n?.input){this.exportingMessageIds.add(e),this.errorMessage="",this.infoMessage="";try{const t={...n.input||{}},e=t.options&&"object"==typeof t.options?{...t.options}:{};e.export=!0,e.skip=0;const o=n?.output?.display?.rows?.length||n?.output?.rowCount||0,r="number"==typeof n?.output?.total?n.output.total:null;(!0===n?.output?.truncated||null!==r&&r>o||"number"!=typeof e.limit)&&(e.limit=5e3),t.options=e,!t.permissionView&&this.contextRoute&&(t.permissionView=this.contextRoute),!t.id_client&&this.idClient&&(t.id_client=this.idClient);const i=this.resolveMongoConfig();i&&(t.mongo=i);const s="mongo_agg"===n.type?"aiAssistantMongoAggregate":"aiAssistantMongoRead",a=await this.terminal.call(s,t),l=a?.display;if(!l?.rows?.length)return void(this.infoMessage="No rows returned to export.");const c=Array.isArray(l.columns)&&l.columns.length?l.columns:Object.keys(l.rows[0]||{}),d=l.rows.map(t=>{const e={};return c.forEach(n=>{e[n]=this.formatDisplayCell(t?.[n],n)}),e});exportCsv(d,this.buildExportFilename(n,l),{showLabels:!0,headers:c}),this.infoMessage=`Exported ${d.length} rows.`}catch(t){this.errorMessage=t?.message||"Unable to export data."}finally{this.exportingMessageIds.delete(e)}}}buildExportFilename(t,e){return`${String(t?.output?.collection||t?.input?.collection||"export").trim()||"export"}-${formatDate(new Date,"yyyyMMdd-HHmm",this.locale)}-${e?.rows?.length||0}rows`}shouldHideDisplayColumn(t){const e=String(t||"").trim().toLowerCase().replace(/\s+/g,"_");if(!e)return!0;if("_id"===e||"__v"===e)return!0;if(e.startsWith("id_"))return!0;const n=e.split(".");return(n[n.length-1]||"").startsWith("id_")}formatDisplayColumn(t){const e=String(t||"").trim();if(!e)return"";if("_id"===e)return"id";if("_group"===e)return"Group";const n=e.replace(/[\s_]+/g,"").toLowerCase();return"createdat"===n?"Created At":"updatedat"===n?"Updated At":e}containsMarkdownTable(t){const e=String(t||"").split("\n");for(let t=0;t<e.length-1;t+=1)if(this.isMarkdownTableHeader(e[t],e[t+1]))return!0;return!1}stripMarkdownTables(t){const e=String(t||"").split("\n"),n=[];for(let t=0;t<e.length;t+=1)if(this.isMarkdownTableHeader(e[t],e[t+1]))for(t+=1;t+1<e.length;){const n=e[t+1];if(!n||!n.includes("|"))break;t+=1}else n.push(e[t]);return n.join("\n").trim()}loadSupportTicketMap(){try{const t=localStorage.getItem(this.supportTicketStorageKey);if(!t)return;const e=JSON.parse(t||"{}");Object.entries(e||{}).forEach(([t,e])=>{"string"==typeof t&&"string"==typeof e&&this.supportTicketMap.set(t,e)})}catch{}}saveSupportTicketMap(){try{const t={};this.supportTicketMap.forEach((e,n)=>{t[n]=e}),localStorage.setItem(this.supportTicketStorageKey,JSON.stringify(t))}catch{}}applyStoredSupportTicketOverrides(){this.supportTicketMap.size&&(this.messages||[]).forEach(t=>{const e=String(t?._id||"").trim();if(!e)return;const n=this.supportTicketMap.get(e);if(!n)return;const o=this.extractSupportTicketDirective(String(t?.content||"")),r=o?.cleaned||String(t?.content||""),i=this.appendSupportTicketLink(r,n);this.messageContentOverrides.set(e,i),this.clearMessageRenderCaches()})}processSupportTicketDirectives(t){(t||[]).forEach(t=>{if("assistant"!==t?.role)return;const e=String(t?._id||"").trim();if(!e)return;if(this.supportTicketMap.has(e)||this.supportTicketInFlight.has(e))return;const n=this.extractSupportTicketDirective(String(t?.content||""));n&&(this.messageContentOverrides.set(e,n.cleaned),this.clearMessageRenderCaches(),this.supportTicketInFlight.add(e),this.createSupportTicketFromDirective(e,n.summary).finally(()=>this.supportTicketInFlight.delete(e)))})}extractSupportTicketDirective(t){const e=String(t||"").split("\n"),n=e.findIndex(t=>t.trim().replace(/^[-*•]+\s*/,"").toUpperCase().startsWith("SUPPORT_TICKET_CREATE:"));if(-1===n)return null;let o=e[n].trim().replace(/^[-*•]+\s*/,"").split(":").slice(1).join(":").trim();if(!o){const t=e.slice(n+1).find(t=>t.trim());t&&(o=t.trim())}return{summary:o||"",cleaned:e.filter((t,e)=>e!==n).join("\n").trim()}}appendSupportTicketLink(t,e){const n=String(t||"").trim(),o=`Support ticket created: /support-ticket/detail/${e}`;return n?n.includes(o)?n:`${n}\n\n${o}`.trim():o}async createSupportTicketFromDirective(t,e){const n=this.resolveSupportTicketIssue(e),o=this.buildSupportTicketPayload(n);if(o)try{const e=await this.terminal.call("supportInsertSupportTicket",o),n=String(e||"").trim();if(!n)throw new Error("Support ticket creation failed.");this.supportTicketMap.set(t,n),this.saveSupportTicketMap();const r=this.messageContentOverrides.get(t)||"",i=this.appendSupportTicketLink(r,n);this.messageContentOverrides.set(t,i),this.clearMessageRenderCaches()}catch(t){this.errorMessage=t?.message||"Unable to create support ticket."}else this.errorMessage="Unable to create support ticket."}applyStoredMongoReadOverrides(){this.mongoReadCache.size&&(this.messages||[]).forEach(t=>{const e=String(t?._id||"").trim();if(!e)return;const n=this.mongoReadCache.get(e);n&&(this.messageContentOverrides.set(e,n),this.clearMessageRenderCaches())})}processMongoDirectives(t){(t||[]).forEach(t=>{if("assistant"!==t?.role)return;const e=String(t?._id||"").trim();if(!e)return;if(this.mongoReadCache.has(e)||this.mongoReadInFlight.has(e))return;const n=this.extractMongoDirective(String(t?.content||""));if(!n)return;this.messageContentOverrides.set(e,n.cleaned),this.clearMessageRenderCaches(),this.mongoReadInFlight.add(e);("aggregate"===n.type?this.createMongoAggregateFromDirective(e,n.payload,n.cleaned):this.createMongoReadFromDirective(e,n.payload,n.cleaned)).finally(()=>this.mongoReadInFlight.delete(e))})}extractMongoDirective(t){const e=String(t||"").split("\n"),n=e.findIndex(t=>{const e=t.trim().replace(/^[-*•]+\s*/,"").toUpperCase();return e.startsWith("MONGO_READ:")||e.startsWith("MONGO_AGG:")||e.startsWith("MONGO_AGGREGATE:")});if(-1===n)return null;const o=e[n].trim().replace(/^[-*•]+\s*/,""),r=o.toUpperCase();let i=null;if(r.startsWith("MONGO_READ:")?i="read":(r.startsWith("MONGO_AGG:")||r.startsWith("MONGO_AGGREGATE:"))&&(i="aggregate"),!i)return null;const s=o.indexOf(":"),a=s>=0?o.slice(s+1).trim():"";if(!a)return null;try{const t=JSON.parse(a);if(!t||"object"!=typeof t)return null;return{type:i,payload:t,cleaned:e.filter((t,e)=>e!==n).join("\n").trim()}}catch{return null}}resolveMongoCountIntent(t){const e=this.messages||[],n=this.findPreviousUserMessage(t,e);return!!n?.content&&this.isMongoCountQuestion(n.content)}findPreviousUserMessage(t,e){if(!t||!e.length)return null;const n=e.findIndex(e=>String(e?._id||"").trim()===t);if(n>0)for(let t=n-1;t>=0;t-=1)if("user"===e[t]?.role)return e[t];for(let t=e.length-1;t>=0;t-=1)if("user"===e[t]?.role)return e[t];return null}isMongoCountQuestion(t){const e=String(t||"").toLowerCase();if(!e)return!1;return[/\bhow many\b/,/\bnumber of\b/,/\bcount\b/,/\btotal (number|count)\b/,/\btotal (records|entries|items)\b/].some(t=>t.test(e))}async createMongoReadFromDirective(t,e,n){const o={...e||{}},r=this.resolveMongoCountIntent(t),i=r||!0===o?.options?.includeTotal;if(i){const t=o.options&&"object"==typeof o.options?{...o.options}:{};!0!==t.includeTotal&&(t.includeTotal=!0),r&&("number"!=typeof t.limit&&(t.limit=1),t.projection&&"object"==typeof t.projection&&Object.keys(t.projection).length||(t.projection={_id:1})),o.options=t}!o.permissionView&&this.contextRoute&&(o.permissionView=this.contextRoute),!o.id_client&&this.idClient&&(o.id_client=this.idClient);const s=this.resolveMongoConfig();s&&(o.mongo=s);try{const e=await this.terminal.call("aiAssistantMongoRead",o);e?.display?this.messageDisplayOverrides.set(t,e.display):this.messageDisplayOverrides.delete(t);const s=this.formatMongoReadResult(e,{collection:o.collection,includeTotal:i,countIntent:r}),a=this.appendMongoReadResult(n,s);this.mongoReadCache.set(t,a),this.messageContentOverrides.set(t,a),this.clearMessageRenderCaches()}catch(e){const o=String(e?.message||"Unable to read data."),r=/access denied|permission scope required|super admin required/i.test(o)?"Data access via AI requires the appropriate module permissions. I can explain how to view this data in the app or request access.":`Mongo read failed: ${o}`,i=this.appendMongoReadResult(n,r);this.mongoReadCache.set(t,i),this.messageContentOverrides.set(t,i),this.messageDisplayOverrides.delete(t),this.clearMessageRenderCaches()}}async createMongoAggregateFromDirective(t,e,n){const o={...e||{}};!o.permissionView&&this.contextRoute&&(o.permissionView=this.contextRoute),!o.id_client&&this.idClient&&(o.id_client=this.idClient);const r=this.resolveMongoConfig();r&&(o.mongo=r);try{const e=await this.terminal.call("aiAssistantMongoAggregate",o);e?.display?this.messageDisplayOverrides.set(t,e.display):this.messageDisplayOverrides.delete(t);const r=this.formatMongoAggregateResult(e,{collection:o.collection}),i=this.appendMongoReadResult(n,r);this.mongoReadCache.set(t,i),this.messageContentOverrides.set(t,i),this.clearMessageRenderCaches()}catch(e){const o=String(e?.message||"Unable to aggregate data."),r=/access denied|permission scope required|super admin required/i.test(o)?"Data access via AI requires the appropriate module permissions. I can explain how to view this data in the app or request access.":`Mongo aggregate failed: ${o}`,i=this.appendMongoReadResult(n,r);this.mongoReadCache.set(t,i),this.messageContentOverrides.set(t,i),this.messageDisplayOverrides.delete(t),this.clearMessageRenderCaches()}}appendMongoReadResult(t,e){const n=String(t||"").trim(),o=String(e||"").trim();return o?n?n.includes(o)?n:`${n}\n\n${o}`.trim():o:n}formatCollectionLabel(t){const e=String(t||"").trim();return e?e.replace(/[_-]+/g," ").replace(/\s+/g," ").trim():""}formatMongoReadResult(t,e){const n=Array.isArray(t?.documents)?t.documents:[],o=t?.display,r="number"==typeof t?.total?t.total:null,i=!0===e?.includeTotal,s=!0===e?.countIntent,a=null!==r&&(i||s);if(!n.length){if(a){const t=this.formatCollectionLabel(e?.collection);return t?`Total ${t}: ${r}.`:`Total records: ${r}.`}return"Mongo read summary: No results found."}if(a&&s){const t=this.formatCollectionLabel(e?.collection);return t?`Total ${t}: ${r}.`:`Total records: ${r}.`}const l=o?.rows?.length??n.length,c=[];if(a){const t=this.formatCollectionLabel(e?.collection);c.push(t?`Total ${t}: ${r}.`:`Total records: ${r}.`)}c.push(`Preview: ${l} row${1===l?"":"s"}.`),o?.columns?.length&&c.push(`Columns: ${o.columns.join(", ")}`);return`Mongo read summary:\n${c.map(t=>`- ${t}`).join("\n")}`.trim()}formatMongoAggregateResult(t,e){const n=Array.isArray(t?.documents)?t.documents:[],o=t?.display;if(!n.length){const t=this.formatCollectionLabel(e?.collection);return t?`Mongo aggregate summary (${t}): No results found.`:"Mongo aggregate summary: No results found."}const r=o?.rows?.length??n.length,i=[];i.push(`Preview: ${r} group${1===r?"":"s"}.`),o?.columns?.length&&i.push(`Columns: ${o.columns.join(", ")}`);const s=i.map(t=>`- ${t}`).join("\n"),a=this.formatCollectionLabel(e?.collection);return`${a?`Mongo aggregate summary (${a}):`:"Mongo aggregate summary:"}\n${s}`.trim()}formatMongoAggregateDocumentSummary(t,e){if(!t||"object"!=typeof t)return`${e}) ${String(t)}`;const n=[];if(Object.prototype.hasOwnProperty.call(t,"_id")){const e=this.formatMongoAggregateId(t._id);e&&n.push(`_id: ${e}`)}const o=Object.keys(t).filter(t=>"_id"!==t);for(const e of o){if(n.length>=4)break;const o=t[e];null!=o&&("object"!=typeof o&&n.push(`${e}: ${String(o)}`))}return n.length?`${e}) ${n.join(" • ")}`:`${e}) [group]`}formatMongoAggregateId(t){if(null==t)return"";if(t&&"object"==typeof t){const e="function"==typeof t.toHexString?t.toHexString():"";if(e)return e}if(Array.isArray(t)){const e=t.slice(0,2).map(t=>String(t)).join(", ");return t.length>2?`[${e}, ...]`:`[${e}]`}if("object"==typeof t){const e=String(t);if(e&&"[object Object]"!==e)return e;const n=Object.keys(t);if(!n.length)return"[object]";const o=n.slice(0,2).map(e=>`${e}: ${String(t[e])}`);return n.length>2?`{ ${o.join(", ")}, ... }`:`{ ${o.join(", ")} }`}return String(t)}formatMongoDocumentSummary(t,e){if(!t||"object"!=typeof t)return`${e}) ${String(t)}`;const n=Object.keys(t),o=n.includes("_id")?["_id",...n.filter(t=>"_id"!==t)]:n,r=[];for(const e of o){if(r.length>=4)break;const n=t[e];null!=n&&("object"!=typeof n&&r.push(`${e}: ${String(n)}`))}return r.length?`${e}) ${r.join(" • ")}`:`${e}) [record]`}resolveSupportTicketIssue(t){const e=String(t||"").trim();if(e)return this.truncateText(e,1400);const n=(this.messages||[]).slice().reverse().find(t=>"user"===t?.role);return n?.content?this.truncateText(String(n.content),1400):"Support request from AI assistant."}buildSupportTicketPayload(t){const e=this.services?._account?.getUser?.(),n=this.services?._app?.client?.getValue?.(),o=String(this.idClient||n||"").trim();if(!e||!o)return null;const r=new Date,i=`${r.getFullYear()}/${r.getMonth()+1}/${r.getDate()}`;return{__v:0,type:"General Inquery",priority:"Low",issue:t||"Support request from AI assistant.",support_ticket_number:0,support_ticket_number_string:"0",status:"Opened",substatus:"New",client:o,id_client:o,messages:[],date_created:r,date_created_string:i,id_user_created:e._id,user_created:e.fullname,billable:!1,date_investigation:null,date_closed:null,files:[],current_watchers:[],client_user:{id_user:e._id,user:e.fullname,email:e.email?e.email:""},tasks:[],notes:[],users_assigned:[],estimated_billable_hours:null,billable_hours:null,bill_description:"",difficulty:1}}truncateText(t,e){const n=String(t||"").trim();return n.length<=e?n:`${n.slice(0,Math.max(0,e-3))}...`}shouldLinkRoute(t){if(!t)return!1;const e=String(this.contextRoute||"").trim();return!e||t!==e}unsubscribeAll(){this.conversationsSub?.unsubscribe(),this.messagesSub?.unsubscribe()}schedulePause(){this.pauseTimer&&clearTimeout(this.pauseTimer),this.pauseTimer=setTimeout(()=>{this.pauseTimer=null,this.paused&&(this.subscriptionsPaused=!0,this.unsubscribeAll())},5e3)}cancelPause(){this.pauseTimer&&(clearTimeout(this.pauseTimer),this.pauseTimer=null)}async createNewConversation(){if(this.createConversationPromise)return this.createConversationPromise;this.createConversationPromise=this.createConversationInternal();try{return await this.createConversationPromise}finally{this.createConversationPromise=null}}async createConversationInternal(){const t={id_client:this.idClient||void 0,id_app:this.idApp||void 0,title:"Ask AI About the System",mode:this.resolveMode(),branch_enabled:this.resolveBranchEnabled(),status:this.conversationStatus||"active",profile_id:this.resolveConfig()?.profileId},e=await this.terminal.call(this.methodNames().conversationCreate||DEFAULT_METHODS.conversationCreate,t),n=e?.id_conversation||e?._id||"";if(!n)return{id:"",conversation:null};const o=new Date;return{id:n,conversation:{_id:n,id_client:t.id_client,id_app:t.id_app,title:t.title,mode:t.mode,branch_enabled:t.branch_enabled,status:t.status,profile_id:t.profile_id,metadata:{pending:!0,local:!0},createdAt:o,updatedAt:o}}}mergePendingConversation(t){if(!this.pendingConversationId||!this.pendingConversation)return t;const e=(t||[]).find(t=>t?._id===this.pendingConversationId);return e&&!e?.metadata?.pending?(this.pendingConversationId="",this.pendingConversation=null,t):e?t:[this.pendingConversation,...t||[]]}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalComponent,deps:[{token:AiTerminalService},{token:ProviderService},{token:AiPageRouterService},{token:AiPageFormAdapterService},{token:LOCALE_ID}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:AiTerminalComponent,isStandalone:!1,selector:"rio-ai-terminal",inputs:{idClient:"idClient",idApp:"idApp",title:"title",config:"config",conversationStatus:"conversationStatus",messageLimit:"messageLimit",placeholder:"placeholder",singleConversation:"singleConversation",contextMode:"contextMode",contextRoute:"contextRoute",paused:"paused",bypassRouteSubscriptions:"bypassRouteSubscriptions"},providers:[ProviderService,AiTerminalService,AiPageFormAdapterService],viewQueries:[{propertyName:"messageScroll",first:!0,predicate:["messageScroll"],descendants:!0}],usesOnChanges:!0,ngImport:i0,template:'<div class="ai-terminal-shell" [class.single-conversation]="singleConversation">\n\t<div class="ai-terminal-sidebar" *ngIf="!singleConversation">\n\t\t<div class="ai-terminal-sidebar-header">\n\t\t\t<div>\n\t\t\t\t<h5>{{ title }}</h5>\n\t\t\t\t<p class="ai-terminal-muted" *ngIf="idApp">App: {{ idApp }}</p>\n\t\t\t</div>\n\t\t\t<button type="button" class="btn btn-sm btn-primary" (click)="createConversation()">New Chat</button>\n\t\t</div>\n\n\t\t<div class="ai-terminal-sidebar-body">\n\t\t\t<div class="ai-terminal-empty" *ngIf="isLoading">Loading conversations...</div>\n\t\t\t<div class="ai-terminal-empty" *ngIf="!isLoading && !conversations.length">No conversations yet.</div>\n\n\t\t\t<div class="ai-terminal-conversation"\n\t\t\t\t*ngFor="let conversation of conversations; trackBy: trackByConversation"\n\t\t\t\t[class.is-active]="conversation._id === activeConversationId">\n\t\t\t\t<div class="ai-terminal-conversation-main" (click)="setActiveConversation(conversation)">\n\t\t\t\t\t<div class="ai-terminal-conversation-title" *ngIf="editingConversationId !== conversation._id">\n\t\t\t\t\t\t{{ conversation.title && conversation.title !== \'New Conversation\' ? conversation.title : \'Ask AI About the System\' }}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ai-terminal-conversation-edit" *ngIf="editingConversationId === conversation._id">\n\t\t\t\t\t\t<input type="text" class="form-control form-control-sm" [(ngModel)]="editingTitle"\n\t\t\t\t\t\t\t(keyup.enter)="saveRename(conversation)" (keyup.escape)="cancelRename()">\n\t\t\t\t\t\t<div class="ai-terminal-inline-actions">\n\t\t\t\t\t\t\t<button type="button" class="btn btn-sm btn-primary" (click)="saveRename(conversation)">Save</button>\n\t\t\t\t\t\t\t<button type="button" class="btn btn-sm btn-outline-secondary" (click)="cancelRename()">Cancel</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ai-terminal-conversation-meta">\n\t\t\t\t\t\t<span *ngIf="conversation.updatedAt">{{ conversation.updatedAt | date: \'short\' }}</span>\n\t\t\t\t\t\t<span *ngIf="conversation.branch_name && isCodexMode()">{{ conversation.branch_name }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-conversation-actions" *ngIf="editingConversationId !== conversation._id">\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm" (click)="startRename(conversation)">Rename</button>\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm text-danger ai-terminal-delete-btn" (click)="deleteConversation(conversation)">Delete</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<div class="ai-terminal-main">\n\t\t<div class="ai-terminal-main-header">\n\t\t\t<div>\n\t\t\t\t<h4>{{ activeConversation?.title && activeConversation?.title !== \'New Conversation\' ? activeConversation?.title : \'Ask AI About the System\' }}</h4>\n\t\t\t\t<div class="ai-terminal-meta-row">\n\t\t\t\t\t<span *ngIf="activeConversation?.branch_name && isCodexMode()">Branch: {{ activeConversation?.branch_name }}</span>\n\t\t\t\t\t<span *ngIf="showAdvanced() && totalTokens()">Tokens: {{ totalTokens() | number }}</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="ai-terminal-main-actions">\n\t\t\t\t<button type="button" class="btn btn-sm btn-outline-secondary"\n\t\t\t\t\t*ngIf="singleConversation"\n\t\t\t\t\t(click)="startNewConversation()" [disabled]="isSending">\n\t\t\t\t\tNew Conversation\n\t\t\t\t</button>\n\t\t\t\t<button type="button" class="btn btn-sm btn-outline-primary"\n\t\t\t\t\t*ngIf="isCodexMode() && activeConversation?.branch_name"\n\t\t\t\t\t(click)="deployTest()" [disabled]="isDeployingTest">\n\t\t\t\t\t{{ isDeployingTest ? \'Deploying...\' : \'Deploy to Test\' }}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class="ai-terminal-alert" *ngIf="errorMessage">\n\t\t\t<div class="alert alert-danger">{{ errorMessage }}</div>\n\t\t</div>\n\t\t<div class="ai-terminal-alert" *ngIf="infoMessage">\n\t\t\t<div class="alert alert-success">{{ infoMessage }}</div>\n\t\t</div>\n\n\t\t<div class="ai-terminal-messages" #messageScroll>\n\t\t\t<div class="ai-terminal-empty" *ngIf="!messages.length">\n\t\t\t\t<p>Try one of these to get started:</p>\n\t\t\t\t<ul>\n\t\t\t\t\t<li>How do I get to the invoice report?</li>\n\t\t\t\t\t<li>Where is the setting for <feature>?</li>\n\t\t\t\t\t<li>Give me a checklist for <task>.</li>\n\t\t\t\t\t<li>Explain what this screen does and the fields I need.</li>\n\t\t\t\t\t<li>Flag anomalies in inventory for the last 3 months.</li>\n\t\t\t\t\t<li>Summarize invoice totals for <client> over the last <X> months.</li>\n\t\t\t\t\t<li>Show trends in invoice volume and average value for <client> over the past 6 months.</li>\n\t\t\t\t\t<li>List top 5 variance items in inventory counts this quarter.</li>\n\t\t\t\t\t<li>Help me fill out this form using data I paste (e.g., from Excel).</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div class="ai-terminal-message"\n\t\t\t\t*ngFor="let message of filteredMessages(); trackBy: trackByMessage"\n\t\t\t\t[class.user]="message.role === \'user\'"\n\t\t\t\t[class.assistant]="message.role === \'assistant\'"\n\t\t\t\t[class.pending]="message.metadata?.pending"\n\t\t\t\t[class.tool]="message.role === \'tool\'">\n\t\t\t\t<div class="ai-terminal-message-role">{{ message.role }}</div>\n\t\t\t\t<ng-container *ngIf="pendingProgress(message) as progress; else messageBody">\n\t\t\t\t\t<div class="ai-terminal-message-progress">\n\t\t\t\t\t\t<ul class="ai-terminal-progress-list">\n\t\t\t\t\t\t\t<li class="ai-terminal-progress-item" *ngFor="let item of progress">{{ item }}</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-template #messageBody>\n\t\t\t\t\t<div class="ai-terminal-message-body" [innerHTML]="messageMarkdown(message) | safe:\'html\'"></div>\n\t\t\t\t</ng-template>\n\t\t\t\t<div class="ai-terminal-message-table" *ngIf="displayTableForMessage(message) as display">\n\t\t\t\t\t<div class="ai-terminal-table-meta">\n\t\t\t\t\t\t<span>Preview: {{ display.rows?.length || 0 }} rows</span>\n\t\t\t\t\t\t<span *ngIf="display.total !== undefined && display.total !== null">Total: {{ display.total }}</span>\n\t\t\t\t\t\t<span *ngIf="display.truncated">Truncated</span>\n\t\t\t\t\t\t<span class="ai-terminal-table-meta-spacer"></span>\n\t\t\t\t\t\t<span class="ai-terminal-table-tz">Timezone: {{ timeZoneLabel }}</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t\tclass="btn btn-link btn-sm ai-terminal-table-export"\n\t\t\t\t\t\t\t*ngIf="canExportMessage(message)"\n\t\t\t\t\t\t\t[disabled]="isExportingMessage(message)"\n\t\t\t\t\t\t\t(click)="exportMessageTable(message)">\n\t\t\t\t\t\t\t{{ isExportingMessage(message) ? \'Exporting...\' : \'Export\' }}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button type="button" class="btn btn-link btn-sm ai-terminal-table-toggle" (click)="toggleTable(message)">\n\t\t\t\t\t\t\t{{ isTableCollapsed(message) ? \'Show Table\' : \'Hide Table\' }}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ai-terminal-table-wrap" *ngIf="!isTableCollapsed(message)">\n\t\t\t\t\t\t<collapse-table>\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th *ngFor="let column of display.columns">{{ column }}</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr *ngFor="let row of display.rows">\n\t\t\t\t\t\t\t\t\t<td *ngFor="let column of display.columns">{{ formatDisplayCell(row[column], column) }}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</collapse-table>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-debug" *ngIf="showDebugForMessage(message)">\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm ai-terminal-debug-toggle" (click)="toggleDebug(message)">\n\t\t\t\t\t\t{{ isDebugCollapsed(message) ? \'Show Debug\' : \'Hide Debug\' }}\n\t\t\t\t\t</button>\n\t\t\t\t\t<pre class="ai-terminal-debug-body" *ngIf="!isDebugCollapsed(message)">{{ debugText(message) }}</pre>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-actions" *ngIf="canCopyMessage(message)">\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm ai-terminal-copy-btn" (click)="copyMessage(message)">\n\t\t\t\t\t\t<i class="fa fa-copy" aria-hidden="true"></i>\n\t\t\t\t\t\tCopy\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-meta" *ngIf="showAdvanced() && message.usage?.total_tokens">\n\t\t\t\t\tTokens: {{ message.usage?.total_tokens | number }}\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-attachments" *ngIf="message.attachments?.length">\n\t\t\t\t\t<div class="ai-terminal-attachment" *ngFor="let attachment of message.attachments">\n\t\t\t\t\t\t<span>{{ attachment.name }}</span>\n\t\t\t\t\t\t<span class="ai-terminal-muted">{{ formatFileSize(attachment.size) }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class="ai-terminal-composer">\n\t\t\t<textarea\n\t\t\t\tclass="form-control ai-terminal-composer-input"\n\t\t\t\trows="2"\n\t\t\t\t[placeholder]="placeholder"\n\t\t\t\t(keydown)="handleComposerKeydown($event)"\n\t\t\t\t[(ngModel)]="messageText"></textarea>\n\n\t\t\t<div class="ai-terminal-composer-row">\n\t\t\t\t<div class="ai-terminal-upload" *ngIf="allowUploads()">\n\t\t\t\t\t<input type="file" class="form-control" multiple (change)="handleFileSelect($event)">\n\t\t\t\t\t<small class="ai-terminal-muted">Max {{ maxFileMb() }}MB per file • {{ maxTotalMb() }}MB total</small>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-actions">\n\t\t\t\t\t<button type="button" class="btn btn-outline-secondary" (click)="clearComposer()" [disabled]="isSending">Clear</button>\n\t\t\t\t\t<button type="button" class="btn btn-primary" (click)="sendMessage()" [disabled]="isSending || !messageText.trim()">\n\t\t\t\t\t\t{{ isSending ? \'Sending...\' : \'Send\' }}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="ai-terminal-pending" *ngIf="pendingFiles.length">\n\t\t\t\t<div class="ai-terminal-pending-title">Attachments</div>\n\t\t\t\t<div class="ai-terminal-pending-item" *ngFor="let file of pendingFiles; let i = index">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<strong>{{ file.name }}</strong>\n\t\t\t\t\t\t<span class="ai-terminal-muted">{{ formatFileSize(file.size) }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm text-danger" (click)="removePendingFile(i)">Remove</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',styles:[".ai-terminal-shell{display:grid;grid-template-columns:280px minmax(0,1fr);gap:1rem;align-items:stretch}.ai-terminal-shell.single-conversation{grid-template-columns:minmax(0,1fr)}.ai-terminal-sidebar,.ai-terminal-main{background:#fff;border:1px solid rgba(148,163,184,.25);border-radius:14px;box-shadow:0 10px 24px #0f172a0f}.ai-terminal-sidebar{display:flex;flex-direction:column;padding:.75rem;min-height:500px}.ai-terminal-sidebar-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding-bottom:.5rem;border-bottom:1px solid rgba(148,163,184,.2)}.ai-terminal-sidebar-header h5{font-size:1rem;margin:0}.ai-terminal-sidebar-body{flex:1;overflow:auto;padding-top:.5rem;font-size:.85rem}.ai-terminal-main{display:flex;flex-direction:column;padding:.75rem;min-height:500px}.ai-terminal-main-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding-bottom:.5rem;border-bottom:1px solid rgba(148,163,184,.2)}.ai-terminal-main-header h4{font-size:1.15rem;margin:0}.ai-terminal-main-actions{display:flex;gap:.5rem;align-items:center}.ai-terminal-meta-row{display:flex;gap:.75rem;font-size:.72rem;color:#64748b}.ai-terminal-muted{color:#64748b;font-size:.72rem;margin:0}.ai-terminal-conversation{border:1px solid transparent;border-radius:12px;padding:.6rem .7rem;margin-bottom:.5rem;background:#f8fafc;transition:border-color .2s ease,box-shadow .2s ease}.ai-terminal-conversation.is-active{border-color:#3b82f699;box-shadow:0 6px 14px #3b82f626;background:#eff6ff}.ai-terminal-conversation-main{cursor:pointer}.ai-terminal-conversation-title{font-weight:600;font-size:.85rem;margin-bottom:.35rem;color:#0f172a}.ai-terminal-conversation-meta{display:flex;gap:.5rem;font-size:.75rem;color:#64748b}.ai-terminal-conversation-actions{display:flex;justify-content:space-between;margin-top:.4rem}.ai-terminal-inline-actions{display:flex;gap:.35rem;margin-top:.4rem}.ai-terminal-conversation-edit input{margin-bottom:.4rem}.ai-terminal-alert{margin-top:.5rem}.ai-terminal-messages{flex:1;overflow-y:auto;padding:.75rem .25rem;display:flex;flex-direction:column;gap:.75rem}.ai-terminal-message{padding:.75rem .85rem;border-radius:14px;background:#f8fafc;border:1px solid rgba(148,163,184,.2)}.ai-terminal-message.user{background:#e0f2fe;border-color:#0ea5e94d}.ai-terminal-message.assistant{background:#f1f5f9}.ai-terminal-message.pending{border-style:dashed;border-color:#94a3b873;background:#f8fafc}.ai-terminal-message.pending .ai-terminal-message-body{letter-spacing:.2em;font-weight:600;animation:ai-terminal-thinking 1.2s ease-in-out infinite;color:#64748b}.ai-terminal-message-progress{color:#334155;font-size:.78rem}.ai-terminal-progress-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.ai-terminal-progress-item{display:inline-flex;align-self:flex-start;padding:.2rem .6rem;border-radius:999px;background:#94a3b833;color:#334155;font-weight:600;font-size:.85rem}.ai-terminal-message.tool{background:#fef3c7;border-color:#f59e0b66}.ai-terminal-message-role{font-size:.7rem;letter-spacing:.05em;text-transform:uppercase;color:#64748b;margin-bottom:.35rem}.ai-terminal-message-body{color:#0f172a;white-space:normal;line-height:1.6;font-size:.82rem}.ai-terminal-message-body p{margin:0 0 .35rem}.ai-terminal-message.user .ai-terminal-message-body p{margin:0}.ai-terminal-message-body p:last-child{margin-bottom:0}.ai-terminal-message-body ul,.ai-terminal-message-body ol{margin:.35rem 0 .6rem 1.4rem;padding:0}.ai-terminal-message-body h1,.ai-terminal-message-body h2,.ai-terminal-message-body h3,.ai-terminal-message-body h4,.ai-terminal-message-body h5,.ai-terminal-message-body h6{margin:0 0 .5rem;font-weight:600}.ai-terminal-message-body code{background:#94a3b833;border-radius:4px;padding:.1rem .3rem;font-size:.85em}.ai-terminal-route-link{color:#2563eb;text-decoration:underline;cursor:pointer}.ai-terminal-route-link:hover{color:#1d4ed8}.ai-terminal-message-meta{margin-top:.35rem;font-size:.68rem;color:#64748b}.ai-terminal-message-actions{margin-top:.35rem;display:flex;justify-content:flex-end}.ai-terminal-copy-btn{padding:0;font-weight:600;color:#2563eb;display:inline-flex;align-items:center;gap:.35rem}.ai-terminal-copy-btn:hover{color:#1d4ed8}.ai-terminal-message-table{margin-top:.6rem}.ai-terminal-table-meta{display:flex;flex-wrap:wrap;gap:.75rem;font-size:.75rem;color:#64748b;margin-bottom:.35rem;align-items:center}.ai-terminal-table-meta-spacer{flex:1 1 auto}.ai-terminal-table-tz{font-weight:600}.ai-terminal-table-toggle,.ai-terminal-table-export{padding:0;font-weight:600}.ai-terminal-message-debug{margin-top:.5rem}.ai-terminal-debug-toggle{padding:0;font-weight:600}.ai-terminal-debug-body{margin:.35rem 0 0;padding:.5rem .75rem;background:#0f172a;color:#e2e8f0;border-radius:8px;font-size:.75rem;white-space:pre-wrap;word-break:break-word}.ai-terminal-table-wrap{width:100%;overflow-x:auto}.ai-terminal-table-wrap collapse-table{display:block;width:100%}.ai-terminal-table{width:100%;border-collapse:collapse;font-size:.78rem}.ai-terminal-table th,.ai-terminal-table td{border:1px solid rgba(148,163,184,.3);padding:.35rem .5rem;vertical-align:top;white-space:nowrap}.ai-terminal-table thead{background:#94a3b826}.ai-terminal-table tbody tr:nth-child(2n){background:#94a3b814}.ai-terminal-message-attachments{margin-top:.5rem;border-top:1px dashed rgba(148,163,184,.4);padding-top:.4rem}.ai-terminal-attachment{display:flex;justify-content:space-between;font-size:.8rem}.ai-terminal-composer{border-top:1px solid rgba(148,163,184,.2);padding-top:.75rem;display:flex;flex-direction:column;gap:.6rem}.ai-terminal-composer-input{min-height:60px;padding:.85rem 1rem;border-radius:16px;border:1px solid rgba(234,179,8,.45);background:#fff7cc;box-shadow:0 10px 20px #eab3081f;font-size:.95rem;transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease;resize:vertical}.ai-terminal-composer-input:focus{border-color:#f59e0bbf;background:#fff3b0;box-shadow:0 0 0 3px #fbbf2459,0 12px 24px #eab30833}.ai-terminal-composer-row{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap}.ai-terminal-upload{flex:1;min-width:220px}.ai-terminal-actions{display:flex;gap:.5rem;align-items:center}.ai-terminal-pending{background:#f8fafc;border:1px dashed rgba(148,163,184,.4);border-radius:12px;padding:.6rem .75rem}.ai-terminal-pending-title{font-size:.8rem;text-transform:uppercase;letter-spacing:.05em;color:#64748b;margin-bottom:.4rem}.ai-terminal-pending-item{display:flex;justify-content:space-between;align-items:center;border-top:1px solid rgba(148,163,184,.2);padding-top:.4rem;margin-top:.4rem}.ai-terminal-empty{color:#94a3b8;font-size:.78rem;padding:.5rem .2rem}@keyframes ai-terminal-thinking{0%{opacity:.35}50%{opacity:1}to{opacity:.35}}@media(max-width:980px){.ai-terminal-shell{grid-template-columns:1fr}}\n"],dependencies:[{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"component",type:CollapseTableComponent,selector:"collapse-table",inputs:["collapseSize","tableFixed","headerFixed","secondaryColor","tertiaryColor"]},{kind:"directive",type:i7.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:i7.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"pipe",type:DomSanitizorPipe,name:"safe"},{kind:"pipe",type:i7.DecimalPipe,name:"number"},{kind:"pipe",type:i7.DatePipe,name:"date"}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalComponent,decorators:[{type:Component,args:[{selector:"rio-ai-terminal",providers:[ProviderService,AiTerminalService,AiPageFormAdapterService],standalone:!1,template:'<div class="ai-terminal-shell" [class.single-conversation]="singleConversation">\n\t<div class="ai-terminal-sidebar" *ngIf="!singleConversation">\n\t\t<div class="ai-terminal-sidebar-header">\n\t\t\t<div>\n\t\t\t\t<h5>{{ title }}</h5>\n\t\t\t\t<p class="ai-terminal-muted" *ngIf="idApp">App: {{ idApp }}</p>\n\t\t\t</div>\n\t\t\t<button type="button" class="btn btn-sm btn-primary" (click)="createConversation()">New Chat</button>\n\t\t</div>\n\n\t\t<div class="ai-terminal-sidebar-body">\n\t\t\t<div class="ai-terminal-empty" *ngIf="isLoading">Loading conversations...</div>\n\t\t\t<div class="ai-terminal-empty" *ngIf="!isLoading && !conversations.length">No conversations yet.</div>\n\n\t\t\t<div class="ai-terminal-conversation"\n\t\t\t\t*ngFor="let conversation of conversations; trackBy: trackByConversation"\n\t\t\t\t[class.is-active]="conversation._id === activeConversationId">\n\t\t\t\t<div class="ai-terminal-conversation-main" (click)="setActiveConversation(conversation)">\n\t\t\t\t\t<div class="ai-terminal-conversation-title" *ngIf="editingConversationId !== conversation._id">\n\t\t\t\t\t\t{{ conversation.title && conversation.title !== \'New Conversation\' ? conversation.title : \'Ask AI About the System\' }}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ai-terminal-conversation-edit" *ngIf="editingConversationId === conversation._id">\n\t\t\t\t\t\t<input type="text" class="form-control form-control-sm" [(ngModel)]="editingTitle"\n\t\t\t\t\t\t\t(keyup.enter)="saveRename(conversation)" (keyup.escape)="cancelRename()">\n\t\t\t\t\t\t<div class="ai-terminal-inline-actions">\n\t\t\t\t\t\t\t<button type="button" class="btn btn-sm btn-primary" (click)="saveRename(conversation)">Save</button>\n\t\t\t\t\t\t\t<button type="button" class="btn btn-sm btn-outline-secondary" (click)="cancelRename()">Cancel</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ai-terminal-conversation-meta">\n\t\t\t\t\t\t<span *ngIf="conversation.updatedAt">{{ conversation.updatedAt | date: \'short\' }}</span>\n\t\t\t\t\t\t<span *ngIf="conversation.branch_name && isCodexMode()">{{ conversation.branch_name }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-conversation-actions" *ngIf="editingConversationId !== conversation._id">\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm" (click)="startRename(conversation)">Rename</button>\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm text-danger ai-terminal-delete-btn" (click)="deleteConversation(conversation)">Delete</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<div class="ai-terminal-main">\n\t\t<div class="ai-terminal-main-header">\n\t\t\t<div>\n\t\t\t\t<h4>{{ activeConversation?.title && activeConversation?.title !== \'New Conversation\' ? activeConversation?.title : \'Ask AI About the System\' }}</h4>\n\t\t\t\t<div class="ai-terminal-meta-row">\n\t\t\t\t\t<span *ngIf="activeConversation?.branch_name && isCodexMode()">Branch: {{ activeConversation?.branch_name }}</span>\n\t\t\t\t\t<span *ngIf="showAdvanced() && totalTokens()">Tokens: {{ totalTokens() | number }}</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="ai-terminal-main-actions">\n\t\t\t\t<button type="button" class="btn btn-sm btn-outline-secondary"\n\t\t\t\t\t*ngIf="singleConversation"\n\t\t\t\t\t(click)="startNewConversation()" [disabled]="isSending">\n\t\t\t\t\tNew Conversation\n\t\t\t\t</button>\n\t\t\t\t<button type="button" class="btn btn-sm btn-outline-primary"\n\t\t\t\t\t*ngIf="isCodexMode() && activeConversation?.branch_name"\n\t\t\t\t\t(click)="deployTest()" [disabled]="isDeployingTest">\n\t\t\t\t\t{{ isDeployingTest ? \'Deploying...\' : \'Deploy to Test\' }}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class="ai-terminal-alert" *ngIf="errorMessage">\n\t\t\t<div class="alert alert-danger">{{ errorMessage }}</div>\n\t\t</div>\n\t\t<div class="ai-terminal-alert" *ngIf="infoMessage">\n\t\t\t<div class="alert alert-success">{{ infoMessage }}</div>\n\t\t</div>\n\n\t\t<div class="ai-terminal-messages" #messageScroll>\n\t\t\t<div class="ai-terminal-empty" *ngIf="!messages.length">\n\t\t\t\t<p>Try one of these to get started:</p>\n\t\t\t\t<ul>\n\t\t\t\t\t<li>How do I get to the invoice report?</li>\n\t\t\t\t\t<li>Where is the setting for <feature>?</li>\n\t\t\t\t\t<li>Give me a checklist for <task>.</li>\n\t\t\t\t\t<li>Explain what this screen does and the fields I need.</li>\n\t\t\t\t\t<li>Flag anomalies in inventory for the last 3 months.</li>\n\t\t\t\t\t<li>Summarize invoice totals for <client> over the last <X> months.</li>\n\t\t\t\t\t<li>Show trends in invoice volume and average value for <client> over the past 6 months.</li>\n\t\t\t\t\t<li>List top 5 variance items in inventory counts this quarter.</li>\n\t\t\t\t\t<li>Help me fill out this form using data I paste (e.g., from Excel).</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div class="ai-terminal-message"\n\t\t\t\t*ngFor="let message of filteredMessages(); trackBy: trackByMessage"\n\t\t\t\t[class.user]="message.role === \'user\'"\n\t\t\t\t[class.assistant]="message.role === \'assistant\'"\n\t\t\t\t[class.pending]="message.metadata?.pending"\n\t\t\t\t[class.tool]="message.role === \'tool\'">\n\t\t\t\t<div class="ai-terminal-message-role">{{ message.role }}</div>\n\t\t\t\t<ng-container *ngIf="pendingProgress(message) as progress; else messageBody">\n\t\t\t\t\t<div class="ai-terminal-message-progress">\n\t\t\t\t\t\t<ul class="ai-terminal-progress-list">\n\t\t\t\t\t\t\t<li class="ai-terminal-progress-item" *ngFor="let item of progress">{{ item }}</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-template #messageBody>\n\t\t\t\t\t<div class="ai-terminal-message-body" [innerHTML]="messageMarkdown(message) | safe:\'html\'"></div>\n\t\t\t\t</ng-template>\n\t\t\t\t<div class="ai-terminal-message-table" *ngIf="displayTableForMessage(message) as display">\n\t\t\t\t\t<div class="ai-terminal-table-meta">\n\t\t\t\t\t\t<span>Preview: {{ display.rows?.length || 0 }} rows</span>\n\t\t\t\t\t\t<span *ngIf="display.total !== undefined && display.total !== null">Total: {{ display.total }}</span>\n\t\t\t\t\t\t<span *ngIf="display.truncated">Truncated</span>\n\t\t\t\t\t\t<span class="ai-terminal-table-meta-spacer"></span>\n\t\t\t\t\t\t<span class="ai-terminal-table-tz">Timezone: {{ timeZoneLabel }}</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t\tclass="btn btn-link btn-sm ai-terminal-table-export"\n\t\t\t\t\t\t\t*ngIf="canExportMessage(message)"\n\t\t\t\t\t\t\t[disabled]="isExportingMessage(message)"\n\t\t\t\t\t\t\t(click)="exportMessageTable(message)">\n\t\t\t\t\t\t\t{{ isExportingMessage(message) ? \'Exporting...\' : \'Export\' }}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button type="button" class="btn btn-link btn-sm ai-terminal-table-toggle" (click)="toggleTable(message)">\n\t\t\t\t\t\t\t{{ isTableCollapsed(message) ? \'Show Table\' : \'Hide Table\' }}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ai-terminal-table-wrap" *ngIf="!isTableCollapsed(message)">\n\t\t\t\t\t\t<collapse-table>\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th *ngFor="let column of display.columns">{{ column }}</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr *ngFor="let row of display.rows">\n\t\t\t\t\t\t\t\t\t<td *ngFor="let column of display.columns">{{ formatDisplayCell(row[column], column) }}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</collapse-table>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-debug" *ngIf="showDebugForMessage(message)">\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm ai-terminal-debug-toggle" (click)="toggleDebug(message)">\n\t\t\t\t\t\t{{ isDebugCollapsed(message) ? \'Show Debug\' : \'Hide Debug\' }}\n\t\t\t\t\t</button>\n\t\t\t\t\t<pre class="ai-terminal-debug-body" *ngIf="!isDebugCollapsed(message)">{{ debugText(message) }}</pre>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-actions" *ngIf="canCopyMessage(message)">\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm ai-terminal-copy-btn" (click)="copyMessage(message)">\n\t\t\t\t\t\t<i class="fa fa-copy" aria-hidden="true"></i>\n\t\t\t\t\t\tCopy\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-meta" *ngIf="showAdvanced() && message.usage?.total_tokens">\n\t\t\t\t\tTokens: {{ message.usage?.total_tokens | number }}\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-attachments" *ngIf="message.attachments?.length">\n\t\t\t\t\t<div class="ai-terminal-attachment" *ngFor="let attachment of message.attachments">\n\t\t\t\t\t\t<span>{{ attachment.name }}</span>\n\t\t\t\t\t\t<span class="ai-terminal-muted">{{ formatFileSize(attachment.size) }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class="ai-terminal-composer">\n\t\t\t<textarea\n\t\t\t\tclass="form-control ai-terminal-composer-input"\n\t\t\t\trows="2"\n\t\t\t\t[placeholder]="placeholder"\n\t\t\t\t(keydown)="handleComposerKeydown($event)"\n\t\t\t\t[(ngModel)]="messageText"></textarea>\n\n\t\t\t<div class="ai-terminal-composer-row">\n\t\t\t\t<div class="ai-terminal-upload" *ngIf="allowUploads()">\n\t\t\t\t\t<input type="file" class="form-control" multiple (change)="handleFileSelect($event)">\n\t\t\t\t\t<small class="ai-terminal-muted">Max {{ maxFileMb() }}MB per file • {{ maxTotalMb() }}MB total</small>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-actions">\n\t\t\t\t\t<button type="button" class="btn btn-outline-secondary" (click)="clearComposer()" [disabled]="isSending">Clear</button>\n\t\t\t\t\t<button type="button" class="btn btn-primary" (click)="sendMessage()" [disabled]="isSending || !messageText.trim()">\n\t\t\t\t\t\t{{ isSending ? \'Sending...\' : \'Send\' }}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="ai-terminal-pending" *ngIf="pendingFiles.length">\n\t\t\t\t<div class="ai-terminal-pending-title">Attachments</div>\n\t\t\t\t<div class="ai-terminal-pending-item" *ngFor="let file of pendingFiles; let i = index">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<strong>{{ file.name }}</strong>\n\t\t\t\t\t\t<span class="ai-terminal-muted">{{ formatFileSize(file.size) }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm text-danger" (click)="removePendingFile(i)">Remove</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',styles:[".ai-terminal-shell{display:grid;grid-template-columns:280px minmax(0,1fr);gap:1rem;align-items:stretch}.ai-terminal-shell.single-conversation{grid-template-columns:minmax(0,1fr)}.ai-terminal-sidebar,.ai-terminal-main{background:#fff;border:1px solid rgba(148,163,184,.25);border-radius:14px;box-shadow:0 10px 24px #0f172a0f}.ai-terminal-sidebar{display:flex;flex-direction:column;padding:.75rem;min-height:500px}.ai-terminal-sidebar-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding-bottom:.5rem;border-bottom:1px solid rgba(148,163,184,.2)}.ai-terminal-sidebar-header h5{font-size:1rem;margin:0}.ai-terminal-sidebar-body{flex:1;overflow:auto;padding-top:.5rem;font-size:.85rem}.ai-terminal-main{display:flex;flex-direction:column;padding:.75rem;min-height:500px}.ai-terminal-main-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding-bottom:.5rem;border-bottom:1px solid rgba(148,163,184,.2)}.ai-terminal-main-header h4{font-size:1.15rem;margin:0}.ai-terminal-main-actions{display:flex;gap:.5rem;align-items:center}.ai-terminal-meta-row{display:flex;gap:.75rem;font-size:.72rem;color:#64748b}.ai-terminal-muted{color:#64748b;font-size:.72rem;margin:0}.ai-terminal-conversation{border:1px solid transparent;border-radius:12px;padding:.6rem .7rem;margin-bottom:.5rem;background:#f8fafc;transition:border-color .2s ease,box-shadow .2s ease}.ai-terminal-conversation.is-active{border-color:#3b82f699;box-shadow:0 6px 14px #3b82f626;background:#eff6ff}.ai-terminal-conversation-main{cursor:pointer}.ai-terminal-conversation-title{font-weight:600;font-size:.85rem;margin-bottom:.35rem;color:#0f172a}.ai-terminal-conversation-meta{display:flex;gap:.5rem;font-size:.75rem;color:#64748b}.ai-terminal-conversation-actions{display:flex;justify-content:space-between;margin-top:.4rem}.ai-terminal-inline-actions{display:flex;gap:.35rem;margin-top:.4rem}.ai-terminal-conversation-edit input{margin-bottom:.4rem}.ai-terminal-alert{margin-top:.5rem}.ai-terminal-messages{flex:1;overflow-y:auto;padding:.75rem .25rem;display:flex;flex-direction:column;gap:.75rem}.ai-terminal-message{padding:.75rem .85rem;border-radius:14px;background:#f8fafc;border:1px solid rgba(148,163,184,.2)}.ai-terminal-message.user{background:#e0f2fe;border-color:#0ea5e94d}.ai-terminal-message.assistant{background:#f1f5f9}.ai-terminal-message.pending{border-style:dashed;border-color:#94a3b873;background:#f8fafc}.ai-terminal-message.pending .ai-terminal-message-body{letter-spacing:.2em;font-weight:600;animation:ai-terminal-thinking 1.2s ease-in-out infinite;color:#64748b}.ai-terminal-message-progress{color:#334155;font-size:.78rem}.ai-terminal-progress-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.ai-terminal-progress-item{display:inline-flex;align-self:flex-start;padding:.2rem .6rem;border-radius:999px;background:#94a3b833;color:#334155;font-weight:600;font-size:.85rem}.ai-terminal-message.tool{background:#fef3c7;border-color:#f59e0b66}.ai-terminal-message-role{font-size:.7rem;letter-spacing:.05em;text-transform:uppercase;color:#64748b;margin-bottom:.35rem}.ai-terminal-message-body{color:#0f172a;white-space:normal;line-height:1.6;font-size:.82rem}.ai-terminal-message-body p{margin:0 0 .35rem}.ai-terminal-message.user .ai-terminal-message-body p{margin:0}.ai-terminal-message-body p:last-child{margin-bottom:0}.ai-terminal-message-body ul,.ai-terminal-message-body ol{margin:.35rem 0 .6rem 1.4rem;padding:0}.ai-terminal-message-body h1,.ai-terminal-message-body h2,.ai-terminal-message-body h3,.ai-terminal-message-body h4,.ai-terminal-message-body h5,.ai-terminal-message-body h6{margin:0 0 .5rem;font-weight:600}.ai-terminal-message-body code{background:#94a3b833;border-radius:4px;padding:.1rem .3rem;font-size:.85em}.ai-terminal-route-link{color:#2563eb;text-decoration:underline;cursor:pointer}.ai-terminal-route-link:hover{color:#1d4ed8}.ai-terminal-message-meta{margin-top:.35rem;font-size:.68rem;color:#64748b}.ai-terminal-message-actions{margin-top:.35rem;display:flex;justify-content:flex-end}.ai-terminal-copy-btn{padding:0;font-weight:600;color:#2563eb;display:inline-flex;align-items:center;gap:.35rem}.ai-terminal-copy-btn:hover{color:#1d4ed8}.ai-terminal-message-table{margin-top:.6rem}.ai-terminal-table-meta{display:flex;flex-wrap:wrap;gap:.75rem;font-size:.75rem;color:#64748b;margin-bottom:.35rem;align-items:center}.ai-terminal-table-meta-spacer{flex:1 1 auto}.ai-terminal-table-tz{font-weight:600}.ai-terminal-table-toggle,.ai-terminal-table-export{padding:0;font-weight:600}.ai-terminal-message-debug{margin-top:.5rem}.ai-terminal-debug-toggle{padding:0;font-weight:600}.ai-terminal-debug-body{margin:.35rem 0 0;padding:.5rem .75rem;background:#0f172a;color:#e2e8f0;border-radius:8px;font-size:.75rem;white-space:pre-wrap;word-break:break-word}.ai-terminal-table-wrap{width:100%;overflow-x:auto}.ai-terminal-table-wrap collapse-table{display:block;width:100%}.ai-terminal-table{width:100%;border-collapse:collapse;font-size:.78rem}.ai-terminal-table th,.ai-terminal-table td{border:1px solid rgba(148,163,184,.3);padding:.35rem .5rem;vertical-align:top;white-space:nowrap}.ai-terminal-table thead{background:#94a3b826}.ai-terminal-table tbody tr:nth-child(2n){background:#94a3b814}.ai-terminal-message-attachments{margin-top:.5rem;border-top:1px dashed rgba(148,163,184,.4);padding-top:.4rem}.ai-terminal-attachment{display:flex;justify-content:space-between;font-size:.8rem}.ai-terminal-composer{border-top:1px solid rgba(148,163,184,.2);padding-top:.75rem;display:flex;flex-direction:column;gap:.6rem}.ai-terminal-composer-input{min-height:60px;padding:.85rem 1rem;border-radius:16px;border:1px solid rgba(234,179,8,.45);background:#fff7cc;box-shadow:0 10px 20px #eab3081f;font-size:.95rem;transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease;resize:vertical}.ai-terminal-composer-input:focus{border-color:#f59e0bbf;background:#fff3b0;box-shadow:0 0 0 3px #fbbf2459,0 12px 24px #eab30833}.ai-terminal-composer-row{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap}.ai-terminal-upload{flex:1;min-width:220px}.ai-terminal-actions{display:flex;gap:.5rem;align-items:center}.ai-terminal-pending{background:#f8fafc;border:1px dashed rgba(148,163,184,.4);border-radius:12px;padding:.6rem .75rem}.ai-terminal-pending-title{font-size:.8rem;text-transform:uppercase;letter-spacing:.05em;color:#64748b;margin-bottom:.4rem}.ai-terminal-pending-item{display:flex;justify-content:space-between;align-items:center;border-top:1px solid rgba(148,163,184,.2);padding-top:.4rem;margin-top:.4rem}.ai-terminal-empty{color:#94a3b8;font-size:.78rem;padding:.5rem .2rem}@keyframes ai-terminal-thinking{0%{opacity:.35}50%{opacity:1}to{opacity:.35}}@media(max-width:980px){.ai-terminal-shell{grid-template-columns:1fr}}\n"]}]}],ctorParameters:()=>[{type:AiTerminalService},{type:ProviderService},{type:AiPageRouterService},{type:AiPageFormAdapterService},{type:void 0,decorators:[{type:Inject,args:[LOCALE_ID]}]}],propDecorators:{idClient:[{type:Input}],idApp:[{type:Input}],title:[{type:Input}],config:[{type:Input}],conversationStatus:[{type:Input}],messageLimit:[{type:Input}],placeholder:[{type:Input}],singleConversation:[{type:Input}],contextMode:[{type:Input}],contextRoute:[{type:Input}],paused:[{type:Input}],bypassRouteSubscriptions:[{type:Input}],messageScroll:[{type:ViewChild,args:["messageScroll",{static:!1}]}]}});const BASE_SYSTEM_PROMPT=["You are the ResolveIO in-app AI assistant for this product.","- You can only help users understand and navigate the existing codebase and UI.","- Never share code or file contents. All code is proprietary.","- Do not suggest or perform any hacking, bypass, or security abuse.","- Do not access databases directly, secrets, or other users' data.","- If the user has a customer portal scope (other.id_customer), only discuss that customer's data and what is visible in their customer portal. Never reference other customers or internal/admin-only data. If asked for anything outside the portal, say it isn't available.","- Do not change local browser data or run destructive actions.","- Provide detailed, expert-level explanations grounded in this product. Avoid generic answers.","- When explaining why something happens, describe the specific workflow, fields, and auto-filled data involved (what fills, where it comes from, and when it triggers). If unsure, ask a clarifying question about the screen or workflow.",'- When asked "why is this happening," respond with: cause, trigger, data source(s), and expected vs actual outcome.',"- For troubleshooting, ask clarifying questions only when needed to proceed; otherwise answer directly, then give a short decision tree (If X, do Y; If not, do Z).","- Provide checklists for common tasks, highlighting required fields and common pitfalls.",'- If asked "where is this set," give the screen/workflow name and navigation steps to reach it.','- If asked "what changed," summarize release notes if known; if not available, say so and suggest where to check or offer a support ticket.','- After answering, optionally suggest 0-1 related next steps only when helpful. Do not ask for "next steps" every time.',"- If access is blocked, name the permission/role needed and how to request it.","- Prefer high-level product guidance; only mention file paths if explicitly requested.","- Only include an in-app route when the user explicitly asks for navigation or a link to another screen. Never include the route for the current screen.",'- Avoid vague labels like "Operations app"; use the specific screen/workflow name.',"- Do not mention other client projects or ask which client; if clarification is needed, ask about the screen or workflow without listing other clients.","- Respond in English only. Do not include non-English text or characters unless required for JSON, links, or tool directives.",'- Respond with a single clear message; be thorough but stay focused. Do not add labels like "Customer-facing summary" or "Work ticket summary" and do not include estimated hours.','- Use structured responses by default: short heading, then bullet points. For "how do I" questions, provide a step-by-step list (numbered) with explicit page/screen names and actions.','- When giving steps, include navigation guidance like "Go to <screen>" and "Click/Select/Enter <field>" so the user can follow it exactly.',"- If context scope is provided (ex: current page), prioritize that screen in your answer.","- If a request is out of scope, offer to create a support ticket and provide a short summary.","- If the user explicitly asks to create/open/file a support ticket, end your response with a single line exactly in this format:","- SUPPORT_TICKET_CREATE: <one-line summary>","- Only include that line when the user clearly wants a ticket created. Do not claim a ticket is created unless you include that line.",'- Do not end responses with tentative phrasing like "I could" or "I’m going to." Complete the request or state what is required to proceed.',"- Use the codebase context to choose correct collections/fields/workflows and use MONGO_READ/MONGO_AGG to answer with real data when needed.","- For direct questions, answer first. Ask a single follow-up only if required to run a query or resolve missing details.","- If you need database data to answer, end your response with a single line exactly in this format:",'- MONGO_READ: {"collection":"<name>","query":{...},"options":{"projection":{...},"sort":{...},"limit":20},"permissionView":"</route>"}',"- If you need grouped/aggregated data (totals by user, rankings, trends), end your response with a single line exactly in this format:",'- MONGO_AGG: {"collection":"<name>","pipeline":[...],"options":{"allowDiskUse":true,"limit":20},"permissionView":"</route>"}',"- For invoice data, set permissionView to an invoice-capable route (ex: /invoice/list or /report-builder). Do not use /report/* routes.","- For revenue/sales/billing questions, use invoices and sum paid_total (fallback to grand_total) with date_paid and Paid/Closed status when available.","- For relative date ranges (last/past/recent), include an upper bound <= $$NOW unless the user specifies a future end date.","- Keep queries minimal, read-only, and avoid user/credential data unless the user is a super admin.","- Assume you are not a super admin unless explicitly told otherwise.","- Only request data when the user has permission for that module; invoice data requires invoice view access.","- If the user lacks permission, answer without data and explain how to view it in the app or request access.","- For simple counts or time-range totals, use MONGO_READ (includeTotal). For breakdowns, rankings, or sums grouped by a field, use MONGO_AGG.",'- Before issuing MONGO_READ or MONGO_AGG, verify the collection name and key fields by checking collection/model definitions in the current app (look for "collectionName:" and date fields like date_created/date_completed/createdAt). Do not invent collection names.',"- For creation-date questions when both date_created and createdAt exist, match both with $or so results are not missed.","- When grouping by fields that can be arrays (drivers, deliveries, routes, chemicals), $unwind first and group by both id and name when available.","- Use MONGO_READ/MONGO_AGG only to produce summaries/snapshots/health checks (not raw dumps) when permitted.","- When referencing data, summarize it in bullets and avoid raw JSON or dumps.","- Format currency as $1,234.56 (no USD prefix) with two decimals.","- Use medium reasoning effort."].join("\n"),DEFAULT_AI_ASSISTANT_CODEX_MODEL="gpt-5.3-codex",DEFAULT_AI_ASSISTANT_CODEX_FALLBACK_MODEL="gpt-5.2-codex";class AiAssistantComponent{router;_account;idClient="";idApp="";title="AI Assistant";open=!1;supportTicketRoute="/support-ticket/new";supportTicketEnabled=!0;config=null;topOffset=0;panelHeight=0;currentRoute="";hoverEnabled=!0;openRequested=new EventEmitter;closed=new EventEmitter;terminal;panelRef;terminalConfig;contextMode="auto";hoverOpened=!1;panelWidthPx=null;isResizing=!1;resizeMinWidth=0;resizeMaxWidth=0;resizeStartWidth=0;suppressRailClick=!1;resizeMoved=!1;constructor(t,e){this.router=t,this._account=e,this.terminalConfig=this.buildTerminalConfig()}ngOnChanges(t){t.open&&!this.open&&(this.hoverOpened=!1,this.isResizing=!1,this.suppressRailClick=!1),(t.idApp||t.config)&&(this.terminalConfig=this.buildTerminalConfig())}buildTerminalConfig(){return{mode:"codex",model:"gpt-5.3-codex",fallbackModel:"gpt-5.2-codex",guardrails:!0,allowUploads:!1,showAdvanced:!1,showToolMessages:!1,deleteFilesAfterRun:!0,pageRouterEnabled:!0,systemPrompt:this.buildSystemPrompt(),...this.config||{}}}closePanel(){this.hoverOpened=!1,this.closed.emit()}handleRailClick(t){t?.stopPropagation(),this.suppressRailClick?this.suppressRailClick=!1:this.open||(this.hoverOpened=!1,this.openRequested.emit())}handleRailMouseDown(t){this.open&&this.startResize(t)}handleRailEnter(){this.hoverEnabled&&!this.open&&(this.hoverOpened=!0,this.openRequested.emit())}handleRailLeave(){this.hoverEnabled&&this.hoverOpened&&(this.hoverOpened=!1,this.closePanel())}setContextMode(t){this.contextMode="all"===t||"auto"===t?t:"current"}get contextRouteLabel(){return this.currentRoute||"Current page"}openSupportTicket(){if(!this.supportTicketEnabled)return;const t=this.buildSupportTicketSummary();t&&localStorage.setItem("resolveioSupportTicketDraft",JSON.stringify({issue:t,source:"ai-assistant",createdAt:(new Date).toISOString()})),this.closed.emit(),this.supportTicketRoute&&this.router.navigateByUrl(this.supportTicketRoute)}handleBackdropClick(t){t&&t.stopPropagation()}get panelWidthStyle(){return"number"==typeof this.panelWidthPx&&this.panelWidthPx>0?`${this.panelWidthPx}px`:"33.33vw"}startResize(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.resizeMoved=!1,this.suppressRailClick=!1;const n=this.panelRef?.nativeElement?.getBoundingClientRect().width,o=n||this.defaultPanelWidth();this.resizeStartWidth=this.clampPanelWidth(o);const r=this.defaultPanelWidth();this.resizeMinWidth=e?Math.max(r,this.resizeStartWidth):r,this.resizeMaxWidth=this.resolveMaxWidth(this.resizeMinWidth),this.panelWidthPx=this.clampPanelWidth(this.resizeStartWidth,this.resizeMinWidth,this.resizeMaxWidth)}handleResizeMove(t){if(!this.isResizing)return;const e=window.innerWidth-t.clientX;Math.abs(e-this.resizeStartWidth)>2&&(this.resizeMoved=!0,this.suppressRailClick=!0),this.panelWidthPx=this.clampPanelWidth(e,this.resizeMinWidth,this.resizeMaxWidth)}handleResizeEnd(){this.isResizing&&(this.isResizing=!1,this.resizeMoved&&this.suppressRailClick&&setTimeout(()=>{this.suppressRailClick=!1},0))}clampPanelWidth(t,e,n){const o="number"==typeof e?e:window.innerWidth/3,r="number"==typeof n?n:Math.max(o,window.innerWidth-46);return Math.min(Math.max(t,o),r)}defaultPanelWidth(){return Math.round(window.innerWidth/3)}resolveMaxWidth(t){return Math.max(t,window.innerWidth-46)}buildSystemPrompt(){const t=String(this.idApp||"").trim(),e=t?`- Current app: ${t}. Treat this as the only project for this conversation.`:"- Treat the current app as the only project for this conversation.",n=this.buildCustomerScopeLine();return[BASE_SYSTEM_PROMPT,e,n].filter(Boolean).join("\n")}buildCustomerScopeLine(){const t=String(this._account.getUser()?.other?.id_customer||"").trim();return t?`- Customer portal scope: yes (id_customer: ${t}).`:""}buildSupportTicketSummary(){const t=this.terminal,e=t?.activeConversation,n=(t?.messages||[]).slice().reverse(),o=n.find(t=>"user"===t?.role),r=n.find(t=>"assistant"===t?.role),i=[],s=(e?.title||this.title||"").trim();return s&&i.push(`Conversation: ${s}`),o?.content&&i.push(`User request:\n${this.truncate(this.sanitizeSummary(o.content),1400)}`),r?.content&&i.push(`Assistant summary:\n${this.truncate(this.sanitizeSummary(r.content),2e3)}`),i.join("\n\n").trim()}sanitizeSummary(t){return String(t||"").replace(/```[\s\S]*?```/g,"").replace(/`([^`]+)`/g,"$1").replace(/\s{3,}/g," ").trim()}truncate(t,e){const n=String(t||"").trim();return n.length<=e?n:`${n.slice(0,Math.max(0,e-3))}...`}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiAssistantComponent,deps:[{token:i1$1.Router},{token:AccountManagerService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:AiAssistantComponent,isStandalone:!1,selector:"rio-ai-assistant",inputs:{idClient:"idClient",idApp:"idApp",title:"title",open:"open",supportTicketRoute:"supportTicketRoute",supportTicketEnabled:"supportTicketEnabled",config:"config",topOffset:"topOffset",panelHeight:"panelHeight",currentRoute:"currentRoute",hoverEnabled:"hoverEnabled"},outputs:{openRequested:"openRequested",closed:"closed"},host:{listeners:{"window:mousemove":"handleResizeMove($event)","window:mouseup":"handleResizeEnd()"}},viewQueries:[{propertyName:"terminal",first:!0,predicate:AiTerminalComponent,descendants:!0},{propertyName:"panelRef",first:!0,predicate:["panelRef"],descendants:!0}],usesOnChanges:!0,ngImport:i0,template:'<div class="ai-assistant-overlay" [class.is-open]="open"></div>\n<div\n\tclass="ai-assistant-drawer"\n\t[class.is-open]="open"\n\t[style.--ai-panel-width]="panelWidthStyle"\n\t[style.top.px]="topOffset"\n\t[style.height.px]="panelHeight">\n\t<button\n\t\ttype="button"\n\t\tclass="ai-assistant-rail"\n\t\t(click)="handleRailClick($event)"\n\t\t(mousedown)="handleRailMouseDown($event)">\n\t\t<span class="ai-assistant-rail-label">AI Assistant</span>\n\t</button>\n\t\t<div class="ai-assistant-panel" #panelRef [class.is-open]="open" (click)="$event.stopPropagation()">\n\t\t<div class="ai-assistant-resize-handle" (mousedown)="startResize($event)"></div>\n\t\t<div class="ai-assistant-header">\n\t\t\t<div class="ai-assistant-title">\n\t\t\t\t<h4>{{ title }}</h4>\n\t\t\t\t<p class="ai-assistant-subtitle">Ask about workflows, routes, and where features live.</p>\n\t\t\t</div>\n\t\t\t<div class="ai-assistant-actions">\n\t\t\t\t@if (supportTicketEnabled) {\n\t\t\t\t\t<button type="button" class="btn btn-sm btn-outline-secondary" (click)="openSupportTicket()">Support Ticket</button>\n\t\t\t\t}\n\t\t\t\t<button type="button" class="btn btn-sm btn-danger ai-assistant-close" (click)="closePanel()">Close</button>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="ai-assistant-context">\n\t\t\t<div class="ai-assistant-context-controls">\n\t\t\t\t<select class="form-select form-select-sm" [value]="contextMode" (change)="setContextMode($event.target.value)" aria-label="Context">\n\t\t\t\t\t<option value="auto">Auto</option>\n\t\t\t\t\t<option value="current">Current Page</option>\n\t\t\t\t\t<option value="all">All Pages</option>\n\t\t\t\t</select>\n\t\t\t\t@if (contextMode !== \'all\') {\n\t\t\t\t\t<div class="ai-assistant-context-route">{{ contextRouteLabel }}</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="ai-assistant-body">\n\t\t\t<rio-ai-terminal\n\t\t\t\t[idClient]="idClient"\n\t\t\t\t[idApp]="idApp"\n\t\t\t\t[title]="title"\n\t\t\t\t[config]="terminalConfig"\n\t\t\t\t[conversationStatus]="\'active\'"\n\t\t\t\t[singleConversation]="true"\n\t\t\t\t[contextMode]="contextMode"\n\t\t\t\t[contextRoute]="currentRoute"\n\t\t\t\t[bypassRouteSubscriptions]="true"\n\t\t\t\t[paused]="!open"\n\t\t\t\t[placeholder]="\'Ask about features, navigation, how things work, or request summaries/anomaly checks...\'">\n\t\t\t</rio-ai-terminal>\n\t\t</div>\n\t</div>\n</div>\n',styles:[':host{position:fixed;inset:0;z-index:10000;pointer-events:none;--ai-rail-width: 46px;--ai-panel-width: 33.33vw;--ai-shadow: rgba(15, 23, 42, .2)}.ai-assistant-overlay{position:fixed;inset:0;background:transparent;opacity:0;pointer-events:none;transition:opacity .25s ease}.ai-assistant-overlay.is-open{opacity:0;pointer-events:none}.ai-assistant-drawer{position:fixed;right:0;display:flex;align-items:stretch;height:100%;min-height:360px;width:calc(var(--ai-rail-width) + var(--ai-panel-width));transform:translate(calc(100% - var(--ai-rail-width)));transition:transform .35s ease;pointer-events:auto}.ai-assistant-drawer.is-open{transform:translate(0)}.ai-assistant-rail{width:var(--ai-rail-width);border:none;background:var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1));color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;box-shadow:inset 0 0 0 1px #fff3;transition:background .2s ease,box-shadow .2s ease}.ai-assistant-rail:hover{background:var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1));box-shadow:inset 0 0 0 1px #ffffff47}.ai-assistant-drawer.is-open .ai-assistant-rail{cursor:col-resize}.ai-assistant-rail-label{writing-mode:vertical-rl;transform:rotate(0);transform-origin:center;letter-spacing:.2em;font-size:.72rem;font-weight:700;text-transform:uppercase}.ai-assistant-panel{width:min(var(--ai-panel-width),100vw - var(--ai-rail-width));height:100%;background:#f8fafc;box-shadow:-18px 0 36px var(--ai-shadow);display:flex;flex-direction:column;gap:.75rem;padding:.9rem 1rem 1rem;border-radius:18px 0 0 18px;border:1px solid rgba(148,163,184,.3);position:relative;overflow:hidden}.ai-assistant-resize-handle{position:absolute;left:0;top:0;width:8px;height:100%;cursor:col-resize;z-index:2;background:linear-gradient(90deg,#94a3b866,#94a3b800)}.ai-assistant-header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.ai-assistant-title h4{margin:0;font-weight:700}.ai-assistant-subtitle{margin:.25rem 0 0;color:#475569;font-size:.85rem}.ai-assistant-actions{display:flex;gap:.5rem;flex-wrap:wrap}.ai-assistant-close{box-shadow:0 6px 14px #dc262640;font-weight:600}.ai-assistant-context{display:block;align-items:center;gap:.75rem;background:#eef2ff;border-radius:12px;padding:.5rem .75rem;border:1px solid rgba(129,140,248,.35)}.ai-assistant-context-label{font-weight:600;color:#1e293b;font-size:.85rem;text-transform:uppercase;letter-spacing:.08em}.ai-assistant-context-controls{display:grid;grid-template-columns:minmax(120px,20%) 1fr;align-items:center;gap:.5rem;flex:1 1 auto;min-width:0}.ai-assistant-context-controls select{width:100%}.ai-assistant-context-route{font-size:.8rem;color:#334155;background:#fffc;border-radius:999px;padding:.15rem .6rem;border:1px solid rgba(148,163,184,.4);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-assistant-body{flex:1;overflow:hidden}.ai-assistant-empty{color:#6c757d;font-size:.95rem;text-align:center;padding:24px 16px}:host ::ng-deep .ai-terminal-shell{height:100%}:host ::ng-deep .ai-terminal-sidebar,:host ::ng-deep .ai-terminal-main{min-height:0;max-height:100%}:host ::ng-deep .ai-terminal-messages{height:100%}:host ::ng-deep .ai-terminal-conversation-actions .ai-terminal-delete-btn{padding:.2rem .4rem;font-size:0;line-height:1}:host ::ng-deep .ai-terminal-conversation-actions .ai-terminal-delete-btn:before{content:"\\f1f8";font-family:FontAwesome;font-size:.9rem}:host ::ng-deep .ai-terminal-actions{width:100%;flex-wrap:nowrap;align-items:stretch}:host ::ng-deep .ai-terminal-actions .btn-primary{flex:1 1 auto;width:auto}:host ::ng-deep .ai-terminal-actions .btn-outline-secondary{flex:0 0 auto}@media(max-width:1200px){:host{display:none}}\n'],dependencies:[{kind:"component",type:AiTerminalComponent,selector:"rio-ai-terminal",inputs:["idClient","idApp","title","config","conversationStatus","messageLimit","placeholder","singleConversation","contextMode","contextRoute","paused","bypassRouteSubscriptions"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiAssistantComponent,decorators:[{type:Component,args:[{selector:"rio-ai-assistant",standalone:!1,template:'<div class="ai-assistant-overlay" [class.is-open]="open"></div>\n<div\n\tclass="ai-assistant-drawer"\n\t[class.is-open]="open"\n\t[style.--ai-panel-width]="panelWidthStyle"\n\t[style.top.px]="topOffset"\n\t[style.height.px]="panelHeight">\n\t<button\n\t\ttype="button"\n\t\tclass="ai-assistant-rail"\n\t\t(click)="handleRailClick($event)"\n\t\t(mousedown)="handleRailMouseDown($event)">\n\t\t<span class="ai-assistant-rail-label">AI Assistant</span>\n\t</button>\n\t\t<div class="ai-assistant-panel" #panelRef [class.is-open]="open" (click)="$event.stopPropagation()">\n\t\t<div class="ai-assistant-resize-handle" (mousedown)="startResize($event)"></div>\n\t\t<div class="ai-assistant-header">\n\t\t\t<div class="ai-assistant-title">\n\t\t\t\t<h4>{{ title }}</h4>\n\t\t\t\t<p class="ai-assistant-subtitle">Ask about workflows, routes, and where features live.</p>\n\t\t\t</div>\n\t\t\t<div class="ai-assistant-actions">\n\t\t\t\t@if (supportTicketEnabled) {\n\t\t\t\t\t<button type="button" class="btn btn-sm btn-outline-secondary" (click)="openSupportTicket()">Support Ticket</button>\n\t\t\t\t}\n\t\t\t\t<button type="button" class="btn btn-sm btn-danger ai-assistant-close" (click)="closePanel()">Close</button>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="ai-assistant-context">\n\t\t\t<div class="ai-assistant-context-controls">\n\t\t\t\t<select class="form-select form-select-sm" [value]="contextMode" (change)="setContextMode($event.target.value)" aria-label="Context">\n\t\t\t\t\t<option value="auto">Auto</option>\n\t\t\t\t\t<option value="current">Current Page</option>\n\t\t\t\t\t<option value="all">All Pages</option>\n\t\t\t\t</select>\n\t\t\t\t@if (contextMode !== \'all\') {\n\t\t\t\t\t<div class="ai-assistant-context-route">{{ contextRouteLabel }}</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="ai-assistant-body">\n\t\t\t<rio-ai-terminal\n\t\t\t\t[idClient]="idClient"\n\t\t\t\t[idApp]="idApp"\n\t\t\t\t[title]="title"\n\t\t\t\t[config]="terminalConfig"\n\t\t\t\t[conversationStatus]="\'active\'"\n\t\t\t\t[singleConversation]="true"\n\t\t\t\t[contextMode]="contextMode"\n\t\t\t\t[contextRoute]="currentRoute"\n\t\t\t\t[bypassRouteSubscriptions]="true"\n\t\t\t\t[paused]="!open"\n\t\t\t\t[placeholder]="\'Ask about features, navigation, how things work, or request summaries/anomaly checks...\'">\n\t\t\t</rio-ai-terminal>\n\t\t</div>\n\t</div>\n</div>\n',styles:[':host{position:fixed;inset:0;z-index:10000;pointer-events:none;--ai-rail-width: 46px;--ai-panel-width: 33.33vw;--ai-shadow: rgba(15, 23, 42, .2)}.ai-assistant-overlay{position:fixed;inset:0;background:transparent;opacity:0;pointer-events:none;transition:opacity .25s ease}.ai-assistant-overlay.is-open{opacity:0;pointer-events:none}.ai-assistant-drawer{position:fixed;right:0;display:flex;align-items:stretch;height:100%;min-height:360px;width:calc(var(--ai-rail-width) + var(--ai-panel-width));transform:translate(calc(100% - var(--ai-rail-width)));transition:transform .35s ease;pointer-events:auto}.ai-assistant-drawer.is-open{transform:translate(0)}.ai-assistant-rail{width:var(--ai-rail-width);border:none;background:var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1));color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;box-shadow:inset 0 0 0 1px #fff3;transition:background .2s ease,box-shadow .2s ease}.ai-assistant-rail:hover{background:var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1));box-shadow:inset 0 0 0 1px #ffffff47}.ai-assistant-drawer.is-open .ai-assistant-rail{cursor:col-resize}.ai-assistant-rail-label{writing-mode:vertical-rl;transform:rotate(0);transform-origin:center;letter-spacing:.2em;font-size:.72rem;font-weight:700;text-transform:uppercase}.ai-assistant-panel{width:min(var(--ai-panel-width),100vw - var(--ai-rail-width));height:100%;background:#f8fafc;box-shadow:-18px 0 36px var(--ai-shadow);display:flex;flex-direction:column;gap:.75rem;padding:.9rem 1rem 1rem;border-radius:18px 0 0 18px;border:1px solid rgba(148,163,184,.3);position:relative;overflow:hidden}.ai-assistant-resize-handle{position:absolute;left:0;top:0;width:8px;height:100%;cursor:col-resize;z-index:2;background:linear-gradient(90deg,#94a3b866,#94a3b800)}.ai-assistant-header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.ai-assistant-title h4{margin:0;font-weight:700}.ai-assistant-subtitle{margin:.25rem 0 0;color:#475569;font-size:.85rem}.ai-assistant-actions{display:flex;gap:.5rem;flex-wrap:wrap}.ai-assistant-close{box-shadow:0 6px 14px #dc262640;font-weight:600}.ai-assistant-context{display:block;align-items:center;gap:.75rem;background:#eef2ff;border-radius:12px;padding:.5rem .75rem;border:1px solid rgba(129,140,248,.35)}.ai-assistant-context-label{font-weight:600;color:#1e293b;font-size:.85rem;text-transform:uppercase;letter-spacing:.08em}.ai-assistant-context-controls{display:grid;grid-template-columns:minmax(120px,20%) 1fr;align-items:center;gap:.5rem;flex:1 1 auto;min-width:0}.ai-assistant-context-controls select{width:100%}.ai-assistant-context-route{font-size:.8rem;color:#334155;background:#fffc;border-radius:999px;padding:.15rem .6rem;border:1px solid rgba(148,163,184,.4);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-assistant-body{flex:1;overflow:hidden}.ai-assistant-empty{color:#6c757d;font-size:.95rem;text-align:center;padding:24px 16px}:host ::ng-deep .ai-terminal-shell{height:100%}:host ::ng-deep .ai-terminal-sidebar,:host ::ng-deep .ai-terminal-main{min-height:0;max-height:100%}:host ::ng-deep .ai-terminal-messages{height:100%}:host ::ng-deep .ai-terminal-conversation-actions .ai-terminal-delete-btn{padding:.2rem .4rem;font-size:0;line-height:1}:host ::ng-deep .ai-terminal-conversation-actions .ai-terminal-delete-btn:before{content:"\\f1f8";font-family:FontAwesome;font-size:.9rem}:host ::ng-deep .ai-terminal-actions{width:100%;flex-wrap:nowrap;align-items:stretch}:host ::ng-deep .ai-terminal-actions .btn-primary{flex:1 1 auto;width:auto}:host ::ng-deep .ai-terminal-actions .btn-outline-secondary{flex:0 0 auto}@media(max-width:1200px){:host{display:none}}\n']}]}],ctorParameters:()=>[{type:i1$1.Router},{type:AccountManagerService}],propDecorators:{idClient:[{type:Input}],idApp:[{type:Input}],title:[{type:Input}],open:[{type:Input}],supportTicketRoute:[{type:Input}],supportTicketEnabled:[{type:Input}],config:[{type:Input}],topOffset:[{type:Input}],panelHeight:[{type:Input}],currentRoute:[{type:Input}],hoverEnabled:[{type:Input}],openRequested:[{type:Output}],closed:[{type:Output}],terminal:[{type:ViewChild,args:[AiTerminalComponent]}],panelRef:[{type:ViewChild,args:["panelRef"]}],handleResizeMove:[{type:HostListener,args:["window:mousemove",["$event"]]}],handleResizeEnd:[{type:HostListener,args:["window:mouseup"]}]}});class ScrollDirective{onScroll=new EventEmitter;bottomOffset=100;topOffset=100;constructor(){}scrolled(t){this.elementScrollEvent(t)}windowScrolled(t){this.windowScrollEvent(t)}windowScrollEvent(t){const e=t.target,n=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,o=n<this.topOffset,r={isReachingBottom:e.body.offsetHeight-(window.innerHeight+n)<this.bottomOffset,isReachingTop:o,originalEvent:t,isWindowEvent:!0};this.onScroll.emit(r)}elementScrollEvent(t){const e=t.target,n=e.scrollHeight-e.scrollTop,o=e.offsetHeight,r=e.scrollTop<this.topOffset,i={isReachingBottom:n-o<this.bottomOffset,isReachingTop:r,originalEvent:t,isWindowEvent:!1};this.onScroll.emit(i)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ScrollDirective,deps:[],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:ScrollDirective,isStandalone:!1,selector:"[detect-scroll]",inputs:{bottomOffset:"bottomOffset",topOffset:"topOffset"},outputs:{onScroll:"onScroll"},host:{listeners:{scroll:"scrolled($event)","window:scroll":"windowScrolled($event)"}},ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ScrollDirective,decorators:[{type:Directive,args:[{selector:"[detect-scroll]",standalone:!1}]}],ctorParameters:()=>[],propDecorators:{onScroll:[{type:Output}],bottomOffset:[{type:Input}],topOffset:[{type:Input}],scrolled:[{type:HostListener,args:["scroll",["$event"]]}],windowScrolled:[{type:HostListener,args:["window:scroll",["$event"]]}]}});class NavbarMainComponent extends BaseComponent{_services;auth;_ds;_app;dropdowns;scrollable;logo="";navTabs=[];fontSize=12;publicProgram=!1;digitalSign=!1;showSupport=!0;aiAssistantVisible=!0;aiToggle=new EventEmitter;user=null;collapseShowing=!1;client="";isResolveIO=!1;tourStarted=!1;dropdownLeftTimer=null;scrollRightInterval=null;scrollLeftInterval=null;isDemo=!1;constructor(t,e,n,o){super(t),this._services=t,this.auth=e,this._ds=n,this._app=o}ngOnInit(){this._services._account.user.subscribe(t=>{this.user=t}),this.client=this._app.client.getValue(),this.tourStarted=this._services._app.tourStarted.getValue(),this.client||(this.isResolveIO=!0),this._services._app.tourStarted.subscribe(t=>{this.tourStarted=t}),this._services._app.isDemo.subscribe(t=>{this.isDemo=t})}ngAfterViewInit(){this.dropdownLeftTimer=setInterval(()=>{this.calculateDropdownsLeft()},500),document.documentElement.style.setProperty("--font-size",this.fontSize+"px")}ngOnDestroy(){this.dropdownLeftTimer&&(clearInterval(this.dropdownLeftTimer),this.dropdownLeftTimer=null)}async logout(){this._app.isLoggingOut.next(!0),await this._services._account.logOut(),this._app.isLoggingOut.next(!1)}login(){this.auth.loginUser().then(()=>{},t=>{})}hasScrolled(){return this.scrollable.nativeElement.scrollLeft<=0&&this.stopScrollRight(),this.scrollable.nativeElement.scrollLeft>0}hasMoreScroll(){return this.scrollable.nativeElement.scrollWidth<=this.scrollable.nativeElement.clientWidth+this.scrollable.nativeElement.scrollLeft&&this.stopScrollLeft(),this.scrollable.nativeElement.scrollWidth>this.scrollable.nativeElement.clientWidth+this.scrollable.nativeElement.scrollLeft}startScrollRight(){this.scrollRightInterval=setInterval(()=>{this.scrollable.nativeElement.scrollLeft-=2},1)}stopScrollRight(){clearInterval(this.scrollRightInterval)}scrollRightOnce(){this.scrollable.nativeElement.scrollLeft-=50}startScrollLeft(){this.scrollLeftInterval=setInterval(()=>{this.scrollable.nativeElement.scrollLeft+=2},1)}stopScrollLeft(){clearInterval(this.scrollLeftInterval)}scrollLeftOnce(){this.scrollable.nativeElement.scrollLeft+=50}handleNavLinkClick(t){if(t&&(t.metaKey||t.ctrlKey)){const e=t.currentTarget;e&&e.href&&(window.open(e.href,"_blank"),t.preventDefault(),t.stopPropagation())}}toggleAiAssistant(t){t&&(t.preventDefault(),t.stopPropagation()),this.aiToggle.emit()}calculateDropdownsLeft(){if(this.dropdowns&&this.dropdowns.toArray()&&this.dropdowns.toArray().length&&this.scrollable){const t=[];return this.navTabs.filter(t=>"dropdown"===t.type).forEach(e=>{const n=e.label||"",o=this.dropdowns.toArray().filter(t=>t.nativeElement.innerText.split("\n")[0].replace(/[^A-Za-z0-9]/g,"")===n.replace(/[^A-Za-z0-9]/g,""))[0],r=o?o.nativeElement.querySelector(".dropdown-menu"):null,i=o?Math.max(o.nativeElement.offsetLeft-this.scrollable.nativeElement.scrollLeft,this.scrollable.nativeElement.offsetLeft):0;if(r){parseInt(r.style.left||"0",10)!==i&&t.push({dropDownMenu:r,nextLeft:i})}}),t.length&&t.forEach(t=>{t.dropDownMenu.style.left=t.nextLeft+"px"}),!0}return!1}isInRole(t){if(!t)return!0;if(this.isSuperAdmin())return!0;if(this.user&&this.user.roles.groups)for(let e=0;e<this.user.roles.groups.length;e++){let n=this.user.roles.groups[e];for(let e=0;e<n.views.length;e++){let o=n.views[e];if(o===t||o.startsWith(t+"/"))return!0}}return!1}isSuperAdmin(){return!(!this.user||!this.user.roles)&&this.user.roles.super_admin}isInOneRole(t){if(this.isSuperAdmin())return!0;for(let e=0;e<t.length;e++){let n=t[e];if(!n)return!0;if(this._services._account.isUserInView(n))return!0}return!1}navigateTo(t){this._services._router.navigateByUrl(t)}help(){this._ds.input("What do you need help with?",[{label:"Title of Problem",form:"problem_title",data:"",validators:[Validators.required],validatorErrors:["required"],validatorMsg:["Problem title is required."],required:!0},{label:"Description of Problem",form:"problem_desc",data:"",validators:[Validators.required],validatorErrors:["required"],validatorMsg:["Problem description is required."],required:!0,type:"textarea"}]).then(t=>{this._services._socket.call("getHelpNotification",this._services._account.getUser().fullname,t.problem_title.value,t.problem_desc.value)},()=>{})}isCustomer(){const t=this._services._account.getUser();return!(!t||!t.other)&&!(!t.other.customers||!t.other.customers.length)}getWindowWidth(){return window.innerWidth}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NavbarMainComponent,deps:[{token:ProviderService},{token:AuthService},{token:DialogService},{token:CoreService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:NavbarMainComponent,isStandalone:!1,selector:"navbar-main",inputs:{logo:"logo",navTabs:"navTabs",fontSize:"fontSize",publicProgram:"publicProgram",digitalSign:"digitalSign",showSupport:"showSupport",aiAssistantVisible:"aiAssistantVisible"},outputs:{aiToggle:"aiToggle"},providers:[ProviderService],viewQueries:[{propertyName:"scrollable",first:!0,predicate:["scrollable"],descendants:!0,static:!0},{propertyName:"dropdowns",predicate:["dropdowns"],descendants:!0}],usesInheritance:!0,ngImport:i0,template:'<style>\n\t:root {\n\t\t--font-size: 12;\n\t}\n\n\t:host ::ng-deep * {\n\t\tfont-size: var(--font-size);\n\t}\n\n\t@media (max-width: 1200px) {\n\t\t.navbarMain a {\n\t\t\tfont-size: 18px !important;\n\t\t}\n\t\t.navbarMain .dropdown-menu {\n\t\t\tmargin-left: 10px;\n\t\t}\n\t\t.navbar-divider-pipe {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.navbar-divider-hr {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\theight: 1px;\n\t\t\tborder: 0;\n\t\t\tborder-top: 1px solid white;\n\t\t\tbackground-color: white;\n\t\t\tcolor: white;\n\t\t\topacity: 1;\n\t\t\tmargin: 0.25rem 0;\n\t\t}\n\t}\n\t@media (min-width: 1200px) {\n\t\t.scrollable-x {\n\t\t\tmax-width: 60vw;\n\t\t\toverflow-x: auto;\n\t\t\toverflow-y: visible;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t::-webkit-scrollbar {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t.verticalAlign {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t.dropdown {\n\t\t\tposition: static;\n\t\t}\n\t}\n\n\t.navbar li {\n\t\tcursor: pointer;\n\t\ttext-align: center;\n\t}\n\n\t.navbar-divider-pipe {\n\t\tdisplay: inline-block;\n\t\talign-self: stretch;\n\t\twidth: 1px;\n\t\tbackground-color: white;\n\t\topacity: 0.8;\n\t\tmargin: 0 0.75rem;\n\t}\n\n\t.navbar-dark .navbar-nav .nav-link:hover,\n\t.navbar-dark .navbar-nav .nav-link:focus {\n\t\tcolor: gray;\n\t}\n\t.navbar-divider-item {\n\t\tdisplay: flex;\n\t\talign-items: stretch;\n\t}\n</style>\n\n<div class="row">\n\t<nav class="navbar navbar-expand-xl navbar-dark bg-dark navbarMain" style="width: 100%">\n\t\t<a class="navbar-brand" href="#">\n\t\t\t@if (!isDemo) {\n\t\t\t\t<img [src]="logo" style="width: auto; height: 36px" />\n\t\t\t}\n\t\t</a>\n\t\t<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarMainNav" aria-controls="navbarMainNav" aria-expanded="false" aria-label="Toggle navigation">\n\t\t\t<span class="navbar-toggler-icon"></span>\n\t\t</button>\n\t\t<div class="navbar-collapse collapse" id="navbarMainNav">\n\t\t\t<ul class="navbar-nav">\n\t\t\t\t@if (!publicProgram && !digitalSign) {\n\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav" [style.border-right]="getWindowWidth() > 1200 ? \'1px solid white\' : \'\'">\n\t\t\t\t\t\t<a class="nav-link" routerLink="home" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" routerLinkActive="active">Home</a>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t\t@if (hasScrolled()) {\n\t\t\t\t<div (mouseover)="startScrollRight()" (mouseout)="stopScrollRight()" (click)="scrollRightOnce()">\n\t\t\t\t\t<i class="fa fa-arrow-left" style="color: white; font-size: 20px"></i>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<ul [ngClass]="[\'navbar-nav\', \'scrollable-x\']" #scrollable detect-scroll (onScroll)="calculateDropdownsLeft()">\n\t\t\t\t@for (tab of navTabs; track tab.label || tab.links?.[0]?.routerLink || i; let i = $index) {\n\t\t\t\t\t@if (tab.type === \'link\') {\n\t\t\t\t\t\t@if ((publicProgram || user) && !digitalSign && isInRole(tab.links[0].role)) {\n\t\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" [tourAnchor]="tab.tourAnchor" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" [routerLink]="tab.links[0].routerLink" routerLinkActive="active">{{ tab.links[0].label }}</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t@if (tab.type === \'dropdown\') {\n\t\t\t\t\t\t@if ((publicProgram || user) && isInOneRole(tab.roles)) {\n\t\t\t\t\t\t\t<li #dropdowns class="nav-item dropdown">\n\t\t\t\t\t\t\t\t<a class="nav-link dropdown-toggle" [class.disabled]="tourStarted ? true : null" id="navbarDropdownAsset" role="button" [tourAnchor]="tab.tourAnchor" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n\t\t\t\t\t\t\t\t\t{{ tab.label }}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<div class="dropdown-menu bg-dark" aria-labelledby="navbarDropdownAsset" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t\t\t@for (link of tab.links; track link.routerLink || link.label) {\n\t\t\t\t\t\t\t\t\t\t@if ((publicProgram || user) && isInRole(link.role)) {\n\t\t\t\t\t\t\t\t\t\t\t<a class="dropdown-item nav-link" (click)="handleNavLinkClick($event)" [routerLink]="link.routerLink">{{ link.label }}</a>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</ul>\n\t\t\t@if (hasMoreScroll()) {\n\t\t\t\t<div (mouseover)="startScrollLeft()" (mouseout)="stopScrollLeft()" (click)="scrollLeftOnce()">\n\t\t\t\t\t<i class="fa fa-arrow-right" style="color: white; font-size: 20px"></i>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@if (getWindowWidth() < 1200) {\n\t\t\t\t<hr class="navbar-divider-hr" />\n\t\t\t}\n\t\t\t@if ((!publicProgram || user) && !digitalSign) {\n\t\t\t\t<ul [ngClass]="[\'navbar-nav\', \'ms-auto\']">\n\t\t\t\t\t@if (user && getWindowWidth() > 1200 && aiAssistantVisible) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="toggleAiAssistant($event)" [class.disabled]="tourStarted ? true : null">AI Assistant</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user && client && (showSupport || isSuperAdmin())) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav" style="height: 30px" tourAnchor="supportSection">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" routerLink="support-ticket" routerLinkActive="active">Support</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user && isInRole(\'super-admin\')) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" routerLink="logs" routerLinkActive="active">Logs</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user && isInRole(\'super-admin\')) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" routerLink="super-admin" routerLinkActive="active">Super Admin</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user) {\n\t\t\t\t\t\t<li class="nav-item navbar-divider-item">\n\t\t\t\t\t\t\t@if (getWindowWidth() > 1200) {\n\t\t\t\t\t\t\t\t<span class="navbar-divider-pipe" aria-hidden="true"></span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t<hr class="navbar-divider-hr" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (!user) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="login()" style="cursor: pointer" routerLinkActive="active">Login</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user) {\n\t\t\t\t\t\t<li class="nav-item" tourAnchor="userSettings">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" routerLink="user-settings">Hello {{ user.fullname }}!</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user) {\n\t\t\t\t\t\t<li class="nav-item" style="cursor: pointer" (click)="logout()" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" [class.disabled]="tourStarted ? true : null">Logout</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t</ul>\n\t\t\t}\n\t\t</div>\n\t</nav>\n</div>\n',styles:[":root{--font-size: 12}:host ::ng-deep *{font-size:var(--font-size)}@media(max-width:1200px){.navbarMain a{font-size:18px!important}.navbarMain .dropdown-menu{margin-left:10px}.navbar-divider-pipe{display:none}.navbar-divider-hr{display:block;width:100%;height:1px;border:0;border-top:1px solid white;background-color:#fff;color:#fff;opacity:1;margin:.25rem 0}}@media(min-width:1200px){.scrollable-x{max-width:60vw;overflow-x:auto;overflow-y:visible;align-items:center}::-webkit-scrollbar{display:none}.verticalAlign{display:flex;align-items:center}.dropdown{position:static}}.navbar li{cursor:pointer;text-align:center}.navbar-divider-pipe{display:inline-block;align-self:stretch;width:1px;background-color:#fff;opacity:.8;margin:0 .75rem}.navbar-dark .navbar-nav .nav-link:hover,.navbar-dark .navbar-nav .nav-link:focus{color:gray}.navbar-divider-item{display:flex;align-items:stretch}\n"],dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:i1$1.RouterLink,selector:"[routerLink]",inputs:["target","queryParams","fragment","queryParamsHandling","state","info","relativeTo","preserveFragment","skipLocationChange","replaceUrl","routerLink"]},{kind:"directive",type:i1$1.RouterLinkActive,selector:"[routerLinkActive]",inputs:["routerLinkActiveOptions","ariaCurrentWhenActive","routerLinkActive"],outputs:["isActiveChange"],exportAs:["routerLinkActive"]},{kind:"directive",type:ScrollDirective,selector:"[detect-scroll]",inputs:["bottomOffset","topOffset"],outputs:["onScroll"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NavbarMainComponent,decorators:[{type:Component,args:[{selector:"navbar-main",providers:[ProviderService],standalone:!1,template:'<style>\n\t:root {\n\t\t--font-size: 12;\n\t}\n\n\t:host ::ng-deep * {\n\t\tfont-size: var(--font-size);\n\t}\n\n\t@media (max-width: 1200px) {\n\t\t.navbarMain a {\n\t\t\tfont-size: 18px !important;\n\t\t}\n\t\t.navbarMain .dropdown-menu {\n\t\t\tmargin-left: 10px;\n\t\t}\n\t\t.navbar-divider-pipe {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.navbar-divider-hr {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\theight: 1px;\n\t\t\tborder: 0;\n\t\t\tborder-top: 1px solid white;\n\t\t\tbackground-color: white;\n\t\t\tcolor: white;\n\t\t\topacity: 1;\n\t\t\tmargin: 0.25rem 0;\n\t\t}\n\t}\n\t@media (min-width: 1200px) {\n\t\t.scrollable-x {\n\t\t\tmax-width: 60vw;\n\t\t\toverflow-x: auto;\n\t\t\toverflow-y: visible;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t::-webkit-scrollbar {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t.verticalAlign {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t.dropdown {\n\t\t\tposition: static;\n\t\t}\n\t}\n\n\t.navbar li {\n\t\tcursor: pointer;\n\t\ttext-align: center;\n\t}\n\n\t.navbar-divider-pipe {\n\t\tdisplay: inline-block;\n\t\talign-self: stretch;\n\t\twidth: 1px;\n\t\tbackground-color: white;\n\t\topacity: 0.8;\n\t\tmargin: 0 0.75rem;\n\t}\n\n\t.navbar-dark .navbar-nav .nav-link:hover,\n\t.navbar-dark .navbar-nav .nav-link:focus {\n\t\tcolor: gray;\n\t}\n\t.navbar-divider-item {\n\t\tdisplay: flex;\n\t\talign-items: stretch;\n\t}\n</style>\n\n<div class="row">\n\t<nav class="navbar navbar-expand-xl navbar-dark bg-dark navbarMain" style="width: 100%">\n\t\t<a class="navbar-brand" href="#">\n\t\t\t@if (!isDemo) {\n\t\t\t\t<img [src]="logo" style="width: auto; height: 36px" />\n\t\t\t}\n\t\t</a>\n\t\t<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarMainNav" aria-controls="navbarMainNav" aria-expanded="false" aria-label="Toggle navigation">\n\t\t\t<span class="navbar-toggler-icon"></span>\n\t\t</button>\n\t\t<div class="navbar-collapse collapse" id="navbarMainNav">\n\t\t\t<ul class="navbar-nav">\n\t\t\t\t@if (!publicProgram && !digitalSign) {\n\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav" [style.border-right]="getWindowWidth() > 1200 ? \'1px solid white\' : \'\'">\n\t\t\t\t\t\t<a class="nav-link" routerLink="home" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" routerLinkActive="active">Home</a>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t\t@if (hasScrolled()) {\n\t\t\t\t<div (mouseover)="startScrollRight()" (mouseout)="stopScrollRight()" (click)="scrollRightOnce()">\n\t\t\t\t\t<i class="fa fa-arrow-left" style="color: white; font-size: 20px"></i>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<ul [ngClass]="[\'navbar-nav\', \'scrollable-x\']" #scrollable detect-scroll (onScroll)="calculateDropdownsLeft()">\n\t\t\t\t@for (tab of navTabs; track tab.label || tab.links?.[0]?.routerLink || i; let i = $index) {\n\t\t\t\t\t@if (tab.type === \'link\') {\n\t\t\t\t\t\t@if ((publicProgram || user) && !digitalSign && isInRole(tab.links[0].role)) {\n\t\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" [tourAnchor]="tab.tourAnchor" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" [routerLink]="tab.links[0].routerLink" routerLinkActive="active">{{ tab.links[0].label }}</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t@if (tab.type === \'dropdown\') {\n\t\t\t\t\t\t@if ((publicProgram || user) && isInOneRole(tab.roles)) {\n\t\t\t\t\t\t\t<li #dropdowns class="nav-item dropdown">\n\t\t\t\t\t\t\t\t<a class="nav-link dropdown-toggle" [class.disabled]="tourStarted ? true : null" id="navbarDropdownAsset" role="button" [tourAnchor]="tab.tourAnchor" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n\t\t\t\t\t\t\t\t\t{{ tab.label }}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<div class="dropdown-menu bg-dark" aria-labelledby="navbarDropdownAsset" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t\t\t@for (link of tab.links; track link.routerLink || link.label) {\n\t\t\t\t\t\t\t\t\t\t@if ((publicProgram || user) && isInRole(link.role)) {\n\t\t\t\t\t\t\t\t\t\t\t<a class="dropdown-item nav-link" (click)="handleNavLinkClick($event)" [routerLink]="link.routerLink">{{ link.label }}</a>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</ul>\n\t\t\t@if (hasMoreScroll()) {\n\t\t\t\t<div (mouseover)="startScrollLeft()" (mouseout)="stopScrollLeft()" (click)="scrollLeftOnce()">\n\t\t\t\t\t<i class="fa fa-arrow-right" style="color: white; font-size: 20px"></i>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@if (getWindowWidth() < 1200) {\n\t\t\t\t<hr class="navbar-divider-hr" />\n\t\t\t}\n\t\t\t@if ((!publicProgram || user) && !digitalSign) {\n\t\t\t\t<ul [ngClass]="[\'navbar-nav\', \'ms-auto\']">\n\t\t\t\t\t@if (user && getWindowWidth() > 1200 && aiAssistantVisible) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="toggleAiAssistant($event)" [class.disabled]="tourStarted ? true : null">AI Assistant</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user && client && (showSupport || isSuperAdmin())) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav" style="height: 30px" tourAnchor="supportSection">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" routerLink="support-ticket" routerLinkActive="active">Support</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user && isInRole(\'super-admin\')) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" routerLink="logs" routerLinkActive="active">Logs</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user && isInRole(\'super-admin\')) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" routerLink="super-admin" routerLinkActive="active">Super Admin</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user) {\n\t\t\t\t\t\t<li class="nav-item navbar-divider-item">\n\t\t\t\t\t\t\t@if (getWindowWidth() > 1200) {\n\t\t\t\t\t\t\t\t<span class="navbar-divider-pipe" aria-hidden="true"></span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t<hr class="navbar-divider-hr" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (!user) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="login()" style="cursor: pointer" routerLinkActive="active">Login</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user) {\n\t\t\t\t\t\t<li class="nav-item" tourAnchor="userSettings">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" routerLink="user-settings">Hello {{ user.fullname }}!</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user) {\n\t\t\t\t\t\t<li class="nav-item" style="cursor: pointer" (click)="logout()" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" [class.disabled]="tourStarted ? true : null">Logout</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t</ul>\n\t\t\t}\n\t\t</div>\n\t</nav>\n</div>\n'}]}],ctorParameters:()=>[{type:ProviderService},{type:AuthService},{type:DialogService},{type:CoreService}],propDecorators:{dropdowns:[{type:ViewChildren,args:["dropdowns"]}],scrollable:[{type:ViewChild,args:["scrollable",{static:!0}]}],logo:[{type:Input,args:["logo"]}],navTabs:[{type:Input,args:["navTabs"]}],fontSize:[{type:Input,args:["fontSize"]}],publicProgram:[{type:Input,args:["publicProgram"]}],digitalSign:[{type:Input,args:["digitalSign"]}],showSupport:[{type:Input,args:["showSupport"]}],aiAssistantVisible:[{type:Input,args:["aiAssistantVisible"]}],aiToggle:[{type:Output}]}});class FilterEqualPipe{transform(t,e,n){return t?t.filter(t=>t[e]===n):[]}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FilterEqualPipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:FilterEqualPipe,isStandalone:!1,name:"filterEqual",pure:!1})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FilterEqualPipe,decorators:[{type:Pipe,args:[{name:"filterEqual",pure:!1,standalone:!1}]}]});class FilterNotEqualPipe{transform(t,e,n){return t?t.filter(t=>t[e]!==n):[]}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FilterNotEqualPipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:FilterNotEqualPipe,isStandalone:!1,name:"filterNotEqual"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FilterNotEqualPipe,decorators:[{type:Pipe,args:[{name:"filterNotEqual",standalone:!1}]}]});class NavbarModuleComponent extends BaseComponent{_cdRef;_services;sideNavHeight;sideNavWidth;menuData={title:"",module:null,description:null,description_name:"Description",tabs:[]};selectedTab=null;currentRoute="";routerEvents$=[];tourStarted=!1;drawerOpen=!1;isDeviceWidth=window.innerWidth<=1200;constructor(t,e){super(e),this._cdRef=t,this._services=e}ngOnInit(){this.tourStarted=this._services._app.tourStarted.getValue(),this.routerEvents$.push(this._services._router.events.subscribe(t=>{this._services._router.url.replace(/\/[a-f0-9]{24}$/,"").replace(/\?.+$/,"")===this.currentRoute&&this.selectedTab||this.selectTabFromRouter()})),this.routerEvents$.push(this._services._app.navbarModuleData.subscribe(t=>{this.menuData=t,this._services._router.url.replace(/\/[a-f0-9]{24}$/,"").replace(/\?.+$/,"")===this.currentRoute&&this.selectedTab||this.selectTabFromRouter()})),this.routerEvents$.push(this._services._app.tourStarted.subscribe(t=>{this.tourStarted=t}))}onResize(){this.isDeviceWidth=window.innerWidth<=1200}ngOnDestroy(){this.routerEvents$.forEach(t=>{t.unsubscribe()})}selectTabFromRouter(){if(this.menuData)if("/"===this._services._router.url)this.selectedTab=this.menuData.tabs[0];else{for(this.currentRoute=this._services._router.url.replace(/\/[a-f0-9]{24}$/,"").replace(/\?.+$/,""),this.selectedTab=null;!this.selectedTab&&this.currentRoute.split("/").length>2;){for(let t=0;t<this.menuData.tabs.length;t++){let e=this.menuData.tabs[t];if(e.link===this.currentRoute){this.selectedTab=e;break}}this.currentRoute=this.currentRoute.replace(/(\/[^\/]+$)/,"")}this.selectedTab||(this.selectedTab=this.menuData.tabs[0])}}tabClass(t){return this.selectedTab&&this.selectedTab.label===t.label?"active":""}handleNavLinkClick(t){if(t&&(t.metaKey||t.ctrlKey)){const e=t.currentTarget;e&&e.href&&(window.open(e.href,"_blank"),t.preventDefault(),t.stopPropagation())}}onNavLinkClick(t){this.handleNavLinkClick(t),!t.defaultPrevented&&window.innerWidth<=1200&&(this.drawerOpen=!1)}toggleDrawer(){this.drawerOpen=!this.drawerOpen}navigateTo(t){this.selectedTab!==t&&(this.selectedTab=t,null===t.params?this._services._router.navigateByUrl(t.link):this._services._router.navigateByUrl(t.link+"/"+t.params),window.innerWidth<=1200&&(this.drawerOpen=!1))}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NavbarModuleComponent,deps:[{token:i0.ChangeDetectorRef},{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:NavbarModuleComponent,isStandalone:!1,selector:"navbar-module",inputs:{sideNavHeight:"sideNavHeight",sideNavWidth:"sideNavWidth"},host:{listeners:{"window:resize":"onResize()"}},providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<style>\n\t.navbarModule li {\n\t\tcursor: pointer;\n\t}\n\t.navbarModule li.active {\n\t\tborder-left: 3px solid #d19b3d;\n\t}\n\t.navbarModule nav {\n\t\twidth: 100%;\n\t}\n\t.navbar-module-container {\n\t\tmargin-left: calc(var(--bs-gutter-x, 1.5rem) / -2);\n\t\tmargin-right: calc(var(--bs-gutter-x, 1.5rem) / -2);\n\t}\n\n\t.navbarModule .nav-link {\n\t\tmargin-left: 10px;\n\t}\n\n\t@media (min-width: 1200px) {\n\t\t.navbarModule {\n\t\t\theight: 95vh;\n\t\t\tmargin-left: -10px;\n\t\t}\n\n\t\thr {\n\t\t\tborder-top: white 1px solid;\n\t\t}\n\t}\n\n\t@media (max-width: 1200px) {\n\t\t.device-drawer-margin {\n\t\t\tmargin-left: 10px !important;\n\t\t}\n\n\t\thr {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t.navbarModule a {\n\t\t\tfont-size: 18px !important;\n\t\t}\n\t}\n</style>\n\n<div class="navbar-module-container">\n\t<nav class="navbar navbar-expand-xl navbar-dark bg-dark flex-xl-column navbarModule" [style.height]="sideNavHeight ? sideNavHeight + \'px\' : \'\'" [style.width]="sideNavWidth ? sideNavWidth : \'\'">\n\t\t<div href="#" style="color: white; font-size: 16px; margin-left: 10px;">\n\t\t\t{{ menuData.title }}\n\t\t</div>\n\t\t<button class="navbar-toggler" type="button" [attr.aria-controls]="\'navbarModuleNav\'" [attr.aria-expanded]="drawerOpen" aria-label="Toggle navigation" (click)="toggleDrawer()">\n\t\t\t<span class="navbar-toggler-icon"></span>\n\t\t</button>\n\t\t<div class="navbar-collapse collapse" [class.show]="drawerOpen" [ngClass]="{ \'device-drawer-margin\': isDeviceWidth }" id="navbarModuleNav" style="align-items: baseline; width: 100%; overflow-y: auto; overflow-x: hidden">\n\t\t\t<ul class="navbar-nav" style="display: block; float: left; width: 100%">\n\t\t\t\t@for (tab of menuData.tabs | filterNotEqual: \'params\' : \'0\'; track tab.label; let i = $index) {\n\t\t\t\t\t@if (tab.params !== null && menuData.tabs[i - 1] && menuData.tabs[i - 1].params === null) {\n\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t<div href="#" style="color: white; font-size: 16px">Selected {{ menuData.module }}</div>\n\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t<div style="color: white; margin-left: 5px; text-decoration: underline; font-size: 14px">{{ menuData.description_name }}:</div>\n\t\t\t\t\t\t<div style="color: white; margin-left: 8px; font-size: 12px">{{ menuData.description }}</div>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t}\n\t\t\t\t\t<li [ngClass]="[\'nav-item\', tabClass(tab)]" [tourAnchor]="tab.tourAnchor">\n\t\t\t\t\t\t<a class="nav-link" [class.disabled]="tourStarted ? true : null" (click)="onNavLinkClick($event)" [routerLink]="[tab.params ? tab.link + \'/\' + tab.params : tab.link]" routerLinkActive="active">{{ tab.label }}</a>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t</div>\n\t</nav>\n</div>\n',styles:[".navbarModule li{cursor:pointer}.navbarModule li.active{border-left:3px solid #d19b3d}.navbarModule nav{width:100%}.navbar-module-container{margin-left:calc(var(--bs-gutter-x, 1.5rem) / -2);margin-right:calc(var(--bs-gutter-x, 1.5rem) / -2)}.navbarModule .nav-link{margin-left:10px}@media(min-width:1200px){.navbarModule{height:95vh;margin-left:-10px}hr{border-top:white 1px solid}}@media(max-width:1200px){.device-drawer-margin{margin-left:10px!important}hr{display:none}.navbarModule a{font-size:18px!important}}\n"],dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:i1$1.RouterLink,selector:"[routerLink]",inputs:["target","queryParams","fragment","queryParamsHandling","state","info","relativeTo","preserveFragment","skipLocationChange","replaceUrl","routerLink"]},{kind:"directive",type:i1$1.RouterLinkActive,selector:"[routerLinkActive]",inputs:["routerLinkActiveOptions","ariaCurrentWhenActive","routerLinkActive"],outputs:["isActiveChange"],exportAs:["routerLinkActive"]},{kind:"pipe",type:FilterNotEqualPipe,name:"filterNotEqual"}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NavbarModuleComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"navbar-module",standalone:!1,template:'<style>\n\t.navbarModule li {\n\t\tcursor: pointer;\n\t}\n\t.navbarModule li.active {\n\t\tborder-left: 3px solid #d19b3d;\n\t}\n\t.navbarModule nav {\n\t\twidth: 100%;\n\t}\n\t.navbar-module-container {\n\t\tmargin-left: calc(var(--bs-gutter-x, 1.5rem) / -2);\n\t\tmargin-right: calc(var(--bs-gutter-x, 1.5rem) / -2);\n\t}\n\n\t.navbarModule .nav-link {\n\t\tmargin-left: 10px;\n\t}\n\n\t@media (min-width: 1200px) {\n\t\t.navbarModule {\n\t\t\theight: 95vh;\n\t\t\tmargin-left: -10px;\n\t\t}\n\n\t\thr {\n\t\t\tborder-top: white 1px solid;\n\t\t}\n\t}\n\n\t@media (max-width: 1200px) {\n\t\t.device-drawer-margin {\n\t\t\tmargin-left: 10px !important;\n\t\t}\n\n\t\thr {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t.navbarModule a {\n\t\t\tfont-size: 18px !important;\n\t\t}\n\t}\n</style>\n\n<div class="navbar-module-container">\n\t<nav class="navbar navbar-expand-xl navbar-dark bg-dark flex-xl-column navbarModule" [style.height]="sideNavHeight ? sideNavHeight + \'px\' : \'\'" [style.width]="sideNavWidth ? sideNavWidth : \'\'">\n\t\t<div href="#" style="color: white; font-size: 16px; margin-left: 10px;">\n\t\t\t{{ menuData.title }}\n\t\t</div>\n\t\t<button class="navbar-toggler" type="button" [attr.aria-controls]="\'navbarModuleNav\'" [attr.aria-expanded]="drawerOpen" aria-label="Toggle navigation" (click)="toggleDrawer()">\n\t\t\t<span class="navbar-toggler-icon"></span>\n\t\t</button>\n\t\t<div class="navbar-collapse collapse" [class.show]="drawerOpen" [ngClass]="{ \'device-drawer-margin\': isDeviceWidth }" id="navbarModuleNav" style="align-items: baseline; width: 100%; overflow-y: auto; overflow-x: hidden">\n\t\t\t<ul class="navbar-nav" style="display: block; float: left; width: 100%">\n\t\t\t\t@for (tab of menuData.tabs | filterNotEqual: \'params\' : \'0\'; track tab.label; let i = $index) {\n\t\t\t\t\t@if (tab.params !== null && menuData.tabs[i - 1] && menuData.tabs[i - 1].params === null) {\n\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t<div href="#" style="color: white; font-size: 16px">Selected {{ menuData.module }}</div>\n\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t<div style="color: white; margin-left: 5px; text-decoration: underline; font-size: 14px">{{ menuData.description_name }}:</div>\n\t\t\t\t\t\t<div style="color: white; margin-left: 8px; font-size: 12px">{{ menuData.description }}</div>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t}\n\t\t\t\t\t<li [ngClass]="[\'nav-item\', tabClass(tab)]" [tourAnchor]="tab.tourAnchor">\n\t\t\t\t\t\t<a class="nav-link" [class.disabled]="tourStarted ? true : null" (click)="onNavLinkClick($event)" [routerLink]="[tab.params ? tab.link + \'/\' + tab.params : tab.link]" routerLinkActive="active">{{ tab.label }}</a>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t</div>\n\t</nav>\n</div>\n'}]}],ctorParameters:()=>[{type:i0.ChangeDetectorRef},{type:ProviderService}],propDecorators:{sideNavHeight:[{type:Input}],sideNavWidth:[{type:Input}],onResize:[{type:HostListener,args:["window:resize"]}]}});class CoreComponent extends BaseComponent{_deviceDet;_ds;_resizeService;_services;_offline;_storage;_auth;_aps;_featureGates;environment;logo="";navTabs=[];userHasPhoneNumber=!1;client="";showNavbarModule=!0;publicProgram=!1;showSupport=!0;aiAssistantEnabled=!0;el_navBarMain;el_navBarModule;year=(new Date).getFullYear().toString();fullScreen=!1;windowSizeHeight=window.innerHeight;windowSizeWidth=window.innerWidth;navbarMainHeight=0;statusHeight=0;connectedHeight=0;isDevice=!1;showNavigationMenu=!1;bottomNavSpacerHeight=100;swFlagAlert=null;isConnected=!1;isConnecting=!1;socketStatus;user;status;collapsableMenu=!0;fontSize=12;openedWindow=!1;aiAssistantOpen=!1;aiAssistantAppId="resolveio-assistant";aiAssistantConfig=null;currentRoute="";isOffline=!1;foundUpdate=!1;orientation="portrait";digitalSign=!1;constructor(t,e,n,o,r,i,s,a,l){super(o),this._deviceDet=t,this._ds=e,this._resizeService=n,this._services=o,this._offline=r,this._storage=i,this._auth=s,this._aps=a,this._featureGates=l}ngOnInit(){this._services._app.setEnvironment(this.environment),this.aiAssistantAppId=this.resolveAiAssistantAppId(),this.aiAssistantConfig=this.resolveAiAssistantConfig(),this.currentRoute=this._services._router?.url||"",this._offline.initStorage(this.environment.OFFLINE_DB_SECRET_KEY),this._services._app.setClient(this.client),this._services._app.setNavTabs(this.filterNavTabs(this.navTabs)),this._services._account.initLoginManager(this.environment),this.environment&&this.environment.MS_ALLOWED?this._auth.setupMSSingleSignOn(this.environment):this.environment&&this._auth.setEnvironment(this.environment),this._auth.setUserHasPhoneNumber(this.userHasPhoneNumber),this._resizeService.onResize$.subscribe(t=>{setTimeout(()=>{this.windowSizeHeight=t.innerHeight,this.windowSizeWidth=t.innerWidth,this.updateStandaloneNavigation()},100)}),this._services._app.fullScreen.subscribe(t=>{this.fullScreen=t}),this._services._account.user.subscribe(t=>{t&&t.settings?(this.collapsableMenu=t.settings.collapsable_menu,this.fontSize=t.settings.font_size,document.documentElement.style.setProperty("--warning-color",t.settings.warning_color),document.documentElement.style.setProperty("--warning-font-color",t.settings.warning_font_color),document.documentElement.style.setProperty("--warning-shadow-color","0 0 0 0.2rem "+hexToRGB$1(t.settings.warning_color,.5)),document.documentElement.style.setProperty("--warning-hover-color",t.settings.warning_hover_color),document.documentElement.style.setProperty("--success-color",t.settings.success_color),document.documentElement.style.setProperty("--success-font-color",t.settings.success_font_color),document.documentElement.style.setProperty("--success-shadow-color","0 0 0 0.2rem "+hexToRGB$1(t.settings.success_color,.5)),document.documentElement.style.setProperty("--success-hover-color",t.settings.success_hover_color),document.documentElement.style.setProperty("--danger-color",t.settings.danger_color),document.documentElement.style.setProperty("--danger-font-color",t.settings.danger_font_color),document.documentElement.style.setProperty("--danger-shadow-color","0 0 0 0.2rem "+hexToRGB$1(t.settings.danger_color,.5)),document.documentElement.style.setProperty("--danger-hover-color",t.settings.danger_hover_color),document.documentElement.style.setProperty("--info-color",t.settings.info_color),document.documentElement.style.setProperty("--info-font-color",t.settings.info_font_color),document.documentElement.style.setProperty("--info-shadow-color","0 0 0 0.2rem "+hexToRGB$1(t.settings.info_color,.5)),document.documentElement.style.setProperty("--info-hover-color",t.settings.info_hover_color),document.documentElement.style.setProperty("--primary-color",t.settings.primary_color),document.documentElement.style.setProperty("--primary-font-color",t.settings.primary_font_color),document.documentElement.style.setProperty("--primary-shadow-color","0 0 0 0.2rem "+hexToRGB$1(t.settings.primary_color,.5)),document.documentElement.style.setProperty("--primary-hover-color",t.settings.primary_hover_color),document.documentElement.style.setProperty("--secondary-color",t.settings.secondary_color),document.documentElement.style.setProperty("--secondary-font-color",t.settings.secondary_font_color),document.documentElement.style.setProperty("--secondary-shadow-color","0 0 0 0.2rem "+hexToRGB$1(t.settings.secondary_color,.5)),document.documentElement.style.setProperty("--secondary-hover-color",t.settings.secondary_hover_color)):!t||t.other.customers&&t.other.customers.length||t.other.id_customer||t.settings||this.openedWindow?(document.documentElement.style.setProperty("--warning-color","#ffc107"),document.documentElement.style.setProperty("--warning-font-color","#000000"),document.documentElement.style.setProperty("--warning-shadow-color","0 0 0 0.2rem rgba(222, 170, 12, 0.5)"),document.documentElement.style.setProperty("--warning-hover-color","#e0a800"),document.documentElement.style.setProperty("--success-color","#28a745"),document.documentElement.style.setProperty("--success-font-color","#ffffff"),document.documentElement.style.setProperty("--success-shadow-color","0 0 0 0.2rem rgba(72, 180, 97, 0.5)"),document.documentElement.style.setProperty("--success-hover-color","#218838"),document.documentElement.style.setProperty("--danger-color","#dc3545"),document.documentElement.style.setProperty("--danger-font-color","#ffffff"),document.documentElement.style.setProperty("--danger-shadow-color","0 0 0 0.2rem rgba(225, 83, 97, 0.5)"),document.documentElement.style.setProperty("--danger-hover-color","#c82333"),document.documentElement.style.setProperty("--info-color","#17a2b8"),document.documentElement.style.setProperty("--info-font-color","#ffffff"),document.documentElement.style.setProperty("--info-shadow-color","0 0 0 0.2rem rgba(58, 176, 195, 0.5)"),document.documentElement.style.setProperty("--info-hover-color","#138496"),document.documentElement.style.setProperty("--primary-color","#007bff"),document.documentElement.style.setProperty("--primary-font-color","#ffffff"),document.documentElement.style.setProperty("--primary-shadow-color","0 0 0 0.2rem rgba(38, 143, 255, 0.5)"),document.documentElement.style.setProperty("--primary-hover-color","#0069d9"),document.documentElement.style.setProperty("--secondary-color","#868e96"),document.documentElement.style.setProperty("--secondary-font-color","#ffffff"),document.documentElement.style.setProperty("--secondary-shadow-color","0 0 0 0.2rem rgba(130, 138, 145, 0.5)"),document.documentElement.style.setProperty("--secondary-hover-color","#5a6268"),this.fontSize=12):(this.openedWindow=!0,document.documentElement.style.setProperty("--warning-color","#ffc107"),document.documentElement.style.setProperty("--warning-font-color","#000000"),document.documentElement.style.setProperty("--warning-shadow-color","0 0 0 0.2rem rgba(222, 170, 12, 0.5)"),document.documentElement.style.setProperty("--warning-hover-color","#e0a800"),document.documentElement.style.setProperty("--success-color","#28a745"),document.documentElement.style.setProperty("--success-font-color","#ffffff"),document.documentElement.style.setProperty("--success-shadow-color","0 0 0 0.2rem rgba(72, 180, 97, 0.5)"),document.documentElement.style.setProperty("--success-hover-color","#218838"),document.documentElement.style.setProperty("--danger-color","#dc3545"),document.documentElement.style.setProperty("--danger-font-color","#ffffff"),document.documentElement.style.setProperty("--danger-shadow-color","0 0 0 0.2rem rgba(225, 83, 97, 0.5)"),document.documentElement.style.setProperty("--danger-hover-color","#c82333"),document.documentElement.style.setProperty("--info-color","#17a2b8"),document.documentElement.style.setProperty("--info-font-color","#ffffff"),document.documentElement.style.setProperty("--info-shadow-color","0 0 0 0.2rem rgba(58, 176, 195, 0.5)"),document.documentElement.style.setProperty("--info-hover-color","#138496"),document.documentElement.style.setProperty("--primary-color","#007bff"),document.documentElement.style.setProperty("--primary-font-color","#ffffff"),document.documentElement.style.setProperty("--primary-shadow-color","0 0 0 0.2rem rgba(38, 143, 255, 0.5)"),document.documentElement.style.setProperty("--primary-hover-color","#0069d9"),document.documentElement.style.setProperty("--secondary-color","#868e96"),document.documentElement.style.setProperty("--secondary-font-color","#ffffff"),document.documentElement.style.setProperty("--secondary-shadow-color","0 0 0 0.2rem rgba(130, 138, 145, 0.5)"),document.documentElement.style.setProperty("--secondary-hover-color","#5a6268"),this.fontSize=12,this._ds.notify("Hello, "+t.fullname+" it looks like there are no user settings saved for you. To adjust your user settings click your name at the top of the page next to the logout button, adjust any settings you want, then click submit to apply them."),this._services._router.navigateByUrl(this._services._router.url.split("/")[0]+"/user-settings/settings")),this.user=t}),this._deviceDet.isMobile()||this._deviceDet.isTablet()?(this._services._app.setIsDevice(!0),this.isDevice=!0):(this._services._app.setIsDevice(!1),this.isDevice=!1),this.updateStandaloneNavigation(),this.environment.IS_PRODUCTION&&this._services._socket.subscribeBypassRoute("flagUpdateWithType","newSW").subscribe(t=>{t?(this.swFlagAlert=this._services._alert.setAlert("info","This page will reload once new version has been downloaded",0),this._services._app.setIsInvalidSW(!0),navigator.serviceWorker?navigator.serviceWorker.getRegistrations().then(t=>{t&&t.length||setTimeout(()=>{window.location.reload()},3e3)},t=>{setTimeout(()=>{window.location.reload()},3e3)}):setTimeout(()=>{window.location.reload()},3e3)):this.swFlagAlert&&(this._services._app.setIsInvalidSW(!1),this._services._alert.clearAlert(this.swFlagAlert.toastId),this.swFlagAlert=null)}),this._offline.offlineMode.subscribe(t=>{this.isOffline=t}),this._services._account.getSocketStatus().subscribe(t=>{this.socketStatus=t,this.publicProgram||this.digitalSign?this.connectedHeight=0:(this.user?(this.socketStatus===WebSocket.OPEN?(this.isConnected=!0,this.isConnecting=!1):(this.isConnected=!1,this.socketStatus===WebSocket.CONNECTING?this.isConnecting=!0:this.isConnecting=!1),this.isConnected?this.connectedHeight=0:this.connectedHeight=40):(this.isConnected=!1,this.isConnecting=!1,this.connectedHeight=40),this.isConnected||(this.aiAssistantOpen=!1))}),this._services._socket.subscribeBypassRoute("appstatus").subscribe(t=>{this.status=t,this._services._app.setHasStatusMessage(!!this.status),this.statusHeight=this.publicProgram||this.digitalSign?0:this.status?40:0}),setTimeout(()=>{this.navbarMainHeight=this.el_navBarMain.nativeElement.children[0].clientHeight},100),setTimeout(()=>{this.navbarMainHeight=this.el_navBarMain.nativeElement.children[0].clientHeight},1e3),setTimeout(()=>{this.navbarMainHeight=this.el_navBarMain.nativeElement.children[0].clientHeight},5e3);let t,e=!1,n=this._storage.get("lastURL");this._services._router.events.subscribe(t=>{t.url&&t.url.startsWith("/digital-sign?")&&(this.digitalSign=!0),t.urlAfterRedirects?this.currentRoute=t.urlAfterRedirects:t.url&&(this.currentRoute=t.url),this.isDevice&&(n&&"/"!==n&&!e&&(""!==t.url&&"/"!==t.url||this._services._router.navigateByUrl(n)),e=!0,t.url?this._storage.set("lastURL",t.url):t.urlAfterRedirects&&this._storage.set("lastURL",t.urlAfterRedirects))}),window.addEventListener("orientationchange",()=>{-90===window.orientation&&(this.orientation="landscape"),90===window.orientation&&(this.orientation="landscape"),0===window.orientation&&(this.orientation="portrait")},!0),document.addEventListener("focus",function(){document.activeElement instanceof HTMLElement&&"INPUT"===document.activeElement.nodeName&&"number"===document.activeElement.type&&(t=!0,document.addEventListener("mousewheel",handleMousewheelEvent,{passive:!0}))},!0),document.addEventListener("blur",function(){t&&(t=!1,document.removeEventListener("mousewheel",handleMousewheelEvent))},!0),window.addEventListener("dragover",t=>{(t||event).preventDefault()},!1),window.addEventListener("drop",t=>{(t||event).preventDefault()},!1)}filterNavTabs(t){if(!Array.isArray(t))return[];const e=this._aps.getAllModulePermissions(),n=[];return t.forEach(t=>{if(!t||!Array.isArray(t.links))return void n.push(t);const o=t.links.filter(t=>this.isRoleGateEnabled(t.role,e));if(!o.length)return;const r={...t,links:o};if("dropdown"===t.type){const n=Array.isArray(t.roles)?t.roles.filter(t=>this.isRoleGateEnabled(t,e)):[];if(!n.length)return;r.roles=n}n.push(r)}),n}isRoleGateEnabled(t,e){return!t||this._featureGates.isLinkEnabled(t,e,!0)}getNavbarModuleHeight(){return this.el_navBarModule?this.el_navBarModule.nativeElement.children[0].clientHeight:0}updateStandaloneNavigation(){const t=this.isStandaloneMode(),e=this.windowSizeWidth<=1200;this.showNavigationMenu=this.isDevice&&t&&e,!e&&this.aiAssistantEnabled||(this.aiAssistantOpen=!1)}toggleAiAssistant(){this.aiAssistantEnabled&&this.isConnected&&(this.aiAssistantOpen=!this.aiAssistantOpen)}openAiAssistant(){this.aiAssistantEnabled&&this.isConnected&&(this.aiAssistantOpen=!0)}closeAiAssistant(){this.aiAssistantOpen=!1}getAiAssistantTopOffset(){return this.navbarMainHeight+this.statusHeight+this.connectedHeight}getAiAssistantHeight(){const t=this.getAiAssistantTopOffset(),e=this.showNavigationMenu?54+this.getNavbarModuleHeight():0,n=!this.isDevice||this.isDevice&&this.showNavigationMenu?20:0,o=this.windowSizeHeight-t-e-n;return o>0?o:0}getAiAssistantReservedWidth(){if(!this.aiAssistantEnabled||!this.user||this.isDevice||this.windowSizeWidth<=1200||this.digitalSign||this.publicProgram)return 0;if(!this.aiAssistantOpen)return 46;const t=Math.max(0,this.windowSizeWidth-46);return 46+Math.min(.33*this.windowSizeWidth,t)}resolveAiAssistantAppId(){const t=this.environment||{},e=t.AI_ASSISTANT_APP_ID||t.APP_ID||t.CLIENT_APP_ID||"";return String(e||"resolveio-assistant").trim()}resolveAiAssistantConfig(){const t=this.environment||{},e=this.normalizeOptionalEnvString(t.AI_ASSISTANT_CODEX_MODEL||t.AI_TERMINAL_CODEX_MODEL||t.AI_DASHBOARD_CODEX_MODEL),n=this.resolveEnvModelList(t.AI_ASSISTANT_CODEX_FALLBACK_MODELS||t.AI_TERMINAL_CODEX_FALLBACK_MODELS||t.AI_DASHBOARD_CODEX_FALLBACK_MODELS),o=this.normalizeOptionalEnvString(t.AI_ASSISTANT_CODEX_FALLBACK_MODEL||t.AI_TERMINAL_CODEX_FALLBACK_MODEL||t.AI_DASHBOARD_CODEX_FALLBACK_MODEL);if(o&&!n.includes(o)&&n.unshift(o),e){const t=n.filter(t=>t!==e);n.length=0,t.forEach(t=>n.push(t))}if(!e&&!n.length)return null;const r={};return e&&(r.model=e),1===n.length?r.fallbackModel=n[0]:n.length>1&&(r.fallbackModels=n),r}resolveEnvModelList(t){const e=[],n=t=>{const n=this.normalizeOptionalEnvString(t);n&&!e.includes(n)&&e.push(n)};if(Array.isArray(t))return t.forEach(n),e;const o=this.normalizeOptionalEnvString(t);return o?(o.split(",").forEach(n),e):e}normalizeOptionalEnvString(t){return"string"==typeof t?t.trim():""}onPushBackButton(){window.history.back()}onPushReloadButton(){window.location.reload()}onPushForwardButton(){window.history.forward()}openNav(){let t=document.getElementById("navSid"),e=document.getElementById("main_cont");t&&e&&("40px"===t.style.width&&"45px"===e.style.paddingLeft?(t.style.width="195px",e.style.paddingLeft="210px"):(t.style.width="40px",e.style.paddingLeft="45px"))}closeNav(){let t=document.getElementById("navSid"),e=document.getElementById("main_cont");t&&e&&(t.style.width="40px",e.style.paddingLeft="45px")}isStandaloneMode(){if("undefined"==typeof window)return!1;const t=window.navigator,e=!(!t||!t.standalone),n="function"==typeof window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches;return e||n}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreComponent,deps:[{token:i1$4.DeviceDetectorService},{token:DialogService},{token:ResizeService},{token:ProviderService},{token:OfflineManagerService},{token:LocalStorageService},{token:AuthService},{token:AuthPermissionService},{token:FeatureGateService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:CoreComponent,isStandalone:!1,selector:"resolveio-client-lib-core",inputs:{environment:"environment",logo:"logo",navTabs:"navTabs",userHasPhoneNumber:"userHasPhoneNumber",client:"client",showNavbarModule:"showNavbarModule",publicProgram:"publicProgram",showSupport:"showSupport",aiAssistantEnabled:"aiAssistantEnabled"},providers:[ProviderService],viewQueries:[{propertyName:"el_navBarMain",first:!0,predicate:["navBarMain"],descendants:!0,read:ElementRef,static:!0},{propertyName:"el_navBarModule",first:!0,predicate:["navBarModule"],descendants:!0,read:ElementRef,static:!0}],usesInheritance:!0,ngImport:i0,template:'<style>\n\t:root {\n\t\t--warning-color: #ffc107;\n\t\t--warning-font-color: #000000;\n\t\t--warning-hover-color: #e0a800;\n\t\t--warning-shadow-color: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);\n\t\t--success-color: #28a745;\n\t\t--success-font-color: #ffffff;\n\t\t--success-hover-color: #218838;\n\t\t--success-shadow-color: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);\n\t\t--danger-color: #dc3545;\n\t\t--danger-font-color: #ffffff;\n\t\t--danger-hover-color: #c82333;\n\t\t--danger-shadow-color: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);\n\t\t--info-color: #17a2b8;\n\t\t--info-font-color: #ffffff;\n\t\t--info-hover-color: #138496;\n\t\t--info-shadow-color: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);\n\t\t--primary-color: #007bff;\n\t\t--primary-font-color: #ffffff;\n\t\t--primary-hover-color: #0069d9;\n\t\t--primary-shadow-color: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);\n\t\t--secondary-color: #868e96;\n\t\t--secondary-font-color: #ffffff;\n\t\t--secondary-hover-color: #5a6268;\n\t\t--secondary-shadow-color: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);\n\t}\n\n\t:host ::ng-deep .btn-warning {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-color);\n\t\tborder-color: var(--warning-color);\n\t}\n\t:host ::ng-deep .btn-warning:focus,\n\t.btn-warning.focus {\n\t\tbox-shadow: var(--warning-shadow-color);\n\t}\n\t:host ::ng-deep .btn-warning:hover {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-hover-color);\n\t\tborder-color: var(--warning-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-success {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-color);\n\t\tborder-color: var(--success-color);\n\t}\n\t:host ::ng-deep .btn-success:focus,\n\t.btn-success.focus {\n\t\tbox-shadow: var(--success-shadow-color);\n\t}\n\t:host ::ng-deep .btn-success:hover {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-hover-color);\n\t\tborder-color: var(--success-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-danger {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-color);\n\t\tborder-color: var(--danger-color);\n\t}\n\t:host ::ng-deep .btn-danger:focus,\n\t.btn-danger.focus {\n\t\tbox-shadow: var(--danger-shadow-color);\n\t}\n\t:host ::ng-deep .btn-danger:hover {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-hover-color);\n\t\tborder-color: var(--danger-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-info {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-color);\n\t\tborder-color: var(--info-color);\n\t}\n\t:host ::ng-deep .btn-info:focus,\n\t.btn-info.focus {\n\t\tbox-shadow: var(--info-shadow-color);\n\t}\n\t:host ::ng-deep .btn-info:hover {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-hover-color);\n\t\tborder-color: var(--info-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-primary {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-color);\n\t\tborder-color: var(--primary-color);\n\t}\n\t:host ::ng-deep .btn-primary:focus,\n\t.btn-primary.focus {\n\t\tbox-shadow: var(--primary-shadow-color);\n\t}\n\t:host ::ng-deep .btn-primary:hover {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-hover-color);\n\t\tborder-color: var(--primary-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-secondary {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-color);\n\t\tborder-color: var(--secondary-color);\n\t}\n\t:host ::ng-deep .btn-secondary:focus,\n\t.btn-secondary.focus {\n\t\tbox-shadow: var(--secondary-shadow-color);\n\t}\n\t:host ::ng-deep .btn-secondary:hover {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-hover-color);\n\t\tborder-color: var(--secondary-hover-color);\n\t}\n\n\t@media print {\n\t\t.dontPrint * {\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t.myDivToPrintCs {\n\t\t\tbackground-color: white;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 12px;\n\t\t\tpage-break-after: avoid;\n\t\t\tdisplay: initial;\n\t\t}\n\n\t\t.removeOverflow {\n\t\t\toverflow-y: hidden !important;\n\t\t\theight: 100% !important;\n\t\t}\n\t}\n\n\t.hideThis {\n\t\tdisplay: none !important;\n\t}\n\n\t.navSidbar {\n\t\twidth: 0px;\n\t\tposition: fixed;\n\t\tz-index: 1;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tbackground-color: var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1)) !important;\n\t\toverflow: hidden;\n\t\ttransition: 0.5s;\n\t\tpadding-top: 0px;\n\t}\n\n\t.navSidbar a {\n\t\tpadding: 8px 8px 8px 32px;\n\t\ttext-decoration: none;\n\t\tfont-size: 25px;\n\t\tcolor: #818181;\n\t\tdisplay: block;\n\t\ttransition: 0.3s;\n\t}\n\n\t.navSidbar a:hover {\n\t\tcolor: #f1f1f1;\n\t}\n\n\t.openbtn {\n\t\tbackground-color: var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1)) !important;\n\t\tborder: none;\n\t\tcolor: #fff;\n\t\tpadding: 5px 20px;\n\t\tfont-size: 18px;\n\t\tright: 0;\n\t\ttop: 0px;\n\t\tposition: absolute;\n\t\tz-index: 999999;\n\t\tcursor: pointer;\n\t\tfloat: right;\n\t\theight: 100%;\n\t}\n\n\t.openbtn span {\n\t\tfont-size: 20px;\n\t\tdisplay: block;\n\t\theight: auto;\n\t\twidth: auto;\n\t\ttext-align: center;\n\t\tposition: absolute;\n\t\tleft: 50%;\n\t\ttop: 50%;\n\t\ttransform: translate(-50%, -50%) rotate(-90deg);\n\t\tmargin-top: -55px;\n\t\tletter-spacing: 30px;\n\t}\n\n\t.ai-openbtn {\n\t\tdisplay: none;\n\t}\n\t#main_cont {\n\t\ttransition: padding-left 0.5s;\n\t}\n\n\t.sid_inr {\n\t\tpadding-left: 25px;\n\t}\n\n\t@keyframes shimmer {\n\t\t0%,\n\t\t50% {\n\t\t\tbackground-position: 120% 0;\n\t\t}\n\t\t100% {\n\t\t\tbackground-position: -80% 0;\n\t\t}\n\t}\n\n\t.shimmer::before {\n\t\tcontent: \'\';\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tbackground: linear-gradient(-75deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 60%);\n\t\tbackground-size: 200% 100%;\n\t\tanimation: shimmer 5s linear infinite;\n\t\tanimation-fill-mode: forwards;\n\t\tz-index: 11;\n\t}\n\n\t.scroll-shell {\n\t\toverscroll-behavior-y: contain;\n\t}\n\n\t.scroll-bottom-spacer {\n\t\tpointer-events: none;\n\t}\n</style>\n@if (isDevice) {\n\t<link rel="stylesheet" type="text/css" href="/assets/css/tablet.css" />\n}\n<div #shell [style.height]="isDevice && showNavigationMenu ? \'100vh\' : null" [style.overflow]="isDevice && showNavigationMenu ? \'hidden\' : null">\n\t@if (user && (!isConnected || isOffline) && !publicProgram && !digitalSign) {\n\t\t<div style="height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white">\n\t\t\t<div style="padding-top: 9px; padding-bottom: 9px" class="shimmer">*** OFFLINE MODE ***</div>\n\t\t</div>\n\t}\n\t@if (!user && (!isConnected || isOffline) && !publicProgram && !digitalSign) {\n\t\t<div style="height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white">\n\t\t\t<div style="padding-top: 9px; padding-bottom: 9px" class="shimmer">*** PLEASE LOGIN ***</div>\n\t\t</div>\n\t}\n\t@if (status) {\n\t\t<div style="height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white">\n\t\t\t<div style="padding-top: 9px; padding-bottom: 9px" class="shimmer">*** {{ status.message }} ***</div>\n\t\t</div>\n\t}\n\t@if (fullScreen) {\n\t\t<router-outlet name="jobboardfsoutlet"></router-outlet>\n\t}\n\t<div [ngClass]="[\'container-fluid\', fullScreen ? \'hideThis\' : \'\']" [style.font-size.px]="fontSize">\n\t\t<div class="dontPrint">\n\t\t\t<navbar-main style="width: 100%" tourAnchor="navBarMain" #navBarMain [logo]="logo" [showSupport]="showSupport" [navTabs]="navTabs" [fontSize]="fontSize" [publicProgram]="publicProgram || digitalSign" [digitalSign]="digitalSign" [aiAssistantVisible]="aiAssistantEnabled && isConnected" (aiToggle)="toggleAiAssistant()"></navbar-main>\n\t\t</div>\n\t\t<ng-template ngbModalContainer></ng-template>\n\t\t@if (aiAssistantEnabled && user && isConnected && !isDevice && windowSizeWidth > 1200 && !digitalSign && !publicProgram) {\n\t\t\t<rio-ai-assistant\n\t\t\t\t[idClient]="client"\n\t\t\t\t[idApp]="aiAssistantAppId"\n\t\t\t\t[config]="aiAssistantConfig"\n\t\t\t\t[open]="aiAssistantOpen"\n\t\t\t\t[currentRoute]="currentRoute"\n\t\t\t\t[topOffset]="getAiAssistantTopOffset()"\n\t\t\t\t[panelHeight]="getAiAssistantHeight()"\n\t\t\t\t(openRequested)="openAiAssistant()"\n\t\t\t\t(closed)="closeAiAssistant()"></rio-ai-assistant>\n\t\t}\n\t\t<div class="row">\n\t\t\t@if (showNavbarModule && !digitalSign) {\n\t\t\t\t<div id="navSid" [ngClass]="[\'dontPrint\', windowSizeWidth > 1200 && collapsableMenu ? \'navSidbar\' : \'col-xl-1\']" [style.width]="windowSizeWidth > 1200 && collapsableMenu ? \'40px\' : windowSizeWidth > 1200 ? \'\' : \'100%\'" [style.margin-top.px]="windowSizeWidth > 1200 && collapsableMenu ? navbarMainHeight + statusHeight + connectedHeight : 0">\n\t\t\t\t\t@if (windowSizeWidth > 1200 && collapsableMenu) {\n\t\t\t\t\t\t<div class="openbtn" (mouseenter)="openNav()"><span>MENU</span></div>\n\t\t\t\t\t}\n\t\t\t\t\t<div [ngClass]="windowSizeWidth > 1200 && collapsableMenu ? \'sid_inr\' : \'\'">\n\t\t\t\t\t\t<navbar-module #navBarModule tourAnchor="navBarModule" [sideNavWidth]="windowSizeWidth > 1200 && collapsableMenu ? \'90%\' : \'auto\'" [sideNavHeight]="windowSizeWidth > 1200 ? windowSizeHeight - navbarMainHeight - statusHeight - connectedHeight - (showNavigationMenu ? 54 + getNavbarModuleHeight() : 0) - (!isDevice || (isDevice && showNavigationMenu) ? 20 : 0) : \'\'"></navbar-module>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<div [id]="windowSizeWidth > 1200 ? \'main_cont\' : \'main_cont_mobile\'" [ngClass]="[windowSizeWidth > 1200 && collapsableMenu ? \'col-xl-12\' : \'col-xl-11\']" [style.padding-left]="windowSizeWidth > 1200 && collapsableMenu && showNavbarModule ? 45 + \'px\' : null" [style.padding-right.px]="getAiAssistantReservedWidth()" (mouseenter)="windowSizeWidth > 1200 && collapsableMenu && showNavbarModule ? closeNav() : null" style="padding-top: 5px">\n\t\t\t\t<div style="-webkit-overflow-scrolling: touch" [style.overflow-y]="isDevice && !showNavigationMenu ? \'initial\' : \'scroll\'" [style.height.px]="windowSizeHeight - (isDevice && windowSizeWidth <= 1200 && !showNavigationMenu ? (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight()) : 0) - navbarMainHeight - (!publicProgram && !digitalSign ? statusHeight : 0) - (!publicProgram && !digitalSign ? connectedHeight : 0) - (isDevice && showNavigationMenu ? (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight()) : 0) - (!isDevice || (isDevice && showNavigationMenu) ? 20 : 0) - 5" class="removeOverflow scroll-shell">\n\t\t\t\t\t<router-outlet></router-outlet>\n\t\t\t\t\t<div class="scroll-bottom-spacer" [style.height.px]="isDevice && showNavigationMenu ? bottomNavSpacerHeight : 0" aria-hidden="true"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t@if (isDevice && showNavigationMenu) {\n\t\t\t<div style="position: fixed; left: 0; right: 0; bottom: 0; height: calc(54px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background-color: lightgray; z-index: 9999" class="dontPrint">\n\t\t\t\t<table style="width: 100%">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style="text-align: center">\n\t\t\t\t\t\t\t<button type="button" class="btn" style="background-color: lightgray" (click)="onPushBackButton()"><i class="fa fa-arrow-left" style="color: black; font-size: 20px"></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td style="text-align: center">\n\t\t\t\t\t\t\t<button type="button" class="btn" style="background-color: lightgray" (click)="onPushReloadButton()"><i class="fa fa-refresh" style="color: black; font-size: 20px"></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td style="text-align: center">\n\t\t\t\t\t\t\t<button type="button" class="btn" style="background-color: lightgray" (click)="onPushForwardButton()"><i class="fa fa-arrow-right" style="color: black; font-size: 20px"></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t}\n\t\t@if (!isDevice) {\n\t\t\t<div style="text-align: center; height: 20px; font-style: italic; font-weight: bold; background-color: lightgray; margin-left: -15px; margin-right: -15px">© {{ year }} RESOLVEIO ALL RIGHTS RESERVED</div>\n\t\t}\n\t</div>\n</div>\n',styles:[':root{--warning-color: #ffc107;--warning-font-color: #000000;--warning-hover-color: #e0a800;--warning-shadow-color: 0 0 0 .2rem rgba(222, 170, 12, .5);--success-color: #28a745;--success-font-color: #ffffff;--success-hover-color: #218838;--success-shadow-color: 0 0 0 .2rem rgba(72, 180, 97, .5);--danger-color: #dc3545;--danger-font-color: #ffffff;--danger-hover-color: #c82333;--danger-shadow-color: 0 0 0 .2rem rgba(225, 83, 97, .5);--info-color: #17a2b8;--info-font-color: #ffffff;--info-hover-color: #138496;--info-shadow-color: 0 0 0 .2rem rgba(58, 176, 195, .5);--primary-color: #007bff;--primary-font-color: #ffffff;--primary-hover-color: #0069d9;--primary-shadow-color: 0 0 0 .2rem rgba(38, 143, 255, .5);--secondary-color: #868e96;--secondary-font-color: #ffffff;--secondary-hover-color: #5a6268;--secondary-shadow-color: 0 0 0 .2rem rgba(130, 138, 145, .5)}:host ::ng-deep .btn-warning{color:var(--warning-font-color);background-color:var(--warning-color);border-color:var(--warning-color)}:host ::ng-deep .btn-warning:focus,.btn-warning.focus{box-shadow:var(--warning-shadow-color)}:host ::ng-deep .btn-warning:hover{color:var(--warning-font-color);background-color:var(--warning-hover-color);border-color:var(--warning-hover-color)}:host ::ng-deep .btn-success{color:var(--success-font-color);background-color:var(--success-color);border-color:var(--success-color)}:host ::ng-deep .btn-success:focus,.btn-success.focus{box-shadow:var(--success-shadow-color)}:host ::ng-deep .btn-success:hover{color:var(--success-font-color);background-color:var(--success-hover-color);border-color:var(--success-hover-color)}:host ::ng-deep .btn-danger{color:var(--danger-font-color);background-color:var(--danger-color);border-color:var(--danger-color)}:host ::ng-deep .btn-danger:focus,.btn-danger.focus{box-shadow:var(--danger-shadow-color)}:host ::ng-deep .btn-danger:hover{color:var(--danger-font-color);background-color:var(--danger-hover-color);border-color:var(--danger-hover-color)}:host ::ng-deep .btn-info{color:var(--info-font-color);background-color:var(--info-color);border-color:var(--info-color)}:host ::ng-deep .btn-info:focus,.btn-info.focus{box-shadow:var(--info-shadow-color)}:host ::ng-deep .btn-info:hover{color:var(--info-font-color);background-color:var(--info-hover-color);border-color:var(--info-hover-color)}:host ::ng-deep .btn-primary{color:var(--primary-font-color);background-color:var(--primary-color);border-color:var(--primary-color)}:host ::ng-deep .btn-primary:focus,.btn-primary.focus{box-shadow:var(--primary-shadow-color)}:host ::ng-deep .btn-primary:hover{color:var(--primary-font-color);background-color:var(--primary-hover-color);border-color:var(--primary-hover-color)}:host ::ng-deep .btn-secondary{color:var(--secondary-font-color);background-color:var(--secondary-color);border-color:var(--secondary-color)}:host ::ng-deep .btn-secondary:focus,.btn-secondary.focus{box-shadow:var(--secondary-shadow-color)}:host ::ng-deep .btn-secondary:hover{color:var(--secondary-font-color);background-color:var(--secondary-hover-color);border-color:var(--secondary-hover-color)}@media print{.dontPrint *{display:none!important}.myDivToPrintCs{background-color:#fff;height:100%;width:100%;font-size:12px;line-height:12px;page-break-after:avoid;display:initial}.removeOverflow{overflow-y:hidden!important;height:100%!important}}.hideThis{display:none!important}.navSidbar{width:0px;position:fixed;z-index:1;top:0;left:0;background-color:var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1))!important;overflow:hidden;transition:.5s;padding-top:0}.navSidbar a{padding:8px 8px 8px 32px;text-decoration:none;font-size:25px;color:#818181;display:block;transition:.3s}.navSidbar a:hover{color:#f1f1f1}.openbtn{background-color:var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1))!important;border:none;color:#fff;padding:5px 20px;font-size:18px;right:0;top:0;position:absolute;z-index:999999;cursor:pointer;float:right;height:100%}.openbtn span{font-size:20px;display:block;height:auto;width:auto;text-align:center;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-90deg);margin-top:-55px;letter-spacing:30px}.ai-openbtn{display:none}#main_cont{transition:padding-left .5s}.sid_inr{padding-left:25px}@keyframes shimmer{0%,50%{background-position:120% 0}to{background-position:-80% 0}}.shimmer:before{content:"";position:absolute;inset:0;background:linear-gradient(-75deg,#fff0 40%,#ffffffb3,#fff0 60%);background-size:200% 100%;animation:shimmer 5s linear infinite;animation-fill-mode:forwards;z-index:11}.scroll-shell{overscroll-behavior-y:contain}.scroll-bottom-spacer{pointer-events:none}\n'],dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:i1$1.RouterOutlet,selector:"router-outlet",inputs:["name","routerOutletData"],outputs:["activate","deactivate","attach","detach"],exportAs:["outlet"]},{kind:"component",type:AiAssistantComponent,selector:"rio-ai-assistant",inputs:["idClient","idApp","title","open","supportTicketRoute","supportTicketEnabled","config","topOffset","panelHeight","currentRoute","hoverEnabled"],outputs:["openRequested","closed"]},{kind:"component",type:NavbarMainComponent,selector:"navbar-main",inputs:["logo","navTabs","fontSize","publicProgram","digitalSign","showSupport","aiAssistantVisible"],outputs:["aiToggle"]},{kind:"component",type:NavbarModuleComponent,selector:"navbar-module",inputs:["sideNavHeight","sideNavWidth"]}]})}function handleMousewheelEvent(){document.activeElement.blur()}function hexToRGB$1(t,e){let n=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),r=parseInt(t.slice(5,7),16);return e?"rgba("+n+", "+o+", "+r+", "+e+")":"rgb("+n+", "+o+", "+r+")"}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"resolveio-client-lib-core",standalone:!1,template:'<style>\n\t:root {\n\t\t--warning-color: #ffc107;\n\t\t--warning-font-color: #000000;\n\t\t--warning-hover-color: #e0a800;\n\t\t--warning-shadow-color: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);\n\t\t--success-color: #28a745;\n\t\t--success-font-color: #ffffff;\n\t\t--success-hover-color: #218838;\n\t\t--success-shadow-color: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);\n\t\t--danger-color: #dc3545;\n\t\t--danger-font-color: #ffffff;\n\t\t--danger-hover-color: #c82333;\n\t\t--danger-shadow-color: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);\n\t\t--info-color: #17a2b8;\n\t\t--info-font-color: #ffffff;\n\t\t--info-hover-color: #138496;\n\t\t--info-shadow-color: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);\n\t\t--primary-color: #007bff;\n\t\t--primary-font-color: #ffffff;\n\t\t--primary-hover-color: #0069d9;\n\t\t--primary-shadow-color: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);\n\t\t--secondary-color: #868e96;\n\t\t--secondary-font-color: #ffffff;\n\t\t--secondary-hover-color: #5a6268;\n\t\t--secondary-shadow-color: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);\n\t}\n\n\t:host ::ng-deep .btn-warning {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-color);\n\t\tborder-color: var(--warning-color);\n\t}\n\t:host ::ng-deep .btn-warning:focus,\n\t.btn-warning.focus {\n\t\tbox-shadow: var(--warning-shadow-color);\n\t}\n\t:host ::ng-deep .btn-warning:hover {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-hover-color);\n\t\tborder-color: var(--warning-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-success {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-color);\n\t\tborder-color: var(--success-color);\n\t}\n\t:host ::ng-deep .btn-success:focus,\n\t.btn-success.focus {\n\t\tbox-shadow: var(--success-shadow-color);\n\t}\n\t:host ::ng-deep .btn-success:hover {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-hover-color);\n\t\tborder-color: var(--success-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-danger {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-color);\n\t\tborder-color: var(--danger-color);\n\t}\n\t:host ::ng-deep .btn-danger:focus,\n\t.btn-danger.focus {\n\t\tbox-shadow: var(--danger-shadow-color);\n\t}\n\t:host ::ng-deep .btn-danger:hover {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-hover-color);\n\t\tborder-color: var(--danger-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-info {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-color);\n\t\tborder-color: var(--info-color);\n\t}\n\t:host ::ng-deep .btn-info:focus,\n\t.btn-info.focus {\n\t\tbox-shadow: var(--info-shadow-color);\n\t}\n\t:host ::ng-deep .btn-info:hover {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-hover-color);\n\t\tborder-color: var(--info-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-primary {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-color);\n\t\tborder-color: var(--primary-color);\n\t}\n\t:host ::ng-deep .btn-primary:focus,\n\t.btn-primary.focus {\n\t\tbox-shadow: var(--primary-shadow-color);\n\t}\n\t:host ::ng-deep .btn-primary:hover {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-hover-color);\n\t\tborder-color: var(--primary-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-secondary {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-color);\n\t\tborder-color: var(--secondary-color);\n\t}\n\t:host ::ng-deep .btn-secondary:focus,\n\t.btn-secondary.focus {\n\t\tbox-shadow: var(--secondary-shadow-color);\n\t}\n\t:host ::ng-deep .btn-secondary:hover {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-hover-color);\n\t\tborder-color: var(--secondary-hover-color);\n\t}\n\n\t@media print {\n\t\t.dontPrint * {\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t.myDivToPrintCs {\n\t\t\tbackground-color: white;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 12px;\n\t\t\tpage-break-after: avoid;\n\t\t\tdisplay: initial;\n\t\t}\n\n\t\t.removeOverflow {\n\t\t\toverflow-y: hidden !important;\n\t\t\theight: 100% !important;\n\t\t}\n\t}\n\n\t.hideThis {\n\t\tdisplay: none !important;\n\t}\n\n\t.navSidbar {\n\t\twidth: 0px;\n\t\tposition: fixed;\n\t\tz-index: 1;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tbackground-color: var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1)) !important;\n\t\toverflow: hidden;\n\t\ttransition: 0.5s;\n\t\tpadding-top: 0px;\n\t}\n\n\t.navSidbar a {\n\t\tpadding: 8px 8px 8px 32px;\n\t\ttext-decoration: none;\n\t\tfont-size: 25px;\n\t\tcolor: #818181;\n\t\tdisplay: block;\n\t\ttransition: 0.3s;\n\t}\n\n\t.navSidbar a:hover {\n\t\tcolor: #f1f1f1;\n\t}\n\n\t.openbtn {\n\t\tbackground-color: var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1)) !important;\n\t\tborder: none;\n\t\tcolor: #fff;\n\t\tpadding: 5px 20px;\n\t\tfont-size: 18px;\n\t\tright: 0;\n\t\ttop: 0px;\n\t\tposition: absolute;\n\t\tz-index: 999999;\n\t\tcursor: pointer;\n\t\tfloat: right;\n\t\theight: 100%;\n\t}\n\n\t.openbtn span {\n\t\tfont-size: 20px;\n\t\tdisplay: block;\n\t\theight: auto;\n\t\twidth: auto;\n\t\ttext-align: center;\n\t\tposition: absolute;\n\t\tleft: 50%;\n\t\ttop: 50%;\n\t\ttransform: translate(-50%, -50%) rotate(-90deg);\n\t\tmargin-top: -55px;\n\t\tletter-spacing: 30px;\n\t}\n\n\t.ai-openbtn {\n\t\tdisplay: none;\n\t}\n\t#main_cont {\n\t\ttransition: padding-left 0.5s;\n\t}\n\n\t.sid_inr {\n\t\tpadding-left: 25px;\n\t}\n\n\t@keyframes shimmer {\n\t\t0%,\n\t\t50% {\n\t\t\tbackground-position: 120% 0;\n\t\t}\n\t\t100% {\n\t\t\tbackground-position: -80% 0;\n\t\t}\n\t}\n\n\t.shimmer::before {\n\t\tcontent: \'\';\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tbackground: linear-gradient(-75deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 60%);\n\t\tbackground-size: 200% 100%;\n\t\tanimation: shimmer 5s linear infinite;\n\t\tanimation-fill-mode: forwards;\n\t\tz-index: 11;\n\t}\n\n\t.scroll-shell {\n\t\toverscroll-behavior-y: contain;\n\t}\n\n\t.scroll-bottom-spacer {\n\t\tpointer-events: none;\n\t}\n</style>\n@if (isDevice) {\n\t<link rel="stylesheet" type="text/css" href="/assets/css/tablet.css" />\n}\n<div #shell [style.height]="isDevice && showNavigationMenu ? \'100vh\' : null" [style.overflow]="isDevice && showNavigationMenu ? \'hidden\' : null">\n\t@if (user && (!isConnected || isOffline) && !publicProgram && !digitalSign) {\n\t\t<div style="height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white">\n\t\t\t<div style="padding-top: 9px; padding-bottom: 9px" class="shimmer">*** OFFLINE MODE ***</div>\n\t\t</div>\n\t}\n\t@if (!user && (!isConnected || isOffline) && !publicProgram && !digitalSign) {\n\t\t<div style="height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white">\n\t\t\t<div style="padding-top: 9px; padding-bottom: 9px" class="shimmer">*** PLEASE LOGIN ***</div>\n\t\t</div>\n\t}\n\t@if (status) {\n\t\t<div style="height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white">\n\t\t\t<div style="padding-top: 9px; padding-bottom: 9px" class="shimmer">*** {{ status.message }} ***</div>\n\t\t</div>\n\t}\n\t@if (fullScreen) {\n\t\t<router-outlet name="jobboardfsoutlet"></router-outlet>\n\t}\n\t<div [ngClass]="[\'container-fluid\', fullScreen ? \'hideThis\' : \'\']" [style.font-size.px]="fontSize">\n\t\t<div class="dontPrint">\n\t\t\t<navbar-main style="width: 100%" tourAnchor="navBarMain" #navBarMain [logo]="logo" [showSupport]="showSupport" [navTabs]="navTabs" [fontSize]="fontSize" [publicProgram]="publicProgram || digitalSign" [digitalSign]="digitalSign" [aiAssistantVisible]="aiAssistantEnabled && isConnected" (aiToggle)="toggleAiAssistant()"></navbar-main>\n\t\t</div>\n\t\t<ng-template ngbModalContainer></ng-template>\n\t\t@if (aiAssistantEnabled && user && isConnected && !isDevice && windowSizeWidth > 1200 && !digitalSign && !publicProgram) {\n\t\t\t<rio-ai-assistant\n\t\t\t\t[idClient]="client"\n\t\t\t\t[idApp]="aiAssistantAppId"\n\t\t\t\t[config]="aiAssistantConfig"\n\t\t\t\t[open]="aiAssistantOpen"\n\t\t\t\t[currentRoute]="currentRoute"\n\t\t\t\t[topOffset]="getAiAssistantTopOffset()"\n\t\t\t\t[panelHeight]="getAiAssistantHeight()"\n\t\t\t\t(openRequested)="openAiAssistant()"\n\t\t\t\t(closed)="closeAiAssistant()"></rio-ai-assistant>\n\t\t}\n\t\t<div class="row">\n\t\t\t@if (showNavbarModule && !digitalSign) {\n\t\t\t\t<div id="navSid" [ngClass]="[\'dontPrint\', windowSizeWidth > 1200 && collapsableMenu ? \'navSidbar\' : \'col-xl-1\']" [style.width]="windowSizeWidth > 1200 && collapsableMenu ? \'40px\' : windowSizeWidth > 1200 ? \'\' : \'100%\'" [style.margin-top.px]="windowSizeWidth > 1200 && collapsableMenu ? navbarMainHeight + statusHeight + connectedHeight : 0">\n\t\t\t\t\t@if (windowSizeWidth > 1200 && collapsableMenu) {\n\t\t\t\t\t\t<div class="openbtn" (mouseenter)="openNav()"><span>MENU</span></div>\n\t\t\t\t\t}\n\t\t\t\t\t<div [ngClass]="windowSizeWidth > 1200 && collapsableMenu ? \'sid_inr\' : \'\'">\n\t\t\t\t\t\t<navbar-module #navBarModule tourAnchor="navBarModule" [sideNavWidth]="windowSizeWidth > 1200 && collapsableMenu ? \'90%\' : \'auto\'" [sideNavHeight]="windowSizeWidth > 1200 ? windowSizeHeight - navbarMainHeight - statusHeight - connectedHeight - (showNavigationMenu ? 54 + getNavbarModuleHeight() : 0) - (!isDevice || (isDevice && showNavigationMenu) ? 20 : 0) : \'\'"></navbar-module>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<div [id]="windowSizeWidth > 1200 ? \'main_cont\' : \'main_cont_mobile\'" [ngClass]="[windowSizeWidth > 1200 && collapsableMenu ? \'col-xl-12\' : \'col-xl-11\']" [style.padding-left]="windowSizeWidth > 1200 && collapsableMenu && showNavbarModule ? 45 + \'px\' : null" [style.padding-right.px]="getAiAssistantReservedWidth()" (mouseenter)="windowSizeWidth > 1200 && collapsableMenu && showNavbarModule ? closeNav() : null" style="padding-top: 5px">\n\t\t\t\t<div style="-webkit-overflow-scrolling: touch" [style.overflow-y]="isDevice && !showNavigationMenu ? \'initial\' : \'scroll\'" [style.height.px]="windowSizeHeight - (isDevice && windowSizeWidth <= 1200 && !showNavigationMenu ? (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight()) : 0) - navbarMainHeight - (!publicProgram && !digitalSign ? statusHeight : 0) - (!publicProgram && !digitalSign ? connectedHeight : 0) - (isDevice && showNavigationMenu ? (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight()) : 0) - (!isDevice || (isDevice && showNavigationMenu) ? 20 : 0) - 5" class="removeOverflow scroll-shell">\n\t\t\t\t\t<router-outlet></router-outlet>\n\t\t\t\t\t<div class="scroll-bottom-spacer" [style.height.px]="isDevice && showNavigationMenu ? bottomNavSpacerHeight : 0" aria-hidden="true"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t@if (isDevice && showNavigationMenu) {\n\t\t\t<div style="position: fixed; left: 0; right: 0; bottom: 0; height: calc(54px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background-color: lightgray; z-index: 9999" class="dontPrint">\n\t\t\t\t<table style="width: 100%">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style="text-align: center">\n\t\t\t\t\t\t\t<button type="button" class="btn" style="background-color: lightgray" (click)="onPushBackButton()"><i class="fa fa-arrow-left" style="color: black; font-size: 20px"></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td style="text-align: center">\n\t\t\t\t\t\t\t<button type="button" class="btn" style="background-color: lightgray" (click)="onPushReloadButton()"><i class="fa fa-refresh" style="color: black; font-size: 20px"></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td style="text-align: center">\n\t\t\t\t\t\t\t<button type="button" class="btn" style="background-color: lightgray" (click)="onPushForwardButton()"><i class="fa fa-arrow-right" style="color: black; font-size: 20px"></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t}\n\t\t@if (!isDevice) {\n\t\t\t<div style="text-align: center; height: 20px; font-style: italic; font-weight: bold; background-color: lightgray; margin-left: -15px; margin-right: -15px">© {{ year }} RESOLVEIO ALL RIGHTS RESERVED</div>\n\t\t}\n\t</div>\n</div>\n'}]}],ctorParameters:()=>[{type:i1$4.DeviceDetectorService},{type:DialogService},{type:ResizeService},{type:ProviderService},{type:OfflineManagerService},{type:LocalStorageService},{type:AuthService},{type:AuthPermissionService},{type:FeatureGateService}],propDecorators:{environment:[{type:Input,args:["environment"]}],logo:[{type:Input,args:["logo"]}],navTabs:[{type:Input,args:["navTabs"]}],userHasPhoneNumber:[{type:Input,args:["userHasPhoneNumber"]}],client:[{type:Input,args:["client"]}],showNavbarModule:[{type:Input,args:["showNavbarModule"]}],publicProgram:[{type:Input,args:["publicProgram"]}],showSupport:[{type:Input,args:["showSupport"]}],aiAssistantEnabled:[{type:Input,args:["aiAssistantEnabled"]}],el_navBarMain:[{type:ViewChild,args:["navBarMain",{read:ElementRef,static:!0}]}],el_navBarModule:[{type:ViewChild,args:["navBarModule",{read:ElementRef,static:!0}]}]}});class HomeComponent extends BaseComponent{_route;auth;_services;_http;_app;menuData={title:"Home",module:null,description:null,description_name:null,tabs:[{link:"home",params:null,label:"Home"}]};selectedSolution="Asset";loggingOut$=null;subscription$=null;isLoggedIn;form;constructor(t,e,n,o,r){super(n),this._route=t,this.auth=e,this._services=n,this._http=o,this._app=r}ngOnInit(){this._services._app.setNavbarModuleData(this.menuData),this.loggingOut$=this._app.isLoggingOut.subscribe(t=>{t||(this._services._account.getUser()?this._services._account.getUser().settings&&this._services._account.getUser().settings.opening_route&&"/home"!==this._services._account.getUser().settings.opening_route?this._services._router.navigateByUrl(this._services._account.getUser().settings.opening_route):"/home"!==this._services._router.url&&this._services._router.navigateByUrl("/home"):(this.subscription$&&this.subscription$.unsubscribe(),this.subscription$=this._services._account.user.subscribe(t=>{t&&t.settings&&t.settings.opening_route&&"/home"!==t.settings.opening_route?this._services._router.navigateByUrl(t.settings.opening_route):"/home"!==this._services._router.url&&this._services._router.navigateByUrl("/home")},()=>{})))})}ngOnDestroy(){this.subscription$&&this.subscription$.unsubscribe(),this.loggingOut$&&this.loggingOut$.unsubscribe()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:HomeComponent,deps:[{token:i1$1.ActivatedRoute},{token:AuthService},{token:ProviderService},{token:i4.HttpClient},{token:CoreService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:HomeComponent,isStandalone:!1,selector:"resolveio-home",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<div class="home-hero h-100">\n\t<div class="row h-100 m-0">\n\t\t<div class="col-lg-12 h-100">\n\t\t\t<div class="jumbotron jumbotron-fluid h-100 home-hero__jumbotron">\n\t\t\t\t<div class="container text-center h-100 home-hero__container">\n\t\t\t\t\t<img src="/assets/images/ResolveIO.png" class="img-fluid home-hero__logo" alt="ResolveIO logo" />\n\t\t\t\t\t<p class="home-hero__tagline">The All-in-One Solution Software</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',styles:[".home-hero{height:100%;overflow-x:hidden}.home-hero__jumbotron{padding-bottom:0}.home-hero__container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding-left:1.5rem;padding-right:1.5rem}.home-hero__logo{width:100%;max-width:750px;height:auto;object-fit:contain}.home-hero__tagline{font-size:24px;font-style:italic}@media(max-width:767.98px){.home-hero__container{padding-left:1.25rem;padding-right:1.25rem}.home-hero__tagline{font-size:18px}}\n"]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:HomeComponent,decorators:[{type:Component,args:[{selector:"resolveio-home",providers:[ProviderService],standalone:!1,template:'<div class="home-hero h-100">\n\t<div class="row h-100 m-0">\n\t\t<div class="col-lg-12 h-100">\n\t\t\t<div class="jumbotron jumbotron-fluid h-100 home-hero__jumbotron">\n\t\t\t\t<div class="container text-center h-100 home-hero__container">\n\t\t\t\t\t<img src="/assets/images/ResolveIO.png" class="img-fluid home-hero__logo" alt="ResolveIO logo" />\n\t\t\t\t\t<p class="home-hero__tagline">The All-in-One Solution Software</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',styles:[".home-hero{height:100%;overflow-x:hidden}.home-hero__jumbotron{padding-bottom:0}.home-hero__container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding-left:1.5rem;padding-right:1.5rem}.home-hero__logo{width:100%;max-width:750px;height:auto;object-fit:contain}.home-hero__tagline{font-size:24px;font-style:italic}@media(max-width:767.98px){.home-hero__container{padding-left:1.25rem;padding-right:1.25rem}.home-hero__tagline{font-size:18px}}\n"]}]}],ctorParameters:()=>[{type:i1$1.ActivatedRoute},{type:AuthService},{type:ProviderService},{type:i4.HttpClient},{type:CoreService}]});class UserRoleComponent extends BaseComponent{_services;role;constructor(t){super(t),this._services=t}userInRole(){return this._services._account.isUserInView(this.role)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserRoleComponent,deps:[{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:UserRoleComponent,isStandalone:!1,selector:"user-role",inputs:{role:"role"},providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:"@if (userInRole()) {<ng-content></ng-content>}",isInline:!0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserRoleComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"user-role",template:"@if (userInRole()) {<ng-content></ng-content>}",standalone:!1}]}],ctorParameters:()=>[{type:ProviderService}],propDecorators:{role:[{type:Input}]}});class UserRoleModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserRoleModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:UserRoleModule,declarations:[UserRoleComponent],imports:[CommonModule],exports:[UserRoleComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserRoleModule,imports:[CommonModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserRoleModule,decorators:[{type:NgModule,args:[{imports:[CommonModule],exports:[UserRoleComponent],declarations:[UserRoleComponent]}]}]});class FormButtonModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FormButtonModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:FormButtonModule,declarations:[FormButtonComponent],imports:[CommonModule,NgbTooltipModule],exports:[FormButtonComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FormButtonModule,imports:[CommonModule,NgbTooltipModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FormButtonModule,decorators:[{type:NgModule,args:[{imports:[CommonModule,NgbTooltipModule],exports:[FormButtonComponent],declarations:[FormButtonComponent]}]}]});class ResponsiveButtonGroupModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResponsiveButtonGroupModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:ResponsiveButtonGroupModule,declarations:[ResponsiveButtonGroupComponent],imports:[CommonModule],exports:[ResponsiveButtonGroupComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResponsiveButtonGroupModule,imports:[CommonModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResponsiveButtonGroupModule,decorators:[{type:NgModule,args:[{imports:[CommonModule],declarations:[ResponsiveButtonGroupComponent],exports:[ResponsiveButtonGroupComponent]}]}]});class CollapseTableModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CollapseTableModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CollapseTableModule,declarations:[CollapseTableComponent],imports:[FormsModule,CommonModule],exports:[CollapseTableComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CollapseTableModule,providers:[ResizeService],imports:[FormsModule,CommonModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CollapseTableModule,decorators:[{type:NgModule,args:[{imports:[FormsModule,CommonModule],exports:[CollapseTableComponent],declarations:[CollapseTableComponent],providers:[ResizeService]}]}]});class PhonePipe{transform(t){if(!t)return"";let e,n,o;switch((t=(t=(t=(t=t.replace(new RegExp("-","g"),"")).replace(new RegExp(" ","g"),"")).replace("(","")).replace(")","")).length){case 10:e=1,n=t.slice(0,3),o=t.slice(3);break;case 11:e=t[0],n=t.slice(1,4),o=t.slice(4);break;case 12:e=t.slice(0,3),n=t.slice(3,5),o=t.slice(5);break;default:return t}return 1===e&&(e=""),o=o.slice(0,3)+"-"+o.slice(3),(e+" ("+n+") "+o).trim()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:PhonePipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:PhonePipe,isStandalone:!1,name:"phone"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:PhonePipe,decorators:[{type:Pipe,args:[{name:"phone",standalone:!1}]}]});class ReversePipe{transform(t){return t.slice(0).reverse()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ReversePipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:ReversePipe,isStandalone:!1,name:"reverse"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ReversePipe,decorators:[{type:Pipe,args:[{name:"reverse",standalone:!1}]}]});class MinusCurrencyPipe{transform(t,e){return"-"===t.charAt(0)?"("+t.substring(1,t.length)+")":t}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:MinusCurrencyPipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:MinusCurrencyPipe,isStandalone:!1,name:"minusCurrency"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:MinusCurrencyPipe,decorators:[{type:Pipe,args:[{name:"minusCurrency",standalone:!1}]}]});class TitleCaseAndUnderscorePipe{transform(t){let e=t.replace("_"," ").toLowerCase().split(" ");for(let t=0;t<e.length;t++)e[t]=e[t].charAt(0).toUpperCase()+e[t].slice(1);return e.join(" ")}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:TitleCaseAndUnderscorePipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:TitleCaseAndUnderscorePipe,isStandalone:!1,name:"titleCase",pure:!1})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:TitleCaseAndUnderscorePipe,decorators:[{type:Pipe,args:[{name:"titleCase",pure:!1,standalone:!1}]}]});class JsonParsePipe{transform(t){let e=null,n=!1;try{e=JSON.parse(t,dateReviver)}catch(t){n=!0}return n?t:JSON.stringify(e,null,2)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:JsonParsePipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:JsonParsePipe,isStandalone:!1,name:"jsonParse",pure:!1})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:JsonParsePipe,decorators:[{type:Pipe,args:[{name:"jsonParse",pure:!1,standalone:!1}]}]});class PipeModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:PipeModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:PipeModule,declarations:[FilterEqualPipe,FilterNotEqualPipe,PhonePipe,ReversePipe,MinusCurrencyPipe,DomSanitizorPipe,TitleCaseAndUnderscorePipe,JsonParsePipe],exports:[FilterEqualPipe,FilterNotEqualPipe,PhonePipe,ReversePipe,MinusCurrencyPipe,DomSanitizorPipe,TitleCaseAndUnderscorePipe,JsonParsePipe]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:PipeModule})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:PipeModule,decorators:[{type:NgModule,args:[{declarations:[FilterEqualPipe,FilterNotEqualPipe,PhonePipe,ReversePipe,MinusCurrencyPipe,DomSanitizorPipe,TitleCaseAndUnderscorePipe,JsonParsePipe],exports:[FilterEqualPipe,FilterNotEqualPipe,PhonePipe,ReversePipe,MinusCurrencyPipe,DomSanitizorPipe,TitleCaseAndUnderscorePipe,JsonParsePipe]}]}]});class SortTableDirective{element;sortables=new Map;_stateChanges=new Subject;active;start=1;disabled=!1;tableFixed=!1;headerFixed=!1;secondaryColor=!1;tertiaryColor=!1;get direction(){return this._direction}set direction(t){if(t&&-1!==t&&1!==t)throw Error(t+" is not a valid sort direction (0 or 1).");this._direction=t}_direction=0;_data=new BehaviorSubject([]);sortChange=new EventEmitter;constructor(t){this.element=t}register(t){if(!t.id)throw Error("CTSortHeader must be provided with a unique id");if(this.sortables.has(t.id))throw Error("Cannot have two CTSortables with the same id "+t.id);this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){if(this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction*=-1,this.sortChange.emit({active:this.active,direction:this.direction}),this._data.value.length){let e=null;for(let n=0;n<this._data.value.length;n++)if(t.id.split(".").reduce((t,e)=>t[e],this._data.value[n])){e=t.id.split(".").reduce((t,e)=>t[e],this._data.value[n]);break}if(null!=e)if("string"==typeof e){let e=new RegExp(/^[\d.,$]+$/);this._data.value.filter(e=>t.id.split(".").reduce((t,e)=>t[e],e)).some(n=>!e.test(t.id.split(".").reduce((t,e)=>t[e],n)))?1===this.direction?this._data.next(this._data.value.sort((e,n)=>(t.id.split(".").reduce((t,e)=>t[e],e)||"zzzzzz").localeCompare(t.id.split(".").reduce((t,e)=>t[e],n)||"zzzzzz"))):this._data.next(this._data.value.sort((e,n)=>(t.id.split(".").reduce((t,e)=>t[e],n)||"AAAAAAA").localeCompare(t.id.split(".").reduce((t,e)=>t[e],e)||"AAAAAAA"))):1===this.direction?this._data.next(this._data.value.sort((e,n)=>(null!==t.id.split(".").reduce((t,e)=>t[e],e)?parseFloat(t.id.split(".").reduce((t,e)=>t[e],e).replace(/\$/g,"").replace(",","")):999999999999)-(null!==t.id.split(".").reduce((t,e)=>t[e],n)?parseFloat(t.id.split(".").reduce((t,e)=>t[e],n).replace(/\$/g,"").replace(",","")):999999999999))):this._data.next(this._data.value.sort((e,n)=>(null!==t.id.split(".").reduce((t,e)=>t[e],n)?parseFloat(t.id.split(".").reduce((t,e)=>t[e],n).replace(/\$/g,"").replace(",","")):-999999999999)-(null!==t.id.split(".").reduce((t,e)=>t[e],e)?parseFloat(t.id.split(".").reduce((t,e)=>t[e],e).replace(/\$/g,"").replace(",","")):-999999999999)))}else"number"==typeof e?1===this.direction?this._data.next(this._data.value.sort((e,n)=>(null!==t.id.split(".").reduce((t,e)=>t[e],e)?t.id.split(".").reduce((t,e)=>t[e],e):999999999999)-(null!==t.id.split(".").reduce((t,e)=>t[e],n)?t.id.split(".").reduce((t,e)=>t[e],n):999999999999))):this._data.next(this._data.value.sort((e,n)=>(null!==t.id.split(".").reduce((t,e)=>t[e],n)?t.id.split(".").reduce((t,e)=>t[e],n):-999999999999)-(null!==t.id.split(".").reduce((t,e)=>t[e],e)?t.id.split(".").reduce((t,e)=>t[e],e):-999999999999))):e instanceof Date?1===this.direction?this._data.next(this._data.value.sort((e,n)=>(t.id.split(".").reduce((t,e)=>t[e],e)?t.id.split(".").reduce((t,e)=>t[e],e).getTime():0)-(t.id.split(".").reduce((t,e)=>t[e],n)?t.id.split(".").reduce((t,e)=>t[e],n).getTime():0))):this._data.next(this._data.value.sort((e,n)=>(t.id.split(".").reduce((t,e)=>t[e],n)?t.id.split(".").reduce((t,e)=>t[e],n).getTime():0)-(t.id.split(".").reduce((t,e)=>t[e],e)?t.id.split(".").reduce((t,e)=>t[e],e).getTime():0))):"boolean"==typeof e?this._data.next(this._data.value.sort((e,n)=>t.id.split(".").reduce((t,e)=>t[e],e)===t.id.split(".").reduce((t,e)=>t[e],n)?0:t.id.split(".").reduce((t,e)=>t[e],e)?1===this.direction?-1:1:1===this.direction?1:-1)):this._data.next(this._data.value.sort((e,n)=>t.id.split(".").reduce((t,e)=>t[e],e)===t.id.split(".").reduce((t,e)=>t[e],n)?0:t.id.split(".").reduce((t,e)=>t[e],e)>t.id.split(".").reduce((t,e)=>t[e],n)?-1:1))}}getData(){return this._data.asObservable()}setData(t){this._data.next(t)}ngOnInit(){}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableDirective,deps:[{token:i0.ElementRef}],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:SortTableDirective,isStandalone:!1,selector:"[sortable]",inputs:{active:["sortActive","active"],start:["sortStart","start"],disabled:["sortDisabled","disabled"],tableFixed:"tableFixed",headerFixed:"headerFixed",secondaryColor:"secondaryColor",tertiaryColor:"tertiaryColor"},outputs:{sortChange:"sortChange"},usesOnChanges:!0,ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableDirective,decorators:[{type:Directive,args:[{selector:"[sortable]",standalone:!1}]}],ctorParameters:()=>[{type:i0.ElementRef}],propDecorators:{active:[{type:Input,args:["sortActive"]}],start:[{type:Input,args:["sortStart"]}],disabled:[{type:Input,args:["sortDisabled"]}],tableFixed:[{type:Input}],headerFixed:[{type:Input}],secondaryColor:[{type:Input}],tertiaryColor:[{type:Input}],sortChange:[{type:Output,args:["sortChange"]}]}});class SortTableHeaderComponent{_sort;_arrowDirection=0;id;arrowPosition="after";start;_rerenderSubscription;disabled;constructor(t,e){if(this._sort=e,!e)throw Error("SortTableSortHeader must be placed within a parent element with the CTSortable directive.");this._rerenderSubscription=merge(e.sortChange,e._stateChanges).subscribe(()=>{this._isSorted()&&this._updateArrowDirection(),t.markForCheck()})}ngOnInit(){this._sort.register(this)}ngOnDestroy(){this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_isSorted(){return this._sort.active===this.id}_getSortDirection(){return this._sort.direction}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}onClick(t){this._isDisabled()||this._sort.sort(this)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableHeaderComponent,deps:[{token:i0.ChangeDetectorRef},{token:SortTableDirective,optional:!0}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:SortTableHeaderComponent,isStandalone:!1,selector:"[sort-table-header]",inputs:{disabled:"disabled",id:["sort-table-header","id"],arrowPosition:"arrowPosition",start:"start"},ngImport:i0,template:'<div (click)="onClick($event)">\n\t<ng-content></ng-content>\n\t@if (_isSorted() && _getSortDirection() === -1) {\n\t\t<i class="fa fa-arrow-down" style="margin-left: 10px; font-size: 14px"></i>\n\t}\n\t@if (_isSorted() && _getSortDirection() === 1) {\n\t\t<i class="fa fa-arrow-up" style="margin-left: 10px; font-size: 14px"></i>\n\t}\n</div>\n',changeDetection:i0.ChangeDetectionStrategy.OnPush,encapsulation:i0.ViewEncapsulation.None})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableHeaderComponent,decorators:[{type:Component,args:[{selector:"[sort-table-header]",encapsulation:ViewEncapsulation.None,changeDetection:ChangeDetectionStrategy.OnPush,inputs:["disabled"],standalone:!1,template:'<div (click)="onClick($event)">\n\t<ng-content></ng-content>\n\t@if (_isSorted() && _getSortDirection() === -1) {\n\t\t<i class="fa fa-arrow-down" style="margin-left: 10px; font-size: 14px"></i>\n\t}\n\t@if (_isSorted() && _getSortDirection() === 1) {\n\t\t<i class="fa fa-arrow-up" style="margin-left: 10px; font-size: 14px"></i>\n\t}\n</div>\n'}]}],ctorParameters:()=>[{type:i0.ChangeDetectorRef},{type:SortTableDirective,decorators:[{type:Optional}]}],propDecorators:{id:[{type:Input,args:["sort-table-header"]}],arrowPosition:[{type:Input}],start:[{type:Input}],disabled:[{type:Input}]}});class SortTableNgForComponent{_sort;data=[];dataChanged=new EventEmitter;sortSub$=null;sortedData=[];constructor(t){if(this._sort=t,!t)throw Error("SortTableNgFor must be placed within a parent element with the CTSortable directive.")}ngOnInit(){this.sortSub$=this._sort.getData().subscribe(t=>{this.sortedData=t,this.dataChanged.emit(this.sortedData)})}ngOnChanges(){this._sort.setData(this.data)}ngOnDestroy(){this.sortSub$.unsubscribe()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableNgForComponent,deps:[{token:SortTableDirective,optional:!0}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:SortTableNgForComponent,isStandalone:!1,selector:"[sort-table-ngfor]",inputs:{data:["sort-table-ngfor","data"]},outputs:{dataChanged:"dataChanged"},usesOnChanges:!0,ngImport:i0,template:"<ng-content></ng-content>",isInline:!0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableNgForComponent,decorators:[{type:Component,args:[{selector:"[sort-table-ngfor]",template:"<ng-content></ng-content>",standalone:!1}]}],ctorParameters:()=>[{type:SortTableDirective,decorators:[{type:Optional}]}],propDecorators:{data:[{type:Input,args:["sort-table-ngfor"]}],dataChanged:[{type:Output}]}});class SortTableModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:SortTableModule,declarations:[SortTableDirective,SortTableHeaderComponent,SortTableNgForComponent],imports:[FormsModule,CommonModule],exports:[SortTableDirective,SortTableHeaderComponent,SortTableNgForComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableModule,imports:[FormsModule,CommonModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableModule,decorators:[{type:NgModule,args:[{imports:[FormsModule,CommonModule],exports:[SortTableDirective,SortTableHeaderComponent,SortTableNgForComponent],declarations:[SortTableDirective,SortTableHeaderComponent,SortTableNgForComponent]}]}]});class Sortable{container;options;dragItem;startIndex;listeners=[];direction;swapThreshold;constructor(t,e={}){this.container=t,this.options=e,this.direction=this.resolveDirection(),this.swapThreshold=this.resolveSwapThreshold(),this.bindListeners(),this.ensureDraggable()}static create(t,e={}){return new Sortable(t,e)}destroy(){this.listeners.forEach(t=>t()),this.listeners=[],this.dragItem=void 0,this.startIndex=void 0}bindListeners(){const t=(t,e)=>{this.container.addEventListener(t,e),this.listeners.push(()=>this.container.removeEventListener(t,e))};t("dragstart",this.handleDragStart),t("dragover",this.handleDragOver),t("drop",this.handleDrop),t("dragend",this.handleDragEnd)}handleDragStart=t=>{const e=this.getSortableElement(t.target);if(e&&this.hasValidHandle(t.target,e)&&(this.ensureDraggable(),this.dragItem=e,this.startIndex=this.getElementIndex(e),t.dataTransfer)){t.dataTransfer.effectAllowed="move";try{t.dataTransfer.setData("text/plain","")}catch{}}};handleDragOver=t=>{if(!this.dragItem)return;const e=this.getSortableElement(t.target);if(!e||e===this.dragItem)return;t.preventDefault();const n=e.getBoundingClientRect(),o=("horizontal"===this.direction?t.clientX-n.left>n.width*this.swapThreshold:t.clientY-n.top>n.height*this.swapThreshold)?e.nextElementSibling:e;o!==this.dragItem&&this.container.insertBefore(this.dragItem,o)};handleDrop=t=>{this.dragItem&&(t.preventDefault(),this.finish(t))};handleDragEnd=t=>{this.dragItem&&(t.preventDefault(),this.finish(t))};finish(t){if(!this.dragItem)return;const e=this.getElementIndex(this.dragItem),n={oldIndex:this.startIndex,newIndex:e,item:this.dragItem,from:this.container,to:this.container};this.options.onEnd&&this.options.onEnd(n),this.options.onUpdate&&void 0!==this.startIndex&&e!==this.startIndex&&this.options.onUpdate(n),this.dragItem=void 0,this.startIndex=void 0}ensureDraggable(){this.getItems().forEach(t=>{t.getAttribute("draggable")||t.setAttribute("draggable","true")})}getItems(){return(this.options.draggable?Array.from(this.container.querySelectorAll(this.options.draggable)):Array.from(this.container.children)).filter(t=>t.parentElement===this.container)}getSortableElement(t){if(!t)return null;let e=t;for(;e&&e!==this.container;){if(this.isSortableItem(e))return e;e=e.parentElement}return null}isSortableItem(t){return this.options.draggable?t.matches(this.options.draggable)&&t.parentElement===this.container:t.parentElement===this.container}hasValidHandle(t,e){if(!this.options.handle||!t)return!0;const n=t.closest(this.options.handle);return!!n&&e.contains(n)}getElementIndex(t){return this.getItems().indexOf(t)}resolveDirection(){if("horizontal"===this.options.direction||"vertical"===this.options.direction)return this.options.direction;const t=this.container.tagName.toLowerCase();if("tr"===t)return"horizontal";if("tbody"===t||"ul"===t||"ol"===t)return"vertical";const e=window.getComputedStyle(this.container),n="flex"===e.display&&e.flexDirection.startsWith("row"),o="grid"===e.display&&e.gridAutoFlow.includes("column");return n||o?"horizontal":"vertical"}resolveSwapThreshold(){const t="number"==typeof this.options.swapThreshold?this.options.swapThreshold:.45;return t>0&&t<1?t:.45}}const SORTABLEJS_DEFAULT_OPTIONS=new InjectionToken("SORTABLEJS_DEFAULT_OPTIONS");class SortablejsDirective{_el;defaultOptions;items;options;sortableInstance;constructor(t,e){this._el=t,this.defaultOptions=e}ngOnInit(){const t={animation:150,onEnd:t=>{this.updateOrder(t),this.options&&"function"==typeof this.options.onEnd&&this.options.onEnd(t),this.options&&"function"==typeof this.options.onUpdate&&t.oldIndex!==t.newIndex&&this.options.onUpdate(t)}},e=Object.assign({},t,this.defaultOptions||{},this.options||{});this.sortableInstance=Sortable.create(this._el.nativeElement,e)}ngOnDestroy(){this.sortableInstance&&this.sortableInstance.destroy()}updateOrder(t){if(this.items&&void 0!==t.oldIndex&&void 0!==t.newIndex&&t.oldIndex!==t.newIndex)if(this.isFormArray(this.items)){const e=this.items.at(t.oldIndex);this.items.removeAt(t.oldIndex),this.items.insert(t.newIndex,e)}else if(Array.isArray(this.items)){const e=this.items.splice(t.oldIndex,1)[0];this.items.splice(t.newIndex,0,e)}}isFormArray(t){return t&&"function"==typeof t.at&&"function"==typeof t.removeAt&&"function"==typeof t.insert}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortablejsDirective,deps:[{token:i0.ElementRef},{token:SORTABLEJS_DEFAULT_OPTIONS,optional:!0}],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:SortablejsDirective,isStandalone:!1,selector:"[sortablejs]",inputs:{items:["sortablejs","items"],options:["sortablejsOptions","options"]},ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortablejsDirective,decorators:[{type:Directive,args:[{selector:"[sortablejs]",standalone:!1}]}],ctorParameters:()=>[{type:i0.ElementRef},{type:void 0,decorators:[{type:Optional},{type:Inject,args:[SORTABLEJS_DEFAULT_OPTIONS]}]}],propDecorators:{items:[{type:Input,args:["sortablejs"]}],options:[{type:Input,args:["sortablejsOptions"]}]}});class SortablejsModule{static forRoot(t){return{ngModule:SortablejsModule,providers:t?[{provide:SORTABLEJS_DEFAULT_OPTIONS,useValue:t}]:[]}}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortablejsModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:SortablejsModule,declarations:[SortablejsDirective],exports:[SortablejsDirective]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortablejsModule})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortablejsModule,decorators:[{type:NgModule,args:[{declarations:[SortablejsDirective],exports:[SortablejsDirective]}]}]});class NgDragDropService{dragData;dragEffect=null;scope=null;onDragStart=new Subject;onDragEnd=new Subject;static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropService,providedIn:"root"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}]});class DomHelper{static addClass(t,e){const n=this.resolveElement(t);n&&(n.classList.contains(e)||n.classList.add(e))}static removeClass(t,e){const n=this.resolveElement(t);n&&n.classList.remove(e)}static matches(t,e){if(!t)return!1;const n=t.matches||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector;return!!n&&n.call(t,e)}static resolveElement(t){return t?t.nativeElement?t.nativeElement:t:null}}class Draggable{el;renderer;ng2DragDropService;zone;dragData;dragHandle;dragEffect="move";dragScope="default";dragHandleClass="drag-handle";dragClass="drag-border";dragTransitClass="drag-transit";onDragStart=new EventEmitter;onDrag=new EventEmitter;onDragEnd=new EventEmitter;mouseDownElement;_dragEnabled=!0;_dragImage;dragImageElement;unbindDragListener;constructor(t,e,n,o){this.el=t,this.renderer=e,this.ng2DragDropService=n,this.zone=o}get dragEnabled(){return this._dragEnabled}set dragEnabled(t){this._dragEnabled=t,this.applyDragHandleClass()}get dragImage(){return this._dragImage}set dragImage(t){this._dragImage=t,this.dragImageElement=new Image,this.dragImageElement.src=this._dragImage}ngOnInit(){this.applyDragHandleClass()}ngOnDestroy(){this.unbindDragListeners()}dragStart(t){if(this.allowDrag()){DomHelper.addClass(this.el,this.dragTransitClass),setTimeout(()=>{DomHelper.addClass(this.el,this.dragClass),DomHelper.removeClass(this.el,this.dragTransitClass)},10),this.ng2DragDropService.dragData=this.dragData,this.ng2DragDropService.scope=this.dragScope,this.ng2DragDropService.dragEffect=this.dragEffect;const e=this.getDragHandleElement();e&&this.updateCursor(e,"grabbing"),null!=t.dataTransfer&&(t.dataTransfer.effectAllowed=this.dragEffect,t.dataTransfer.dropEffect=this.dragEffect,t.dataTransfer.setData("text","")),this.dragImage&&t.dataTransfer&&t.dataTransfer.setDragImage(this.dragImageElement,0,0),t.stopPropagation(),this.onDragStart.emit(t),this.ng2DragDropService.onDragStart.next(),this.zone.runOutsideAngular(()=>{this.unbindDragListener=this.renderer.listen(this.el.nativeElement,"drag",t=>{this.drag(t)})})}else t.preventDefault()}drag(t){this.onDrag.emit(t)}dragEnd(t){this.unbindDragListeners(),DomHelper.removeClass(this.el,this.dragClass),this.ng2DragDropService.dragData=null,this.ng2DragDropService.dragEffect=null,this.ng2DragDropService.scope=null;const e=this.getDragHandleElement();e&&this.updateCursor(e,this.dragEnabled?"grab":null),this.ng2DragDropService.onDragEnd.next(),this.onDragEnd.emit(t),t.stopPropagation(),t.preventDefault()}mousedown(t){this.mouseDownElement=t.target}allowDrag(){return this.dragHandle?DomHelper.matches(this.mouseDownElement,this.dragHandle)&&this.dragEnabled:this.dragEnabled}applyDragHandleClass(){const t=this.getDragHandleElement();t&&(this.dragEnabled?DomHelper.addClass(t,this.dragHandleClass):DomHelper.removeClass(t,this.dragHandleClass),this.updateCursor(t,this.dragEnabled?"grab":null))}getDragHandleElement(){let t=this.el.nativeElement;return this.dragHandle&&(t=this.el.nativeElement.querySelector(this.dragHandle)),t}unbindDragListeners(){this.unbindDragListener&&this.unbindDragListener()}updateCursor(t,e){e?this.renderer.setStyle(t,"cursor",e):this.renderer.removeStyle(t,"cursor")}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:Draggable,deps:[{token:i0.ElementRef},{token:i0.Renderer2},{token:NgDragDropService},{token:i0.NgZone}],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:Draggable,isStandalone:!1,selector:"[draggable]",inputs:{dragData:"dragData",dragHandle:"dragHandle",dragEffect:"dragEffect",dragScope:"dragScope",dragHandleClass:"dragHandleClass",dragClass:"dragClass",dragTransitClass:"dragTransitClass",dragEnabled:"dragEnabled",dragImage:"dragImage"},outputs:{onDragStart:"onDragStart",onDrag:"onDrag",onDragEnd:"onDragEnd"},host:{listeners:{dragstart:"dragStart($event)",dragend:"dragEnd($event)",mousedown:"mousedown($event)",touchstart:"mousedown($event)"},properties:{draggable:"this.dragEnabled"}},ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:Draggable,decorators:[{type:Directive,args:[{selector:"[draggable]",standalone:!1}]}],ctorParameters:()=>[{type:i0.ElementRef},{type:i0.Renderer2},{type:NgDragDropService},{type:i0.NgZone}],propDecorators:{dragData:[{type:Input}],dragHandle:[{type:Input}],dragEffect:[{type:Input}],dragScope:[{type:Input}],dragHandleClass:[{type:Input}],dragClass:[{type:Input}],dragTransitClass:[{type:Input}],onDragStart:[{type:Output}],onDrag:[{type:Output}],onDragEnd:[{type:Output}],dragEnabled:[{type:Input},{type:HostBinding,args:["draggable"]}],dragImage:[{type:Input}],dragStart:[{type:HostListener,args:["dragstart",["$event"]]}],dragEnd:[{type:HostListener,args:["dragend",["$event"]]}],mousedown:[{type:HostListener,args:["mousedown",["$event"]]},{type:HostListener,args:["touchstart",["$event"]]}]}});class DropEvent{nativeEvent;dragData;constructor(t,e){this.nativeEvent=t,this.dragData=e}}class Droppable{el;renderer;ng2DragDropService;zone;onDragEnter=new EventEmitter;onDragOver=new EventEmitter;onDragLeave=new EventEmitter;onDrop=new EventEmitter;dragOverClass="drag-over-border";dragHintClass="drag-hint-border";dropScope="default";_dropEnabled=!0;_isDragActive=!1;_isServiceActive=!1;dragStartSubscription;dragEndSubscription;unbindDragEnterListener;unbindDragOverListener;unbindDragLeaveListener;constructor(t,e,n,o){this.el=t,this.renderer=e,this.ng2DragDropService=n,this.zone=o}get dropEnabled(){return this._dropEnabled}set dropEnabled(t){this._dropEnabled=t,!0===this._dropEnabled?this.subscribeService():this.unsubscribeService()}ngOnInit(){!0===this.dropEnabled&&this.subscribeService()}ngOnDestroy(){this.unsubscribeService(),this.unbindDragListeners()}drop(t){this.allowDrop().subscribe(e=>{e&&this._isDragActive&&(DomHelper.removeClass(this.el,this.dragOverClass),t.preventDefault(),t.stopPropagation(),this.ng2DragDropService.onDragEnd.next(),this.onDrop.emit(new DropEvent(t,this.ng2DragDropService.dragData)),this.ng2DragDropService.dragData=null,this.ng2DragDropService.dragEffect=null,this.ng2DragDropService.scope=null)})}dragEnter(t){t.preventDefault(),t.stopPropagation(),this.onDragEnter.emit(t)}dragOver(t,e){if(e){if(DomHelper.addClass(this.el,this.dragOverClass),t.dataTransfer){const e=this.ng2DragDropService.dragEffect??"move";t.dataTransfer.dropEffect=e}t.preventDefault(),this.onDragOver.emit(t)}}dragLeave(t){DomHelper.removeClass(this.el,this.dragOverClass),t.preventDefault(),this.onDragLeave.emit(t)}allowDrop(){let t=!1;if("string"==typeof this.dropScope)"string"==typeof this.ng2DragDropService.scope?t=this.ng2DragDropService.scope===this.dropScope:this.ng2DragDropService.scope instanceof Array&&(t=this.ng2DragDropService.scope.indexOf(this.dropScope)>-1);else if(this.dropScope instanceof Array)"string"==typeof this.ng2DragDropService.scope?t=this.dropScope.indexOf(this.ng2DragDropService.scope)>-1:this.ng2DragDropService.scope instanceof Array&&(t=this.dropScope.filter(t=>-1!==this.ng2DragDropService.scope.indexOf(t)).length>0);else if("function"==typeof this.dropScope&&(t=this.dropScope(this.ng2DragDropService.dragData),t instanceof Observable))return t.pipe(map(t=>t&&this.dropEnabled));return of(t&&this.dropEnabled)}subscribeService(){!0!==this._isServiceActive&&(this._isServiceActive=!0,this.dragStartSubscription=this.ng2DragDropService.onDragStart.subscribe(()=>{this._isDragActive=!0,this.allowDrop().subscribe(t=>{t&&this._isDragActive&&(DomHelper.addClass(this.el,this.dragHintClass),this.zone.runOutsideAngular(()=>{this.unbindDragEnterListener=this.renderer.listen(this.el.nativeElement,"dragenter",t=>{this.dragEnter(t)}),this.unbindDragOverListener=this.renderer.listen(this.el.nativeElement,"dragover",e=>{this.dragOver(e,t)}),this.unbindDragLeaveListener=this.renderer.listen(this.el.nativeElement,"dragleave",t=>{this.dragLeave(t)})}))})}),this.dragEndSubscription=this.ng2DragDropService.onDragEnd.subscribe(()=>{this._isDragActive=!1,DomHelper.removeClass(this.el,this.dragHintClass),this.unbindDragListeners()}))}unsubscribeService(){this._isServiceActive=!1,this.dragStartSubscription&&this.dragStartSubscription.unsubscribe(),this.dragEndSubscription&&this.dragEndSubscription.unsubscribe()}unbindDragListeners(){this.unbindDragEnterListener&&this.unbindDragEnterListener(),this.unbindDragOverListener&&this.unbindDragOverListener(),this.unbindDragLeaveListener&&this.unbindDragLeaveListener()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:Droppable,deps:[{token:i0.ElementRef},{token:i0.Renderer2},{token:NgDragDropService},{token:i0.NgZone}],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:Droppable,isStandalone:!1,selector:"[droppable]",inputs:{dragOverClass:"dragOverClass",dragHintClass:"dragHintClass",dropScope:"dropScope",dropEnabled:"dropEnabled"},outputs:{onDragEnter:"onDragEnter",onDragOver:"onDragOver",onDragLeave:"onDragLeave",onDrop:"onDrop"},host:{listeners:{drop:"drop($event)"}},ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:Droppable,decorators:[{type:Directive,args:[{selector:"[droppable]",standalone:!1}]}],ctorParameters:()=>[{type:i0.ElementRef},{type:i0.Renderer2},{type:NgDragDropService},{type:i0.NgZone}],propDecorators:{onDragEnter:[{type:Output}],onDragOver:[{type:Output}],onDragLeave:[{type:Output}],onDrop:[{type:Output}],dragOverClass:[{type:Input}],dragHintClass:[{type:Input}],dropScope:[{type:Input}],dropEnabled:[{type:Input}],drop:[{type:HostListener,args:["drop",["$event"]]}]}});class NgDragDropModule{static forRoot(){return{ngModule:NgDragDropModule,providers:[NgDragDropService]}}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropModule,declarations:[Draggable,Droppable],exports:[Draggable,Droppable]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropModule})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropModule,decorators:[{type:NgModule,args:[{declarations:[Draggable,Droppable],exports:[Draggable,Droppable]}]}]});class SharedModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SharedModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:SharedModule,imports:[AiFormAutoRegisterDirective,ReactiveFormsModule,FormsModule,CollapseTableModule,RouterModule,NgbModule,NgbAccordionModule,FormButtonModule,ResponsiveButtonGroupModule,PipeModule,UserRoleModule,RioSelectModule,SortTableModule,CommonModule,SortablejsModule,NgDragDropModule,RioDatePickerModule],exports:[AiFormAutoRegisterDirective,ReactiveFormsModule,FormsModule,CollapseTableModule,RouterModule,NgbModule,NgbAccordionModule,FormButtonModule,ResponsiveButtonGroupModule,PipeModule,UserRoleModule,RioSelectModule,SortTableModule,CommonModule,SortablejsModule,NgDragDropModule,RioDatePickerModule]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SharedModule,imports:[ReactiveFormsModule,FormsModule,CollapseTableModule,RouterModule,NgbModule,NgbAccordionModule,FormButtonModule,ResponsiveButtonGroupModule,PipeModule,UserRoleModule,RioSelectModule,SortTableModule,CommonModule,SortablejsModule,NgDragDropModule,RioDatePickerModule,ReactiveFormsModule,FormsModule,CollapseTableModule,RouterModule,NgbModule,NgbAccordionModule,FormButtonModule,ResponsiveButtonGroupModule,PipeModule,UserRoleModule,RioSelectModule,SortTableModule,CommonModule,SortablejsModule,NgDragDropModule,RioDatePickerModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SharedModule,decorators:[{type:NgModule,args:[{imports:[AiFormAutoRegisterDirective,ReactiveFormsModule,FormsModule,CollapseTableModule,RouterModule,NgbModule,NgbAccordionModule,FormButtonModule,ResponsiveButtonGroupModule,PipeModule,UserRoleModule,RioSelectModule,SortTableModule,CommonModule,SortablejsModule,NgDragDropModule,RioDatePickerModule],exports:[AiFormAutoRegisterDirective,ReactiveFormsModule,FormsModule,CollapseTableModule,RouterModule,NgbModule,NgbAccordionModule,FormButtonModule,ResponsiveButtonGroupModule,PipeModule,UserRoleModule,RioSelectModule,SortTableModule,CommonModule,SortablejsModule,NgDragDropModule,RioDatePickerModule]}]}]});class AiTerminalModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalModule,declarations:[AiTerminalComponent],imports:[SharedModule],exports:[AiTerminalComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalModule,imports:[SharedModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalModule,decorators:[{type:NgModule,args:[{imports:[SharedModule],declarations:[AiTerminalComponent],exports:[AiTerminalComponent]}]}]});class FocusDirective{element;focus;constructor(t){this.element=t}ngOnChanges(){this.focus&&this.element.nativeElement.focus()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FocusDirective,deps:[{token:i0.ElementRef}],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:FocusDirective,isStandalone:!1,selector:"[focus]",inputs:{focus:"focus"},usesOnChanges:!0,ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FocusDirective,decorators:[{type:Directive,args:[{selector:"[focus]",standalone:!1}]}],ctorParameters:()=>[{type:i0.ElementRef}],propDecorators:{focus:[{type:Input}]}});class RioSelectStickyAdapterService{_account;_socket;constructor(t,e){this._account=t,this._socket=e}get userChanges(){return this._account.user.asObservable()}getUser(){return this._account.getUser()}saveStickySelects(t,e="rio-select"){const n=this._account.getUser();if(!n)return;const o={...n.other||{},stickySelects:t},r={...n,other:o};return this._account.setUser(r),this._socket.call("saveUserStickySelects",t,n._id).then(e=>{const o=this._account.getUser();if(!o||o._id!==n._id)return;const r=e?.stickySelects||t,i={...o,__v:e?.__v??o.__v,other:{...o.other||{},stickySelects:r}};this._account.setUser(i)}).catch(()=>{})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:RioSelectStickyAdapterService,deps:[{token:AccountManagerService},{token:SocketManagerService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:RioSelectStickyAdapterService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:RioSelectStickyAdapterService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:AccountManagerService},{type:SocketManagerService}]});class AuthGuard{_router;_auth;_ds;_account;_app;_offline;_aps;_alert;_featureGates;redirectUrl;constructor(t,e,n,o,r,i,s,a,l){this._router=t,this._auth=e,this._ds=n,this._account=o,this._app=r,this._offline=i,this._aps=s,this._alert=a,this._featureGates=l}canActivate(t,e){return new Promise(t=>{this._account.isInitCompleted().then(()=>{let n=this._account.getUser();if(n||(n=this._offline.getUser(),n&&this._account.setUser(n)),n)if(n.active){let o=e.url.replace(/\/[a-f0-9]{24}$/,"").replace(/\?.+$/,""),r=o.replace(/([^\/]+\/?$)/,"");if(this.isLinkGateEnabled(o))if(n.roles.super_admin)t(!0);else{let e=!1;for(;!e&&o.split("/").length>2;){if(!this.isLinkFakeRoute(o))if(n.roles.groups.some(t=>t.views.some(t=>t===o)))e=!0,t(!0);else if(n.roles.groups.some(t=>t.views.some(t=>t.startsWith(r)&&!this.doesLinkHaveParameter(t)&&!this.isLinkFakeRoute(t)))){let o=n.roles.groups.filter(t=>t.views.some(t=>t.startsWith(r)&&!this.doesLinkHaveParameter(t)&&!this.isLinkFakeRoute(t)))[0].views.filter(t=>t.startsWith(r)&&!this.doesLinkHaveParameter(t)&&!this.isLinkFakeRoute(t))[0];e=!0,this._router.navigateByUrl(o),t(!1)}r=r.replace(/([^\/]+\/?$)/,""),o=o.replace(/(\/[^\/]+$)/,"")}e||(this._router.navigateByUrl("/home"),t(!1))}else this._router.navigateByUrl("/home"),t(!1)}else this._router.navigateByUrl("/home"),t(!1);else if(navigator.onLine)this._auth.loginUser().then(o=>{this._account.isLoginCompleted().then(()=>{if(n=this._account.getUser(),n.active){let o=e.url.replace(/\/[a-f0-9]{24}$/,"").replace(/\?.+$/,""),r=o.replace(/([^\/]+\/?$)/,"");if(this.isLinkGateEnabled(o))if(n.roles.super_admin)t(!0);else{let e=!1;for(;!e&&o.split("/").length>2;){if(!this.isLinkFakeRoute(o))if(n.roles.groups.some(t=>t.views.some(t=>t===o)))e=!0,t(!0);else if(n.roles.groups.some(t=>t.views.some(t=>t.startsWith(r)&&!this.doesLinkHaveParameter(t)&&!this.isLinkFakeRoute(t)))){let o=n.roles.groups.filter(t=>t.views.some(t=>t.startsWith(r)&&!this.doesLinkHaveParameter(t)&&!this.isLinkFakeRoute(t)))[0].views.filter(t=>t.startsWith(r)&&!this.doesLinkHaveParameter(t)&&!this.isLinkFakeRoute(t))[0];e=!0,this._router.navigateByUrl(o),t(!1)}r=r.replace(/([^\/]+\/?$)/,""),o=o.replace(/(\/[^\/]+$)/,"")}e||(this._router.navigateByUrl("/home"),t(!1))}else this._router.navigateByUrl("/home"),t(!1)}else this._router.navigateByUrl("/home"),t(!1)})},()=>{this._router.navigateByUrl("/home"),t(!1)});else{let n=e.url.replace(/\/[a-f0-9]{24}$/,"").replace(/\?.+$/,"");this.isLinkGateEnabled(n)?t(!0):(this._router.navigateByUrl("/home"),t(!1))}},()=>{})})}doesLinkHaveParameter(t){let e=this._aps.getAllModulePermissions();for(let n=0;n<e.length;n++){let o=e[n];for(let e=0;e<o.views.length;e++){let n=o.views[e];if(n.link===t)return!!n.has_parameter}}return!1}isLinkGateEnabled(t){const e=this._aps.getAllModulePermissions();return this._featureGates.isLinkEnabled(t,e)}isLinkFakeRoute(t){let e=this._aps.getAllModulePermissions();for(let n=0;n<e.length;n++){let o=e[n];for(let e=0;e<o.views.length;e++){let n=o.views[e];if(n.link===t)return!!n.fake_route}}return!0}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthGuard,deps:[{token:i1$1.Router},{token:AuthService},{token:DialogService},{token:AccountManagerService},{token:CoreService},{token:OfflineManagerService},{token:AuthPermissionService},{token:AlertService},{token:FeatureGateService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthGuard})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthGuard,decorators:[{type:Injectable}],ctorParameters:()=>[{type:i1$1.Router},{type:AuthService},{type:DialogService},{type:AccountManagerService},{type:CoreService},{type:OfflineManagerService},{type:AuthPermissionService},{type:AlertService},{type:FeatureGateService}]});class CanDeactivateGuard{canDeactivate(t){return!t.canDeactivate||t.canDeactivate()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CanDeactivateGuard,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CanDeactivateGuard})}function getWindow(){return window}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CanDeactivateGuard,decorators:[{type:Injectable}]});class WindowRefService{get nativeWindow(){return getWindow()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:WindowRefService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:WindowRefService})}function rioDatePickerConfigFactory(t,e){return{resolveFirstDayOfWeek:()=>{const e=t.getUser()?.other?.date_picker_day_start;if("M"===e||"S"===e)return e;if("string"==typeof e){const t=e.toUpperCase();if("M"===t||"S"===t)return t}return 1===e?"M":7===e||0===e?"S":null},resolveTimezone:()=>e.environment.value?.TZ_CLIENT||null}}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:WindowRefService,decorators:[{type:Injectable}]});class CoreServicesModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreServicesModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CoreServicesModule,imports:[BrowserAnimationsModule,i1.ToastrModule]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreServicesModule,providers:[CoreService,AuthService,AuthGuard,CanDeactivateGuard,DialogService,ValidationService,AwsService,AuthPermissionService,FeatureGateService,WindowRefService,AlertService,SocketService,SocketManagerService,TokenManagerService,AccountManagerService,OfflineManagerService,DeviceDetectorService,LocalStorageService,RioSelectStickyAdapterService,{provide:RIO_SELECT_STICKY_ADAPTER,useExisting:RioSelectStickyAdapterService},{provide:RIO_DATE_PICKER_CONFIG,useFactory:rioDatePickerConfigFactory,deps:[AccountManagerService,CoreService]},provideHttpClient(withInterceptorsFromDi())],imports:[BrowserAnimationsModule,ToastrModule.forRoot()]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreServicesModule,decorators:[{type:NgModule,args:[{imports:[BrowserAnimationsModule,ToastrModule.forRoot()],providers:[CoreService,AuthService,AuthGuard,CanDeactivateGuard,DialogService,ValidationService,AwsService,AuthPermissionService,FeatureGateService,WindowRefService,AlertService,SocketService,SocketManagerService,TokenManagerService,AccountManagerService,OfflineManagerService,DeviceDetectorService,LocalStorageService,RioSelectStickyAdapterService,{provide:RIO_SELECT_STICKY_ADAPTER,useExisting:RioSelectStickyAdapterService},{provide:RIO_DATE_PICKER_CONFIG,useFactory:rioDatePickerConfigFactory,deps:[AccountManagerService,CoreService]},provideHttpClient(withInterceptorsFromDi())]}]}]});class CoreShellModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreShellModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CoreShellModule,declarations:[CoreComponent,HomeComponent,AiAssistantComponent,NavbarMainComponent,NavbarModuleComponent,FocusDirective,ScrollDirective],imports:[CommonModule,RouterModule,PipeModule,NgbModalModule,AiTerminalModule,CoreServicesModule],exports:[CoreComponent,HomeComponent,AiAssistantComponent,NavbarMainComponent,NavbarModuleComponent,FocusDirective,ScrollDirective]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreShellModule,imports:[CommonModule,RouterModule,PipeModule,NgbModalModule,AiTerminalModule,CoreServicesModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreShellModule,decorators:[{type:NgModule,args:[{declarations:[CoreComponent,HomeComponent,AiAssistantComponent,NavbarMainComponent,NavbarModuleComponent,FocusDirective,ScrollDirective],imports:[CommonModule,RouterModule,PipeModule,NgbModalModule,AiTerminalModule,CoreServicesModule],exports:[CoreComponent,HomeComponent,AiAssistantComponent,NavbarMainComponent,NavbarModuleComponent,FocusDirective,ScrollDirective]}]}]});class ForgotPasswordComponent extends BaseComponent{_route;_services;_http;_ds;serverURL="";form;user;subscription$=[];token;disableFormButton=!1;constructor(t,e,n,o){super(e),this._route=t,this._services=e,this._http=n,this._ds=o}ngOnInit(){2!==this._route.snapshot.queryParamMap.keys.length?(this._ds.error("Invalid params"),this._services._router.navigateByUrl("/home")):(this.serverURL=this._route.snapshot.queryParamMap.keys[0],this.token=this._route.snapshot.queryParamMap.keys[1]),this.form=this._services._fb.group({password:["",[Validators.compose([Validators.required,Validators.minLength(6)])]],confirm_password:["",[Validators.compose([Validators.required,Validators.minLength(6)])]]},{validator:this._services._vs.matchPassword}),this._http.post(this.serverURL+"/userWithForgotPasswordToken",{forgotPasswordToken:this.token}).toPromise().then(t=>{t.error?(this._ds.error("Invalid token"),this._services._router.navigateByUrl("/home")):this.user=t.result.user},t=>{this._ds.error("Invalid token"),this._services._router.navigateByUrl("/home")})}ngOnDestroy(){this.subscription$.forEach(t=>{t.unsubscribe()})}submit(){this.disableFormButton=!0,this._http.post(this.serverURL+"/setUserWithForgotPasswordToken",{forgotPasswordToken:this.token,password:this.form.value.password}).toPromise().then(t=>{t.error?(this._ds.error("Could not update user"),this._services._router.navigateByUrl("/home")):(this._services._alert.setAlert("success","User has been updated, please log in"),this._services._router.navigateByUrl("/home"))},t=>{this._ds.error("Invalid token"),this._services._router.navigateByUrl("/home")}),this._services._router.navigateByUrl("/home")}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ForgotPasswordComponent,deps:[{token:i1$1.ActivatedRoute},{token:ProviderService},{token:i4.HttpClient},{token:DialogService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:ForgotPasswordComponent,isStandalone:!1,selector:"resolveio-forgot-password",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<style>\n\tinput {\n\t\twidth: 100%;\n\t}\n</style>\n\n@if (user) {\n\t<h4>\n\t\tWelcome to ResolveIO.\n\t\t<br />\n\t\t<br />\n\t\tYour username will be {{ user.username }}. Please create a password for your account.\n\t</h4>\n\t<form [formGroup]="form" novalidate (ngSubmit)="submit()">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Username</label>\n\t\t\t\t\t{{ user.username }}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Password</label>\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\') || form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.password.valid && form.valid ? \'is-valid\' : \'is-invalid\']" formControlName="password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password must be 6 or more characters</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (!form.controls.password.hasError(\'minlength\') && form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Confirm Password</label>\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.confirm_password.valid ? \'is-valid\' : \'is-invalid\']" formControlName="confirm_password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row" style="margin-top: 30px">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<form-button [form]="form" [disabled]="disableFormButton"></form-button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n}\n',styles:["input{width:100%}\n"],dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"component",type:FormButtonComponent,selector:"form-button",inputs:["form","disabled","type"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ForgotPasswordComponent,decorators:[{type:Component,args:[{selector:"resolveio-forgot-password",providers:[ProviderService],standalone:!1,template:'<style>\n\tinput {\n\t\twidth: 100%;\n\t}\n</style>\n\n@if (user) {\n\t<h4>\n\t\tWelcome to ResolveIO.\n\t\t<br />\n\t\t<br />\n\t\tYour username will be {{ user.username }}. Please create a password for your account.\n\t</h4>\n\t<form [formGroup]="form" novalidate (ngSubmit)="submit()">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Username</label>\n\t\t\t\t\t{{ user.username }}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Password</label>\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\') || form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.password.valid && form.valid ? \'is-valid\' : \'is-invalid\']" formControlName="password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password must be 6 or more characters</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (!form.controls.password.hasError(\'minlength\') && form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Confirm Password</label>\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.confirm_password.valid ? \'is-valid\' : \'is-invalid\']" formControlName="confirm_password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row" style="margin-top: 30px">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<form-button [form]="form" [disabled]="disableFormButton"></form-button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n}\n'}]}],ctorParameters:()=>[{type:i1$1.ActivatedRoute},{type:ProviderService},{type:i4.HttpClient},{type:DialogService}]});class EnrollComponent extends BaseComponent{_route;_services;_http;_ds;serverURL="";form;user;subscription$=[];token;disableFormButton=!1;constructor(t,e,n,o){super(e),this._route=t,this._services=e,this._http=n,this._ds=o}ngOnInit(){2!==this._route.snapshot.queryParamMap.keys.length?(this._ds.error("Invalid params"),this._services._router.navigateByUrl("/home")):(this.serverURL=this._route.snapshot.queryParamMap.keys[0],this.token=this._route.snapshot.queryParamMap.keys[1]),this.form=this._services._fb.group({password:["",[Validators.compose([Validators.required,Validators.minLength(6)])]],confirm_password:["",[Validators.compose([Validators.required,Validators.minLength(6)])]]},{validator:this._services._vs.matchPassword}),this._http.post(this.serverURL+"/userWithEnrollmentToken",{enrollmentToken:this.token}).toPromise().then(t=>{t.error?(this._ds.error("Invalid token"),this._services._router.navigateByUrl("/home")):this.user=t.result.user},t=>{this._ds.error("Invalid token"),this._services._router.navigateByUrl("/home")})}ngOnDestroy(){this.subscription$.forEach(t=>{t.unsubscribe()})}submit(){this.disableFormButton=!0,this._http.post(this.serverURL+"/setUserWithEnrollmentToken",{enrollmentToken:this.token,password:this.form.value.password}).toPromise().then(t=>{t.error?(this._ds.error("Could not update user"),this._services._router.navigateByUrl("/home")):(this._services._alert.setAlert("success","User has been updated, please log in"),this._services._router.navigateByUrl("/home"))},t=>{this._ds.error("Invalid token"),this._services._router.navigateByUrl("/home")})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:EnrollComponent,deps:[{token:i1$1.ActivatedRoute},{token:ProviderService},{token:i4.HttpClient},{token:DialogService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:EnrollComponent,isStandalone:!1,selector:"resolveio-enroll",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<style>\n\tinput {\n\t\twidth: 100%;\n\t}\n</style>\n\n@if (user) {\n\t<h4>\n\t\tWelcome to ResolveIO.\n\t\t<br />\n\t\t<br />\n\t\tYour username will be {{ user.username }}. Please create a password for your account.\n\t</h4>\n\t<form [formGroup]="form" novalidate (ngSubmit)="submit()">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Username</label>\n\t\t\t\t\t{{ user.username }}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Password</label>\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\') || form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.password.valid && !form.hasError(\'matchPassword\') ? \'is-valid\' : \'is-invalid\']" formControlName="password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password must be 6 or more characters</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (!form.controls.password.hasError(\'minlength\') && form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Confirm Password</label>\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.confirm_password.valid && !form.hasError(\'matchPassword\') ? \'is-valid\' : \'is-invalid\']" formControlName="confirm_password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row" style="margin-top: 30px">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<form-button [form]="form" [disabled]="disableFormButton"></form-button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n}\n',styles:["input{width:100%}\n"],dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"component",type:FormButtonComponent,selector:"form-button",inputs:["form","disabled","type"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:EnrollComponent,decorators:[{type:Component,args:[{selector:"resolveio-enroll",providers:[ProviderService],standalone:!1,template:'<style>\n\tinput {\n\t\twidth: 100%;\n\t}\n</style>\n\n@if (user) {\n\t<h4>\n\t\tWelcome to ResolveIO.\n\t\t<br />\n\t\t<br />\n\t\tYour username will be {{ user.username }}. Please create a password for your account.\n\t</h4>\n\t<form [formGroup]="form" novalidate (ngSubmit)="submit()">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Username</label>\n\t\t\t\t\t{{ user.username }}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Password</label>\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\') || form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.password.valid && !form.hasError(\'matchPassword\') ? \'is-valid\' : \'is-invalid\']" formControlName="password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password must be 6 or more characters</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (!form.controls.password.hasError(\'minlength\') && form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Confirm Password</label>\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.confirm_password.valid && !form.hasError(\'matchPassword\') ? \'is-valid\' : \'is-invalid\']" formControlName="confirm_password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row" style="margin-top: 30px">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<form-button [form]="form" [disabled]="disableFormButton"></form-button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n}\n'}]}],ctorParameters:()=>[{type:i1$1.ActivatedRoute},{type:ProviderService},{type:i4.HttpClient},{type:DialogService}]});class Auth365Component extends BaseComponent{_app;_route;_services;_http;_ds;_socket;token;constructor(t,e,n,o,r,i){super(n),this._app=t,this._route=e,this._services=n,this._http=o,this._ds=r,this._socket=i,this._app.environment.value.MS_id_token?this._services._account.logIn365(this._app.environment.value.MS_id_token).then(()=>{this._services._router.navigateByUrl("/home")},()=>{}):this._services._router.navigateByUrl("/home")}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:Auth365Component,deps:[{token:CoreService},{token:i1$1.ActivatedRoute},{token:ProviderService},{token:i4.HttpClient},{token:DialogService},{token:SocketManagerService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:Auth365Component,isStandalone:!1,selector:"resolveio-auth365",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:"<router-outlet></router-outlet>",isInline:!0,dependencies:[{kind:"directive",type:i1$1.RouterOutlet,selector:"router-outlet",inputs:["name","routerOutletData"],outputs:["activate","deactivate","attach","detach"],exportAs:["outlet"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:Auth365Component,decorators:[{type:Component,args:[{selector:"resolveio-auth365",providers:[ProviderService],template:"<router-outlet></router-outlet>",standalone:!1}]}],ctorParameters:()=>[{type:CoreService},{type:i1$1.ActivatedRoute},{type:ProviderService},{type:i4.HttpClient},{type:DialogService},{type:SocketManagerService}]});class CoreAuthModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreAuthModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CoreAuthModule,declarations:[ForgotPasswordComponent,EnrollComponent,Auth365Component],imports:[SharedModule],exports:[ForgotPasswordComponent,EnrollComponent,Auth365Component]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreAuthModule,imports:[SharedModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreAuthModule,decorators:[{type:NgModule,args:[{declarations:[ForgotPasswordComponent,EnrollComponent,Auth365Component],imports:[SharedModule],exports:[ForgotPasswordComponent,EnrollComponent,Auth365Component]}]}]});class CoreDialogModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreDialogModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CoreDialogModule,declarations:[DialogConfirmContent,DialogErrorContent,DialogInputContent,DialogNotifyContent,DialogSelectDateTimeContent,DialogSelectDataLabelsContent,DialogLoginContent,DialogRegisterContent,DialogSelectWithButtonsURLContent,DialogSelectArrayObjsContent,DialogSelectArrayContent],imports:[SharedModule],exports:[DialogConfirmContent,DialogErrorContent,DialogInputContent,DialogNotifyContent,DialogSelectDateTimeContent,DialogSelectDataLabelsContent,DialogLoginContent,DialogRegisterContent,DialogSelectWithButtonsURLContent,DialogSelectArrayObjsContent,DialogSelectArrayContent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreDialogModule,imports:[SharedModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreDialogModule,decorators:[{type:NgModule,args:[{declarations:[DialogConfirmContent,DialogErrorContent,DialogInputContent,DialogNotifyContent,DialogSelectDateTimeContent,DialogSelectDataLabelsContent,DialogLoginContent,DialogRegisterContent,DialogSelectWithButtonsURLContent,DialogSelectArrayObjsContent,DialogSelectArrayContent],imports:[SharedModule],exports:[DialogConfirmContent,DialogErrorContent,DialogInputContent,DialogNotifyContent,DialogSelectDateTimeContent,DialogSelectDataLabelsContent,DialogLoginContent,DialogRegisterContent,DialogSelectWithButtonsURLContent,DialogSelectArrayObjsContent,DialogSelectArrayContent]}]}]});class HtmlDiffViewerComponent{payloadStr="";leftTextarea;rightTextarea;diffContent;leftContent="";rightContent="";diffLines=[];visibleDiffLines=[];showFullDiff=!1;constructor(){}ngAfterViewInit(){if(this.payloadStr){let t=JSON.parse(this.payloadStr,dateReviver);t[0]&&t[2]&&(this.leftContent=JSON.stringify(t[0],null,2),this.rightContent=JSON.stringify(t[2],null,2),this.rightContent.includes("$")&&(this.rightContent=JSON.stringify(applyMongoUpdate(t[0],t[2]),null,2)),this.generateDiff())}}toggleDiffView(){this.showFullDiff=!this.showFullDiff,this.updateVisibleLines()}updateVisibleLines(){if(this.showFullDiff)return void(this.visibleDiffLines=[...this.diffLines.map((t,e)=>(t.leftNumber=e+1,t))]);const t=new Set,e=new Set;this.diffLines.forEach((e,n)=>{"added"!==e.type&&"removed"!==e.type&&"changed"!==e.type||t.add(n)});const n=new Set;t.forEach(t=>{let e=t,o=0;const r=[];for(;e>=0;){const t=this.diffLines[e],i=t.leftContent||t.rightContent||"";i.trim().endsWith("}")||i.trim().endsWith("]")?o++:(i.trim().endsWith("{")||i.trim().endsWith("["))&&(o>0?o--:(n.add(e),r.push(e))),e--}r.forEach(t=>{let e=t,o=1;for(;e<this.diffLines.length&&o>0;){e++;const t=this.diffLines[e];if(!t)break;const r=t.leftContent||t.rightContent||"";r.trim().endsWith("{")||r.trim().endsWith("[")?o++:(r.trim().endsWith("}")||r.trim().endsWith("]"))&&(o--,0===o&&n.add(e))}})});const o=new Set([...t,...n]);o.forEach(t=>{for(let n=Math.max(0,t-1);n<=Math.min(this.diffLines.length-1,t+1);n++)e.add(n)}),this.visibleDiffLines=this.diffLines.map((t,n)=>({...t,isContext:e.has(n)&&!o.has(n),hidden:!(o.has(n)||e.has(n))}))}generateDiff(){try{const t=JSON.parse(this.leftContent),e=JSON.parse(this.rightContent),n=this.normalizeValue(t),o=this.normalizeValue(e),r=this.compareValues(null,n,o,0);this.diffLines=this.assignLineNumbers(r),this.updateVisibleLines(),this.setupScrollSync()}catch(t){console.error("Error generating diff:",t),this.diffLines=[],this.visibleDiffLines=[]}}normalizeValue(t){if(Array.isArray(t)){if(0===t.length)return t;if("object"==typeof t[0]&&null!==t[0])return t.map(t=>this.normalizeValue(t));if("string"==typeof t[0]||"number"==typeof t[0]||"boolean"==typeof t[0]){const e=[...t];return e.sort((t,e)=>t<e?-1:t>e?1:0),e}return t}if(t&&"object"==typeof t){const e={};return Object.keys(t).sort().forEach(n=>{e[n]=this.normalizeValue(t[n])}),e}return t}compareValues(t,e,n,o){const r=[],i=this.getType(e),s=this.getType(n);if(void 0===e&&void 0!==n)return this.isComplexType(s)?(r.push(this.makeLine("added","",this.openingBrace(t,s,o))),r.push(...this.renderComplex(n,"added",o+1,!0)),r.push(this.makeLine("added","",this.closingBrace(s,o)))):r.push(this.makeLine("added","",this.renderPrimitive(t,n,o))),r;if(void 0!==e&&void 0===n)return this.isComplexType(i)?(r.push(this.makeLine("removed",this.openingBrace(t,i,o),"")),r.push(...this.renderComplex(e,"removed",o+1,!1)),r.push(this.makeLine("removed",this.closingBrace(i,o),""))):r.push(this.makeLine("removed",this.renderPrimitive(t,e,o),"")),r;if(i!==s||"object"!==i&&"array"!==i)this.isEqual(e,n)?r.push(this.makeLine("unchanged",this.renderPrimitive(t,e,o),this.renderPrimitive(t,n,o))):r.push(this.makeLine("changed",this.renderPrimitive(t,e,o),this.renderPrimitive(t,n,o)));else{if(r.push(this.makeLine("unchanged",this.openingBrace(t,i,o),this.openingBrace(t,s,o))),"object"===i){const t=new Set([...Object.keys(e),...Object.keys(n)]),i=Array.from(t).sort();for(const t of i){const i=e[t],s=n[t];r.push(...this.compareValues(t,i,s,o+1))}}else{const t=Math.max(e.length,n.length);let i=!1;for(let o=0;o<t;o++){const t=e[o],r=n[o];if(!this.isEqual(t,r)){i=!0;break}}if(i)for(let i=0;i<t;i++){const t=e[i],s=n[i];this.isEqual(t,s)||(void 0===t&&void 0!==s?this.isComplexType(this.getType(s))?(r.push(this.makeLine("added","",this.openingBrace(`[${i}]`,this.getType(s),o+1))),r.push(...this.renderComplex(s,"added",o+2,!0)),r.push(this.makeLine("added","",this.closingBrace(this.getType(s),o+1)))):r.push(this.makeLine("added","",this.renderPrimitive(`[${i}]`,s,o+1))):void 0!==t&&void 0===s?this.isComplexType(this.getType(t))?(r.push(this.makeLine("removed",this.openingBrace(`[${i}]`,this.getType(t),o+1),"")),r.push(...this.renderComplex(t,"removed",o+2,!1)),r.push(this.makeLine("removed",this.closingBrace(this.getType(t),o+1),""))):r.push(this.makeLine("removed",this.renderPrimitive(`[${i}]`,t,o+1),"")):r.push(...this.compareValues(`[${i}]`,t,s,o+1)))}else for(let t=0;t<e.length;t++)r.push(...this.compareValues(`[${t}]`,e[t],n[t],o+1))}r.push(this.makeLine("unchanged",this.closingBrace(i,o),this.closingBrace(s,o)))}return r}isComplexType(t){return"object"===t||"array"===t}renderComplex(t,e,n,o){const r=[],i=this.getType(t);if("object"===i){Object.keys(t).sort().forEach(i=>{const s=t[i],a=this.getType(s);this.isComplexType(a)?(r.push(this.makeLine(e,o?"":this.openingBrace(i,a,n),o?this.openingBrace(i,a,n):"")),r.push(...this.renderComplex(s,e,n+1,o)),r.push(this.makeLine(e,o?"":this.closingBrace(a,n),o?this.closingBrace(a,n):""))):r.push(this.makeLine(e,o?"":this.renderPrimitive(i,s,n),o?this.renderPrimitive(i,s,n):""))})}else if("array"===i)for(let i=0;i<t.length;i++){const s=t[i],a=this.getType(s);this.isComplexType(a)?(r.push(this.makeLine(e,o?"":this.openingBrace(`[${i}]`,a,n),o?this.openingBrace(`[${i}]`,a,n):"")),r.push(...this.renderComplex(s,e,n+1,o)),r.push(this.makeLine(e,o?"":this.closingBrace(a,n),o?this.closingBrace(a,n):""))):r.push(this.makeLine(e,o?"":this.renderPrimitive(`[${i}]`,s,n),o?this.renderPrimitive(`[${i}]`,s,n):""))}else r.push(this.makeLine(e,o?"":this.renderPrimitive(null,t,n),o?this.renderPrimitive(null,t,n):""));return r}getType(t){return null===t?"null":Array.isArray(t)?"array":"object"==typeof t?"object":"primitive"}isEqual(t,e){return JSON.stringify(t)===JSON.stringify(e)}makeLine(t,e,n){return{type:t,leftContent:e,rightContent:n}}openingBrace(t,e,n){const o=this.getIndentString(n),r="array"===e?"[":"{";return t?t.startsWith("[")?`${o}${t}: ${r}`:`${o}"${t}": ${r}`:`${o}${r}`}closingBrace(t,e){return`${this.getIndentString(e)}${"array"===t?"]":"}"}`}renderPrimitive(t,e,n){const o=this.getIndentString(n),r=JSON.stringify(e);return t?t.startsWith("[")?`${o}${t}: ${r}`:`${o}"${t}": ${r}`:`${o}${r}`}getIndentString(t){let e="";for(let n=0;n<t;n++)e+="\t";return e}assignLineNumbers(t){let e=1,n=1;return t.map(t=>{let o="",r="";return"removed"===t.type?(o=(e++).toString(),r=""):"added"===t.type?(o="",r=(n++).toString()):(o=(e++).toString(),r=(n++).toString()),{...t,leftNumber:o,rightNumber:r}})}setupScrollSync(){setTimeout(()=>{const t=this.diffContent.nativeElement,e=t.querySelectorAll(".left"),n=t.querySelectorAll(".right");if(e.length&&n.length){const t=e[0],o=n[0];t.addEventListener("scroll",()=>{o.scrollTop=t.scrollTop,o.scrollLeft=t.scrollLeft}),o.addEventListener("scroll",()=>{t.scrollTop=o.scrollTop,t.scrollLeft=o.scrollLeft})}})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:HtmlDiffViewerComponent,deps:[],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:HtmlDiffViewerComponent,isStandalone:!1,selector:"html-diff-viewer",inputs:{payloadStr:"payloadStr"},viewQueries:[{propertyName:"leftTextarea",first:!0,predicate:["leftTextarea"],descendants:!0},{propertyName:"rightTextarea",first:!0,predicate:["rightTextarea"],descendants:!0},{propertyName:"diffContent",first:!0,predicate:["diffContent"],descendants:!0}],ngImport:i0,template:'\n\t\t<div class="diff-container">\n\t\t <div class="diff-controls">\n\t\t <button type="button" class="btn"\n\t\t [class.btn-primary]="!showFullDiff"\n\t\t [class.btn-secondary]="showFullDiff"\n\t\t (click)="toggleDiffView()">\n\t\t {{ showFullDiff ? \'Show Full Content\' : \'Show Changes Only\' }}\n\t\t </button>\n\t\t </div>\n\t\t <div class="diff-header">\n\t\t <div class="diff-header-left">Original</div>\n\t\t <div class="diff-header-right">Modified</div>\n\t\t </div>\n\t\t <div class="diff-content" #diffContent>\n\t\t <div class="diff-lines">\n\t\t @for (line of visibleDiffLines; track line) {\n\t\t <div class="diff-line"\n\t\t [class.context-line]="line.isContext"\n\t\t [class.hidden-line]="line.hidden">\n\t\t <div class="line-number left">{{ line.leftNumber }}</div>\n\t\t <div class="line-content left"\n\t\t [class.deleted]="line.type === \'removed\'"\n\t\t [class.changed-left]="line.type === \'changed\'">\n\t\t <span>{{ line.leftContent }}</span>\n\t\t </div>\n\t\t <div class="line-number right">{{ line.rightNumber }}</div>\n\t\t <div class="line-content right"\n\t\t [class.added]="line.type === \'added\'"\n\t\t [class.changed-right]="line.type === \'changed\'">\n\t\t <span>{{ line.rightContent }}</span>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t <div class="input-container">\n\t\t <textarea #leftTextarea [(ngModel)]="leftContent" placeholder="Left side content" rows="10"></textarea>\n\t\t <textarea #rightTextarea [(ngModel)]="rightContent" placeholder="Right side content" rows="10"></textarea>\n\t\t </div>\n\t\t</div>\n\t\t',isInline:!0,styles:[".diff-container{display:flex;flex-direction:column;font-family:monospace;font-size:12px;line-height:1.5}.diff-controls{margin-bottom:10px}.btn{padding:5px 10px;border-radius:4px;cursor:pointer;border:1px solid #ddd}.btn-primary{background-color:#0366d6;color:#fff}.btn-secondary{background-color:#f6f8fa;color:#24292e}.diff-header{display:flex;background:#f6f8fa;border:1px solid #e1e4e8;border-bottom:none;padding:8px 16px;font-weight:700}.diff-header-left,.diff-header-right{width:50%;box-sizing:border-box}.diff-content{border:1px solid #e1e4e8;overflow:auto;max-height:500px}.diff-lines{display:flex;flex-direction:column;width:100%}.diff-line{display:flex;width:100%}.context-line{background-color:#f1f8ff}.hidden-line{display:none}.line-number{width:40px!important;min-width:40px!important;padding:0 10px;text-align:right;color:#1b1f234d;background-color:#f6f8fa;border-right:1px solid #e1e4e8;-webkit-user-select:none;user-select:none}.line-content{flex:1;padding:0 10px;white-space:pre;min-width:0;overflow-x:auto}.left{width:50%;border-right:1px solid #e1e4e8}.right{width:50%}.added{background-color:#e6ffed}.deleted{background-color:#ffebe9}.changed-left{background-color:#fff3bf;text-decoration:line-through}.changed-right{background-color:#d4edda}.input-container{display:flex;margin-top:20px;gap:10px}textarea{width:50%;height:200px;font-family:monospace;padding:10px;border:1px solid #ddd;border-radius:4px;box-sizing:border-box}*{word-wrap:normal!important}\n"],dependencies:[{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:HtmlDiffViewerComponent,decorators:[{type:Component,args:[{selector:"html-diff-viewer",template:'\n\t\t<div class="diff-container">\n\t\t <div class="diff-controls">\n\t\t <button type="button" class="btn"\n\t\t [class.btn-primary]="!showFullDiff"\n\t\t [class.btn-secondary]="showFullDiff"\n\t\t (click)="toggleDiffView()">\n\t\t {{ showFullDiff ? \'Show Full Content\' : \'Show Changes Only\' }}\n\t\t </button>\n\t\t </div>\n\t\t <div class="diff-header">\n\t\t <div class="diff-header-left">Original</div>\n\t\t <div class="diff-header-right">Modified</div>\n\t\t </div>\n\t\t <div class="diff-content" #diffContent>\n\t\t <div class="diff-lines">\n\t\t @for (line of visibleDiffLines; track line) {\n\t\t <div class="diff-line"\n\t\t [class.context-line]="line.isContext"\n\t\t [class.hidden-line]="line.hidden">\n\t\t <div class="line-number left">{{ line.leftNumber }}</div>\n\t\t <div class="line-content left"\n\t\t [class.deleted]="line.type === \'removed\'"\n\t\t [class.changed-left]="line.type === \'changed\'">\n\t\t <span>{{ line.leftContent }}</span>\n\t\t </div>\n\t\t <div class="line-number right">{{ line.rightNumber }}</div>\n\t\t <div class="line-content right"\n\t\t [class.added]="line.type === \'added\'"\n\t\t [class.changed-right]="line.type === \'changed\'">\n\t\t <span>{{ line.rightContent }}</span>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t <div class="input-container">\n\t\t <textarea #leftTextarea [(ngModel)]="leftContent" placeholder="Left side content" rows="10"></textarea>\n\t\t <textarea #rightTextarea [(ngModel)]="rightContent" placeholder="Right side content" rows="10"></textarea>\n\t\t </div>\n\t\t</div>\n\t\t',standalone:!1,styles:[".diff-container{display:flex;flex-direction:column;font-family:monospace;font-size:12px;line-height:1.5}.diff-controls{margin-bottom:10px}.btn{padding:5px 10px;border-radius:4px;cursor:pointer;border:1px solid #ddd}.btn-primary{background-color:#0366d6;color:#fff}.btn-secondary{background-color:#f6f8fa;color:#24292e}.diff-header{display:flex;background:#f6f8fa;border:1px solid #e1e4e8;border-bottom:none;padding:8px 16px;font-weight:700}.diff-header-left,.diff-header-right{width:50%;box-sizing:border-box}.diff-content{border:1px solid #e1e4e8;overflow:auto;max-height:500px}.diff-lines{display:flex;flex-direction:column;width:100%}.diff-line{display:flex;width:100%}.context-line{background-color:#f1f8ff}.hidden-line{display:none}.line-number{width:40px!important;min-width:40px!important;padding:0 10px;text-align:right;color:#1b1f234d;background-color:#f6f8fa;border-right:1px solid #e1e4e8;-webkit-user-select:none;user-select:none}.line-content{flex:1;padding:0 10px;white-space:pre;min-width:0;overflow-x:auto}.left{width:50%;border-right:1px solid #e1e4e8}.right{width:50%}.added{background-color:#e6ffed}.deleted{background-color:#ffebe9}.changed-left{background-color:#fff3bf;text-decoration:line-through}.changed-right{background-color:#d4edda}.input-container{display:flex;margin-top:20px;gap:10px}textarea{width:50%;height:200px;font-family:monospace;padding:10px;border:1px solid #ddd;border-radius:4px;box-sizing:border-box}*{word-wrap:normal!important}\n"]}]}],ctorParameters:()=>[],propDecorators:{payloadStr:[{type:Input}],leftTextarea:[{type:ViewChild,args:["leftTextarea"]}],rightTextarea:[{type:ViewChild,args:["rightTextarea"]}],diffContent:[{type:ViewChild,args:["diffContent"]}]}});class LoggerComponent extends BaseComponent{_services;_ds;_cd;subscription$=[];logs=[];entries_per_page=25;page_num=1;log_cnt=0;user=null;users=[];startDateTime;endDateTime;dateStart;dateEnd;selectedTypes=[];client=null;clients=[];collection="";method="";route="";id_document="";constructor(t,e,n){super(t),this._services=t,this._ds=e,this._cd=n}ngOnInit(){this._services._account.getUser().roles.super_admin||this._services._router.navigateByUrl("/home"),this.subscription$.push(this._services._socket.subscribe("activeClients").subscribe(t=>{this.clients=t,this._cd.detectChanges()})),this.subscription$.push(this._services._socket.subscribe("allUsers").subscribe(t=>{this.users=t,this._cd.detectChanges()}));let t=new Date;t.setHours(0,0,0,0);let e=new Date(moment$1(t).subtract(10,"days").toDate());this.startDateTime=this.createPickerValue(e,0);let n=new Date;n.setHours(23,59,59,999),this.endDateTime=this.createPickerValue(n,59),this.getLogData()}ngOnDestroy(){this.subscription$.forEach(t=>{t.unsubscribe()})}getLogData(){this.dateStart=this.toDate(this.startDateTime),this.dateEnd=this.toDate(this.endDateTime,!0);let t={$and:[{createdAt:{$gte:this.dateStart}},{createdAt:{$lte:this.dateEnd}}]};if(this.client)if(this.client.includes(",")){let e=this.client.split(",").map(t=>t.trim()).filter(t=>!t.startsWith("!"));e.length&&t.$and.push({client:{$in:e}}),this.client.split(",").map(t=>t.trim()).filter(t=>t.startsWith("!")).forEach(e=>{t.$and.push({client:{$ne:e.replace("!","")}})})}else this.client.startsWith("!")?t.$and.push({client:{$ne:this.client.replace("!","").trim()}}):t.$and.push({client:this.client.trim()});else t.$and.push({client:"ResolveIO"});if(this.selectedTypes.length){if(t.$and.push({type:{$in:this.selectedTypes}}),this.collection)if(this.collection.includes(",")){let e=this.collection.split(",").map(t=>t.trim()).filter(t=>!t.startsWith("!"));e.length&&t.$and.push({collection:{$in:e}}),this.collection.split(",").map(t=>t.trim()).filter(t=>t.startsWith("!")).forEach(e=>{t.$and.push({collection:{$ne:e.replace("!","")}})})}else this.collection.startsWith("!")?t.$and.push({collection:{$ne:this.collection.replace("!","").trim()}}):t.$and.push({collection:this.collection.trim()});if(this.method)if(this.method.includes(",")){let e=this.method.split(",").map(t=>t.trim()).filter(t=>!t.startsWith("!"));e.length&&t.$and.push({method:{$in:e}}),this.method.split(",").map(t=>t.trim()).filter(t=>t.startsWith("!")).forEach(e=>{t.$and.push({method:{$ne:e.replace("!","")}})})}else this.method.startsWith("!")?t.$and.push({method:{$ne:this.method.replace("!","").trim()}}):t.$and.push({method:this.method.trim()});if(this.route)if(this.route.includes(",")){let e=this.route.split(",").map(t=>t.trim()).filter(t=>!t.startsWith("!"));e.length&&t.$and.push({route:{$in:e}}),this.route.split(",").map(t=>t.trim()).filter(t=>t.startsWith("!")).forEach(e=>{t.$and.push({route:{$ne:e.replace("!","")}})})}else this.route.startsWith("!")?t.$and.push({route:{$ne:this.route.replace("!","").trim()}}):t.$and.push({route:this.route.trim()});if(this.id_document)if(this.id_document.includes(",")){let e=this.id_document.split(",").map(t=>t.trim()).filter(t=>!t.startsWith("!"));e.length&&t.$and.push({id_document:{$in:e}}),this.id_document.split(",").map(t=>t.trim()).filter(t=>t.startsWith("!")).forEach(e=>{t.$and.push({id_document:{$ne:e.replace("!","")}})})}else this.id_document.startsWith("!")?t.$and.push({id_document:{$ne:this.id_document.replace("!","").trim()}}):t.$and.push({id_document:this.id_document.trim()});this.user&&t.$and.push({user:this.user}),"string"==typeof this.entries_per_page&&(this.entries_per_page=parseInt(this.entries_per_page)),this._services._socket.call("findWithOptions","logs",t,{sort:{createdAt:-1},limit:this.entries_per_page,skip:this.entries_per_page*(this.page_num-1)},(t,e)=>{this.logs=e,this._cd.detectChanges()}),this._services._socket.call("countCollectionWithQuery","logs",t,(t,e)=>{this.log_cnt=e,this._cd.detectChanges()}),this._cd.detectChanges()}}selectType(t){"all"!==t?this.selectedTypes.includes(t)?this.selectedTypes.splice(this.selectedTypes.indexOf(t),1):this.selectedTypes.push(t):7===this.selectedTypes.length?this.selectedTypes=[]:this.selectedTypes=["error","document","query","queryResponse","client-request","client-response","callMethod"],this.logs=[],this.selectedTypes.length&&this.getLogData()}icon(t){return"error"===t?"danger":"document"===t?"info":"client-response"===t?"success":"client-request"===t?"primary":"secondary"}removeAllLogs(){this._ds.confirm("Are you sure you want to delete all logs?").then(()=>{this._services._socket.call("removeAllDocuments","logs")},()=>{})}toDate(t,e=!1){if(!t||!t.date)return new Date;let n=t.time||{hour:0,minute:0,second:0,ms:0},o=e?999:n.ms||0;return new Date(t.date.year,t.date.month-1,t.date.day,n.hour||0,n.minute||0,n.second||0,o)}createPickerValue(t,e=null){return{mode:"datetime",date:{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()},time:{hour:t.getHours(),minute:t.getMinutes(),second:null!==e?e:t.getSeconds(),ms:t.getMilliseconds()}}}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:LoggerComponent,deps:[{token:ProviderService},{token:DialogService},{token:i0.ChangeDetectorRef}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:LoggerComponent,isStandalone:!1,selector:"resolveio-logger",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<div class="row">\n\t<div class="col-lg-12">\n\t\t<div class="card">\n\t\t\t<div class="card-header"><b>Filters</b></div>\n\t\t\t<div class="card-body">\n\t\t\t\t<div class="row">\n\t\t\t\t\t<div class="col-lg-12">\n\t\t\t\t\t\t<responsive-button-group collapseSize="900">\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'error\') && selectedTypes.includes(\'document\') && selectedTypes.includes(\'query\') && selectedTypes.includes(\'client-request\') && selectedTypes.includes(\'client-response\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'all\')">All</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'error\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'error\')">Errors</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'document\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'document\')">Document</button>\n\t\t\t\t\t\t\t\x3c!-- <button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'query\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'query\')">Query</button> --\x3e\n\t\t\t\t\t\t\t\x3c!-- <button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'queryResponse\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'queryResponse\')">Query Response</button> --\x3e\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'client-request\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'client-request\')">Client Requests</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'client-response\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'client-response\')">Client Responses</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'callMethod\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'callMethod\')">Call Method</button>\n\t\t\t\t\t\t\t<button type="button" class="btn btn-danger" (click)="removeAllLogs()">REMOVE ALL LOGS</button>\n\t\t\t\t\t\t</responsive-button-group>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Client</label>\n\t\t\t\t\t\t<rio-select [(ngModel)]="client" (change)="getLogData()" placeholder="Select Client" [options]="clients" optionValueKey="name" optionLabelKey="name"></rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">User</label>\n\t\t\t\t\t\t<rio-select [(ngModel)]="user" (change)="getLogData()" placeholder="Select User" [options]="users" optionValueKey="fullname" optionLabelKey="fullname"></rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Collection</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="collection" (change)="getLogData()" placeholder="Input Colls Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Method</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="method" (change)="getLogData()" placeholder="Input Methods Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Route</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="route" (change)="getLogData()" placeholder="Input Routes Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Document</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="id_document" (change)="getLogData()" placeholder="Input Ids Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t<div class="col-lg-2 offset-lg-4">\n\t\t\t\t\t\t<label class="form-control-label">Date/Time Start</label>\n\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t<rio-date-picker [(ngModel)]="startDateTime" (ngModelChange)="getLogData()" selectionMode="datetime" [allowSeconds]="true"></rio-date-picker>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Date/Time End</label>\n\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t<rio-date-picker [(ngModel)]="endDateTime" (ngModelChange)="getLogData()" selectionMode="datetime" [allowSeconds]="true"></rio-date-picker>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t<div ngbAccordion #acc="ngbAccordion" activeIds="">\n\t\t\t\t\t\t@for (log of logs; track log._id; let i = $index) {\n\t\t\t\t\t\t\t<div ngbAccordionItem [id]="\'log_\' + i">\n\t\t\t\t\t\t\t\t<div ngbAccordionHeader>\n\t\t\t\t\t\t\t\t\t<button ngbAccordionButton type="button">\n\t\t\t\t\t\t\t\t\t\t<label class="label-accordion" style="width: 90%; height: 22px">\n\t\t\t\t\t\t\t\t\t\t\t<strong class="float-start">Type: {{ log.type }}{{ log.method ? \' - Method: \' + log.method : \'\' }}{{ log.collection ? \' - Collection: \' + log.collection : \'\' }}{{ log.user ? \' - User: \' + log.user : \'\' }}{{ log.route ? \' - Route: \' + log.route : \'\' }}{{ log.id_document ? \' - id_document: \' + log.id_document : \'\' }}{{ log.messageId ? \' - messageId: \' + log.messageId : \'\' }}{{ log.instance ? \' - instance: \' + log.instance : \'\' }}</strong>\n\t\t\t\t\t\t\t\t\t\t\t<p class="float-end mb-0">{{ log.createdAt | date: \'medium\' }}</p>\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div ngbAccordionCollapse>\n\t\t\t\t\t\t\t\t\t<div ngbAccordionBody>\n\t\t\t\t\t\t\t\t\t\t<ng-template>\n\t\t\t\t\t\t\t\t\t\t\t@if (log.payload) {\n\t\t\t\t\t\t\t\t\t\t\t\t@if (log.method === \'replaceOne\' || log.method === \'updateOne\') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordion #acc2="ngbAccordion" activeIds="diff">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionItem id="diff">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button ngbAccordionButton type="button">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class="label-accordion" style="width: 90%; height: 22px">Diff</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionCollapse>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionBody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<html-diff-viewer [payloadStr]="log.payload"></html-diff-viewer>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionItem id="raw">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button ngbAccordionButton type="button">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class="label-accordion" style="width: 90%; height: 22px">Raw</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionCollapse>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionBody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<pre>{{ log.payload | jsonParse }}</pre>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t@if (log.method !== \'replaceOne\' && log.method !== \'updateOne\') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t<pre>{{ log.payload | jsonParse }}</pre>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t@if (!log.payload) {\n\t\t\t\t\t\t\t\t\t\t\t\tNo Data\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t\t<div class="col-lg-4">\n\t\t\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t\t\t<div class="col-lg-8">\n\t\t\t\t\t\t\t\t\t<label class="form-control-label">Entries Per Page</label>\n\t\t\t\t\t\t\t\t\t<select class="form-control" [(ngModel)]="entries_per_page" (change)="getLogData()">\n\t\t\t\t\t\t\t\t\t\t<option value="10">10</option>\n\t\t\t\t\t\t\t\t\t\t<option value="25">25</option>\n\t\t\t\t\t\t\t\t\t\t<option value="50">50</option>\n\t\t\t\t\t\t\t\t\t\t<option value="100">100</option>\n\t\t\t\t\t\t\t\t\t\t<option value="250">250</option>\n\t\t\t\t\t\t\t\t\t\t<option value="500">500</option>\n\t\t\t\t\t\t\t\t\t\t<option value="1000">1000</option>\n\t\t\t\t\t\t\t\t\t\t<option value="5000">5000</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-lg-8">\n\t\t\t\t\t\t\t<ngb-pagination class="float-end" boundaryLinks="true" [collectionSize]="log_cnt" directionLinks="true" ellipses="false" [(page)]="page_num" maxSize="6" [pageSize]="entries_per_page" rotate="true" (pageChange)="getLogData()"></ngb-pagination>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',dependencies:[{kind:"directive",type:i2.NgSelectOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:i2.ɵNgSelectMultipleOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.SelectControlValueAccessor,selector:"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]",inputs:["compareWith"]},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"directive",type:i1$2.NgbAccordionButton,selector:"button[ngbAccordionButton]"},{kind:"directive",type:i1$2.NgbAccordionDirective,selector:"[ngbAccordion]",inputs:["animation","closeOthers","destroyOnHide"],outputs:["show","shown","hide","hidden"],exportAs:["ngbAccordion"]},{kind:"directive",type:i1$2.NgbAccordionItem,selector:"[ngbAccordionItem]",inputs:["ngbAccordionItem","destroyOnHide","disabled","collapsed"],outputs:["show","shown","hide","hidden"],exportAs:["ngbAccordionItem"]},{kind:"directive",type:i1$2.NgbAccordionHeader,selector:"[ngbAccordionHeader]"},{kind:"component",type:i1$2.NgbAccordionBody,selector:"[ngbAccordionBody]"},{kind:"directive",type:i1$2.NgbAccordionCollapse,selector:"[ngbAccordionCollapse]",exportAs:["ngbAccordionCollapse"]},{kind:"component",type:i1$2.NgbPagination,selector:"ngb-pagination",inputs:["disabled","boundaryLinks","directionLinks","ellipses","rotate","collectionSize","maxSize","page","pageSize","size"],outputs:["pageChange"]},{kind:"component",type:ResponsiveButtonGroupComponent,selector:"responsive-button-group",inputs:["collapseSize"]},{kind:"component",type:i5.RioSelectComponent,selector:"rio-select",inputs:["placeholder","multiple","panelMaxHeight","panelMaxViewportRatio","optionHeight","virtualBuffer","overlayZIndex","autoSizePanel","panelPosition","autoCenterPanel","viewportMargin","panelWidth","panelFullscreenWidth","clearable","templateLabelFromView","searchable","searchMatchMode","defaultSearch","textWrap","compareWith","options","optionLabelKey","optionLabelFn","optionValueKey","optionDisabledKey","optionIdKey","optionGroupKey","disabled","emitOptionObject","debugLog","stickyKey","stickyAutoSave"],outputs:["change"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"component",type:i7$1.RioDatePickerComponent,selector:"rio-date-picker",inputs:["enableDate","enableTime","selectionMode","firstDayOfWeek","toggleWeekFirstDay","timezone","minDate","maxDate","disabled","label","allowSeconds","minuteStep","panelWidth"],outputs:["change"]},{kind:"component",type:HtmlDiffViewerComponent,selector:"html-diff-viewer",inputs:["payloadStr"]},{kind:"pipe",type:JsonParsePipe,name:"jsonParse"},{kind:"pipe",type:i7.DatePipe,name:"date"}],changeDetection:i0.ChangeDetectionStrategy.OnPush})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:LoggerComponent,decorators:[{type:Component,args:[{selector:"resolveio-logger",providers:[ProviderService],changeDetection:ChangeDetectionStrategy.OnPush,standalone:!1,template:'<div class="row">\n\t<div class="col-lg-12">\n\t\t<div class="card">\n\t\t\t<div class="card-header"><b>Filters</b></div>\n\t\t\t<div class="card-body">\n\t\t\t\t<div class="row">\n\t\t\t\t\t<div class="col-lg-12">\n\t\t\t\t\t\t<responsive-button-group collapseSize="900">\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'error\') && selectedTypes.includes(\'document\') && selectedTypes.includes(\'query\') && selectedTypes.includes(\'client-request\') && selectedTypes.includes(\'client-response\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'all\')">All</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'error\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'error\')">Errors</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'document\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'document\')">Document</button>\n\t\t\t\t\t\t\t\x3c!-- <button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'query\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'query\')">Query</button> --\x3e\n\t\t\t\t\t\t\t\x3c!-- <button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'queryResponse\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'queryResponse\')">Query Response</button> --\x3e\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'client-request\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'client-request\')">Client Requests</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'client-response\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'client-response\')">Client Responses</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'callMethod\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'callMethod\')">Call Method</button>\n\t\t\t\t\t\t\t<button type="button" class="btn btn-danger" (click)="removeAllLogs()">REMOVE ALL LOGS</button>\n\t\t\t\t\t\t</responsive-button-group>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Client</label>\n\t\t\t\t\t\t<rio-select [(ngModel)]="client" (change)="getLogData()" placeholder="Select Client" [options]="clients" optionValueKey="name" optionLabelKey="name"></rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">User</label>\n\t\t\t\t\t\t<rio-select [(ngModel)]="user" (change)="getLogData()" placeholder="Select User" [options]="users" optionValueKey="fullname" optionLabelKey="fullname"></rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Collection</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="collection" (change)="getLogData()" placeholder="Input Colls Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Method</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="method" (change)="getLogData()" placeholder="Input Methods Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Route</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="route" (change)="getLogData()" placeholder="Input Routes Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Document</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="id_document" (change)="getLogData()" placeholder="Input Ids Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t<div class="col-lg-2 offset-lg-4">\n\t\t\t\t\t\t<label class="form-control-label">Date/Time Start</label>\n\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t<rio-date-picker [(ngModel)]="startDateTime" (ngModelChange)="getLogData()" selectionMode="datetime" [allowSeconds]="true"></rio-date-picker>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Date/Time End</label>\n\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t<rio-date-picker [(ngModel)]="endDateTime" (ngModelChange)="getLogData()" selectionMode="datetime" [allowSeconds]="true"></rio-date-picker>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t<div ngbAccordion #acc="ngbAccordion" activeIds="">\n\t\t\t\t\t\t@for (log of logs; track log._id; let i = $index) {\n\t\t\t\t\t\t\t<div ngbAccordionItem [id]="\'log_\' + i">\n\t\t\t\t\t\t\t\t<div ngbAccordionHeader>\n\t\t\t\t\t\t\t\t\t<button ngbAccordionButton type="button">\n\t\t\t\t\t\t\t\t\t\t<label class="label-accordion" style="width: 90%; height: 22px">\n\t\t\t\t\t\t\t\t\t\t\t<strong class="float-start">Type: {{ log.type }}{{ log.method ? \' - Method: \' + log.method : \'\' }}{{ log.collection ? \' - Collection: \' + log.collection : \'\' }}{{ log.user ? \' - User: \' + log.user : \'\' }}{{ log.route ? \' - Route: \' + log.route : \'\' }}{{ log.id_document ? \' - id_document: \' + log.id_document : \'\' }}{{ log.messageId ? \' - messageId: \' + log.messageId : \'\' }}{{ log.instance ? \' - instance: \' + log.instance : \'\' }}</strong>\n\t\t\t\t\t\t\t\t\t\t\t<p class="float-end mb-0">{{ log.createdAt | date: \'medium\' }}</p>\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div ngbAccordionCollapse>\n\t\t\t\t\t\t\t\t\t<div ngbAccordionBody>\n\t\t\t\t\t\t\t\t\t\t<ng-template>\n\t\t\t\t\t\t\t\t\t\t\t@if (log.payload) {\n\t\t\t\t\t\t\t\t\t\t\t\t@if (log.method === \'replaceOne\' || log.method === \'updateOne\') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordion #acc2="ngbAccordion" activeIds="diff">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionItem id="diff">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button ngbAccordionButton type="button">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class="label-accordion" style="width: 90%; height: 22px">Diff</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionCollapse>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionBody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<html-diff-viewer [payloadStr]="log.payload"></html-diff-viewer>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionItem id="raw">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button ngbAccordionButton type="button">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class="label-accordion" style="width: 90%; height: 22px">Raw</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionCollapse>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionBody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<pre>{{ log.payload | jsonParse }}</pre>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t@if (log.method !== \'replaceOne\' && log.method !== \'updateOne\') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t<pre>{{ log.payload | jsonParse }}</pre>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t@if (!log.payload) {\n\t\t\t\t\t\t\t\t\t\t\t\tNo Data\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t\t<div class="col-lg-4">\n\t\t\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t\t\t<div class="col-lg-8">\n\t\t\t\t\t\t\t\t\t<label class="form-control-label">Entries Per Page</label>\n\t\t\t\t\t\t\t\t\t<select class="form-control" [(ngModel)]="entries_per_page" (change)="getLogData()">\n\t\t\t\t\t\t\t\t\t\t<option value="10">10</option>\n\t\t\t\t\t\t\t\t\t\t<option value="25">25</option>\n\t\t\t\t\t\t\t\t\t\t<option value="50">50</option>\n\t\t\t\t\t\t\t\t\t\t<option value="100">100</option>\n\t\t\t\t\t\t\t\t\t\t<option value="250">250</option>\n\t\t\t\t\t\t\t\t\t\t<option value="500">500</option>\n\t\t\t\t\t\t\t\t\t\t<option value="1000">1000</option>\n\t\t\t\t\t\t\t\t\t\t<option value="5000">5000</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-lg-8">\n\t\t\t\t\t\t\t<ngb-pagination class="float-end" boundaryLinks="true" [collectionSize]="log_cnt" directionLinks="true" ellipses="false" [(page)]="page_num" maxSize="6" [pageSize]="entries_per_page" rotate="true" (pageChange)="getLogData()"></ngb-pagination>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}]}],ctorParameters:()=>[{type:ProviderService},{type:DialogService},{type:i0.ChangeDetectorRef}]});class CoreLoggerModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreLoggerModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CoreLoggerModule,declarations:[LoggerComponent,HtmlDiffViewerComponent],imports:[SharedModule],exports:[LoggerComponent,HtmlDiffViewerComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreLoggerModule,imports:[SharedModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreLoggerModule,decorators:[{type:NgModule,args:[{declarations:[LoggerComponent,HtmlDiffViewerComponent],imports:[SharedModule],exports:[LoggerComponent,HtmlDiffViewerComponent]}]}]});class UserSettingsService{selectedUser=new BehaviorSubject("0");constructor(){}setSelectedUser(t){this.selectedUser.next(t)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsService,decorators:[{type:Injectable}],ctorParameters:()=>[]});const UserSettingsModulePermission={name:"user-settings",views:[{link:"/user-settings/settings",label:"Settings"}],approval:{type:"user-settings"}};class UserSettingsComponent extends BaseComponent{_us;_services;selectedUserSettings$;menuData;constructor(t,e){super(e),this._us=t,this._services=e}ngOnInit(){this.selectedUserSettings$=this._us.selectedUser.subscribe(t=>this.selectedUserSettingsChanged(t))}ngOnDestroy(){this._us.setSelectedUser("0"),this.selectedUserSettings$.unsubscribe()}selectedUserSettingsChanged(t){this.setUserSettingsMenuData()}setUserSettingsMenuData(t,e){let n=[];UserSettingsModulePermission.views.forEach(t=>{if((this._services._account.isUserInView(t.link)||this._services._account.isUserSuperAdmin())&&"/user-settings/settings"===t.link)n.push({link:"/user-settings/settings",params:null,label:"Settings"})}),this.menuData={title:"User Settings",module:"User Settings",description_name:"User: ",description:e?e.fullname:"",tabs:n},this._services._app.setNavbarModuleData(this.menuData)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsComponent,deps:[{token:UserSettingsService},{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:UserSettingsComponent,isStandalone:!1,selector:"resolveio-user-settings",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:"<router-outlet></router-outlet>",isInline:!0,dependencies:[{kind:"directive",type:i1$1.RouterOutlet,selector:"router-outlet",inputs:["name","routerOutletData"],outputs:["activate","deactivate","attach","detach"],exportAs:["outlet"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsComponent,decorators:[{type:Component,args:[{selector:"resolveio-user-settings",providers:[ProviderService],template:"<router-outlet></router-outlet>",standalone:!1}]}],ctorParameters:()=>[{type:UserSettingsService},{type:ProviderService}]});class UsersSettingsComponent extends BaseComponent{_aps;_us;_services;_ds;_stickyAdapter;subscription$=[];form;disableFormButton=!1;user;client="";views=[];stickySelects=[];stickySelections={};constructor(t,e,n,o,r){super(n),this._aps=t,this._us=e,this._services=n,this._ds=o,this._stickyAdapter=r}ngOnInit(){this._us.setSelectedUser("0"),this.client=this._services._app.client.getValue(),this.form=this._services._fb.group({table_color:["#3b3ee3",[Validators.required]],table_font_color:["#ffffff",[Validators.required]],font_size:[12,[Validators.required,this._services._vs.wholeNumbersGreaterThanZero,this._services._vs.maxValue(18),this._services._vs.minValue(8)]],secondary_table_color:["#87ceeb",[Validators.required]],secondary_table_font_color:["#000000",[Validators.required]],tertiary_table_color:["#ff4500",[Validators.required]],tertiary_table_font_color:["#000000",[Validators.required]],collapsable_menu:[!0],entries_per_page:["25",[Validators.required]],warning_color:["#ffc107",[Validators.required]],warning_font_color:["#000000",[Validators.required]],warning_hover_color:["#e0a800",[Validators.required]],success_color:["#28a745",[Validators.required]],success_font_color:["#ffffff",[Validators.required]],success_hover_color:["#218838",[Validators.required]],danger_color:["#dc3545",[Validators.required]],danger_font_color:["#ffffff",[Validators.required]],danger_hover_color:["#c82333",[Validators.required]],info_color:["#17a2b8",[Validators.required]],info_font_color:["#ffffff",[Validators.required]],info_hover_color:["#138496",[Validators.required]],primary_color:["#007bff",[Validators.required]],primary_font_color:["#ffffff",[Validators.required]],primary_hover_color:["#0069d9",[Validators.required]],secondary_color:["#868e96",[Validators.required]],secondary_font_color:["#ffffff",[Validators.required]],secondary_hover_color:["#5a6268",[Validators.required]],date_picker_day_start:["S",[Validators.required]],routing_preference:["alwaysAsk"],opening_route:["/home"],rio_select_search_mode:["exact",[Validators.required]]});const t=this._services._account.getUser();t&&t.settings&&(this.form.patchValue(t.settings),t.roles.groups.forEach(t=>{t.views.forEach(t=>{this.views.some(e=>e.value===t)||this.views.push({value:t,display:toTitleCase(t.replace("/","").replace(new RegExp("/","g")," - "))})})}));const e=this._normalizeDatePickerDayStart(t?.other?.date_picker_day_start);this.form.controls.date_picker_day_start.setValue(e),this._loadStickySelects(this._services._account.getUser()),document.documentElement.style.setProperty("--primary-table-color",this.form.controls.table_color.value),document.documentElement.style.setProperty("--primary-table-font-color",this.form.controls.table_font_color.value),document.documentElement.style.setProperty("--font-size",this.form.controls.font_size.value+"px"),document.documentElement.style.setProperty("--secondary-table-color",this.form.controls.secondary_table_color.value),document.documentElement.style.setProperty("--secondary-table-font-color",this.form.controls.secondary_table_font_color.value),document.documentElement.style.setProperty("--tertiary-table-color",this.form.controls.tertiary_table_color.value),document.documentElement.style.setProperty("--tertiary-table-font-color",this.form.controls.tertiary_table_font_color.value),document.documentElement.style.setProperty("--warning-color",this.form.controls.warning_color.value),document.documentElement.style.setProperty("--warning-font-color",this.form.controls.warning_font_color.value),document.documentElement.style.setProperty("--warning-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.warning_color.value,.5)),document.documentElement.style.setProperty("--warning-hover-color",this.form.controls.warning_hover_color.value),document.documentElement.style.setProperty("--success-color",this.form.controls.success_color.value),document.documentElement.style.setProperty("--success-font-color",this.form.controls.success_font_color.value),document.documentElement.style.setProperty("--success-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.success_color.value,.5)),document.documentElement.style.setProperty("--success-hover-color",this.form.controls.success_hover_color.value),document.documentElement.style.setProperty("--danger-color",this.form.controls.danger_color.value),document.documentElement.style.setProperty("--danger-font-color",this.form.controls.danger_font_color.value),document.documentElement.style.setProperty("--danger-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.danger_color.value,.5)),document.documentElement.style.setProperty("--danger-hover-color",this.form.controls.danger_hover_color.value),document.documentElement.style.setProperty("--info-color",this.form.controls.info_color.value),document.documentElement.style.setProperty("--info-font-color",this.form.controls.info_font_color.value),document.documentElement.style.setProperty("--info-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.info_color.value,.5)),document.documentElement.style.setProperty("--info-hover-color",this.form.controls.info_hover_color.value),document.documentElement.style.setProperty("--primary-color",this.form.controls.primary_color.value),document.documentElement.style.setProperty("--primary-font-color",this.form.controls.primary_font_color.value),document.documentElement.style.setProperty("--primary-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.primary_color.value,.5)),document.documentElement.style.setProperty("--primary-hover-color",this.form.controls.primary_hover_color.value),document.documentElement.style.setProperty("--secondary-color",this.form.controls.secondary_color.value),document.documentElement.style.setProperty("--secondary-font-color",this.form.controls.secondary_font_color.value),document.documentElement.style.setProperty("--secondary-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.secondary_color.value,.5)),document.documentElement.style.setProperty("--secondary-hover-color",this.form.controls.secondary_hover_color.value),this.subscription$.push(this._services._account.user.subscribe(t=>{this.user=t,this._loadStickySelects(t)}))}ngOnDestroy(){const t=this._services._account.getUser();t&&!t.settings&&this.form&&this.form.valid&&this.submitForm(this.form),this.subscription$.forEach(t=>{t.unsubscribe()})}changePrimaryColor(){document.documentElement.style.setProperty("--primary-table-color",this.form.controls.table_color.value)}changePrimaryFontColor(){document.documentElement.style.setProperty("--primary-table-font-color",this.form.controls.table_font_color.value)}changePrimaryFontSize(){document.documentElement.style.setProperty("--font-size",this.form.controls.font_size.value+"px")}changeSecondaryColor(){document.documentElement.style.setProperty("--secondary-table-color",this.form.controls.secondary_table_color.value)}changeSecondaryFontColor(){document.documentElement.style.setProperty("--secondary-table-font-color",this.form.controls.secondary_table_font_color.value)}changeTertiaryColor(){document.documentElement.style.setProperty("--tertiary-table-color",this.form.controls.tertiary_table_color.value)}changeTertiaryFontColor(){document.documentElement.style.setProperty("--tertiary-table-font-color",this.form.controls.tertiary_table_font_color.value)}changeWarningColor(){document.documentElement.style.setProperty("--warning-color",this.form.controls.warning_color.value),document.documentElement.style.setProperty("--warning-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.warning_color.value,.5))}changeWarningHoverColor(){document.documentElement.style.setProperty("--warning-hover-color",this.form.controls.warning_hover_color.value)}changeWarningFontColor(){document.documentElement.style.setProperty("--warning-font-color",this.form.controls.warning_font_color.value)}changeSuccessColor(){document.documentElement.style.setProperty("--success-color",this.form.controls.success_color.value),document.documentElement.style.setProperty("--success-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.success_color.value,.5))}changeSuccessHoverColor(){document.documentElement.style.setProperty("--success-hover-color",this.form.controls.success_hover_color.value)}changeSuccessFontColor(){document.documentElement.style.setProperty("--success-font-color",this.form.controls.success_font_color.value)}changeDangerColor(){document.documentElement.style.setProperty("--danger-color",this.form.controls.danger_color.value),document.documentElement.style.setProperty("--danger-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.danger_color.value,.5))}changeDangerHoverColor(){document.documentElement.style.setProperty("--danger-hover-color",this.form.controls.danger_hover_color.value)}changeDangerFontColor(){document.documentElement.style.setProperty("--danger-font-color",this.form.controls.danger_font_color.value)}changeInfoColor(){document.documentElement.style.setProperty("--info-color",this.form.controls.info_color.value),document.documentElement.style.setProperty("--info-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.info_color.value,.5))}changeInfoHoverColor(){document.documentElement.style.setProperty("--info-hover-color",this.form.controls.info_hover_color.value)}changeInfoFontColor(){document.documentElement.style.setProperty("--info-font-color",this.form.controls.info_font_color.value)}changePrimaryButtonColor(){document.documentElement.style.setProperty("--primary-color",this.form.controls.primary_color.value),document.documentElement.style.setProperty("--primary-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.primary_color.value,.5))}changePrimaryButtonHoverColor(){document.documentElement.style.setProperty("--primary-hover-color",this.form.controls.primary_hover_color.value)}changePrimaryButtonFontColor(){document.documentElement.style.setProperty("--primary-font-color",this.form.controls.primary_font_color.value)}changeSecondaryButtonColor(){document.documentElement.style.setProperty("--secondary-color",this.form.controls.secondary_color.value),document.documentElement.style.setProperty("--secondary-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.secondary_color.value,.5))}changeSecondaryHoverColor(){document.documentElement.style.setProperty("--secondary-hover-color",this.form.controls.secondary_hover_color.value)}changeSecondaryButtonFontColor(){document.documentElement.style.setProperty("--secondary-font-color",this.form.controls.secondary_font_color.value)}reset(){this.form.controls.table_color.setValue("#3b3ee3"),this.form.controls.table_font_color.setValue("#ffffff"),this.form.controls.font_size.setValue(12),this.form.controls.secondary_table_color.setValue("#87ceeb"),this.form.controls.secondary_table_font_color.setValue("#000000"),this.form.controls.tertiary_table_color.setValue("#ff4500"),this.form.controls.tertiary_table_font_color.setValue("#000000"),this.form.controls.collapsable_menu.setValue(!0),this.form.controls.entries_per_page.setValue("25"),this.form.controls.warning_color.setValue("#ffc107"),this.form.controls.warning_font_color.setValue("#000000"),this.form.controls.warning_hover_color.setValue("#e0a800"),this.form.controls.success_color.setValue("#28a745"),this.form.controls.success_font_color.setValue("#ffffff"),this.form.controls.success_hover_color.setValue("#218838"),this.form.controls.danger_color.setValue("#dc3545"),this.form.controls.danger_font_color.setValue("#ffffff"),this.form.controls.danger_hover_color.setValue("#c82333"),this.form.controls.info_color.setValue("#17a2b8"),this.form.controls.info_font_color.setValue("#ffffff"),this.form.controls.info_hover_color.setValue("#138496"),this.form.controls.primary_color.setValue("#007bff"),this.form.controls.primary_font_color.setValue("#ffffff"),this.form.controls.primary_hover_color.setValue("#0069d9"),this.form.controls.secondary_color.setValue("#868e96"),this.form.controls.secondary_font_color.setValue("#ffffff"),this.form.controls.secondary_hover_color.setValue("#5a6268"),this.form.controls.date_picker_day_start.setValue("S"),this.form.controls.rio_select_search_mode.setValue("exact"),document.documentElement.style.setProperty("--primary-table-color",this.form.controls.table_color.value),document.documentElement.style.setProperty("--primary-table-font-color",this.form.controls.table_font_color.value),document.documentElement.style.setProperty("--font-size",this.form.controls.font_size.value+"px"),document.documentElement.style.setProperty("--secondary-table-color",this.form.controls.secondary_table_color.value),document.documentElement.style.setProperty("--secondary-table-font-color",this.form.controls.secondary_table_font_color.value),document.documentElement.style.setProperty("--tertiary-table-color",this.form.controls.tertiary_table_color.value),document.documentElement.style.setProperty("--tertiary-table-font-color",this.form.controls.tertiary_table_font_color.value),document.documentElement.style.setProperty("--warning-color",this.form.controls.warning_color.value),document.documentElement.style.setProperty("--warning-font-color",this.form.controls.warning_font_color.value),document.documentElement.style.setProperty("--warning-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.warning_color.value,.5)),document.documentElement.style.setProperty("--warning-hover-color",this.form.controls.warning_hover_color.value),document.documentElement.style.setProperty("--success-color",this.form.controls.success_color.value),document.documentElement.style.setProperty("--success-font-color",this.form.controls.success_font_color.value),document.documentElement.style.setProperty("--success-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.success_color.value,.5)),document.documentElement.style.setProperty("--success-hover-color",this.form.controls.success_hover_color.value),document.documentElement.style.setProperty("--danger-color",this.form.controls.danger_color.value),document.documentElement.style.setProperty("--danger-font-color",this.form.controls.danger_font_color.value),document.documentElement.style.setProperty("--danger-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.danger_color.value,.5)),document.documentElement.style.setProperty("--danger-hover-color",this.form.controls.danger_hover_color.value),document.documentElement.style.setProperty("--info-color",this.form.controls.info_color.value),document.documentElement.style.setProperty("--info-font-color",this.form.controls.info_font_color.value),document.documentElement.style.setProperty("--info-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.info_color.value,.5)),document.documentElement.style.setProperty("--info-hover-color",this.form.controls.info_hover_color.value),document.documentElement.style.setProperty("--primary-color",this.form.controls.primary_color.value),document.documentElement.style.setProperty("--primary-font-color",this.form.controls.primary_font_color.value),document.documentElement.style.setProperty("--primary-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.primary_color.value,.5)),document.documentElement.style.setProperty("--primary-hover-color",this.form.controls.primary_hover_color.value),document.documentElement.style.setProperty("--secondary-color",this.form.controls.secondary_color.value),document.documentElement.style.setProperty("--secondary-font-color",this.form.controls.secondary_font_color.value),document.documentElement.style.setProperty("--secondary-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.secondary_color.value,.5)),document.documentElement.style.setProperty("--secondary-hover-color",this.form.controls.secondary_hover_color.value)}updateStickyDefault(t,e){const n=this.stickySelects.findIndex(e=>e.key===t);if(-1===n)return;const o=this.stickySelects.map(t=>({...t,options:t.options||[]})),r={...o[n]};r.defaultValue=void 0===e?null:e,r.defaultLabel=this._resolveStickyLabel(r,e),r.updatedAt=(new Date).toISOString(),o[n]=r,this.stickySelects=o,this.stickySelections[t]=e,this._stickyAdapter&&this._stickyAdapter.saveStickySelects(o,"user-settings")}_loadStickySelects(t){const e=t||this._services._account.getUser();if(e&&e.other&&Array.isArray(e.other.stickySelects)){const t=[],n=new Set;e.other.stickySelects.forEach(e=>{e&&e.key&&!n.has(e.key)&&(n.add(e.key),t.push({...e,options:e.options||[]}))}),this.stickySelects=t}else this.stickySelects=[];this.stickySelections={},this.stickySelects.forEach(t=>{this.stickySelections[t.key]=void 0!==t.defaultValue?t.defaultValue:null})}_resolveStickyLabel(t,e){if(null==e)return"";const n=(t.options||[]).find(t=>JSON.stringify(t.value)===JSON.stringify(e));return n&&n.label?n.label:"string"==typeof e?e:JSON.stringify(e)}submitForm(t){const e=this._services._account.getUser(),n=this.form.value,o=this._normalizeDatePickerDayStart(n.date_picker_day_start),{date_picker_day_start:r,...i}=n,s={...e?.other||{},date_picker_day_start:o};this._services._socket.call("updateDocumentProps","users",e._id,[{prop:"settings",data:i},{prop:"other",data:s}],e.__v,(t,n)=>{if(n){if(this._services._alert.setAlert("success","Settings have been updated"),e){const t={...e,__v:n&&n.__v?n.__v:e.__v,settings:i,other:s};this._services._account.setUser(t)}}else this._ds.error("Could not update settings"),this._services._socket.call("insertErrorLog","user settings - update user",[this._services._account.getUser(),t])})}_normalizeDatePickerDayStart(t){return"M"===t||"m"===t||1===t||"1"===t?"M":"S"}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UsersSettingsComponent,deps:[{token:AuthPermissionService},{token:UserSettingsService},{token:ProviderService},{token:DialogService},{token:RIO_SELECT_STICKY_ADAPTER,optional:!0}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:UsersSettingsComponent,isStandalone:!1,selector:"resolveio-users-settings",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<style>\n\t.sticky-section-card,\n\t.sticky-section-card * {\n\t\ttransform: none !important;\n\t}\n\n\t:host {\n\t\tdisplay: block;\n\t}\n\n\t::ng-deep :root {\n\t\t--primary-table-color: #3b3ee3;\n\t\t--primary-table-font-color: #ffffff;\n\t\t--font-size: 12px;\n\t\t--secondary-table-color: #87ceeb;\n\t\t--secondary-table-font-color: #000000;\n\t\t--tertiary-table-color: #ff4500;\n\t\t--tertiary-table-font-color: #000000;\n\t\t--warning-color: #ffc107;\n\t\t--warning-font-color: #000000;\n\t\t--warning-hover-color: #e0a800;\n\t\t--warning-shadow-color: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);\n\t\t--success-color: #28a745;\n\t\t--success-font-color: #ffffff;\n\t\t--success-hover-color: #218838;\n\t\t--success-shadow-color: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);\n\t\t--danger-color: #dc3545;\n\t\t--danger-font-color: #ffffff;\n\t\t--danger-hover-color: #c82333;\n\t\t--danger-shadow-color: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);\n\t\t--info-color: #17a2b8;\n\t\t--info-font-color: #ffffff;\n\t\t--info-hover-color: #138496;\n\t\t--info-shadow-color: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);\n\t\t--primary-color: #007bff;\n\t\t--primary-font-color: #ffffff;\n\t\t--primary-hover-color: #0069d9;\n\t\t--primary-shadow-color: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);\n\t\t--secondary-color: #868e96;\n\t\t--secondary-font-color: #ffffff;\n\t\t--secondary-hover-color: #5a6268;\n\t\t--secondary-shadow-color: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);\n\t}\n\n\t.settings-shell {\n\t\tposition: relative;\n\t\toverflow: visible;\n\t\tpadding: 12px 8px 32px;\n\t\tbackground: radial-gradient(circle at 15% 20%, rgba(111, 136, 255, 0.12), transparent 35%),\n\t\t\tradial-gradient(circle at 80% 0%, rgba(255, 130, 92, 0.12), transparent 32%),\n\t\t\tlinear-gradient(135deg, #f7f9ff 0%, #ffffff 60%, #f5f7fb 100%);\n\t}\n\n\t.aurora {\n\t\tposition: absolute;\n\t\twidth: 420px;\n\t\theight: 420px;\n\t\tborder-radius: 50%;\n\t\tfilter: blur(70px);\n\t\topacity: .55;\n\t\tmix-blend-mode: screen;\n\t\tanimation: drift 18s ease-in-out infinite alternate;\n\t\tz-index: 0;\n\t}\n\n\t.aurora.aurora-one {\n\t\tbackground: radial-gradient(circle, rgba(82, 163, 255, .7), rgba(134, 120, 255, .25));\n\t\ttop: -120px;\n\t\tleft: -70px;\n\t}\n\n\t.aurora.aurora-two {\n\t\tbackground: radial-gradient(circle, rgba(255, 147, 92, .6), rgba(255, 227, 187, .35));\n\t\tbottom: -140px;\n\t\tright: -40px;\n\t\tanimation-duration: 22s;\n\t}\n\n\t.settings-hero {\n\t\tposition: relative;\n\t\tz-index: 1;\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(320px, 1fr));\n\t\tgap: 16px;\n\t\talign-items: center;\n\t\tmargin-bottom: 18px;\n\t}\n\n\t.glass-card {\n\t\tposition: relative;\n\t\tbackground: rgba(255, 255, 255, .78);\n\t\tborder: 1px solid rgba(255, 255, 255, .55);\n\t\tbox-shadow: 0 10px 40px rgba(54, 74, 120, .14), inset 0 0 0 1px rgba(255, 255, 255, .32);\n\t\tborder-radius: 18px;\n\t\tpadding: 18px;\n\t\toverflow: hidden;\n\t}\n\n\t.glass-card::before {\n\t\tcontent: \'\';\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder-radius: inherit;\n\t\tpointer-events: none;\n\t\tz-index: 0;\n\t}\n\n\t.hero-main h2 {\n\t\tfont-weight: 800;\n\t\tfont-size: 26px;\n\t\tmargin-bottom: 8px;\n\t\tcolor: #0f172a;\n\t}\n\n\t.hero-main p {\n\t\tcolor: #4b5563;\n\t\tmargin-bottom: 12px;\n\t}\n\n\t.hero-chip {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tgap: 6px;\n\t\tpadding: 6px 12px;\n\t\tborder-radius: 999px;\n\t\tfont-weight: 700;\n\t\tcolor: #1f2937;\n\t\tbackground: linear-gradient(120deg, rgba(99, 102, 241, .1), rgba(16, 185, 129, .1), rgba(59, 130, 246, .12));\n\t\tborder: 1px solid rgba(99, 102, 241, .25);\n\t\tmargin-bottom: 10px;\n\t\ttext-transform: uppercase;\n\t\tletter-spacing: .04em;\n\t\tfont-size: 12px;\n\t}\n\n\t.hero-actions {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 12px;\n\t\talign-items: center;\n\t\tmargin-top: 12px;\n\t}\n\n\t.neon-btn {\n\t\tposition: relative;\n\t\tborder: 1px solid rgba(15, 23, 42, .1);\n\t\tbackground: linear-gradient(120deg, rgba(99, 102, 241, .15), rgba(59, 130, 246, .08));\n\t\tcolor: #0f172a;\n\t\tfont-weight: 700;\n\t\tpadding: 10px 16px;\n\t\tborder-radius: 12px;\n\t\tbox-shadow: 0 10px 24px rgba(99, 102, 241, .15);\n\t\ttransition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;\n\t}\n\n\t.neon-btn:hover {\n\t\ttransform: translateY(-2px);\n\t\tborder-color: rgba(99, 102, 241, .45);\n\t\tbox-shadow: 0 14px 26px rgba(99, 102, 241, .22);\n\t}\n\n\t.save-button form-button ::ng-deep button {\n\t\tborder-radius: 12px;\n\t\tfont-weight: 800;\n\t\tletter-spacing: .01em;\n\t\tpadding: 11px 18px;\n\t\tbox-shadow: 0 10px 26px rgba(16, 185, 129, .24);\n\t}\n\n\t.hero-preview {\n\t\tposition: relative;\n\t}\n\n\t.preview-card {\n\t\tborder-radius: 16px;\n\t\tpadding: 16px;\n\t\tbackground: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .7), rgba(255, 255, 255, .52));\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 12px 30px rgba(80, 110, 185, .16);\n\t\tborder: 1px solid rgba(255, 255, 255, .6);\n\t}\n\n\t.preview-title {\n\t\tfont-weight: 800;\n\t\tmargin-bottom: 8px;\n\t\tcolor: #111827;\n\t}\n\n\t.swatch-row {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(140px, 1fr));\n\t\tgap: 10px;\n\t}\n\n\t.swatch {\n\t\tborder-radius: 12px;\n\t\tpadding: 10px;\n\t\tcolor: #0f172a;\n\t\tfont-weight: 700;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);\n\t\topacity: .98;\n\t}\n\n\t.swatch span {\n\t\tfont-size: 12px;\n\t\tfont-weight: 600;\n\t\tcolor: rgba(15, 23, 42, .85);\n\t}\n\n\t.preview-pulse {\n\t\tposition: absolute;\n\t\twidth: 120px;\n\t\theight: 120px;\n\t\tborder-radius: 50%;\n\t\tbackground: radial-gradient(circle, rgba(16, 185, 129, .3), transparent 60%);\n\t\tbottom: -18px;\n\t\tright: -14px;\n\t\tfilter: blur(12px);\n\t\tanimation: pulse 2.4s ease-in-out infinite;\n\t}\n\n\t.hero-metrics {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 8px;\n\t\tmargin-top: 14px;\n\t}\n\n\t.metric-pill {\n\t\tbackground: rgba(15, 23, 42, .06);\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tborder-radius: 999px;\n\t\tpadding: 8px 12px;\n\t\tfont-weight: 700;\n\t\tcolor: #0f172a;\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tgap: 6px;\n\t}\n\n\t.section-grid {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(320px, 1fr));\n\t\tgap: 14px;\n\t\tposition: relative;\n\t\tz-index: 1;\n\t}\n\n\t.section-card {\n\t\tposition: relative;\n\t\toverflow: visible;\n\t}\n\n\t.section-heading {\n\t\tmargin-bottom: 12px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tgap: 10px;\n\t\tflex-wrap: wrap;\n\t}\n\n\t.section-heading h3 {\n\t\tmargin: 0;\n\t\tfont-weight: 800;\n\t\tcolor: #0f172a;\n\t}\n\n\t.section-heading p {\n\t\tmargin: 0;\n\t\tcolor: #4b5563;\n\t}\n\n\t.field-grid {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n\t\tgap: 12px;\n\t}\n\n\t.field-card {\n\t\tpadding: 12px;\n\t\tborder-radius: 14px;\n\t\tborder: 1px solid rgba(15, 23, 42, .06);\n\t\tbackground: rgba(255, 255, 255, .85);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);\n\t\ttransition: transform .2s ease, box-shadow .2s ease;\n\t}\n\n\t.field-card:hover {\n\t\tbox-shadow: 0 8px 22px rgba(99, 102, 241, .12);\n\t}\n\n\t/* Avoid transforming the sticky select card so the fixed overlay positions correctly. */\n\t.sticky-select-card:hover {\n\t\ttransform: none;\n\t}\n\n\t.sticky-section-card {\n\t\tanimation: none;\n\t\ttransform: none;\n\t}\n\n\t.field-label {\n\t\tfont-weight: 700;\n\t\tcolor: #111827;\n\t\tmargin-bottom: 4px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tgap: 6px;\n\t}\n\n\t.field-hint {\n\t\tfont-size: 12px;\n\t\tcolor: #6b7280;\n\t\tmargin: 0;\n\t}\n\n\t.input-bevel {\n\t\tborder-radius: 12px;\n\t\tborder: 1px solid rgba(15, 23, 42, .1);\n\t\tbackground: rgba(255, 255, 255, .92);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);\n\t\tpadding: 10px 12px;\n\t\twidth: 100%;\n\t}\n\n\t.toggle {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: 8px;\n\t}\n\n\t.toggle-input {\n\t\tdisplay: none;\n\t}\n\n\t.toggle-track {\n\t\twidth: 54px;\n\t\theight: 30px;\n\t\tborder-radius: 999px;\n\t\tbackground: linear-gradient(120deg, rgba(15, 23, 42, .08), rgba(15, 23, 42, .15));\n\t\tposition: relative;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);\n\t\tborder: 1px solid rgba(15, 23, 42, .12);\n\t\ttransition: background .2s ease;\n\t}\n\n\t.toggle-thumb {\n\t\tposition: absolute;\n\t\ttop: 3px;\n\t\tleft: 3px;\n\t\twidth: 24px;\n\t\theight: 24px;\n\t\tborder-radius: 50%;\n\t\tbackground: linear-gradient(135deg, #63a4ff, #83eaf1);\n\t\tbox-shadow: 0 8px 16px rgba(99, 102, 241, .35);\n\t\ttransition: transform .2s ease;\n\t}\n\n\t.toggle-input:checked + .toggle-track {\n\t\tbackground: linear-gradient(120deg, rgba(16, 185, 129, .15), rgba(52, 211, 153, .25));\n\t\tborder-color: rgba(16, 185, 129, .45);\n\t}\n\n\t.toggle-input:checked + .toggle-track .toggle-thumb {\n\t\ttransform: translateX(24px);\n\t\tbackground: linear-gradient(135deg, #10b981, #22d3ee);\n\t\tbox-shadow: 0 10px 18px rgba(16, 185, 129, .32);\n\t}\n\n\t.toggle-state {\n\t\tfont-weight: 700;\n\t\tcolor: #0f172a;\n\t}\n\n\t.color-grid {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(260px, 1fr));\n\t\tgap: 10px;\n\t\tmargin-top: 10px;\n\t}\n\n\t.color-card {\n\t\tborder-radius: 14px;\n\t\tpadding: 12px;\n\t\tborder: 1px solid rgba(15, 23, 42, .06);\n\t\tbackground: rgba(255, 255, 255, .9);\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr 120px;\n\t\tgap: 10px;\n\t\talign-items: center;\n\t}\n\n\t.color-chip {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 4px;\n\t}\n\n\t.color-name {\n\t\tfont-weight: 700;\n\t\tcolor: #0f172a;\n\t}\n\n\t.color-preview {\n\t\tborder-radius: 12px;\n\t\theight: 48px;\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);\n\t}\n\n\t.color-input {\n\t\theight: 48px;\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tborder-radius: 12px;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);\n\t\twidth: 100%;\n\t\tcursor: pointer;\n\t}\n\n\t.palette-preview {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\t\tgap: 10px;\n\t\tmargin-bottom: 8px;\n\t}\n\n\t.preview-table {\n\t\tborder-radius: 12px;\n\t\tpadding: 10px;\n\t\tbackground: linear-gradient(160deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .7));\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);\n\t}\n\n\t.preview-table .row-swatch {\n\t\tborder-radius: 10px;\n\t\tpadding: 10px;\n\t\tfont-weight: 700;\n\t\tmargin-bottom: 6px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);\n\t}\n\n\t.preview-table .row-swatch:last-child {\n\t\tmargin-bottom: 0;\n\t}\n\n\t.button-demo {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 8px;\n\t\tmargin-bottom: 10px;\n\t}\n\n\t.btn-warning {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-color);\n\t\tborder-color: var(--warning-color);\n\t}\n\n\t.btn-warning:focus,\n\t.btn-warning.focus {\n\t\tbox-shadow: var(--warning-shadow-color);\n\t}\n\n\t.btn-warning:hover {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-hover-color);\n\t\tborder-color: var(--warning-hover-color);\n\t}\n\n\t.btn-success {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-color);\n\t\tborder-color: var(--success-color);\n\t}\n\n\t.btn-success:focus,\n\t.btn-success.focus {\n\t\tbox-shadow: var(--success-shadow-color);\n\t}\n\n\t.btn-success:hover {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-hover-color);\n\t\tborder-color: var(--success-hover-color);\n\t}\n\n\t.btn-danger {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-color);\n\t\tborder-color: var(--danger-color);\n\t}\n\n\t.btn-danger:focus,\n\t.btn-danger.focus {\n\t\tbox-shadow: var(--danger-shadow-color);\n\t}\n\n\t.btn-danger:hover {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-hover-color);\n\t\tborder-color: var(--danger-hover-color);\n\t}\n\n\t.btn-info {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-color);\n\t\tborder-color: var(--info-color);\n\t}\n\n\t.btn-info:focus,\n\t.btn-info.focus {\n\t\tbox-shadow: var(--info-shadow-color);\n\t}\n\n\t.btn-info:hover {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-hover-color);\n\t\tborder-color: var(--info-hover-color);\n\t}\n\n\t.btn-primary {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-color);\n\t\tborder-color: var(--primary-color);\n\t}\n\n\t.btn-primary:focus,\n\t.btn-primary.focus {\n\t\tbox-shadow: var(--primary-shadow-color);\n\t}\n\n\t.btn-primary:hover {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-hover-color);\n\t\tborder-color: var(--primary-hover-color);\n\t}\n\n\t.btn-secondary {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-color);\n\t\tborder-color: var(--secondary-color);\n\t}\n\n\t.btn-secondary:focus,\n\t.btn-secondary.focus {\n\t\tbox-shadow: var(--secondary-shadow-color);\n\t}\n\n\t.btn-secondary:hover {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-hover-color);\n\t\tborder-color: var(--secondary-hover-color);\n\t}\n\n\t.rio-select .rio-select-container {\n\t\tborder-radius: 12px !important;\n\t\tmin-height: 42px !important;\n\t\tborder-color: rgba(15, 23, 42, .1) !important;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);\n\t}\n\n\t.sticky-empty {\n\t\tbackground: rgba(23, 162, 184, .12);\n\t\tcolor: #0f4c75;\n\t\tborder: 1px solid rgba(23, 162, 184, .2);\n\t\tborder-radius: 12px;\n\t\tpadding: 12px;\n\t}\n\n\t.animate-rise {\n\t\tanimation: rise .5s ease;\n\t}\n\n\t@keyframes drift {\n\t\tfrom {\n\t\t\ttransform: translateY(0) translateX(0);\n\t\t}\n\t\tto {\n\t\t\ttransform: translateY(-30px) translateX(20px);\n\t\t}\n\t}\n\n\t@keyframes pulse {\n\t\t0% {\n\t\t\ttransform: scale(1);\n\t\t\topacity: .6;\n\t\t}\n\t\t50% {\n\t\t\ttransform: scale(1.08);\n\t\t\topacity: .9;\n\t\t}\n\t\t100% {\n\t\t\ttransform: scale(1);\n\t\t\topacity: .6;\n\t\t}\n\t}\n\n\t@keyframes rise {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: translateY(12px);\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t\ttransform: translateY(0);\n\t\t}\n\t}\n</style>\n\n<div class="settings-shell">\n\t<div class="aurora aurora-one"></div>\n\t<div class="aurora aurora-two"></div>\n\t<form [formGroup]="form" novalidate (ngSubmit)="submitForm(form)">\n\t\t<div class="settings-hero glass-card animate-rise">\n\t\t\t<div class="hero-main">\n\t\t\t\t<div class="hero-chip">User Settings</div>\n\t\t\t\t<h2>Welcome {{ user?.fullname || user?.username || user?.email || \'back\' }}!</h2>\n\t\t\t\t<p>Shape {{ client || \'your workspace\' }} into something joyful, colorful and uniquely you.</p>\n\t\t\t\t<div class="hero-actions">\n\t\t\t\t\t<button type="button" class="neon-btn" (click)="reset()">Reset to defaults</button>\n\t\t\t\t\t<div class="save-button">\n\t\t\t\t\t\t<form-button [form]="form" [disabled]="disableFormButton"></form-button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="hero-metrics">\n\t\t\t\t\t<div class="metric-pill">\n\t\t\t\t\t\t<span>Entries / page</span>\n\t\t\t\t\t\t<strong>{{ form.controls.entries_per_page.value }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="metric-pill">\n\t\t\t\t\t\t<span>Font size</span>\n\t\t\t\t\t\t<strong>{{ form.controls.font_size.value }}px</strong>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="metric-pill">\n\t\t\t\t\t\t<span>Week starts</span>\n\t\t\t\t\t\t<strong>{{ form.controls.date_picker_day_start.value === \'M\' ? \'Monday\' : \'Sunday\' }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="hero-preview">\n\t\t\t\t<div class="preview-card">\n\t\t\t\t\t<div class="preview-title">Live palette peek</div>\n\t\t\t\t\t<div class="swatch-row">\n\t\t\t\t\t\t<div class="swatch" [style.background]="form.controls.primary_color.value" [style.color]="form.controls.primary_font_color.value">\n\t\t\t\t\t\t\t<span>Primary buttons</span>\n\t\t\t\t\t\t\t{{ form.controls.primary_color.value }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="swatch" [style.background]="form.controls.success_color.value" [style.color]="form.controls.success_font_color.value">\n\t\t\t\t\t\t\t<span>Success tone</span>\n\t\t\t\t\t\t\t{{ form.controls.success_color.value }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="swatch" [style.background]="form.controls.table_color.value" [style.color]="form.controls.table_font_color.value">\n\t\t\t\t\t\t\t<span>Primary table</span>\n\t\t\t\t\t\t\t{{ form.controls.table_color.value }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="preview-pulse"></div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class="section-grid">\n\t\t\t<div class="section-card glass-card animate-rise">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Experience preferences</h3>\n\t\t\t\t\t<p>Tune how the app greets you each day.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="field-grid">\n\t\t\t\t\t<label class="field-card">\n\t\t\t\t\t\t<div class="field-label">Collapsable menu</div>\n\t\t\t\t\t\t<p class="field-hint">Keep navigation cozy when you want focus.</p>\n\t\t\t\t\t\t<div class="toggle">\n\t\t\t\t\t\t\t<input class="toggle-input" type="checkbox" formControlName="collapsable_menu" />\n\t\t\t\t\t\t\t<span class="toggle-track">\n\t\t\t\t\t\t\t\t<span class="toggle-thumb"></span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<div class="toggle-state">\n\t\t\t\t\t\t\t\t@if (form.controls.collapsable_menu.value) {\n\t\t\t\t\t\t\t\t\tCompact\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\tOpen\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Default entries per page</div>\n\t\t\t\t\t\t<p class="field-hint">Pick your sweet spot for list density.</p>\n\t\t\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.entries_per_page.valid ? \'is-valid\' : \'is-invalid\']" formControlName="entries_per_page" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t\t\t<rio-option value="25">25</rio-option>\n\t\t\t\t\t\t\t\t\t<rio-option value="50">50</rio-option>\n\t\t\t\t\t\t\t\t\t<rio-option value="100">100</rio-option>\n\t\t\t\t\t\t\t\t\t<rio-option value="250">250</rio-option>\n\t\t\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t@if (!form.controls.entries_per_page.valid) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Entries per page is required</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Select search style</div>\n\t\t\t\t\t\t<p class="field-hint">Decide if typing should be fuzzy or exact.</p>\n\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.rio_select_search_mode.valid ? \'is-valid\' : \'is-invalid\']" formControlName="rio_select_search_mode" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t<rio-option value="fuzzy">Fuzzy (flexible matching)</rio-option>\n\t\t\t\t\t\t\t<rio-option value="exact">Exact (must contain the term)</rio-option>\n\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Font size</div>\n\t\t\t\t\t\t<p class="field-hint">We recommend between 11–14px for quick scanning.</p>\n\t\t\t\t\t\t<input class="input-bevel" [ngClass]="[form.controls.font_size.valid ? \'is-valid\' : \'is-invalid\']" type="number" formControlName="font_size" (keyup)="changePrimaryFontSize()" />\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'required\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size is required</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'wholeNumbersGreaterThanZero\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size is invalid</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'maxValue\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size can not exceed 18</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'minValue\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size can not be less than 8</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Week start (date picker)</div>\n\t\t\t\t\t\t<p class="field-hint">Pick where your planner begins.</p>\n\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.date_picker_day_start.valid ? \'is-valid\' : \'is-invalid\']" formControlName="date_picker_day_start" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t<rio-option [value]="\'S\'">Sunday</rio-option>\n\t\t\t\t\t\t\t<rio-option [value]="\'M\'">Monday</rio-option>\n\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t@if (form.controls.date_picker_day_start.hasError(\'required\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Week start is required</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Starting page</div>\n\t\t\t\t\t\t<p class="field-hint">Jump right into the view you love most.</p>\n\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.opening_route.valid ? \'is-valid\' : \'\']" formControlName="opening_route" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t<rio-option value="/home">Home</rio-option>\n\t\t\t\t\t\t\t@for (view of views; track view.display) {\n\t\t\t\t\t\t\t\t<rio-option [value]="view.value">{{ view.display | titleCase }}</rio-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t@if (client === \'Ace Completions\') {\n\t\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t\t<div class="field-label">Routing preference</div>\n\t\t\t\t\t\t\t<p class="field-hint">Decide how links open while you multitask.</p>\n\t\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.routing_preference.valid ? \'is-valid\' : \'\']" formControlName="routing_preference" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t\t<rio-option value="alwaysAsk">Always Ask</rio-option>\n\t\t\t\t\t\t\t\t<rio-option value="sameTab">Same Tab</rio-option>\n\t\t\t\t\t\t\t\t<rio-option value="newTab">New Tab</rio-option>\n\t\t\t\t\t\t\t\t<rio-option value="newWindow">New Window</rio-option>\n\t\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="section-card glass-card animate-rise">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Table palette</h3>\n\t\t\t\t\t<p>Pick vibrant layers for your data rows.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="palette-preview">\n\t\t\t\t\t<div class="preview-table">\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.table_color.value" [style.color]="form.controls.table_font_color.value">\n\t\t\t\t\t\t\tPrimary header\n\t\t\t\t\t\t\t<span>{{ form.controls.table_font_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.secondary_table_color.value" [style.color]="form.controls.secondary_table_font_color.value">\n\t\t\t\t\t\t\tSecondary header\n\t\t\t\t\t\t\t<span>{{ form.controls.secondary_table_font_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.tertiary_table_color.value" [style.color]="form.controls.tertiary_table_font_color.value">\n\t\t\t\t\t\t\tTertiary header\n\t\t\t\t\t\t\t<span>{{ form.controls.tertiary_table_font_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="preview-table">\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.warning_color.value" [style.color]="form.controls.warning_font_color.value">\n\t\t\t\t\t\t\tWarnings\n\t\t\t\t\t\t\t<span>{{ form.controls.warning_hover_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.success_color.value" [style.color]="form.controls.success_font_color.value">\n\t\t\t\t\t\t\tSuccess\n\t\t\t\t\t\t\t<span>{{ form.controls.success_hover_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.info_color.value" [style.color]="form.controls.info_font_color.value">\n\t\t\t\t\t\t\tInfo\n\t\t\t\t\t\t\t<span>{{ form.controls.info_hover_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="color-grid">\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary table background</div>\n\t\t\t\t\t\t\t<div class="field-hint">The hero row that anchors your data.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.table_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="table_color" (ngModelChange)="changePrimaryColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary table font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep it crisp and readable.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.table_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="table_font_color" (ngModelChange)="changePrimaryFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary table background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Great for supporting sections.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_table_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_table_color" (ngModelChange)="changeSecondaryColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary table font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Match contrast with the new hue.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_table_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_table_font_color" (ngModelChange)="changeSecondaryFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Tertiary table background</div>\n\t\t\t\t\t\t\t<div class="field-hint">For extra callouts.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.tertiary_table_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="tertiary_table_color" (ngModelChange)="changeTertiaryColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Tertiary table font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Balance brightness for legibility.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.tertiary_table_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="tertiary_table_font_color" (ngModelChange)="changeTertiaryFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="section-card glass-card animate-rise">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Button glow-up</h3>\n\t\t\t\t\t<p>Make clicks feel friendly and intentional.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="button-demo">\n\t\t\t\t\t<button type="button" class="btn btn-success">Success</button>\n\t\t\t\t\t<button type="button" class="btn btn-warning">Warning</button>\n\t\t\t\t\t<button type="button" class="btn btn-danger">Danger</button>\n\t\t\t\t\t<button type="button" class="btn btn-info">Info</button>\n\t\t\t\t\t<button type="button" class="btn btn-primary">Primary</button>\n\t\t\t\t\t<button type="button" class="btn btn-secondary">Secondary</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="color-grid">\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Success background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Celebrate wins.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.success_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="success_color" (ngModelChange)="changeSuccessColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Success font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep it sharp.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.success_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="success_font_color" (ngModelChange)="changeSuccessFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Success hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">How the button greets hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.success_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="success_hover_color" (ngModelChange)="changeSuccessHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Warning background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Gentle but visible.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.warning_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="warning_color" (ngModelChange)="changeWarningColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Warning font</div>\n\t\t\t\t\t\t\t<div class="field-hint">High contrast copy.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.warning_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="warning_font_color" (ngModelChange)="changeWarningFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Warning hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Add motion to caution.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.warning_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="warning_hover_color" (ngModelChange)="changeWarningHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Danger background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Clear stop signal.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.danger_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="danger_color" (ngModelChange)="changeDangerColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Danger font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Stay readable on alert.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.danger_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="danger_font_color" (ngModelChange)="changeDangerFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Danger hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Softer on hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.danger_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="danger_hover_color" (ngModelChange)="changeDangerHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Info background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Highlight helpful hints.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.info_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="info_color" (ngModelChange)="changeInfoColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Info font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep tips legible.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.info_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="info_font_color" (ngModelChange)="changeInfoFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Info hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Gentle motion on hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.info_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="info_hover_color" (ngModelChange)="changeInfoHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary background</div>\n\t\t\t\t\t\t\t<div class="field-hint">The hero action.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.primary_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="primary_color" (ngModelChange)="changePrimaryButtonColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Strong contrast for CTA.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.primary_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="primary_font_color" (ngModelChange)="changePrimaryButtonFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">A playful shift on hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.primary_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="primary_hover_color" (ngModelChange)="changePrimaryButtonHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Great for subtle actions.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_color" (ngModelChange)="changeSecondaryButtonColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep it balanced.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_font_color" (ngModelChange)="changeSecondaryButtonFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Add a soft glow.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_hover_color" (ngModelChange)="changeSecondaryHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="section-card glass-card animate-rise sticky-section-card">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Sticky select defaults</h3>\n\t\t\t\t\t<p>Teach ResolveIO which choices you love.</p>\n\t\t\t\t</div>\n\t\t\t\t@if (!stickySelects.length) {\n\t\t\t\t\t<div class="sticky-empty">\n\t\t\t\t\t\tNo sticky selects saved yet. Add a stickyKey on a select to remember your favorite defaults.\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@else {\n\t\t\t\t\t@for (sticky of stickySelects; track sticky.key) {\n\t\t\t\t\t\t<div class="field-card sticky-select-card">\n\t\t\t\t\t\t\t<div class="field-label">{{ sticky.key }}</div>\n\t\t\t\t\t\t\t@if (sticky.options && sticky.options.length) {\n\t\t\t\t\t\t\t\t<rio-select\n\t\t\t\t\t\t\t\t\t[(ngModel)]="stickySelections[sticky.key]"\n\t\t\t\t\t\t\t\t\t[ngModelOptions]="{standalone: true}"\n\t\t\t\t\t\t\t\t\t[options]="sticky.options"\n\t\t\t\t\t\t\t\t\toptionValueKey="value"\n\t\t\t\t\t\t\t\t\toptionLabelKey="label"\n\t\t\t\t\t\t\t\t\t[searchable]="false"\n\t\t\t\t\t\t\t\t\tappendTo="body"\n\t\t\t\t\t\t\t\t\t[stickyAutoSave]="true"\n\t\t\t\t\t\t\t\t\t(ngModelChange)="updateStickyDefault(sticky.key, $event)">\n\t\t\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (!sticky.options || !sticky.options.length) {\n\t\t\t\t\t\t\t\t<div class="text-muted">No saved options yet.</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t</form>\n</div>\n',styles:['.sticky-section-card,.sticky-section-card *{transform:none!important}:host{display:block}::ng-deep :root{--primary-table-color: #3b3ee3;--primary-table-font-color: #ffffff;--font-size: 12px;--secondary-table-color: #87ceeb;--secondary-table-font-color: #000000;--tertiary-table-color: #ff4500;--tertiary-table-font-color: #000000;--warning-color: #ffc107;--warning-font-color: #000000;--warning-hover-color: #e0a800;--warning-shadow-color: 0 0 0 .2rem rgba(222, 170, 12, .5);--success-color: #28a745;--success-font-color: #ffffff;--success-hover-color: #218838;--success-shadow-color: 0 0 0 .2rem rgba(72, 180, 97, .5);--danger-color: #dc3545;--danger-font-color: #ffffff;--danger-hover-color: #c82333;--danger-shadow-color: 0 0 0 .2rem rgba(225, 83, 97, .5);--info-color: #17a2b8;--info-font-color: #ffffff;--info-hover-color: #138496;--info-shadow-color: 0 0 0 .2rem rgba(58, 176, 195, .5);--primary-color: #007bff;--primary-font-color: #ffffff;--primary-hover-color: #0069d9;--primary-shadow-color: 0 0 0 .2rem rgba(38, 143, 255, .5);--secondary-color: #868e96;--secondary-font-color: #ffffff;--secondary-hover-color: #5a6268;--secondary-shadow-color: 0 0 0 .2rem rgba(130, 138, 145, .5)}.settings-shell{position:relative;overflow:visible;padding:12px 8px 32px;background:radial-gradient(circle at 15% 20%,rgba(111,136,255,.12),transparent 35%),radial-gradient(circle at 80% 0%,rgba(255,130,92,.12),transparent 32%),linear-gradient(135deg,#f7f9ff,#fff 60%,#f5f7fb)}.aurora{position:absolute;width:420px;height:420px;border-radius:50%;filter:blur(70px);opacity:.55;mix-blend-mode:screen;animation:drift 18s ease-in-out infinite alternate;z-index:0}.aurora.aurora-one{background:radial-gradient(circle,#52a3ffb3,#8678ff40);top:-120px;left:-70px}.aurora.aurora-two{background:radial-gradient(circle,#ff935c99,#ffe3bb59);bottom:-140px;right:-40px;animation-duration:22s}.settings-hero{position:relative;z-index:1;display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px;align-items:center;margin-bottom:18px}.glass-card{position:relative;background:#ffffffc7;border:1px solid rgba(255,255,255,.55);box-shadow:0 10px 40px #364a7824,inset 0 0 0 1px #ffffff52;border-radius:18px;padding:18px;overflow:hidden}.glass-card:before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:0}.hero-main h2{font-weight:800;font-size:26px;margin-bottom:8px;color:#0f172a}.hero-main p{color:#4b5563;margin-bottom:12px}.hero-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;font-weight:700;color:#1f2937;background:linear-gradient(120deg,#6366f11a,#10b9811a,#3b82f61f);border:1px solid rgba(99,102,241,.25);margin-bottom:10px;text-transform:uppercase;letter-spacing:.04em;font-size:12px}.hero-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:12px}.neon-btn{position:relative;border:1px solid rgba(15,23,42,.1);background:linear-gradient(120deg,#6366f126,#3b82f614);color:#0f172a;font-weight:700;padding:10px 16px;border-radius:12px;box-shadow:0 10px 24px #6366f126;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}.neon-btn:hover{transform:translateY(-2px);border-color:#6366f173;box-shadow:0 14px 26px #6366f138}.save-button form-button ::ng-deep button{border-radius:12px;font-weight:800;letter-spacing:.01em;padding:11px 18px;box-shadow:0 10px 26px #10b9813d}.hero-preview{position:relative}.preview-card{border-radius:16px;padding:16px;background:radial-gradient(circle at 20% 20%,#ffffffb3,#ffffff85);box-shadow:inset 0 1px #fffc,0 12px 30px #506eb929;border:1px solid rgba(255,255,255,.6)}.preview-title{font-weight:800;margin-bottom:8px;color:#111827}.swatch-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}.swatch{border-radius:12px;padding:10px;color:#0f172a;font-weight:700;display:flex;align-items:center;justify-content:space-between;box-shadow:inset 0 1px #ffffff73;opacity:.98}.swatch span{font-size:12px;font-weight:600;color:#0f172ad9}.preview-pulse{position:absolute;width:120px;height:120px;border-radius:50%;background:radial-gradient(circle,rgba(16,185,129,.3),transparent 60%);bottom:-18px;right:-14px;filter:blur(12px);animation:pulse 2.4s ease-in-out infinite}.hero-metrics{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.metric-pill{background:#0f172a0f;border:1px solid rgba(15,23,42,.08);border-radius:999px;padding:8px 12px;font-weight:700;color:#0f172a;display:inline-flex;align-items:center;gap:6px}.section-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px;position:relative;z-index:1}.section-card{position:relative;overflow:visible}.section-heading{margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.section-heading h3{margin:0;font-weight:800;color:#0f172a}.section-heading p{margin:0;color:#4b5563}.field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.field-card{padding:12px;border-radius:14px;border:1px solid rgba(15,23,42,.06);background:#ffffffd9;box-shadow:inset 0 1px #ffffffb3;transition:transform .2s ease,box-shadow .2s ease}.field-card:hover{box-shadow:0 8px 22px #6366f11f}.sticky-select-card:hover{transform:none}.sticky-section-card{animation:none;transform:none}.field-label{font-weight:700;color:#111827;margin-bottom:4px;display:flex;align-items:center;justify-content:space-between;gap:6px}.field-hint{font-size:12px;color:#6b7280;margin:0}.input-bevel{border-radius:12px;border:1px solid rgba(15,23,42,.1);background:#ffffffeb;box-shadow:inset 0 1px #fffc;padding:10px 12px;width:100%}.toggle{display:flex;align-items:center;gap:8px}.toggle-input{display:none}.toggle-track{width:54px;height:30px;border-radius:999px;background:linear-gradient(120deg,#0f172a14,#0f172a26);position:relative;box-shadow:inset 0 1px #fff9;border:1px solid rgba(15,23,42,.12);transition:background .2s ease}.toggle-thumb{position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:linear-gradient(135deg,#63a4ff,#83eaf1);box-shadow:0 8px 16px #6366f159;transition:transform .2s ease}.toggle-input:checked+.toggle-track{background:linear-gradient(120deg,#10b98126,#34d39940);border-color:#10b98173}.toggle-input:checked+.toggle-track .toggle-thumb{transform:translate(24px);background:linear-gradient(135deg,#10b981,#22d3ee);box-shadow:0 10px 18px #10b98152}.toggle-state{font-weight:700;color:#0f172a}.color-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px;margin-top:10px}.color-card{border-radius:14px;padding:12px;border:1px solid rgba(15,23,42,.06);background:#ffffffe6;display:grid;grid-template-columns:1fr 120px;gap:10px;align-items:center}.color-chip{display:flex;flex-direction:column;gap:4px}.color-name{font-weight:700;color:#0f172a}.color-preview{border-radius:12px;height:48px;border:1px solid rgba(15,23,42,.08);box-shadow:inset 0 1px #ffffffb3}.color-input{height:48px;border:1px solid rgba(15,23,42,.08);border-radius:12px;box-shadow:inset 0 1px #ffffffbf;width:100%;cursor:pointer}.palette-preview{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin-bottom:8px}.preview-table{border-radius:12px;padding:10px;background:linear-gradient(160deg,#ffffffd9,#ffffffb3);border:1px solid rgba(15,23,42,.08);box-shadow:inset 0 1px #fffc}.preview-table .row-swatch{border-radius:10px;padding:10px;font-weight:700;margin-bottom:6px;display:flex;align-items:center;justify-content:space-between;box-shadow:inset 0 1px #fff9}.preview-table .row-swatch:last-child{margin-bottom:0}.button-demo{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}.btn-warning{color:var(--warning-font-color);background-color:var(--warning-color);border-color:var(--warning-color)}.btn-warning:focus,.btn-warning.focus{box-shadow:var(--warning-shadow-color)}.btn-warning:hover{color:var(--warning-font-color);background-color:var(--warning-hover-color);border-color:var(--warning-hover-color)}.btn-success{color:var(--success-font-color);background-color:var(--success-color);border-color:var(--success-color)}.btn-success:focus,.btn-success.focus{box-shadow:var(--success-shadow-color)}.btn-success:hover{color:var(--success-font-color);background-color:var(--success-hover-color);border-color:var(--success-hover-color)}.btn-danger{color:var(--danger-font-color);background-color:var(--danger-color);border-color:var(--danger-color)}.btn-danger:focus,.btn-danger.focus{box-shadow:var(--danger-shadow-color)}.btn-danger:hover{color:var(--danger-font-color);background-color:var(--danger-hover-color);border-color:var(--danger-hover-color)}.btn-info{color:var(--info-font-color);background-color:var(--info-color);border-color:var(--info-color)}.btn-info:focus,.btn-info.focus{box-shadow:var(--info-shadow-color)}.btn-info:hover{color:var(--info-font-color);background-color:var(--info-hover-color);border-color:var(--info-hover-color)}.btn-primary{color:var(--primary-font-color);background-color:var(--primary-color);border-color:var(--primary-color)}.btn-primary:focus,.btn-primary.focus{box-shadow:var(--primary-shadow-color)}.btn-primary:hover{color:var(--primary-font-color);background-color:var(--primary-hover-color);border-color:var(--primary-hover-color)}.btn-secondary{color:var(--secondary-font-color);background-color:var(--secondary-color);border-color:var(--secondary-color)}.btn-secondary:focus,.btn-secondary.focus{box-shadow:var(--secondary-shadow-color)}.btn-secondary:hover{color:var(--secondary-font-color);background-color:var(--secondary-hover-color);border-color:var(--secondary-hover-color)}.rio-select .rio-select-container{border-radius:12px!important;min-height:42px!important;border-color:#0f172a1a!important;box-shadow:inset 0 1px #ffffffb3}.sticky-empty{background:#17a2b81f;color:#0f4c75;border:1px solid rgba(23,162,184,.2);border-radius:12px;padding:12px}.animate-rise{animation:rise .5s ease}@keyframes drift{0%{transform:translateY(0) translate(0)}to{transform:translateY(-30px) translate(20px)}}@keyframes pulse{0%{transform:scale(1);opacity:.6}50%{transform:scale(1.08);opacity:.9}to{transform:scale(1);opacity:.6}}@keyframes rise{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}\n'],dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:i2.CheckboxControlValueAccessor,selector:"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"component",type:FormButtonComponent,selector:"form-button",inputs:["form","disabled","type"]},{kind:"component",type:i5.RioSelectComponent,selector:"rio-select",inputs:["placeholder","multiple","panelMaxHeight","panelMaxViewportRatio","optionHeight","virtualBuffer","overlayZIndex","autoSizePanel","panelPosition","autoCenterPanel","viewportMargin","panelWidth","panelFullscreenWidth","clearable","templateLabelFromView","searchable","searchMatchMode","defaultSearch","textWrap","compareWith","options","optionLabelKey","optionLabelFn","optionValueKey","optionDisabledKey","optionIdKey","optionGroupKey","disabled","emitOptionObject","debugLog","stickyKey","stickyAutoSave"],outputs:["change"]},{kind:"component",type:i5.RioOptionComponent,selector:"rio-option",inputs:["value","disabled","label","id"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"pipe",type:TitleCaseAndUnderscorePipe,name:"titleCase"}]})}function hexToRGB(t,e){let n=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),r=parseInt(t.slice(5,7),16);return e?"rgba("+n+", "+o+", "+r+", "+e+")":"rgb("+n+", "+o+", "+r+")"}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UsersSettingsComponent,decorators:[{type:Component,args:[{selector:"resolveio-users-settings",providers:[ProviderService],standalone:!1,template:'<style>\n\t.sticky-section-card,\n\t.sticky-section-card * {\n\t\ttransform: none !important;\n\t}\n\n\t:host {\n\t\tdisplay: block;\n\t}\n\n\t::ng-deep :root {\n\t\t--primary-table-color: #3b3ee3;\n\t\t--primary-table-font-color: #ffffff;\n\t\t--font-size: 12px;\n\t\t--secondary-table-color: #87ceeb;\n\t\t--secondary-table-font-color: #000000;\n\t\t--tertiary-table-color: #ff4500;\n\t\t--tertiary-table-font-color: #000000;\n\t\t--warning-color: #ffc107;\n\t\t--warning-font-color: #000000;\n\t\t--warning-hover-color: #e0a800;\n\t\t--warning-shadow-color: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);\n\t\t--success-color: #28a745;\n\t\t--success-font-color: #ffffff;\n\t\t--success-hover-color: #218838;\n\t\t--success-shadow-color: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);\n\t\t--danger-color: #dc3545;\n\t\t--danger-font-color: #ffffff;\n\t\t--danger-hover-color: #c82333;\n\t\t--danger-shadow-color: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);\n\t\t--info-color: #17a2b8;\n\t\t--info-font-color: #ffffff;\n\t\t--info-hover-color: #138496;\n\t\t--info-shadow-color: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);\n\t\t--primary-color: #007bff;\n\t\t--primary-font-color: #ffffff;\n\t\t--primary-hover-color: #0069d9;\n\t\t--primary-shadow-color: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);\n\t\t--secondary-color: #868e96;\n\t\t--secondary-font-color: #ffffff;\n\t\t--secondary-hover-color: #5a6268;\n\t\t--secondary-shadow-color: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);\n\t}\n\n\t.settings-shell {\n\t\tposition: relative;\n\t\toverflow: visible;\n\t\tpadding: 12px 8px 32px;\n\t\tbackground: radial-gradient(circle at 15% 20%, rgba(111, 136, 255, 0.12), transparent 35%),\n\t\t\tradial-gradient(circle at 80% 0%, rgba(255, 130, 92, 0.12), transparent 32%),\n\t\t\tlinear-gradient(135deg, #f7f9ff 0%, #ffffff 60%, #f5f7fb 100%);\n\t}\n\n\t.aurora {\n\t\tposition: absolute;\n\t\twidth: 420px;\n\t\theight: 420px;\n\t\tborder-radius: 50%;\n\t\tfilter: blur(70px);\n\t\topacity: .55;\n\t\tmix-blend-mode: screen;\n\t\tanimation: drift 18s ease-in-out infinite alternate;\n\t\tz-index: 0;\n\t}\n\n\t.aurora.aurora-one {\n\t\tbackground: radial-gradient(circle, rgba(82, 163, 255, .7), rgba(134, 120, 255, .25));\n\t\ttop: -120px;\n\t\tleft: -70px;\n\t}\n\n\t.aurora.aurora-two {\n\t\tbackground: radial-gradient(circle, rgba(255, 147, 92, .6), rgba(255, 227, 187, .35));\n\t\tbottom: -140px;\n\t\tright: -40px;\n\t\tanimation-duration: 22s;\n\t}\n\n\t.settings-hero {\n\t\tposition: relative;\n\t\tz-index: 1;\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(320px, 1fr));\n\t\tgap: 16px;\n\t\talign-items: center;\n\t\tmargin-bottom: 18px;\n\t}\n\n\t.glass-card {\n\t\tposition: relative;\n\t\tbackground: rgba(255, 255, 255, .78);\n\t\tborder: 1px solid rgba(255, 255, 255, .55);\n\t\tbox-shadow: 0 10px 40px rgba(54, 74, 120, .14), inset 0 0 0 1px rgba(255, 255, 255, .32);\n\t\tborder-radius: 18px;\n\t\tpadding: 18px;\n\t\toverflow: hidden;\n\t}\n\n\t.glass-card::before {\n\t\tcontent: \'\';\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder-radius: inherit;\n\t\tpointer-events: none;\n\t\tz-index: 0;\n\t}\n\n\t.hero-main h2 {\n\t\tfont-weight: 800;\n\t\tfont-size: 26px;\n\t\tmargin-bottom: 8px;\n\t\tcolor: #0f172a;\n\t}\n\n\t.hero-main p {\n\t\tcolor: #4b5563;\n\t\tmargin-bottom: 12px;\n\t}\n\n\t.hero-chip {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tgap: 6px;\n\t\tpadding: 6px 12px;\n\t\tborder-radius: 999px;\n\t\tfont-weight: 700;\n\t\tcolor: #1f2937;\n\t\tbackground: linear-gradient(120deg, rgba(99, 102, 241, .1), rgba(16, 185, 129, .1), rgba(59, 130, 246, .12));\n\t\tborder: 1px solid rgba(99, 102, 241, .25);\n\t\tmargin-bottom: 10px;\n\t\ttext-transform: uppercase;\n\t\tletter-spacing: .04em;\n\t\tfont-size: 12px;\n\t}\n\n\t.hero-actions {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 12px;\n\t\talign-items: center;\n\t\tmargin-top: 12px;\n\t}\n\n\t.neon-btn {\n\t\tposition: relative;\n\t\tborder: 1px solid rgba(15, 23, 42, .1);\n\t\tbackground: linear-gradient(120deg, rgba(99, 102, 241, .15), rgba(59, 130, 246, .08));\n\t\tcolor: #0f172a;\n\t\tfont-weight: 700;\n\t\tpadding: 10px 16px;\n\t\tborder-radius: 12px;\n\t\tbox-shadow: 0 10px 24px rgba(99, 102, 241, .15);\n\t\ttransition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;\n\t}\n\n\t.neon-btn:hover {\n\t\ttransform: translateY(-2px);\n\t\tborder-color: rgba(99, 102, 241, .45);\n\t\tbox-shadow: 0 14px 26px rgba(99, 102, 241, .22);\n\t}\n\n\t.save-button form-button ::ng-deep button {\n\t\tborder-radius: 12px;\n\t\tfont-weight: 800;\n\t\tletter-spacing: .01em;\n\t\tpadding: 11px 18px;\n\t\tbox-shadow: 0 10px 26px rgba(16, 185, 129, .24);\n\t}\n\n\t.hero-preview {\n\t\tposition: relative;\n\t}\n\n\t.preview-card {\n\t\tborder-radius: 16px;\n\t\tpadding: 16px;\n\t\tbackground: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .7), rgba(255, 255, 255, .52));\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 12px 30px rgba(80, 110, 185, .16);\n\t\tborder: 1px solid rgba(255, 255, 255, .6);\n\t}\n\n\t.preview-title {\n\t\tfont-weight: 800;\n\t\tmargin-bottom: 8px;\n\t\tcolor: #111827;\n\t}\n\n\t.swatch-row {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(140px, 1fr));\n\t\tgap: 10px;\n\t}\n\n\t.swatch {\n\t\tborder-radius: 12px;\n\t\tpadding: 10px;\n\t\tcolor: #0f172a;\n\t\tfont-weight: 700;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);\n\t\topacity: .98;\n\t}\n\n\t.swatch span {\n\t\tfont-size: 12px;\n\t\tfont-weight: 600;\n\t\tcolor: rgba(15, 23, 42, .85);\n\t}\n\n\t.preview-pulse {\n\t\tposition: absolute;\n\t\twidth: 120px;\n\t\theight: 120px;\n\t\tborder-radius: 50%;\n\t\tbackground: radial-gradient(circle, rgba(16, 185, 129, .3), transparent 60%);\n\t\tbottom: -18px;\n\t\tright: -14px;\n\t\tfilter: blur(12px);\n\t\tanimation: pulse 2.4s ease-in-out infinite;\n\t}\n\n\t.hero-metrics {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 8px;\n\t\tmargin-top: 14px;\n\t}\n\n\t.metric-pill {\n\t\tbackground: rgba(15, 23, 42, .06);\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tborder-radius: 999px;\n\t\tpadding: 8px 12px;\n\t\tfont-weight: 700;\n\t\tcolor: #0f172a;\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tgap: 6px;\n\t}\n\n\t.section-grid {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(320px, 1fr));\n\t\tgap: 14px;\n\t\tposition: relative;\n\t\tz-index: 1;\n\t}\n\n\t.section-card {\n\t\tposition: relative;\n\t\toverflow: visible;\n\t}\n\n\t.section-heading {\n\t\tmargin-bottom: 12px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tgap: 10px;\n\t\tflex-wrap: wrap;\n\t}\n\n\t.section-heading h3 {\n\t\tmargin: 0;\n\t\tfont-weight: 800;\n\t\tcolor: #0f172a;\n\t}\n\n\t.section-heading p {\n\t\tmargin: 0;\n\t\tcolor: #4b5563;\n\t}\n\n\t.field-grid {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n\t\tgap: 12px;\n\t}\n\n\t.field-card {\n\t\tpadding: 12px;\n\t\tborder-radius: 14px;\n\t\tborder: 1px solid rgba(15, 23, 42, .06);\n\t\tbackground: rgba(255, 255, 255, .85);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);\n\t\ttransition: transform .2s ease, box-shadow .2s ease;\n\t}\n\n\t.field-card:hover {\n\t\tbox-shadow: 0 8px 22px rgba(99, 102, 241, .12);\n\t}\n\n\t/* Avoid transforming the sticky select card so the fixed overlay positions correctly. */\n\t.sticky-select-card:hover {\n\t\ttransform: none;\n\t}\n\n\t.sticky-section-card {\n\t\tanimation: none;\n\t\ttransform: none;\n\t}\n\n\t.field-label {\n\t\tfont-weight: 700;\n\t\tcolor: #111827;\n\t\tmargin-bottom: 4px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tgap: 6px;\n\t}\n\n\t.field-hint {\n\t\tfont-size: 12px;\n\t\tcolor: #6b7280;\n\t\tmargin: 0;\n\t}\n\n\t.input-bevel {\n\t\tborder-radius: 12px;\n\t\tborder: 1px solid rgba(15, 23, 42, .1);\n\t\tbackground: rgba(255, 255, 255, .92);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);\n\t\tpadding: 10px 12px;\n\t\twidth: 100%;\n\t}\n\n\t.toggle {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: 8px;\n\t}\n\n\t.toggle-input {\n\t\tdisplay: none;\n\t}\n\n\t.toggle-track {\n\t\twidth: 54px;\n\t\theight: 30px;\n\t\tborder-radius: 999px;\n\t\tbackground: linear-gradient(120deg, rgba(15, 23, 42, .08), rgba(15, 23, 42, .15));\n\t\tposition: relative;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);\n\t\tborder: 1px solid rgba(15, 23, 42, .12);\n\t\ttransition: background .2s ease;\n\t}\n\n\t.toggle-thumb {\n\t\tposition: absolute;\n\t\ttop: 3px;\n\t\tleft: 3px;\n\t\twidth: 24px;\n\t\theight: 24px;\n\t\tborder-radius: 50%;\n\t\tbackground: linear-gradient(135deg, #63a4ff, #83eaf1);\n\t\tbox-shadow: 0 8px 16px rgba(99, 102, 241, .35);\n\t\ttransition: transform .2s ease;\n\t}\n\n\t.toggle-input:checked + .toggle-track {\n\t\tbackground: linear-gradient(120deg, rgba(16, 185, 129, .15), rgba(52, 211, 153, .25));\n\t\tborder-color: rgba(16, 185, 129, .45);\n\t}\n\n\t.toggle-input:checked + .toggle-track .toggle-thumb {\n\t\ttransform: translateX(24px);\n\t\tbackground: linear-gradient(135deg, #10b981, #22d3ee);\n\t\tbox-shadow: 0 10px 18px rgba(16, 185, 129, .32);\n\t}\n\n\t.toggle-state {\n\t\tfont-weight: 700;\n\t\tcolor: #0f172a;\n\t}\n\n\t.color-grid {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(260px, 1fr));\n\t\tgap: 10px;\n\t\tmargin-top: 10px;\n\t}\n\n\t.color-card {\n\t\tborder-radius: 14px;\n\t\tpadding: 12px;\n\t\tborder: 1px solid rgba(15, 23, 42, .06);\n\t\tbackground: rgba(255, 255, 255, .9);\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr 120px;\n\t\tgap: 10px;\n\t\talign-items: center;\n\t}\n\n\t.color-chip {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 4px;\n\t}\n\n\t.color-name {\n\t\tfont-weight: 700;\n\t\tcolor: #0f172a;\n\t}\n\n\t.color-preview {\n\t\tborder-radius: 12px;\n\t\theight: 48px;\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);\n\t}\n\n\t.color-input {\n\t\theight: 48px;\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tborder-radius: 12px;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);\n\t\twidth: 100%;\n\t\tcursor: pointer;\n\t}\n\n\t.palette-preview {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\t\tgap: 10px;\n\t\tmargin-bottom: 8px;\n\t}\n\n\t.preview-table {\n\t\tborder-radius: 12px;\n\t\tpadding: 10px;\n\t\tbackground: linear-gradient(160deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .7));\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);\n\t}\n\n\t.preview-table .row-swatch {\n\t\tborder-radius: 10px;\n\t\tpadding: 10px;\n\t\tfont-weight: 700;\n\t\tmargin-bottom: 6px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);\n\t}\n\n\t.preview-table .row-swatch:last-child {\n\t\tmargin-bottom: 0;\n\t}\n\n\t.button-demo {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 8px;\n\t\tmargin-bottom: 10px;\n\t}\n\n\t.btn-warning {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-color);\n\t\tborder-color: var(--warning-color);\n\t}\n\n\t.btn-warning:focus,\n\t.btn-warning.focus {\n\t\tbox-shadow: var(--warning-shadow-color);\n\t}\n\n\t.btn-warning:hover {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-hover-color);\n\t\tborder-color: var(--warning-hover-color);\n\t}\n\n\t.btn-success {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-color);\n\t\tborder-color: var(--success-color);\n\t}\n\n\t.btn-success:focus,\n\t.btn-success.focus {\n\t\tbox-shadow: var(--success-shadow-color);\n\t}\n\n\t.btn-success:hover {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-hover-color);\n\t\tborder-color: var(--success-hover-color);\n\t}\n\n\t.btn-danger {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-color);\n\t\tborder-color: var(--danger-color);\n\t}\n\n\t.btn-danger:focus,\n\t.btn-danger.focus {\n\t\tbox-shadow: var(--danger-shadow-color);\n\t}\n\n\t.btn-danger:hover {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-hover-color);\n\t\tborder-color: var(--danger-hover-color);\n\t}\n\n\t.btn-info {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-color);\n\t\tborder-color: var(--info-color);\n\t}\n\n\t.btn-info:focus,\n\t.btn-info.focus {\n\t\tbox-shadow: var(--info-shadow-color);\n\t}\n\n\t.btn-info:hover {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-hover-color);\n\t\tborder-color: var(--info-hover-color);\n\t}\n\n\t.btn-primary {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-color);\n\t\tborder-color: var(--primary-color);\n\t}\n\n\t.btn-primary:focus,\n\t.btn-primary.focus {\n\t\tbox-shadow: var(--primary-shadow-color);\n\t}\n\n\t.btn-primary:hover {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-hover-color);\n\t\tborder-color: var(--primary-hover-color);\n\t}\n\n\t.btn-secondary {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-color);\n\t\tborder-color: var(--secondary-color);\n\t}\n\n\t.btn-secondary:focus,\n\t.btn-secondary.focus {\n\t\tbox-shadow: var(--secondary-shadow-color);\n\t}\n\n\t.btn-secondary:hover {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-hover-color);\n\t\tborder-color: var(--secondary-hover-color);\n\t}\n\n\t.rio-select .rio-select-container {\n\t\tborder-radius: 12px !important;\n\t\tmin-height: 42px !important;\n\t\tborder-color: rgba(15, 23, 42, .1) !important;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);\n\t}\n\n\t.sticky-empty {\n\t\tbackground: rgba(23, 162, 184, .12);\n\t\tcolor: #0f4c75;\n\t\tborder: 1px solid rgba(23, 162, 184, .2);\n\t\tborder-radius: 12px;\n\t\tpadding: 12px;\n\t}\n\n\t.animate-rise {\n\t\tanimation: rise .5s ease;\n\t}\n\n\t@keyframes drift {\n\t\tfrom {\n\t\t\ttransform: translateY(0) translateX(0);\n\t\t}\n\t\tto {\n\t\t\ttransform: translateY(-30px) translateX(20px);\n\t\t}\n\t}\n\n\t@keyframes pulse {\n\t\t0% {\n\t\t\ttransform: scale(1);\n\t\t\topacity: .6;\n\t\t}\n\t\t50% {\n\t\t\ttransform: scale(1.08);\n\t\t\topacity: .9;\n\t\t}\n\t\t100% {\n\t\t\ttransform: scale(1);\n\t\t\topacity: .6;\n\t\t}\n\t}\n\n\t@keyframes rise {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: translateY(12px);\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t\ttransform: translateY(0);\n\t\t}\n\t}\n</style>\n\n<div class="settings-shell">\n\t<div class="aurora aurora-one"></div>\n\t<div class="aurora aurora-two"></div>\n\t<form [formGroup]="form" novalidate (ngSubmit)="submitForm(form)">\n\t\t<div class="settings-hero glass-card animate-rise">\n\t\t\t<div class="hero-main">\n\t\t\t\t<div class="hero-chip">User Settings</div>\n\t\t\t\t<h2>Welcome {{ user?.fullname || user?.username || user?.email || \'back\' }}!</h2>\n\t\t\t\t<p>Shape {{ client || \'your workspace\' }} into something joyful, colorful and uniquely you.</p>\n\t\t\t\t<div class="hero-actions">\n\t\t\t\t\t<button type="button" class="neon-btn" (click)="reset()">Reset to defaults</button>\n\t\t\t\t\t<div class="save-button">\n\t\t\t\t\t\t<form-button [form]="form" [disabled]="disableFormButton"></form-button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="hero-metrics">\n\t\t\t\t\t<div class="metric-pill">\n\t\t\t\t\t\t<span>Entries / page</span>\n\t\t\t\t\t\t<strong>{{ form.controls.entries_per_page.value }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="metric-pill">\n\t\t\t\t\t\t<span>Font size</span>\n\t\t\t\t\t\t<strong>{{ form.controls.font_size.value }}px</strong>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="metric-pill">\n\t\t\t\t\t\t<span>Week starts</span>\n\t\t\t\t\t\t<strong>{{ form.controls.date_picker_day_start.value === \'M\' ? \'Monday\' : \'Sunday\' }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="hero-preview">\n\t\t\t\t<div class="preview-card">\n\t\t\t\t\t<div class="preview-title">Live palette peek</div>\n\t\t\t\t\t<div class="swatch-row">\n\t\t\t\t\t\t<div class="swatch" [style.background]="form.controls.primary_color.value" [style.color]="form.controls.primary_font_color.value">\n\t\t\t\t\t\t\t<span>Primary buttons</span>\n\t\t\t\t\t\t\t{{ form.controls.primary_color.value }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="swatch" [style.background]="form.controls.success_color.value" [style.color]="form.controls.success_font_color.value">\n\t\t\t\t\t\t\t<span>Success tone</span>\n\t\t\t\t\t\t\t{{ form.controls.success_color.value }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="swatch" [style.background]="form.controls.table_color.value" [style.color]="form.controls.table_font_color.value">\n\t\t\t\t\t\t\t<span>Primary table</span>\n\t\t\t\t\t\t\t{{ form.controls.table_color.value }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="preview-pulse"></div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class="section-grid">\n\t\t\t<div class="section-card glass-card animate-rise">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Experience preferences</h3>\n\t\t\t\t\t<p>Tune how the app greets you each day.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="field-grid">\n\t\t\t\t\t<label class="field-card">\n\t\t\t\t\t\t<div class="field-label">Collapsable menu</div>\n\t\t\t\t\t\t<p class="field-hint">Keep navigation cozy when you want focus.</p>\n\t\t\t\t\t\t<div class="toggle">\n\t\t\t\t\t\t\t<input class="toggle-input" type="checkbox" formControlName="collapsable_menu" />\n\t\t\t\t\t\t\t<span class="toggle-track">\n\t\t\t\t\t\t\t\t<span class="toggle-thumb"></span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<div class="toggle-state">\n\t\t\t\t\t\t\t\t@if (form.controls.collapsable_menu.value) {\n\t\t\t\t\t\t\t\t\tCompact\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\tOpen\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Default entries per page</div>\n\t\t\t\t\t\t<p class="field-hint">Pick your sweet spot for list density.</p>\n\t\t\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.entries_per_page.valid ? \'is-valid\' : \'is-invalid\']" formControlName="entries_per_page" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t\t\t<rio-option value="25">25</rio-option>\n\t\t\t\t\t\t\t\t\t<rio-option value="50">50</rio-option>\n\t\t\t\t\t\t\t\t\t<rio-option value="100">100</rio-option>\n\t\t\t\t\t\t\t\t\t<rio-option value="250">250</rio-option>\n\t\t\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t@if (!form.controls.entries_per_page.valid) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Entries per page is required</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Select search style</div>\n\t\t\t\t\t\t<p class="field-hint">Decide if typing should be fuzzy or exact.</p>\n\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.rio_select_search_mode.valid ? \'is-valid\' : \'is-invalid\']" formControlName="rio_select_search_mode" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t<rio-option value="fuzzy">Fuzzy (flexible matching)</rio-option>\n\t\t\t\t\t\t\t<rio-option value="exact">Exact (must contain the term)</rio-option>\n\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Font size</div>\n\t\t\t\t\t\t<p class="field-hint">We recommend between 11–14px for quick scanning.</p>\n\t\t\t\t\t\t<input class="input-bevel" [ngClass]="[form.controls.font_size.valid ? \'is-valid\' : \'is-invalid\']" type="number" formControlName="font_size" (keyup)="changePrimaryFontSize()" />\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'required\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size is required</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'wholeNumbersGreaterThanZero\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size is invalid</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'maxValue\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size can not exceed 18</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'minValue\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size can not be less than 8</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Week start (date picker)</div>\n\t\t\t\t\t\t<p class="field-hint">Pick where your planner begins.</p>\n\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.date_picker_day_start.valid ? \'is-valid\' : \'is-invalid\']" formControlName="date_picker_day_start" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t<rio-option [value]="\'S\'">Sunday</rio-option>\n\t\t\t\t\t\t\t<rio-option [value]="\'M\'">Monday</rio-option>\n\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t@if (form.controls.date_picker_day_start.hasError(\'required\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Week start is required</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Starting page</div>\n\t\t\t\t\t\t<p class="field-hint">Jump right into the view you love most.</p>\n\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.opening_route.valid ? \'is-valid\' : \'\']" formControlName="opening_route" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t<rio-option value="/home">Home</rio-option>\n\t\t\t\t\t\t\t@for (view of views; track view.display) {\n\t\t\t\t\t\t\t\t<rio-option [value]="view.value">{{ view.display | titleCase }}</rio-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t@if (client === \'Ace Completions\') {\n\t\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t\t<div class="field-label">Routing preference</div>\n\t\t\t\t\t\t\t<p class="field-hint">Decide how links open while you multitask.</p>\n\t\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.routing_preference.valid ? \'is-valid\' : \'\']" formControlName="routing_preference" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t\t<rio-option value="alwaysAsk">Always Ask</rio-option>\n\t\t\t\t\t\t\t\t<rio-option value="sameTab">Same Tab</rio-option>\n\t\t\t\t\t\t\t\t<rio-option value="newTab">New Tab</rio-option>\n\t\t\t\t\t\t\t\t<rio-option value="newWindow">New Window</rio-option>\n\t\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="section-card glass-card animate-rise">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Table palette</h3>\n\t\t\t\t\t<p>Pick vibrant layers for your data rows.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="palette-preview">\n\t\t\t\t\t<div class="preview-table">\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.table_color.value" [style.color]="form.controls.table_font_color.value">\n\t\t\t\t\t\t\tPrimary header\n\t\t\t\t\t\t\t<span>{{ form.controls.table_font_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.secondary_table_color.value" [style.color]="form.controls.secondary_table_font_color.value">\n\t\t\t\t\t\t\tSecondary header\n\t\t\t\t\t\t\t<span>{{ form.controls.secondary_table_font_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.tertiary_table_color.value" [style.color]="form.controls.tertiary_table_font_color.value">\n\t\t\t\t\t\t\tTertiary header\n\t\t\t\t\t\t\t<span>{{ form.controls.tertiary_table_font_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="preview-table">\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.warning_color.value" [style.color]="form.controls.warning_font_color.value">\n\t\t\t\t\t\t\tWarnings\n\t\t\t\t\t\t\t<span>{{ form.controls.warning_hover_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.success_color.value" [style.color]="form.controls.success_font_color.value">\n\t\t\t\t\t\t\tSuccess\n\t\t\t\t\t\t\t<span>{{ form.controls.success_hover_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.info_color.value" [style.color]="form.controls.info_font_color.value">\n\t\t\t\t\t\t\tInfo\n\t\t\t\t\t\t\t<span>{{ form.controls.info_hover_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="color-grid">\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary table background</div>\n\t\t\t\t\t\t\t<div class="field-hint">The hero row that anchors your data.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.table_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="table_color" (ngModelChange)="changePrimaryColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary table font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep it crisp and readable.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.table_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="table_font_color" (ngModelChange)="changePrimaryFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary table background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Great for supporting sections.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_table_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_table_color" (ngModelChange)="changeSecondaryColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary table font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Match contrast with the new hue.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_table_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_table_font_color" (ngModelChange)="changeSecondaryFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Tertiary table background</div>\n\t\t\t\t\t\t\t<div class="field-hint">For extra callouts.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.tertiary_table_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="tertiary_table_color" (ngModelChange)="changeTertiaryColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Tertiary table font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Balance brightness for legibility.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.tertiary_table_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="tertiary_table_font_color" (ngModelChange)="changeTertiaryFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="section-card glass-card animate-rise">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Button glow-up</h3>\n\t\t\t\t\t<p>Make clicks feel friendly and intentional.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="button-demo">\n\t\t\t\t\t<button type="button" class="btn btn-success">Success</button>\n\t\t\t\t\t<button type="button" class="btn btn-warning">Warning</button>\n\t\t\t\t\t<button type="button" class="btn btn-danger">Danger</button>\n\t\t\t\t\t<button type="button" class="btn btn-info">Info</button>\n\t\t\t\t\t<button type="button" class="btn btn-primary">Primary</button>\n\t\t\t\t\t<button type="button" class="btn btn-secondary">Secondary</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="color-grid">\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Success background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Celebrate wins.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.success_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="success_color" (ngModelChange)="changeSuccessColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Success font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep it sharp.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.success_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="success_font_color" (ngModelChange)="changeSuccessFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Success hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">How the button greets hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.success_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="success_hover_color" (ngModelChange)="changeSuccessHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Warning background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Gentle but visible.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.warning_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="warning_color" (ngModelChange)="changeWarningColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Warning font</div>\n\t\t\t\t\t\t\t<div class="field-hint">High contrast copy.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.warning_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="warning_font_color" (ngModelChange)="changeWarningFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Warning hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Add motion to caution.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.warning_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="warning_hover_color" (ngModelChange)="changeWarningHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Danger background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Clear stop signal.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.danger_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="danger_color" (ngModelChange)="changeDangerColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Danger font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Stay readable on alert.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.danger_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="danger_font_color" (ngModelChange)="changeDangerFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Danger hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Softer on hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.danger_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="danger_hover_color" (ngModelChange)="changeDangerHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Info background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Highlight helpful hints.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.info_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="info_color" (ngModelChange)="changeInfoColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Info font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep tips legible.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.info_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="info_font_color" (ngModelChange)="changeInfoFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Info hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Gentle motion on hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.info_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="info_hover_color" (ngModelChange)="changeInfoHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary background</div>\n\t\t\t\t\t\t\t<div class="field-hint">The hero action.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.primary_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="primary_color" (ngModelChange)="changePrimaryButtonColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Strong contrast for CTA.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.primary_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="primary_font_color" (ngModelChange)="changePrimaryButtonFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">A playful shift on hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.primary_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="primary_hover_color" (ngModelChange)="changePrimaryButtonHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Great for subtle actions.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_color" (ngModelChange)="changeSecondaryButtonColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep it balanced.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_font_color" (ngModelChange)="changeSecondaryButtonFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Add a soft glow.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_hover_color" (ngModelChange)="changeSecondaryHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="section-card glass-card animate-rise sticky-section-card">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Sticky select defaults</h3>\n\t\t\t\t\t<p>Teach ResolveIO which choices you love.</p>\n\t\t\t\t</div>\n\t\t\t\t@if (!stickySelects.length) {\n\t\t\t\t\t<div class="sticky-empty">\n\t\t\t\t\t\tNo sticky selects saved yet. Add a stickyKey on a select to remember your favorite defaults.\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@else {\n\t\t\t\t\t@for (sticky of stickySelects; track sticky.key) {\n\t\t\t\t\t\t<div class="field-card sticky-select-card">\n\t\t\t\t\t\t\t<div class="field-label">{{ sticky.key }}</div>\n\t\t\t\t\t\t\t@if (sticky.options && sticky.options.length) {\n\t\t\t\t\t\t\t\t<rio-select\n\t\t\t\t\t\t\t\t\t[(ngModel)]="stickySelections[sticky.key]"\n\t\t\t\t\t\t\t\t\t[ngModelOptions]="{standalone: true}"\n\t\t\t\t\t\t\t\t\t[options]="sticky.options"\n\t\t\t\t\t\t\t\t\toptionValueKey="value"\n\t\t\t\t\t\t\t\t\toptionLabelKey="label"\n\t\t\t\t\t\t\t\t\t[searchable]="false"\n\t\t\t\t\t\t\t\t\tappendTo="body"\n\t\t\t\t\t\t\t\t\t[stickyAutoSave]="true"\n\t\t\t\t\t\t\t\t\t(ngModelChange)="updateStickyDefault(sticky.key, $event)">\n\t\t\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (!sticky.options || !sticky.options.length) {\n\t\t\t\t\t\t\t\t<div class="text-muted">No saved options yet.</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t</form>\n</div>\n'}]}],ctorParameters:()=>[{type:AuthPermissionService},{type:UserSettingsService},{type:ProviderService},{type:DialogService},{type:void 0,decorators:[{type:Optional},{type:Inject,args:[RIO_SELECT_STICKY_ADAPTER]}]}]});const routes=[{path:"user-settings",component:UserSettingsComponent,children:[{path:"settings",component:UsersSettingsComponent},{path:"**",redirectTo:"settings"}]}],UserSettingsRouting=RouterModule.forChild(routes);class DatatableComponent extends BaseComponent{_services;urlClick;columns;data;collapseSize;searchTitle;totalItems=1e3;onChangeTableData=new EventEmitter;tableData;constructor(t){super(t),this._services=t}changeTableData(){this.onChangeTableData.emit()}sortColumn(t){this.tableData.sortColumn===t?"desc"===this.tableData.sortOrder?this.tableData.sortOrder="asc":this.tableData.sortOrder="desc":(this.tableData.sortOrder="asc",this.tableData.sortColumn=t),this.changeTableData()}navigateTo(t,e){"file_key"!==e&&t&&this.urlClick&&this._services._router.navigateByUrl(this.urlClick+t)}openFile(t){this._services._socket.call("getSignedUrl",t,900,(e,n)=>{n?window.open(n):this._services._socket.call("insertErrorLog","Widgets-datatable - getsignedurl",[t,e])})}typeOf(t){return typeof t}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DatatableComponent,deps:[{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DatatableComponent,isStandalone:!1,selector:"data-table",inputs:{urlClick:"urlClick",columns:"columns",data:"data",collapseSize:"collapseSize",searchTitle:"searchTitle",totalItems:"totalItems",tableData:"tableData"},outputs:{onChangeTableData:"onChangeTableData"},providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<style>\n\t.orangeRow {\n\t\tbackground-color: orangered;\n\t}\n\n\tcollapse-table tr:hover {\n\t\tbackground-color: lightblue;\n\t\tcursor: pointer;\n\t}\n\n\tcollapse-table {\n\t\twidth: 100%;\n\t}\n</style>\n\n<div class="row">\n\t<div class="input-group">\n\t\t<span class="input-group-btn">\n\t\t\t<button class="btn btn-primary" type="button" (click)="changeTableData()">Search!</button>\n\t\t</span>\n\t\t<input type="text" class="form-control" placeholder="{{ searchTitle }}" [(ngModel)]="tableData.searchString" (keyup.enter)="changeTableData()" style="z-index: 0" />\n\t</div>\n</div>\n<div class="row" style="padding-top: 20px">\n\t<collapse-table [collapseSize]="collapseSize" headerFixed="true">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns; track column) {\n\t\t\t\t\t<th (click)="sortColumn(column.data)" style="cursor: pointer">\n\t\t\t\t\t\t{{ column.name }}\n\t\t\t\t\t\t@if (tableData.sortColumn == column.data && tableData.sortOrder === \'desc\') {\n\t\t\t\t\t\t\t<i class="fa fa-caret-down"></i>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (tableData.sortColumn == column.data && tableData.sortOrder === \'asc\') {\n\t\t\t\t\t\t\t<i class="fa fa-caret-up"></i>\n\t\t\t\t\t\t}\n\t\t\t\t\t</th>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t@for (item of data; track item[\'_id\']) {\n\t\t\t\t<tr [ngClass]="{ orangeRow: item[\'color_red\'] }">\n\t\t\t\t\t@for (column of columns; track column.name) {\n\t\t\t\t\t\t<td (click)="navigateTo(item[\'_id\'], column.data)" [attr.data-label]="column.name">\n\t\t\t\t\t\t\t@if (typeOf(item[column.data]) !== \'boolean\' && column.data !== \'cost\' && column.data !== \'wells\' && column.data !== \'cost_total\' && column.data !== \'price\' && column.data !== \'date\' && column.data !== \'date_created\' && column.data !== \'date_delivered\' && column.data !== \'quantity\' && column.data !== \'quantity_string\' && column.data !== \'min_stock\' && column.data !== \'max_stock\' && column.data !== \'file_key\' && column.data !== \'date_in\') {\n\t\t\t\t\t\t\t\t<span>{{ column.subData ? item[column.data][column.subData] : item[column.data] }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'cost\' || column.data === \'price\' || column.data === \'cost_total\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | currency: \'USD\' : \'symbol\' : \'1.2-2\' }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'date\' || column.data === \'date_created\' || column.data === \'date_delivered\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | date: \'short\' }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'quantity\' || column.data === \'min_stock\' || column.data === \'max_stock\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | number }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'quantity_string\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | number }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'wells\') {\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<pre>{{ item[column.data] }}</pre>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'file_key\') {\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<button type="button" (click)="openFile(item[column.data])" class="btn btn-secondary">Open File</button>\n\t\t\t\t\t\t\t\t\t\x3c!-- <button type="button" class="btn btn-warning" (click)="viewDeletedReason(item)" *ngIf="item.deleted.is_deleted">View Deleted Reason</button> --\x3e\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (typeOf(item[column.data]) === \'boolean\') {\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t@if (item[column.data]) {\n\t\t\t\t\t\t\t\t\t\t<i class="fa fa-check" style="color: green; font-size: 18px" aria-hidden="true"></i>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t@if (!item[column.data]) {\n\t\t\t\t\t\t\t\t\t\t<i class="fa fa-times" style="color: red; font-size: 18px" aria-hidden="true"></i>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</td>\n\t\t\t\t\t}\n\t\t\t\t</tr>\n\t\t\t}\n\t\t</tbody>\n\t</collapse-table>\n</div>\n<hr />\n<div class="row">\n\t<div class="col-lg-4">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-8">\n\t\t\t\t<label class="form-control-label">Entries Per Page</label>\n\t\t\t\t<select class="form-control" [(ngModel)]="tableData.entriesPerPage" (ngModelChange)="changeTableData()">\n\t\t\t\t\t<option value="25">25</option>\n\t\t\t\t\t<option value="50">50</option>\n\t\t\t\t\t<option value="100">100</option>\n\t\t\t\t\t<option value="250">250</option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="col-lg-8" style="margin-top: 16px">\n\t\t<ngb-pagination class="float-end" boundaryLinks="true" [collectionSize]="totalItems" directionLinks="true" ellipses="false" [(page)]="tableData.pageNum" maxSize="6" [pageSize]="tableData.entriesPerPage" rotate="true" (pageChange)="changeTableData()"></ngb-pagination>\n\t</div>\n</div>\n',styles:[".orangeRow{background-color:#ff4500}collapse-table tr:hover{background-color:#add8e6;cursor:pointer}collapse-table{width:100%}\n"],dependencies:[{kind:"component",type:i1$2.NgbPagination,selector:"ngb-pagination",inputs:["disabled","boundaryLinks","directionLinks","ellipses","rotate","collectionSize","maxSize","page","pageSize","size"],outputs:["pageChange"]},{kind:"directive",type:i2.NgSelectOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:i2.ɵNgSelectMultipleOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.SelectControlValueAccessor,selector:"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]",inputs:["compareWith"]},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"component",type:CollapseTableComponent,selector:"collapse-table",inputs:["collapseSize","tableFixed","headerFixed","secondaryColor","tertiaryColor"]},{kind:"pipe",type:i7.DecimalPipe,name:"number"},{kind:"pipe",type:i7.CurrencyPipe,name:"currency"},{kind:"pipe",type:i7.DatePipe,name:"date"}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DatatableComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"data-table",standalone:!1,template:'<style>\n\t.orangeRow {\n\t\tbackground-color: orangered;\n\t}\n\n\tcollapse-table tr:hover {\n\t\tbackground-color: lightblue;\n\t\tcursor: pointer;\n\t}\n\n\tcollapse-table {\n\t\twidth: 100%;\n\t}\n</style>\n\n<div class="row">\n\t<div class="input-group">\n\t\t<span class="input-group-btn">\n\t\t\t<button class="btn btn-primary" type="button" (click)="changeTableData()">Search!</button>\n\t\t</span>\n\t\t<input type="text" class="form-control" placeholder="{{ searchTitle }}" [(ngModel)]="tableData.searchString" (keyup.enter)="changeTableData()" style="z-index: 0" />\n\t</div>\n</div>\n<div class="row" style="padding-top: 20px">\n\t<collapse-table [collapseSize]="collapseSize" headerFixed="true">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns; track column) {\n\t\t\t\t\t<th (click)="sortColumn(column.data)" style="cursor: pointer">\n\t\t\t\t\t\t{{ column.name }}\n\t\t\t\t\t\t@if (tableData.sortColumn == column.data && tableData.sortOrder === \'desc\') {\n\t\t\t\t\t\t\t<i class="fa fa-caret-down"></i>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (tableData.sortColumn == column.data && tableData.sortOrder === \'asc\') {\n\t\t\t\t\t\t\t<i class="fa fa-caret-up"></i>\n\t\t\t\t\t\t}\n\t\t\t\t\t</th>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t@for (item of data; track item[\'_id\']) {\n\t\t\t\t<tr [ngClass]="{ orangeRow: item[\'color_red\'] }">\n\t\t\t\t\t@for (column of columns; track column.name) {\n\t\t\t\t\t\t<td (click)="navigateTo(item[\'_id\'], column.data)" [attr.data-label]="column.name">\n\t\t\t\t\t\t\t@if (typeOf(item[column.data]) !== \'boolean\' && column.data !== \'cost\' && column.data !== \'wells\' && column.data !== \'cost_total\' && column.data !== \'price\' && column.data !== \'date\' && column.data !== \'date_created\' && column.data !== \'date_delivered\' && column.data !== \'quantity\' && column.data !== \'quantity_string\' && column.data !== \'min_stock\' && column.data !== \'max_stock\' && column.data !== \'file_key\' && column.data !== \'date_in\') {\n\t\t\t\t\t\t\t\t<span>{{ column.subData ? item[column.data][column.subData] : item[column.data] }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'cost\' || column.data === \'price\' || column.data === \'cost_total\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | currency: \'USD\' : \'symbol\' : \'1.2-2\' }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'date\' || column.data === \'date_created\' || column.data === \'date_delivered\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | date: \'short\' }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'quantity\' || column.data === \'min_stock\' || column.data === \'max_stock\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | number }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'quantity_string\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | number }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'wells\') {\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<pre>{{ item[column.data] }}</pre>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'file_key\') {\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<button type="button" (click)="openFile(item[column.data])" class="btn btn-secondary">Open File</button>\n\t\t\t\t\t\t\t\t\t\x3c!-- <button type="button" class="btn btn-warning" (click)="viewDeletedReason(item)" *ngIf="item.deleted.is_deleted">View Deleted Reason</button> --\x3e\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (typeOf(item[column.data]) === \'boolean\') {\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t@if (item[column.data]) {\n\t\t\t\t\t\t\t\t\t\t<i class="fa fa-check" style="color: green; font-size: 18px" aria-hidden="true"></i>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t@if (!item[column.data]) {\n\t\t\t\t\t\t\t\t\t\t<i class="fa fa-times" style="color: red; font-size: 18px" aria-hidden="true"></i>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</td>\n\t\t\t\t\t}\n\t\t\t\t</tr>\n\t\t\t}\n\t\t</tbody>\n\t</collapse-table>\n</div>\n<hr />\n<div class="row">\n\t<div class="col-lg-4">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-8">\n\t\t\t\t<label class="form-control-label">Entries Per Page</label>\n\t\t\t\t<select class="form-control" [(ngModel)]="tableData.entriesPerPage" (ngModelChange)="changeTableData()">\n\t\t\t\t\t<option value="25">25</option>\n\t\t\t\t\t<option value="50">50</option>\n\t\t\t\t\t<option value="100">100</option>\n\t\t\t\t\t<option value="250">250</option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="col-lg-8" style="margin-top: 16px">\n\t\t<ngb-pagination class="float-end" boundaryLinks="true" [collectionSize]="totalItems" directionLinks="true" ellipses="false" [(page)]="tableData.pageNum" maxSize="6" [pageSize]="tableData.entriesPerPage" rotate="true" (pageChange)="changeTableData()"></ngb-pagination>\n\t</div>\n</div>\n'}]}],ctorParameters:()=>[{type:ProviderService}],propDecorators:{urlClick:[{type:Input}],columns:[{type:Input}],data:[{type:Input}],collapseSize:[{type:Input}],searchTitle:[{type:Input}],totalItems:[{type:Input}],onChangeTableData:[{type:Output}],tableData:[{type:Input}]}});class DatatableModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DatatableModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:DatatableModule,declarations:[DatatableComponent],imports:[NgbModule,FormsModule,CommonModule,RouterModule,CollapseTableModule],exports:[DatatableComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DatatableModule,imports:[NgbModule,FormsModule,CommonModule,RouterModule,CollapseTableModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DatatableModule,decorators:[{type:NgModule,args:[{imports:[NgbModule,FormsModule,CommonModule,RouterModule,CollapseTableModule],exports:[DatatableComponent],declarations:[DatatableComponent],providers:[]}]}]});class FileUploadComponent extends BaseComponent{_resize;_services;_ds;_http;constructor(t,e,n,o){super(e),this._resize=t,this._services=e,this._ds=n,this._http=o}files=[];allowDelete=!1;allowReplace=!1;showFileUpload=!0;filesChanged=new EventEmitter;fileAdded=new EventEmitter;fileRemoved=new EventEmitter;fileType;download_link;supportedFileTypes=["application/pdf","text/plain","image/gif","image/png","image/jpeg","image/bmp"];pdfSrc="";replaceFileIndex=0;isUploading=!1;progressMsg="";windowSize$;windowSize=0;ngOnInit(){this.windowSize$=this._resize.onResize$.subscribe(t=>{this.windowSize=t?t.innerWidth:window.innerWidth})}ngOnDestroy(){this.windowSize$.unsubscribe()}dragFileAccepted(t){this.supportedFileTypes.indexOf(t.type)>=0?this.uploadWithEmit(t,"misc").then(()=>{},t=>{this._ds.error("Could not upload file, incorrect type")}):this._ds.error("Invalid format, the supported file types are: "+this.supportedFileTypes)}upload(t,e,n,o,r){return new Promise((i,s)=>{this.progressMsg="Uploading "+(o||t.name),this._services._aws.uploadFile(t,e,n,o).then(s=>{const a={_id:s._id,name:o||t.name,size:t.size,status:r||"Uploaded",key:s.key,order:n||-1,type:e};this.isUploading=!1,this.files.push(a),this.files=this.files.sort((t,e)=>t.order-e.order),i(a)},t=>{this._ds.error("Could not upload file. "+t),s(t)}),this.isUploading=!0})}uploadWithEmit(t,e,n,o,r){return new Promise((i,s)=>{this.progressMsg="Uploading "+(o||t.name),this._services._aws.uploadFile(t,e,n,o).then(s=>{const a={_id:s._id,name:o||t.name,size:t.size,status:r||"Uploaded",key:s.key,order:n||-1,type:e};this.isUploading=!1,this.files=this.files.sort((t,e)=>t.order-e.order),this.fileAdded.emit(a),i(a)},t=>{this._ds.error("Could not upload file. "+t),s(t)}),this.isUploading=!0})}delete(t,e=!0){this.pdfSrc="",e?this._ds.confirm("Are you sure you want to delete this file?").then(e=>{this._services._aws.deleteFile(this.files[t].key,(e,n)=>{e&&(this._ds.error("Could not delete file"),this._services._socket.call("insertErrorLog","Widgets.File-Upload - Delete File",[this.files[t].key,e]))}),this.files.splice(t,1)},t=>{}):(this._services._aws.deleteFile(this.files[t].key,(e,n)=>{e&&this._services._socket.call("insertErrorLog","Widgets.File-Upload - Delete File",[this.files[t].key,e])}),this.files.splice(t,1))}deleteWithEmit(t,e=!0){this.pdfSrc="";let n=Object.assign({},this.files[t]);e?this._ds.confirm("Are you sure you want to delete this file?").then(e=>{this._services._aws.deleteFile(this.files[t].key,(e,o)=>{e&&(this._ds.error("Could not delete file"),this._services._socket.call("insertErrorLog","Widgets.File-Upload - Delete File",[this.files[t].key,e])),this.fileRemoved.emit(n)})},t=>{}):this._services._aws.deleteFile(this.files[t].key,(e,o)=>{e&&this._services._socket.call("insertErrorLog","Widgets.File-Upload - Delete File",[this.files[t].key,e]),this.fileRemoved.emit(n)})}deleteFileWithId(t){this.delete(this.files.map(t=>t._id).indexOf(t),!1)}open(t){this._services._socket.call("getSignedUrl",t.key,900,(e,n)=>{n?window.open(n):this._services._socket.call("insertErrorLog","Widgets-file - getsignedurl",[t.key,e])})}setPDFViewerSrc(t){this._services._socket.call("getSignedUrl",t.key,900,(e,n)=>{n?this.pdfSrc=n:(this._ds.error("Could not get signed url for file"),this._services._socket.call("insertErrorLog","Widgets-file - getsignedurl pdfviewer",[t.key,e]))})}onFileSelect(t){this.uploadWithEmit(t.target.files[0],this.fileType?this.fileType:"misc").then(()=>{},()=>{}),t.srcElement.value=""}onFileSelectReplace(t){if(t.target.files[0]){this.files[this.replaceFileIndex]._id;let e=this.files[this.replaceFileIndex].type,n=this.files[this.replaceFileIndex].order,o=this.files[this.replaceFileIndex].name.replace(/\.[^\.]+$/,"")+"."+t.target.files[0].name.split(".")[t.target.files[0].name.split(".").length-1],r=this.files[this.replaceFileIndex].status;this.deleteWithEmit(this.replaceFileIndex,!1),"Unsigned"===r?this._ds.confirm("Are you replacing this file with a signed copy?").then(r=>{this.uploadWithEmit(t.target.files[0],e,n,o,"Signed").then(t=>{t.key,t._id},t=>{})},r=>{this.uploadWithEmit(t.target.files[0],e,n,o).then(t=>{t.key,t._id},t=>{})}):this.uploadWithEmit(t.target.files[0],e,n,o).then(t=>{t.key,t._id},t=>{})}}userIsInRole(t){return this._services._account.isUserInView(t)}isMobile(){}downloadResource(t){return this._http.get(t,{responseType:"blob"}).toPromise()}download(t){this._services._socket.call("getSignedUrl",t.key,900,async(e,n)=>{if(n){const e=await this.downloadResource(n),o=window.URL.createObjectURL(e),r=this.download_link.nativeElement;r.href=o,r.download=t.name,r.click(),window.URL.revokeObjectURL(o)}else this._services._socket.call("insertErrorLog","Widgets-file - update bol",[e])})}email(t){this._ds.input("Email file to which address?",[{label:"Email Address",form:"email",data:"",validators:[Validators.required,this._services._vs.email],validatorErrors:["required","email"],validatorMsg:["Email is required","Email is invalid"],required:!0}]).then(e=>{this._services._socket.call("emailFile",t._id,e.email.value,(t,e)=>{t?this._ds.error("Could not send email: "+t):this._services._alert.setAlert("success","Email has been sent")})},t=>{})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FileUploadComponent,deps:[{token:ResizeService},{token:ProviderService},{token:DialogService},{token:i4.HttpClient}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:FileUploadComponent,isStandalone:!1,selector:"file-upload",inputs:{files:"files",allowDelete:"allowDelete",allowReplace:"allowReplace",showFileUpload:"showFileUpload",fileType:"fileType"},outputs:{filesChanged:"filesChanged",fileAdded:"fileAdded",fileRemoved:"fileRemoved"},viewQueries:[{propertyName:"download_link",first:!0,predicate:["download_link"],descendants:!0,static:!0}],usesInheritance:!0,ngImport:i0,template:'<style>\n\thtml,\n\tbody {\n\t\theight: 100%;\n\t}\n\n\tcollapse-table tr:hover {\n\t\tbackground-color: lightblue;\n\t\tcursor: pointer;\n\t}\n\n\tcollapse-table {\n\t\twidth: 100%;\n\t}\n\n\t/* Label container: */\n\t.file {\n\t\tdisplay: inline-block;\n\t\tpadding: 0 0 0 0.5em;\n\t\tcursor: pointer;\n\t\tposition: relative;\n\t\tborder: 0.075rem solid #ddd;\n\t\tborder-radius: 0.25rem;\n\t}\n\n\t/* The pseudo input field: */\n\t.file::before {\n\t\tcontent: \'\';\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\ttop: 0;\n\t\tbottom: 0;\n\t\tz-index: -1;\n\n\t\t/* Bootstrap appearance: */\n\t\tbackground-color: #fff;\n\t\tborder: 0.075rem solid #ddd;\n\t\tborder-radius: 0.25rem;\n\t\t-webkit-box-shadow: inset 0 0.2rem 0.4rem rgba(0, 0, 0, 0.05);\n\t\tbox-shadow: inset 0 0.2rem 0.4rem rgba(0, 0, 0, 0.05);\n\t}\n\n\t/* The pseudo button: */\n\t.file::after {\n\t\tcontent: \'Browse\';\n\t\tdisplay: inline-block;\n\n\t\t/* Bootstrap appearance: */\n\t\tbackground-color: #eee;\n\t\tborder: 0.075rem solid #ddd;\n\t\tborder-radius: 0 0.25rem 0.25rem 0;\n\t\tpadding: 0.5rem 1rem;\n\t\tline-height: 1.5;\n\t\tcolor: #555;\n\t}\n\n\t.file input[type=\'file\'] {\n\t\tcursor: pointer;\n\t\tborder: 0 none;\n\t\twidth: 12em;\n\t}\n\n\t/* -webkit hide the button: */\n\t.file input[type=\'file\']::-webkit-file-upload-button {\n\t\tborder: 0;\n\t\tpadding: 0;\n\t\tmargin: 0;\n\t\twidth: 0;\n\t\tbackground: transparent;\n\t}\n\n\t/* IE10+ hide the button: */\n\t.file input[type=\'file\']::-ms-browse {\n\t\tpadding: 0;\n\t\tmargin: -1px;\n\t\twidth: 0;\n\t\tborder: 0;\n\t\tbackground: transparent;\n\t}\n\n\t.file input[type=\'file\']::-ms-value {\n\t\tbackground: #fff;\n\t\tborder: 0;\n\t}\n\n\tcard {\n\t\twidth: 100%;\n\t}\n</style>\n\n<a style="display: none" #download_link></a>\n<input hidden type="file" #fileInputReplace (change)="onFileSelectReplace($event)" />\n\n<div class="card">\n\t<div class="card-header">\n\t\t<strong class="pull-left">Files</strong>\n\t</div>\n\t<div class="card-block">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-6">\n\t\t\t\t@if (showFileUpload) {\n\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t<div class="col-lg-6">\n\t\t\t\t\t\t\t<div class="container">\n\t\t\t\t\t\t\t\t<div style="margin: 10px 0px; font-weight: bold">Upload File</div>\n\t\t\t\t\t\t\t\t<label class="file">\n\t\t\t\t\t\t\t\t\t<input type="file" #fileInput (change)="onFileSelect($event)" />\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t<ngx-file-drop dropZoneLabel="Drop files here" style="width: 223px; height: 112px; border: 1px black dashed; border-radius: 5px; justify-content: center" class="vertical-align" (onFileDrop)="dragFileAccepted($event)"></ngx-file-drop>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-lg-6">\n\t\t\t\t\t\t\t@if (isUploading) {\n\t\t\t\t\t\t\t\t<b>{{ progressMsg || \'N/A\' }}</b>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t@if (windowSize > 980) {\n\t\t\t\t\t\t<div class="col-lg-12">\n\t\t\t\t\t\t\t@if (pdfSrc) {\n\t\t\t\t\t\t\t\t<div style="text-align: center">\n\t\t\t\t\t\t\t\t\t<resolveio-client-lib-pdf-viewer [pdfSrc]="pdfSrc"></resolveio-client-lib-pdf-viewer>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="col-lg-6">\n\t\t\t\t@if (files && files.length) {\n\t\t\t\t\t<b>Uploaded Files</b>\n\t\t\t\t\t<div [style.max-height]="windowSize > 900 ? \'300px\' : \'\'" [style.overflow-y]="windowSize > 900 ? \'auto\' : \'\'">\n\t\t\t\t\t\t<collapse-table collapseSize="900">\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th>File Name</th>\n\t\t\t\t\t\t\t\t\t<th>Size</th>\n\t\t\t\t\t\t\t\t\t<th>Type</th>\n\t\t\t\t\t\t\t\t\t<th>Actions</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t@for (file of files; track file._id; let i = $index) {\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td data-label="File Name" (click)="setPDFViewerSrc(file)">{{ file.name }}</td>\n\t\t\t\t\t\t\t\t\t\t<td data-label="Size" (click)="setPDFViewerSrc(file)">{{ file.size / 1024 / 1024 | number: \'.2\' }} MB</td>\n\t\t\t\t\t\t\t\t\t\t<td data-label="Type" (click)="setPDFViewerSrc(file)">{{ file.type }}</td>\n\t\t\t\t\t\t\t\t\t\t<td data-label="Actions">\n\t\t\t\t\t\t\t\t\t\t\t<responsive-button-group collapseSize="900">\n\t\t\t\t\t\t\t\t\t\t\t\t<button type="button" class="btn btn-success" (click)="open(file)">Open</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type="button" class="btn btn-primary" (click)="download(file)">Download</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button [hidden]="!allowDelete || (file.type !== \'misc\' && !userIsInRole(\'super-admin\'))" type="button" class="btn btn-danger" (click)="deleteWithEmit(i)">Delete</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button [hidden]="!allowDelete || (file.type !== \'misc\' && !userIsInRole(\'super-admin\'))" type="button" class="btn btn-danger" (click)="fileInputReplace.click(); replaceFileIndex = i">Replace</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type="button" class="btn btn-warning" (click)="email(file)">Email</button>\n\t\t\t\t\t\t\t\t\t\t\t</responsive-button-group>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</collapse-table>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (!files || !files.length) {\n\t\t\t\t\t<b>No Uploaded Files</b>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',styles:['html,body{height:100%}collapse-table tr:hover{background-color:#add8e6;cursor:pointer}collapse-table{width:100%}.file{display:inline-block;padding:0 0 0 .5em;cursor:pointer;position:relative;border:.075rem solid #ddd;border-radius:.25rem}.file:before{content:"";display:block;position:absolute;inset:0;z-index:-1;background-color:#fff;border:.075rem solid #ddd;border-radius:.25rem;-webkit-box-shadow:inset 0 .2rem .4rem rgba(0,0,0,.05);box-shadow:inset 0 .2rem .4rem #0000000d}.file:after{content:"Browse";display:inline-block;background-color:#eee;border:.075rem solid #ddd;border-radius:0 .25rem .25rem 0;padding:.5rem 1rem;line-height:1.5;color:#555}.file input[type=file]{cursor:pointer;border:0 none;width:12em}.file input[type=file]::-webkit-file-upload-button{border:0;padding:0;margin:0;width:0;background:transparent}.file input[type=file]::-ms-browse{padding:0;margin:-1px;width:0;border:0;background:transparent}.file input[type=file]::-ms-value{background:#fff;border:0}card{width:100%}\n'],dependencies:[{kind:"component",type:CollapseTableComponent,selector:"collapse-table",inputs:["collapseSize","tableFixed","headerFixed","secondaryColor","tertiaryColor"]},{kind:"component",type:ResponsiveButtonGroupComponent,selector:"responsive-button-group",inputs:["collapseSize"]},{kind:"component",type:i7$2.NgxFileDropComponent,selector:"ngx-file-drop",inputs:["accept","directory","multiple","dropZoneLabel","dropZoneClassName","useDragEnter","contentClassName","showBrowseBtn","browseBtnClassName","browseBtnLabel","disabled"],outputs:["onFileDrop","onFileOver","onFileLeave"]},{kind:"component",type:i8.PdfViewerComponent,selector:"resolveio-client-lib-pdf-viewer",inputs:["pdfSrc","fileName"]},{kind:"pipe",type:i7.DecimalPipe,name:"number"}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FileUploadComponent,decorators:[{type:Component,args:[{selector:"file-upload",standalone:!1,template:'<style>\n\thtml,\n\tbody {\n\t\theight: 100%;\n\t}\n\n\tcollapse-table tr:hover {\n\t\tbackground-color: lightblue;\n\t\tcursor: pointer;\n\t}\n\n\tcollapse-table {\n\t\twidth: 100%;\n\t}\n\n\t/* Label container: */\n\t.file {\n\t\tdisplay: inline-block;\n\t\tpadding: 0 0 0 0.5em;\n\t\tcursor: pointer;\n\t\tposition: relative;\n\t\tborder: 0.075rem solid #ddd;\n\t\tborder-radius: 0.25rem;\n\t}\n\n\t/* The pseudo input field: */\n\t.file::before {\n\t\tcontent: \'\';\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\ttop: 0;\n\t\tbottom: 0;\n\t\tz-index: -1;\n\n\t\t/* Bootstrap appearance: */\n\t\tbackground-color: #fff;\n\t\tborder: 0.075rem solid #ddd;\n\t\tborder-radius: 0.25rem;\n\t\t-webkit-box-shadow: inset 0 0.2rem 0.4rem rgba(0, 0, 0, 0.05);\n\t\tbox-shadow: inset 0 0.2rem 0.4rem rgba(0, 0, 0, 0.05);\n\t}\n\n\t/* The pseudo button: */\n\t.file::after {\n\t\tcontent: \'Browse\';\n\t\tdisplay: inline-block;\n\n\t\t/* Bootstrap appearance: */\n\t\tbackground-color: #eee;\n\t\tborder: 0.075rem solid #ddd;\n\t\tborder-radius: 0 0.25rem 0.25rem 0;\n\t\tpadding: 0.5rem 1rem;\n\t\tline-height: 1.5;\n\t\tcolor: #555;\n\t}\n\n\t.file input[type=\'file\'] {\n\t\tcursor: pointer;\n\t\tborder: 0 none;\n\t\twidth: 12em;\n\t}\n\n\t/* -webkit hide the button: */\n\t.file input[type=\'file\']::-webkit-file-upload-button {\n\t\tborder: 0;\n\t\tpadding: 0;\n\t\tmargin: 0;\n\t\twidth: 0;\n\t\tbackground: transparent;\n\t}\n\n\t/* IE10+ hide the button: */\n\t.file input[type=\'file\']::-ms-browse {\n\t\tpadding: 0;\n\t\tmargin: -1px;\n\t\twidth: 0;\n\t\tborder: 0;\n\t\tbackground: transparent;\n\t}\n\n\t.file input[type=\'file\']::-ms-value {\n\t\tbackground: #fff;\n\t\tborder: 0;\n\t}\n\n\tcard {\n\t\twidth: 100%;\n\t}\n</style>\n\n<a style="display: none" #download_link></a>\n<input hidden type="file" #fileInputReplace (change)="onFileSelectReplace($event)" />\n\n<div class="card">\n\t<div class="card-header">\n\t\t<strong class="pull-left">Files</strong>\n\t</div>\n\t<div class="card-block">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-6">\n\t\t\t\t@if (showFileUpload) {\n\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t<div class="col-lg-6">\n\t\t\t\t\t\t\t<div class="container">\n\t\t\t\t\t\t\t\t<div style="margin: 10px 0px; font-weight: bold">Upload File</div>\n\t\t\t\t\t\t\t\t<label class="file">\n\t\t\t\t\t\t\t\t\t<input type="file" #fileInput (change)="onFileSelect($event)" />\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t<ngx-file-drop dropZoneLabel="Drop files here" style="width: 223px; height: 112px; border: 1px black dashed; border-radius: 5px; justify-content: center" class="vertical-align" (onFileDrop)="dragFileAccepted($event)"></ngx-file-drop>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-lg-6">\n\t\t\t\t\t\t\t@if (isUploading) {\n\t\t\t\t\t\t\t\t<b>{{ progressMsg || \'N/A\' }}</b>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t@if (windowSize > 980) {\n\t\t\t\t\t\t<div class="col-lg-12">\n\t\t\t\t\t\t\t@if (pdfSrc) {\n\t\t\t\t\t\t\t\t<div style="text-align: center">\n\t\t\t\t\t\t\t\t\t<resolveio-client-lib-pdf-viewer [pdfSrc]="pdfSrc"></resolveio-client-lib-pdf-viewer>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="col-lg-6">\n\t\t\t\t@if (files && files.length) {\n\t\t\t\t\t<b>Uploaded Files</b>\n\t\t\t\t\t<div [style.max-height]="windowSize > 900 ? \'300px\' : \'\'" [style.overflow-y]="windowSize > 900 ? \'auto\' : \'\'">\n\t\t\t\t\t\t<collapse-table collapseSize="900">\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th>File Name</th>\n\t\t\t\t\t\t\t\t\t<th>Size</th>\n\t\t\t\t\t\t\t\t\t<th>Type</th>\n\t\t\t\t\t\t\t\t\t<th>Actions</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t@for (file of files; track file._id; let i = $index) {\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td data-label="File Name" (click)="setPDFViewerSrc(file)">{{ file.name }}</td>\n\t\t\t\t\t\t\t\t\t\t<td data-label="Size" (click)="setPDFViewerSrc(file)">{{ file.size / 1024 / 1024 | number: \'.2\' }} MB</td>\n\t\t\t\t\t\t\t\t\t\t<td data-label="Type" (click)="setPDFViewerSrc(file)">{{ file.type }}</td>\n\t\t\t\t\t\t\t\t\t\t<td data-label="Actions">\n\t\t\t\t\t\t\t\t\t\t\t<responsive-button-group collapseSize="900">\n\t\t\t\t\t\t\t\t\t\t\t\t<button type="button" class="btn btn-success" (click)="open(file)">Open</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type="button" class="btn btn-primary" (click)="download(file)">Download</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button [hidden]="!allowDelete || (file.type !== \'misc\' && !userIsInRole(\'super-admin\'))" type="button" class="btn btn-danger" (click)="deleteWithEmit(i)">Delete</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button [hidden]="!allowDelete || (file.type !== \'misc\' && !userIsInRole(\'super-admin\'))" type="button" class="btn btn-danger" (click)="fileInputReplace.click(); replaceFileIndex = i">Replace</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type="button" class="btn btn-warning" (click)="email(file)">Email</button>\n\t\t\t\t\t\t\t\t\t\t\t</responsive-button-group>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</collapse-table>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (!files || !files.length) {\n\t\t\t\t\t<b>No Uploaded Files</b>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}]}],ctorParameters:()=>[{type:ResizeService},{type:ProviderService},{type:DialogService},{type:i4.HttpClient}],propDecorators:{files:[{type:Input}],allowDelete:[{type:Input}],allowReplace:[{type:Input}],showFileUpload:[{type:Input}],filesChanged:[{type:Output}],fileAdded:[{type:Output}],fileRemoved:[{type:Output}],fileType:[{type:Input}],download_link:[{type:ViewChild,args:["download_link",{static:!0}]}]}});class FileModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FileModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:FileModule,declarations:[FileUploadComponent],imports:[CommonModule,FormsModule,CollapseTableModule,NgbModule,ResponsiveButtonGroupModule,NgxFileDropModule,PdfViewerModule],exports:[FileUploadComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FileModule,imports:[CommonModule,FormsModule,CollapseTableModule,NgbModule,ResponsiveButtonGroupModule,NgxFileDropModule,PdfViewerModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FileModule,decorators:[{type:NgModule,args:[{imports:[CommonModule,FormsModule,CollapseTableModule,NgbModule,ResponsiveButtonGroupModule,NgxFileDropModule,PdfViewerModule],declarations:[FileUploadComponent],exports:[FileUploadComponent]}]}]});class UserSettingsModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsModule,declarations:[UserSettingsComponent,UsersSettingsComponent],imports:[SharedModule,i1$1.RouterModule,DatatableModule,FileModule,NgbAccordionModule,NgbModule]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsModule,providers:[UserSettingsService],imports:[SharedModule,UserSettingsRouting,DatatableModule,FileModule,NgbAccordionModule,NgbModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsModule,decorators:[{type:NgModule,args:[{imports:[SharedModule,UserSettingsRouting,DatatableModule,FileModule,NgbAccordionModule,NgbModule],declarations:[UserSettingsComponent,UsersSettingsComponent],providers:[UserSettingsService]}]}]});class CoreModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CoreModule,imports:[CoreShellModule,CoreAuthModule,CoreDialogModule,CoreLoggerModule,UserSettingsModule,CollapseTableModule],exports:[CoreShellModule,CoreAuthModule,CoreDialogModule,CoreLoggerModule]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreModule,imports:[CoreShellModule,CoreAuthModule,CoreDialogModule,CoreLoggerModule,UserSettingsModule,CollapseTableModule,CoreShellModule,CoreAuthModule,CoreDialogModule,CoreLoggerModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreModule,decorators:[{type:NgModule,args:[{imports:[CoreShellModule,CoreAuthModule,CoreDialogModule,CoreLoggerModule,UserSettingsModule,CollapseTableModule],exports:[CoreShellModule,CoreAuthModule,CoreDialogModule,CoreLoggerModule]}]}]});let typeCache={};function type(t){if(typeCache[t])throw new Error(`Action type "${t}" is not unqiue"`);return typeCache[t]=!0,t}class DateShortcutComponent extends BaseComponent{_services;_cd;startDateObj;endDateObj;startDateObjForm;endDateObjForm;startDateObjChange=new EventEmitter;endDateObjChange=new EventEmitter;startDateObjFormChange=new EventEmitter;endDateObjFormChange=new EventEmitter;datesChanged=new EventEmitter;shortcutValue=null;shortcutValueChange=new EventEmitter;constructor(t,e){super(t),this._services=t,this._cd=e}ngOnInit(){this.onSelectShortcut()}reset(){this.shortcutValue=null,this.shortcutValueChange.emit(this.shortcutValue),this._cd.detectChanges()}onSelectShortcut(){if(this.shortcutValue){const t=this._services._app.environment.value?.TZ_CLIENT,e=momentTz(t);if(this.startDateObj&&this.endDateObj){let n=dateOnlyStartOfDayTz({year:this.startDateObj.year,month:this.startDateObj.month,day:this.startDateObj.day},t),o=dateOnlyStartOfDayTz({year:this.endDateObj.year,month:this.endDateObj.month,day:this.endDateObj.day},t);"Q1"===this.shortcutValue?(n=e.clone().startOf("year").toDate(),o=e.clone().startOf("year").quarter(2).subtract(1,"days").toDate()):"Q2"===this.shortcutValue?(n=e.clone().startOf("year").quarter(2).toDate(),o=e.clone().startOf("year").quarter(3).subtract(1,"days").toDate()):"Q3"===this.shortcutValue?(n=e.clone().startOf("year").quarter(3).toDate(),o=e.clone().startOf("year").quarter(4).subtract(1,"days").toDate()):"Q4"===this.shortcutValue?(n=e.clone().startOf("year").quarter(4).toDate(),o=e.clone().endOf("year").toDate()):"Last Q1"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").toDate(),o=e.clone().startOf("year").subtract(1,"year").quarter(2).subtract(1,"days").toDate()):"Last Q2"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").quarter(2).toDate(),o=e.clone().startOf("year").subtract(1,"year").quarter(3).subtract(1,"days").toDate()):"Last Q3"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").quarter(3).toDate(),o=e.clone().startOf("year").subtract(1,"year").quarter(4).subtract(1,"days").toDate()):"Last Q4"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").quarter(4).toDate(),o=e.clone().endOf("year").subtract(1,"year").toDate()):"Today"===this.shortcutValue?(n=e.clone().startOf("day").toDate(),o=e.clone().toDate()):"Yesterday"===this.shortcutValue?(n=e.clone().subtract(1,"days").startOf("day").toDate(),o=e.clone().subtract(1,"days").endOf("day").toDate()):"Week"===this.shortcutValue?(n=e.clone().startOf("isoWeek").toDate(),o=e.clone().toDate()):"Last Week"===this.shortcutValue?(o=e.clone().startOf("isoWeek").subtract(1,"days").toDate(),n=momentTz(t,o).startOf("isoWeek").toDate()):"Month"===this.shortcutValue?(n=e.clone().startOf("month").toDate(),o=e.clone().toDate()):"Last Month"===this.shortcutValue?(o=e.clone().startOf("month").subtract(1,"days").endOf("day").toDate(),n=momentTz(t,o).startOf("month").toDate()):"Last 30 Days"===this.shortcutValue?(o=e.clone().toDate(),n=e.clone().subtract(30,"days").startOf("day").toDate()):"Quarter"===this.shortcutValue?(n=e.clone().startOf("year").quarter(e.quarter()).toDate(),o=e.clone().toDate()):"Last Quarter"===this.shortcutValue?(o=e.clone().startOf("year").quarter(e.quarter()).subtract(1,"days").endOf("day").toDate(),n=momentTz(t,o).startOf("quarter").toDate()):"Year"===this.shortcutValue?(n=e.clone().startOf("year").toDate(),o=e.clone().toDate()):"Last Year"===this.shortcutValue?(o=e.clone().startOf("year").subtract(1,"days").endOf("day").toDate(),n=momentTz(t,o).startOf("year").toDate()):"All"===this.shortcutValue&&(n=new Date(2017,0,1,0,0,0,0),o=e.clone().toDate()),this.startDateObj={year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()},this.endDateObj={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},this.startDateObjChange.emit(this.startDateObj),this.endDateObjChange.emit(this.endDateObj),this.datesChanged.emit([this.startDateObj,this.endDateObj])}else if(this.startDateObjForm&&this.endDateObjForm){let n=dateOnlyStartOfDayTz({year:this.startDateObjForm.value.year,month:this.startDateObjForm.value.month,day:this.startDateObjForm.value.day},t),o=dateOnlyStartOfDayTz({year:this.endDateObjForm.value.year,month:this.endDateObjForm.value.month,day:this.endDateObjForm.value.day},t);"Q1"===this.shortcutValue?(n=e.clone().startOf("year").toDate(),o=e.clone().startOf("year").quarter(2).subtract(1,"days").toDate()):"Q2"===this.shortcutValue?(n=e.clone().startOf("year").quarter(2).toDate(),o=e.clone().startOf("year").quarter(3).subtract(1,"days").toDate()):"Q3"===this.shortcutValue?(n=e.clone().startOf("year").quarter(3).toDate(),o=e.clone().startOf("year").quarter(4).subtract(1,"days").toDate()):"Q4"===this.shortcutValue?(n=e.clone().startOf("year").quarter(4).toDate(),o=e.clone().endOf("year").toDate()):"Last Q1"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").toDate(),o=e.clone().startOf("year").subtract(1,"year").quarter(2).subtract(1,"days").toDate()):"Last Q2"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").quarter(2).toDate(),o=e.clone().startOf("year").subtract(1,"year").quarter(3).subtract(1,"days").toDate()):"Last Q3"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").quarter(3).toDate(),o=e.clone().startOf("year").subtract(1,"year").quarter(4).subtract(1,"days").toDate()):"Last Q4"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").quarter(4).toDate(),o=e.clone().endOf("year").subtract(1,"year").toDate()):"Today"===this.shortcutValue?(n=e.clone().startOf("day").toDate(),o=e.clone().toDate()):"Yesterday"===this.shortcutValue?(n=e.clone().subtract(1,"days").startOf("day").toDate(),o=e.clone().subtract(1,"days").endOf("day").toDate()):"Week"===this.shortcutValue?(n=e.clone().startOf("isoWeek").toDate(),o=e.clone().toDate()):"Last Week"===this.shortcutValue?(o=e.clone().startOf("isoWeek").subtract(1,"days").toDate(),n=momentTz(t,o).startOf("isoWeek").toDate()):"Month"===this.shortcutValue?(n=e.clone().startOf("month").toDate(),o=e.clone().toDate()):"Last Month"===this.shortcutValue?(o=e.clone().startOf("month").subtract(1,"days").endOf("day").toDate(),n=momentTz(t,o).startOf("month").toDate()):"Last 30 Days"===this.shortcutValue?(o=e.clone().toDate(),n=e.clone().subtract(30,"days").startOf("day").toDate()):"Quarter"===this.shortcutValue?(n=e.clone().startOf("year").quarter(e.quarter()).toDate(),o=e.clone().toDate()):"Last Quarter"===this.shortcutValue?(o=e.clone().startOf("year").quarter(e.quarter()).subtract(1,"days").endOf("day").toDate(),n=momentTz(t,o).startOf("quarter").toDate()):"Year"===this.shortcutValue?(n=e.clone().startOf("year").toDate(),o=e.clone().toDate()):"Last Year"===this.shortcutValue?(o=e.clone().startOf("year").subtract(1,"days").endOf("day").toDate(),n=momentTz(t,o).startOf("year").toDate()):"All"===this.shortcutValue&&(n=new Date(2017,0,1,0,0,0,0),o=e.clone().toDate()),this.startDateObjForm.setValue({year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()}),this.endDateObjForm.setValue({year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()}),this.startDateObjFormChange.emit(this.startDateObjForm),this.endDateObjFormChange.emit(this.endDateObjForm),this.datesChanged.emit([this.startDateObjForm,this.endDateObjForm])}this.shortcutValueChange.emit(this.shortcutValue)}this._cd.detectChanges()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DateShortcutComponent,deps:[{token:ProviderService},{token:i0.ChangeDetectorRef}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:DateShortcutComponent,isStandalone:!1,selector:"date-shortcut",inputs:{startDateObj:"startDateObj",endDateObj:"endDateObj",startDateObjForm:"startDateObjForm",endDateObjForm:"endDateObjForm",shortcutValue:"shortcutValue"},outputs:{startDateObjChange:"startDateObjChange",endDateObjChange:"endDateObjChange",startDateObjFormChange:"startDateObjFormChange",endDateObjFormChange:"endDateObjFormChange",datesChanged:"datesChanged",shortcutValueChange:"shortcutValueChange"},providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'\n\t\t<label class="form-control-label">Date Shortcuts</label>\n\t\t<rio-select [(ngModel)]="shortcutValue" (change)="onSelectShortcut()" placeholder="Select Shortcut" [clearable]="false">\n\t\t\t<rio-option value="Today">Today</rio-option>\n\t\t\t<rio-option value="Yesterday">Yesterday</rio-option>\n\t\t\t<rio-option value="Week">This Week</rio-option>\n\t\t\t<rio-option value="Last Week">Last Week</rio-option>\n\t\t\t<rio-option value="Month">This Month</rio-option>\n\t\t\t<rio-option value="Last Month">Last Month</rio-option>\n\t\t\t<rio-option value="Last 30 Days">Last 30 Days</rio-option>\n\t\t\t<rio-option value="Quarter">This Quarter</rio-option>\n\t\t\t<rio-option value="Last Quarter">Last Quarter</rio-option>\n\t\t\t<rio-option value="Year">This Year</rio-option>\n\t\t\t<rio-option value="Last Year">Last Year</rio-option>\n\t\t\t<rio-option value="Q1">Q1</rio-option>\n\t\t\t<rio-option value="Q2">Q2</rio-option>\n\t\t\t<rio-option value="Q3">Q3</rio-option>\n\t\t\t<rio-option value="Q4">Q4</rio-option>\n\t\t\t<rio-option value="Last Q1">Last Q1</rio-option>\n\t\t\t<rio-option value="Last Q2">Last Q2</rio-option>\n\t\t\t<rio-option value="Last Q3">Last Q3</rio-option>\n\t\t\t<rio-option value="Last Q4">Last Q4</rio-option>\n\t\t\t<rio-option value="All">All</rio-option>\n\t\t</rio-select>\n\t',isInline:!0,dependencies:[{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"component",type:i5.RioSelectComponent,selector:"rio-select",inputs:["placeholder","multiple","panelMaxHeight","panelMaxViewportRatio","optionHeight","virtualBuffer","overlayZIndex","autoSizePanel","panelPosition","autoCenterPanel","viewportMargin","panelWidth","panelFullscreenWidth","clearable","templateLabelFromView","searchable","searchMatchMode","defaultSearch","textWrap","compareWith","options","optionLabelKey","optionLabelFn","optionValueKey","optionDisabledKey","optionIdKey","optionGroupKey","disabled","emitOptionObject","debugLog","stickyKey","stickyAutoSave"],outputs:["change"]},{kind:"component",type:i5.RioOptionComponent,selector:"rio-option",inputs:["value","disabled","label","id"]}],changeDetection:i0.ChangeDetectionStrategy.OnPush})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DateShortcutComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"date-shortcut",template:'\n\t\t<label class="form-control-label">Date Shortcuts</label>\n\t\t<rio-select [(ngModel)]="shortcutValue" (change)="onSelectShortcut()" placeholder="Select Shortcut" [clearable]="false">\n\t\t\t<rio-option value="Today">Today</rio-option>\n\t\t\t<rio-option value="Yesterday">Yesterday</rio-option>\n\t\t\t<rio-option value="Week">This Week</rio-option>\n\t\t\t<rio-option value="Last Week">Last Week</rio-option>\n\t\t\t<rio-option value="Month">This Month</rio-option>\n\t\t\t<rio-option value="Last Month">Last Month</rio-option>\n\t\t\t<rio-option value="Last 30 Days">Last 30 Days</rio-option>\n\t\t\t<rio-option value="Quarter">This Quarter</rio-option>\n\t\t\t<rio-option value="Last Quarter">Last Quarter</rio-option>\n\t\t\t<rio-option value="Year">This Year</rio-option>\n\t\t\t<rio-option value="Last Year">Last Year</rio-option>\n\t\t\t<rio-option value="Q1">Q1</rio-option>\n\t\t\t<rio-option value="Q2">Q2</rio-option>\n\t\t\t<rio-option value="Q3">Q3</rio-option>\n\t\t\t<rio-option value="Q4">Q4</rio-option>\n\t\t\t<rio-option value="Last Q1">Last Q1</rio-option>\n\t\t\t<rio-option value="Last Q2">Last Q2</rio-option>\n\t\t\t<rio-option value="Last Q3">Last Q3</rio-option>\n\t\t\t<rio-option value="Last Q4">Last Q4</rio-option>\n\t\t\t<rio-option value="All">All</rio-option>\n\t\t</rio-select>\n\t',changeDetection:ChangeDetectionStrategy.OnPush,standalone:!1}]}],ctorParameters:()=>[{type:ProviderService},{type:i0.ChangeDetectorRef}],propDecorators:{startDateObj:[{type:Input}],endDateObj:[{type:Input}],startDateObjForm:[{type:Input}],endDateObjForm:[{type:Input}],startDateObjChange:[{type:Output}],endDateObjChange:[{type:Output}],startDateObjFormChange:[{type:Output}],endDateObjFormChange:[{type:Output}],datesChanged:[{type:Output}],shortcutValue:[{type:Input}],shortcutValueChange:[{type:Output}]}});class DateShortcutModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DateShortcutModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:DateShortcutModule,declarations:[DateShortcutComponent],imports:[FormsModule,CommonModule,RioSelectModule],exports:[DateShortcutComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DateShortcutModule,imports:[FormsModule,CommonModule,RioSelectModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DateShortcutModule,decorators:[{type:NgModule,args:[{imports:[FormsModule,CommonModule,RioSelectModule],exports:[DateShortcutComponent],declarations:[DateShortcutComponent]}]}]});class SchedulerComponent extends BaseComponent{_services;today=new Date;over_forward=!1;over_backwards=!1;mouseDown=!1;mouseLastEvent=null;timer_sub=null;months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];size_svg={width:0,height:0};size_cell={width:30,height:30};svgChart;constructor(t){super(t),this._services=t}ngAfterViewInit(){this.size_svg.width=this.svgChart.nativeElement.clientWidth,this.size_svg.height=this.svgChart.nativeElement.clientHeight}ngOnDestroy(){this.timer_sub&&clearInterval(this.timer_sub)}onMouseup(){this.mouseDown=!1}onMousedown(t){this.mouseDown=!0,this.mouseLastEvent=t}onMousemove(t){if(this.mouseDown){let e=0;this.mouseLastEvent.clientX-t.clientX>1?e=Math.floor((this.mouseLastEvent.clientX-t.clientX)/15)>0?Math.floor((this.mouseLastEvent.clientX-t.clientX+5*(30-this.size_cell.width))/20):1:this.mouseLastEvent.clientX-t.clientX<-1&&(e=Math.floor((this.mouseLastEvent.clientX-t.clientX)/15)<0?Math.floor((this.mouseLastEvent.clientX-t.clientX-5*(30-this.size_cell.width))/20):-1),this.today=moment$1(this.today).add(e,"days").toDate(),this.mouseLastEvent=t}}onMouseLeave(t){this.mouseDown&&(this.mouseDown=!1)}buildDays(){let t=[];for(let e=0;e<Math.floor(this.size_svg.width/this.size_cell.width);e++)t.push({index:e,day:moment$1(this.today).add(e,"days").toDate().getDate()});return t}buildMonths(){let t=[{index_start:0,index_end:null,month:this.months[this.today.getMonth()]}];for(let e=1;e<Math.floor(this.size_svg.width/this.size_cell.width);e++)moment$1(this.today).add(e,"days").toDate().getMonth()!==moment$1(this.today).add(e-1,"days").toDate().getMonth()&&(t[t.length-1].index_end=e,t.push({index_start:e,index_end:null,month:this.months[moment$1(this.today).add(e,"days").toDate().getMonth()]}));return t[t.length-1].index_end=Math.floor(this.size_svg.width/this.size_cell.width),t}buildYears(){let t=[{index_start:0,index_end:null,year:this.today.getFullYear()}];for(let e=1;e<Math.floor(this.size_svg.width/this.size_cell.width);e++)moment$1(this.today).add(e,"days").toDate().getFullYear()!==moment$1(this.today).add(e-1,"days").toDate().getFullYear()&&(t[t.length-1].index_end=e,t.push({index_start:e,index_end:null,year:moment$1(this.today).add(e,"days").toDate().getFullYear()}));return t[t.length-1].index_end=Math.floor(this.size_svg.width/this.size_cell.width),t}decrementToday(){this.today=moment$1(this.today).subtract(1,"days").toDate()}incrementToday(){this.today=moment$1(this.today).add(1,"days").toDate()}overForward(){this.timer_sub=setInterval(()=>{this.incrementToday()},50)}leftForward(){clearInterval(this.timer_sub)}overBackwards(){this.timer_sub=setInterval(()=>{this.decrementToday()},50)}leftBackwards(){clearInterval(this.timer_sub)}zoomOut(){this.size_cell.width>10&&(this.size_cell.width-=10)}zoomIn(){this.size_cell.width+=10}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SchedulerComponent,deps:[{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:SchedulerComponent,isStandalone:!1,selector:"scheduler",host:{listeners:{mouseup:"onMouseup()",mousedown:"onMousedown($event)",mousemove:"onMousemove($event)",mouseleave:"onMouseLeave($event)"}},providers:[ProviderService],viewQueries:[{propertyName:"svgChart",first:!0,predicate:["svgChart"],descendants:!0,static:!0}],usesInheritance:!0,ngImport:i0,template:'<style>\n\t.bar {\n\t\tfill: red; /* changes the background */\n\t\theight: 21px;\n\t\ttransition: fill 0.3s ease;\n\t\tcursor: pointer;\n\t\tfont-family: Helvetica, sans-serif;\n\t}\n\n\t.bar text {\n\t\tcolor: black;\n\t}\n\n\t.bar:hover,\n\t.bar:focus {\n\t\tfill: black;\n\t}\n\n\t.bar:hover text,\n\t.bar:focus text {\n\t\tfill: red;\n\t}\n\n\t.year {\n\t\tstroke: black;\n\t\tfill: white;\n\t}\n\n\t.month {\n\t\tstroke: black;\n\t\tfill: white;\n\t}\n\n\t.day {\n\t\tstroke: black;\n\t\tfill: white;\n\t}\n\n\t.smallText {\n\t\tfont-size: 4px;\n\t}\n</style>\n\n<div class="scheduler">\n\t<button class="btn btn-warning" type="button" (mouseenter)="overBackwards()" (mouseleave)="leftBackwards()">Go Backwards</button>\n\t<button class="btn btn-success" type="button" (mouseenter)="overForward()" (mouseleave)="leftForward()">Go Forward</button>\n\n\t<button style="margin-left: 20px" class="btn btn-warning" type="button" (click)="zoomOut()">Zoom Out</button>\n\t<button class="btn btn-success" type="button" (click)="zoomIn()">Zoom In</button>\n\n\t<svg class="chart" width="100%" height="100%" aria-labelledby="title desc" role="img" #svgChart>\n\t\t<title id="title">Scheduler</title>\n\t\t<desc id="desc">Scheduler</desc>\n\n\t\t<g class="year">\n\t\t\t@for (year of buildYears(); track year;) {\n\t\t\t\t<ng-container>\n\t\t\t\t\t<rect [attr.width]="(year.index_end - year.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="year.index_start * size_cell.width"></rect>\n\t\t\t\t\t<svg [attr.width]="(year.index_end - year.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="year.index_start * size_cell.width">\n\t\t\t\t\t\t<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">{{ year.year }}</text>\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t}\n\t\t</g>\n\t\t<g class="month">\n\t\t\t@for (month of buildMonths(); track month;) {\n\t\t\t\t<ng-container>\n\t\t\t\t\t<rect [attr.width]="(month.index_end - month.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="month.index_start * size_cell.width" [attr.y]="size_cell.height"></rect>\n\t\t\t\t\t<svg [attr.width]="(month.index_end - month.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="month.index_start * size_cell.width" [attr.y]="size_cell.height">\n\t\t\t\t\t\t<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">{{ month.month }}</text>\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t}\n\t\t</g>\n\t\t<g class="day">\n\t\t\t@for (day of buildDays(); track day;) {\n\t\t\t\t<ng-container>\n\t\t\t\t\t<rect [attr.width]="size_cell.width" [attr.height]="size_cell.height" [attr.x]="day.index * size_cell.width" [attr.y]="size_cell.height * 2"></rect>\n\t\t\t\t\t<svg [attr.width]="size_cell.width" [attr.height]="size_cell.height" [attr.x]="day.index * size_cell.width" [attr.y]="size_cell.height * 2">\n\t\t\t\t\t\t<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle" [style.font-size.px]="[size_cell.width > 10 ? 12 : 6]">{{ day.day }}</text>\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t}\n\t\t</g>\n\n\t\t\x3c!-- <g class="bar">\n\t<rect width="40" height="19"></rect>\n\t<text x="45" y="9.5" dy=".35em">4 apples</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="80" height="19" y="20"></rect>\n\t<text x="85" y="28" dy=".35em">8 bananas</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="150" height="19" y="40"></rect>\n\t<text x="150" y="48" dy=".35em">15 kiwis</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="160" height="19" y="60"></rect>\n\t<text x="161" y="68" dy=".35em">16 oranges</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="230" height="19" y="80"></rect>\n\t<text x="235" y="88" dy=".35em">23 lemons</text>\n\t</g> --\x3e\n\t</svg>\n</div>\n',styles:[".bar{fill:red;height:21px;transition:fill .3s ease;cursor:pointer;font-family:Helvetica,sans-serif}.bar text{color:#000}.bar:hover,.bar:focus{fill:#000}.bar:hover text,.bar:focus text{fill:red}.year,.month,.day{stroke:#000;fill:#fff}.smallText{font-size:4px}\n"]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SchedulerComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"scheduler",standalone:!1,template:'<style>\n\t.bar {\n\t\tfill: red; /* changes the background */\n\t\theight: 21px;\n\t\ttransition: fill 0.3s ease;\n\t\tcursor: pointer;\n\t\tfont-family: Helvetica, sans-serif;\n\t}\n\n\t.bar text {\n\t\tcolor: black;\n\t}\n\n\t.bar:hover,\n\t.bar:focus {\n\t\tfill: black;\n\t}\n\n\t.bar:hover text,\n\t.bar:focus text {\n\t\tfill: red;\n\t}\n\n\t.year {\n\t\tstroke: black;\n\t\tfill: white;\n\t}\n\n\t.month {\n\t\tstroke: black;\n\t\tfill: white;\n\t}\n\n\t.day {\n\t\tstroke: black;\n\t\tfill: white;\n\t}\n\n\t.smallText {\n\t\tfont-size: 4px;\n\t}\n</style>\n\n<div class="scheduler">\n\t<button class="btn btn-warning" type="button" (mouseenter)="overBackwards()" (mouseleave)="leftBackwards()">Go Backwards</button>\n\t<button class="btn btn-success" type="button" (mouseenter)="overForward()" (mouseleave)="leftForward()">Go Forward</button>\n\n\t<button style="margin-left: 20px" class="btn btn-warning" type="button" (click)="zoomOut()">Zoom Out</button>\n\t<button class="btn btn-success" type="button" (click)="zoomIn()">Zoom In</button>\n\n\t<svg class="chart" width="100%" height="100%" aria-labelledby="title desc" role="img" #svgChart>\n\t\t<title id="title">Scheduler</title>\n\t\t<desc id="desc">Scheduler</desc>\n\n\t\t<g class="year">\n\t\t\t@for (year of buildYears(); track year;) {\n\t\t\t\t<ng-container>\n\t\t\t\t\t<rect [attr.width]="(year.index_end - year.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="year.index_start * size_cell.width"></rect>\n\t\t\t\t\t<svg [attr.width]="(year.index_end - year.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="year.index_start * size_cell.width">\n\t\t\t\t\t\t<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">{{ year.year }}</text>\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t}\n\t\t</g>\n\t\t<g class="month">\n\t\t\t@for (month of buildMonths(); track month;) {\n\t\t\t\t<ng-container>\n\t\t\t\t\t<rect [attr.width]="(month.index_end - month.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="month.index_start * size_cell.width" [attr.y]="size_cell.height"></rect>\n\t\t\t\t\t<svg [attr.width]="(month.index_end - month.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="month.index_start * size_cell.width" [attr.y]="size_cell.height">\n\t\t\t\t\t\t<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">{{ month.month }}</text>\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t}\n\t\t</g>\n\t\t<g class="day">\n\t\t\t@for (day of buildDays(); track day;) {\n\t\t\t\t<ng-container>\n\t\t\t\t\t<rect [attr.width]="size_cell.width" [attr.height]="size_cell.height" [attr.x]="day.index * size_cell.width" [attr.y]="size_cell.height * 2"></rect>\n\t\t\t\t\t<svg [attr.width]="size_cell.width" [attr.height]="size_cell.height" [attr.x]="day.index * size_cell.width" [attr.y]="size_cell.height * 2">\n\t\t\t\t\t\t<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle" [style.font-size.px]="[size_cell.width > 10 ? 12 : 6]">{{ day.day }}</text>\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t}\n\t\t</g>\n\n\t\t\x3c!-- <g class="bar">\n\t<rect width="40" height="19"></rect>\n\t<text x="45" y="9.5" dy=".35em">4 apples</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="80" height="19" y="20"></rect>\n\t<text x="85" y="28" dy=".35em">8 bananas</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="150" height="19" y="40"></rect>\n\t<text x="150" y="48" dy=".35em">15 kiwis</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="160" height="19" y="60"></rect>\n\t<text x="161" y="68" dy=".35em">16 oranges</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="230" height="19" y="80"></rect>\n\t<text x="235" y="88" dy=".35em">23 lemons</text>\n\t</g> --\x3e\n\t</svg>\n</div>\n'}]}],ctorParameters:()=>[{type:ProviderService}],propDecorators:{svgChart:[{type:ViewChild,args:["svgChart",{static:!0}]}],onMouseup:[{type:HostListener,args:["mouseup"]}],onMousedown:[{type:HostListener,args:["mousedown",["$event"]]}],onMousemove:[{type:HostListener,args:["mousemove",["$event"]]}],onMouseLeave:[{type:HostListener,args:["mouseleave",["$event"]]}]}});class SchedulerModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SchedulerModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:SchedulerModule,declarations:[SchedulerComponent],imports:[NgbModule,FormsModule,CommonModule,RouterModule],exports:[SchedulerComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SchedulerModule,imports:[NgbModule,FormsModule,CommonModule,RouterModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SchedulerModule,decorators:[{type:NgModule,args:[{imports:[NgbModule,FormsModule,CommonModule,RouterModule],exports:[SchedulerComponent],declarations:[SchedulerComponent],providers:[]}]}]});const ReportBuilderModulePermission={name:"report-builder",gate:"report-builder",views:[{link:"/report-builder/list",label:"List"},{link:"/report-builder/new",label:"New"},{link:"/report-builder/scheduled-job",label:"Scheduled Job"},{link:"/report-builder/dashboard-builder",label:"Dashboard Builder"},{link:"/report-builder/detail",label:"Detail",has_parameter:!0},{link:"/report-builder/edit",label:"Edit",has_parameter:!0},{link:"/report-builder/delete",label:"Delete",has_parameter:!0}]},MongoExplorerModulePermission={name:"mongo-explorer",gate:"mongo-explorer",views:[{link:"/super-admin/mongo-explorer",label:"Mongo Explorer"}]},SuperAdminModulePermission={name:"super-admin",views:[{link:"/super-admin/dashboard",label:"Dashboard"},{link:"/super-admin/apm",label:"APM"},{link:"/super-admin/mongo",label:"Mongo"},{link:"/super-admin/mongo-explorer",label:"Mongo Explorer",gate:"mongo-explorer"},{link:"/super-admin/monitor",label:"Monitor"}]};export{AccountManagerService,AiAssistantComponent,AiFormAutoRegisterDirective,AiFormRegistryService,AiPageFormAdapterService,AiPageRouterService,AiTerminalComponent,AiTerminalModule,AiTerminalService,AlertService,Auth365Component,AuthGuard,AuthPermissionService,AuthService,AwsService,BaseComponent,CanDeactivateGuard,CollapseTableComponent,CollapseTableModule,CoreAuthModule,CoreComponent,CoreDialogModule,CoreLoggerModule,CoreModule,CoreService,CoreServicesModule,CoreShellModule,DatatableComponent,DatatableModule,DateShortcutComponent,DateShortcutModule,DialogConfirmContent,DialogErrorContent,DialogInputContent,DialogLoginContent,DialogNotifyContent,DialogRegisterContent,DialogSelectArrayContent,DialogSelectArrayObjsContent,DialogSelectDataLabelsContent,DialogSelectDateTimeContent,DialogSelectWithButtonsURLContent,DialogService,DomSanitizorPipe,Draggable,DropEvent,Droppable,EnrollComponent,FeatureGateService,FileModule,FileUploadComponent,FilterEqualPipe,FilterNotEqualPipe,FocusDirective,ForgotPasswordComponent,FormButtonComponent,FormButtonModule,HomeComponent,HtmlDiffViewerComponent,JsonParsePipe,LoggerComponent,MinusCurrencyPipe,MongoExplorerModulePermission,NavbarMainComponent,NavbarModuleComponent,NgDragDropModule,NgDragDropService,OfflineManagerService,PhonePipe,PipeModule,ProviderService,ReportBuilderModulePermission,ResizeService,ResponsiveButtonGroupComponent,ResponsiveButtonGroupModule,ReversePipe,SchedulerComponent,SchedulerModule,ScrollDirective,SharedModule,SocketManagerService,SocketService,SortTableDirective,SortTableHeaderComponent,SortTableModule,SortTableNgForComponent,Sortable as SortableJs,SortablejsDirective,SortablejsModule,StorageDB,SuperAdminModulePermission,TitleCaseAndUnderscorePipe,TokenManagerService,UserRoleComponent,UserRoleModule,ValidationService,WindowRefService,applyMongoUpdate,b64toBlobURL,blobToFile,dateOnlyStartOfDayTz,dateReviver,deepCopy,deepDiffDetails,exportCsv,generateCronStringFromDate,isUpperCase,mergeDeep,momentTz,pad,rioDatePickerConfigFactory,round,s2ab,toDataURL,toTitleCase,type};
|
|
1
|
+
import*as i0 from"@angular/core";import{Injectable,HostListener,Input,Component,Directive,ViewChild,ChangeDetectionStrategy,Pipe,LOCALE_ID,Inject,EventEmitter,Output,ViewChildren,ElementRef,NgModule,Optional,ViewEncapsulation,InjectionToken,HostBinding}from"@angular/core";import{BehaviorSubject,Subject,fromEvent,ReplaySubject,merge,Observable,of}from"rxjs";import*as i1$4 from"ngx-device-detector";import{DeviceDetectorService}from"ngx-device-detector";import{debounceTime,finalize,map}from"rxjs/operators";import*as i2 from"@angular/forms";import{UntypedFormControl,Validators,FormGroup,FormArray,FormsModule,ReactiveFormsModule}from"@angular/forms";import*as i1 from"ngx-toastr";import{ToastrModule}from"ngx-toastr";import moment from"moment-timezone";import{unpack,pack}from"msgpackr";import{detailedDiff}from"deep-object-diff";import*as CryptoJS from"crypto-js";import*as i1$1 from"@angular/router";import{RouterModule}from"@angular/router";import*as i4 from"@angular/common/http";import{HttpHeaders,provideHttpClient,withInterceptorsFromDi}from"@angular/common/http";import*as i1$2 from"@ng-bootstrap/ng-bootstrap";import{NgbTooltipModule,NgbModule,NgbAccordionModule,NgbModalModule}from"@ng-bootstrap/ng-bootstrap";import*as i7 from"@angular/common";import{getCurrencySymbol,formatDate,formatPercent,formatCurrency,formatNumber,CommonModule}from"@angular/common";import*as i5 from"@resolveio/client-lib-rio-select";import{RioSelectModule,RIO_SELECT_STICKY_ADAPTER}from"@resolveio/client-lib-rio-select";import*as i7$1 from"@resolveio/client-lib-date-picker";import{RioDatePickerModule,RIO_DATE_PICKER_CONFIG}from"@resolveio/client-lib-date-picker";import{UserAgentApplication}from"msal";import*as i1$3 from"@angular/platform-browser";import{BrowserAnimationsModule}from"@angular/platform-browser/animations";import moment$1 from"moment";import*as i7$2 from"ngx-file-drop";import{NgxFileDropModule}from"ngx-file-drop";import*as i8 from"@resolveio/client-lib-pdf-viewer";import{PdfViewerModule}from"@resolveio/client-lib-pdf-viewer";class CoreService{isDevice=new BehaviorSubject(!1);fullScreen=new BehaviorSubject(!1);fsActivated=new BehaviorSubject(!1);hasConnected=new BehaviorSubject(!1);navbarModuleData=new BehaviorSubject({title:"",module:"",description:"",description_name:"",tabs:[]});hasStatusMessage=new BehaviorSubject(!1);alertData=new BehaviorSubject({type:"",message:"",timer:0,showing:!1});isInvalidSW=new BehaviorSubject(!1);environment=new BehaviorSubject(null);client=new BehaviorSubject("");publicProgram=new BehaviorSubject(!1);navTabs=new BehaviorSubject([]);tourStops=new BehaviorSubject([]);tourStarted=new BehaviorSubject(!1);isDemo=new BehaviorSubject(!1);isLoggingOut=new BehaviorSubject(!1);constructor(){}setFullScreen(t){this.fullScreen.next(t)}setFsActivated(t){this.fsActivated.next(t)}setHasConnected(t){this.hasConnected.next(t)}setNavbarModuleData(t){const e=t.tabs.filter(t=>null===t.params).concat(t.tabs.filter(t=>null!==t.params)),n={...t,tabs:e};Promise.resolve().then(()=>this.navbarModuleData.next(n))}setHasStatusMessage(t){this.hasStatusMessage.next(t)}setIsDevice(t){this.isDevice.next(t)}setIsInvalidSW(t){this.isInvalidSW.next(t)}setEnvironment(t){this.environment.next(t)}setClient(t){this.client.next(t)}setPublicProgram(t){this.publicProgram.next(t)}setNavTabs(t){const e=Array.isArray(t)?t.slice():t;Promise.resolve().then(()=>this.navTabs.next(e))}setTourStops(t){this.tourStops.next(t)}setTourStarted(t){this.tourStarted.next(t)}setDemo(t){this.isDemo.next(t)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreService,providedIn:"root"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}],ctorParameters:()=>[]});class ResizeService{get onResize$(){return this.resizeSubject.asObservable()}resizeSubject;subscription;constructor(){this.resizeSubject=new Subject,"undefined"!=typeof window&&(this.subscription=fromEvent(window,"resize").pipe(debounceTime(150)).subscribe(t=>this.onResize(t)))}onResize(t){this.resizeSubject.next(t.target)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResizeService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResizeService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResizeService,decorators:[{type:Injectable}],ctorParameters:()=>[]});class AlertService{_toastr;constructor(t){this._toastr=t}clearAlert(t){t?this._toastr.clear(t):this._toastr.clear()}registerTapToClear(t){return t&&t.onTap&&t.onTap.subscribe(()=>this._toastr.clear(t.toastId)),t}titleForType(t){return"success"===t?"Success":"info"===t?"Info":"warning"===t?"Warning":"error"===t?"Error":"update"===t?"Update":"Info"}updateAlert(t,e,n="info",o=0){const r=t?.toastRef?.componentInstance;return r?(r.message=e,void 0!==r.title&&(r.title=this.titleForType(n)),t):(t?.toastId&&this._toastr.clear(t.toastId),this.setAlert(n,e,o))}setAlert(t,e,n=5e3){return"success"===t?n?this.registerTapToClear(this._toastr.success(e,"Success",{timeOut:n,tapToDismiss:!0})):this.registerTapToClear(this._toastr.success(e,"Success",{disableTimeOut:!0,tapToDismiss:!0})):"info"===t?n?this.registerTapToClear(this._toastr.info(e,"Info",{timeOut:n,tapToDismiss:!0})):this.registerTapToClear(this._toastr.info(e,"Info",{disableTimeOut:!0,tapToDismiss:!0})):"warning"===t?n?this.registerTapToClear(this._toastr.warning(e,"Warning",{timeOut:n,tapToDismiss:!0})):this.registerTapToClear(this._toastr.warning(e,"Warning",{disableTimeOut:!0,tapToDismiss:!0})):"error"===t?n?this.registerTapToClear(this._toastr.error(e,"Error",{timeOut:n,tapToDismiss:!0})):this.registerTapToClear(this._toastr.error(e,"Error",{disableTimeOut:!0,tapToDismiss:!0})):"update"===t?this.registerTapToClear(this._toastr.show(e,"Update",{disableTimeOut:!0,tapToDismiss:!0,toastClass:"ngx-toastr toast-secondary"})):void 0}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AlertService,deps:[{token:i1.ToastrService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AlertService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AlertService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:i1.ToastrService}]});class LocalStorageService{get(t){return"undefined"==typeof localStorage?null:localStorage.getItem(t)}set(t,e){"undefined"!=typeof localStorage&&localStorage.setItem(t,e)}remove(t){"undefined"!=typeof localStorage&&localStorage.removeItem(t)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:LocalStorageService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:LocalStorageService,providedIn:"root"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:LocalStorageService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}]});class SocketService{_storage;debug=!1;reconnectInterval=1e3;timeoutInterval=5e3;timeout=null;readyState;readyState$=new BehaviorSubject(0);protocols=[];ws=null;url;timezone;pingInterval=null;pongTimeout=null;pingIntervalTime=15e3;pongTimeoutTime=12e3;lastActivity=Date.now();missedPongs=0;maxMissedPongs=3;wakeReconnectThreshold=3e5;focusReconnectDebounce=null;onopen=t=>{};onclose=t=>{};onconnecting=()=>{};onmessage=t=>{};onerror=t=>{};constructor(t){this._storage=t,"undefined"!=typeof document&&document.addEventListener("visibilitychange",this.handleVisibilityChange),"undefined"!=typeof window&&window.addEventListener("focus",this.handleWindowFocus)}openSocket(t,e){this.url=t.WS_URL,this.protocols=e,this.timezone=t.TZ_CLIENT,this.connect()}onOpenHandler=t=>{this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.log(new Date,"WS","onopen",this.url),this.readyState=WebSocket.OPEN,this.readyState$.next(this.readyState),this.recordActivity(),this.onopen(t),this.startPinging()};onCloseHandler=t=>{this.ws&&this.readyState!==WebSocket.CLOSED&&(this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.ws.removeEventListener("open",this.onOpenHandler),this.ws.removeEventListener("close",this.onCloseHandler),this.ws.removeEventListener("message",this.onMessageHandler),this.ws.removeEventListener("error",this.onErrorHandler),this.ws=null,this.readyState=WebSocket.CLOSED,this.readyState$.next(this.readyState),this.log(new Date,"WS","onclose",this.url),this.onclose(t),setTimeout(()=>this.connect(),this.reconnectInterval),this.stopPinging())};onMessageHandler=t=>{if(this.recordActivity(),"pong"===t.data)return void this.log(new Date,"WS","pong received");if("ping"===t.data)return this.log(new Date,"WS","ping received"),void this.send("pong");const e=(t,e=0,n)=>{const o=void 0!==n?new Uint8Array(t,e,n):new Uint8Array(t,e);try{let t=unpack(o);t=this.convertUTCDateToLocalDate(t),this.onmessage(t)}catch(t){this.log(new Date,"WS","failed to unpack payload",t);try{const t=(new TextDecoder).decode(o),e=JSON.parse(t),n=this.convertUTCDateToLocalDate(e);this.onmessage(n)}catch(t){this.log(new Date,"WS","unable to fallback decode payload",t)}}};if(t.data instanceof ArrayBuffer)e(t.data);else if(ArrayBuffer.isView(t.data)){const n=t.data;e(n.buffer,n.byteOffset,n.byteLength)}else if(t.data instanceof Blob)t.data.arrayBuffer().then(t=>e(t)).catch(t=>this.log(new Date,"WS","failed to decode blob payload",t));else if("string"==typeof t.data)try{const e=JSON.parse(t.data),n=this.convertUTCDateToLocalDate(e);this.onmessage(n)}catch(e){this.log(new Date,"WS","failed to parse text payload",e),this.onmessage(this.convertUTCDateToLocalDate(t.data))}else this.log(new Date,"WS","unsupported message type",typeof t.data,t.data)};onErrorHandler=t=>{this.log(new Date,"WS","onerror",this,t),this.onerror(t),this.reconnect()};connect(){!this.ws&&this.readyState!==WebSocket.CONNECTING&&this._storage.get("accessToken")&&(this.readyState=WebSocket.CONNECTING,this.readyState$.next(this.readyState),this.timeout&&clearTimeout(this.timeout),this.ws=new WebSocket(this.url,this.protocols),this.ws.binaryType="arraybuffer",this.onconnecting(),this.log(new Date,"WS","attempt-connect",this.url),this.timeout=setTimeout(()=>{this.log(new Date,"WS","connection-timeout",this.url),this.close()},this.timeoutInterval),this.ws.onopen=this.onOpenHandler,this.ws.onclose=this.onCloseHandler,this.ws.onmessage=this.onMessageHandler,this.ws.onerror=this.onErrorHandler)}convertUTCDateToLocalDate(t){if(Array.isArray(t))return t.map(t=>this.convertUTCDateToLocalDate(t));if(t&&"object"==typeof t)return Object.keys(t).reduce((e,n)=>(e[n]=this.convertUTCDateToLocalDate(t[n]),e),t);if("string"==typeof t){if(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/.test(t))return new Date(t)}return t}clearPongTimeout(){this.pongTimeout&&(clearTimeout(this.pongTimeout),this.pongTimeout=null)}recordActivity(){this.lastActivity=Date.now(),this.missedPongs=0,this.clearPongTimeout()}schedulePongTimeout(){this.clearPongTimeout(),this.pongTimeout=setTimeout(()=>{this.handleMissedPong()},this.pongTimeoutTime)}handleMissedPong(){this.pongTimeout=null,this.missedPongs++,this.log(new Date,"WS","pong not received",this.missedPongs,"/",this.maxMissedPongs),this.missedPongs>=this.maxMissedPongs&&(this.log(new Date,"WS","max missed pongs reached, closing connection"),this.reconnect())}startPinging(){this.stopPinging(),this.pingInterval=setInterval(()=>{if(!this.isWebSocketActive())return void this.reconnect();Date.now()-this.lastActivity<this.pingIntervalTime||this.pongTimeout||this.send("ping")&&this.schedulePongTimeout()},this.pingIntervalTime)}stopPinging(){this.pingInterval&&(clearInterval(this.pingInterval),this.pingInterval=null),this.clearPongTimeout(),this.missedPongs=0}convertDatesToUTC(t,e=new WeakSet){"object"!=typeof t||null===t||e.has(t)||(e.add(t),Object.keys(t).forEach(n=>{if(t[n]instanceof Date){let e=t[n];this.timezone&&this.isLocalMidnight(e)&&(e=moment.tz({year:e.getFullYear(),month:e.getMonth(),date:e.getDate()},this.timezone).startOf("day").toDate()),t[n]=moment(e).utc().toDate()}else"object"==typeof t[n]&&null!==t[n]&&this.convertDatesToUTC(t[n],e)}))}isLocalMidnight(t){return 0===t.getHours()&&0===t.getMinutes()&&0===t.getSeconds()&&0===t.getMilliseconds()}send(...t){if(!this.isWebSocketActive())return this.log(new Date,"WS","send error",this.readyState),this.reconnect(),!1;t.forEach(t=>this.convertDatesToUTC(t));const e=1===t.length?t[0]:t;if("string"==typeof e)this.ws.send(e);else{const t=pack(e);this.ws.send(t)}return!0}close(){return!!this.ws&&(this.log(new Date,"WS","closing socket"),this.readyState=WebSocket.CLOSING,this.readyState$.next(this.readyState),this.ws.close(),!0)}reconnect(){this.log(new Date,"WS","reconnect",this.readyState),this.readyState!==WebSocket.CONNECTING&&this.close()}getBufferAmount(){return this.ws?this.ws.bufferedAmount:20480}log(...t){this.debug&&console.log(...t)}handleVisibilityChange=()=>{"visible"===document.visibilityState&&this.handleWindowFocus()};handleWindowFocus=()=>{this.focusReconnectDebounce&&clearTimeout(this.focusReconnectDebounce),this.focusReconnectDebounce=setTimeout(()=>{if(this.focusReconnectDebounce=null,!this.isWebSocketActive())return void this.reconnect();Date.now()-this.lastActivity>this.wakeReconnectThreshold?this.reconnect():this.send("ping")},200)};isWebSocketActive(){return!!this.ws&&this.ws.readyState===WebSocket.OPEN}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SocketService,deps:[{token:LocalStorageService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SocketService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SocketService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:LocalStorageService}]});const isObject$1=t=>t instanceof Object&&"Object"===t.constructor.name;function round(t,e=0){const n=Math.pow(10,e);return Math.round(t*n+1e-6)/n}function toTitleCase(t){return t.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()})}function isUpperCase(t){return/^[A-Z]*$/.test(t)}function pad(t,e){let n=t+"";for(;n.length<e;)n="0"+n;return n}function deepCopy(t){return JSON.parse(JSON.stringify(t),dateReviver)}function dateReviver(t,e){if("string"==typeof e){let t=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(e);if(t)return new Date(Date.UTC(+t[1],+t[2]-1,+t[3],+t[4],+t[5],+t[6].split(".")[0],+t[6].split(".")[1]))}return e}function momentTz(t,e){return t?null!=e?moment(e).tz(t):moment.tz(t):null!=e?moment(e):moment()}function dateOnlyStartOfDayTz(t,e){return t?e?t instanceof Date?moment.tz({year:t.getFullYear(),month:t.getMonth(),date:t.getDate()},e).startOf("day").toDate():"object"==typeof t&&t.year&&t.month&&t.day?moment.tz({year:t.year,month:t.month-1,date:t.day},e).startOf("day").toDate():momentTz(e,t).startOf("day").toDate():moment(t).startOf("day").toDate():null}function b64toBlobURL(t,e,n){t=t.replace("data:application/pdf;base64,",""),e=e||"",n=n||512;let o=atob(t),r=[];for(let t=0;t<o.length;t+=n){let e=o.slice(t,t+n),i=new Array(e.length);for(let t=0;t<e.length;t++)i[t]=e.charCodeAt(t);let s=new Uint8Array(i);r.push(s)}let i=new Blob(r,{type:e});return URL.createObjectURL(i)}function blobToFile(t,e){return t.lastModifiedDate=new Date,t.name=e,t}function toDataURL(t,e){let n=new XMLHttpRequest;n.onload=function(){let t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n.response)},n.open("GET",t),n.responseType="blob",n.send()}function deepDiffDetails(t,e){let n=deepCopy(t),o=deepCopy(e),r=detailedDiff(n,o),i="";const s=t=>t instanceof Date?moment(t).format("llll"):"object"==typeof t&&null!==t?(Object.keys(t).filter(t=>t.startsWith("_id")||t.startsWith("id_")).forEach(e=>{delete t[e]}),JSON.stringify(t)):"string"==typeof t?`"${t}"`:String(t),a=(t,e)=>null===t||null===e||"object"!=typeof t||"object"!=typeof e?`from: ${s(t)} to: ${s(e)}`:Array.isArray(t)||Array.isArray(e)?((t,e)=>{let n=[];const o=Math.max(t.length,e.length);for(let r=0;r<o;r++)t[r]&&!e[r]?n.push(`Removed at index ${r}: ${s(t[r])}`):!t[r]&&e[r]?n.push(`Added at index ${r}: ${s(e[r])}`):t[r]&&e[r]&&JSON.stringify(t[r])!==JSON.stringify(e[r])&&n.push(`Changed at index ${r}: {${a(t[r],e[r])}}`);return n.join(", ")})(Array.isArray(t)?t:[],Array.isArray(e)?e:[]):Object.keys({...t,...e}).filter(t=>!t.startsWith("_id")&&!t.startsWith("id_")).map(n=>{const o=t?t[n]:void 0,r=e?e[n]:void 0;return`${toTitleCase(n)}: ${a(o,r)}`}).join(", ");return["added","deleted","updated"].forEach(t=>{if(Object.keys(r[t]).length>0){const e=Object.keys(r[t]).filter(e=>"added"===t||("deleted"===t?!r.added[e]:!r.added[e]&&!r.deleted[e])).filter(t=>!t.startsWith("_id")&&!t.startsWith("id_")).map(t=>`\n${toTitleCase(t)}: ${a(n[t],o[t])}`).join(",");i+=e?`${e}`:""}}),i}function generateCronStringFromDate(t){return t.getSeconds()+" "+t.getMinutes()+" "+t.getHours()+" "+t.getDate()+" "+(t.getMonth()+1)+" "+t.getDay()}function s2ab(t){let e=new ArrayBuffer(t.length),n=new Uint8Array(e);for(let e=0;e!==t.length;++e)n[e]=255&t.charCodeAt(e);return e}function mergeDeep(t,...e){if(!e.length)return t;const n=e.shift();if(isObject$1(t)&&isObject$1(n))for(const e in n)isObject$1(n[e])?(t[e]||Object.assign(t,{[e]:{}}),mergeDeep(t[e],n[e])):Object.assign(t,{[e]:n[e]});return mergeDeep(t,...e)}function applyMongoUpdate(t,e){const n=deepCopy(t);return e&&(e.$rename&&handleRename(t,e.$rename),e.$set&&handleSet(t,e.$set),e.$inc&&handleInc(t,e.$inc),e.$unset&&handleUnset(t,e.$unset),e.$pull&&handlePull(t,n,e.$pull),e.$push&&handlePush(t,e.$push)),t}function handleRename(t,e){for(const n in e){const o=e[n],[r,i]=resolve(t,n),[s,a]=resolve(t,o);r&&1===i.length?s&&1===a.length?(s[a[0]]=r[i[0]],delete r[i[0]]):logError(s,a,t,o):logError(r,i,t,n)}}function handleSet(t,e){for(const n in e){const o=e[n],[r,i]=resolve(t,n,{force:!0});r&&1===i.length?r[i[0]]=o:logError(r,i,t,n)}}function handleInc(t,e){for(const n in e){const o=e[n],[r,i]=resolve(t,n,{force:!0});r&&1===i.length?r[i[0]]=(r[i[0]]||0)+o:logError(r,i,t,n)}}function handleUnset(t,e){for(const n in e){const[e,o]=resolve(t,n);e&&1===o.length?delete e[o[0]]:logError(e,o,t,n)}}function handlePull(t,e,n){for(const o in n){const r=n[o];for(let n of r){const[r,i]=resolve(t,o),[s,a]=resolve(e,o);r&&1===i.length?r[i[0]].splice(s[a[0]].findIndex(t=>JSON.stringify(t)===JSON.stringify(n)),1):logError(r,i,t,o)}}}function handlePush(t,e){for(const n in e){const o=e[n];for(let e of o){const[o,r]=resolve(t,n);o&&1===r.length?o[r[0]].push(e):logError(o,r,t,n)}}}function logError(t,e,n,o){console.log("Error",t+"/"+e+" - couldn't resolve for "+JSON.stringify(n)+" "+o)}function resolve(t,e,n={}){const o=arrize(e);let r=[];o.length>0&&r.unshift(o.pop());let i=t;for(;o.length>0;){const t=o.shift();if(void 0!==i[t])i=i[t];else{if(!n.force){r.unshift(t),r=o.concat(r);break}const e="number"==typeof o[0],s=0===o.length&&"number"==typeof r[0];i[t]=e||s?[]:{},i=i[t]}}return[i,r]}function arrize(t,e="."){return Array.isArray(t)?t.slice():null==t||!1===t||""===t?[]:t.toString().split(e).map(t=>[void 0,null,!1,""].includes(t)?null:t.toString()).filter(t=>null!==t)}class StorageDB{storage=null;database=null;primaryKey=null;secretKey=null;sep="";constructor(t){t=t||{},this.storage=t.storage||window&&window.localStorage,this.database=t.database||"db",this.primaryKey=t.primaryKey||"_id",this.sep=t.sep||":",this.secretKey=t.secretKey||"",isSupported(this.storage)||(this.storage=null)}encryptData(t){const e=JSON.stringify(t);return CryptoJS.AES.encrypt(e,this.secretKey).toString()}decryptData(t){const e=CryptoJS.AES.decrypt(t,this.secretKey);try{const t=e.toString(CryptoJS.enc.Utf8);return JSON.parse(t,dateReviver)}catch(t){return null}}get(t,e){return new Collection(this,t,e)}getCollections(){let t=[];return Object.keys(this.storage).filter(t=>t.split(":").length>2).forEach(e=>{t.some(t=>t===e.split(":")[1])||t.push(e.split(":")[1])}),t}collection(t,e){return this.get(t,e)}}class Collection{name="";storage=null;path="";primaryKey="";cache={};cacheable=!1;db=null;constructor(t,e,n){n=n||{},this.name=e,this.storage=t.storage||new MockStorage,this.path=t.database+t.sep+e+t.sep,this.primaryKey=n.primaryKey||t.primaryKey,this.cache={},this.cacheable=!t.storage,this.db=t}_initCache(){let t={},e=new RegExp("^"+this.path);for(let n of Object.keys(this.storage))if(e.test(n)){const e=this.storage.getItem(n);t[n]=this.db.decryptData(e)}this.cache=t,this.cacheable=!0}_filter(t,e){e.type=e.type||"data",e.multi=e.multi||!1,this.cacheable||this._initCache();let n,o=[],r="id"===e.type;if("string"==typeof t)t=new RegExp(t);else if("function"==typeof t)n=!0;else if(!t){let t=r?Object.keys(this.cache):Object.values(this.cache);return e.multi?t:t[0]||null}for(let i of Object.keys(this.cache)){let s=this.cache[i];if(n){if(t(i,s.data)){let t=r?i:s;if(!e.multi)return t;o.push(t)}}else if(t.test(i)){let t=r?i:s;if(!e.multi)return t;o.push(t)}}return e.multi?o:null}insert(t,e,n){let o=t instanceof Array;if(o){if(0===t.length)return[]}else t=[t];let r=this.primaryKey,i=this.cacheable;for(let n of t){if(!isObject(n))throw new Error("TypeError: insert data must be an object or an object array");void 0===n[r]&&(n[r]=(new ID).toString());let t=new Date,o={offlineDate:t,offlineDateExpires:e||new Date(t.getTime()+6048e5),data:n};const s=this.db.encryptData(o);i&&(this.cache[this.path+n[r]]=o),this.storage.setItem(this.path+n[r],s)}return o?t.map(t=>t._id):t[0]._id}find(t,e,n){let o;t=t||{},(e=e||{}).skip=e.skip||0,e.limit=e.limit,e.sort=e.sort;let r=isObject(t)?null:t instanceof Array?t:[t],i={type:e._filterType||"data",multi:!0};if(r){let t=new RegExp("^"+this.path+"("+r.join("|")+")$");o=this._filter(t,i)}else o=Object.keys(t).length?this._filter((e,n)=>queryMatch(t,n),i):this._filter(null,i);return n||(o=o.map(t=>t.data)),e.sort&&o.sort((t,n)=>sortCompare(e.sort,t,n)),e.limit?o=o.slice(e.skip,e.skip+e.limit):e.skip&&(o=o.slice(e.skip)),o}findOne(t,e){let n;e=e||{};let o=isObject(t=t||{})?null:t,r=isObject(t)?Object.keys(t):[],i=!1,s=!!e.sort,a={type:e._filterType||"data",multi:!1};if(r.length&&r.includes(this.primaryKey)&&(o=t[this.primaryKey],i=!0),o){if(n=this.storage.getItem(this.path+o),n=n?this.db.decryptData(n).data:null,n&&i&&!queryMatch(t,n))return null}else r.length?s?n=this.find(t,e):(n=this._filter((e,n)=>queryMatch(t,n),a),Array.isArray(n)?n=n.map(t=>t.data):n&&(n=n.data)):n=s?this.find(t,e):this._filter(null,a);return!o&&s&&n&&(n=n[0].data||null),n&&"id"===a.type&&(n=this.path+n[this.primaryKey]),n}remove(t,e){if(!t)throw new Error("remove needs a query");(e=e||{}).multi=void 0===e.multi||e.multi;let n=e.multi?"find":"findOne",o=null;o="find"===n?this[n](t,{_filterType:"id"},!0):this[n](t,{_filterType:"id"});let r=this.cacheable;if(e.multi&&!o.length||!e.multi&&!o)return 0;e.multi||(o=[o]);for(let t of o)r&&delete this.cache[t],this.storage.removeItem(t);return o.length}update(t,e,n){if(!t)throw new Error("update needs a query");if(!e||!isObject(e))throw new Error("update needs an object");(n=n||{}).multi=void 0!==n.multi&&n.multi;let o=this[n.multi?"find":"findOne"](t,{_filterType:"id"}),r=this.primaryKey,i=this.cacheable;if(n.multi&&!o.length||!n.multi&&!o)return 0;if(n.multi){if(delete e[r],!Object.keys(e).length)return 0;for(let t of o){let n=i?this.cache[t]:this.db.decryptData(this.storage.getItem(t)),o=Object.assign({},n.data,e);i&&(this.cache[t]={offlineDate:n.offlineDate,offlineDateExpires:n.offlineDateExpires,data:o});const r=this.db.encryptData({offlineDate:n.offlineDate,offlineDateExpires:n.offlineDateExpires,data:o});this.storage.setItem(t,r)}return o.length}{let t=o,n=i?this.cache[t]:this.db.decryptData(this.storage.getItem(t)),s=e[r]&&e[r]!==n.data[r],a=s?this.path+e[r]:t;if(s&&this.findOne(e[r]))throw new Error("Duplicate value '"+e[r]+"' for unique field '"+r+"'");let l=Object.assign({},n.data,e);i&&(this.cache[a]={offlineDate:n.offlineDate,offlineDateExpires:n.offlineDateExpires,data:l},s&&delete this.cache[t]);const c=this.db.encryptData({offlineDate:n.offlineDate,offlineDateExpires:n.offlineDateExpires,data:l});return this.storage.setItem(a,c),s&&this.storage.removeItem(t),l}}drop(){return this.remove({}),!0}}class ID{constructor(){}toString(){return((new Date).getTime()/1e3).toString(16).substr(-4)+Math.random().toString(16).substr(2,12)}}class MockStorage{length=0;constructor(){this.length=0}key(){}setItem(){}getItem(){}removeItem(){}}const isSupported=t=>{if(!(t&&t instanceof Object))return!1;try{return t.setItem("_supported","1"),t.removeItem("_supported"),!0}catch(t){return!1}},isObject=t=>t instanceof Object&&"Object"===t.constructor.name,queryMatch=(t,e)=>{if(!t||!Object.keys(t).length)return!0;for(let n of Object.keys(t)){let o=t[n];if("$or"===n&&Array.isArray(o))return o.some(t=>queryMatch(t,e));if("$and"===n&&Array.isArray(o))return o.every(t=>queryMatch(t,e));if("$in"===n&&Array.isArray(o))return o.includes(e);if("$nin"===n&&Array.isArray(o))return!o.includes(e);if("$exists"===n&&"boolean"==typeof o)return o?void 0!==e:void 0===e;let r=e[n];if(r||n.split(".").forEach(t=>{r=r?r[t]:e[t]}),o instanceof RegExp){if(!o.test(r))return!1}else if(isObject(o)){for(let t of Object.keys(o))if(Operator._checkExist(t)&&!Operator[t](o[t],r))return!1}else if(o!==r)return!1}return!0},sortCompare=(t,e,n,o,r)=>{o=o||0;let i=(r=r||Object.keys(t))[o];return i?e[i]===n[i]?(o++,sortCompare(t,e,n,o,r)):1===t[i]?e[i]-n[i]:-1===t[i]?n[i]-e[i]:void 0:0},ops=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin"],isNotNumber=t=>"number"!=typeof t;class Operator{static $eq(t,e){return e===t}static $gt(t,e){if(isNotNumber(t))throw new Error("'$gt' value must be a number");return e>t}static $gte(t,e){if(isNotNumber(t))throw new Error("'$gte' value must be a number");return e>=t}static $lt(t,e){if(isNotNumber(t))throw new Error("'$lt' value must be a number");return e<t}static $lte(t,e){if(isNotNumber(t))throw new Error("'$lte' value must be a number");return e<=t}static $ne(t,e){return e!==t}static $in(t,e){if(!(t instanceof Array))throw new Error("'$in' value must be an array");return t.includes(e)}static $nin(t,e){if(!(t instanceof Array))throw new Error("'$nin' value must be an array");return!t.includes(e)}static $exists(t,e){return t?void 0!==e:void 0===e}static $regex(t,e){if(!(t instanceof RegExp))throw new Error("'$regex' value must be a RegExp");return t.test(e)}static _checkExist(t){if(["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$exists","$regex"].includes(t))return!0;throw new Error("unknown operator: '"+t+"'")}}class OfflineManagerService{_storage;storageInitialized=new BehaviorSubject(!1);offlineMode=new BehaviorSubject(!0);_offlineDB;constructor(t){this._storage=t}initStorage(t){this._offlineDB=new StorageDB({storage:window.localStorage,database:"offlineDB",primaryKey:"_id",secretKey:t}),this._offlineDB.getCollections().forEach(t=>{let e=this.find(t,{},{},!0);e.some(t=>!t)?this.dropCollection(t):e.forEach(e=>{e&&e.offlineDateExpires&&"function"==typeof e.offlineDateExpires.getTime&&Date.now()>=e.offlineDateExpires.getTime()&&this.removeDocument(t,e.data._id)})});let e=this._storage.get("user");if(e){if(null===this._offlineDB.decryptData(e)){const t=this._offlineDB.encryptData(e);this._storage.set("user",t)}}let n=this._storage.get("lastURL");if(n){if(null===this._offlineDB.decryptData(n)){const t=this._offlineDB.encryptData(n);this._storage.set("lastURL",t)}}let o=this._storage.get("accessToken");if(o){if(null===this._offlineDB.decryptData(o)){const t=this._offlineDB.encryptData(o);this._storage.set("accessToken",t)}}let r=this._storage.get("refreshToken");if(r){if(null===this._offlineDB.decryptData(r)){const t=this._offlineDB.encryptData(r);this._storage.set("refreshToken",t)}}this.storageInitialized.next(!0)}getStorage(){return this._offlineDB}setOffline(t){this.offlineMode.next(t)}saveUser(t){return this._storage.set("user",this._offlineDB.encryptData(t))}getUser(){return this._storage.get("user")?this._offlineDB.decryptData(this._storage.get("user")):null}removeUser(){this._storage.remove("user")}find(t,e,n={},o=!1){const r=this._offlineDB.get(t);return r?r.find(e,n,o):[]}findOne(t,e){const n=this._offlineDB.get(t);return n?n.findOne(e):null}insertDocument(t,e,n){const o=this._offlineDB.get(t);let r="";return o&&e&&(!Array.isArray(e)||e.length)&&(r=o.insert(e,n)),r}updateDocument(t,e){const n=this._offlineDB.get(t);if(n){if(n.findOne({_id:e._id}))return e.__v+=1,n.update(e._id,e),1}return 0}updateDocumentProps(t,e,n,o){const r=this._offlineDB.get(t);if(r){let t=r.findOne({_id:e});if(t)return n.forEach(e=>{t[e.prop]=e.data}),t.__v+=1,r.update({_id:e},t),1}return 0}removeDocument(t,e){const n=this._offlineDB.get(t);n&&n.remove(e)}dropCollection(t){this._offlineDB.get(t).drop()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:OfflineManagerService,deps:[{token:LocalStorageService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:OfflineManagerService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:OfflineManagerService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:LocalStorageService}]});class TokenManagerService{_storage;_offline;constructor(t,e){this._storage=t,this._offline=e}getToken(t){let e=this._storage.get(t);if(e){const t=this._offline.getStorage();if(!t||"function"!=typeof t.decryptData)return e;const n=t.decryptData(e);return null===n?e:n}return null}setToken(t,e){const n=this._offline.getStorage();n&&"function"==typeof n.encryptData?this._storage.set(t,n.encryptData(e)):this._storage.set(t,e)}removeToken(t){null!==this.getToken(t)&&this._storage.remove(t)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:TokenManagerService,deps:[{token:LocalStorageService},{token:OfflineManagerService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:TokenManagerService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:TokenManagerService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:LocalStorageService},{type:OfflineManagerService}]});class SocketManagerService{_socket;_offline;_alert;_router;_token;socketStatus;messageId=0;_cbMap=new Map;_subMap=new Map;_subKeyMap=new Map;_offlineUpdates=[];_pendingMessages=[];_sendTimeout=null;_currentLockId="";_chunkAssemblies=new Map;_chunkProgressThresholdBytes=5242880;_chunkTextDecoder=new TextDecoder;_connectionDelayTimeout=null;onerror=function(){};constructor(t,e,n,o,r){this._socket=t,this._offline=e,this._alert=n,this._router=o,this._token=r}getSubArray(){return Array.from(this._subMap.values())}initSocketManager(){this._socket.readyState$.subscribe(t=>{this.socketStatus=t}),this._socket.onmessage=t=>{this.handleMessage(t)},this._socket.onopen=t=>{this._connectionDelayTimeout=setTimeout(async()=>{if(this._connectionDelayTimeout=null,this._offline.setOffline(!1),this._subMap.forEach(t=>{this.send(t.messageRoute,new Date,t.messageId,"subscription","sub",t.subscription,...t.parameters)}),!await this.acquireLock("processingOfflineUpdates"))return;let t=this._offline.find("collectionOffline",{}).sort((t,e)=>t.date.getTime()-e.date.getTime()),e=this._offline.find("methodOffline",{}).sort((t,e)=>t.date.getTime()-e.date.getTime());t.length||e.length?(t.forEach(t=>{let e=this.messageId++;this._offlineUpdates.push({id_offline_doc:t._id,messageId:e,type:"collectionOffline"}),t.data[2]=e,"updateDocument"===t.type?(t.data[4]="updateDocumentOffline",t.data[0]="Offline - "+t.data[0]):"updateDocumentProps"===t.type?(t.data[4]="updateDocumentPropsOffline",t.data[0]="Offline - "+t.data[0]):t.data[0]="Offline - "+t.data[0]}),e.forEach(t=>{let e=this.messageId++;this._offlineUpdates.push({id_offline_doc:t._id,messageId:e,type:"methodOffline"}),t.data[2]=e,t.data[0]="Offline - "+t.data[0]}),this.send("Offline Updates",new Date,this.messageId++,"offline",t.concat(e).sort((t,e)=>t.date.getTime()-e.date.getTime()))):this.releaseLock("processingOfflineUpdates")},100)},this._socket.onerror=t=>{this._connectionDelayTimeout&&clearTimeout(this._connectionDelayTimeout),console.log(new Date,"SOCKET ERROR",t),this.onerror()},this._socket.onclose=t=>{this._connectionDelayTimeout&&clearTimeout(this._connectionDelayTimeout),this._chunkAssemblies.forEach(t=>this.dismissChunkAlert(t)),this._chunkAssemblies.clear()}}handleMessage(t){for(let e of t)this.processReceivedMessage(e)}async acquireLock(t,e=6e4,n=100){let o=Date.now(),r=this.generateUniqueId(),i=JSON.stringify({lockId:r,timestamp:o}),s=this._token.getToken(t);if(s){let{lockId:n,timestamp:r}=JSON.parse(s);if(!(o>r+e))return!1;this._token.setToken(t,i)}else this._token.setToken(t,i);await this.sleep(n);let a=this._token.getToken(t);if(a){let{lockId:t,timestamp:n}=JSON.parse(a);if(t===r&&o<=n+e)return this._currentLockId=r,!0}return!1}sleep(t){return new Promise(e=>setTimeout(e,t))}releaseLock(t){let e=this._token.getToken(t);if(e){let{lockId:n}=JSON.parse(e);n===this._currentLockId&&this._token.removeToken(t)}}generateUniqueId(){return`${Date.now()}-${Math.random().toString(36).substr(2,9)}`}processReceivedMessage(t){if(this.handleChunkedPayload(t))return;let e=this._offlineUpdates.findIndex(e=>e.messageId===t.messageId);if(e>=0&&(this._offline.removeDocument(this._offlineUpdates[e].type,this._offlineUpdates[e].id_offline_doc),this._offlineUpdates.splice(e,1),this._offlineUpdates.length||this.releaseLock("processingOfflineUpdates")),"ACK"!==t.data&&"NACK"!==t.data){const e=this._cbMap.get(t.messageId);if(e)return e.cb?(e.cb(t.hasError?t.data:null,t.hasError?null:t.data),e.resolveFn(t.hasError?t.data:null)):t.hasError?e.rejectFn(t.data):e.resolveFn(t.data),void this._cbMap.delete(t.messageId);const n=this._subMap.get(t.messageId);n&&n.subject.next(t.data)}}handleChunkedPayload(t){const e=t&&t.data;if(!e||"object"!=typeof e||!e.__chunked)return!1;const n=e.chunkId;if(!n)return!0;if("start"===e.chunkStatus)return this._chunkAssemblies.set(n,this.createChunkAssembly(n,t,e)),!0;const o=this._chunkAssemblies.get(n);if(!o)return!0;if("chunk"===e.chunkStatus)return this.appendChunkPayload(o,e),this.emitChunkProgress(o),!0;if("end"===e.chunkStatus){if(o.totalChunks&&o.receivedChunks!==o.totalChunks)return this.handleChunkFailure(o,"Incomplete chunk sequence"),this._chunkAssemblies.delete(n),!0;const e=this.tryDecodeChunkBuffer(o,!0);return void 0===e?(this.handleChunkFailure(o,"Failed to decode chunk payload"),this._chunkAssemblies.delete(n),!0):(t.data=e,this.dismissChunkAlert(o),this._chunkAssemblies.delete(n),!1)}return!0}createChunkAssembly(t,e,n){const o=n.totalBytes||0,r={chunkId:t,messageId:e.messageId,hasError:!!e.hasError,encoding:"msgpack"===n.encoding?"msgpack":"json",totalChunks:n.totalChunks||0,totalBytes:o,buffer:o?new Uint8Array(o):new Uint8Array(0),filledBytes:0,receivedChunks:0,targetType:null,showProgress:!1,lastPercent:-1},i=this._subMap.get(e.messageId);if(i)r.targetType="subscription",r.subscription=i;else{const t=this._cbMap.get(e.messageId);t&&(r.targetType="callback",r.callback=t)}return this.initializeChunkProgress(r),r}initializeChunkProgress(t){this.shouldShowChunkProgress(t)&&(t.showProgress=!0,t.lastPercent=-1,this.updateChunkProgress(t,!0))}shouldShowChunkProgress(t){return t.totalBytes?t.totalBytes>=this._chunkProgressThresholdBytes:t.totalChunks>1}appendChunkPayload(t,e){const n=this.extractChunkBytes(e,t.encoding);if(n&&n.byteLength){if(t.buffer&&t.buffer.byteLength>=t.filledBytes+n.byteLength)t.buffer.set(n,t.filledBytes);else if(t.buffer&&t.buffer.byteLength){const e=new Uint8Array(t.filledBytes+n.byteLength);e.set(t.buffer.subarray(0,t.filledBytes),0),e.set(n,t.filledBytes),t.buffer=e,t.totalBytes=t.buffer.byteLength}else t.buffer=new Uint8Array(n),t.totalBytes=t.buffer.byteLength;t.filledBytes+=n.byteLength,t.receivedChunks++,this.updateChunkProgress(t)}}updateChunkProgress(t,e=!1){if(!t.showProgress&&!e)return;if(!t.showProgress&&this.shouldShowChunkProgress(t))t.showProgress=!0;else if(!t.showProgress)return;const n=this.getChunkProgressPercent(t);if(null===n)return;if(!e){if(t.lastPercent>=n)return;if(t.lastPercent>=0&&n<100&&n-t.lastPercent<5)return}t.lastPercent=n;const o=this.buildChunkProgressMessage(t,n);t.alertToast?this.updateChunkAlertMessage(t.alertToast,o):(t.alertToast=this._alert.setAlert("update",o,0),this.configureChunkAlert(t.alertToast))}emitChunkProgress(t){if("subscription"!==t.targetType||!t.subscription)return;if(t.totalChunks&&t.receivedChunks>=t.totalChunks)return;const e=this.tryDecodeChunkBuffer(t,!1);void 0!==e&&t.subscription.subject.next(e)}handleChunkFailure(t,e){const n={chunkId:t.chunkId,message:e};if(console.error(new Date,"WEBSOCKET CHUNK",e,t.chunkId),this.dismissChunkAlert(t),"subscription"===t.targetType&&t.subscription)return void t.subscription.subject.error(n);const o=this._cbMap.get(t.messageId);o&&(o.cb&&o.cb(n,null),o.rejectFn?o.rejectFn(n):o.resolveFn&&o.resolveFn(n),this._cbMap.delete(t.messageId))}tryDecodeChunkBuffer(t,e){if(t.buffer&&t.filledBytes)try{const e=t.filledBytes===t.buffer.byteLength?t.buffer:t.buffer.subarray(0,t.filledBytes);if("msgpack"===t.encoding)return unpack(e);const n=this._chunkTextDecoder.decode(e);return JSON.parse(n,dateReviver)}catch(n){return void(e&&console.error(new Date,"WEBSOCKET CHUNK","Failed to decode chunk payload",t.chunkId,n))}}extractChunkBytes(t,e){return"msgpack"===e?this.ensureUint8Array(t.payload):"string"==typeof t.payload?this.base64ToUint8Array(t.payload):null}ensureUint8Array(t){return t?t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)?new Uint8Array(t):"string"==typeof t?this.base64ToUint8Array(t):null:null}base64ToUint8Array(t){const e=atob(t),n=new Uint8Array(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return n}dismissChunkAlert(t){t.alertToast&&(this._alert.clearAlert(t.alertToast.toastId),t.alertToast=void 0),t.showProgress=!1,t.lastPercent=-1}getChunkProgressPercent(t){if(t.totalBytes){const e=Math.min(t.filledBytes,t.totalBytes);return Math.min(100,Math.floor(e/t.totalBytes*100))}if(t.totalChunks){const e=Math.min(t.receivedChunks,t.totalChunks);return Math.min(100,Math.floor(e/t.totalChunks*100))}return null}buildChunkProgressMessage(t,e){const n=t.totalBytes,o=n?Math.min(t.filledBytes,n):0;if(n)return`Downloading data (${e}% • ${this.formatBytes(o)} of ${this.formatBytes(n)})`;if(t.totalChunks){return`Downloading data (${e}% • chunk ${Math.min(t.receivedChunks,t.totalChunks)} of ${t.totalChunks})`}return`Downloading data (${e}%)`}formatBytes(t){if(!t)return"0 B";const e=["B","KB","MB","GB","TB"],n=Math.min(e.length-1,Math.floor(Math.log(t)/Math.log(1024))),o=t/Math.pow(1024,n);return`${o>=10?o.toFixed(0):o.toFixed(1)} ${e[n]}`}configureChunkAlert(t){t&&(t.message=t.message||"",t.portal?.instance&&(t.portal.instance.options.disableTimeOut=!0,t.portal.instance.options.tapToDismiss=!0,t.portal.instance.options.closeButton=!1,t.portal.instance.message=t.message),t.toastRef?.componentInstance&&(t.toastRef.componentInstance.options.disableTimeOut=!0,t.toastRef.componentInstance.options.tapToDismiss=!0,t.toastRef.componentInstance.options.closeButton=!1,t.toastRef.componentInstance.message=t.message))}updateChunkAlertMessage(t,e){t.message=e,t.portal?.instance&&(t.portal.instance.message=e),t.toastRef?.componentInstance&&(t.toastRef.componentInstance.message=e)}openSocket(t,e){this._socket.openSocket(t,e)}closeSocket(){this._token.removeToken("accessToken"),this._socket.close()}resolveCurrentRoute(){const t=this._router?.url||"";return t.includes("?")?t.substring(0,t.indexOf("?")):t}buildSubscriptionKey(t,e,n){let o="";try{o=JSON.stringify(n??[])}catch{o=String(n??"")}return`${t}::${e}::${o}`}sendUnsubscribe(t,e,n,o){this.send(t,new Date,e,"subscription","unsub",n,...o)}releaseSharedSubscription(t){const e=this._subKeyMap.get(t);e&&(e.refCount-=1,e.refCount>0||(this._subKeyMap.delete(t),this.sendUnsubscribe(e.messageRoute,e.messageId,e.subscription,e.parameters),this._subMap.delete(e.messageId)))}call(t,...e){let n=null,o=null,r=new Promise((t,e)=>{n=t,o=e}),i=this.messageId++;const s=e[e.length-1]&&"function"==typeof e[e.length-1]?e.pop():null;this._cbMap.set(i,{messageId:i,cb:s,resolveFn:n,rejectFn:o,retryCnt:0});let a=e.length;for(;(void 0===e[e.length-1]||null===e[e.length-1])&&a>0;)e.pop(),a=e.length;return this.send(this._router.url.includes("?")?this._router.url.substring(0,this._router.url.indexOf("?")):this._router.url,new Date,i,"method",t,...e),r}subscribe(t,...e){const n=deepCopy(e),o=this.resolveCurrentRoute(),r=this.buildSubscriptionKey(o,t,n),i=this._subKeyMap.get(r);if(i)return i.refCount+=1,i.subject.pipe(finalize(()=>{this.releaseSharedSubscription(r)}));const s=new ReplaySubject(1),a=this.messageId++,l={key:r,messageId:a,messageRoute:o,subscription:t,parameters:n,subject:s,refCount:1};this._subMap.set(a,l),this._subKeyMap.set(r,l);const c=s.pipe(finalize(()=>{this.releaseSharedSubscription(r)}));return this.send(o,new Date,a,"subscription","sub",t,...n),c}subscribeBypassRoute(t,...e){const n=deepCopy(e),o="Bypass",r=this.buildSubscriptionKey(o,t,n),i=this._subKeyMap.get(r);if(i)return i.refCount+=1,i.subject.pipe(finalize(()=>{this.releaseSharedSubscription(r)}));const s=new ReplaySubject(1),a=this.messageId++,l={key:r,messageId:a,messageRoute:o,subscription:t,parameters:n,subject:s,refCount:1};this._subMap.set(a,l),this._subKeyMap.set(r,l);const c=s.pipe(finalize(()=>{this.releaseSharedSubscription(r)}));return this.send("Bypass",new Date,a,"subscription","sub",t,...n),c}unsubscribe(t,e,...n){this.send(this.resolveCurrentRoute(),new Date,t,"subscription","unsub",e,...n)}send(...t){this.socketStatus===WebSocket.OPEN?(this._pendingMessages.push(t),this._sendTimeout||(this._sendTimeout=setTimeout(()=>{this._sendTimeout=null;const t=[...this._pendingMessages];this._pendingMessages=[],this._socket.send(t)},25))):"method"===t[3]&&this.handleOfflineMethod(t)}handleOfflineMethod(t){if("insertDocument"===t[4]){if("driver-gps"===t[5])return;this._alert.setAlert("warning","This insert command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!"),this._offline.insertDocument("collectionOffline",{type:"insert",data:t,date:new Date});let e=this._offline.insertDocument(t[5],t[6]),n=this._cbMap.get(t[2]);n&&n.cb&&(n.cb(null,e),this._cbMap.delete(t[2]))}else if("updateDocument"===t[4]){this._alert.setAlert("warning","This update command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!"),this._offline.insertDocument("collectionOffline",{type:"updateDocument",data:t,date:new Date}),this._offline.findOne(t[5],{_id:t[6]._id})?this._offline.updateDocument(t[5],t[6]):console.log("Could not find Offline data",t[5],t[6]);let e=this._cbMap.get(t[2]);e&&e.cb&&(e.cb(null,1),this._cbMap.delete(t[2]))}else if("updateDocumentProps"===t[4]){this._alert.setAlert("warning","This update command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!"),this._offline.insertDocument("collectionOffline",{type:"updateDocumentProps",data:t,date:new Date}),this._offline.findOne(t[5],{_id:t[6]})?this._offline.updateDocumentProps(t[5],t[6],t[7],t[8]):console.log("Could not find Offline data",t[5],t[6]);let e=this._cbMap.get(t[2]);e&&e.cb&&(e.cb(null,1),this._cbMap.delete(t[2]))}else if("removeDocument"===t[4]){this._alert.setAlert("warning","This remove command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!"),this._offline.insertDocument("collectionOffline",{type:"removeDocument",data:t,date:new Date}),this._offline.findOne(t[5],{_id:t[6]})?this._offline.removeDocument(t[5],t[6]):console.log("Could not find Offline data",t[5],t[6]);let e=this._cbMap.get(t[2]);e&&e.cb&&(e.cb(null,1),this._cbMap.delete(t[2]))}else t[0].includes("/dashboard/driver/")&&this._offline.insertDocument("methodOffline",{type:t[4],data:t,date:new Date})}getStatus(){return this._socket.readyState$}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SocketManagerService,deps:[{token:SocketService},{token:OfflineManagerService},{token:AlertService},{token:i1$1.Router},{token:TokenManagerService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SocketManagerService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SocketManagerService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:SocketService},{type:OfflineManagerService},{type:AlertService},{type:i1$1.Router},{type:TokenManagerService}]});class AccountManagerService{_router;_socket;_token;_http;_alert;_offline;user=new BehaviorSubject(null);initCompleted=new BehaviorSubject(!1);loginCompleted=new BehaviorSubject(!1);publicClient=new BehaviorSubject(null);user$;environment=null;publicTokenKey="publicToken";publicActivityKey="publicTokenActivity";publicSessionMaxIdleMs=36e5;publicActivityThrottleMs=15e3;publicActivityListenerBound=!1;publicActivityInterval=null;lastPublicActivityWrite=0;constructor(t,e,n,o,r,i){this._router=t,this._socket=e,this._token=n,this._http=o,this._alert=r,this._offline=i}normalizeUser(t){if(!t)return null;const e=t.roles||{},n={...e,super_admin:!!e.super_admin,approvals:Array.isArray(e.approvals)?e.approvals:[],groups:Array.isArray(e.groups)?e.groups:[],notifications:Array.isArray(e.notifications)?e.notifications:[],miscs:Array.isArray(e.miscs)?e.miscs:[]},o=t.other&&"object"==typeof t.other?t.other:{};return{...t,roles:n,other:o}}initLoginManager(t){this.environment=t,this._offline.storageInitialized.subscribe(t=>{this._socket.initSocketManager(),this.initPublicSessionTracking();let e=this._token.getToken("refreshToken");e?(this.initLogin(e),setInterval(()=>{e=this._token.getToken("refreshToken"),this.initLogin(e)},3e3)):this.initCompleted.next(!0)})}initPublicSessionTracking(t={}){if("number"==typeof t.maxIdleMs&&t.maxIdleMs>0&&(this.publicSessionMaxIdleMs=t.maxIdleMs),"number"==typeof t.throttleMs&&t.throttleMs>0&&(this.publicActivityThrottleMs=t.throttleMs),!this.publicActivityListenerBound&&"undefined"!=typeof window){const t=()=>this.touchPublicSession();window.addEventListener("click",t,{passive:!0}),window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("keydown",t,{passive:!0}),window.addEventListener("scroll",t,{passive:!0}),window.addEventListener("touchstart",t,{passive:!0}),this.publicActivityListenerBound=!0}this.publicActivityInterval&&clearInterval(this.publicActivityInterval);const e="number"==typeof t.checkIntervalMs&&t.checkIntervalMs>0?t.checkIntervalMs:6e4;this.publicActivityInterval=setInterval(()=>this.enforcePublicSession(),e),this.restorePublicSession()}initLogin(t){if(navigator.onLine)this._offline.offlineMode.getValue()&&(this._offline.setOffline(!1),this.getAccessToken(t));else if(!this._offline.offlineMode.getValue()||!this.initCompleted.getValue()){this.closeSocket(),this._offline.setOffline(!0);let t=this._offline.getUser();t&&this.setUser(t),this.initCompleted.getValue()||this.initCompleted.next(!0)}}getAccessToken(t){t&&this._http.post(this.environment.SERVER_URL+"/accessToken",{refreshToken:t}).toPromise().then(t=>{t.error?this.initCompleted.next(!0):(this._token.setToken("accessToken",t.result.token),this.setUser(t.result.user),this.openSocket(t.result.token),this.user$&&this.user$.unsubscribe(),this.user$=this._socket.subscribeBypassRoute("userWithId",t.result.user._id).subscribe(t=>{t&&(this.user.getValue()&&this.user.getValue()._id!==t._id?this._socket.call("incorrectUser",this.user.getValue(),t,this._socket.getSubArray()):(this.setUser(t),this.loginCompleted.next(!0),this.initCompleted.next(!0),this._offline.saveUser(t)))}))},t=>{this.initCompleted.next(!0)})}logIn(t,e){return new Promise((n,o)=>{this._http.post(this.environment.SERVER_URL+"/login",{username:t,password:e}).toPromise().then(t=>{t.error?(this._alert.setAlert("error",t.result),o(t.result)):(this._token.setToken("refreshToken",t.result.token),this.getAccessToken(t.result.token),n(t.result.token))},t=>{})})}publicLogIn(t,e){return new Promise((n,o)=>{this._http.post(this.environment.SERVER_URL+"/public/login",{email:t,password:e}).toPromise().then(t=>{t?.error?(this._alert.setAlert("error",t.result||"Unable to sign in"),o(t.result||"Unable to sign in")):(t?.result?.token&&(this._token.setToken(this.publicTokenKey,t.result.token),this.touchPublicSession(!0)),t?.result?.client&&this.publicClient.next(t.result.client),n(t.result))},()=>{this._alert.setAlert("error","Unable to sign in"),o("Unable to sign in")})})}publicRegister(t){return new Promise((e,n)=>{this._http.post(this.environment.SERVER_URL+"/public/register",t).toPromise().then(t=>{t?.error?(this._alert.setAlert("error",t.result||"Unable to create account"),n(t.result||"Unable to create account")):(t?.result?.token&&(this._token.setToken(this.publicTokenKey,t.result.token),this.touchPublicSession(!0)),t?.result?.client&&this.publicClient.next(t.result.client),e(t.result))},()=>{this._alert.setAlert("error","Unable to create account"),n("Unable to create account")})})}publicFetchMe(){return new Promise((t,e)=>{if(this.isPublicSessionExpired())return this.publicLogOut(),void e("No session");const n=this._token.getToken(this.publicTokenKey);if(!n)return this.publicClient.next(null),void e("No session");const o=new HttpHeaders({Authorization:`Bearer ${n}`});this._http.get(this.environment.SERVER_URL+"/public/me",{headers:o}).toPromise().then(n=>{n?.error?(this.publicClient.next(null),e(n.result||"Unable to load session")):(this.publicClient.next(n.result?.client||null),this.touchPublicSession(),t(n.result))},()=>{e("Unable to load session")})})}publicFetchDashboard(){return new Promise((t,e)=>{if(this.isPublicSessionExpired())return this.publicLogOut(),void e("No session");const n=this._token.getToken(this.publicTokenKey);if(!n)return void e("No session");const o=new HttpHeaders({Authorization:`Bearer ${n}`});this._http.get(this.environment.SERVER_URL+"/public/dashboard",{headers:o}).toPromise().then(n=>{n?.error?e(n.result||"Unable to load dashboard"):(this.touchPublicSession(),t(n.result))},()=>{e("Unable to load dashboard")})})}publicLogOut(){this._token.removeToken(this.publicTokenKey),this._token.removeToken(this.publicActivityKey),this.publicClient.next(null)}restorePublicSession(){if(this.publicClient.getValue())return;this._token.getToken(this.publicTokenKey)&&(this.isPublicSessionExpired()?this.publicLogOut():(this.touchPublicSession(!0),this.publicFetchMe().catch(()=>{})))}enforcePublicSession(){this.isPublicSessionExpired()&&this.publicLogOut()}isPublicSessionExpired(){if(!this._token.getToken(this.publicTokenKey))return!1;const t=this.getPublicActivityTimestamp();return!!t&&Date.now()-t>this.publicSessionMaxIdleMs}getPublicActivityTimestamp(){const t=this._token.getToken(this.publicActivityKey);if(!t)return 0;const e=Number(t);return Number.isFinite(e)?e:0}touchPublicSession(t=!1){if(!this._token.getToken(this.publicTokenKey))return;const e=Date.now();!t&&e-this.lastPublicActivityWrite<this.publicActivityThrottleMs||(this.lastPublicActivityWrite=e,this._token.setToken(this.publicActivityKey,String(e)))}logIn365(t){return new Promise((e,n)=>{this._http.post(this.environment.SERVER_URL+"/login365",{id_token:t}).toPromise().then(t=>{t.error?(this._alert.setAlert("error",t.result),n(t.result)):(this._token.setToken("refreshToken",t.result.token),this.getAccessToken(t.result.token),e(t.result.token))},t=>{})})}resetUserPassword(t){return new Promise((e,n)=>{this._http.post(this.environment.SERVER_URL+"/resetPassword",{username:t}).toPromise().then(t=>{e(!0)},t=>{})})}logOut(){return new Promise((t,e)=>{this._router.navigateByUrl("/home"),setTimeout(()=>{this.setUser(null),this._token.removeToken("refreshToken"),this._offline.removeUser(),this.closeSocket(),t(!0)},500)})}openSocket(t){this._socket.openSocket(this.environment,[t])}closeSocket(){this._socket.closeSocket()}setUser(t){this.user.next(this.normalizeUser(t))}getUser(){return this.user.getValue()}getSocketStatus(){return this._socket.getStatus()}isUserInView(t){let e=!1;if(this.isUserSuperAdmin())return!0;let n=this.user.getValue();if(n&&n.roles){const o=Array.isArray(n.roles.groups)?n.roles.groups:[],r=Array.isArray(n.roles.miscs)?n.roles.miscs:[];o.forEach(n=>{n.views.filter(e=>e.startsWith(t)).length&&(e=!0)}),r.filter(e=>e.startsWith(t)).length&&(e=!0),o.filter(e=>e.name===t).length&&(e=!0)}return e}isUserSuperAdmin(){const t=this.user.getValue();return!!(t&&t.roles&&t.roles.super_admin)}isInitCompleted(){return new Promise((t,e)=>{if(this.initCompleted.value)t(!0);else{let e=this.initCompleted.subscribe(n=>{n&&(e.unsubscribe(),t(!0))},()=>{})}})}isLoginCompleted(){return new Promise((t,e)=>{if(this.loginCompleted.value)t(!0);else{let e=this.loginCompleted.subscribe(n=>{n&&(e.unsubscribe(),t(!0))})}})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AccountManagerService,deps:[{token:i1$1.Router},{token:SocketManagerService},{token:TokenManagerService},{token:i4.HttpClient},{token:AlertService},{token:OfflineManagerService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AccountManagerService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AccountManagerService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:i1$1.Router},{type:SocketManagerService},{type:TokenManagerService},{type:i4.HttpClient},{type:AlertService},{type:OfflineManagerService}]});class ValidationService{constructor(){}wholeNumbersAllowNegative(t){return""===t.value||null===t.value||/^[\-]?\d+$/.test(t.value)?null:{wholeNumbersAllowNegative:{valid:!1}}}wholeNumbersWithZero(t){return""===t.value||null===t.value||/^[0-9]*$/.test(t.value)?null:{wholeNumbersWithZero:{valid:!1}}}wholeNumbersGreaterThanZero(t){return""===t.value||null===t.value||/^[1-9]+[0-9]*$/.test(t.value)?null:{wholeNumbersGreaterThanZero:{valid:!1}}}decimalWithZero(t){return""===t.value||null===t.value||/^\d*\.?\d*$/.test(t.value)?null:{decimalWithZero:{valid:!1}}}decimalGreaterThanZero(t){return""===t.value||null===t.value||/^\s*(?=.*[1-9])\d*(?:\.\d{1,10})?\s*$/.test(t.value)?null:{decimalGreaterThanZero:{valid:!1}}}currency(t){return""===t.value||null===t.value||/^[0-9]\d*(\.\d+)?$/.test(t.value)?null:{currency:{valid:!1}}}currencyGreaterThanZero(t){return""===t.value||null===t.value||/^[0-9]\d*(\.\d+)?$/.test(t.value)&&t.value>0?null:{currency:{valid:!1}}}currencyAllowNegative(t){return""===t.value||null===t.value||/^[\-]?[0-9]\d*(\.\d+)?$/.test(t.value)?null:{currency:{valid:!1}}}phoneNumber(t){return""===t.value||null===t.value||/^1?([2-9])(\d{9})/.test(t.value)?null:{phoneNumber:{valid:!1}}}email(t){return""===t.value||null===t.value||/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t.value)?null:{email:{valid:!1}}}matchPassword(t){let e=t.controls.password,n=t.controls.confirm_password;return e.value&&n.value?e.value===n.value?null:{matchPassword:{isValid:!1}}:null}density(t){return""===t.value||null===t.value||/^[\-]?\d*\.?\d*$/.test(t.value)?null:{density:{valid:!1}}}maxValue(t){return e=>("string"==typeof e.value?parseFloat(e.value):e.value)>t?{maxValue:{max:t}}:null}minValue(t){return e=>("string"==typeof e.value?parseFloat(e.value):e.value)<t?{minValue:{min:t}}:null}multipleOf(t){return e=>("string"==typeof e.value?parseFloat(e.value):e.value)%t!==0?{multipleOf:{value:t}}:null}minLengthArray(t){return e=>e.value&&e.value.length>=t?null:{minLengthArray:{valid:!1}}}maxLengthArray(t){return e=>e.value&&e.value.length<=t?null:{maxLengthArray:{valid:!1}}}validIPAddress(t){return""===t.value||null===t.value||/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/.test(t.value)?null:{validIPAddress:{valid:!1}}}alphaNumericWithDashes(t){return""===t.value||null===t.value||/^[a-zA-Z0-9-_]+$/.test(t.value)?null:{alphaNumericWithDashes:{valid:!1}}}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ValidationService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ValidationService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ValidationService,decorators:[{type:Injectable}],ctorParameters:()=>[]});class AwsService{_socket;constructor(t){this._socket=t}dataURItoFile(t,e){let n=atob(t.split(",")[1]),o=t.split(",")[0].split(":")[1].split(";")[0],r=new ArrayBuffer(n.length),i=new Uint8Array(r);for(let t=0;t<n.length;t++)i[t]=n.charCodeAt(t);let s=new Blob([r],{type:o});return s.lastModifiedDate=new Date,s.name=e,s}uploadFile(t,e,n,o){return new Promise((r,i)=>{t.size?this.getBase64(t).then(s=>{this._socket.call("uploadFileAndSave",o||t.name,s,t.size,n||-1,e,!0,(t,e)=>{e?r(e):i(t)})}):i("Invalid File")})}getFileWithKey(t,e){this._socket.call("getFile",t,e)}getFileWithId(t,e){this._socket.call("findOne","files",{_id:t},(t,n)=>{this.getFileWithKey(n.key,e)})}deleteFile(t,e){this._socket.call("deleteFile",t,e)}deleteFileWithId(t,e){this._socket.call("findOne","files",{_id:t},(t,n)=>{this.deleteFile(n.key,e)})}deleteFilesWithKeys(t,e){this._socket.call("deleteFiles",t,e)}getBase64(t){return new Promise((e,n)=>{const o=new FileReader;o.readAsDataURL(t),o.onload=()=>e(o.result),o.onerror=t=>n(t)})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AwsService,deps:[{token:SocketManagerService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AwsService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AwsService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:SocketManagerService}]});class BaseComponent{providerService;constructor(t){this.providerService=t}}class ProviderService{_app;_router;_socket;_account;_alert;_vs;_aws;_fb;constructor(t,e,n,o,r,i,s,a){this._app=t,this._router=e,this._socket=n,this._account=o,this._alert=r,this._vs=i,this._aws=s,this._fb=a}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ProviderService,deps:[{token:CoreService},{token:i1$1.Router},{token:SocketManagerService},{token:AccountManagerService},{token:AlertService},{token:ValidationService},{token:AwsService},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ProviderService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ProviderService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:CoreService},{type:i1$1.Router},{type:SocketManagerService},{type:AccountManagerService},{type:AlertService},{type:ValidationService},{type:AwsService},{type:i2.FormBuilder}]});class DialogNotifyContent{activeModal;title;body;handleKeyboardEvent(t){13===t.keyCode&&this.activeModal.close()}constructor(t){this.activeModal=t}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogNotifyContent,deps:[{token:i1$2.NgbActiveModal}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:DialogNotifyContent,isStandalone:!1,selector:"resolveio-dialog.notify",inputs:{title:"title",body:"body"},host:{listeners:{"document:keypress":"handleKeyboardEvent($event)"}},ngImport:i0,template:'\n\t\t<div class="modal-header">\n\t\t\t<h4 class="modal-title"><i class="fa fa-info-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t \t\t<button type="button" class="btn-close ms-auto" aria-label="Close" (click)="activeModal.dismiss(\'Cross click\')"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t \t \t<p>{{ body }}</p>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t \t\t<button type="button" class="btn btn-secondary" (click)="activeModal.close(\'Close click\')">Ok</button>\n\t\t</div>\n ',isInline:!0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogNotifyContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.notify",template:'\n\t\t<div class="modal-header">\n\t\t\t<h4 class="modal-title"><i class="fa fa-info-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t \t\t<button type="button" class="btn-close ms-auto" aria-label="Close" (click)="activeModal.dismiss(\'Cross click\')"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t \t \t<p>{{ body }}</p>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t \t\t<button type="button" class="btn btn-secondary" (click)="activeModal.close(\'Close click\')">Ok</button>\n\t\t</div>\n ',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal}],propDecorators:{title:[{type:Input}],body:[{type:Input}],handleKeyboardEvent:[{type:HostListener,args:["document:keypress",["$event"]]}]}});class AiFormRegistryService{forms=[];counter=0;registerForm(t){if(!t?.form)return()=>{};const e={id:"ai-form-"+ ++this.counter,...t};return this.forms.push(e),()=>this.unregisterForm(e)}unregisterForm(t){const e="string"==typeof t?t:t?.id;e&&(this.forms=this.forms.filter(t=>t.id!==e))}getFormsForRoute(t){const e=this.normalizeRoute(t);return e?this.forms.filter(t=>this.normalizeRoute(t.route)===e):[...this.forms]}normalizeRoute(t){const e=String(t||"").trim();if(!e)return"";return e.split("?")[0].split("#")[0].trim()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiFormRegistryService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiFormRegistryService,providedIn:"root"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiFormRegistryService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}]});class AiFormAutoRegisterDirective{formDirective;registry;router;elementRef;aiFormAutoRegister=!0;aiFormLabel="";aiFormIgnore=!1;unregister;constructor(t,e,n,o){this.formDirective=t,this.registry=e,this.router=n,this.elementRef=o}ngOnInit(){this.register()}ngOnDestroy(){this.unregister&&this.unregister()}register(){if(!this.aiFormAutoRegister||this.aiFormIgnore)return;const t=this.elementRef?.nativeElement;if("ignore"===t?.getAttribute("data-ai-form")||"true"===t?.getAttribute("data-ai-ignore"))return;const e=this.formDirective?.form;if(!e)return;const n=this.router?.url||"";this.unregister=this.registry.registerForm({form:e,route:n,element:t,label:(this.aiFormLabel||"").trim()||void 0})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiFormAutoRegisterDirective,deps:[{token:i2.FormGroupDirective},{token:AiFormRegistryService},{token:i1$1.Router},{token:i0.ElementRef}],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:AiFormAutoRegisterDirective,isStandalone:!0,selector:"form[formGroup]",inputs:{aiFormAutoRegister:"aiFormAutoRegister",aiFormLabel:"aiFormLabel",aiFormIgnore:"aiFormIgnore"},ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiFormAutoRegisterDirective,decorators:[{type:Directive,args:[{selector:"form[formGroup]",standalone:!0}]}],ctorParameters:()=>[{type:i2.FormGroupDirective},{type:AiFormRegistryService},{type:i1$1.Router},{type:i0.ElementRef}],propDecorators:{aiFormAutoRegister:[{type:Input}],aiFormLabel:[{type:Input}],aiFormIgnore:[{type:Input}]}});class FormButtonComponent extends BaseComponent{_services;form;disabled=!1;type="submit";formButton;constructor(t){super(t),this._services=t}getTipErrors(){let t=[];if(this.form&&this.form.invalid&&"object"==typeof this.form.controls){Object.keys(this.form.controls).forEach(e=>{let n=this.form.controls[e];if(n.invalid&&(t.push(e.replace("_id","").replace("id_","").replace("_"," ").replace(/\b\S/g,function(t){return t.toUpperCase()})+" is invalid"),"object"==typeof n.value&&Array.isArray(n.value)&&n.controls))for(let e=0;e<n.controls.length;e++){let o=n.controls[e];if(o.controls){Object.keys(o.controls).forEach(n=>{o.controls[n].invalid&&t.push("["+e+"] -> "+n.replace("_id","").replace("id_","").replace("_"," ").replace(/\b\S/g,function(t){return t.toUpperCase()})+" is invalid")})}}})}return t}isSuperAdmin(){return!(!this._services._account.getUser()||!this._services._account.getUser().roles.super_admin)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FormButtonComponent,deps:[{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:FormButtonComponent,isStandalone:!1,selector:"form-button",inputs:{form:"form",disabled:"disabled",type:"type"},providers:[ProviderService],viewQueries:[{propertyName:"formButton",first:!0,predicate:["formButton"],descendants:!0}],usesInheritance:!0,ngImport:i0,template:'\n\t\t<div style="position: relative; text-align: left; width: 100%">\n\t\t <ng-template #tipContent>\n\t\t <span style="font-weight: bold">Errors:<br></span>\n\t\t <ul>\n\t\t @for (error of getTipErrors(); track error) {\n\t\t <li>{{error}}</li>\n\t\t }\n\t\t </ul>\n\t\t </ng-template>\n\t\t <div [ngbTooltip]="(getTipErrors().length ? tipContent : \'\')" placement="top-left" #t>\n\t\t <button [type]="type" [ngClass]="[\'btn\', form && form.valid ? \'btn-success\' : \'btn-danger\']" [disabled]="!form || !form.valid || disabled" style="width: 200px" [autofocus]="true" #formButton>Submit</button>\n\t\t </div>\n\t\t</div>\n\t\t',isInline:!0,dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:i1$2.NgbTooltip,selector:"[ngbTooltip]",inputs:["animation","autoClose","placement","popperOptions","triggers","positionTarget","container","disableTooltip","tooltipClass","tooltipContext","openDelay","closeDelay","ngbTooltip"],outputs:["shown","hidden"],exportAs:["ngbTooltip"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FormButtonComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"form-button",template:'\n\t\t<div style="position: relative; text-align: left; width: 100%">\n\t\t <ng-template #tipContent>\n\t\t <span style="font-weight: bold">Errors:<br></span>\n\t\t <ul>\n\t\t @for (error of getTipErrors(); track error) {\n\t\t <li>{{error}}</li>\n\t\t }\n\t\t </ul>\n\t\t </ng-template>\n\t\t <div [ngbTooltip]="(getTipErrors().length ? tipContent : \'\')" placement="top-left" #t>\n\t\t <button [type]="type" [ngClass]="[\'btn\', form && form.valid ? \'btn-success\' : \'btn-danger\']" [disabled]="!form || !form.valid || disabled" style="width: 200px" [autofocus]="true" #formButton>Submit</button>\n\t\t </div>\n\t\t</div>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:ProviderService}],propDecorators:{form:[{type:Input}],disabled:[{type:Input}],type:[{type:Input}],formButton:[{type:ViewChild,args:["formButton",{static:!1}]}]}});class DialogInputContent{_activeModal;_fb;title="";inputFields=[];formInput;states=["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"];constructor(t,e){this._activeModal=t,this._fb=e}ngOnInit(){this.formInput=this._fb.group({});for(let t=0;t<this.inputFields.length;t++){let e=this.inputFields[t].data;"datetime"===this.inputFields[t].type&&(e=this.normalizeDateTimeValue(this.inputFields[t].data)),null===this.inputFields[t].validators?this.formInput.addControl(this.inputFields[t].form,new UntypedFormControl({value:e,disabled:this.inputFields[t].disabled})):this.formInput.addControl(this.inputFields[t].form,new UntypedFormControl({value:e,disabled:this.inputFields[t].disabled},this.inputFields[t].validators))}}normalizeDateTimeValue(t){if(!t)return null;if(Array.isArray(t))return this.mergeDateTimeParts(t[0],t[1]);if(t instanceof Date)return this.mergeDateTimeParts(t,t);if(t.date||t.time||this.isDateStruct(t)||this.isTimeStruct(t)){const e=this.toDateStruct(t.date?t.date:t),n=this.toTimeStruct(t.time?t.time:t);return this.mergeDateTimeParts(e,n||null,t.mode)}return t}mergeDateTimeParts(t,e,n="datetime"){const o={mode:n},r=this.toDateStruct(t),i=this.toTimeStruct(e);return r&&(o.date=r),i&&(o.time=i),o}isDateStruct(t){return t&&void 0!==t.year&&void 0!==t.month&&void 0!==t.day}isTimeStruct(t){return t&&void 0!==t.hour&&void 0!==t.minute}toDateStruct(t){return t?t instanceof Date?{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}:this.isDateStruct(t)?{year:t.year,month:t.month,day:t.day}:t.date?this.toDateStruct(t.date):null:null}toTimeStruct(t){return t?t instanceof Date?{hour:t.getHours(),minute:t.getMinutes(),second:t.getSeconds(),ms:t.getMilliseconds()}:this.isTimeStruct(t)?{hour:t.hour,minute:t.minute,second:t.second||0,ms:t.ms||0}:t.time?this.toTimeStruct(t.time):null:null}validateInput(t,e){if(t.disabled)return"";let n=!0;for(let o=0;o<t.validators.length;o++)e.controls[t.form].hasError([t.validatorErrors[o]])&&(n=!1);return n&&null!==e.controls[t.form].value?"is-valid":!t.validators.length||!t.required&&n?"":"is-invalid"}getErrorMessages(t,e){let n=[];for(let o=0;o<t.validators.length;o++)e.controls[t.form].hasError([t.validatorErrors[o]])&&n.push(t.validatorMsg[o]);return n}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogInputContent,deps:[{token:i1$2.NgbActiveModal},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogInputContent,isStandalone:!1,selector:"resolveio-dialog.input",inputs:{title:"title",inputFields:"inputFields"},ngImport:i0,template:'\n\t\t<form [formGroup]="formInput" novalidate (ngSubmit)="_activeModal.close(this.formInput.controls)">\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-plus-circle" style="color: green; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()"></button>\n\t\t </div>\n\t\t <div class="modal-body">\n\t\t @for (inputField of inputFields; track inputField.label; let i = $index) {\n\t\t <div class="form-group">\n\t\t <label class="form-control-label">{{inputField.label}}</label>\n\t\t @if (formInput.controls[inputField.form].hasError(\'required\') && inputField.required) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t @if (!formInput.controls[inputField.form].hasError(\'required\') && formInput.controls[inputField.form].invalid) {\n\t\t <em>- Invalid</em>\n\t\t }\n\t\t @if (inputField.type !== \'date\' && inputField.type !== \'datetime\' && inputField.type !== \'state\' && inputField.type !== \'textarea\' && inputField.type !== \'number\' && inputField.type !== \'select\' && inputField.type !== \'boolean\') {\n\t\t <input [autofocus]="i === 0 ? true : false" [focus]="i === 0 ? true : false" [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]" [type]="(inputField.type ? inputField.type : \'text\')">\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'select\') {\n\t\t <rio-select [formControlName]="inputField.form" [ngClass]="[validateInput(inputField, formInput)]" [placeholder]="inputField.placeholder" [options]="inputField.options" optionValueKey="value" optionLabelKey="text"></rio-select>\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'state\') {\n\t\t <select [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]">\n\t\t <option value="">Select State</option>\n\t\t @for (state of states; track state) {\n\t\t <option [value]="state">{{state}}</option>\n\t\t }\n\t\t </select>\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'textarea\') {\n\t\t <textarea rows="4" [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]"></textarea>\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'number\') {\n\t\t <input [formControlName]="inputField.form" type="number" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]">\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'date\') {\n\t\t <div class="input-group">\n\t\t <rio-date-picker [formControlName]="inputField.form" placeholder="yyyy-mm-dd" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]" selectionMode="date" [enableTime]="false"></rio-date-picker>\n\t\t </div>\n\t\t }\n\t\t @if (inputField.type === \'datetime\') {\n\t\t <div class="input-group">\n\t\t <rio-date-picker [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]" selectionMode="datetime"></rio-date-picker>\n\t\t </div>\n\t\t }\n\t\t @if (inputField.type === \'boolean\') {\n\t\t <div (click)="formInput.controls[inputField.form].setValue(!formInput.controls[inputField.form].value)">\n\t\t @if (formInput.controls[inputField.form].value) {\n\t\t <i class="fa fa-check" style="color: green; font-size: 24px;" aria-hidden="true"></i>\n\t\t }\n\t\t @if (!formInput.controls[inputField.form].value) {\n\t\t <i class="fa fa-times" style="color: red; font-size: 24px;" aria-hidden="true"></i>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t <div class="modal-footer">\n\t\t <form-button [form]="formInput"></form-button>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t </div>\n\t\t</form>\n\t\t',isInline:!0,dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.NgSelectOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:i2.ɵNgSelectMultipleOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:i2.SelectControlValueAccessor,selector:"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]",inputs:["compareWith"]},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"component",type:FormButtonComponent,selector:"form-button",inputs:["form","disabled","type"]},{kind:"component",type:i5.RioSelectComponent,selector:"rio-select",inputs:["placeholder","multiple","panelMaxHeight","panelMaxViewportRatio","optionHeight","virtualBuffer","overlayZIndex","autoSizePanel","panelPosition","autoCenterPanel","viewportMargin","panelWidth","panelFullscreenWidth","clearable","templateLabelFromView","searchable","searchMatchMode","defaultSearch","textWrap","compareWith","options","optionLabelKey","optionLabelFn","optionValueKey","optionDisabledKey","optionIdKey","optionGroupKey","disabled","emitOptionObject","debugLog","stickyKey","stickyAutoSave"],outputs:["change"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"component",type:i7$1.RioDatePickerComponent,selector:"rio-date-picker",inputs:["enableDate","enableTime","selectionMode","firstDayOfWeek","toggleWeekFirstDay","timezone","minDate","maxDate","disabled","label","allowSeconds","minuteStep","panelWidth"],outputs:["change"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogInputContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.input",template:'\n\t\t<form [formGroup]="formInput" novalidate (ngSubmit)="_activeModal.close(this.formInput.controls)">\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-plus-circle" style="color: green; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()"></button>\n\t\t </div>\n\t\t <div class="modal-body">\n\t\t @for (inputField of inputFields; track inputField.label; let i = $index) {\n\t\t <div class="form-group">\n\t\t <label class="form-control-label">{{inputField.label}}</label>\n\t\t @if (formInput.controls[inputField.form].hasError(\'required\') && inputField.required) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t @if (!formInput.controls[inputField.form].hasError(\'required\') && formInput.controls[inputField.form].invalid) {\n\t\t <em>- Invalid</em>\n\t\t }\n\t\t @if (inputField.type !== \'date\' && inputField.type !== \'datetime\' && inputField.type !== \'state\' && inputField.type !== \'textarea\' && inputField.type !== \'number\' && inputField.type !== \'select\' && inputField.type !== \'boolean\') {\n\t\t <input [autofocus]="i === 0 ? true : false" [focus]="i === 0 ? true : false" [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]" [type]="(inputField.type ? inputField.type : \'text\')">\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'select\') {\n\t\t <rio-select [formControlName]="inputField.form" [ngClass]="[validateInput(inputField, formInput)]" [placeholder]="inputField.placeholder" [options]="inputField.options" optionValueKey="value" optionLabelKey="text"></rio-select>\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'state\') {\n\t\t <select [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]">\n\t\t <option value="">Select State</option>\n\t\t @for (state of states; track state) {\n\t\t <option [value]="state">{{state}}</option>\n\t\t }\n\t\t </select>\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'textarea\') {\n\t\t <textarea rows="4" [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]"></textarea>\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'number\') {\n\t\t <input [formControlName]="inputField.form" type="number" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]">\n\t\t @for (errorMsg of getErrorMessages(inputField, formInput); track errorMsg) {\n\t\t <div class="invalid-feedback">{{errorMsg}}</div>\n\t\t }\n\t\t }\n\t\t @if (inputField.type === \'date\') {\n\t\t <div class="input-group">\n\t\t <rio-date-picker [formControlName]="inputField.form" placeholder="yyyy-mm-dd" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]" selectionMode="date" [enableTime]="false"></rio-date-picker>\n\t\t </div>\n\t\t }\n\t\t @if (inputField.type === \'datetime\') {\n\t\t <div class="input-group">\n\t\t <rio-date-picker [formControlName]="inputField.form" [ngClass]="[\'form-control\', validateInput(inputField, formInput)]" selectionMode="datetime"></rio-date-picker>\n\t\t </div>\n\t\t }\n\t\t @if (inputField.type === \'boolean\') {\n\t\t <div (click)="formInput.controls[inputField.form].setValue(!formInput.controls[inputField.form].value)">\n\t\t @if (formInput.controls[inputField.form].value) {\n\t\t <i class="fa fa-check" style="color: green; font-size: 24px;" aria-hidden="true"></i>\n\t\t }\n\t\t @if (!formInput.controls[inputField.form].value) {\n\t\t <i class="fa fa-times" style="color: red; font-size: 24px;" aria-hidden="true"></i>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t <div class="modal-footer">\n\t\t <form-button [form]="formInput"></form-button>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t </div>\n\t\t</form>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:i2.FormBuilder}],propDecorators:{title:[{type:Input}],inputFields:[{type:Input}]}});class DialogErrorContent{activeModal;title;body;handleKeyboardEvent(t){13===t.keyCode&&this.activeModal.close()}constructor(t){this.activeModal=t}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogErrorContent,deps:[{token:i1$2.NgbActiveModal}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:DialogErrorContent,isStandalone:!1,selector:"resolveio-dialog.error",inputs:{title:"title",body:"body"},host:{listeners:{"document:keypress":"handleKeyboardEvent($event)"}},ngImport:i0,template:'\n\t\t<div class="modal-header">\n\t\t\t<h4 class="modal-title"><i class="fa fa-times-circle" style="color: red; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t\t<button type="button" class="btn-close ms-auto" aria-label="Close" (click)="activeModal.dismiss(\'Cross click\')"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t\t<p>{{ body }}</p>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t\t<button type="button" class="btn btn-secondary" (click)="activeModal.close(\'Close click\')">Ok</button>\n\t\t</div>\n \t',isInline:!0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogErrorContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.error",template:'\n\t\t<div class="modal-header">\n\t\t\t<h4 class="modal-title"><i class="fa fa-times-circle" style="color: red; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t\t<button type="button" class="btn-close ms-auto" aria-label="Close" (click)="activeModal.dismiss(\'Cross click\')"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t\t<p>{{ body }}</p>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t\t<button type="button" class="btn btn-secondary" (click)="activeModal.close(\'Close click\')">Ok</button>\n\t\t</div>\n \t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal}],propDecorators:{title:[{type:Input}],body:[{type:Input}],handleKeyboardEvent:[{type:HostListener,args:["document:keypress",["$event"]]}]}});class DialogConfirmContent{activeModal;title;body;html;handleKeyboardEvent(t){13===t.keyCode&&this.activeModal.close()}constructor(t){this.activeModal=t}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogConfirmContent,deps:[{token:i1$2.NgbActiveModal}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:DialogConfirmContent,isStandalone:!1,selector:"resolveio-dialog.confirm",inputs:{title:"title",body:"body",html:"html"},host:{listeners:{"document:keypress":"handleKeyboardEvent($event)"}},ngImport:i0,template:'\n\t\t<div class="modal-header">\n\t\t\t<h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t\t<button type="button" class="btn-close ms-auto" aria-label="Close" (click)="activeModal.dismiss(\'Cross click\')"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t\t<p>{{ body }}</p>\n\t\t\t<div [innerHTML]="html"></div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t\t<button type="button" class="btn btn-success" (click)="activeModal.close()">Yes</button>\n\t\t\t<button type="button" class="btn btn-danger" (click)="activeModal.dismiss()">No</button>\n\t\t</div>\n \t',isInline:!0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogConfirmContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.confirm",template:'\n\t\t<div class="modal-header">\n\t\t\t<h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t\t<button type="button" class="btn-close ms-auto" aria-label="Close" (click)="activeModal.dismiss(\'Cross click\')"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t\t<p>{{ body }}</p>\n\t\t\t<div [innerHTML]="html"></div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t\t<button type="button" class="btn btn-success" (click)="activeModal.close()">Yes</button>\n\t\t\t<button type="button" class="btn btn-danger" (click)="activeModal.dismiss()">No</button>\n\t\t</div>\n \t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal}],propDecorators:{title:[{type:Input}],body:[{type:Input}],html:[{type:Input}],handleKeyboardEvent:[{type:HostListener,args:["document:keypress",["$event"]]}]}});class DialogSelectDateTimeContent{_activeModal;_fb;title="";date;showTime=!0;close;allElements;form;constructor(t,e){this._activeModal=t,this._fb=e}ngOnInit(){this.date||(this.date=new Date),this.form=this._fb.group({time:[{hour:this.date.getHours(),minute:this.date.getMinutes(),second:0},[Validators.required]],date:[{year:this.date.getFullYear(),month:this.date.getMonth()+1,day:this.date.getDate()},[Validators.required]]})}ngAfterViewInit(){setTimeout(()=>{let t=this.recursiveFindFirstElement(this.allElements.nativeElement);t?t.focus():(this.close.nativeElement.focus(),this.close.nativeElement.blur())},100)}recursiveFindFirstElement(t){let e=null,n=t.children;for(let t=0;t<Object.keys(n).length;t++){let o=n[Object.keys(n)[t]];if(o.children&&o.children.length)e=this.recursiveFindFirstElement(o);else{if("BUTTON"===o.tagName&&o.classList.contains("close"))return null;if(!("BUTTON"!==o.tagName&&"INPUT"!==o.tagName&&"SELECT"!==o.tagName&&"TEXTAREA"!==o.tagName||o.hidden||o.disabled))return o}if(e)break}return e}submitForm(){this._activeModal.close(new Date(this.form.value.date.year,parseInt(this.form.value.date.month)-1,this.form.value.date.day,this.form.value.time.hour,this.form.value.time.minute,this.form.value.time.second,0))}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectDateTimeContent,deps:[{token:i1$2.NgbActiveModal},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogSelectDateTimeContent,isStandalone:!1,selector:"resolveio-dialog.select-datetime",inputs:{title:"title",date:"date",showTime:"showTime"},viewQueries:[{propertyName:"close",first:!0,predicate:["close"],descendants:!0},{propertyName:"allElements",first:!0,predicate:["allElements"],descendants:!0}],ngImport:i0,template:'\n\t \t<style>\n\t \t table {\n\t \t width: 100%;\n\t \t table-layout: fixed;\n\t \t}\n\t \t\n\t \ttr {\n\t \twidth: 100%;\n\t \t}\n\t \t\n\t \ttd {\n\t \twidth: 100%;\n\t \ttext-align: center;\n\t \t}\n\t \t</style>\n\t \t<div #allElements>\n\t \t <form [formGroup]="form" novalidate (ngSubmit)="submitForm()">\n\t \t <div class="modal-header">\n\t \t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t \t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t \t </div>\n\t \t <div class="modal-body">\n\t \t <table>\n\t \t <tr>\n\t \t <td style="border: none;">\n\t \t <div class="input-group">\n\t \t <rio-date-picker class="form-control" placeholder="yyyy-mm-dd" name="dp" formControlName="date" selectionMode="date" [enableTime]="false"></rio-date-picker>\n\t \t </div>\n\t \t </td>\n\t \t @if (showTime) {\n\t \t <td style="border: none;">\n\t \t <div class="offset-3">\n\t \t <rio-date-picker formControlName="time" selectionMode="time" [enableDate]="false"></rio-date-picker>\n\t \t </div>\n\t \t </td>\n\t \t }\n\t \t </tr>\n\t \t </table>\n\t \t </div>\n\t \t <div class="modal-footer">\n\t \t <form-button [form]="form"></form-button>\n\t \t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t \t </div>\n\t \t </form>\n\t \t</div>\n\t \t',isInline:!0,styles:["table{width:100%;table-layout:fixed}tr{width:100%}td{width:100%;text-align:center}\n"],dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"component",type:FormButtonComponent,selector:"form-button",inputs:["form","disabled","type"]},{kind:"component",type:i7$1.RioDatePickerComponent,selector:"rio-date-picker",inputs:["enableDate","enableTime","selectionMode","firstDayOfWeek","toggleWeekFirstDay","timezone","minDate","maxDate","disabled","label","allowSeconds","minuteStep","panelWidth"],outputs:["change"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectDateTimeContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.select-datetime",template:'\n\t \t<style>\n\t \t table {\n\t \t width: 100%;\n\t \t table-layout: fixed;\n\t \t}\n\t \t\n\t \ttr {\n\t \twidth: 100%;\n\t \t}\n\t \t\n\t \ttd {\n\t \twidth: 100%;\n\t \ttext-align: center;\n\t \t}\n\t \t</style>\n\t \t<div #allElements>\n\t \t <form [formGroup]="form" novalidate (ngSubmit)="submitForm()">\n\t \t <div class="modal-header">\n\t \t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t \t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t \t </div>\n\t \t <div class="modal-body">\n\t \t <table>\n\t \t <tr>\n\t \t <td style="border: none;">\n\t \t <div class="input-group">\n\t \t <rio-date-picker class="form-control" placeholder="yyyy-mm-dd" name="dp" formControlName="date" selectionMode="date" [enableTime]="false"></rio-date-picker>\n\t \t </div>\n\t \t </td>\n\t \t @if (showTime) {\n\t \t <td style="border: none;">\n\t \t <div class="offset-3">\n\t \t <rio-date-picker formControlName="time" selectionMode="time" [enableDate]="false"></rio-date-picker>\n\t \t </div>\n\t \t </td>\n\t \t }\n\t \t </tr>\n\t \t </table>\n\t \t </div>\n\t \t <div class="modal-footer">\n\t \t <form-button [form]="form"></form-button>\n\t \t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t \t </div>\n\t \t </form>\n\t \t</div>\n\t \t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:i2.FormBuilder}],propDecorators:{title:[{type:Input}],date:[{type:Input}],showTime:[{type:Input}],close:[{type:ViewChild,args:["close",{static:!1}]}],allElements:[{type:ViewChild,args:["allElements",{static:!1}]}]}});class DialogSelectDataLabelsContent{_activeModal;_fb;title="";subtitle="";data;showArraySubData;form;dialogData=[];constructor(t,e){this._activeModal=t,this._fb=e}ngOnInit(){this.getKeys()}getKeys(){let t=Object.keys(this.data),e="";t.filter(t=>"_id"!==t&&!t.startsWith("id_")&&"__v"!==t&&"createdAt"!==t&&"updatedAt"!==t).forEach(t=>{if(e=typeof this.data[t],"object"===e)if(Array.isArray(this.data[t])){if(e="array",this.dialogData.push({label:t.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),data:t,selected:!0,type:e,subLabel:null,subData:null,subtype:null}),!0===this.showArraySubData){Object.keys(this.data[t][0]).filter(t=>"_id"!==t&&!t.startsWith("id_")).forEach(n=>{this.dialogData.push({label:t.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),subLabel:n.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),data:t,type:e,subData:n,selected:!0,subtype:typeof n})})}}else{let n=Object.keys(this.data[t]);n.length?n.filter(t=>"_id"!==t&&!t.startsWith("id_")).forEach(n=>{this.dialogData.push({label:t.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),subLabel:n.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),data:t,subData:n,subtype:null,selected:!0,type:e})}):this.dialogData.push({label:t.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),data:t,selected:!0,type:e,subData:null,subLabel:null,subtype:null})}else this.dialogData.push({label:t.replace(new RegExp("_","g")," ").replace("string","").replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}),data:t,selected:!0,type:e,subData:null,subLabel:null,subtype:null})})}changeSelected(t){t.selected=!t.selected,"array"===t.type&&null===t.subtype&&this.dialogData.filter(e=>e.label===t.label).forEach(e=>{e.selected=t.selected})}submit(){return this.dialogData}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectDataLabelsContent,deps:[{token:i1$2.NgbActiveModal},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogSelectDataLabelsContent,isStandalone:!1,selector:"resolveio-dialog.select-data-labels",inputs:{title:"title",subtitle:"subtitle",data:"data",showArraySubData:"showArraySubData"},ngImport:i0,template:'\n\t\t<div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.75em" aria-hidden="true"></i> {{ title }} - {{ subtitle }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t <div class="col-lg-12">\n\t\t <div class="row">\n\t\t <div class="col-lg-12">\n\t\t @for (label of dialogData; track label.label) {\n\t\t <div class="row">\n\t\t @if (label.subtype === null && label.type !== \'object\') {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.label }}\n\t\t </div>\n\t\t }\n\t\t @if (label.subtype === null && label.type === \'object\' && label.subLabel !== null) {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.subLabel }}\n\t\t </div>\n\t\t }\n\t\t @if (label.subtype === null && label.type === \'object\' && label.subLabel === null) {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.label }}\n\t\t </div>\n\t\t }\n\t\t @if (label.subtype !== null) {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.subLabel }}\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t <button type="button" class="btn btn-success" (click)="_activeModal.close(dialogData)">Submit</button>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t</div>\n\t\t',isInline:!0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectDataLabelsContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.select-data-labels",template:'\n\t\t<div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.75em" aria-hidden="true"></i> {{ title }} - {{ subtitle }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()"></button>\n\t\t</div>\n\t\t<div class="modal-body">\n\t\t <div class="col-lg-12">\n\t\t <div class="row">\n\t\t <div class="col-lg-12">\n\t\t @for (label of dialogData; track label.label) {\n\t\t <div class="row">\n\t\t @if (label.subtype === null && label.type !== \'object\') {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.label }}\n\t\t </div>\n\t\t }\n\t\t @if (label.subtype === null && label.type === \'object\' && label.subLabel !== null) {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.subLabel }}\n\t\t </div>\n\t\t }\n\t\t @if (label.subtype === null && label.type === \'object\' && label.subLabel === null) {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.label }}\n\t\t </div>\n\t\t }\n\t\t @if (label.subtype !== null) {\n\t\t <div style="font-size: 12px;">\n\t\t <input type="checkbox" [checked]="label.selected" (click)="changeSelected(label)" style="height: 20px; width: auto;"> {{ label.subLabel }}\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t <button type="button" class="btn btn-success" (click)="_activeModal.close(dialogData)">Submit</button>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t</div>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:i2.FormBuilder}],propDecorators:{title:[{type:Input}],subtitle:[{type:Input}],data:[{type:Input}],showArraySubData:[{type:Input}]}});class DialogLoginContent{_activeModal;_fb;msAllowed=!1;showLoginText=!0;publicProgram=!1;usernameInput;form;publicForm;publicRegisterForm;publicMode="login";loginTab="customer";focusTimeout=null;constructor(t,e){this._activeModal=t,this._fb=e}ngOnInit(){this.form=this._fb.group({username:["",[Validators.required]],password:["",[Validators.required]],forgotPassword:[!1]}),this.publicForm=this._fb.group({email:["",[Validators.required,Validators.email]],password:["",[Validators.required]]}),this.publicRegisterForm=this._fb.group({companyName:["",[Validators.required]],contactName:[""],email:["",[Validators.required,Validators.email]],password:["",[Validators.required]],confirmPassword:["",[Validators.required]],phone:[""]})}ngAfterViewInit(){this.queueUsernameFocus()}ngOnDestroy(){this.focusTimeout&&(clearTimeout(this.focusTimeout),this.focusTimeout=null)}queueUsernameFocus(){this.focusTimeout=setTimeout(()=>{this.focusTimeout=null,this.usernameInput?.nativeElement?.focus()})}setPublicMode(t){this.publicMode=t}setLoginTab(t){this.loginTab=t,"employee"===t&&this.queueUsernameFocus()}submitPublicLogin(){this.publicForm.invalid?this.publicForm.markAllAsTouched():this._activeModal.close({form:this.publicForm,type:"PUBLIC_LOGIN"})}submitPublicRegister(){this.publicRegisterForm.invalid?this.publicRegisterForm.markAllAsTouched():this.publicRegisterForm.value.password===this.publicRegisterForm.value.confirmPassword?this._activeModal.close({form:this.publicRegisterForm,type:"PUBLIC_REGISTER"}):this.publicRegisterForm.controls.confirmPassword.setErrors({mismatch:!0})}toggleForgotPassword(){this.form.controls.forgotPassword.setValue(!this.form.controls.forgotPassword.value),this.form.controls.forgotPassword.value?(this.form.controls.password.setValue(""),this.form.controls.password.clearValidators(),this.form.controls.password.disable()):(this.form.controls.password.setValidators([Validators.required]),this.form.controls.password.enable()),this.form.controls.password.updateValueAndValidity()}close(t){this._activeModal.close({form:this.form,type:t})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogLoginContent,deps:[{token:i1$2.NgbActiveModal},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogLoginContent,isStandalone:!1,selector:"resolveio-dialog.login",inputs:{msAllowed:"msAllowed",showLoginText:"showLoginText",publicProgram:"publicProgram"},viewQueries:[{propertyName:"usernameInput",first:!0,predicate:["usernameInput"],descendants:!0}],ngImport:i0,template:'\n\t\t<style>\n\t\t .login-modal {\n\t\t font-family: "Sora", "Space Grotesk", "Segoe UI", Arial, sans-serif;\n\t\t color: #0f172a;\n\t\t }\n\n\t\t .login-modal .modal-body {\n\t\t background: #ffffff;\n\t\t padding: 0;\n\t\t }\n\n\t\t .login-body {\n\t\t position: relative;\n\t\t display: flex;\n\t\t justify-content: center;\n\t\t width: 100%;\n\t\t }\n\n\t\t .login-body .row {\n\t\t --bs-gutter-x: 0;\n\t\t --bs-gutter-y: 0;\n\t\t margin: 0;\n\t\t width: 100%;\n\t\t }\n\n\t\t .login-body [class^="col-"],\n\t\t .login-body [class*=" col-"] {\n\t\t padding: 0;\n\t\t }\n\n\t\t .login-card {\n\t\t margin-bottom: 0;\n\t\t padding: 18px;\n\t\t border-radius: 16px;\n\t\t background: #ffffff;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);\n\t\t width: 100%;\n\t\t position: relative;\n\t\t }\n\n\t\t .login-close {\n\t\t position: absolute;\n\t\t top: 12px;\n\t\t right: 12px;\n\t\t width: 44px;\n\t\t height: 44px;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t border-radius: 12px;\n\t\t background: rgba(15, 23, 42, 0.04);\n\t\t color: #0f172a;\n\t\t font-size: 22px;\n\t\t font-weight: 600;\n\t\t line-height: 1;\n\t\t display: flex;\n\t\t align-items: center;\n\t\t justify-content: center;\n\t\t box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);\n\t\t transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;\n\t\t }\n\n\t\t .login-close:hover {\n\t\t background: #0f172a;\n\t\t color: #ffffff;\n\t\t transform: translateY(-1px) scale(1.02);\n\t\t box-shadow: 0 10px 22px rgba(15, 23, 42, 0.2);\n\t\t }\n\n\t\t .login-close:active {\n\t\t transform: translateY(0) scale(0.98);\n\t\t box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);\n\t\t }\n\n\t\t .login-close:focus-visible {\n\t\t outline: none;\n\t\t box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), 0 6px 18px rgba(15, 23, 42, 0.12);\n\t\t }\n\n\t\t .login-header {\n\t\t font-size: 22px;\n\t\t font-weight: 600;\n\t\t color: #0f172a;\n\t\t margin-bottom: 12px;\n\t\t text-align: center;\n\t\t background: linear-gradient(120deg, #0f172a, #2563eb);\n\t\t -webkit-background-clip: text;\n\t\t background-clip: text;\n\t\t -webkit-text-fill-color: transparent;\n\t\t }\n\n\t\t .login-toggle,\n\t\t .public-toggle {\n\t\t display: inline-flex;\n\t\t gap: 6px;\n\t\t align-items: center;\n\t\t justify-content: center;\n\t\t padding: 6px;\n\t\t border-radius: 999px;\n\t\t background: #f1f5f9;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t margin: 0 auto 16px;\n\t\t }\n\n\t\t .login-tab-row {\n\t\t display: flex;\n\t\t align-items: center;\n\t\t justify-content: space-between;\n\t\t gap: 12px;\n\t\t flex-wrap: wrap;\n\t\t margin-bottom: 12px;\n\t\t }\n\n\t\t .login-tab-row .login-header {\n\t\t margin-bottom: 0;\n\t\t text-align: center;\n\t\t flex: 1;\n\t\t }\n\n\t\t .login-subtoggle {\n\t\t display: flex;\n\t\t justify-content: flex-start;\n\t\t }\n\n\t\t .login-subtoggle .public-toggle {\n\t\t margin: 0 0 16px;\n\t\t }\n\n\t\t .login-toggle .btn,\n\t\t .public-toggle .btn {\n\t\t border-radius: 999px;\n\t\t font-weight: 600;\n\t\t padding: 6px 16px;\n\t\t border: 1px solid transparent;\n\t\t }\n\n\t\t .login-toggle .btn-outline-secondary,\n\t\t .public-toggle .btn-outline-secondary {\n\t\t color: #475569;\n\t\t border-color: rgba(71, 85, 105, 0.35);\n\t\t background: transparent;\n\t\t }\n\n\t\t .login-toggle .btn-primary,\n\t\t .public-toggle .btn-primary {\n\t\t background: linear-gradient(135deg, #2563eb, #38bdf8);\n\t\t border-color: transparent;\n\t\t box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);\n\t\t }\n\n\t\t .loginform {\n\t\t margin-top: 10px;\n\t\t }\n\n\t\t .loginform label,\n\t\t .third-party-login-section label {\n\t\t font-size: 13px;\n\t\t font-weight: 600;\n\t\t letter-spacing: 0.4px;\n\t\t text-transform: uppercase;\n\t\t color: #475569;\n\t\t }\n\n\t\t .login-modal .form-control {\n\t\t background: #ffffff;\n\t\t border: 1px solid rgba(71, 85, 105, 0.35);\n\t\t color: #0f172a;\n\t\t height: 48px;\n\t\t border-radius: 12px;\n\t\t padding: 0 14px;\n\t\t }\n\n\t\t .login-modal .form-control::placeholder {\n\t\t color: rgba(15, 23, 42, 0.5);\n\t\t }\n\n\t\t .login-modal .form-control:focus {\n\t\t border-color: #2563eb;\n\t\t box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);\n\t\t }\n\n\t\t .login-modal .form-control.is-invalid {\n\t\t border-color: rgba(239, 68, 68, 0.8);\n\t\t box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);\n\t\t }\n\n\t\t .employee-login-btn,\n\t\t .third-party-login-btn {\n\t\t width: 100%;\n\t\t border-radius: 12px;\n\t\t height: 46px;\n\t\t border: none;\n\t\t font-weight: 600;\n\t\t letter-spacing: 0.3px;\n\t\t }\n\n\t\t .employee-login-btn {\n\t\t background: linear-gradient(135deg, #2563eb, #22d3ee);\n\t\t color: #ffffff;\n\t\t }\n\n\t\t .third-party-login-btn {\n\t\t background: linear-gradient(135deg, #22c55e, #16a34a);\n\t\t color: #ffffff;\n\t\t margin-top: 12px;\n\t\t }\n\n\t\t .disabled-btn {\n\t\t background: rgba(15, 23, 42, 0.05);\n\t\t color: rgba(15, 23, 42, 0.45);\n\t\t border: 1px dashed rgba(15, 23, 42, 0.2);\n\t\t cursor: not-allowed;\n\t\t }\n\n\t\t .third-party-login-section {\n\t\t background: #f8fafc;\n\t\t border-radius: 14px;\n\t\t padding: 16px;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t }\n\n\t\t .employee-login-section,\n\t\t .third-party-login-section {\n\t\t text-align: center;\n\t\t }\n\n\t\t .public-section {\n\t\t padding: 8px;\n\t\t }\n\n\t\t .contactimg {\n\t\t position: relative;\n\t\t border-radius: 16px;\n\t\t overflow: hidden;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t }\n\n\t\t .contactimg::after {\n\t\t content: "";\n\t\t position: absolute;\n\t\t inset: 0;\n\t\t background: linear-gradient(160deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.35));\n\t\t }\n\n\t\t .contactimg > img {\n\t\t width: 100%;\n\t\t display: block;\n\t\t filter: saturate(1.1);\n\t\t }\n\n\t\t .textbox {\n\t\t position: absolute;\n\t\t inset: 0;\n\t\t display: flex;\n\t\t align-items: center;\n\t\t justify-content: center;\n\t\t text-align: center;\n\t\t color: #ffffff;\n\t\t padding: 30px;\n\t\t z-index: 1;\n\t\t }\n\n\t\t .login-logo {\n\t\t margin-bottom: 20px;\n\t\t }\n\n\t\t .form-check a {\n\t\t color: #2563eb;\n\t\t text-decoration: none;\n\t\t }\n\n\t\t .form-check a:hover {\n\t\t color: #1d4ed8;\n\t\t text-decoration: underline;\n\t\t }\n\n\t\t .login-modal .btn-secondary {\n\t\t background: transparent;\n\t\t border: 1px solid rgba(71, 85, 105, 0.35);\n\t\t color: #475569;\n\t\t border-radius: 10px;\n\t\t }\n\t\t</style>\n\t\t<form [formGroup]="form" novalidate class="login-modal">\n\t\t @if (form) {\n\t\t <div class="modal-body">\n\t\t @if (publicProgram) {\n\t\t <div class="login-body">\n\t\t <div class="row g-4">\n\t\t <div class="col-12">\n\t\t <div class="login-card">\n\t\t <button type="button" class="login-close" aria-label="Close" (click)="_activeModal.dismiss()">×</button>\n\t\t <div class="login-tab-row">\n\t\t <div class="login-toggle">\n\t\t <button type="button" class="btn btn-sm" [ngClass]="loginTab === \'customer\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setLoginTab(\'customer\')">Customer</button>\n\t\t <button type="button" class="btn btn-sm" [ngClass]="loginTab === \'employee\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setLoginTab(\'employee\')">Employee</button>\n\t\t </div>\n\t\t <h3 class="login-header">{{ loginTab === \'customer\' ? \'Customer Access\' : \'Employee Sign In\' }}</h3>\n\t\t </div>\n\t\t @if (loginTab === \'customer\') {\n\t\t <div class="login-subtoggle">\n\t\t <div class="public-toggle">\n\t\t <button type="button" class="btn btn-sm" [ngClass]="publicMode === \'login\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setPublicMode(\'login\')">Sign in</button>\n\t\t <button type="button" class="btn btn-sm" [ngClass]="publicMode === \'register\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setPublicMode(\'register\')">Create account</button>\n\t\t </div>\n\t\t </div>\n\t\t @if (publicMode === \'login\') {\n\t\t <div class="third-party-login-section public-section" [formGroup]="publicForm">\n\t\t <div class="form-group">\n\t\t <label>Email</label>\n\t\t @if (publicForm.controls.email.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="email" [ngClass]="[\'form-control\', publicForm.controls.email.valid ? \'is-valid\' : \'is-invalid\']" formControlName="email" placeholder="you@company.com" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (publicForm.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', publicForm.controls.password.valid ? \'is-valid\' : \'is-invalid\']" formControlName="password" placeholder="Your password" autocomplete="current-password">\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="submitPublicLogin()">Sign in</button>\n\t\t <button type="button" class="btn third-party-login-btn disabled-btn" disabled>Google sign-in (coming soon)</button>\n\t\t </div>\n\t\t }\n\t\t @if (publicMode === \'register\') {\n\t\t <div class="third-party-login-section public-section" [formGroup]="publicRegisterForm">\n\t\t <div class="form-group">\n\t\t <label>Company name</label>\n\t\t @if (publicRegisterForm.controls.companyName.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" [ngClass]="[\'form-control\', publicRegisterForm.controls.companyName.valid ? \'is-valid\' : \'is-invalid\']" formControlName="companyName" placeholder="Your company name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Contact name</label>\n\t\t <input type="text" class="form-control" formControlName="contactName" placeholder="Your name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Email</label>\n\t\t @if (publicRegisterForm.controls.email.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="email" [ngClass]="[\'form-control\', publicRegisterForm.controls.email.valid ? \'is-valid\' : \'is-invalid\']" formControlName="email" placeholder="you@company.com" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (publicRegisterForm.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', publicRegisterForm.controls.password.valid ? \'is-valid\' : \'is-invalid\']" formControlName="password" placeholder="Create a password" autocomplete="new-password">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Confirm password</label>\n\t\t @if (publicRegisterForm.controls.confirmPassword.hasError(\'mismatch\')) {\n\t\t <em>- Passwords must match</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', publicRegisterForm.controls.confirmPassword.valid ? \'is-valid\' : \'is-invalid\']" formControlName="confirmPassword" placeholder="Confirm password" autocomplete="new-password">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Phone (optional)</label>\n\t\t <input type="text" class="form-control" formControlName="phone" placeholder="Phone number">\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="submitPublicRegister()">Create account</button>\n\t\t </div>\n\t\t }\n\t\t }\n\t\t @if (loginTab === \'employee\') {\n\t\t @if (msAllowed) {\n\t\t <div class="employee-login-section">\n\t\t <button type="submit" class="btn employee-login-btn" (click)="close(\'MS\')">Employee Login</button>\n\t\t </div>\n\t\t }\n\t\t @if (!msAllowed) {\n\t\t <div class="third-party-login-section">\n\t\t <div class="form-group">\n\t\t <label>Username/Email</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input #usernameInput type="email" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" aria-describedby="emailHelp" placeholder="Your Username/Email" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (form.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', form.controls.password.enabled ? (form.controls.password.valid ? \'is-valid\' : \'is-invalid\') : \'\']" formControlName="password" placeholder="Your Password" autocomplete="current-password">\n\t\t </div>\n\t\t <div class="form-check text-right">\n\t\t <label class="form-check-label"><a href="javascript:void(0)" (click)="toggleForgotPassword()"> {{!form.controls.forgotPassword.value ? \'Forgot Password?\' : \'Enter Password\'}} </a></label>\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="close(\'ResolveIO\')">{{!form.controls.forgotPassword.value ? \'Login\' : \'Submit\'}}</button>\n\t\t </div>\n\t\t }\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t @else {\n\t\t <div class="login-body">\n\t\t <div class="row justify-content-md-center">\n\t\t <div class="col-lg-12">\n\t\t <div class="row">\n\t\t <div class="col-lg-6">\n\t\t <div class="contactimg">\n\t\t <img src="/assets/images/loginsignup/formimg.jpg" alt="images" class="img-fluid">\n\t\t @if (showLoginText) {\n\t\t <div class="textbox">\n\t\t <div class="login-logo"><img src="/assets/images/loginsignup/login-logo.png" alt="images"></div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t <div class="col-lg-6">\n\t\t <div class="log-box">\n\t\t <div class="loginform" style="margin: 0px;">\n\t\t @if (!msAllowed) {\n\t\t <div class="login-card">\n\t\t <button type="button" class="login-close" aria-label="Close" (click)="_activeModal.dismiss()">×</button>\n\t\t <h3 class="login-header">Employee/Customer Login</h3>\n\t\t <div class="third-party-login-section">\n\t\t <div class="form-group">\n\t\t <label>Username/Email</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input #usernameInput type="email" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" aria-describedby="emailHelp" placeholder="Your Username/Email" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (form.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', form.controls.password.enabled ? (form.controls.password.valid ? \'is-valid\' : \'is-invalid\') : \'\']" formControlName="password" placeholder="Your Password" autocomplete="current-password">\n\t\t </div>\n\t\t <div class="form-check text-right">\n\t\t <label class="form-check-label"><a href="javascript:void(0)" (click)="toggleForgotPassword()"> {{!form.controls.forgotPassword.value ? \'Forgot Password?\' : \'Enter Password\'}} </a></label>\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="close(\'ResolveIO\')">{{!form.controls.forgotPassword.value ? \'Login\' : \'Submit\'}}</button>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t @if (msAllowed) {\n\t\t <div class="login-card">\n\t\t <button type="button" class="login-close" aria-label="Close" (click)="_activeModal.dismiss()">×</button>\n\t\t <h3 class="login-header">Employee Login</h3>\n\t\t <div class="employee-login-section">\n\t\t <button type="submit" class="btn employee-login-btn" (click)="close(\'MS\')">Employee Login</button>\n\t\t </div>\n\t\t </div>\n\t\t <div class="login-card">\n\t\t <h3 class="login-header">Third Party Login</h3>\n\t\t <div class="third-party-login-section">\n\t\t <div class="form-group">\n\t\t <label>Username/Email</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input #usernameInput type="email" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" aria-describedby="emailHelp" placeholder="Your Username/Email" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (form.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', form.controls.password.enabled ? (form.controls.password.valid ? \'is-valid\' : \'is-invalid\') : \'\']" formControlName="password" placeholder="Your Password" autocomplete="current-password">\n\t\t </div>\n\t\t <div class="form-check text-right">\n\t\t <label class="form-check-label"><a href="javascript:void(0)" (click)="toggleForgotPassword()"> {{!form.controls.forgotPassword.value ? \'Forgot Password?\' : \'Enter Password\'}} </a></label>\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="close(\'ResolveIO\')">{{!form.controls.forgotPassword.value ? \'Login\' : \'Submit\'}}</button>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t</form>\n\t\t',isInline:!0,styles:['.login-modal{font-family:Sora,Space Grotesk,Segoe UI,Arial,sans-serif;color:#0f172a}.login-modal .modal-body{background:#fff;padding:0}.login-body{position:relative;display:flex;justify-content:center;width:100%}.login-body .row{--bs-gutter-x: 0;--bs-gutter-y: 0;margin:0;width:100%}.login-body [class^=col-],.login-body [class*=" col-"]{padding:0}.login-card{margin-bottom:0;padding:18px;border-radius:16px;background:#fff;border:1px solid rgba(15,23,42,.08);box-shadow:0 12px 28px #0f172a1a;width:100%;position:relative}.login-close{position:absolute;top:12px;right:12px;width:44px;height:44px;border:1px solid rgba(15,23,42,.08);border-radius:12px;background:#0f172a0a;color:#0f172a;font-size:22px;font-weight:600;line-height:1;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 18px #0f172a1f;transition:transform .18s ease,box-shadow .18s ease,background .18s ease,color .18s ease}.login-close:hover{background:#0f172a;color:#fff;transform:translateY(-1px) scale(1.02);box-shadow:0 10px 22px #0f172a33}.login-close:active{transform:translateY(0) scale(.98);box-shadow:0 4px 12px #0f172a29}.login-close:focus-visible{outline:none;box-shadow:0 0 0 3px #2563eb59,0 6px 18px #0f172a1f}.login-header{font-size:22px;font-weight:600;color:#0f172a;margin-bottom:12px;text-align:center;background:linear-gradient(120deg,#0f172a,#2563eb);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.login-toggle,.public-toggle{display:inline-flex;gap:6px;align-items:center;justify-content:center;padding:6px;border-radius:999px;background:#f1f5f9;border:1px solid rgba(15,23,42,.08);margin:0 auto 16px}.login-tab-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}.login-tab-row .login-header{margin-bottom:0;text-align:center;flex:1}.login-subtoggle{display:flex;justify-content:flex-start}.login-subtoggle .public-toggle{margin:0 0 16px}.login-toggle .btn,.public-toggle .btn{border-radius:999px;font-weight:600;padding:6px 16px;border:1px solid transparent}.login-toggle .btn-outline-secondary,.public-toggle .btn-outline-secondary{color:#475569;border-color:#47556959;background:transparent}.login-toggle .btn-primary,.public-toggle .btn-primary{background:linear-gradient(135deg,#2563eb,#38bdf8);border-color:transparent;box-shadow:0 10px 20px #2563eb33}.loginform{margin-top:10px}.loginform label,.third-party-login-section label{font-size:13px;font-weight:600;letter-spacing:.4px;text-transform:uppercase;color:#475569}.login-modal .form-control{background:#fff;border:1px solid rgba(71,85,105,.35);color:#0f172a;height:48px;border-radius:12px;padding:0 14px}.login-modal .form-control::placeholder{color:#0f172a80}.login-modal .form-control:focus{border-color:#2563eb;box-shadow:0 0 0 3px #2563eb33}.login-modal .form-control.is-invalid{border-color:#ef4444cc;box-shadow:0 0 0 2px #ef444426}.employee-login-btn,.third-party-login-btn{width:100%;border-radius:12px;height:46px;border:none;font-weight:600;letter-spacing:.3px}.employee-login-btn{background:linear-gradient(135deg,#2563eb,#22d3ee);color:#fff}.third-party-login-btn{background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;margin-top:12px}.disabled-btn{background:#0f172a0d;color:#0f172a73;border:1px dashed rgba(15,23,42,.2);cursor:not-allowed}.third-party-login-section{background:#f8fafc;border-radius:14px;padding:16px;border:1px solid rgba(15,23,42,.08)}.employee-login-section,.third-party-login-section{text-align:center}.public-section{padding:8px}.contactimg{position:relative;border-radius:16px;overflow:hidden;border:1px solid rgba(15,23,42,.08)}.contactimg:after{content:"";position:absolute;inset:0;background:linear-gradient(160deg,#0f172a0d,#0f172a59)}.contactimg>img{width:100%;display:block;filter:saturate(1.1)}.textbox{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;color:#fff;padding:30px;z-index:1}.login-logo{margin-bottom:20px}.form-check a{color:#2563eb;text-decoration:none}.form-check a:hover{color:#1d4ed8;text-decoration:underline}.login-modal .btn-secondary{background:transparent;border:1px solid rgba(71,85,105,.35);color:#475569;border-radius:10px}\n'],dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogLoginContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.login",template:'\n\t\t<style>\n\t\t .login-modal {\n\t\t font-family: "Sora", "Space Grotesk", "Segoe UI", Arial, sans-serif;\n\t\t color: #0f172a;\n\t\t }\n\n\t\t .login-modal .modal-body {\n\t\t background: #ffffff;\n\t\t padding: 0;\n\t\t }\n\n\t\t .login-body {\n\t\t position: relative;\n\t\t display: flex;\n\t\t justify-content: center;\n\t\t width: 100%;\n\t\t }\n\n\t\t .login-body .row {\n\t\t --bs-gutter-x: 0;\n\t\t --bs-gutter-y: 0;\n\t\t margin: 0;\n\t\t width: 100%;\n\t\t }\n\n\t\t .login-body [class^="col-"],\n\t\t .login-body [class*=" col-"] {\n\t\t padding: 0;\n\t\t }\n\n\t\t .login-card {\n\t\t margin-bottom: 0;\n\t\t padding: 18px;\n\t\t border-radius: 16px;\n\t\t background: #ffffff;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);\n\t\t width: 100%;\n\t\t position: relative;\n\t\t }\n\n\t\t .login-close {\n\t\t position: absolute;\n\t\t top: 12px;\n\t\t right: 12px;\n\t\t width: 44px;\n\t\t height: 44px;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t border-radius: 12px;\n\t\t background: rgba(15, 23, 42, 0.04);\n\t\t color: #0f172a;\n\t\t font-size: 22px;\n\t\t font-weight: 600;\n\t\t line-height: 1;\n\t\t display: flex;\n\t\t align-items: center;\n\t\t justify-content: center;\n\t\t box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);\n\t\t transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;\n\t\t }\n\n\t\t .login-close:hover {\n\t\t background: #0f172a;\n\t\t color: #ffffff;\n\t\t transform: translateY(-1px) scale(1.02);\n\t\t box-shadow: 0 10px 22px rgba(15, 23, 42, 0.2);\n\t\t }\n\n\t\t .login-close:active {\n\t\t transform: translateY(0) scale(0.98);\n\t\t box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);\n\t\t }\n\n\t\t .login-close:focus-visible {\n\t\t outline: none;\n\t\t box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), 0 6px 18px rgba(15, 23, 42, 0.12);\n\t\t }\n\n\t\t .login-header {\n\t\t font-size: 22px;\n\t\t font-weight: 600;\n\t\t color: #0f172a;\n\t\t margin-bottom: 12px;\n\t\t text-align: center;\n\t\t background: linear-gradient(120deg, #0f172a, #2563eb);\n\t\t -webkit-background-clip: text;\n\t\t background-clip: text;\n\t\t -webkit-text-fill-color: transparent;\n\t\t }\n\n\t\t .login-toggle,\n\t\t .public-toggle {\n\t\t display: inline-flex;\n\t\t gap: 6px;\n\t\t align-items: center;\n\t\t justify-content: center;\n\t\t padding: 6px;\n\t\t border-radius: 999px;\n\t\t background: #f1f5f9;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t margin: 0 auto 16px;\n\t\t }\n\n\t\t .login-tab-row {\n\t\t display: flex;\n\t\t align-items: center;\n\t\t justify-content: space-between;\n\t\t gap: 12px;\n\t\t flex-wrap: wrap;\n\t\t margin-bottom: 12px;\n\t\t }\n\n\t\t .login-tab-row .login-header {\n\t\t margin-bottom: 0;\n\t\t text-align: center;\n\t\t flex: 1;\n\t\t }\n\n\t\t .login-subtoggle {\n\t\t display: flex;\n\t\t justify-content: flex-start;\n\t\t }\n\n\t\t .login-subtoggle .public-toggle {\n\t\t margin: 0 0 16px;\n\t\t }\n\n\t\t .login-toggle .btn,\n\t\t .public-toggle .btn {\n\t\t border-radius: 999px;\n\t\t font-weight: 600;\n\t\t padding: 6px 16px;\n\t\t border: 1px solid transparent;\n\t\t }\n\n\t\t .login-toggle .btn-outline-secondary,\n\t\t .public-toggle .btn-outline-secondary {\n\t\t color: #475569;\n\t\t border-color: rgba(71, 85, 105, 0.35);\n\t\t background: transparent;\n\t\t }\n\n\t\t .login-toggle .btn-primary,\n\t\t .public-toggle .btn-primary {\n\t\t background: linear-gradient(135deg, #2563eb, #38bdf8);\n\t\t border-color: transparent;\n\t\t box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);\n\t\t }\n\n\t\t .loginform {\n\t\t margin-top: 10px;\n\t\t }\n\n\t\t .loginform label,\n\t\t .third-party-login-section label {\n\t\t font-size: 13px;\n\t\t font-weight: 600;\n\t\t letter-spacing: 0.4px;\n\t\t text-transform: uppercase;\n\t\t color: #475569;\n\t\t }\n\n\t\t .login-modal .form-control {\n\t\t background: #ffffff;\n\t\t border: 1px solid rgba(71, 85, 105, 0.35);\n\t\t color: #0f172a;\n\t\t height: 48px;\n\t\t border-radius: 12px;\n\t\t padding: 0 14px;\n\t\t }\n\n\t\t .login-modal .form-control::placeholder {\n\t\t color: rgba(15, 23, 42, 0.5);\n\t\t }\n\n\t\t .login-modal .form-control:focus {\n\t\t border-color: #2563eb;\n\t\t box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);\n\t\t }\n\n\t\t .login-modal .form-control.is-invalid {\n\t\t border-color: rgba(239, 68, 68, 0.8);\n\t\t box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);\n\t\t }\n\n\t\t .employee-login-btn,\n\t\t .third-party-login-btn {\n\t\t width: 100%;\n\t\t border-radius: 12px;\n\t\t height: 46px;\n\t\t border: none;\n\t\t font-weight: 600;\n\t\t letter-spacing: 0.3px;\n\t\t }\n\n\t\t .employee-login-btn {\n\t\t background: linear-gradient(135deg, #2563eb, #22d3ee);\n\t\t color: #ffffff;\n\t\t }\n\n\t\t .third-party-login-btn {\n\t\t background: linear-gradient(135deg, #22c55e, #16a34a);\n\t\t color: #ffffff;\n\t\t margin-top: 12px;\n\t\t }\n\n\t\t .disabled-btn {\n\t\t background: rgba(15, 23, 42, 0.05);\n\t\t color: rgba(15, 23, 42, 0.45);\n\t\t border: 1px dashed rgba(15, 23, 42, 0.2);\n\t\t cursor: not-allowed;\n\t\t }\n\n\t\t .third-party-login-section {\n\t\t background: #f8fafc;\n\t\t border-radius: 14px;\n\t\t padding: 16px;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t }\n\n\t\t .employee-login-section,\n\t\t .third-party-login-section {\n\t\t text-align: center;\n\t\t }\n\n\t\t .public-section {\n\t\t padding: 8px;\n\t\t }\n\n\t\t .contactimg {\n\t\t position: relative;\n\t\t border-radius: 16px;\n\t\t overflow: hidden;\n\t\t border: 1px solid rgba(15, 23, 42, 0.08);\n\t\t }\n\n\t\t .contactimg::after {\n\t\t content: "";\n\t\t position: absolute;\n\t\t inset: 0;\n\t\t background: linear-gradient(160deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.35));\n\t\t }\n\n\t\t .contactimg > img {\n\t\t width: 100%;\n\t\t display: block;\n\t\t filter: saturate(1.1);\n\t\t }\n\n\t\t .textbox {\n\t\t position: absolute;\n\t\t inset: 0;\n\t\t display: flex;\n\t\t align-items: center;\n\t\t justify-content: center;\n\t\t text-align: center;\n\t\t color: #ffffff;\n\t\t padding: 30px;\n\t\t z-index: 1;\n\t\t }\n\n\t\t .login-logo {\n\t\t margin-bottom: 20px;\n\t\t }\n\n\t\t .form-check a {\n\t\t color: #2563eb;\n\t\t text-decoration: none;\n\t\t }\n\n\t\t .form-check a:hover {\n\t\t color: #1d4ed8;\n\t\t text-decoration: underline;\n\t\t }\n\n\t\t .login-modal .btn-secondary {\n\t\t background: transparent;\n\t\t border: 1px solid rgba(71, 85, 105, 0.35);\n\t\t color: #475569;\n\t\t border-radius: 10px;\n\t\t }\n\t\t</style>\n\t\t<form [formGroup]="form" novalidate class="login-modal">\n\t\t @if (form) {\n\t\t <div class="modal-body">\n\t\t @if (publicProgram) {\n\t\t <div class="login-body">\n\t\t <div class="row g-4">\n\t\t <div class="col-12">\n\t\t <div class="login-card">\n\t\t <button type="button" class="login-close" aria-label="Close" (click)="_activeModal.dismiss()">×</button>\n\t\t <div class="login-tab-row">\n\t\t <div class="login-toggle">\n\t\t <button type="button" class="btn btn-sm" [ngClass]="loginTab === \'customer\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setLoginTab(\'customer\')">Customer</button>\n\t\t <button type="button" class="btn btn-sm" [ngClass]="loginTab === \'employee\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setLoginTab(\'employee\')">Employee</button>\n\t\t </div>\n\t\t <h3 class="login-header">{{ loginTab === \'customer\' ? \'Customer Access\' : \'Employee Sign In\' }}</h3>\n\t\t </div>\n\t\t @if (loginTab === \'customer\') {\n\t\t <div class="login-subtoggle">\n\t\t <div class="public-toggle">\n\t\t <button type="button" class="btn btn-sm" [ngClass]="publicMode === \'login\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setPublicMode(\'login\')">Sign in</button>\n\t\t <button type="button" class="btn btn-sm" [ngClass]="publicMode === \'register\' ? \'btn-primary\' : \'btn-outline-secondary\'" (click)="setPublicMode(\'register\')">Create account</button>\n\t\t </div>\n\t\t </div>\n\t\t @if (publicMode === \'login\') {\n\t\t <div class="third-party-login-section public-section" [formGroup]="publicForm">\n\t\t <div class="form-group">\n\t\t <label>Email</label>\n\t\t @if (publicForm.controls.email.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="email" [ngClass]="[\'form-control\', publicForm.controls.email.valid ? \'is-valid\' : \'is-invalid\']" formControlName="email" placeholder="you@company.com" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (publicForm.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', publicForm.controls.password.valid ? \'is-valid\' : \'is-invalid\']" formControlName="password" placeholder="Your password" autocomplete="current-password">\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="submitPublicLogin()">Sign in</button>\n\t\t <button type="button" class="btn third-party-login-btn disabled-btn" disabled>Google sign-in (coming soon)</button>\n\t\t </div>\n\t\t }\n\t\t @if (publicMode === \'register\') {\n\t\t <div class="third-party-login-section public-section" [formGroup]="publicRegisterForm">\n\t\t <div class="form-group">\n\t\t <label>Company name</label>\n\t\t @if (publicRegisterForm.controls.companyName.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" [ngClass]="[\'form-control\', publicRegisterForm.controls.companyName.valid ? \'is-valid\' : \'is-invalid\']" formControlName="companyName" placeholder="Your company name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Contact name</label>\n\t\t <input type="text" class="form-control" formControlName="contactName" placeholder="Your name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Email</label>\n\t\t @if (publicRegisterForm.controls.email.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="email" [ngClass]="[\'form-control\', publicRegisterForm.controls.email.valid ? \'is-valid\' : \'is-invalid\']" formControlName="email" placeholder="you@company.com" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (publicRegisterForm.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', publicRegisterForm.controls.password.valid ? \'is-valid\' : \'is-invalid\']" formControlName="password" placeholder="Create a password" autocomplete="new-password">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Confirm password</label>\n\t\t @if (publicRegisterForm.controls.confirmPassword.hasError(\'mismatch\')) {\n\t\t <em>- Passwords must match</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', publicRegisterForm.controls.confirmPassword.valid ? \'is-valid\' : \'is-invalid\']" formControlName="confirmPassword" placeholder="Confirm password" autocomplete="new-password">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Phone (optional)</label>\n\t\t <input type="text" class="form-control" formControlName="phone" placeholder="Phone number">\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="submitPublicRegister()">Create account</button>\n\t\t </div>\n\t\t }\n\t\t }\n\t\t @if (loginTab === \'employee\') {\n\t\t @if (msAllowed) {\n\t\t <div class="employee-login-section">\n\t\t <button type="submit" class="btn employee-login-btn" (click)="close(\'MS\')">Employee Login</button>\n\t\t </div>\n\t\t }\n\t\t @if (!msAllowed) {\n\t\t <div class="third-party-login-section">\n\t\t <div class="form-group">\n\t\t <label>Username/Email</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input #usernameInput type="email" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" aria-describedby="emailHelp" placeholder="Your Username/Email" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (form.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', form.controls.password.enabled ? (form.controls.password.valid ? \'is-valid\' : \'is-invalid\') : \'\']" formControlName="password" placeholder="Your Password" autocomplete="current-password">\n\t\t </div>\n\t\t <div class="form-check text-right">\n\t\t <label class="form-check-label"><a href="javascript:void(0)" (click)="toggleForgotPassword()"> {{!form.controls.forgotPassword.value ? \'Forgot Password?\' : \'Enter Password\'}} </a></label>\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="close(\'ResolveIO\')">{{!form.controls.forgotPassword.value ? \'Login\' : \'Submit\'}}</button>\n\t\t </div>\n\t\t }\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t @else {\n\t\t <div class="login-body">\n\t\t <div class="row justify-content-md-center">\n\t\t <div class="col-lg-12">\n\t\t <div class="row">\n\t\t <div class="col-lg-6">\n\t\t <div class="contactimg">\n\t\t <img src="/assets/images/loginsignup/formimg.jpg" alt="images" class="img-fluid">\n\t\t @if (showLoginText) {\n\t\t <div class="textbox">\n\t\t <div class="login-logo"><img src="/assets/images/loginsignup/login-logo.png" alt="images"></div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t <div class="col-lg-6">\n\t\t <div class="log-box">\n\t\t <div class="loginform" style="margin: 0px;">\n\t\t @if (!msAllowed) {\n\t\t <div class="login-card">\n\t\t <button type="button" class="login-close" aria-label="Close" (click)="_activeModal.dismiss()">×</button>\n\t\t <h3 class="login-header">Employee/Customer Login</h3>\n\t\t <div class="third-party-login-section">\n\t\t <div class="form-group">\n\t\t <label>Username/Email</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input #usernameInput type="email" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" aria-describedby="emailHelp" placeholder="Your Username/Email" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (form.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', form.controls.password.enabled ? (form.controls.password.valid ? \'is-valid\' : \'is-invalid\') : \'\']" formControlName="password" placeholder="Your Password" autocomplete="current-password">\n\t\t </div>\n\t\t <div class="form-check text-right">\n\t\t <label class="form-check-label"><a href="javascript:void(0)" (click)="toggleForgotPassword()"> {{!form.controls.forgotPassword.value ? \'Forgot Password?\' : \'Enter Password\'}} </a></label>\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="close(\'ResolveIO\')">{{!form.controls.forgotPassword.value ? \'Login\' : \'Submit\'}}</button>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t @if (msAllowed) {\n\t\t <div class="login-card">\n\t\t <button type="button" class="login-close" aria-label="Close" (click)="_activeModal.dismiss()">×</button>\n\t\t <h3 class="login-header">Employee Login</h3>\n\t\t <div class="employee-login-section">\n\t\t <button type="submit" class="btn employee-login-btn" (click)="close(\'MS\')">Employee Login</button>\n\t\t </div>\n\t\t </div>\n\t\t <div class="login-card">\n\t\t <h3 class="login-header">Third Party Login</h3>\n\t\t <div class="third-party-login-section">\n\t\t <div class="form-group">\n\t\t <label>Username/Email</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input #usernameInput type="email" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" aria-describedby="emailHelp" placeholder="Your Username/Email" autocomplete="username">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Password</label>\n\t\t @if (form.controls.password.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="password" [ngClass]="[\'form-control\', form.controls.password.enabled ? (form.controls.password.valid ? \'is-valid\' : \'is-invalid\') : \'\']" formControlName="password" placeholder="Your Password" autocomplete="current-password">\n\t\t </div>\n\t\t <div class="form-check text-right">\n\t\t <label class="form-check-label"><a href="javascript:void(0)" (click)="toggleForgotPassword()"> {{!form.controls.forgotPassword.value ? \'Forgot Password?\' : \'Enter Password\'}} </a></label>\n\t\t </div>\n\t\t <button type="submit" class="btn third-party-login-btn" (click)="close(\'ResolveIO\')">{{!form.controls.forgotPassword.value ? \'Login\' : \'Submit\'}}</button>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t }\n\t\t</form>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:i2.FormBuilder}],propDecorators:{msAllowed:[{type:Input}],showLoginText:[{type:Input}],publicProgram:[{type:Input}],usernameInput:[{type:ViewChild,args:["usernameInput"]}]}});class ResponsiveButtonGroupComponent extends BaseComponent{_cdRef;_resizeService;_services;collapseSize=900;windowSize=window.innerWidth;windowSizeSubscription=null;constructor(t,e,n){super(n),this._cdRef=t,this._resizeService=e,this._services=n}ngOnInit(){this.windowSizeSubscription=this._resizeService.onResize$.subscribe(t=>{t&&(this.windowSize=t.innerWidth,this._cdRef.detectChanges())})}ngOnDestroy(){this.windowSizeSubscription.unsubscribe()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResponsiveButtonGroupComponent,deps:[{token:i0.ChangeDetectorRef},{token:ResizeService},{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:ResponsiveButtonGroupComponent,isStandalone:!1,selector:"responsive-button-group",inputs:{collapseSize:"collapseSize"},providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:"<style>\n\t@media screen and (min-width: 900px) {\n\t\t:host ::ng-deep .xsBtnGroup {\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup {\n\t\t\tdisplay: inline-flex !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup button {\n\t\t\tmargin-left: 5px !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup a {\n\t\t\tmargin-left: 5px !important;\n\t\t}\n\t}\n\n\t@media screen and (max-width: 900px) {\n\t\t:host ::ng-deep .xsBtnGroup {\n\t\t\tdisplay: inherit !important;\n\t\t}\n\n\t\t:host ::ng-deep .xsBtnGroup button {\n\t\t\tmargin-top: 5px !important;\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t:host ::ng-deep .xsBtnGroup a {\n\t\t\tmargin-top: 5px !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n</style>\n\n<div [ngClass]=\"windowSize <= collapseSize ? ['btn-group-vertical', 'xsBtnGroup'] : ['btn-group', 'lgBtnGroup']\">\n\t<ng-content></ng-content>\n</div>\n",styles:["@media screen and (min-width:900px){:host ::ng-deep .xsBtnGroup{display:none!important}:host ::ng-deep .lgBtnGroup{display:inline-flex!important}:host ::ng-deep .lgBtnGroup button{margin-left:5px!important}:host ::ng-deep .lgBtnGroup a{margin-left:5px!important}}@media screen and (max-width:900px){:host ::ng-deep .xsBtnGroup{display:inherit!important}:host ::ng-deep .xsBtnGroup button{margin-top:5px!important;width:100%!important}:host ::ng-deep .xsBtnGroup a{margin-top:5px!important}:host ::ng-deep .lgBtnGroup{display:none!important}}\n"],dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResponsiveButtonGroupComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"responsive-button-group",standalone:!1,template:"<style>\n\t@media screen and (min-width: 900px) {\n\t\t:host ::ng-deep .xsBtnGroup {\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup {\n\t\t\tdisplay: inline-flex !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup button {\n\t\t\tmargin-left: 5px !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup a {\n\t\t\tmargin-left: 5px !important;\n\t\t}\n\t}\n\n\t@media screen and (max-width: 900px) {\n\t\t:host ::ng-deep .xsBtnGroup {\n\t\t\tdisplay: inherit !important;\n\t\t}\n\n\t\t:host ::ng-deep .xsBtnGroup button {\n\t\t\tmargin-top: 5px !important;\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t:host ::ng-deep .xsBtnGroup a {\n\t\t\tmargin-top: 5px !important;\n\t\t}\n\n\t\t:host ::ng-deep .lgBtnGroup {\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n</style>\n\n<div [ngClass]=\"windowSize <= collapseSize ? ['btn-group-vertical', 'xsBtnGroup'] : ['btn-group', 'lgBtnGroup']\">\n\t<ng-content></ng-content>\n</div>\n"}]}],ctorParameters:()=>[{type:i0.ChangeDetectorRef},{type:ResizeService},{type:ProviderService}],propDecorators:{collapseSize:[{type:Input}]}});class DialogRegisterContent{_activeModal;_fb;form;constructor(t,e){this._activeModal=t,this._fb=e}ngOnInit(){this.form=this._fb.group({username:["",[Validators.required]],name:["",[Validators.required]],phone:["",[Validators.required]],company:["",[Validators.required]],email:["",[Validators.required]]})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogRegisterContent,deps:[{token:i1$2.NgbActiveModal},{token:i2.FormBuilder}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogRegisterContent,isStandalone:!1,selector:"resolveio-dialog.register",ngImport:i0,template:'\n\t\t<style>\n\t\t collapse-table {\n\t\t width: 100%;\n\t\t}\n\t\t\n\t\t.navbar-light .navbar-nav .active>.nav-link, .navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link.show, .navbar-light .navbar-nav .show>.nav-link {\n\t\tcolor: #0b4499;\n\t\t}\n\t\t.navbar-light .navbar-nav .nav-link {\n\t\tcolor:#333;\n\t\t}\n\t\ta.nav-link.loginreg {\n\t\tbackground-color: #0b4499;\n\t\tcolor: #fff !important;\n\t\tborder-radius: 40px;\n\t\t}\n\t\ta.nav-link.loginreg:hover {\n\t\tbackground: #1668e2;\n\t\t}\n\t\t.nav-link {\n\t\tcolor: #333333;\n\t\tfont-size: 150%\n\t\t}\n\t\t.nav-item a.nav-link.active {\n\t\tcolor: #0b4499;\n\t\t}\n\t\t.contactimg>img{\n\t\twidth: 100%;\n\t\t}\n\t\t\n\t\t.log-box {\n\t\tpadding-top: 26px;\n\t\tpadding-bottom: 26px;\n\t\t}\n\t\t.loginform .form-control, .register-form .form-control {\n\t\tcolor: #000;\n\t\theight: 52px;\n\t\t}\n\t\t.loginform {\n\t\tmargin-top: 35px;\n\t\t}\n\t\t.loginform label {\n\t\tfont-size: 18px;\n\t\tfont-weight: 600;\n\t\t}\n\t\t\n\t\t.loginbtn {\n\t\tbackground: #0b4499;\n\t\twidth: 100%;\n\t\tmargin-top: 44px;\n\t\theight: 52px;\n\t\tfont-size: 22px;\n\t\tborder-radius: 2px;\n\t\tcolor: #fff !important;\n\t\t}\n\t\t\n\t\t.contactimg {\n\t\tposition: relative;\n\t\t}\n\t\t.login-logo {\n\t\tmargin-bottom: 20px;\n\t\t}\n\t\t\n\t\t.textbox {\n\t\tposition: absolute;\n\t\ttop: 50%;\n\t\tcolor: #fff;\n\t\tpadding: 40px;\n\t\ttransform: translate(0%, -50%);\n\t\ttext-align: center;\n\t\t}\n\t\t.sign-btn {\n\t\tbackground: #0b4499;\n\t\twidth: 100%;\n\t\tmargin-top: 14px;\n\t\theight: 52px;\n\t\tfont-size: 22px;\n\t\tborder-radius: 2px;\n\t\tcolor: #fff !important;\n\t\t}\n\t\t\n\t\tbutton.btn.sign-btn:hover {\n\t\tbackground: #1668e2;\n\t\t}\n\t\t</style>\n\t\t<form [formGroup]="form" novalidate (ngSubmit)="_activeModal.close(form)">\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> Register</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()"></button>\n\t\t </div>\n\t\t @if (form) {\n\t\t <div class="modal-body">\n\t\t <div class="row justify-content-md-center">\n\t\t <div class="col-lg-12">\n\t\t <div class="row bg-white">\n\t\t <div class="col-lg-6">\n\t\t <div class="contactimg">\n\t\t <img src="/assets/images/loginsignup/formimg.jpg" alt="images" class="img-fluid">\n\t\t <div class="textbox">\n\t\t <div class="login-logo"><img src="/assets/images/loginsignup/login-logo.png" alt="images"></div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t <div class="col-lg-6">\n\t\t <div class="log-box">\n\t\t <div class="register-form">\n\t\t <div class="form-group">\n\t\t <label>User Name</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" [focus]="true" aria-describedby="emailHelp" placeholder="User Name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Full Name</label>\n\t\t @if (form.controls.name.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.name.valid ? \'is-valid\' : \'is-invalid\']" formControlName="name" aria-describedby="emailHelp" placeholder="Name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Phone Number</label>\n\t\t @if (form.controls.phone.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.phone.valid ? \'is-valid\' : \'is-invalid\']" formControlName="phone" placeholder="Phone Number">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Company</label>\n\t\t @if (form.controls.company.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.company.valid ? \'is-valid\' : \'is-invalid\']" formControlName="company" placeholder="Company Name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Email</label>\n\t\t @if (form.controls.email.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="email" class="form-control" [ngClass]="[\'form-control\', form.controls.email.valid ? \'is-valid\' : \'is-invalid\']" formControlName="email" placeholder="Email">\n\t\t </div>\n\t\t <button type="submit" class="btn sign-btn">Signup</button>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t <div class="modal-footer">\n\t\t <responsive-button-group>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t </responsive-button-group>\n\t\t </div>\n\t\t</form>\n\t\t',isInline:!0,styles:["collapse-table{width:100%}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:#0b4499}.navbar-light .navbar-nav .nav-link{color:#333}a.nav-link.loginreg{background-color:#0b4499;color:#fff!important;border-radius:40px}a.nav-link.loginreg:hover{background:#1668e2}.nav-link{color:#333;font-size:150%}.nav-item a.nav-link.active{color:#0b4499}.contactimg>img{width:100%}.log-box{padding-top:26px;padding-bottom:26px}.loginform .form-control,.register-form .form-control{color:#000;height:52px}.loginform{margin-top:35px}.loginform label{font-size:18px;font-weight:600}.loginbtn{background:#0b4499;width:100%;margin-top:44px;height:52px;font-size:22px;border-radius:2px;color:#fff!important}.contactimg{position:relative}.login-logo{margin-bottom:20px}.textbox{position:absolute;top:50%;color:#fff;padding:40px;transform:translateY(-50%);text-align:center}.sign-btn{background:#0b4499;width:100%;margin-top:14px;height:52px;font-size:22px;border-radius:2px;color:#fff!important}button.btn.sign-btn:hover{background:#1668e2}\n"],dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"component",type:ResponsiveButtonGroupComponent,selector:"responsive-button-group",inputs:["collapseSize"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogRegisterContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.register",template:'\n\t\t<style>\n\t\t collapse-table {\n\t\t width: 100%;\n\t\t}\n\t\t\n\t\t.navbar-light .navbar-nav .active>.nav-link, .navbar-light .navbar-nav .nav-link.active, .navbar-light .navbar-nav .nav-link.show, .navbar-light .navbar-nav .show>.nav-link {\n\t\tcolor: #0b4499;\n\t\t}\n\t\t.navbar-light .navbar-nav .nav-link {\n\t\tcolor:#333;\n\t\t}\n\t\ta.nav-link.loginreg {\n\t\tbackground-color: #0b4499;\n\t\tcolor: #fff !important;\n\t\tborder-radius: 40px;\n\t\t}\n\t\ta.nav-link.loginreg:hover {\n\t\tbackground: #1668e2;\n\t\t}\n\t\t.nav-link {\n\t\tcolor: #333333;\n\t\tfont-size: 150%\n\t\t}\n\t\t.nav-item a.nav-link.active {\n\t\tcolor: #0b4499;\n\t\t}\n\t\t.contactimg>img{\n\t\twidth: 100%;\n\t\t}\n\t\t\n\t\t.log-box {\n\t\tpadding-top: 26px;\n\t\tpadding-bottom: 26px;\n\t\t}\n\t\t.loginform .form-control, .register-form .form-control {\n\t\tcolor: #000;\n\t\theight: 52px;\n\t\t}\n\t\t.loginform {\n\t\tmargin-top: 35px;\n\t\t}\n\t\t.loginform label {\n\t\tfont-size: 18px;\n\t\tfont-weight: 600;\n\t\t}\n\t\t\n\t\t.loginbtn {\n\t\tbackground: #0b4499;\n\t\twidth: 100%;\n\t\tmargin-top: 44px;\n\t\theight: 52px;\n\t\tfont-size: 22px;\n\t\tborder-radius: 2px;\n\t\tcolor: #fff !important;\n\t\t}\n\t\t\n\t\t.contactimg {\n\t\tposition: relative;\n\t\t}\n\t\t.login-logo {\n\t\tmargin-bottom: 20px;\n\t\t}\n\t\t\n\t\t.textbox {\n\t\tposition: absolute;\n\t\ttop: 50%;\n\t\tcolor: #fff;\n\t\tpadding: 40px;\n\t\ttransform: translate(0%, -50%);\n\t\ttext-align: center;\n\t\t}\n\t\t.sign-btn {\n\t\tbackground: #0b4499;\n\t\twidth: 100%;\n\t\tmargin-top: 14px;\n\t\theight: 52px;\n\t\tfont-size: 22px;\n\t\tborder-radius: 2px;\n\t\tcolor: #fff !important;\n\t\t}\n\t\t\n\t\tbutton.btn.sign-btn:hover {\n\t\tbackground: #1668e2;\n\t\t}\n\t\t</style>\n\t\t<form [formGroup]="form" novalidate (ngSubmit)="_activeModal.close(form)">\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> Register</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()"></button>\n\t\t </div>\n\t\t @if (form) {\n\t\t <div class="modal-body">\n\t\t <div class="row justify-content-md-center">\n\t\t <div class="col-lg-12">\n\t\t <div class="row bg-white">\n\t\t <div class="col-lg-6">\n\t\t <div class="contactimg">\n\t\t <img src="/assets/images/loginsignup/formimg.jpg" alt="images" class="img-fluid">\n\t\t <div class="textbox">\n\t\t <div class="login-logo"><img src="/assets/images/loginsignup/login-logo.png" alt="images"></div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t <div class="col-lg-6">\n\t\t <div class="log-box">\n\t\t <div class="register-form">\n\t\t <div class="form-group">\n\t\t <label>User Name</label>\n\t\t @if (form.controls.username.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.username.valid ? \'is-valid\' : \'is-invalid\']" formControlName="username" [autofocus]="true" [focus]="true" aria-describedby="emailHelp" placeholder="User Name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Full Name</label>\n\t\t @if (form.controls.name.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.name.valid ? \'is-valid\' : \'is-invalid\']" formControlName="name" aria-describedby="emailHelp" placeholder="Name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Phone Number</label>\n\t\t @if (form.controls.phone.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.phone.valid ? \'is-valid\' : \'is-invalid\']" formControlName="phone" placeholder="Phone Number">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Company</label>\n\t\t @if (form.controls.company.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="text" class="form-control" [ngClass]="[\'form-control\', form.controls.company.valid ? \'is-valid\' : \'is-invalid\']" formControlName="company" placeholder="Company Name">\n\t\t </div>\n\t\t <div class="form-group">\n\t\t <label>Email</label>\n\t\t @if (form.controls.email.hasError(\'required\')) {\n\t\t <em>- Required</em>\n\t\t }\n\t\t <input type="email" class="form-control" [ngClass]="[\'form-control\', form.controls.email.valid ? \'is-valid\' : \'is-invalid\']" formControlName="email" placeholder="Email">\n\t\t </div>\n\t\t <button type="submit" class="btn sign-btn">Signup</button>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t <div class="modal-footer">\n\t\t <responsive-button-group>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t </responsive-button-group>\n\t\t </div>\n\t\t</form>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:i2.FormBuilder}]});class DialogSelectWithButtonsURLContent{_activeModal;_account;url="";close;allElements;title="Select Window Type";selectedType="";options=[{value:"same_tab",text:"Same Tab"},{value:"new_tab",text:"New Tab"},{value:"new_window",text:"New Window"}];constructor(t,e){this._activeModal=t,this._account=e}ngOnInit(){this._account.getUser().settings.routing_preference&&"alwaysAsk"!==this._account.getUser().settings.routing_preference&&("sameTab"===this._account.getUser().settings.routing_preference&&window.open(this.url,"_self"),"newTab"===this._account.getUser().settings.routing_preference&&window.open(this.url,"_blank"),"newWindow"===this._account.getUser().settings.routing_preference&&window.open(this.url,"_blank","toolbar=1,location=1,menubar=1"),this._activeModal.close())}ngAfterViewInit(){setTimeout(()=>{let t=this.recursiveFindFirstElement(this.allElements.nativeElement);t?t.focus():(this.close.nativeElement.focus(),this.close.nativeElement.blur())},100)}recursiveFindFirstElement(t){let e=null,n=t.children;for(let t=0;t<Object.keys(n).length;t++){let o=n[Object.keys(n)[t]];if(o.children&&o.children.length)e=this.recursiveFindFirstElement(o);else{if("BUTTON"===o.tagName&&o.classList.contains("close"))return null;if(!("BUTTON"!==o.tagName&&"INPUT"!==o.tagName&&"SELECT"!==o.tagName&&"TEXTAREA"!==o.tagName||o.hidden||o.disabled))return o}if(e)break}return e}onSelectType(t){this.selectedType=t,this.submit()}submit(){"same_tab"===this.selectedType&&window.open(this.url,"_self"),"new_tab"===this.selectedType&&window.open(this.url,"_blank"),"new_window"===this.selectedType&&window.open(this.url,"_blank","toolbar=1,location=1,menubar=1"),this._activeModal.close()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectWithButtonsURLContent,deps:[{token:i1$2.NgbActiveModal},{token:AccountManagerService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogSelectWithButtonsURLContent,isStandalone:!1,selector:"resolveio-dialog.select-with-buttons-url",inputs:{url:"url"},viewQueries:[{propertyName:"close",first:!0,predicate:["close"],descendants:!0},{propertyName:"allElements",first:!0,predicate:["allElements"],descendants:!0}],ngImport:i0,template:'\n\t\t<style>\n\t\t collapse-table tr:hover {\n\t\t background-color: lightblue;\n\t\t cursor: pointer;\n\t\t}\n\t\t\n\t\t.selected {\n\t\tbackground-color: lightblue;\n\t\t}\n\t\t\n\t\tcollapse-table {\n\t\twidth: 100%;\n\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t\t </div>\n\t\t <div class="modal-body">\n\t\t <div class="row">\n\t\t @for (option of options; track option.value) {\n\t\t <div class="col">\n\t\t <button style="width: 100%" type="button" [ngClass]="[\'btn\', selectedType === option.value ? \'btn-success\' : \'btn-warning\']" (click)="onSelectType(option.value)">{{option.text}}</button>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t</div>\n\t\t',isInline:!0,styles:["collapse-table tr:hover{background-color:#add8e6;cursor:pointer}.selected{background-color:#add8e6}collapse-table{width:100%}\n"],dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectWithButtonsURLContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.select-with-buttons-url",template:'\n\t\t<style>\n\t\t collapse-table tr:hover {\n\t\t background-color: lightblue;\n\t\t cursor: pointer;\n\t\t}\n\t\t\n\t\t.selected {\n\t\tbackground-color: lightblue;\n\t\t}\n\t\t\n\t\tcollapse-table {\n\t\twidth: 100%;\n\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t\t </div>\n\t\t <div class="modal-body">\n\t\t <div class="row">\n\t\t @for (option of options; track option.value) {\n\t\t <div class="col">\n\t\t <button style="width: 100%" type="button" [ngClass]="[\'btn\', selectedType === option.value ? \'btn-success\' : \'btn-warning\']" (click)="onSelectType(option.value)">{{option.text}}</button>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t</div>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:AccountManagerService}],propDecorators:{url:[{type:Input}],close:[{type:ViewChild,args:["close",{static:!1}]}],allElements:[{type:ViewChild,args:["allElements",{static:!1}]}]}});class CollapseTableComponent{_resizeService;_account;collapseSize;tableFixed=!1;headerFixed=!1;secondaryColor=!1;tertiaryColor=!1;windowSize=window.innerWidth;windowSizeSubscription=null;constructor(t,e){this._resizeService=t,this._account=e}ngOnInit(){this.windowSizeSubscription=this._resizeService.onResize$.subscribe(t=>{this.windowSize=t.innerWidth}),this._account.getUser()&&this._account.getUser().settings&&(document.documentElement.style.setProperty("--primary-table-color",this._account.getUser().settings.table_color),document.documentElement.style.setProperty("--primary-table-font-color",this._account.getUser().settings.table_font_color),document.documentElement.style.setProperty("--font-size",this._account.getUser().settings.font_size+"px"),document.documentElement.style.setProperty("--secondary-table-color",this._account.getUser().settings.secondary_table_color),document.documentElement.style.setProperty("--secondary-table-font-color",this._account.getUser().settings.secondary_table_font_color),document.documentElement.style.setProperty("--tertiary-table-color",this._account.getUser().settings.tertiary_table_color),document.documentElement.style.setProperty("--tertiary-table-font-color",this._account.getUser().settings.tertiary_table_font_color))}ngOnDestroy(){this.windowSizeSubscription.unsubscribe()}onClick(t){}getCollapseClass(){let t=["table"];return this.secondaryColor?t.push("collapseTable-sec"):this.tertiaryColor?t.push("collapseTable-tert"):t.push("collapseTable"),t}getPrimaryColor(){return this._account.getUser()?this._account.getUser().settings.table_color:"#3b3ee3"}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CollapseTableComponent,deps:[{token:ResizeService},{token:AccountManagerService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:CollapseTableComponent,isStandalone:!1,selector:"collapse-table",inputs:{collapseSize:"collapseSize",tableFixed:"tableFixed",headerFixed:"headerFixed",secondaryColor:"secondaryColor",tertiaryColor:"tertiaryColor"},ngImport:i0,template:'<style>\n\t:host ::ng-deep :root {\n\t\t--primary-table-color: #3b3ee3;\n\t\t--primary-table-font-color: white;\n\t\t--font-size: 12px;\n\t\t--secondary-table-color: #87ceeb;\n\t\t--secondary-table-font-color: #000000;\n\t\t--tertiary-table-color: #ff4500;\n\t\t--tertiary-table-font-color: #000000;\n\t}\n\n\t:host {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t}\n\n\t.table-responsive-xl {\n\t\toverflow-y: visible;\n\t\toverflow-x: auto;\n\t\tposition: relative;\n\t}\n\n\t:host ::ng-deep .collapseTable {\n\t\tborder: 1px solid #ccc;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\tposition: relative;\n\t\t/*table-layout: fixed;*/\n\t}\n\t:host ::ng-deep .collapseTable tr {\n\t\tborder: 1px solid #ddd;\n\t\tpadding: 0.35em;\n\t}\n\t:host ::ng-deep .collapseTable th,\n\t:host ::ng-deep .collapseTable td {\n\t\tpadding: 0.625em;\n\t\ttext-align: center;\n\t\tvertical-align: middle;\n\t}\n\t:host ::ng-deep .collapseTable th {\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tbackground-color: var(--primary-table-color);\n\t\tcolor: var(--primary-table-font-color);\n\t\tfont-size: var(--font-size);\n\t\tposition: sticky;\n\t\tz-index: 10;\n\t\ttop: 0;\n\t}\n\t:host ::ng-deep .collapseTable-sec {\n\t\tborder: 1px solid #ccc;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\tposition: relative;\n\t}\n\t:host ::ng-deep .collapseTable-sec tr {\n\t\tborder: 1px solid #ddd;\n\t\tpadding: 0.35em;\n\t}\n\t:host ::ng-deep .collapseTable-sec th,\n\t:host ::ng-deep .collapseTable-sec td {\n\t\tpadding: 0.625em;\n\t\ttext-align: center;\n\t}\n\t:host ::ng-deep .collapseTable-sec th {\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tbackground-color: var(--secondary-table-color);\n\t\tcolor: var(--secondary-table-font-color);\n\t\tfont-size: var(--font-size);\n\t\tposition: sticky;\n\t\tz-index: 10;\n\t\ttop: 0;\n\t}\n\t:host ::ng-deep .collapseTable-tert {\n\t\tborder: 1px solid #ccc;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\tposition: relative;\n\t}\n\t:host ::ng-deep .collapseTable-tert tr {\n\t\tborder: 1px solid #ddd;\n\t\tpadding: 0.35em;\n\t}\n\t:host ::ng-deep .collapseTable-tert th,\n\t:host ::ng-deep .collapseTable-tert td {\n\t\tpadding: 0.625em;\n\t\ttext-align: center;\n\t}\n\t:host ::ng-deep .collapseTable-tert th {\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tbackground-color: var(--tertiary-table-color);\n\t\tcolor: var(--tertiary-table-font-color);\n\t\tfont-size: var(--font-size);\n\t\tposition: sticky;\n\t\tz-index: 10;\n\t\ttop: 0;\n\t}\n\n\t.fixed {\n\t\ttable-layout: fixed;\n\t}\n\n\t:host ::ng-deep .headerFixed thead,\n\t:host ::ng-deep .headerFixed tbody tr {\n\t\tdisplay: table;\n\t\twidth: 100%;\n\t\ttable-layout: fixed;\n\t}\n\n\t:host ::ng-deep .collapseTable,\n\t:host ::ng-deep .collapseTable-sec,\n\t:host ::ng-deep .collapseTable-tert {\n\t\tbox-shadow: 0 0 15px rgba(0, 0, 0, 0.25);\n\t}\n\n\t:host ::ng-deep .collapseTable > thead:first-of-type > tr:first-child > th:first-child,\n\t:host ::ng-deep .collapseTable-sec > thead:first-of-type > tr:first-child > th:first-child,\n\t:host ::ng-deep .collapseTable-tert > thead:first-of-type > tr:first-child > th:first-child {\n\t\tborder-top-left-radius: 10px;\n\t}\n\n\t:host ::ng-deep .collapseTable > thead:first-of-type > tr:first-child > th:last-child,\n\t:host ::ng-deep .collapseTable-sec > thead:first-of-type > tr:first-child > th:last-child,\n\t:host ::ng-deep .collapseTable-tert > thead:first-of-type > tr:first-child > th:last-child {\n\t\tborder-top-right-radius: 10px;\n\t}\n\n\t:host ::ng-deep .collapseTable > tbody:last-of-type > tr:last-child > td:first-child,\n\t:host ::ng-deep .collapseTable-sec > tbody:last-of-type > tr:last-child > td:first-child,\n\t:host ::ng-deep .collapseTable-tert > tbody:last-of-type > tr:last-child > td:first-child {\n\t\tborder-bottom-left-radius: 10px;\n\t}\n\n\t:host ::ng-deep .collapseTable > tbody:last-of-type > tr:last-child > td:last-child,\n\t:host ::ng-deep .collapseTable-sec > tbody:last-of-type > tr:last-child > td:last-child,\n\t:host ::ng-deep .collapseTable-tert > tbody:last-of-type > tr:last-child > td:last-child {\n\t\tborder-bottom-right-radius: 10px;\n\t}\n\n\t.hide {\n\t\tdisplay: none;\n\t}\n\n\t.table-responsive-xl {\n\t\toverflow: visible !important;\n\t\tposition: relative;\n\t}\n</style>\n\n<div class="table-responsive-xl">\n\t<table [ngClass]="getCollapseClass()" style="border: none" cellspacing="0" cellpadding="0">\n\t\t<ng-content></ng-content>\n\t</table>\n</div>\n',styles:[":host ::ng-deep :root{--primary-table-color: #3b3ee3;--primary-table-font-color: white;--font-size: 12px;--secondary-table-color: #87ceeb;--secondary-table-font-color: #000000;--tertiary-table-color: #ff4500;--tertiary-table-font-color: #000000}:host{display:block;width:100%}.table-responsive-xl{overflow-y:visible;overflow-x:auto;position:relative}:host ::ng-deep .collapseTable{border:1px solid #ccc;margin:0;padding:0;width:100%;overflow:visible;position:relative}:host ::ng-deep .collapseTable tr{border:1px solid #ddd;padding:.35em}:host ::ng-deep .collapseTable th,:host ::ng-deep .collapseTable td{padding:.625em;text-align:center;vertical-align:middle}:host ::ng-deep .collapseTable th{letter-spacing:.1em;text-transform:uppercase;background-color:var(--primary-table-color);color:var(--primary-table-font-color);font-size:var(--font-size);position:sticky;z-index:10;top:0}:host ::ng-deep .collapseTable-sec{border:1px solid #ccc;margin:0;padding:0;width:100%;overflow:visible;position:relative}:host ::ng-deep .collapseTable-sec tr{border:1px solid #ddd;padding:.35em}:host ::ng-deep .collapseTable-sec th,:host ::ng-deep .collapseTable-sec td{padding:.625em;text-align:center}:host ::ng-deep .collapseTable-sec th{letter-spacing:.1em;text-transform:uppercase;background-color:var(--secondary-table-color);color:var(--secondary-table-font-color);font-size:var(--font-size);position:sticky;z-index:10;top:0}:host ::ng-deep .collapseTable-tert{border:1px solid #ccc;margin:0;padding:0;width:100%;overflow:visible;position:relative}:host ::ng-deep .collapseTable-tert tr{border:1px solid #ddd;padding:.35em}:host ::ng-deep .collapseTable-tert th,:host ::ng-deep .collapseTable-tert td{padding:.625em;text-align:center}:host ::ng-deep .collapseTable-tert th{letter-spacing:.1em;text-transform:uppercase;background-color:var(--tertiary-table-color);color:var(--tertiary-table-font-color);font-size:var(--font-size);position:sticky;z-index:10;top:0}.fixed{table-layout:fixed}:host ::ng-deep .headerFixed thead,:host ::ng-deep .headerFixed tbody tr{display:table;width:100%;table-layout:fixed}:host ::ng-deep .collapseTable,:host ::ng-deep .collapseTable-sec,:host ::ng-deep .collapseTable-tert{box-shadow:0 0 15px #00000040}:host ::ng-deep .collapseTable>thead:first-of-type>tr:first-child>th:first-child,:host ::ng-deep .collapseTable-sec>thead:first-of-type>tr:first-child>th:first-child,:host ::ng-deep .collapseTable-tert>thead:first-of-type>tr:first-child>th:first-child{border-top-left-radius:10px}:host ::ng-deep .collapseTable>thead:first-of-type>tr:first-child>th:last-child,:host ::ng-deep .collapseTable-sec>thead:first-of-type>tr:first-child>th:last-child,:host ::ng-deep .collapseTable-tert>thead:first-of-type>tr:first-child>th:last-child{border-top-right-radius:10px}:host ::ng-deep .collapseTable>tbody:last-of-type>tr:last-child>td:first-child,:host ::ng-deep .collapseTable-sec>tbody:last-of-type>tr:last-child>td:first-child,:host ::ng-deep .collapseTable-tert>tbody:last-of-type>tr:last-child>td:first-child{border-bottom-left-radius:10px}:host ::ng-deep .collapseTable>tbody:last-of-type>tr:last-child>td:last-child,:host ::ng-deep .collapseTable-sec>tbody:last-of-type>tr:last-child>td:last-child,:host ::ng-deep .collapseTable-tert>tbody:last-of-type>tr:last-child>td:last-child{border-bottom-right-radius:10px}.hide{display:none}.table-responsive-xl{overflow:visible!important;position:relative}\n"],dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CollapseTableComponent,decorators:[{type:Component,args:[{selector:"collapse-table",standalone:!1,template:'<style>\n\t:host ::ng-deep :root {\n\t\t--primary-table-color: #3b3ee3;\n\t\t--primary-table-font-color: white;\n\t\t--font-size: 12px;\n\t\t--secondary-table-color: #87ceeb;\n\t\t--secondary-table-font-color: #000000;\n\t\t--tertiary-table-color: #ff4500;\n\t\t--tertiary-table-font-color: #000000;\n\t}\n\n\t:host {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t}\n\n\t.table-responsive-xl {\n\t\toverflow-y: visible;\n\t\toverflow-x: auto;\n\t\tposition: relative;\n\t}\n\n\t:host ::ng-deep .collapseTable {\n\t\tborder: 1px solid #ccc;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\tposition: relative;\n\t\t/*table-layout: fixed;*/\n\t}\n\t:host ::ng-deep .collapseTable tr {\n\t\tborder: 1px solid #ddd;\n\t\tpadding: 0.35em;\n\t}\n\t:host ::ng-deep .collapseTable th,\n\t:host ::ng-deep .collapseTable td {\n\t\tpadding: 0.625em;\n\t\ttext-align: center;\n\t\tvertical-align: middle;\n\t}\n\t:host ::ng-deep .collapseTable th {\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tbackground-color: var(--primary-table-color);\n\t\tcolor: var(--primary-table-font-color);\n\t\tfont-size: var(--font-size);\n\t\tposition: sticky;\n\t\tz-index: 10;\n\t\ttop: 0;\n\t}\n\t:host ::ng-deep .collapseTable-sec {\n\t\tborder: 1px solid #ccc;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\tposition: relative;\n\t}\n\t:host ::ng-deep .collapseTable-sec tr {\n\t\tborder: 1px solid #ddd;\n\t\tpadding: 0.35em;\n\t}\n\t:host ::ng-deep .collapseTable-sec th,\n\t:host ::ng-deep .collapseTable-sec td {\n\t\tpadding: 0.625em;\n\t\ttext-align: center;\n\t}\n\t:host ::ng-deep .collapseTable-sec th {\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tbackground-color: var(--secondary-table-color);\n\t\tcolor: var(--secondary-table-font-color);\n\t\tfont-size: var(--font-size);\n\t\tposition: sticky;\n\t\tz-index: 10;\n\t\ttop: 0;\n\t}\n\t:host ::ng-deep .collapseTable-tert {\n\t\tborder: 1px solid #ccc;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\tposition: relative;\n\t}\n\t:host ::ng-deep .collapseTable-tert tr {\n\t\tborder: 1px solid #ddd;\n\t\tpadding: 0.35em;\n\t}\n\t:host ::ng-deep .collapseTable-tert th,\n\t:host ::ng-deep .collapseTable-tert td {\n\t\tpadding: 0.625em;\n\t\ttext-align: center;\n\t}\n\t:host ::ng-deep .collapseTable-tert th {\n\t\tletter-spacing: 0.1em;\n\t\ttext-transform: uppercase;\n\t\tbackground-color: var(--tertiary-table-color);\n\t\tcolor: var(--tertiary-table-font-color);\n\t\tfont-size: var(--font-size);\n\t\tposition: sticky;\n\t\tz-index: 10;\n\t\ttop: 0;\n\t}\n\n\t.fixed {\n\t\ttable-layout: fixed;\n\t}\n\n\t:host ::ng-deep .headerFixed thead,\n\t:host ::ng-deep .headerFixed tbody tr {\n\t\tdisplay: table;\n\t\twidth: 100%;\n\t\ttable-layout: fixed;\n\t}\n\n\t:host ::ng-deep .collapseTable,\n\t:host ::ng-deep .collapseTable-sec,\n\t:host ::ng-deep .collapseTable-tert {\n\t\tbox-shadow: 0 0 15px rgba(0, 0, 0, 0.25);\n\t}\n\n\t:host ::ng-deep .collapseTable > thead:first-of-type > tr:first-child > th:first-child,\n\t:host ::ng-deep .collapseTable-sec > thead:first-of-type > tr:first-child > th:first-child,\n\t:host ::ng-deep .collapseTable-tert > thead:first-of-type > tr:first-child > th:first-child {\n\t\tborder-top-left-radius: 10px;\n\t}\n\n\t:host ::ng-deep .collapseTable > thead:first-of-type > tr:first-child > th:last-child,\n\t:host ::ng-deep .collapseTable-sec > thead:first-of-type > tr:first-child > th:last-child,\n\t:host ::ng-deep .collapseTable-tert > thead:first-of-type > tr:first-child > th:last-child {\n\t\tborder-top-right-radius: 10px;\n\t}\n\n\t:host ::ng-deep .collapseTable > tbody:last-of-type > tr:last-child > td:first-child,\n\t:host ::ng-deep .collapseTable-sec > tbody:last-of-type > tr:last-child > td:first-child,\n\t:host ::ng-deep .collapseTable-tert > tbody:last-of-type > tr:last-child > td:first-child {\n\t\tborder-bottom-left-radius: 10px;\n\t}\n\n\t:host ::ng-deep .collapseTable > tbody:last-of-type > tr:last-child > td:last-child,\n\t:host ::ng-deep .collapseTable-sec > tbody:last-of-type > tr:last-child > td:last-child,\n\t:host ::ng-deep .collapseTable-tert > tbody:last-of-type > tr:last-child > td:last-child {\n\t\tborder-bottom-right-radius: 10px;\n\t}\n\n\t.hide {\n\t\tdisplay: none;\n\t}\n\n\t.table-responsive-xl {\n\t\toverflow: visible !important;\n\t\tposition: relative;\n\t}\n</style>\n\n<div class="table-responsive-xl">\n\t<table [ngClass]="getCollapseClass()" style="border: none" cellspacing="0" cellpadding="0">\n\t\t<ng-content></ng-content>\n\t</table>\n</div>\n'}]}],ctorParameters:()=>[{type:ResizeService},{type:AccountManagerService}],propDecorators:{collapseSize:[{type:Input}],tableFixed:[{type:Input}],headerFixed:[{type:Input}],secondaryColor:[{type:Input}],tertiaryColor:[{type:Input}]}});class DialogSelectArrayObjsContent{_activeModal;title="";objects=[];multiple=!1;allowNone=!1;close;allElements;selectedIndex=null;selectedItem=null;selectedIndexes=[];selectedItems=[];constructor(t){this._activeModal=t}ngAfterViewInit(){setTimeout(()=>{let t=this.recursiveFindFirstElement(this.allElements.nativeElement);t?t.focus():(this.close.nativeElement.focus(),this.close.nativeElement.blur())},100),this.objects.forEach((t,e)=>{t.selected&&(this.selectedIndexes.push(e),this.selectedItems.push(t))})}recursiveFindFirstElement(t){let e=null,n=t.children;for(let t=0;t<Object.keys(n).length;t++){let o=n[Object.keys(n)[t]];if(o.children&&o.children.length)e=this.recursiveFindFirstElement(o);else{if("BUTTON"===o.tagName&&o.classList.contains("close"))return null;if(!("BUTTON"!==o.tagName&&"INPUT"!==o.tagName&&"SELECT"!==o.tagName&&"TEXTAREA"!==o.tagName||o.hidden||o.disabled))return o}if(e)break}return e}onSelectItem(t){this.multiple?this.selectedItems.some(e=>e.value===this.objects[t].value)?(this.selectedIndexes.splice(this.selectedIndexes.indexOf(t),1),this.selectedItems.splice(this.selectedItems.map(t=>t.value).indexOf(this.objects[t].value),1)):(this.selectedIndexes.push(t),this.selectedItems.push(this.objects[t])):this.objects[t]===this.selectedItem?(this.selectedItem=null,this.selectedIndex=null):(this.selectedItem=this.objects[t],this.selectedIndex=t)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectArrayObjsContent,deps:[{token:i1$2.NgbActiveModal}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogSelectArrayObjsContent,isStandalone:!1,selector:"resolveio-dialog.select-array-objs",inputs:{title:"title",objects:"objects",multiple:"multiple",allowNone:"allowNone"},viewQueries:[{propertyName:"close",first:!0,predicate:["close"],descendants:!0},{propertyName:"allElements",first:!0,predicate:["allElements"],descendants:!0}],ngImport:i0,template:'\n\t\t<style>\n\t\t collapse-table tr:hover {\n\t\t background-color: lightblue;\n\t\t cursor: pointer;\n\t\t}\n\t\t\n\t\t.selected {\n\t\tbackground-color: lightblue;\n\t\t}\n\t\t\n\t\tcollapse-table {\n\t\twidth: 100%;\n\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t\t </div>\n\t\t <div class="modal-body">\n\t\t <div style="height: 60vh; overflow-y: auto">\n\t\t <collapse-table collapseSize="900">\n\t\t <thead>\n\t\t <tr>\n\t\t <th>List</th>\n\t\t </tr>\n\t\t </thead>\n\t\t <tbody>\n\t\t @for (object of objects; track object.text; let i = $index) {\n\t\t <tr (click)="onSelectItem(i)" [ngClass]="{\'selected\' : i === selectedIndex || selectedIndexes.includes(i)}">\n\t\t <td>{{object.text}}</td>\n\t\t </tr>\n\t\t }\n\t\t </tbody>\n\t\t </collapse-table>\n\t\t </div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t @if (!allowNone) {\n\t\t <button type="button" [ngClass]="[\'btn\', (selectedItem || selectedItems.length) ? \'btn-success\' : \'btn-danger\']" [disabled]="!selectedItem && !selectedItems.length" (click)="_activeModal.close(selectedItem || selectedItems)">Submit</button>\n\t\t }\n\t\t @if (allowNone) {\n\t\t <button type="button" class="btn btn-success" (click)="_activeModal.close(selectedItem || selectedItems)">Submit</button>\n\t\t }\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t</div>\n\t\t</div>\n\t\t',isInline:!0,styles:["collapse-table tr:hover{background-color:#add8e6;cursor:pointer}.selected{background-color:#add8e6}collapse-table{width:100%}\n"],dependencies:[{kind:"component",type:CollapseTableComponent,selector:"collapse-table",inputs:["collapseSize","tableFixed","headerFixed","secondaryColor","tertiaryColor"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectArrayObjsContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.select-array-objs",template:'\n\t\t<style>\n\t\t collapse-table tr:hover {\n\t\t background-color: lightblue;\n\t\t cursor: pointer;\n\t\t}\n\t\t\n\t\t.selected {\n\t\tbackground-color: lightblue;\n\t\t}\n\t\t\n\t\tcollapse-table {\n\t\twidth: 100%;\n\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t\t </div>\n\t\t <div class="modal-body">\n\t\t <div style="height: 60vh; overflow-y: auto">\n\t\t <collapse-table collapseSize="900">\n\t\t <thead>\n\t\t <tr>\n\t\t <th>List</th>\n\t\t </tr>\n\t\t </thead>\n\t\t <tbody>\n\t\t @for (object of objects; track object.text; let i = $index) {\n\t\t <tr (click)="onSelectItem(i)" [ngClass]="{\'selected\' : i === selectedIndex || selectedIndexes.includes(i)}">\n\t\t <td>{{object.text}}</td>\n\t\t </tr>\n\t\t }\n\t\t </tbody>\n\t\t </collapse-table>\n\t\t </div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t @if (!allowNone) {\n\t\t <button type="button" [ngClass]="[\'btn\', (selectedItem || selectedItems.length) ? \'btn-success\' : \'btn-danger\']" [disabled]="!selectedItem && !selectedItems.length" (click)="_activeModal.close(selectedItem || selectedItems)">Submit</button>\n\t\t }\n\t\t @if (allowNone) {\n\t\t <button type="button" class="btn btn-success" (click)="_activeModal.close(selectedItem || selectedItems)">Submit</button>\n\t\t }\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t</div>\n\t\t</div>\n\t\t',standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal}],propDecorators:{title:[{type:Input}],objects:[{type:Input}],multiple:[{type:Input}],allowNone:[{type:Input}],close:[{type:ViewChild,args:["close",{static:!1}]}],allElements:[{type:ViewChild,args:["allElements",{static:!1}]}]}});class DialogSelectArrayContent{_activeModal;_cdRef;title="";array=[];multiple;selectedIndexes=[];close;allElements;method="list";mappedArray=[];selectIndexes=[];constructor(t,e){this._activeModal=t,this._cdRef=e}ngOnInit(){this.mappedArray=this.array.map((t,e)=>({value:e,text:t})),this.selectedIndexes.forEach(t=>{this.selectIndexes.push(t)})}ngAfterViewInit(){setTimeout(()=>{let t=this.recursiveFindFirstElement(this.allElements.nativeElement);t?t.focus():(this.close.nativeElement.focus(),this.close.nativeElement.blur())},100)}recursiveFindFirstElement(t){let e=null,n=t.children;for(let t=0;t<Object.keys(n).length;t++){let o=n[Object.keys(n)[t]];if(o.children&&o.children.length)e=this.recursiveFindFirstElement(o);else{if("BUTTON"===o.tagName&&o.classList.contains("close"))return null;if(!("BUTTON"!==o.tagName&&"INPUT"!==o.tagName&&"SELECT"!==o.tagName&&"TEXTAREA"!==o.tagName||o.hidden||o.disabled))return o}if(e)break}return e}addDropDown(){let t=this.array.filter((t,e)=>!this.selectedIndexes.includes(e))[0],e=this.array.findIndex(e=>e===t);this.selectedIndexes.push(e),this.selectIndexes.push(e)}onSelectDropdown(t,e){this.onSelectItem(this.selectedIndexes[e]),this.onSelectItem(t)}availableAdd(){return!!this.array.filter((t,e)=>!this.selectedIndexes.includes(e))[0]}getFilteredArray(t){return this.mappedArray.filter(e=>e.value===t||!this.selectedIndexes.includes(e.value))}isInSelectedIndex(t){return!!this.selectedIndexes.includes(t)}onSelectItem(t){this.multiple?this.selectedIndexes.includes(t)?(this.selectedIndexes.splice(this.selectedIndexes.indexOf(t),1),this.selectIndexes.splice(this.selectIndexes.indexOf(t),1)):(this.selectedIndexes.push(t),this.selectIndexes.push(t)):this.selectedIndexes.includes(t)?(this.selectedIndexes=[],this.selectIndexes=[]):(this.selectedIndexes=[t],this.selectIndexes=[t])}getArray(){let t=[];return this.selectedIndexes.forEach(e=>{t.push(this.array[e])}),t}selectAll(){this.selectedIndexes=[],this.selectIndexes=[],this.array.forEach((t,e)=>{this.selectedIndexes.push(e),this.selectIndexes.push(e)})}removeAll(){this.selectedIndexes=[],this.selectIndexes=[]}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectArrayContent,deps:[{token:i1$2.NgbActiveModal},{token:i0.ChangeDetectorRef}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DialogSelectArrayContent,isStandalone:!1,selector:"resolveio-dialog.select-array",inputs:{title:"title",array:"array",multiple:"multiple",selectedIndexes:"selectedIndexes"},viewQueries:[{propertyName:"close",first:!0,predicate:["close"],descendants:!0},{propertyName:"allElements",first:!0,predicate:["allElements"],descendants:!0}],ngImport:i0,template:'\n\t\t<style>\n\t\t collapse-table tr:hover {\n\t\t background-color: lightblue;\n\t\t cursor: pointer;\n\t\t}\n\t\t\n\t\t.selected {\n\t\tbackground-color: lightblue;\n\t\t}\n\t\t\n\t\tcollapse-table {\n\t\twidth: 100%;\n\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t\t </div>\n\t\t <div class="modal-body" style="height: 60vh;">\n\t\t <responsive-button-group>\n\t\t @if (multiple) {\n\t\t <button type="button" class="btn btn-primary" (click)="selectAll()">Select All</button>\n\t\t <button type="button" class="btn btn-danger" (click)="removeAll()">Remove All</button>\n\t\t }\n\t\t <button type="button" [ngClass]="[\'btn\', method === \'list\' ? \'btn-success\' : \'btn-warning\']" (click)="method = \'list\'">Use List</button>\n\t\t <button type="button" [ngClass]="[\'btn\', method === \'dropdown\' ? \'btn-success\' : \'btn-warning\']" (click)="method = \'dropdown\'">Use Dropdown</button>\n\t\t </responsive-button-group>\n\t\t <div style="height: 50vh; overflow-y: auto; margin-top: 10px">\n\t\t @if (method === \'list\') {\n\t\t <collapse-table collapseSize="900">\n\t\t <thead>\n\t\t <tr>\n\t\t <th>List</th>\n\t\t </tr>\n\t\t </thead>\n\t\t <tbody>\n\t\t @for (data of array; track data; let i = $index) {\n\t\t <tr (click)="onSelectItem(i)" [ngClass]="{\'selected\' : isInSelectedIndex(i)}">\n\t\t <td>{{data}}</td>\n\t\t </tr>\n\t\t }\n\t\t </tbody>\n\t\t </collapse-table>\n\t\t }\n\t\t @if (method === \'dropdown\') {\n\t\t <collapse-table collapseSize="900">\n\t\t <thead>\n\t\t <tr>\n\t\t <th>Item</th>\n\t\t <th>Remove</th>\n\t\t </tr>\n\t\t </thead>\n\t\t <tbody>\n\t\t @for (item of selectIndexes; track item; let i = $index) {\n\t\t <tr>\n\t\t <td>\n\t\t <rio-select placeholder="Select Item" [ngModel]="item" (change)="onSelectDropdown($event, i)">\n\t\t @for (data of getFilteredArray(item); track data.value) {\n\t\t <rio-option [value]="data.value">{{data.text}}</rio-option>\n\t\t }\n\t\t </rio-select>\n\t\t </td>\n\t\t <td>\n\t\t <button type="button" class="btn btn-danger" (click)="onSelectItem(item)">Remove</button>\n\t\t </td>\n\t\t </tr>\n\t\t }\n\t\t </tbody>\n\t\t </collapse-table>\n\t\t @if (multiple || !selectIndexes.length) {\n\t\t <button type="button" class="btn btn-success" (click)="addDropDown()" [disabled]="!availableAdd()">Add</button>\n\t\t }\n\t\t }\n\t\t</div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t <button type="button" [ngClass]="[\'btn\', selectedIndexes.length ? \'btn-success\' : \'btn-danger\']" [disabled]="!selectedIndexes.length || this.selectedIndexes.includes(null)" (click)="_activeModal.close(this.multiple ? getArray() : array[selectedIndexes[0]])">Submit</button>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t</div>\n\t\t</div>\n\t\t',isInline:!0,styles:["collapse-table tr:hover{background-color:#add8e6;cursor:pointer}.selected{background-color:#add8e6}collapse-table{width:100%}\n"],dependencies:[{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"component",type:CollapseTableComponent,selector:"collapse-table",inputs:["collapseSize","tableFixed","headerFixed","secondaryColor","tertiaryColor"]},{kind:"component",type:ResponsiveButtonGroupComponent,selector:"responsive-button-group",inputs:["collapseSize"]},{kind:"component",type:i5.RioSelectComponent,selector:"rio-select",inputs:["placeholder","multiple","panelMaxHeight","panelMaxViewportRatio","optionHeight","virtualBuffer","overlayZIndex","autoSizePanel","panelPosition","autoCenterPanel","viewportMargin","panelWidth","panelFullscreenWidth","clearable","templateLabelFromView","searchable","searchMatchMode","defaultSearch","textWrap","compareWith","options","optionLabelKey","optionLabelFn","optionValueKey","optionDisabledKey","optionIdKey","optionGroupKey","disabled","emitOptionObject","debugLog","stickyKey","stickyAutoSave"],outputs:["change"]},{kind:"component",type:i5.RioOptionComponent,selector:"rio-option",inputs:["value","disabled","label","id"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}],changeDetection:i0.ChangeDetectionStrategy.OnPush})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogSelectArrayContent,decorators:[{type:Component,args:[{selector:"resolveio-dialog.select-array",template:'\n\t\t<style>\n\t\t collapse-table tr:hover {\n\t\t background-color: lightblue;\n\t\t cursor: pointer;\n\t\t}\n\t\t\n\t\t.selected {\n\t\tbackground-color: lightblue;\n\t\t}\n\t\t\n\t\tcollapse-table {\n\t\twidth: 100%;\n\t\t}\n\t\t</style>\n\t\t<div #allElements>\n\t\t <div class="modal-header">\n\t\t <h4 class="modal-title"><i class="fa fa-question-circle" style="color: blue; font-size: 0.85em" aria-hidden="true"></i> {{ title }}</h4>\n\t\t <button type="button" class="btn-close ms-auto" aria-label="Close" (click)="_activeModal.dismiss()" #close></button>\n\t\t </div>\n\t\t <div class="modal-body" style="height: 60vh;">\n\t\t <responsive-button-group>\n\t\t @if (multiple) {\n\t\t <button type="button" class="btn btn-primary" (click)="selectAll()">Select All</button>\n\t\t <button type="button" class="btn btn-danger" (click)="removeAll()">Remove All</button>\n\t\t }\n\t\t <button type="button" [ngClass]="[\'btn\', method === \'list\' ? \'btn-success\' : \'btn-warning\']" (click)="method = \'list\'">Use List</button>\n\t\t <button type="button" [ngClass]="[\'btn\', method === \'dropdown\' ? \'btn-success\' : \'btn-warning\']" (click)="method = \'dropdown\'">Use Dropdown</button>\n\t\t </responsive-button-group>\n\t\t <div style="height: 50vh; overflow-y: auto; margin-top: 10px">\n\t\t @if (method === \'list\') {\n\t\t <collapse-table collapseSize="900">\n\t\t <thead>\n\t\t <tr>\n\t\t <th>List</th>\n\t\t </tr>\n\t\t </thead>\n\t\t <tbody>\n\t\t @for (data of array; track data; let i = $index) {\n\t\t <tr (click)="onSelectItem(i)" [ngClass]="{\'selected\' : isInSelectedIndex(i)}">\n\t\t <td>{{data}}</td>\n\t\t </tr>\n\t\t }\n\t\t </tbody>\n\t\t </collapse-table>\n\t\t }\n\t\t @if (method === \'dropdown\') {\n\t\t <collapse-table collapseSize="900">\n\t\t <thead>\n\t\t <tr>\n\t\t <th>Item</th>\n\t\t <th>Remove</th>\n\t\t </tr>\n\t\t </thead>\n\t\t <tbody>\n\t\t @for (item of selectIndexes; track item; let i = $index) {\n\t\t <tr>\n\t\t <td>\n\t\t <rio-select placeholder="Select Item" [ngModel]="item" (change)="onSelectDropdown($event, i)">\n\t\t @for (data of getFilteredArray(item); track data.value) {\n\t\t <rio-option [value]="data.value">{{data.text}}</rio-option>\n\t\t }\n\t\t </rio-select>\n\t\t </td>\n\t\t <td>\n\t\t <button type="button" class="btn btn-danger" (click)="onSelectItem(item)">Remove</button>\n\t\t </td>\n\t\t </tr>\n\t\t }\n\t\t </tbody>\n\t\t </collapse-table>\n\t\t @if (multiple || !selectIndexes.length) {\n\t\t <button type="button" class="btn btn-success" (click)="addDropDown()" [disabled]="!availableAdd()">Add</button>\n\t\t }\n\t\t }\n\t\t</div>\n\t\t</div>\n\t\t<div class="modal-footer">\n\t\t <button type="button" [ngClass]="[\'btn\', selectedIndexes.length ? \'btn-success\' : \'btn-danger\']" [disabled]="!selectedIndexes.length || this.selectedIndexes.includes(null)" (click)="_activeModal.close(this.multiple ? getArray() : array[selectedIndexes[0]])">Submit</button>\n\t\t <button type="button" class="btn btn-secondary" (click)="_activeModal.dismiss()">Cancel</button>\n\t\t</div>\n\t\t</div>\n\t\t',changeDetection:ChangeDetectionStrategy.OnPush,standalone:!1}]}],ctorParameters:()=>[{type:i1$2.NgbActiveModal},{type:i0.ChangeDetectorRef}],propDecorators:{title:[{type:Input}],array:[{type:Input}],multiple:[{type:Input}],selectedIndexes:[{type:Input}],close:[{type:ViewChild,args:["close",{static:!1}]}],allElements:[{type:ViewChild,args:["allElements",{static:!1}]}]}});class DialogService{modalService;constructor(t){this.modalService=t}openDialog(t,e={size:"lg",backdrop:"static"}){return this.modalService.open(t,e)}notify(t){const e=this.openDialog(DialogNotifyContent);e.componentInstance.title="Notify",e.componentInstance.body=t}input(t,e){const n=this.openDialog(DialogInputContent);return n.componentInstance.title=t,n.componentInstance.inputFields=e,n.result}error(t){const e=this.openDialog(DialogErrorContent);e.componentInstance.title="Error",e.componentInstance.body=t}confirm(t,e){const n=this.openDialog(DialogConfirmContent);return n.componentInstance.title="Confirm",n.componentInstance.body=t,n.componentInstance.html=e,n.result}selectDateTime(t,e=!0){const n=this.openDialog(DialogSelectDateTimeContent);return n.componentInstance.title="Select Date"+(e?" and Time":""),n.componentInstance.date=t,n.componentInstance.showTime=e,n.result}selectDataLabel(t,e=!0){const n=this.openDialog(DialogSelectDataLabelsContent,{size:"sm",backdrop:"static"});return n.componentInstance.title="Select Data Labels",n.componentInstance.data=t,n.componentInstance.showArraySubData=e,n.result}login(t,e=!0,n=!1){const o=this.openDialog(DialogLoginContent);return o.componentInstance.msAllowed=t,o.componentInstance.showLoginText=e,o.componentInstance.publicProgram=n,o.result}register(){return this.openDialog(DialogRegisterContent).result}selectWithButtonsURL(t){const e=this.openDialog(DialogSelectWithButtonsURLContent);return e.componentInstance.url=t,e.result}selectWithArrayObjs(t,e,n=!1,o=!1){const r=this.openDialog(DialogSelectArrayObjsContent);return r.componentInstance.title=t,r.componentInstance.objects=e,r.componentInstance.multiple=n,r.componentInstance.allowNone=o,r.result}selectArray(t,e,n=!1,o=[]){const r=this.openDialog(DialogSelectArrayContent);return r.componentInstance.title=t,r.componentInstance.array=e,r.componentInstance.multiple=n,r.componentInstance.selectedIndexes=o,r.result}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogService,deps:[{token:i1$2.NgbModal}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DialogService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:i1$2.NgbModal}]});class AuthService{_ds;_vs;_alert;_account;_socket;_core;_router;environment=null;userHasPhoneNumber=!1;userData;userAgentApplication;constructor(t,e,n,o,r,i,s){this._ds=t,this._vs=e,this._alert=n,this._account=o,this._socket=r,this._core=i,this._router=s}setupMSSingleSignOn(t){this.environment=t,"/auth365"===window.location.pathname&&window.location.hash&&window.location.hash.startsWith("#id_token=")&&(this.environment.MS_id_token=window.location.hash.replace("#","")),this.userAgentApplication=new UserAgentApplication({auth:{clientId:this.environment.MS_clientId,authority:this.environment.MS_authority,redirectUri:this.environment.MS_redirectUri,validateAuthority:!1,navigateToLoginRequestUrl:!1},framework:{isAngular:!0}})}setEnvironment(t){this.environment=t}setUserHasPhoneNumber(t){this.userHasPhoneNumber=t}registerUser(t,e=!0){return new Promise((n,o)=>{let r=[{label:"User Name",form:"username",data:"",validators:[Validators.required],validatorErrors:["required"],validatorMsg:["Username is required"],required:!0},{label:"Full Name",form:"fullname",data:"",validators:[Validators.required],validatorErrors:["required"],validatorMsg:["Full name is required"],required:!0},{label:"Email",form:"email",data:"",validators:[Validators.required,this._vs.email],validatorErrors:["required","email"],validatorMsg:["Email is required","Email is invalid"],required:!0}];this.userHasPhoneNumber&&r.push({label:"Phone",form:"phonenumber",data:"",validators:[this._vs.phoneNumber],validatorErrors:["phoneNumber"],validatorMsg:["Phone number is invalid"],type:"text"}),this._ds.input("Register New User",r).then(r=>{let i={username:r.username.value.trim().toLowerCase(),email:r.email.value.trim().toLowerCase(),fullname:r.fullname.value.trim(),roles:{super_admin:!1,approvals:[],groups:[],notifications:[],miscs:[]},active:!0,readonly:!1,phonenumber:r.phonenumber?r.phonenumber.value:"",other:t,attempts:0,salt:"",hash:""};this._socket.call("createUserAndEmailEnrollment",i,e,(t,e)=>{t?o(t):n(e)})},t=>o())})}editUser(t){let e=[{label:"User Name",form:"username",data:t.username,validators:[Validators.required],validatorErrors:["required"],validatorMsg:["Username is required"],required:!0},{label:"Full Name",form:"fullname",data:t.fullname,validators:[Validators.required],validatorErrors:["required"],validatorMsg:["Full name is required"],required:!0},{label:"Email",form:"email",data:t.email,validators:[Validators.required,this._vs.email],validatorErrors:["required","email"],validatorMsg:["Email is required","Email is invalid"],required:!0}];return this.userHasPhoneNumber&&e.push({label:"Phone",form:"phonenumber",data:t.phonenumber||"",validators:[this._vs.phoneNumber],validatorErrors:["phoneNumber"],validatorMsg:["Phone number is invalid"],type:"text"}),new Promise((n,o)=>{this._ds.input("Edit User",e).then(e=>{e.phonenumber&&e.phonenumber.value?t.phonenumber=e.phonenumber.value:t.phonenumber="",t.email=e.email.value.trim(),this._socket.call("editUser",t._id,e.username.value.trim().toLowerCase(),e.fullname.value.trim(),e.email.value.trim().toLowerCase(),t.phonenumber,(r,i)=>{if(r)this._socket.call("insertErrorLog","AuthService - edituser",[t,r]),o(r);else{let t={username:e.username.value.trim(),fullname:e.fullname.value.trim(),email:e.email.value.trim()};this._alert.setAlert("success","User has been edited"),n(t)}})},t=>{n(!0)})})}loginUser(){return new Promise((t,e)=>{this.loginModal().then(n=>{"PUBLIC_LOGIN"!==n.type?"PUBLIC_REGISTER"!==n.type?"MS"===n.type?this.microsoftSignOn():n.form.value.forgotPassword?this._account.resetUserPassword(n.form.value.username):this._account.logIn(n.form.value.username,n.form.value.password).then(e=>{t(e)},t=>e("Invalid login")):this._account.publicRegister({companyName:n.form.value.companyName,contactName:n.form.value.contactName,email:n.form.value.email,password:n.form.value.password,phone:n.form.value.phone}).then(e=>{this._router.navigateByUrl("/dashboard/client"),t(e)},t=>e(t)):this._account.publicLogIn(n.form.value.email,n.form.value.password).then(e=>{this._router.navigateByUrl("/dashboard/client"),t(e)},t=>e(t))},t=>e())})}microsoftSignOn(){this.userAgentApplication.loginRedirect(["user.read","mail.send"])}loginModal(){const t=!(!this.environment||!this.environment.MS_ALLOWED),e=!this.environment||!this.environment.HIDE_LOGIN_TEXT,n=this._core.publicProgram.getValue();return this._ds.login(t,e,n)}removeUser(t){return new Promise((e,n)=>{this._socket.call("removeDocument","users",t,(o,r)=>{o?(this._ds.error("Could not remove user"),this._socket.call("insertErrorLog","AuthService - removeUser",[t,o]),n(o)):e(!0)})})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthService,deps:[{token:DialogService},{token:ValidationService},{token:AlertService},{token:AccountManagerService},{token:SocketManagerService},{token:CoreService},{token:i1$1.Router}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:DialogService},{type:ValidationService},{type:AlertService},{type:AccountManagerService},{type:SocketManagerService},{type:CoreService},{type:i1$1.Router}]});class AuthPermissionService{modules=[];constructor(){}registerModule(t){this.modules.push(t),this.modules.sort((t,e)=>{let n=t.name,o=e.name;return n<o?-1:n>o?1:0})}getAllModulePermissions(){return this.modules}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthPermissionService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthPermissionService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthPermissionService,decorators:[{type:Injectable}],ctorParameters:()=>[]});class FeatureGateService{_app;constructor(t){this._app=t}isEnabled(t,e=!0){if(!t)return!0;const n=this.getGateConfig();return n?Array.isArray(n)?n.includes(t):"object"==typeof n&&t in n?!!n[t]:e:e}isLinkEnabled(t,e,n=!1){if(!t)return!0;const o=this.normalizeLink(t),r=Array.isArray(e)?e:[];for(let t=0;t<r.length;t++){const e=r[t],i=Array.isArray(e.views)?e.views:[];for(let t=0;t<i.length;t++){const r=i[t];if(this.isLinkMatch(r,o,n))return!(e.gate&&!this.isEnabled(e.gate,!0))&&!(r.gate&&!this.isEnabled(r.gate,!0))}}return!0}getGateConfig(){const t=this._app.environment.value||{};return t.FEATURE_GATES?t.FEATURE_GATES:t.MODULE_GATES?t.MODULE_GATES:t.FEATURE_FLAGS?t.FEATURE_FLAGS:null}normalizeLink(t){if(!t)return"";let e=t.replace(/\?.+$/,"");return e.length>1&&e.endsWith("/")&&(e=e.slice(0,-1)),e}isLinkMatch(t,e,n){if(!t||!t.link||!e)return!1;if(t.link===e)return!0;if(t.has_parameter){const n=t.link.endsWith("/")?t.link:t.link+"/";if(e.startsWith(n))return!0}if(n){const n=e.endsWith("/")?e:e+"/";if(t.link.startsWith(n))return!0}return!1}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FeatureGateService,deps:[{token:CoreService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FeatureGateService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FeatureGateService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:CoreService}]});class AiTerminalService{provider;constructor(t){this.provider=t}call(t,...e){return this.provider._socket.call(t,...e)}subscribe(t,...e){return this.provider._socket.subscribe(t,...e)}subscribeBypass(t,...e){return this.provider._socket.subscribeBypassRoute(t,...e)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalService,deps:[{token:ProviderService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:ProviderService}]});class AiPageRouterService{adapters=[];registerAdapter(t){return t?(this.adapters.includes(t)||this.adapters.push(t),()=>this.unregisterAdapter(t)):()=>{}}unregisterAdapter(t){this.adapters=this.adapters.filter(e=>e!==t)}getAdapter(t){const e=this.adapters.filter(e=>e&&e.matches(t)).sort((t,e)=>(e.priority||0)-(t.priority||0));return e.length?e[0]:null}async handleMessage(t){const e=t?.context||{},n=this.getAdapter(e);if(!n)return{handled:!1};try{return await n.handle(t)}catch(t){const e=t?.message||"Unable to handle this request.";return{handled:!0,reply:e,error:e}}}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiPageRouterService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiPageRouterService,providedIn:"root"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiPageRouterService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}]});const DEFAULT_FORM_PATCH_METHOD="aiFormPatch";class AiPageFormAdapterService{router;registry;terminal;id="generic-form";priority=-10;constructor(t,e,n){this.router=t,this.registry=e,this.terminal=n,this.router.registerAdapter(this)}matches(t){return!0}async handle(t){if("all"===t?.context?.mode)return{handled:!1};const e=this.registry.getFormsForRoute(t?.context?.route).filter(t=>!t.element||!1!==t.element.isConnected);if(1!==e.length)return{handled:!1};const n=e[0],o=n?.form;if(!o)return{handled:!1};const r=this.buildFieldCatalog(o);if(!r.length)return{handled:!1};let i;try{i=await this.terminal.call("aiFormPatch",{message:t.message,allowed_fields:r,patch_format:this.buildPatchFormat(),route:t?.context?.route,id_client:t?.context?.idClient,id_app:t?.context?.idApp})}catch(t){const e=t?.message||"Unable to build a form patch.";return{handled:!0,reply:e,error:e}}if(i?.error){const t=i.error||"Unable to build a form patch.";return{handled:!0,reply:t,error:t}}const s=this.normalizePatchFields(i?.patch??i);if(!s.length){return{handled:!0,reply:i?.notes||"No matching fields found for this form."}}const a=this.applyFormPatch(o,s);return{handled:!0,reply:i?.notes||this.buildApplyReply(a),data:{patch:{fields:s},applied_fields:a.applied,skipped_fields:a.invalid}}}buildPatchFormat(){return["{",' "notes": "Short, plain-language explanation of what you filled in.",',' "patch": {',' "fields": [',' { "path": "field_name", "value": "any" }'," ]"," }","}"].join("\n")}buildFieldCatalog(t){const e=[];return this.walkControls(t,"",e),e}walkControls(t,e,n){if(t instanceof FormGroup)Object.keys(t.controls||{}).forEach(o=>{const r=t.controls[o],i=e?`${e}.${o}`:o;this.walkControls(r,i,n)});else{if(t instanceof FormArray){e&&n.push({name:e,type:"array"});const o=t.controls?.[0];return void(o instanceof FormGroup&&Object.keys(o.controls||{}).forEach(t=>{const r=e?`${e}.0.${t}`:`0.${t}`;this.walkControls(o.controls[t],r,n)}))}e&&n.push({name:e,type:this.inferType(t?.value)})}}inferType(t){if(t instanceof Date)return"date";if(Array.isArray(t))return"array";if(null==t)return"unknown";const e=typeof t;return"string"===e||"number"===e||"boolean"===e?e:"object"===e?"object":"unknown"}normalizePatchFields(t){return t?Array.isArray(t)?t.map(t=>this.normalizePatchField(t)).filter(t=>!!t):Array.isArray(t?.fields)?t.fields.map(t=>this.normalizePatchField(t)).filter(t=>!!t):t?.fields&&"object"==typeof t.fields?Object.entries(t.fields).map(([t,e])=>({path:t,value:e})):"object"==typeof t?Object.entries(t).map(([t,e])=>({path:t,value:e})):[]:[]}normalizePatchField(t){if(!t||"object"!=typeof t)return null;const e=String(t.path||t.field||t.name||"").trim();return e?{path:e,value:t.value}:null}applyFormPatch(t,e){const n=[],o=[];return e.forEach(e=>{const r=this.normalizePath(e.path);if(!r)return;const i=t.get(r);if(i)try{void 0!==e.value&&("function"==typeof i.patchValue&&e.value&&"object"==typeof e.value?i.patchValue(e.value):"function"==typeof i.setValue&&i.setValue(e.value),i.markAsDirty({onlySelf:!0}),i.markAsTouched({onlySelf:!0}),i.updateValueAndValidity({onlySelf:!0}),n.push(r))}catch{o.push(r)}else o.push(r)}),t.updateValueAndValidity({emitEvent:!0}),{applied:n,invalid:o}}normalizePath(t){const e=String(t||"").trim();return e?e.replace(/\[(\d+)\]/g,".$1"):""}buildApplyReply(t){return t.applied.length?t.invalid.length?`Applied ${t.applied.length} field${1===t.applied.length?"":"s"}. Skipped ${t.invalid.length} unknown field${1===t.invalid.length?"":"s"}.`:`Applied ${t.applied.length} field${1===t.applied.length?"":"s"} to the form.`:"No matching fields were applied to this form."}applyPatch(t,e){}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiPageFormAdapterService,deps:[{token:AiPageRouterService},{token:AiFormRegistryService},{token:AiTerminalService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiPageFormAdapterService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiPageFormAdapterService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:AiPageRouterService},{type:AiFormRegistryService},{type:AiTerminalService}]});const CSV_EOL="\r\n",CSV_BOM="\ufeff",CSV_DEFAULTS={filename:"export",fieldSeparator:",",quoteStrings:'"',decimalseparator:".",showLabels:!1,showTitle:!1,title:"My Report",useBom:!0,headers:[]};function exportCsv(t,e,n){const o=Array.isArray(t)?t:tryParse(t);if(!Array.isArray(o)||!o.length)return void console.log("Invalid data");const r={...CSV_DEFAULTS,...n};e&&(r.filename=e);const i=normalizeData(o,r);i.title&&!r.showTitle&&(r.showTitle=!0,r.title||(r.title=i.title));let s="";r.useBom&&(s+="\ufeff"),r.showTitle&&r.title&&(s+=`${r.title}\r\n\r\n`);const a=resolveHeaders(r,i.data),l=stripHeaderRow(i.data,a,r),c=resolveRowKeys(l,a);a.length&&(s+=`${a.join(r.fieldSeparator)}\r\n`),l.forEach(t=>{s+=`${resolveRow(t,c,r)}\r\n`});const d=new Blob([s],{type:"text/csv;charset=utf-8;"}),p=`${(r.filename||CSV_DEFAULTS.filename).replace(/ /g,"_")}.csv`;if(navigator.msSaveBlob)navigator.msSaveBlob(d,p);else{const t=document.createElement("a");t.href=URL.createObjectURL(d),t.setAttribute("visibility","hidden"),t.download=p,document.body.appendChild(t),t.click(),document.body.removeChild(t)}}function resolveHeaders(t,e){return t.headers&&t.headers.length?t.headers:t.showLabels&&e.length&&!Array.isArray(e[0])&&"object"==typeof e[0]?collectKeysInOrder(e):[]}function resolveRowKeys(t,e){return e.length?e:!t.length||Array.isArray(t[0])||"object"!=typeof t[0]?[]:Object.keys(t[0])}function resolveRow(t,e,n){return Array.isArray(t)?t.map(t=>formatValue(t,n)).join(n.fieldSeparator):e.length?e.map(e=>formatValue(t[e],n)).join(n.fieldSeparator):Object.keys(t).map(e=>formatValue(t[e],n)).join(n.fieldSeparator)}function formatValue(t,e){if("locale"===e.decimalseparator&&isFloat(t))return t.toLocaleString();if("."!==e.decimalseparator&&isFloat(t))return t.toString().replace(".",e.decimalseparator);if("string"==typeof t){const n=parseIsoDate(t);n&&(t=n.toLocaleString());let o=t.replace(/"/g,'""');return(e.quoteStrings||t.indexOf(",")>-1||t.indexOf("\n")>-1||t.indexOf("\r")>-1)&&(o=`${e.quoteStrings}${o}${e.quoteStrings}`),o}return"boolean"==typeof t?t?"TRUE":"FALSE":null==t?"":t}function normalizeData(t,e){if(!e.showLabels||!t.length||Array.isArray(t[0])||"object"!=typeof t[0])return{data:t};const[n,...o]=t;if(isTitleRow(n)){const t=Object.keys(n);return{data:o,title:String(n[t[0]])}}return{data:t}}function stripHeaderRow(t,e,n){if(!n.showLabels||!e.length||!t.length)return t;const[o,...r]=t;return isHeaderValueRow(o,e)?r:t}function collectKeysInOrder(t){const e=[];return t.forEach(t=>{Array.isArray(t)||"object"!=typeof t||Object.keys(t).forEach(t=>{-1===e.indexOf(t)&&e.push(t)})}),e}function isHeaderValueRow(t,e){return!(Array.isArray(t)||"object"!=typeof t||!e.length)&&e.every(e=>t[e]===e)}function isTitleRow(t){if(Array.isArray(t)||"object"!=typeof t||null===t)return!1;const e=Object.keys(t);if(1!==e.length)return!1;const n=t[e[0]];return"string"==typeof n&&n===e[0]}function tryParse(t){try{return JSON.parse(t)}catch(t){return console.log("Invalid CSV data",t),[]}}function isFloat(t){return+t===t&&(!isFinite(t)||Boolean(t%1))}const ISO_DATE_REGEX=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:?\d{2})$/;function parseIsoDate(t){if(!ISO_DATE_REGEX.test(t))return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}class DomSanitizorPipe{_sanitizer;constructor(t){this._sanitizer=t}transform(t,e="html"){switch(e){case"html":return this._sanitizer.bypassSecurityTrustHtml(t);case"style":return this._sanitizer.bypassSecurityTrustStyle(t);case"script":return this._sanitizer.bypassSecurityTrustScript(t);case"url":return this._sanitizer.bypassSecurityTrustUrl(t);case"resourceUrl":return this._sanitizer.bypassSecurityTrustResourceUrl(t);default:throw new Error(`Invalid safe type specified: ${e}`)}}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DomSanitizorPipe,deps:[{token:i1$3.DomSanitizer}],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:DomSanitizorPipe,isStandalone:!1,name:"safe"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DomSanitizorPipe,decorators:[{type:Pipe,args:[{name:"safe",standalone:!1}]}],ctorParameters:()=>[{type:i1$3.DomSanitizer}]});const AI_TERMINAL_SUBSCRIPTION_COOLDOWN_MS=5e3,AI_TERMINAL_PROGRESS_LOOKUP_MS=4500,AI_TERMINAL_PROGRESS_DRAFT_MS=9e3,AI_TERMINAL_DEFAULT_TITLE="Ask AI About the System",AI_TERMINAL_LOCAL_CONVERSATION_PREFIX="local-convo",AI_TERMINAL_REQUEST_PREFIX="req",AI_TERMINAL_EXPORT_MAX_ROWS=5e3,AI_TERMINAL_USD_CURRENCY_TEXT_PATTERN=/\b(?:USD|US\$)(?:\s| | |[\u00A0\u202F\u2007])*\$?\s*([-+]?[0-9][0-9,]*(?:\.[0-9]+)?)/gi,AI_TERMINAL_PROMPT_FAVORITES_STORAGE_KEY="resolveioAiPromptFavorites.v1",AI_TERMINAL_PROMPT_FAVORITES_MAX=25,DEFAULT_METHODS={conversationCreate:"aiTerminalConversationCreate",conversationUpdate:"aiTerminalConversationUpdate",conversationDelete:"aiTerminalConversationDelete",runOpenAI:"aiTerminalRun",uploadOpenAI:"aiTerminalUploadFile",runCodex:"aiCoderTerminalRunCodex",uploadCodex:"aiCoderTerminalUploadFile",deployTest:"aiCoderTerminalDeployTest",conversationsPublication:"aiTerminalConversations",messagesPublication:"aiTerminalMessages"};class AiTerminalComponent{terminal;services;pageRouter;_pageFormAdapter;locale;idClient="";idApp="";title="AI Terminal";config=null;conversationStatus="active";messageLimit=200;placeholder="Describe the change or ask a question...";singleConversation=!1;contextMode="auto";contextRoute="";paused=!1;bypassRouteSubscriptions=!1;messageScroll;conversations=[];messages=[];activeConversationId="";activeConversation=null;messageText="";pendingFiles=[];promptFavoriteEnabled=!1;promptFavorites=[];isSending=!1;isDeployingTest=!1;isLoading=!1;errorMessage="";infoMessage="";editingConversationId="";editingTitle="";messagePartsCache=new Map;messageMarkdownCache=new Map;messageContentOverrides=new Map;messageDisplayOverrides=new Map;supportTicketMap=new Map;supportTicketInFlight=new Set;serverMessages=[];localMessagesByConversation=new Map;localMessageCounter=0;requestCounter=0;localConversationCounter=0;collapsedTableIds=new Set;expandedDebugIds=new Set;pendingProgressTimers=new Map;supportTicketStorageKey="resolveioAiSupportTicketMap";promptFavoritesStorageKey="resolveioAiPromptFavorites.v1";mongoReadCache=new Map;mongoReadInFlight=new Set;exportingMessageIds=new Set;subscribedConversationId="";conversationsSub;messagesSub;conversationsSubKey="";messagesSubKey="";subscriptionsPaused=!1;pauseTimer=null;pendingConversationId="";pendingConversation=null;createConversationPromise=null;currencySymbol="$";constructor(t,e,n,o,r){this.terminal=t,this.services=e,this.pageRouter=n,this._pageFormAdapter=o,this.locale=r;try{this.currencySymbol=getCurrencySymbol("USD","narrow",this.locale)}catch{this.currencySymbol="$"}}get _services(){return this.services}ngOnInit(){this.loadSupportTicketMap(),this.loadPromptFavorites(),this.paused||this.subscribeConversations()}ngOnChanges(t){t.paused&&(this.paused?this.schedulePause():(this.cancelPause(),(this.subscriptionsPaused||!this.conversationsSub||this.conversationsSub.closed)&&(this.subscriptionsPaused=!1,this.subscribeConversations(!0)),this.ensureMessageSubscription())),(t.idClient||t.idApp||t.config)&&(this.loadPromptFavorites(),this.paused||this.subscribeConversations())}ngOnDestroy(){this.cancelPause(),this.pendingProgressTimers.forEach(t=>t.forEach(t=>clearTimeout(t))),this.pendingProgressTimers.clear(),this.unsubscribeAll()}isCodexMode(){return"codex"===this.resolveMode()}showAdvanced(){return!0===this.resolveConfig()?.showAdvanced}showToolMessages(){const t=this.resolveConfig();return void 0!==t?.showToolMessages?!!t.showToolMessages:this.showAdvanced()}allowUploads(){return!1!==this.resolveConfig()?.allowUploads}maxFileMb(){return Number(this.resolveConfig()?.maxFileMb)||50}maxTotalMb(){return Number(this.resolveConfig()?.maxTotalMb)||100}deleteFilesAfterRun(){const t=this.resolveConfig();return!1!==t?.deleteFilesAfterRun}totalTokens(){return(this.messages||[]).reduce((t,e)=>t+(e?.usage?.total_tokens||0),0)}filteredMessages(){return this.showToolMessages()?this.messages:(this.messages||[]).filter(t=>"tool"!==t.role)}messageParts(t){const e=this.getMessageContent(t);if(!e)return[];const n=`${t?._id||"message"}:${t?.updatedAt||""}:${e}`,o=this.messagePartsCache.get(n);if(o)return o;const r=this.splitMessageContent(e);return this.messagePartsCache.set(n,r),r}messageMarkdown(t){let e=this.getMessageContent(t);if(!e)return"";t?.metadata?.tool_result?.output?.display&&(e=this.stripMarkdownTables(e));const n=`${t?._id||"message"}:${t?.updatedAt||""}:${e}`,o=this.messageMarkdownCache.get(n);if(o)return o;const r=this.markdownToHtml(e);return this.messageMarkdownCache.set(n,r),r}clearMessageRenderCaches(){this.messagePartsCache.clear(),this.messageMarkdownCache.clear()}trackByMessagePart(t,e){return e?.route?`route-${e.route}-${t}`:`text-${t}-${e.text?.length||0}`}markdownToHtml(t){const e=String(t||"").replace(/\r\n/g,"\n");if(!e.trim())return"";const n=e.split("\n"),o=[];let r=[],i=!1,s=!1;const a=()=>{if(!r.length)return;const t=r.map(t=>this.formatInlineMarkdown(t)).join("<br>");o.push(`<p>${t}</p>`),r=[]},l=()=>{i&&(o.push("</ul>"),i=!1),s&&(o.push("</ol>"),s=!1)};for(let t=0;t<n.length;t+=1){const e=n[t],c=e.trim();if(this.isMarkdownTableHeader(e,n[t+1])){a(),l();const e=this.parseMarkdownTable(n,t);o.push(e.html),t=e.nextIndex-1;continue}const d=e.match(/^\s*(#{1,6})\s+(.*)$/);if(d){a(),l();const t=d[1].length;o.push(`<h${t}>${this.formatInlineMarkdown(d[2])}</h${t}>`);continue}const p=e.match(/^\s*[-*\u2022]\s+(.*)$/);if(p){a(),s&&(o.push("</ol>"),s=!1),i||(o.push("<ul>"),i=!0),o.push(`<li>${this.formatInlineMarkdown(p[1])}</li>`);continue}const u=e.match(/^\s*\d+\.\s+(.*)$/);u?(a(),i&&(o.push("</ul>"),i=!1),s||(o.push("<ol>"),s=!0),o.push(`<li>${this.formatInlineMarkdown(u[1])}</li>`)):c?r.push(e):(a(),l())}return a(),l(),o.join("\n").trim()}formatInlineMarkdown(t){let e=this.escapeHtml(t);const n=[];e=e.replace(/`([^`]+)`/g,(t,e)=>{const o=`__CODE_${n.length}__`;return n.push(`<code>${e}</code>`),o});const o=[];return e=e.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(t,e,n)=>{const r=`__LINK_${o.length}__`;return o.push(this.buildAnchor(e,n)),r}),e=e.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>"),e=e.replace(/(^|[^*])\*([^*]+)\*(?!\*)/g,"$1<em>$2</em>"),e=this.linkifyRoutes(e),o.forEach((t,n)=>{e=e.replace(`__LINK_${n}__`,t)}),n.forEach((t,n)=>{e=e.replace(`__CODE_${n}__`,t)}),e}escapeHtml(t){return String(t||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}linkifyRoutes(t){return t.replace(/\/[a-z0-9][a-z0-9/_-]*(?:\?[a-z0-9=&%._-]+)?(?:#[a-z0-9._-]+)?/gi,(e,n,o)=>{const r="number"==typeof n?n:0,i="string"==typeof o?o:t;return">"===(r>0?i[r-1]:"")||this.isRouteBoundary(i,r)?this.buildAnchor(e,e):e})}buildAnchor(t,e){const n=String(e||"").trim();if(!n)return t;const o=/^https?:\/\//i.test(n);return n.startsWith("/")||o?`<a href="${n}" target="_blank" rel="noopener" class="ai-terminal-route-link">${t}</a>`:t}isMarkdownTableHeader(t,e){if(!t||!e)return!1;if(!t.includes("|"))return!1;const n=e.trim();return!!n.includes("|")&&(/^[:|\-\s]+$/.test(n)&&n.includes("-"))}parseMarkdownTable(t,e){const n=this.splitMarkdownTableRow(t[e]);let o=e+2;const r=[];for(;o<t.length;){const e=t[o];if(!e.trim()||!e.includes("|"))break;r.push(this.splitMarkdownTableRow(e)),o+=1}const i=n.length||1,s=t=>{const e=t.slice(0,i);for(;e.length<i;)e.push("");return e};return{html:`<div class="ai-terminal-table-wrap"><table class="ai-terminal-table"><thead><tr>${s(n).map(t=>`<th>${this.formatInlineMarkdown(t)}</th>`).join("")}</tr></thead><tbody>${r.map(t=>`<tr>${s(t).map(t=>`<td>${this.formatInlineMarkdown(t)}</td>`).join("")}</tr>`).join("")}</tbody></table></div>`,nextIndex:o}}splitMarkdownTableRow(t){const e=String(t||"").trim();if(!e)return[];return e.replace(/^\|/,"").replace(/\|$/,"").split("|").map(t=>t.trim())}formatFileSize(t){if(!t||!Number.isFinite(t))return"0 B";if(t<1024)return`${t} B`;const e=t/1024;if(e<1024)return`${e.toFixed(1)} KB`;return`${(e/1024).toFixed(1)} MB`}trackByConversation(t,e){return e?._id||`convo-${t}`}trackByMessage(t,e){return e?._id||`message-${t}`}trackByFavoritePrompt(t,e){return`${t}-${e}`}async createConversation(){this.errorMessage="";try{const{id:t,conversation:e}=await this.createNewConversation();if(!t||!e)return;this.pendingConversationId=t,this.pendingConversation=e,this.activeConversationId=t,this.activeConversation=e,this.conversations=this.mergePendingConversation(this.conversations),this.localMessagesByConversation.set(t,[]),this.refreshMergedMessages(),this.paused||this.subscribeMessages(t)}catch(t){this.errorMessage=t?.message||"Unable to create a new conversation."}}setActiveConversation(t){t?._id&&(this.activeConversationId=t._id,this.activeConversation=t,this.subscribeMessages(t._id))}startRename(t){t?._id&&(this.editingConversationId=t._id,this.editingTitle=t.title||"")}cancelRename(){this.editingConversationId="",this.editingTitle=""}async saveRename(t){if(!t?._id)return;const e=(this.editingTitle||"").trim();if(e)try{await this.terminal.call(this.methodNames().conversationUpdate||DEFAULT_METHODS.conversationUpdate,t._id,{title:e}),this.cancelRename()}catch(t){this.errorMessage=t?.message||"Unable to rename conversation."}else this.cancelRename()}async deleteConversation(t){if(!t?._id)return;if(window.confirm("Delete this conversation?"))try{await this.terminal.call(this.methodNames().conversationDelete||DEFAULT_METHODS.conversationDelete,t._id),this.localMessagesByConversation.delete(t._id),this.activeConversationId===t._id&&(this.activeConversationId="",this.activeConversation=null,this.messages=[])}catch(t){this.errorMessage=t?.message||"Unable to delete conversation."}}async sendMessage(){if(this.isSending)return;const t=(this.messageText||"").trim();if(!t)return;this.promptFavoriteEnabled&&this.addPromptFavorite(t),this.promptFavoriteEnabled=!1,this.errorMessage="",this.isSending=!0;const e=this.generateRequestId();this.messageText="";let n="",o="",r="",i="";try{n=this.ensureLocalConversationForSend(),o=n;if(!0===this.resolveConfig()?.pageRouterEnabled&&!this.pendingFiles.length){const o=this.buildPageRouterContext(t),i=await this.pageRouter.handleMessage({message:t,context:o});if(i?.handled){r=this.appendLocalMessage(n,"user",t,{request_id:e});const o=i.reply||(i.error?`Unable to complete request: ${i.error}`:"Done.");return o&&this.appendLocalMessage(n,"assistant",o,{...i.data||{},request_id:e}),i.error&&(this.errorMessage=i.error),void(this.pendingFiles=[])}}r=this.appendLocalMessage(n,"user",t,{request_id:e}),i=this.appendLocalMessage(n,"assistant","Queued...",{progress:["Queued"],request_id:e},{pending:!0}),i&&this.schedulePendingProgress(i),n=await this.ensureConversationId(),n&&o&&n!==o&&this.reparentLocalConversation(o,n),n&&i&&this.updateLocalMessage(n,i,{content:"Planning...",metadata:{progress:["Planning"],pending:!0,request_id:e}}),n&&this.subscribedConversationId!==n&&this.subscribeMessages(n);const s=await this.uploadPendingFiles(),a={id_conversation:n||void 0,id_client:this.idClient||void 0,id_app:this.idApp||void 0,message:t,request_id:e,attachments:s,delete_files_after_run:this.deleteFilesAfterRun(),context:this.buildMessageContext(t)};if("openai"===this.resolveMode()){a.guardrails=!1!==this.resolveConfig()?.guardrails,a.profile_id=this.resolveConfig()?.profileId,a.config={mode:"openai",model:this.resolveConfig()?.model,system_prompt:this.resolveConfig()?.systemPrompt,user_prompt_template:this.resolveConfig()?.userPromptTemplate,response_format:this.resolveConfig()?.responseFormat,temperature:this.resolveConfig()?.temperature,max_tokens:this.resolveConfig()?.maxTokens};const t=await this.terminal.call(this.methodNames().runOpenAI||DEFAULT_METHODS.runOpenAI,a);this.applyServerMessageToLocal(n,e,t?.message),this.afterRunResponse(t?.conversation)}else{if(!a.id_app)throw new Error("App id is required for code changes.");const t=this.resolveMongoConfig();t&&(a.mongo=t);const o=this.resolveCodexPayloadConfig();o&&(a.config=o);const r=await this.terminal.call(this.methodNames().runCodex||DEFAULT_METHODS.runCodex,a);this.applyServerMessageToLocal(n,e,r?.message,r?.tool_result),this.afterRunResponse(r?.conversation)}this.pendingFiles=[]}catch(t){this.errorMessage=t?.message||"Unable to send message.",n&&r&&this.removeLocalMessage(n,r),n&&i&&this.removeLocalMessage(n,i)}finally{this.isSending=!1}}async startNewConversation(){this.pendingConversationId="",this.pendingConversation=null,this.activeConversationId="",this.activeConversation=null,this.promptFavoriteEnabled=!1,this.subscribedConversationId="",this.serverMessages=[],this.messages=[],this.refreshMergedMessages(),await this.createConversation()}async deployTest(){if(this.activeConversationId&&!this.isDeployingTest){this.errorMessage="",this.infoMessage="",this.isDeployingTest=!0;try{const t=await this.terminal.call(this.methodNames().deployTest||DEFAULT_METHODS.deployTest,this.activeConversationId);this.infoMessage=t?.build_id?`Test deploy started (${t.build_id}).`:"Test deploy started."}catch(t){this.errorMessage=t?.message||"Unable to deploy test build."}finally{this.isDeployingTest=!1}}}handleFileSelect(t){const e=t.target,n=Array.from(e?.files||[]);if(!n.length)return;const o=1024*this.maxFileMb()*1024,r=1024*this.maxTotalMb()*1024;let i=this.pendingFiles.reduce((t,e)=>t+e.size,0);n.forEach(t=>{t.size>o?this.errorMessage=`File ${t.name} exceeds ${this.maxFileMb()}MB.`:i+t.size>r?this.errorMessage=`Total upload size exceeds ${this.maxTotalMb()}MB.`:(i+=t.size,this.pendingFiles.push(t))}),e.value=""}removePendingFile(t){this.pendingFiles.splice(t,1)}clearComposer(){this.messageText="",this.pendingFiles=[],this.promptFavoriteEnabled=!1}togglePromptFavorite(){this.promptFavoriteEnabled=!this.promptFavoriteEnabled}async runFavoritePrompt(t){const e=this.normalizeFavoritePrompt(t);e&&!this.isSending&&(this.messageText=e,this.promptFavoriteEnabled=!1,await this.sendMessage())}removeFavoritePrompt(t,e){e&&(e.preventDefault(),e.stopPropagation()),this.removePromptFavorite(t)}canToggleFavoriteForMessage(t){return"user"===t?.role&&!!this.extractFavoritePromptFromMessage(t)}isMessagePromptFavorited(t){return this.isPromptFavorited(this.extractFavoritePromptFromMessage(t))}toggleMessagePromptFavorite(t,e){e&&(e.preventDefault(),e.stopPropagation());const n=this.extractFavoritePromptFromMessage(t);n&&(this.isPromptFavorited(n)?this.removePromptFavorite(n):this.addPromptFavorite(n))}resolveConfig(){return this.config||null}resolveMongoConfig(){const t=this.resolveConfig()?.mongo;return t?void 0===t.access&&void 0!==t.readonly?{...t,access:t.readonly?"read":"readWrite"}:t:null}resolveMode(){return this.resolveConfig()?.mode||"openai"}resolveCodexPayloadConfig(){const t=this.resolveConfig();if(!t)return null;const e=String(t.model||"").trim(),n=this.resolveCodexFallbackModels(t);if(!e&&!n.length)return null;const o={mode:"codex"};return e&&(o.model=e),1===n.length?o.fallback_model=n[0]:n.length>1&&(o.fallback_models=n),o}resolveCodexFallbackModels(t){const e=[],n=t=>{const n=String(t||"").trim();n&&!e.includes(n)&&e.push(n)};if(Array.isArray(t.fallbackModels))t.fallbackModels.forEach(n);else{const e=String(t?.fallbackModels||"").trim();e&&e.split(",").forEach(n)}return n(t.fallbackModel),e}resolveBranchEnabled(){const t=this.resolveConfig();return void 0!==t?.branchEnabled?!!t.branchEnabled:"codex"===this.resolveMode()}methodNames(){return{...DEFAULT_METHODS,...this.resolveConfig()?.methodNames||{}}}subscribeConversations(t=!1){if(this.paused)return void(this.isLoading=!1);const e=this.methodNames().conversationsPublication||DEFAULT_METHODS.conversationsPublication,n=JSON.stringify({publication:e,idClient:this.idClient||"",idApp:this.idApp||"",status:this.conversationStatus||"active",bypass:!!this.bypassRouteSubscriptions});if(this.conversationsSub&&!this.conversationsSub.closed&&this.conversationsSubKey===n)return this.conversations=this.filterConversations(this.conversations||[]),this.ensureActiveConversation(t),void(this.isLoading=!1);this.conversationsSubKey=n,this.conversationsSub?.unsubscribe(),this.isLoading=!0;const o=this.bypassRouteSubscriptions?this.terminal.subscribeBypass(e,this.idClient||"",this.idApp||"",this.conversationStatus||"active"):this.terminal.subscribe(e,this.idClient||"",this.idApp||"",this.conversationStatus||"active");this.conversationsSub=o.subscribe({next:e=>{this.conversations=this.mergePendingConversation(this.filterConversations(e||[])),this.ensureActiveConversation(t),this.isLoading=!1},error:()=>{this.errorMessage="Unable to load conversations.",this.isLoading=!1}})}filterConversations(t){const e=this.resolveMode();return(t||[]).filter(t=>!e||(!t.mode||t.mode===e))}ensureActiveConversation(t=!1){if(this.activeConversationId){const e=this.conversations.find(t=>t._id===this.activeConversationId);if(e)return this.activeConversation=e,void(t&&this.subscribeMessages(e._id,!0))}this.conversations.length?this.setActiveConversation(this.conversations[0]):(this.activeConversationId="",this.activeConversation=null,this.messages=[],this.serverMessages=[],this.refreshMergedMessages(),this.messagesSub?.unsubscribe())}subscribeMessages(t,e=!1){if(this.paused)return;const n=this.methodNames().messagesPublication||DEFAULT_METHODS.messagesPublication,o=JSON.stringify({publication:n,conversationId:t,limit:this.messageLimit,bypass:!!this.bypassRouteSubscriptions});if(this.messagesSub&&!this.messagesSub.closed&&this.messagesSubKey===o)return;this.messagesSubKey=o,this.messagesSub?.unsubscribe();const r=this.subscribedConversationId===t;this.subscribedConversationId=t,e&&r||(this.serverMessages=[],this.refreshMergedMessages());const i=this.bypassRouteSubscriptions?this.terminal.subscribeBypass(n,t,this.messageLimit):this.terminal.subscribe(n,t,this.messageLimit);this.messagesSub=i.subscribe({next:t=>{this.serverMessages=t||[],this.refreshMergedMessages()},error:()=>{this.errorMessage="Unable to load messages."}})}async uploadPendingFiles(){if(!this.allowUploads()||!this.pendingFiles.length)return[];const t=await this.ensureConversationId(),e=[];for(const n of this.pendingFiles){const o=await this.readFileAsBase64(n),r="codex"===this.resolveMode()?this.methodNames().uploadCodex||DEFAULT_METHODS.uploadCodex:this.methodNames().uploadOpenAI||DEFAULT_METHODS.uploadOpenAI,i=await this.terminal.call(r,t,n.name,o,n.size,n.type);e.push({id:i?.id_file||i?.id,name:i?.name||n.name,type:i?.type||n.type,size:i?.size||n.size,local_path:i?.local_path})}return e}readFileAsBase64(t){return new Promise((e,n)=>{const o=new FileReader;o.onload=()=>{const t="string"==typeof o.result?o.result:"",n=t.includes(",")?t.split(",")[1]:t;e(n)},o.onerror=()=>{n(o.error||new Error("Unable to read file."))},o.readAsDataURL(t)})}afterRunResponse(t){if(t?._id){const e=this.subscribedConversationId!==t._id;this.activeConversationId=t._id,this.activeConversation=t,!this.paused&&e&&this.subscribeMessages(t._id)}}handleComposerKeydown(t){t.isComposing||"Enter"===t.key&&(t.shiftKey||(t.preventDefault(),!this.isSending&&(this.messageText||"").trim()&&this.sendMessage()))}buildMessageContext(t){const e=String(this.contextRoute||"").trim();if("all"===this.contextMode)return{mode:"all"};if("current"===this.contextMode)return e?{mode:"current",route:e}:{mode:"all"};if(!e)return{mode:"all"};const n=String(t||"").toLowerCase();return[/\bthis\s+(page|screen|view|panel|form|tab|section|dialog|modal|drawer)\b/,/\bon\s+this\b/,/\bcurrent\s+(page|screen|view)\b/,/\bhere\b/,/\bwhy\s+is\s+(this|it)\b/,/\bwhy\s+does\s+(this|it)\b/,/\bwhat\s+is\s+(this|it)\b/].some(t=>t.test(n))?{mode:"current",route:e}:{mode:"all"}}buildPageRouterContext(t){const e=String(this.contextRoute||"").trim(),n=this.buildMessageContext(t).mode,o=this.services?._app?.environment?.value||{},r=o.FEATURE_FLAGS&&"object"==typeof o.FEATURE_FLAGS?o.FEATURE_FLAGS:o.FEATURE_GATES&&"object"==typeof o.FEATURE_GATES?o.FEATURE_GATES:o.MODULE_GATES&&"object"==typeof o.MODULE_GATES?o.MODULE_GATES:void 0;return{route:e||void 0,mode:n,idClient:this.idClient||void 0,idApp:this.idApp||void 0,featureFlags:r}}refreshMergedMessages(){const t=this.activeConversationId||"";let e=t&&this.localMessagesByConversation.get(t)||[];e=this.syncLocalMessages(t,e,this.serverMessages),this.messages=this.mergeMessages(this.serverMessages,e),this.applyStoredSupportTicketOverrides(),this.applyStoredMongoReadOverrides(),this.processSupportTicketDirectives(this.messages),this.processMongoDirectives(this.messages),this.scrollToBottom()}mergeMessages(t,e){const n=new Set;(e||[]).forEach(t=>{if(!this.isPendingAssistantMessage(t))return;const e=String(t?.metadata?.request_id||"").trim();e&&n.add(e)});const o=[...(t||[]).filter(t=>{if("assistant"!==t?.role||!0!==t?.metadata?.pending)return!0;const e=String(t?.metadata?.request_id||"").trim();return!e||!n.has(e)}),...e||[]],r=new Set;return o.filter(t=>{const e=String(t?._id||"").trim()||`${t?.role||"message"}:${this.messageTimestamp(t)}:${t?.content||""}`;return!r.has(e)&&(r.add(e),!0)}).sort((t,e)=>this.compareMessages(t,e))}syncLocalMessages(t,e,n){if(!t||!e.length||!n.length)return e;const o=new Map,r=[],i=new Set,s=new Set,a=new Map;n.forEach(t=>{const e=t?.role||"",n=this.normalizeMessageContent(t?.content);if(e&&n){const t=`${e}::${n}`;o.set(t,(o.get(t)||0)+1)}if("assistant"===e){const e=this.messageTimestamp(t);e>0&&r.push(e)}const l=String(t?.metadata?.request_id||"").trim();l&&(i.add(l),"assistant"===e&&(s.add(l),a.has(l)||a.set(l,t)))});let l=!1;a.size&&(e=(e||[]).map(t=>{if(!this.isPendingAssistantMessage(t))return t;const e=String(t?.metadata?.request_id||"").trim();if(!e)return t;const n=a.get(e);if(!n?.metadata?.pending)return t;const o=this.mergeProgressLists(t?.metadata?.progress,n?.metadata?.progress),r=Array.isArray(t?.metadata?.progress)?t.metadata?.progress:[];if(!o.length)return t;return o.length!==r.length||o.some((t,e)=>t!==r[e])?(l=!0,{...t,metadata:{...t.metadata||{},progress:o},updatedAt:new Date}):t}));const c=[],d=e.filter(t=>{if(!this.isLocalMessage(t))return!0;const e=String(t?.metadata?.request_id||"").trim();if(this.isPendingAssistantMessage(t)){if(e){const n=a.get(e);if(n)return!0===n?.metadata?.pending||(t?._id&&c.push(String(t._id)),!1)}const n=this.messageTimestamp(t);if(e&&s.has(e))return t?._id&&c.push(String(t._id)),!1;if(!n||!r.length)return!0;const o=!r.some(t=>t>=n);return!o&&t?._id&&c.push(String(t._id)),o}if(e&&i.has(e))return t?._id&&c.push(String(t._id)),!1;const n=t?.role||"",l=this.normalizeMessageContent(t?.content);if(!n||!l)return!0;const d=`${n}::${l}`,p=o.get(d)||0;return!(p>0)||(o.set(d,p-1),t?._id&&c.push(String(t._id)),!1)});return d.length!==e.length?(this.localMessagesByConversation.set(t,d),c.forEach(t=>this.clearPendingProgressTimers(t))):l&&this.localMessagesByConversation.set(t,d),d}messageTimestamp(t){const e=t?.createdAt,n=t?.updatedAt,o=e?new Date(e).getTime():0;if(o)return o;const r=n?new Date(n).getTime():0;if(r)return r;const i=String(t?.metadata?.request_id||"").trim();if(i){const t=i.match(/-(\d{10,})-/);if(t?.[1]){const e=Number(t[1]);if(Number.isFinite(e)&&e>0)return e}}return 0}compareMessages(t,e){const n=this.messageTimestamp(t),o=this.messageTimestamp(e),r=String(t?.role||"").toLowerCase(),i=String(e?.role||"").toLowerCase(),s=String(t?.metadata?.request_id||"").trim(),a=String(e?.metadata?.request_id||"").trim();if("assistant"===r&&"user"===i&&s&&(!a||s===a))return 1;if("assistant"===i&&"user"===r&&a&&(!s||s===a))return-1;if(0===n&&0!==o)return 1;if(0===o&&0!==n)return-1;if(n!==o)return n-o;if(s&&s===a){const n=this.roleSortRank(t)-this.roleSortRank(e);if(0!==n)return n}const l=this.roleSortRank(t)-this.roleSortRank(e);if(0!==l)return l;const c=String(t?._id||""),d=String(e?._id||"");if(c&&d&&c!==d)return c.localeCompare(d);const p=String(t?.content||""),u=String(e?.content||"");return p.localeCompare(u)}roleSortRank(t){const e=String(t?.role||"").toLowerCase();return"user"===e?0:"assistant"===e?1:"tool"===e?2:3}isLocalMessage(t){return!0===t?.metadata?.local}isPendingAssistantMessage(t){return this.isLocalMessage(t)&&"assistant"===t?.role&&!0===t?.metadata?.pending}normalizeMessageContent(t){return this.normalizeUsdCurrencyText(String(t||"").trim())}normalizeUsdCurrencyText(t){const e=String(t||"");return e?e.replace(AI_TERMINAL_USD_CURRENCY_TEXT_PATTERN,(t,e)=>`$${e}`):""}mergeProgressLists(t,e){const n=[],o=new Set,r=t=>{const e=String(t||"").trim();if(!e)return;const r=e.toLowerCase();o.has(r)||(o.add(r),n.push(e))};return(Array.isArray(t)?t:[]).forEach(r),(Array.isArray(e)?e:[]).forEach(r),n}appendLocalMessage(t,e,n,o,r){const i=String(n||"").trim();if(!t||!i)return"";const s=new Date,a=`local-${s.getTime()}-${this.localMessageCounter++}`,l={...o||{},local:!0};r?.pending&&(l.pending=!0);const c={_id:a,id_conversation:t,role:e,content:i,metadata:l,createdAt:s,updatedAt:s},d=this.localMessagesByConversation.get(t)||[];return d.push(c),this.localMessagesByConversation.set(t,d),this.refreshMergedMessages(),a}removeLocalMessage(t,e){if(!t||!e)return;const n=this.localMessagesByConversation.get(t)||[];if(!n.length)return;const o=n.filter(t=>t?._id!==e);o.length!==n.length&&(this.localMessagesByConversation.set(t,o),this.clearPendingProgressTimers(e),this.refreshMergedMessages())}updateLocalMessage(t,e,n){if(!t||!e)return;const o=this.localMessagesByConversation.get(t)||[];if(!o.length)return;const r=o.findIndex(t=>t?._id===e);if(-1===r)return;const i=o[r],s={...i,...n,metadata:{...i.metadata||{},...n.metadata||{}},updatedAt:n.updatedAt||new Date};o[r]=s,this.localMessagesByConversation.set(t,o),this.refreshMergedMessages()}findLocalMessageById(t){if(!t)return null;for(const[e,n]of this.localMessagesByConversation.entries()){const o=(n||[]).find(e=>e?._id===t);if(o)return{conversationId:e,message:o}}return null}schedulePendingProgress(t){if(!t)return;this.clearPendingProgressTimers(t);const e=[];[{delay:4500,label:"Grabbing Data"},{delay:9e3,label:"Drafting response"}].forEach(n=>{const o=setTimeout(()=>{const e=this.findLocalMessageById(t);if(!e||!e.message?.metadata?.pending)return void this.clearPendingProgressTimers(t);const o=Array.isArray(e.message.metadata?.progress)?[...e.message.metadata.progress]:[];o.map(t=>String(t||"").toLowerCase()).includes(n.label.toLowerCase())||(o.push(n.label),this.updateLocalMessage(e.conversationId,t,{metadata:{progress:o}}))},n.delay);e.push(o)}),this.pendingProgressTimers.set(t,e)}clearPendingProgressTimers(t){const e=this.pendingProgressTimers.get(t);e&&(e.forEach(t=>clearTimeout(t)),this.pendingProgressTimers.delete(t))}applyServerMessageToLocal(t,e,n,o){if(!t||!e||!n)return;const r=this.localMessagesByConversation.get(t)||[],i=r.findIndex(t=>"assistant"===t?.role&&t?.metadata?.request_id===e);if(-1===i)return;const s=r[i],a={...s.metadata||{},...n.metadata||{},pending:!1};o&&(a.tool_result=o);const l={...s,content:n.content||s.content,metadata:a,usage:n.usage||s.usage,createdAt:n.createdAt||s.createdAt,updatedAt:n.updatedAt||new Date};r[i]=l,this.localMessagesByConversation.set(t,r),this.clearPendingProgressTimers(s?._id||n._id||""),this.refreshMergedMessages()}async ensureConversationId(){if(this.activeConversationId&&!this.isLocalConversationId(this.activeConversationId))return this.activeConversationId;const t=this.activeConversationId,{id:e,conversation:n}=await this.createNewConversation();return e&&(this.activeConversationId=e,n&&(this.pendingConversationId=e,this.pendingConversation=n,this.conversations=this.mergePendingConversation(this.conversations)),t&&t!==e&&this.reparentLocalConversation(t,e)),e}ensureLocalConversationForSend(){if(this.activeConversationId)return this.activeConversationId;const t=new Date,e=`local-convo-${t.getTime()}-${this.localConversationCounter++}`,n={_id:e,id_client:this.idClient||void 0,id_app:this.idApp||void 0,title:"Ask AI About the System",mode:this.resolveMode(),status:this.conversationStatus||"active",profile_id:this.resolveConfig()?.profileId,metadata:{pending:!0,local:!0},createdAt:t,updatedAt:t};return this.pendingConversationId=e,this.pendingConversation=n,this.activeConversationId=e,this.activeConversation=n,this.conversations=this.mergePendingConversation(this.conversations),this.localMessagesByConversation.has(e)||this.localMessagesByConversation.set(e,[]),this.refreshMergedMessages(),e}isLocalConversationId(t){return String(t||"").startsWith("local-convo-")}reparentLocalConversation(t,e){if(!t||!e||t===e)return;const n=this.localMessagesByConversation.get(t)||[];if(n.length){const t=n.map(t=>({...t,id_conversation:e})),o=this.localMessagesByConversation.get(e)||[];this.localMessagesByConversation.set(e,[...o,...t])}this.localMessagesByConversation.delete(t),this.activeConversationId===t&&(this.activeConversationId=e),this.subscribedConversationId===t&&(this.subscribedConversationId=e),this.pendingConversationId===t&&(this.pendingConversationId=e),this.pendingConversation&&this.pendingConversation._id===t&&(this.pendingConversation={...this.pendingConversation,_id:e})}generateRequestId(){return`req-${Date.now()}-${this.requestCounter++}`}scrollToBottom(){setTimeout(()=>{const t=this.messageScroll?.nativeElement;t&&(t.scrollTop=t.scrollHeight)},50)}splitMessageContent(t){const e=String(t||"");if(!e)return[];const n=/\/[a-z0-9][a-z0-9/_-]*(?:\?[a-z0-9=&%_-]+)?(?:#[a-z0-9_-]+)?/g,o=[];let r,i=0;for(;null!==(r=n.exec(e));){const t=r[0],n=r.index;if(!this.isRouteBoundary(e,n))continue;n>i&&o.push({text:e.slice(i,n)});const s=this.shouldLinkRoute(t);o.push(s?{text:t,route:t}:{text:t}),i=n+t.length}return i<e.length&&o.push({text:e.slice(i)}),o.length?o:[{text:e}]}isRouteBoundary(t,e){if(0===e)return!0;const n=t[e-1];return/[\s\[\]({'"`.,;:!?]/.test(n)}getMessageContent(t){const e=String(t?._id||"").trim();return e&&this.messageContentOverrides.has(e)?this.normalizeUsdCurrencyText(this.messageContentOverrides.get(e)||""):this.normalizeUsdCurrencyText(String(t?.content||""))}displayTableForMessage(t){const e=this.resolveDisplayTable(t);if(!e)return null;const n=this.getMessageContent(t);return this.containsMarkdownTable(n)&&!t?.metadata?.tool_result?.output?.display?null:e}isTableCollapsed(t){const e=String(t?._id||"").trim();return!!e&&this.collapsedTableIds.has(e)}toggleTable(t){const e=String(t?._id||"").trim();e&&(this.collapsedTableIds.has(e)?this.collapsedTableIds.delete(e):this.collapsedTableIds.add(e))}get timeZoneLabel(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"Local"}catch{return"Local"}}pendingProgress(t){if(!t?.metadata?.pending)return null;const e=t?.metadata?.progress,n=Array.isArray(e)?e.map(t=>String(t||"").trim()).filter(Boolean):[],o=n.length?n:["Planning"],r=this.resolvePendingElapsed(t),i=[];r>=4500&&i.push("Grabbing Data"),r>=9e3&&i.push("Drafting response");const s=[],a=new Set;return[...o,...i].forEach(t=>{const e=String(t||"").trim();if(!e)return;const n=e.toLowerCase();a.has(n)||(a.add(n),s.push(e))}),s.length?s:null}resolvePendingElapsed(t){const e=this.messageTimestamp(t);return e?Math.max(0,Date.now()-e):0}ensureMessageSubscription(){if(this.paused)return;const t=this.activeConversationId||"";if(!t||this.isLocalConversationId(t))return;const e=this.methodNames().messagesPublication||DEFAULT_METHODS.messagesPublication,n=JSON.stringify({publication:e,conversationId:t,limit:this.messageLimit,bypass:!!this.bypassRouteSubscriptions});(!this.messagesSub||this.messagesSub.closed||this.messagesSubKey!==n)&&this.subscribeMessages(t,!0)}formatDisplayCell(t,e){if(null==t||""===t)return"N/A";if(Array.isArray(t))return this.truncateText(t.map(t=>String(t)).join(", "),200);if(t instanceof Date)return formatDate(t,"short",this.locale);if("object"==typeof t)try{return this.truncateText(JSON.stringify(t),200)}catch{return this.truncateText(String(t),200)}const n=this.formatScalarValue(t,e);return this.truncateText(n,200)}formatScalarValue(t,e){const n=this.resolveNumericValue(t),o=String(e||"").toLowerCase();if(this.isDateColumn(o)&&this.isLikelyDateValue(t)){const e=t instanceof Date?t:new Date(t);if(!Number.isNaN(e.getTime()))return formatDate(e,"short",this.locale)}if(null!==n){if(this.isPercentColumn(o)){return formatPercent(n>1&&n<=100?n/100:n,this.locale,"1.0-2")}return this.isCurrencyColumn(o)?formatCurrency(n,this.locale,this.currencySymbol,"USD","1.2-2"):formatNumber(n,this.locale,"1.0-2")}if(this.isLikelyDateValue(t)&&this.isDateColumn(o)){const e=t instanceof Date?t:new Date(t);if(!Number.isNaN(e.getTime()))return formatDate(e,"short",this.locale)}return String(t)}resolveNumericValue(t){if("number"==typeof t&&Number.isFinite(t))return t;if("string"==typeof t){const e=t.replace(/[^0-9.+-]/g,"");if(!e)return null;const n=Number(e);return Number.isFinite(n)?n:null}return null}isPercentColumn(t){return/(percent|pct|percentage|ratio|rate)\b/.test(t)}isCurrencyColumn(t){return/(amount|total|price|cost|balance|fee|revenue|invoice|usd|tax|subtotal)\b/.test(t)}isDateColumn(t){return/(date|time|created|updated|timestamp|at)\b/.test(t)}isLikelyDateValue(t){if(!t)return!1;if(t instanceof Date)return!0;if("string"==typeof t){if(!/[0-9]/.test(t))return!1;const e=Date.parse(t);return!Number.isNaN(e)}return!1}resolveDisplayTable(t){const e=String(t?._id||"").trim(),n=e?this.messageDisplayOverrides.get(e):null,o=t?.metadata?.tool_result?.output?.display,r=n||o;if(!r||!Array.isArray(r.columns)||!Array.isArray(r.rows))return null;const i=!0===r.includeIds,s=r.columns.filter(t=>i||!this.shouldHideDisplayColumn(t)).map(t=>({key:t,label:this.formatDisplayColumn(t)}));if(!s.length)return null;const a=(r.rows||[]).map(t=>{const e={};return s.forEach(({key:n,label:o})=>{e[o]=t?.[n]??t?.[o]}),e});return{...r,columns:s.map(t=>t.label),rows:a}}isSuperAdmin(){return!!this.services?._account?.isUserSuperAdmin()}resolveDebugPayload(t){const e=t?.metadata?.debug;if(e&&"object"==typeof e)return e;const n=t?.metadata?.tool_result?.output?.debug;if(n&&"object"==typeof n)return n;const o=t?.metadata?.tool_result?.debug;return o&&"object"==typeof o?o:null}showDebugForMessage(t){return!!this.isSuperAdmin()&&("assistant"===t?.role&&!!this.resolveDebugPayload(t))}canCopyMessage(t){return!(!t||t.metadata?.pending||"assistant"!==t.role&&"user"!==t.role)}async copyMessage(t){if(!this.canCopyMessage(t))return;const e=this.buildCopyText(t);if(!e)return;let n=!1;try{navigator?.clipboard?.writeText&&(await navigator.clipboard.writeText(e),n=!0)}catch{}n||(n=this.copyTextFallback(e)),n&&this._services._alert.setAlert("success","Copied to clipboard")}async copyAssistantResponse(t){await this.copyMessage(t)}buildCopyText(t){const e=this.getMessageContent(t);let n=String(e||"").trim();if(this.isSuperAdmin()){const e=this.resolveDebugPayload(t);if(e){const t=this.stringifyCopyDebug(e);t&&(n=n?`${n}\n\nDebug:\n${t}`:`Debug:\n${t}`)}}return n.trim()}stringifyCopyDebug(t){try{return JSON.stringify(t,null,2)}catch{return String(t||"")}}copyTextFallback(t){const e=String(t||"");if(!e)return!1;const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly","true"),n.style.position="fixed",n.style.top="-1000px",n.style.opacity="0",document.body.appendChild(n),n.select();let o=!1;try{o=document.execCommand("copy")}catch{}finally{document.body.removeChild(n)}return o}toggleDebug(t){const e=String(t?._id||"").trim();e&&(this.expandedDebugIds.has(e)?this.expandedDebugIds.delete(e):this.expandedDebugIds.add(e))}isDebugCollapsed(t){const e=String(t?._id||"").trim();return!e||!this.expandedDebugIds.has(e)}debugText(t){const e=this.resolveDebugPayload(t);if(!e)return"";try{return this.truncateText(JSON.stringify(e,null,2),8e3)}catch{return this.truncateText(String(e),8e3)}}canExportMessage(t){const e=t?.metadata?.tool_result;return!(!e?.input||!e?.type)&&("mongo_read"===e.type||"mongo_agg"===e.type)}isExportingMessage(t){const e=String(t?._id||"").trim();return!!e&&this.exportingMessageIds.has(e)}async exportMessageTable(t){const e=String(t?._id||"").trim();if(!e||this.isExportingMessage(t)||!this.canExportMessage(t))return;const n=t?.metadata?.tool_result;if(n?.input){this.exportingMessageIds.add(e),this.errorMessage="",this.infoMessage="";try{const t={...n.input||{}},e=t.options&&"object"==typeof t.options?{...t.options}:{};e.export=!0,e.skip=0;const o=n?.output?.display?.rows?.length||n?.output?.rowCount||0,r="number"==typeof n?.output?.total?n.output.total:null;(!0===n?.output?.truncated||null!==r&&r>o||"number"!=typeof e.limit)&&(e.limit=5e3),t.options=e,!t.permissionView&&this.contextRoute&&(t.permissionView=this.contextRoute),!t.id_client&&this.idClient&&(t.id_client=this.idClient);const i=this.resolveMongoConfig();i&&(t.mongo=i);const s="mongo_agg"===n.type?"aiAssistantMongoAggregate":"aiAssistantMongoRead",a=await this.terminal.call(s,t),l=a?.display;if(!l?.rows?.length)return void(this.infoMessage="No rows returned to export.");const c=Array.isArray(l.columns)&&l.columns.length?l.columns:Object.keys(l.rows[0]||{}),d=l.rows.map(t=>{const e={};return c.forEach(n=>{e[n]=this.formatDisplayCell(t?.[n],n)}),e});exportCsv(d,this.buildExportFilename(n,l),{showLabels:!0,headers:c}),this.infoMessage=`Exported ${d.length} rows.`}catch(t){this.errorMessage=t?.message||"Unable to export data."}finally{this.exportingMessageIds.delete(e)}}}buildExportFilename(t,e){return`${String(t?.output?.collection||t?.input?.collection||"export").trim()||"export"}-${formatDate(new Date,"yyyyMMdd-HHmm",this.locale)}-${e?.rows?.length||0}rows`}shouldHideDisplayColumn(t){const e=String(t||"").trim().toLowerCase().replace(/\s+/g,"_");if(!e)return!0;if("_id"===e||"__v"===e)return!0;if(e.startsWith("id_"))return!0;const n=e.split(".");return(n[n.length-1]||"").startsWith("id_")}formatDisplayColumn(t){const e=String(t||"").trim();if(!e)return"";if("_id"===e)return"id";if("_group"===e)return"Group";const n=e.replace(/[\s_]+/g,"").toLowerCase();return"createdat"===n?"Created At":"updatedat"===n?"Updated At":e}containsMarkdownTable(t){const e=String(t||"").split("\n");for(let t=0;t<e.length-1;t+=1)if(this.isMarkdownTableHeader(e[t],e[t+1]))return!0;return!1}stripMarkdownTables(t){const e=String(t||"").split("\n"),n=[];for(let t=0;t<e.length;t+=1)if(this.isMarkdownTableHeader(e[t],e[t+1]))for(t+=1;t+1<e.length;){const n=e[t+1];if(!n||!n.includes("|"))break;t+=1}else n.push(e[t]);return n.join("\n").trim()}addPromptFavorite(t){const e=this.normalizeFavoritePrompt(t);if(!e)return;const n=e.toLowerCase(),o=[e,...this.promptFavorites.filter(t=>this.normalizeFavoritePrompt(t).toLowerCase()!==n)];this.promptFavorites=o.slice(0,25),this.savePromptFavorites()}removePromptFavorite(t){const e=this.normalizeFavoritePrompt(t);if(!e)return;const n=e.toLowerCase(),o=this.promptFavorites.filter(t=>this.normalizeFavoritePrompt(t).toLowerCase()!==n);o.length!==this.promptFavorites.length&&(this.promptFavorites=o,this.savePromptFavorites())}isPromptFavorited(t){const e=this.normalizeFavoritePrompt(t);if(!e)return!1;const n=e.toLowerCase();return this.promptFavorites.some(t=>this.normalizeFavoritePrompt(t).toLowerCase()===n)}extractFavoritePromptFromMessage(t){return t&&"user"===t.role?this.normalizeFavoritePrompt(t.content||""):""}normalizeFavoritePrompt(t){return String(t||"").replace(/\s+/g," ").trim()}loadPromptFavorites(){try{const t=this.readPromptFavoritesPayload(),e=this.resolvePromptFavoritesScopeKey(),n=Array.isArray(t?.[e])?t[e]:[],o=[],r=new Set;n.forEach(t=>{const e=this.normalizeFavoritePrompt(t);if(!e)return;const n=e.toLowerCase();r.has(n)||(r.add(n),o.push(e))}),this.promptFavorites=o.slice(0,25)}catch{this.promptFavorites=[]}}savePromptFavorites(){try{const t=this.readPromptFavoritesPayload(),e=this.resolvePromptFavoritesScopeKey(),n=(this.promptFavorites||[]).map(t=>this.normalizeFavoritePrompt(t)).filter(Boolean).slice(0,25);n.length?t[e]=n:delete t[e],localStorage.setItem(this.promptFavoritesStorageKey,JSON.stringify(t))}catch{}}readPromptFavoritesPayload(){try{const t=localStorage.getItem(this.promptFavoritesStorageKey);if(!t)return{};const e=JSON.parse(t||"{}");if(!e||"object"!=typeof e)return{};const n={};return Object.entries(e).forEach(([t,e])=>{t&&Array.isArray(e)&&(n[t]=e.map(t=>this.normalizeFavoritePrompt(t)).filter(Boolean))}),n}catch{return{}}}resolvePromptFavoritesScopeKey(){return`${String(this.idClient||"").trim().toLowerCase()||"global"}::${String(this.idApp||"").trim().toLowerCase()||"global"}::${String(this.resolveMode()||"openai").trim().toLowerCase()||"openai"}`}loadSupportTicketMap(){try{const t=localStorage.getItem(this.supportTicketStorageKey);if(!t)return;const e=JSON.parse(t||"{}");Object.entries(e||{}).forEach(([t,e])=>{"string"==typeof t&&"string"==typeof e&&this.supportTicketMap.set(t,e)})}catch{}}saveSupportTicketMap(){try{const t={};this.supportTicketMap.forEach((e,n)=>{t[n]=e}),localStorage.setItem(this.supportTicketStorageKey,JSON.stringify(t))}catch{}}applyStoredSupportTicketOverrides(){this.supportTicketMap.size&&(this.messages||[]).forEach(t=>{const e=String(t?._id||"").trim();if(!e)return;const n=this.supportTicketMap.get(e);if(!n)return;const o=this.extractSupportTicketDirective(String(t?.content||"")),r=o?.cleaned||String(t?.content||""),i=this.appendSupportTicketLink(r,n);this.messageContentOverrides.set(e,i),this.clearMessageRenderCaches()})}processSupportTicketDirectives(t){(t||[]).forEach(t=>{if("assistant"!==t?.role)return;const e=String(t?._id||"").trim();if(!e)return;if(this.supportTicketMap.has(e)||this.supportTicketInFlight.has(e))return;const n=this.extractSupportTicketDirective(String(t?.content||""));n&&(this.messageContentOverrides.set(e,n.cleaned),this.clearMessageRenderCaches(),this.supportTicketInFlight.add(e),this.createSupportTicketFromDirective(e,n.summary).finally(()=>this.supportTicketInFlight.delete(e)))})}extractSupportTicketDirective(t){const e=String(t||"").split("\n"),n=e.findIndex(t=>t.trim().replace(/^[-*•]+\s*/,"").toUpperCase().startsWith("SUPPORT_TICKET_CREATE:"));if(-1===n)return null;let o=e[n].trim().replace(/^[-*•]+\s*/,"").split(":").slice(1).join(":").trim();if(!o){const t=e.slice(n+1).find(t=>t.trim());t&&(o=t.trim())}return{summary:o||"",cleaned:e.filter((t,e)=>e!==n).join("\n").trim()}}appendSupportTicketLink(t,e){const n=String(t||"").trim(),o=`Support ticket created: /support-ticket/detail/${e}`;return n?n.includes(o)?n:`${n}\n\n${o}`.trim():o}async createSupportTicketFromDirective(t,e){const n=this.resolveSupportTicketIssue(e),o=this.buildSupportTicketPayload(n);if(o)try{const e=await this.terminal.call("supportInsertSupportTicket",o),n=String(e||"").trim();if(!n)throw new Error("Support ticket creation failed.");this.supportTicketMap.set(t,n),this.saveSupportTicketMap();const r=this.messageContentOverrides.get(t)||"",i=this.appendSupportTicketLink(r,n);this.messageContentOverrides.set(t,i),this.clearMessageRenderCaches()}catch(t){this.errorMessage=t?.message||"Unable to create support ticket."}else this.errorMessage="Unable to create support ticket."}applyStoredMongoReadOverrides(){this.mongoReadCache.size&&(this.messages||[]).forEach(t=>{const e=String(t?._id||"").trim();if(!e)return;const n=this.mongoReadCache.get(e);n&&(this.messageContentOverrides.set(e,n),this.clearMessageRenderCaches())})}processMongoDirectives(t){(t||[]).forEach(t=>{if("assistant"!==t?.role)return;const e=String(t?._id||"").trim();if(!e)return;if(this.mongoReadCache.has(e)||this.mongoReadInFlight.has(e))return;const n=this.extractMongoDirective(String(t?.content||""));if(!n)return;this.messageContentOverrides.set(e,n.cleaned),this.clearMessageRenderCaches(),this.mongoReadInFlight.add(e);("aggregate"===n.type?this.createMongoAggregateFromDirective(e,n.payload,n.cleaned):this.createMongoReadFromDirective(e,n.payload,n.cleaned)).finally(()=>this.mongoReadInFlight.delete(e))})}extractMongoDirective(t){const e=String(t||"").split("\n"),n=e.findIndex(t=>{const e=t.trim().replace(/^[-*•]+\s*/,"").toUpperCase();return e.startsWith("MONGO_READ:")||e.startsWith("MONGO_AGG:")||e.startsWith("MONGO_AGGREGATE:")});if(-1===n)return null;const o=e[n].trim().replace(/^[-*•]+\s*/,""),r=o.toUpperCase();let i=null;if(r.startsWith("MONGO_READ:")?i="read":(r.startsWith("MONGO_AGG:")||r.startsWith("MONGO_AGGREGATE:"))&&(i="aggregate"),!i)return null;const s=o.indexOf(":"),a=s>=0?o.slice(s+1).trim():"";if(!a)return null;try{const t=JSON.parse(a);if(!t||"object"!=typeof t)return null;return{type:i,payload:t,cleaned:e.filter((t,e)=>e!==n).join("\n").trim()}}catch{return null}}resolveMongoCountIntent(t){const e=this.messages||[],n=this.findPreviousUserMessage(t,e);return!!n?.content&&this.isMongoCountQuestion(n.content)}findPreviousUserMessage(t,e){if(!t||!e.length)return null;const n=e.findIndex(e=>String(e?._id||"").trim()===t);if(n>0)for(let t=n-1;t>=0;t-=1)if("user"===e[t]?.role)return e[t];for(let t=e.length-1;t>=0;t-=1)if("user"===e[t]?.role)return e[t];return null}isMongoCountQuestion(t){const e=String(t||"").toLowerCase();if(!e)return!1;return[/\bhow many\b/,/\bnumber of\b/,/\bcount\b/,/\btotal (number|count)\b/,/\btotal (records|entries|items)\b/].some(t=>t.test(e))}async createMongoReadFromDirective(t,e,n){const o={...e||{}},r=this.resolveMongoCountIntent(t),i=r||!0===o?.options?.includeTotal;if(i){const t=o.options&&"object"==typeof o.options?{...o.options}:{};!0!==t.includeTotal&&(t.includeTotal=!0),r&&("number"!=typeof t.limit&&(t.limit=1),t.projection&&"object"==typeof t.projection&&Object.keys(t.projection).length||(t.projection={_id:1})),o.options=t}!o.permissionView&&this.contextRoute&&(o.permissionView=this.contextRoute),!o.id_client&&this.idClient&&(o.id_client=this.idClient);const s=this.resolveMongoConfig();s&&(o.mongo=s);try{const e=await this.terminal.call("aiAssistantMongoRead",o);e?.display?this.messageDisplayOverrides.set(t,e.display):this.messageDisplayOverrides.delete(t);const s=this.formatMongoReadResult(e,{collection:o.collection,includeTotal:i,countIntent:r}),a=this.appendMongoReadResult(n,s);this.mongoReadCache.set(t,a),this.messageContentOverrides.set(t,a),this.clearMessageRenderCaches()}catch(e){const o=String(e?.message||"Unable to read data."),r=/access denied|permission scope required|super admin required/i.test(o)?"Data access via AI requires the appropriate module permissions. I can explain how to view this data in the app or request access.":`Mongo read failed: ${o}`,i=this.appendMongoReadResult(n,r);this.mongoReadCache.set(t,i),this.messageContentOverrides.set(t,i),this.messageDisplayOverrides.delete(t),this.clearMessageRenderCaches()}}async createMongoAggregateFromDirective(t,e,n){const o={...e||{}};!o.permissionView&&this.contextRoute&&(o.permissionView=this.contextRoute),!o.id_client&&this.idClient&&(o.id_client=this.idClient);const r=this.resolveMongoConfig();r&&(o.mongo=r);try{const e=await this.terminal.call("aiAssistantMongoAggregate",o);e?.display?this.messageDisplayOverrides.set(t,e.display):this.messageDisplayOverrides.delete(t);const r=this.formatMongoAggregateResult(e,{collection:o.collection}),i=this.appendMongoReadResult(n,r);this.mongoReadCache.set(t,i),this.messageContentOverrides.set(t,i),this.clearMessageRenderCaches()}catch(e){const o=String(e?.message||"Unable to aggregate data."),r=/access denied|permission scope required|super admin required/i.test(o)?"Data access via AI requires the appropriate module permissions. I can explain how to view this data in the app or request access.":`Mongo aggregate failed: ${o}`,i=this.appendMongoReadResult(n,r);this.mongoReadCache.set(t,i),this.messageContentOverrides.set(t,i),this.messageDisplayOverrides.delete(t),this.clearMessageRenderCaches()}}appendMongoReadResult(t,e){const n=String(t||"").trim(),o=String(e||"").trim();return o?n?n.includes(o)?n:`${n}\n\n${o}`.trim():o:n}formatCollectionLabel(t){const e=String(t||"").trim();return e?e.replace(/[_-]+/g," ").replace(/\s+/g," ").trim():""}formatMongoReadResult(t,e){const n=Array.isArray(t?.documents)?t.documents:[],o=t?.display,r="number"==typeof t?.total?t.total:null,i=!0===e?.includeTotal,s=!0===e?.countIntent,a=null!==r&&(i||s);if(!n.length){if(a){const t=this.formatCollectionLabel(e?.collection);return t?`Total ${t}: ${r}.`:`Total records: ${r}.`}return"Mongo read summary: No results found."}if(a&&s){const t=this.formatCollectionLabel(e?.collection);return t?`Total ${t}: ${r}.`:`Total records: ${r}.`}const l=o?.rows?.length??n.length,c=[];if(a){const t=this.formatCollectionLabel(e?.collection);c.push(t?`Total ${t}: ${r}.`:`Total records: ${r}.`)}c.push(`Preview: ${l} row${1===l?"":"s"}.`),o?.columns?.length&&c.push(`Columns: ${o.columns.join(", ")}`);return`Mongo read summary:\n${c.map(t=>`- ${t}`).join("\n")}`.trim()}formatMongoAggregateResult(t,e){const n=Array.isArray(t?.documents)?t.documents:[],o=t?.display;if(!n.length){const t=this.formatCollectionLabel(e?.collection);return t?`Mongo aggregate summary (${t}): No results found.`:"Mongo aggregate summary: No results found."}const r=o?.rows?.length??n.length,i=[];i.push(`Preview: ${r} group${1===r?"":"s"}.`),o?.columns?.length&&i.push(`Columns: ${o.columns.join(", ")}`);const s=i.map(t=>`- ${t}`).join("\n"),a=this.formatCollectionLabel(e?.collection);return`${a?`Mongo aggregate summary (${a}):`:"Mongo aggregate summary:"}\n${s}`.trim()}formatMongoAggregateDocumentSummary(t,e){if(!t||"object"!=typeof t)return`${e}) ${String(t)}`;const n=[];if(Object.prototype.hasOwnProperty.call(t,"_id")){const e=this.formatMongoAggregateId(t._id);e&&n.push(`_id: ${e}`)}const o=Object.keys(t).filter(t=>"_id"!==t);for(const e of o){if(n.length>=4)break;const o=t[e];null!=o&&("object"!=typeof o&&n.push(`${e}: ${String(o)}`))}return n.length?`${e}) ${n.join(" • ")}`:`${e}) [group]`}formatMongoAggregateId(t){if(null==t)return"";if(t&&"object"==typeof t){const e="function"==typeof t.toHexString?t.toHexString():"";if(e)return e}if(Array.isArray(t)){const e=t.slice(0,2).map(t=>String(t)).join(", ");return t.length>2?`[${e}, ...]`:`[${e}]`}if("object"==typeof t){const e=String(t);if(e&&"[object Object]"!==e)return e;const n=Object.keys(t);if(!n.length)return"[object]";const o=n.slice(0,2).map(e=>`${e}: ${String(t[e])}`);return n.length>2?`{ ${o.join(", ")}, ... }`:`{ ${o.join(", ")} }`}return String(t)}formatMongoDocumentSummary(t,e){if(!t||"object"!=typeof t)return`${e}) ${String(t)}`;const n=Object.keys(t),o=n.includes("_id")?["_id",...n.filter(t=>"_id"!==t)]:n,r=[];for(const e of o){if(r.length>=4)break;const n=t[e];null!=n&&("object"!=typeof n&&r.push(`${e}: ${String(n)}`))}return r.length?`${e}) ${r.join(" • ")}`:`${e}) [record]`}resolveSupportTicketIssue(t){const e=String(t||"").trim();if(e)return this.truncateText(e,1400);const n=(this.messages||[]).slice().reverse().find(t=>"user"===t?.role);return n?.content?this.truncateText(String(n.content),1400):"Support request from AI assistant."}buildSupportTicketPayload(t){const e=this.services?._account?.getUser?.(),n=this.services?._app?.client?.getValue?.(),o=String(this.idClient||n||"").trim();if(!e||!o)return null;const r=new Date,i=`${r.getFullYear()}/${r.getMonth()+1}/${r.getDate()}`;return{__v:0,type:"General Inquery",priority:"Low",issue:t||"Support request from AI assistant.",support_ticket_number:0,support_ticket_number_string:"0",status:"Opened",substatus:"New",client:o,id_client:o,messages:[],date_created:r,date_created_string:i,id_user_created:e._id,user_created:e.fullname,billable:!1,date_investigation:null,date_closed:null,files:[],current_watchers:[],client_user:{id_user:e._id,user:e.fullname,email:e.email?e.email:""},tasks:[],notes:[],users_assigned:[],estimated_billable_hours:null,billable_hours:null,bill_description:"",difficulty:1}}truncateText(t,e){const n=String(t||"").trim();return n.length<=e?n:`${n.slice(0,Math.max(0,e-3))}...`}shouldLinkRoute(t){if(!t)return!1;const e=String(this.contextRoute||"").trim();return!e||t!==e}unsubscribeAll(){this.conversationsSub?.unsubscribe(),this.messagesSub?.unsubscribe()}schedulePause(){this.pauseTimer&&clearTimeout(this.pauseTimer),this.pauseTimer=setTimeout(()=>{this.pauseTimer=null,this.paused&&(this.subscriptionsPaused=!0,this.unsubscribeAll())},5e3)}cancelPause(){this.pauseTimer&&(clearTimeout(this.pauseTimer),this.pauseTimer=null)}async createNewConversation(){if(this.createConversationPromise)return this.createConversationPromise;this.createConversationPromise=this.createConversationInternal();try{return await this.createConversationPromise}finally{this.createConversationPromise=null}}async createConversationInternal(){const t={id_client:this.idClient||void 0,id_app:this.idApp||void 0,title:"Ask AI About the System",mode:this.resolveMode(),branch_enabled:this.resolveBranchEnabled(),status:this.conversationStatus||"active",profile_id:this.resolveConfig()?.profileId},e=await this.terminal.call(this.methodNames().conversationCreate||DEFAULT_METHODS.conversationCreate,t),n=e?.id_conversation||e?._id||"";if(!n)return{id:"",conversation:null};const o=new Date;return{id:n,conversation:{_id:n,id_client:t.id_client,id_app:t.id_app,title:t.title,mode:t.mode,branch_enabled:t.branch_enabled,status:t.status,profile_id:t.profile_id,metadata:{pending:!0,local:!0},createdAt:o,updatedAt:o}}}mergePendingConversation(t){if(!this.pendingConversationId||!this.pendingConversation)return t;const e=(t||[]).find(t=>t?._id===this.pendingConversationId);return e&&!e?.metadata?.pending?(this.pendingConversationId="",this.pendingConversation=null,t):e?t:[this.pendingConversation,...t||[]]}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalComponent,deps:[{token:AiTerminalService},{token:ProviderService},{token:AiPageRouterService},{token:AiPageFormAdapterService},{token:LOCALE_ID}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:AiTerminalComponent,isStandalone:!1,selector:"rio-ai-terminal",inputs:{idClient:"idClient",idApp:"idApp",title:"title",config:"config",conversationStatus:"conversationStatus",messageLimit:"messageLimit",placeholder:"placeholder",singleConversation:"singleConversation",contextMode:"contextMode",contextRoute:"contextRoute",paused:"paused",bypassRouteSubscriptions:"bypassRouteSubscriptions"},providers:[ProviderService,AiTerminalService,AiPageFormAdapterService],viewQueries:[{propertyName:"messageScroll",first:!0,predicate:["messageScroll"],descendants:!0}],usesOnChanges:!0,ngImport:i0,template:'<div class="ai-terminal-shell" [class.single-conversation]="singleConversation">\n\t<div class="ai-terminal-sidebar" *ngIf="!singleConversation">\n\t\t<div class="ai-terminal-sidebar-header">\n\t\t\t<div>\n\t\t\t\t<h5>{{ title }}</h5>\n\t\t\t\t<p class="ai-terminal-muted" *ngIf="idApp">App: {{ idApp }}</p>\n\t\t\t</div>\n\t\t\t<button type="button" class="btn btn-sm btn-primary" (click)="createConversation()">New Chat</button>\n\t\t</div>\n\n\t\t<div class="ai-terminal-sidebar-body">\n\t\t\t<div class="ai-terminal-empty" *ngIf="isLoading">Loading conversations...</div>\n\t\t\t<div class="ai-terminal-empty" *ngIf="!isLoading && !conversations.length">No conversations yet.</div>\n\n\t\t\t<div class="ai-terminal-conversation"\n\t\t\t\t*ngFor="let conversation of conversations; trackBy: trackByConversation"\n\t\t\t\t[class.is-active]="conversation._id === activeConversationId">\n\t\t\t\t<div class="ai-terminal-conversation-main" (click)="setActiveConversation(conversation)">\n\t\t\t\t\t<div class="ai-terminal-conversation-title" *ngIf="editingConversationId !== conversation._id">\n\t\t\t\t\t\t{{ conversation.title && conversation.title !== \'New Conversation\' ? conversation.title : \'Ask AI About the System\' }}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ai-terminal-conversation-edit" *ngIf="editingConversationId === conversation._id">\n\t\t\t\t\t\t<input type="text" class="form-control form-control-sm" [(ngModel)]="editingTitle"\n\t\t\t\t\t\t\t(keyup.enter)="saveRename(conversation)" (keyup.escape)="cancelRename()">\n\t\t\t\t\t\t<div class="ai-terminal-inline-actions">\n\t\t\t\t\t\t\t<button type="button" class="btn btn-sm btn-primary" (click)="saveRename(conversation)">Save</button>\n\t\t\t\t\t\t\t<button type="button" class="btn btn-sm btn-outline-secondary" (click)="cancelRename()">Cancel</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ai-terminal-conversation-meta">\n\t\t\t\t\t\t<span *ngIf="conversation.updatedAt">{{ conversation.updatedAt | date: \'short\' }}</span>\n\t\t\t\t\t\t<span *ngIf="conversation.branch_name && isCodexMode()">{{ conversation.branch_name }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-conversation-actions" *ngIf="editingConversationId !== conversation._id">\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm" (click)="startRename(conversation)">Rename</button>\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm text-danger ai-terminal-delete-btn" (click)="deleteConversation(conversation)">Delete</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<div class="ai-terminal-main">\n\t\t<div class="ai-terminal-main-header">\n\t\t\t<div>\n\t\t\t\t<h4>{{ activeConversation?.title && activeConversation?.title !== \'New Conversation\' ? activeConversation?.title : \'Ask AI About the System\' }}</h4>\n\t\t\t\t<div class="ai-terminal-meta-row">\n\t\t\t\t\t<span *ngIf="activeConversation?.branch_name && isCodexMode()">Branch: {{ activeConversation?.branch_name }}</span>\n\t\t\t\t\t<span *ngIf="showAdvanced() && totalTokens()">Tokens: {{ totalTokens() | number }}</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="ai-terminal-main-actions">\n\t\t\t\t<button type="button" class="btn btn-sm btn-outline-secondary"\n\t\t\t\t\t*ngIf="singleConversation"\n\t\t\t\t\t(click)="startNewConversation()" [disabled]="isSending">\n\t\t\t\t\tNew Conversation\n\t\t\t\t</button>\n\t\t\t\t<button type="button" class="btn btn-sm btn-outline-primary"\n\t\t\t\t\t*ngIf="isCodexMode() && activeConversation?.branch_name"\n\t\t\t\t\t(click)="deployTest()" [disabled]="isDeployingTest">\n\t\t\t\t\t{{ isDeployingTest ? \'Deploying...\' : \'Deploy to Test\' }}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class="ai-terminal-alert" *ngIf="errorMessage">\n\t\t\t<div class="alert alert-danger">{{ errorMessage }}</div>\n\t\t</div>\n\t\t<div class="ai-terminal-alert" *ngIf="infoMessage">\n\t\t\t<div class="alert alert-success">{{ infoMessage }}</div>\n\t\t</div>\n\n\t\t\t<div class="ai-terminal-messages" #messageScroll>\n\t\t\t\t<div class="ai-terminal-empty" *ngIf="!messages.length">\n\t\t\t\t\t<div class="ai-terminal-favorites" *ngIf="promptFavorites.length">\n\t\t\t\t\t\t<p class="ai-terminal-empty-title">Favorites</p>\n\t\t\t\t\t\t<div class="ai-terminal-favorite-list">\n\t\t\t\t\t\t\t<div class="ai-terminal-favorite-item" *ngFor="let prompt of promptFavorites; trackBy: trackByFavoritePrompt">\n\t\t\t\t\t\t\t\t<button type="button" class="ai-terminal-favorite-run" (click)="runFavoritePrompt(prompt)">\n\t\t\t\t\t\t\t\t\t<span class="ai-terminal-favorite-run-star">★</span>\n\t\t\t\t\t\t\t\t\t<span class="ai-terminal-favorite-run-text">{{ prompt }}</span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t\t\t\tclass="ai-terminal-favorite-remove"\n\t\t\t\t\t\t\t\t\t(click)="removeFavoritePrompt(prompt, $event)"\n\t\t\t\t\t\t\t\t\taria-label="Remove favorite prompt">\n\t\t\t\t\t\t\t\t\t×\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p class="ai-terminal-empty-title">Try one of these to get started:</p>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>How do I get to the invoice report?</li>\n\t\t\t\t\t\t<li>Where is the setting for <feature>?</li>\n\t\t\t\t\t\t<li>Give me a checklist for <task>.</li>\n\t\t\t\t\t<li>Explain what this screen does and the fields I need.</li>\n\t\t\t\t\t<li>Flag anomalies in inventory for the last 3 months.</li>\n\t\t\t\t\t<li>Summarize invoice totals for <client> over the last <X> months.</li>\n\t\t\t\t\t<li>Show trends in invoice volume and average value for <client> over the past 6 months.</li>\n\t\t\t\t\t<li>List top 5 variance items in inventory counts this quarter.</li>\n\t\t\t\t\t<li>Help me fill out this form using data I paste (e.g., from Excel).</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message"\n\t\t\t\t\t*ngFor="let message of filteredMessages(); trackBy: trackByMessage"\n\t\t\t\t\t[class.user]="message.role === \'user\'"\n\t\t\t\t\t[class.assistant]="message.role === \'assistant\'"\n\t\t\t\t\t[class.pending]="message.metadata?.pending"\n\t\t\t\t\t[class.tool]="message.role === \'tool\'">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\tclass="ai-terminal-message-favorite-toggle"\n\t\t\t\t\t\t*ngIf="canToggleFavoriteForMessage(message)"\n\t\t\t\t\t\t[class.is-active]="isMessagePromptFavorited(message)"\n\t\t\t\t\t\t(click)="toggleMessagePromptFavorite(message, $event)"\n\t\t\t\t\t\t[attr.aria-pressed]="isMessagePromptFavorited(message)"\n\t\t\t\t\t\t[attr.title]="isMessagePromptFavorited(message) ? \'Remove prompt favorite\' : \'Save prompt favorite\'"\n\t\t\t\t\t\t[attr.aria-label]="isMessagePromptFavorited(message) ? \'Remove prompt favorite\' : \'Save prompt favorite\'">\n\t\t\t\t\t\t{{ isMessagePromptFavorited(message) ? \'★\' : \'☆\' }}\n\t\t\t\t\t</button>\n\t\t\t\t\t<div class="ai-terminal-message-role">{{ message.role }}</div>\n\t\t\t\t<ng-container *ngIf="pendingProgress(message) as progress; else messageBody">\n\t\t\t\t\t<div class="ai-terminal-message-progress">\n\t\t\t\t\t\t<ul class="ai-terminal-progress-list">\n\t\t\t\t\t\t\t<li class="ai-terminal-progress-item" *ngFor="let item of progress">{{ item }}</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-template #messageBody>\n\t\t\t\t\t<div class="ai-terminal-message-body" [innerHTML]="messageMarkdown(message) | safe:\'html\'"></div>\n\t\t\t\t</ng-template>\n\t\t\t\t<div class="ai-terminal-message-table" *ngIf="displayTableForMessage(message) as display">\n\t\t\t\t\t<div class="ai-terminal-table-meta">\n\t\t\t\t\t\t<span>Preview: {{ display.rows?.length || 0 }} rows</span>\n\t\t\t\t\t\t<span *ngIf="display.total !== undefined && display.total !== null">Total: {{ display.total }}</span>\n\t\t\t\t\t\t<span *ngIf="display.truncated">Truncated</span>\n\t\t\t\t\t\t<span class="ai-terminal-table-meta-spacer"></span>\n\t\t\t\t\t\t<span class="ai-terminal-table-tz">Timezone: {{ timeZoneLabel }}</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t\tclass="btn btn-link btn-sm ai-terminal-table-export"\n\t\t\t\t\t\t\t*ngIf="canExportMessage(message)"\n\t\t\t\t\t\t\t[disabled]="isExportingMessage(message)"\n\t\t\t\t\t\t\t(click)="exportMessageTable(message)">\n\t\t\t\t\t\t\t{{ isExportingMessage(message) ? \'Exporting...\' : \'Export\' }}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button type="button" class="btn btn-link btn-sm ai-terminal-table-toggle" (click)="toggleTable(message)">\n\t\t\t\t\t\t\t{{ isTableCollapsed(message) ? \'Show Table\' : \'Hide Table\' }}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ai-terminal-table-wrap" *ngIf="!isTableCollapsed(message)">\n\t\t\t\t\t\t<collapse-table>\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th *ngFor="let column of display.columns">{{ column }}</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr *ngFor="let row of display.rows">\n\t\t\t\t\t\t\t\t\t<td *ngFor="let column of display.columns">{{ formatDisplayCell(row[column], column) }}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</collapse-table>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-debug" *ngIf="showDebugForMessage(message)">\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm ai-terminal-debug-toggle" (click)="toggleDebug(message)">\n\t\t\t\t\t\t{{ isDebugCollapsed(message) ? \'Show Debug\' : \'Hide Debug\' }}\n\t\t\t\t\t</button>\n\t\t\t\t\t<pre class="ai-terminal-debug-body" *ngIf="!isDebugCollapsed(message)">{{ debugText(message) }}</pre>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-actions" *ngIf="canCopyMessage(message)">\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm ai-terminal-copy-btn" (click)="copyMessage(message)">\n\t\t\t\t\t\t<i class="fa fa-copy" aria-hidden="true"></i>\n\t\t\t\t\t\tCopy\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-meta" *ngIf="showAdvanced() && message.usage?.total_tokens">\n\t\t\t\t\tTokens: {{ message.usage?.total_tokens | number }}\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-attachments" *ngIf="message.attachments?.length">\n\t\t\t\t\t<div class="ai-terminal-attachment" *ngFor="let attachment of message.attachments">\n\t\t\t\t\t\t<span>{{ attachment.name }}</span>\n\t\t\t\t\t\t<span class="ai-terminal-muted">{{ formatFileSize(attachment.size) }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="ai-terminal-composer">\n\t\t\t\t<div class="ai-terminal-composer-input-wrap">\n\t\t\t\t\t<textarea\n\t\t\t\t\t\tclass="form-control ai-terminal-composer-input"\n\t\t\t\t\t\trows="2"\n\t\t\t\t\t\t[placeholder]="placeholder"\n\t\t\t\t\t\t(keydown)="handleComposerKeydown($event)"\n\t\t\t\t\t\t[(ngModel)]="messageText"></textarea>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\tclass="ai-terminal-composer-favorite-toggle"\n\t\t\t\t\t\t[class.is-active]="promptFavoriteEnabled"\n\t\t\t\t\t\t[disabled]="isSending"\n\t\t\t\t\t\t(click)="togglePromptFavorite()"\n\t\t\t\t\t\t[attr.aria-pressed]="promptFavoriteEnabled"\n\t\t\t\t\t\t[attr.title]="promptFavoriteEnabled ? \'Favorite enabled for next prompt\' : \'Favorite this next prompt\'"\n\t\t\t\t\t\t[attr.aria-label]="promptFavoriteEnabled ? \'Favorite enabled for next prompt\' : \'Favorite this next prompt\'">\n\t\t\t\t\t\t{{ promptFavoriteEnabled ? \'★\' : \'☆\' }}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\n\t\t\t\t<div class="ai-terminal-composer-row">\n\t\t\t\t\t<div class="ai-terminal-upload" *ngIf="allowUploads()">\n\t\t\t\t\t\t<input type="file" class="form-control" multiple (change)="handleFileSelect($event)">\n\t\t\t\t\t<small class="ai-terminal-muted">Max {{ maxFileMb() }}MB per file • {{ maxTotalMb() }}MB total</small>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-actions">\n\t\t\t\t\t<button type="button" class="btn btn-outline-secondary" (click)="clearComposer()" [disabled]="isSending">Clear</button>\n\t\t\t\t\t<button type="button" class="btn btn-primary" (click)="sendMessage()" [disabled]="isSending || !messageText.trim()">\n\t\t\t\t\t\t{{ isSending ? \'Sending...\' : \'Send\' }}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="ai-terminal-pending" *ngIf="pendingFiles.length">\n\t\t\t\t<div class="ai-terminal-pending-title">Attachments</div>\n\t\t\t\t<div class="ai-terminal-pending-item" *ngFor="let file of pendingFiles; let i = index">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<strong>{{ file.name }}</strong>\n\t\t\t\t\t\t<span class="ai-terminal-muted">{{ formatFileSize(file.size) }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm text-danger" (click)="removePendingFile(i)">Remove</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',styles:[".ai-terminal-shell{display:grid;grid-template-columns:280px minmax(0,1fr);gap:1rem;align-items:stretch}.ai-terminal-shell.single-conversation{grid-template-columns:minmax(0,1fr)}.ai-terminal-sidebar,.ai-terminal-main{background:#fff;border:1px solid rgba(148,163,184,.25);border-radius:14px;box-shadow:0 10px 24px #0f172a0f}.ai-terminal-sidebar{display:flex;flex-direction:column;padding:.75rem;min-height:500px}.ai-terminal-sidebar-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding-bottom:.5rem;border-bottom:1px solid rgba(148,163,184,.2)}.ai-terminal-sidebar-header h5{font-size:1rem;margin:0}.ai-terminal-sidebar-body{flex:1;overflow:auto;padding-top:.5rem;font-size:.85rem}.ai-terminal-main{display:flex;flex-direction:column;padding:.75rem;min-height:500px}.ai-terminal-main-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding-bottom:.5rem;border-bottom:1px solid rgba(148,163,184,.2)}.ai-terminal-main-header h4{font-size:1.15rem;margin:0}.ai-terminal-main-actions{display:flex;gap:.5rem;align-items:center}.ai-terminal-meta-row{display:flex;gap:.75rem;font-size:.72rem;color:#64748b}.ai-terminal-muted{color:#64748b;font-size:.72rem;margin:0}.ai-terminal-conversation{border:1px solid transparent;border-radius:12px;padding:.6rem .7rem;margin-bottom:.5rem;background:#f8fafc;transition:border-color .2s ease,box-shadow .2s ease}.ai-terminal-conversation.is-active{border-color:#3b82f699;box-shadow:0 6px 14px #3b82f626;background:#eff6ff}.ai-terminal-conversation-main{cursor:pointer}.ai-terminal-conversation-title{font-weight:600;font-size:.85rem;margin-bottom:.35rem;color:#0f172a}.ai-terminal-conversation-meta{display:flex;gap:.5rem;font-size:.75rem;color:#64748b}.ai-terminal-conversation-actions{display:flex;justify-content:space-between;margin-top:.4rem}.ai-terminal-inline-actions{display:flex;gap:.35rem;margin-top:.4rem}.ai-terminal-conversation-edit input{margin-bottom:.4rem}.ai-terminal-alert{margin-top:.5rem}.ai-terminal-messages{flex:1;overflow-y:auto;padding:.75rem .25rem;display:flex;flex-direction:column;gap:.75rem}.ai-terminal-message{position:relative;padding:.75rem .85rem;border-radius:14px;background:#f8fafc;border:1px solid rgba(148,163,184,.2)}.ai-terminal-message-favorite-toggle{position:absolute;top:.45rem;right:.55rem;border:0;background:transparent;color:#94a3b8e6;font-size:1.05rem;line-height:1;padding:0;width:1.35rem;height:1.35rem;display:inline-flex;align-items:center;justify-content:center}.ai-terminal-message-favorite-toggle:hover{color:#f59e0be6}.ai-terminal-message-favorite-toggle.is-active{color:#d4a017;text-shadow:0 0 10px rgba(245,158,11,.25)}.ai-terminal-message.user{background:#e0f2fe;border-color:#0ea5e94d}.ai-terminal-message.assistant{background:#f1f5f9}.ai-terminal-message.pending{border-style:dashed;border-color:#94a3b873;background:#f8fafc}.ai-terminal-message.pending .ai-terminal-message-body{letter-spacing:.2em;font-weight:600;animation:ai-terminal-thinking 1.2s ease-in-out infinite;color:#64748b}.ai-terminal-message-progress{color:#334155;font-size:.78rem}.ai-terminal-progress-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.ai-terminal-progress-item{display:inline-flex;align-self:flex-start;padding:.2rem .6rem;border-radius:999px;background:#94a3b833;color:#334155;font-weight:600;font-size:.85rem}.ai-terminal-message.tool{background:#fef3c7;border-color:#f59e0b66}.ai-terminal-message-role{font-size:.7rem;letter-spacing:.05em;text-transform:uppercase;color:#64748b;margin-bottom:.35rem}.ai-terminal-message-body{color:#0f172a;white-space:normal;line-height:1.6;font-size:.82rem}.ai-terminal-message-body p{margin:0 0 .35rem}.ai-terminal-message.user .ai-terminal-message-body p{margin:0}.ai-terminal-message-body p:last-child{margin-bottom:0}.ai-terminal-message-body ul,.ai-terminal-message-body ol{margin:.35rem 0 .6rem 1.4rem;padding:0}.ai-terminal-message-body h1,.ai-terminal-message-body h2,.ai-terminal-message-body h3,.ai-terminal-message-body h4,.ai-terminal-message-body h5,.ai-terminal-message-body h6{margin:0 0 .5rem;font-weight:600}.ai-terminal-message-body code{background:#94a3b833;border-radius:4px;padding:.1rem .3rem;font-size:.85em}.ai-terminal-route-link{color:#2563eb;text-decoration:underline;cursor:pointer}.ai-terminal-route-link:hover{color:#1d4ed8}.ai-terminal-message-meta{margin-top:.35rem;font-size:.68rem;color:#64748b}.ai-terminal-message-actions{margin-top:.35rem;display:flex;justify-content:flex-end}.ai-terminal-copy-btn{padding:0;font-weight:600;color:#2563eb;display:inline-flex;align-items:center;gap:.35rem}.ai-terminal-copy-btn:hover{color:#1d4ed8}.ai-terminal-message-table{margin-top:.6rem}.ai-terminal-table-meta{display:flex;flex-wrap:wrap;gap:.75rem;font-size:.75rem;color:#64748b;margin-bottom:.35rem;align-items:center}.ai-terminal-table-meta-spacer{flex:1 1 auto}.ai-terminal-table-tz{font-weight:600}.ai-terminal-table-toggle,.ai-terminal-table-export{padding:0;font-weight:600}.ai-terminal-message-debug{margin-top:.5rem}.ai-terminal-debug-toggle{padding:0;font-weight:600}.ai-terminal-debug-body{margin:.35rem 0 0;padding:.5rem .75rem;background:#0f172a;color:#e2e8f0;border-radius:8px;font-size:.75rem;white-space:pre-wrap;word-break:break-word}.ai-terminal-table-wrap{width:100%;overflow-x:auto}.ai-terminal-table-wrap collapse-table{display:block;width:100%}.ai-terminal-table{width:100%;border-collapse:collapse;font-size:.78rem}.ai-terminal-table th,.ai-terminal-table td{border:1px solid rgba(148,163,184,.3);padding:.35rem .5rem;vertical-align:top;white-space:nowrap}.ai-terminal-table thead{background:#94a3b826}.ai-terminal-table tbody tr:nth-child(2n){background:#94a3b814}.ai-terminal-message-attachments{margin-top:.5rem;border-top:1px dashed rgba(148,163,184,.4);padding-top:.4rem}.ai-terminal-attachment{display:flex;justify-content:space-between;font-size:.8rem}.ai-terminal-composer{border-top:1px solid rgba(148,163,184,.2);padding-top:.75rem;display:flex;flex-direction:column;gap:.6rem}.ai-terminal-composer-input-wrap{position:relative}.ai-terminal-composer-input{min-height:60px;padding:.85rem 2.7rem .85rem 1rem;border-radius:16px;border:1px solid rgba(234,179,8,.45);background:#fff7cc;box-shadow:0 10px 20px #eab3081f;font-size:.95rem;transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease;resize:vertical}.ai-terminal-composer-input:focus{border-color:#f59e0bbf;background:#fff3b0;box-shadow:0 0 0 3px #fbbf2459,0 12px 24px #eab30833}.ai-terminal-composer-favorite-toggle{position:absolute;top:.45rem;right:.55rem;border:0;background:transparent;color:#94a3b8e6;font-size:1.15rem;line-height:1;padding:0;width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center}.ai-terminal-composer-favorite-toggle:hover{color:#f59e0be6}.ai-terminal-composer-favorite-toggle.is-active{color:#d4a017;text-shadow:0 0 10px rgba(245,158,11,.25)}.ai-terminal-composer-row{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap}.ai-terminal-upload{flex:1;min-width:220px}.ai-terminal-actions{display:flex;gap:.5rem;align-items:center}.ai-terminal-pending{background:#f8fafc;border:1px dashed rgba(148,163,184,.4);border-radius:12px;padding:.6rem .75rem}.ai-terminal-pending-title{font-size:.8rem;text-transform:uppercase;letter-spacing:.05em;color:#64748b;margin-bottom:.4rem}.ai-terminal-pending-item{display:flex;justify-content:space-between;align-items:center;border-top:1px solid rgba(148,163,184,.2);padding-top:.4rem;margin-top:.4rem}.ai-terminal-empty-title{margin:0 0 .45rem;color:#64748b;font-size:.78rem;font-weight:600}.ai-terminal-favorites{margin-bottom:.9rem;padding:.6rem;border:1px solid rgba(148,163,184,.24);border-radius:12px;background:#f8fafc}.ai-terminal-favorite-list{display:flex;flex-direction:column;gap:.4rem}.ai-terminal-favorite-item{display:flex;align-items:center;gap:.4rem}.ai-terminal-favorite-run{flex:1;display:inline-flex;align-items:center;gap:.5rem;border:1px solid rgba(148,163,184,.3);border-radius:10px;padding:.45rem .55rem;background:#fff;color:#0f172a;font-size:.78rem;line-height:1.2;text-align:left;transition:border-color .2s ease,background-color .2s ease}.ai-terminal-favorite-run:hover{border-color:#f59e0bbf;background:#fffbeb}.ai-terminal-favorite-run-star{color:#d4a017;font-size:.86rem;line-height:1}.ai-terminal-favorite-run-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai-terminal-favorite-remove{border:1px solid rgba(148,163,184,.3);border-radius:10px;background:#fff;color:#b91c1c;width:2rem;height:2rem;font-size:1rem;line-height:1;padding:0;display:inline-flex;align-items:center;justify-content:center}.ai-terminal-empty{color:#94a3b8;font-size:.78rem;padding:.5rem .2rem}@keyframes ai-terminal-thinking{0%{opacity:.35}50%{opacity:1}to{opacity:.35}}@media(max-width:980px){.ai-terminal-shell{grid-template-columns:1fr}}\n"],dependencies:[{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"component",type:CollapseTableComponent,selector:"collapse-table",inputs:["collapseSize","tableFixed","headerFixed","secondaryColor","tertiaryColor"]},{kind:"directive",type:i7.NgForOf,selector:"[ngFor][ngForOf]",inputs:["ngForOf","ngForTrackBy","ngForTemplate"]},{kind:"directive",type:i7.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{kind:"pipe",type:DomSanitizorPipe,name:"safe"},{kind:"pipe",type:i7.DecimalPipe,name:"number"},{kind:"pipe",type:i7.DatePipe,name:"date"}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalComponent,decorators:[{type:Component,args:[{selector:"rio-ai-terminal",providers:[ProviderService,AiTerminalService,AiPageFormAdapterService],standalone:!1,template:'<div class="ai-terminal-shell" [class.single-conversation]="singleConversation">\n\t<div class="ai-terminal-sidebar" *ngIf="!singleConversation">\n\t\t<div class="ai-terminal-sidebar-header">\n\t\t\t<div>\n\t\t\t\t<h5>{{ title }}</h5>\n\t\t\t\t<p class="ai-terminal-muted" *ngIf="idApp">App: {{ idApp }}</p>\n\t\t\t</div>\n\t\t\t<button type="button" class="btn btn-sm btn-primary" (click)="createConversation()">New Chat</button>\n\t\t</div>\n\n\t\t<div class="ai-terminal-sidebar-body">\n\t\t\t<div class="ai-terminal-empty" *ngIf="isLoading">Loading conversations...</div>\n\t\t\t<div class="ai-terminal-empty" *ngIf="!isLoading && !conversations.length">No conversations yet.</div>\n\n\t\t\t<div class="ai-terminal-conversation"\n\t\t\t\t*ngFor="let conversation of conversations; trackBy: trackByConversation"\n\t\t\t\t[class.is-active]="conversation._id === activeConversationId">\n\t\t\t\t<div class="ai-terminal-conversation-main" (click)="setActiveConversation(conversation)">\n\t\t\t\t\t<div class="ai-terminal-conversation-title" *ngIf="editingConversationId !== conversation._id">\n\t\t\t\t\t\t{{ conversation.title && conversation.title !== \'New Conversation\' ? conversation.title : \'Ask AI About the System\' }}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ai-terminal-conversation-edit" *ngIf="editingConversationId === conversation._id">\n\t\t\t\t\t\t<input type="text" class="form-control form-control-sm" [(ngModel)]="editingTitle"\n\t\t\t\t\t\t\t(keyup.enter)="saveRename(conversation)" (keyup.escape)="cancelRename()">\n\t\t\t\t\t\t<div class="ai-terminal-inline-actions">\n\t\t\t\t\t\t\t<button type="button" class="btn btn-sm btn-primary" (click)="saveRename(conversation)">Save</button>\n\t\t\t\t\t\t\t<button type="button" class="btn btn-sm btn-outline-secondary" (click)="cancelRename()">Cancel</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ai-terminal-conversation-meta">\n\t\t\t\t\t\t<span *ngIf="conversation.updatedAt">{{ conversation.updatedAt | date: \'short\' }}</span>\n\t\t\t\t\t\t<span *ngIf="conversation.branch_name && isCodexMode()">{{ conversation.branch_name }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-conversation-actions" *ngIf="editingConversationId !== conversation._id">\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm" (click)="startRename(conversation)">Rename</button>\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm text-danger ai-terminal-delete-btn" (click)="deleteConversation(conversation)">Delete</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<div class="ai-terminal-main">\n\t\t<div class="ai-terminal-main-header">\n\t\t\t<div>\n\t\t\t\t<h4>{{ activeConversation?.title && activeConversation?.title !== \'New Conversation\' ? activeConversation?.title : \'Ask AI About the System\' }}</h4>\n\t\t\t\t<div class="ai-terminal-meta-row">\n\t\t\t\t\t<span *ngIf="activeConversation?.branch_name && isCodexMode()">Branch: {{ activeConversation?.branch_name }}</span>\n\t\t\t\t\t<span *ngIf="showAdvanced() && totalTokens()">Tokens: {{ totalTokens() | number }}</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="ai-terminal-main-actions">\n\t\t\t\t<button type="button" class="btn btn-sm btn-outline-secondary"\n\t\t\t\t\t*ngIf="singleConversation"\n\t\t\t\t\t(click)="startNewConversation()" [disabled]="isSending">\n\t\t\t\t\tNew Conversation\n\t\t\t\t</button>\n\t\t\t\t<button type="button" class="btn btn-sm btn-outline-primary"\n\t\t\t\t\t*ngIf="isCodexMode() && activeConversation?.branch_name"\n\t\t\t\t\t(click)="deployTest()" [disabled]="isDeployingTest">\n\t\t\t\t\t{{ isDeployingTest ? \'Deploying...\' : \'Deploy to Test\' }}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class="ai-terminal-alert" *ngIf="errorMessage">\n\t\t\t<div class="alert alert-danger">{{ errorMessage }}</div>\n\t\t</div>\n\t\t<div class="ai-terminal-alert" *ngIf="infoMessage">\n\t\t\t<div class="alert alert-success">{{ infoMessage }}</div>\n\t\t</div>\n\n\t\t\t<div class="ai-terminal-messages" #messageScroll>\n\t\t\t\t<div class="ai-terminal-empty" *ngIf="!messages.length">\n\t\t\t\t\t<div class="ai-terminal-favorites" *ngIf="promptFavorites.length">\n\t\t\t\t\t\t<p class="ai-terminal-empty-title">Favorites</p>\n\t\t\t\t\t\t<div class="ai-terminal-favorite-list">\n\t\t\t\t\t\t\t<div class="ai-terminal-favorite-item" *ngFor="let prompt of promptFavorites; trackBy: trackByFavoritePrompt">\n\t\t\t\t\t\t\t\t<button type="button" class="ai-terminal-favorite-run" (click)="runFavoritePrompt(prompt)">\n\t\t\t\t\t\t\t\t\t<span class="ai-terminal-favorite-run-star">★</span>\n\t\t\t\t\t\t\t\t\t<span class="ai-terminal-favorite-run-text">{{ prompt }}</span>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t\t\t\tclass="ai-terminal-favorite-remove"\n\t\t\t\t\t\t\t\t\t(click)="removeFavoritePrompt(prompt, $event)"\n\t\t\t\t\t\t\t\t\taria-label="Remove favorite prompt">\n\t\t\t\t\t\t\t\t\t×\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p class="ai-terminal-empty-title">Try one of these to get started:</p>\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li>How do I get to the invoice report?</li>\n\t\t\t\t\t\t<li>Where is the setting for <feature>?</li>\n\t\t\t\t\t\t<li>Give me a checklist for <task>.</li>\n\t\t\t\t\t<li>Explain what this screen does and the fields I need.</li>\n\t\t\t\t\t<li>Flag anomalies in inventory for the last 3 months.</li>\n\t\t\t\t\t<li>Summarize invoice totals for <client> over the last <X> months.</li>\n\t\t\t\t\t<li>Show trends in invoice volume and average value for <client> over the past 6 months.</li>\n\t\t\t\t\t<li>List top 5 variance items in inventory counts this quarter.</li>\n\t\t\t\t\t<li>Help me fill out this form using data I paste (e.g., from Excel).</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message"\n\t\t\t\t\t*ngFor="let message of filteredMessages(); trackBy: trackByMessage"\n\t\t\t\t\t[class.user]="message.role === \'user\'"\n\t\t\t\t\t[class.assistant]="message.role === \'assistant\'"\n\t\t\t\t\t[class.pending]="message.metadata?.pending"\n\t\t\t\t\t[class.tool]="message.role === \'tool\'">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\tclass="ai-terminal-message-favorite-toggle"\n\t\t\t\t\t\t*ngIf="canToggleFavoriteForMessage(message)"\n\t\t\t\t\t\t[class.is-active]="isMessagePromptFavorited(message)"\n\t\t\t\t\t\t(click)="toggleMessagePromptFavorite(message, $event)"\n\t\t\t\t\t\t[attr.aria-pressed]="isMessagePromptFavorited(message)"\n\t\t\t\t\t\t[attr.title]="isMessagePromptFavorited(message) ? \'Remove prompt favorite\' : \'Save prompt favorite\'"\n\t\t\t\t\t\t[attr.aria-label]="isMessagePromptFavorited(message) ? \'Remove prompt favorite\' : \'Save prompt favorite\'">\n\t\t\t\t\t\t{{ isMessagePromptFavorited(message) ? \'★\' : \'☆\' }}\n\t\t\t\t\t</button>\n\t\t\t\t\t<div class="ai-terminal-message-role">{{ message.role }}</div>\n\t\t\t\t<ng-container *ngIf="pendingProgress(message) as progress; else messageBody">\n\t\t\t\t\t<div class="ai-terminal-message-progress">\n\t\t\t\t\t\t<ul class="ai-terminal-progress-list">\n\t\t\t\t\t\t\t<li class="ai-terminal-progress-item" *ngFor="let item of progress">{{ item }}</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</ng-container>\n\t\t\t\t<ng-template #messageBody>\n\t\t\t\t\t<div class="ai-terminal-message-body" [innerHTML]="messageMarkdown(message) | safe:\'html\'"></div>\n\t\t\t\t</ng-template>\n\t\t\t\t<div class="ai-terminal-message-table" *ngIf="displayTableForMessage(message) as display">\n\t\t\t\t\t<div class="ai-terminal-table-meta">\n\t\t\t\t\t\t<span>Preview: {{ display.rows?.length || 0 }} rows</span>\n\t\t\t\t\t\t<span *ngIf="display.total !== undefined && display.total !== null">Total: {{ display.total }}</span>\n\t\t\t\t\t\t<span *ngIf="display.truncated">Truncated</span>\n\t\t\t\t\t\t<span class="ai-terminal-table-meta-spacer"></span>\n\t\t\t\t\t\t<span class="ai-terminal-table-tz">Timezone: {{ timeZoneLabel }}</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\t\tclass="btn btn-link btn-sm ai-terminal-table-export"\n\t\t\t\t\t\t\t*ngIf="canExportMessage(message)"\n\t\t\t\t\t\t\t[disabled]="isExportingMessage(message)"\n\t\t\t\t\t\t\t(click)="exportMessageTable(message)">\n\t\t\t\t\t\t\t{{ isExportingMessage(message) ? \'Exporting...\' : \'Export\' }}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button type="button" class="btn btn-link btn-sm ai-terminal-table-toggle" (click)="toggleTable(message)">\n\t\t\t\t\t\t\t{{ isTableCollapsed(message) ? \'Show Table\' : \'Hide Table\' }}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="ai-terminal-table-wrap" *ngIf="!isTableCollapsed(message)">\n\t\t\t\t\t\t<collapse-table>\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th *ngFor="let column of display.columns">{{ column }}</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr *ngFor="let row of display.rows">\n\t\t\t\t\t\t\t\t\t<td *ngFor="let column of display.columns">{{ formatDisplayCell(row[column], column) }}</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</collapse-table>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-debug" *ngIf="showDebugForMessage(message)">\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm ai-terminal-debug-toggle" (click)="toggleDebug(message)">\n\t\t\t\t\t\t{{ isDebugCollapsed(message) ? \'Show Debug\' : \'Hide Debug\' }}\n\t\t\t\t\t</button>\n\t\t\t\t\t<pre class="ai-terminal-debug-body" *ngIf="!isDebugCollapsed(message)">{{ debugText(message) }}</pre>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-actions" *ngIf="canCopyMessage(message)">\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm ai-terminal-copy-btn" (click)="copyMessage(message)">\n\t\t\t\t\t\t<i class="fa fa-copy" aria-hidden="true"></i>\n\t\t\t\t\t\tCopy\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-meta" *ngIf="showAdvanced() && message.usage?.total_tokens">\n\t\t\t\t\tTokens: {{ message.usage?.total_tokens | number }}\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-message-attachments" *ngIf="message.attachments?.length">\n\t\t\t\t\t<div class="ai-terminal-attachment" *ngFor="let attachment of message.attachments">\n\t\t\t\t\t\t<span>{{ attachment.name }}</span>\n\t\t\t\t\t\t<span class="ai-terminal-muted">{{ formatFileSize(attachment.size) }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="ai-terminal-composer">\n\t\t\t\t<div class="ai-terminal-composer-input-wrap">\n\t\t\t\t\t<textarea\n\t\t\t\t\t\tclass="form-control ai-terminal-composer-input"\n\t\t\t\t\t\trows="2"\n\t\t\t\t\t\t[placeholder]="placeholder"\n\t\t\t\t\t\t(keydown)="handleComposerKeydown($event)"\n\t\t\t\t\t\t[(ngModel)]="messageText"></textarea>\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype="button"\n\t\t\t\t\t\tclass="ai-terminal-composer-favorite-toggle"\n\t\t\t\t\t\t[class.is-active]="promptFavoriteEnabled"\n\t\t\t\t\t\t[disabled]="isSending"\n\t\t\t\t\t\t(click)="togglePromptFavorite()"\n\t\t\t\t\t\t[attr.aria-pressed]="promptFavoriteEnabled"\n\t\t\t\t\t\t[attr.title]="promptFavoriteEnabled ? \'Favorite enabled for next prompt\' : \'Favorite this next prompt\'"\n\t\t\t\t\t\t[attr.aria-label]="promptFavoriteEnabled ? \'Favorite enabled for next prompt\' : \'Favorite this next prompt\'">\n\t\t\t\t\t\t{{ promptFavoriteEnabled ? \'★\' : \'☆\' }}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\n\t\t\t\t<div class="ai-terminal-composer-row">\n\t\t\t\t\t<div class="ai-terminal-upload" *ngIf="allowUploads()">\n\t\t\t\t\t\t<input type="file" class="form-control" multiple (change)="handleFileSelect($event)">\n\t\t\t\t\t<small class="ai-terminal-muted">Max {{ maxFileMb() }}MB per file • {{ maxTotalMb() }}MB total</small>\n\t\t\t\t</div>\n\t\t\t\t<div class="ai-terminal-actions">\n\t\t\t\t\t<button type="button" class="btn btn-outline-secondary" (click)="clearComposer()" [disabled]="isSending">Clear</button>\n\t\t\t\t\t<button type="button" class="btn btn-primary" (click)="sendMessage()" [disabled]="isSending || !messageText.trim()">\n\t\t\t\t\t\t{{ isSending ? \'Sending...\' : \'Send\' }}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="ai-terminal-pending" *ngIf="pendingFiles.length">\n\t\t\t\t<div class="ai-terminal-pending-title">Attachments</div>\n\t\t\t\t<div class="ai-terminal-pending-item" *ngFor="let file of pendingFiles; let i = index">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<strong>{{ file.name }}</strong>\n\t\t\t\t\t\t<span class="ai-terminal-muted">{{ formatFileSize(file.size) }}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<button type="button" class="btn btn-link btn-sm text-danger" (click)="removePendingFile(i)">Remove</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',styles:[".ai-terminal-shell{display:grid;grid-template-columns:280px minmax(0,1fr);gap:1rem;align-items:stretch}.ai-terminal-shell.single-conversation{grid-template-columns:minmax(0,1fr)}.ai-terminal-sidebar,.ai-terminal-main{background:#fff;border:1px solid rgba(148,163,184,.25);border-radius:14px;box-shadow:0 10px 24px #0f172a0f}.ai-terminal-sidebar{display:flex;flex-direction:column;padding:.75rem;min-height:500px}.ai-terminal-sidebar-header{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding-bottom:.5rem;border-bottom:1px solid rgba(148,163,184,.2)}.ai-terminal-sidebar-header h5{font-size:1rem;margin:0}.ai-terminal-sidebar-body{flex:1;overflow:auto;padding-top:.5rem;font-size:.85rem}.ai-terminal-main{display:flex;flex-direction:column;padding:.75rem;min-height:500px}.ai-terminal-main-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding-bottom:.5rem;border-bottom:1px solid rgba(148,163,184,.2)}.ai-terminal-main-header h4{font-size:1.15rem;margin:0}.ai-terminal-main-actions{display:flex;gap:.5rem;align-items:center}.ai-terminal-meta-row{display:flex;gap:.75rem;font-size:.72rem;color:#64748b}.ai-terminal-muted{color:#64748b;font-size:.72rem;margin:0}.ai-terminal-conversation{border:1px solid transparent;border-radius:12px;padding:.6rem .7rem;margin-bottom:.5rem;background:#f8fafc;transition:border-color .2s ease,box-shadow .2s ease}.ai-terminal-conversation.is-active{border-color:#3b82f699;box-shadow:0 6px 14px #3b82f626;background:#eff6ff}.ai-terminal-conversation-main{cursor:pointer}.ai-terminal-conversation-title{font-weight:600;font-size:.85rem;margin-bottom:.35rem;color:#0f172a}.ai-terminal-conversation-meta{display:flex;gap:.5rem;font-size:.75rem;color:#64748b}.ai-terminal-conversation-actions{display:flex;justify-content:space-between;margin-top:.4rem}.ai-terminal-inline-actions{display:flex;gap:.35rem;margin-top:.4rem}.ai-terminal-conversation-edit input{margin-bottom:.4rem}.ai-terminal-alert{margin-top:.5rem}.ai-terminal-messages{flex:1;overflow-y:auto;padding:.75rem .25rem;display:flex;flex-direction:column;gap:.75rem}.ai-terminal-message{position:relative;padding:.75rem .85rem;border-radius:14px;background:#f8fafc;border:1px solid rgba(148,163,184,.2)}.ai-terminal-message-favorite-toggle{position:absolute;top:.45rem;right:.55rem;border:0;background:transparent;color:#94a3b8e6;font-size:1.05rem;line-height:1;padding:0;width:1.35rem;height:1.35rem;display:inline-flex;align-items:center;justify-content:center}.ai-terminal-message-favorite-toggle:hover{color:#f59e0be6}.ai-terminal-message-favorite-toggle.is-active{color:#d4a017;text-shadow:0 0 10px rgba(245,158,11,.25)}.ai-terminal-message.user{background:#e0f2fe;border-color:#0ea5e94d}.ai-terminal-message.assistant{background:#f1f5f9}.ai-terminal-message.pending{border-style:dashed;border-color:#94a3b873;background:#f8fafc}.ai-terminal-message.pending .ai-terminal-message-body{letter-spacing:.2em;font-weight:600;animation:ai-terminal-thinking 1.2s ease-in-out infinite;color:#64748b}.ai-terminal-message-progress{color:#334155;font-size:.78rem}.ai-terminal-progress-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.ai-terminal-progress-item{display:inline-flex;align-self:flex-start;padding:.2rem .6rem;border-radius:999px;background:#94a3b833;color:#334155;font-weight:600;font-size:.85rem}.ai-terminal-message.tool{background:#fef3c7;border-color:#f59e0b66}.ai-terminal-message-role{font-size:.7rem;letter-spacing:.05em;text-transform:uppercase;color:#64748b;margin-bottom:.35rem}.ai-terminal-message-body{color:#0f172a;white-space:normal;line-height:1.6;font-size:.82rem}.ai-terminal-message-body p{margin:0 0 .35rem}.ai-terminal-message.user .ai-terminal-message-body p{margin:0}.ai-terminal-message-body p:last-child{margin-bottom:0}.ai-terminal-message-body ul,.ai-terminal-message-body ol{margin:.35rem 0 .6rem 1.4rem;padding:0}.ai-terminal-message-body h1,.ai-terminal-message-body h2,.ai-terminal-message-body h3,.ai-terminal-message-body h4,.ai-terminal-message-body h5,.ai-terminal-message-body h6{margin:0 0 .5rem;font-weight:600}.ai-terminal-message-body code{background:#94a3b833;border-radius:4px;padding:.1rem .3rem;font-size:.85em}.ai-terminal-route-link{color:#2563eb;text-decoration:underline;cursor:pointer}.ai-terminal-route-link:hover{color:#1d4ed8}.ai-terminal-message-meta{margin-top:.35rem;font-size:.68rem;color:#64748b}.ai-terminal-message-actions{margin-top:.35rem;display:flex;justify-content:flex-end}.ai-terminal-copy-btn{padding:0;font-weight:600;color:#2563eb;display:inline-flex;align-items:center;gap:.35rem}.ai-terminal-copy-btn:hover{color:#1d4ed8}.ai-terminal-message-table{margin-top:.6rem}.ai-terminal-table-meta{display:flex;flex-wrap:wrap;gap:.75rem;font-size:.75rem;color:#64748b;margin-bottom:.35rem;align-items:center}.ai-terminal-table-meta-spacer{flex:1 1 auto}.ai-terminal-table-tz{font-weight:600}.ai-terminal-table-toggle,.ai-terminal-table-export{padding:0;font-weight:600}.ai-terminal-message-debug{margin-top:.5rem}.ai-terminal-debug-toggle{padding:0;font-weight:600}.ai-terminal-debug-body{margin:.35rem 0 0;padding:.5rem .75rem;background:#0f172a;color:#e2e8f0;border-radius:8px;font-size:.75rem;white-space:pre-wrap;word-break:break-word}.ai-terminal-table-wrap{width:100%;overflow-x:auto}.ai-terminal-table-wrap collapse-table{display:block;width:100%}.ai-terminal-table{width:100%;border-collapse:collapse;font-size:.78rem}.ai-terminal-table th,.ai-terminal-table td{border:1px solid rgba(148,163,184,.3);padding:.35rem .5rem;vertical-align:top;white-space:nowrap}.ai-terminal-table thead{background:#94a3b826}.ai-terminal-table tbody tr:nth-child(2n){background:#94a3b814}.ai-terminal-message-attachments{margin-top:.5rem;border-top:1px dashed rgba(148,163,184,.4);padding-top:.4rem}.ai-terminal-attachment{display:flex;justify-content:space-between;font-size:.8rem}.ai-terminal-composer{border-top:1px solid rgba(148,163,184,.2);padding-top:.75rem;display:flex;flex-direction:column;gap:.6rem}.ai-terminal-composer-input-wrap{position:relative}.ai-terminal-composer-input{min-height:60px;padding:.85rem 2.7rem .85rem 1rem;border-radius:16px;border:1px solid rgba(234,179,8,.45);background:#fff7cc;box-shadow:0 10px 20px #eab3081f;font-size:.95rem;transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease;resize:vertical}.ai-terminal-composer-input:focus{border-color:#f59e0bbf;background:#fff3b0;box-shadow:0 0 0 3px #fbbf2459,0 12px 24px #eab30833}.ai-terminal-composer-favorite-toggle{position:absolute;top:.45rem;right:.55rem;border:0;background:transparent;color:#94a3b8e6;font-size:1.15rem;line-height:1;padding:0;width:1.5rem;height:1.5rem;display:inline-flex;align-items:center;justify-content:center}.ai-terminal-composer-favorite-toggle:hover{color:#f59e0be6}.ai-terminal-composer-favorite-toggle.is-active{color:#d4a017;text-shadow:0 0 10px rgba(245,158,11,.25)}.ai-terminal-composer-row{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap}.ai-terminal-upload{flex:1;min-width:220px}.ai-terminal-actions{display:flex;gap:.5rem;align-items:center}.ai-terminal-pending{background:#f8fafc;border:1px dashed rgba(148,163,184,.4);border-radius:12px;padding:.6rem .75rem}.ai-terminal-pending-title{font-size:.8rem;text-transform:uppercase;letter-spacing:.05em;color:#64748b;margin-bottom:.4rem}.ai-terminal-pending-item{display:flex;justify-content:space-between;align-items:center;border-top:1px solid rgba(148,163,184,.2);padding-top:.4rem;margin-top:.4rem}.ai-terminal-empty-title{margin:0 0 .45rem;color:#64748b;font-size:.78rem;font-weight:600}.ai-terminal-favorites{margin-bottom:.9rem;padding:.6rem;border:1px solid rgba(148,163,184,.24);border-radius:12px;background:#f8fafc}.ai-terminal-favorite-list{display:flex;flex-direction:column;gap:.4rem}.ai-terminal-favorite-item{display:flex;align-items:center;gap:.4rem}.ai-terminal-favorite-run{flex:1;display:inline-flex;align-items:center;gap:.5rem;border:1px solid rgba(148,163,184,.3);border-radius:10px;padding:.45rem .55rem;background:#fff;color:#0f172a;font-size:.78rem;line-height:1.2;text-align:left;transition:border-color .2s ease,background-color .2s ease}.ai-terminal-favorite-run:hover{border-color:#f59e0bbf;background:#fffbeb}.ai-terminal-favorite-run-star{color:#d4a017;font-size:.86rem;line-height:1}.ai-terminal-favorite-run-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ai-terminal-favorite-remove{border:1px solid rgba(148,163,184,.3);border-radius:10px;background:#fff;color:#b91c1c;width:2rem;height:2rem;font-size:1rem;line-height:1;padding:0;display:inline-flex;align-items:center;justify-content:center}.ai-terminal-empty{color:#94a3b8;font-size:.78rem;padding:.5rem .2rem}@keyframes ai-terminal-thinking{0%{opacity:.35}50%{opacity:1}to{opacity:.35}}@media(max-width:980px){.ai-terminal-shell{grid-template-columns:1fr}}\n"]}]}],ctorParameters:()=>[{type:AiTerminalService},{type:ProviderService},{type:AiPageRouterService},{type:AiPageFormAdapterService},{type:void 0,decorators:[{type:Inject,args:[LOCALE_ID]}]}],propDecorators:{idClient:[{type:Input}],idApp:[{type:Input}],title:[{type:Input}],config:[{type:Input}],conversationStatus:[{type:Input}],messageLimit:[{type:Input}],placeholder:[{type:Input}],singleConversation:[{type:Input}],contextMode:[{type:Input}],contextRoute:[{type:Input}],paused:[{type:Input}],bypassRouteSubscriptions:[{type:Input}],messageScroll:[{type:ViewChild,args:["messageScroll",{static:!1}]}]}});const BASE_SYSTEM_PROMPT=["You are the ResolveIO in-app AI assistant for this product.","- You can only help users understand and navigate the existing codebase and UI.","- Never share code or file contents. All code is proprietary.","- Do not suggest or perform any hacking, bypass, or security abuse.","- Do not access databases directly, secrets, or other users' data.","- If the user has a customer portal scope (other.id_customer), only discuss that customer's data and what is visible in their customer portal. Never reference other customers or internal/admin-only data. If asked for anything outside the portal, say it isn't available.","- Do not change local browser data or run destructive actions.","- Provide detailed, expert-level explanations grounded in this product. Avoid generic answers.","- When explaining why something happens, describe the specific workflow, fields, and auto-filled data involved (what fills, where it comes from, and when it triggers). If unsure, ask a clarifying question about the screen or workflow.",'- When asked "why is this happening," respond with: cause, trigger, data source(s), and expected vs actual outcome.',"- For troubleshooting, ask clarifying questions only when needed to proceed; otherwise answer directly, then give a short decision tree (If X, do Y; If not, do Z).","- Provide checklists for common tasks, highlighting required fields and common pitfalls.",'- If asked "where is this set," give the screen/workflow name and navigation steps to reach it.','- If asked "what changed," summarize release notes if known; if not available, say so and suggest where to check or offer a support ticket.','- After answering, optionally suggest 0-1 related next steps only when helpful. Do not ask for "next steps" every time.',"- If access is blocked, name the permission/role needed and how to request it.","- Prefer high-level product guidance; only mention file paths if explicitly requested.","- Only include an in-app route when the user explicitly asks for navigation or a link to another screen. Never include the route for the current screen.",'- Avoid vague labels like "Operations app"; use the specific screen/workflow name.',"- Do not mention other client projects or ask which client; if clarification is needed, ask about the screen or workflow without listing other clients.","- Respond in English only. Do not include non-English text or characters unless required for JSON, links, or tool directives.",'- Respond with a single clear message; be thorough but stay focused. Do not add labels like "Customer-facing summary" or "Work ticket summary" and do not include estimated hours.','- Use structured responses by default: short heading, then bullet points. For "how do I" questions, provide a step-by-step list (numbered) with explicit page/screen names and actions.','- When giving steps, include navigation guidance like "Go to <screen>" and "Click/Select/Enter <field>" so the user can follow it exactly.',"- If context scope is provided (ex: current page), prioritize that screen in your answer.","- If a request is out of scope, offer to create a support ticket and provide a short summary.","- If the user explicitly asks to create/open/file a support ticket, end your response with a single line exactly in this format:","- SUPPORT_TICKET_CREATE: <one-line summary>","- Only include that line when the user clearly wants a ticket created. Do not claim a ticket is created unless you include that line.",'- Do not end responses with tentative phrasing like "I could" or "I’m going to." Complete the request or state what is required to proceed.',"- Use the codebase context to choose correct collections/fields/workflows and use MONGO_READ/MONGO_AGG to answer with real data when needed.","- For direct questions, answer first. Ask a single follow-up only if required to run a query or resolve missing details.","- If you need database data to answer, end your response with a single line exactly in this format:",'- MONGO_READ: {"collection":"<name>","query":{...},"options":{"projection":{...},"sort":{...},"limit":20},"permissionView":"</route>"}',"- If you need grouped/aggregated data (totals by user, rankings, trends), end your response with a single line exactly in this format:",'- MONGO_AGG: {"collection":"<name>","pipeline":[...],"options":{"allowDiskUse":true,"limit":20},"permissionView":"</route>"}',"- For invoice data, set permissionView to an invoice-capable route (ex: /invoice/list or /report-builder). Do not use /report/* routes.","- For revenue/sales/billing questions, use invoices and sum paid_total (fallback to grand_total) with date_paid and Paid/Closed status when available.","- For relative date ranges (last/past/recent), include an upper bound <= $$NOW unless the user specifies a future end date.","- Keep queries minimal, read-only, and avoid user/credential data unless the user is a super admin.","- Assume you are not a super admin unless explicitly told otherwise.","- Only request data when the user has permission for that module; invoice data requires invoice view access.","- If the user lacks permission, answer without data and explain how to view it in the app or request access.","- For simple counts or time-range totals, use MONGO_READ (includeTotal). For breakdowns, rankings, or sums grouped by a field, use MONGO_AGG.",'- Before issuing MONGO_READ or MONGO_AGG, verify the collection name and key fields by checking collection/model definitions in the current app (look for "collectionName:" and date fields like date_created/date_completed/createdAt). Do not invent collection names.',"- For creation-date questions when both date_created and createdAt exist, match both with $or so results are not missed.","- When grouping by fields that can be arrays (drivers, deliveries, routes, chemicals), $unwind first and group by both id and name when available.","- Use MONGO_READ/MONGO_AGG only to produce summaries/snapshots/health checks (not raw dumps) when permitted.","- When referencing data, summarize it in bullets and avoid raw JSON or dumps.","- Format currency as $1,234.56 (no USD prefix) with two decimals.","- Use medium reasoning effort."].join("\n"),DEFAULT_AI_ASSISTANT_CODEX_MODEL="gpt-5.3-codex",DEFAULT_AI_ASSISTANT_CODEX_FALLBACK_MODEL="gpt-5.2-codex";class AiAssistantComponent{router;_account;idClient="";idApp="";title="AI Assistant";open=!1;supportTicketRoute="/support-ticket/new";supportTicketEnabled=!0;config=null;topOffset=0;panelHeight=0;currentRoute="";hoverEnabled=!0;openRequested=new EventEmitter;closed=new EventEmitter;terminal;panelRef;terminalConfig;contextMode="auto";hoverOpened=!1;panelWidthPx=null;isResizing=!1;resizeMinWidth=0;resizeMaxWidth=0;resizeStartWidth=0;suppressRailClick=!1;resizeMoved=!1;constructor(t,e){this.router=t,this._account=e,this.terminalConfig=this.buildTerminalConfig()}ngOnChanges(t){t.open&&!this.open&&(this.hoverOpened=!1,this.isResizing=!1,this.suppressRailClick=!1),(t.idApp||t.config)&&(this.terminalConfig=this.buildTerminalConfig())}buildTerminalConfig(){return{mode:"codex",model:"gpt-5.3-codex",fallbackModel:"gpt-5.2-codex",guardrails:!0,allowUploads:!1,showAdvanced:!1,showToolMessages:!1,deleteFilesAfterRun:!0,pageRouterEnabled:!0,systemPrompt:this.buildSystemPrompt(),...this.config||{}}}closePanel(){this.hoverOpened=!1,this.closed.emit()}handleRailClick(t){t?.stopPropagation(),this.suppressRailClick?this.suppressRailClick=!1:this.open||(this.hoverOpened=!1,this.openRequested.emit())}handleRailMouseDown(t){this.open&&this.startResize(t)}handleRailEnter(){this.hoverEnabled&&!this.open&&(this.hoverOpened=!0,this.openRequested.emit())}handleRailLeave(){this.hoverEnabled&&this.hoverOpened&&(this.hoverOpened=!1,this.closePanel())}setContextMode(t){this.contextMode="all"===t||"auto"===t?t:"current"}get contextRouteLabel(){return this.currentRoute||"Current page"}openSupportTicket(){if(!this.supportTicketEnabled)return;const t=this.buildSupportTicketSummary();t&&localStorage.setItem("resolveioSupportTicketDraft",JSON.stringify({issue:t,source:"ai-assistant",createdAt:(new Date).toISOString()})),this.closed.emit(),this.supportTicketRoute&&this.router.navigateByUrl(this.supportTicketRoute)}handleBackdropClick(t){t&&t.stopPropagation()}get panelWidthStyle(){return"number"==typeof this.panelWidthPx&&this.panelWidthPx>0?`${this.panelWidthPx}px`:"33.33vw"}startResize(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.resizeMoved=!1,this.suppressRailClick=!1;const n=this.panelRef?.nativeElement?.getBoundingClientRect().width,o=n||this.defaultPanelWidth();this.resizeStartWidth=this.clampPanelWidth(o);const r=this.defaultPanelWidth();this.resizeMinWidth=e?Math.max(r,this.resizeStartWidth):r,this.resizeMaxWidth=this.resolveMaxWidth(this.resizeMinWidth),this.panelWidthPx=this.clampPanelWidth(this.resizeStartWidth,this.resizeMinWidth,this.resizeMaxWidth)}handleResizeMove(t){if(!this.isResizing)return;const e=window.innerWidth-t.clientX;Math.abs(e-this.resizeStartWidth)>2&&(this.resizeMoved=!0,this.suppressRailClick=!0),this.panelWidthPx=this.clampPanelWidth(e,this.resizeMinWidth,this.resizeMaxWidth)}handleResizeEnd(){this.isResizing&&(this.isResizing=!1,this.resizeMoved&&this.suppressRailClick&&setTimeout(()=>{this.suppressRailClick=!1},0))}clampPanelWidth(t,e,n){const o="number"==typeof e?e:window.innerWidth/3,r="number"==typeof n?n:Math.max(o,window.innerWidth-46);return Math.min(Math.max(t,o),r)}defaultPanelWidth(){return Math.round(window.innerWidth/3)}resolveMaxWidth(t){return Math.max(t,window.innerWidth-46)}buildSystemPrompt(){const t=String(this.idApp||"").trim(),e=t?`- Current app: ${t}. Treat this as the only project for this conversation.`:"- Treat the current app as the only project for this conversation.",n=this.buildCustomerScopeLine();return[BASE_SYSTEM_PROMPT,e,n].filter(Boolean).join("\n")}buildCustomerScopeLine(){const t=String(this._account.getUser()?.other?.id_customer||"").trim();return t?`- Customer portal scope: yes (id_customer: ${t}).`:""}buildSupportTicketSummary(){const t=this.terminal,e=t?.activeConversation,n=(t?.messages||[]).slice().reverse(),o=n.find(t=>"user"===t?.role),r=n.find(t=>"assistant"===t?.role),i=[],s=(e?.title||this.title||"").trim();return s&&i.push(`Conversation: ${s}`),o?.content&&i.push(`User request:\n${this.truncate(this.sanitizeSummary(o.content),1400)}`),r?.content&&i.push(`Assistant summary:\n${this.truncate(this.sanitizeSummary(r.content),2e3)}`),i.join("\n\n").trim()}sanitizeSummary(t){return String(t||"").replace(/```[\s\S]*?```/g,"").replace(/`([^`]+)`/g,"$1").replace(/\s{3,}/g," ").trim()}truncate(t,e){const n=String(t||"").trim();return n.length<=e?n:`${n.slice(0,Math.max(0,e-3))}...`}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiAssistantComponent,deps:[{token:i1$1.Router},{token:AccountManagerService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:AiAssistantComponent,isStandalone:!1,selector:"rio-ai-assistant",inputs:{idClient:"idClient",idApp:"idApp",title:"title",open:"open",supportTicketRoute:"supportTicketRoute",supportTicketEnabled:"supportTicketEnabled",config:"config",topOffset:"topOffset",panelHeight:"panelHeight",currentRoute:"currentRoute",hoverEnabled:"hoverEnabled"},outputs:{openRequested:"openRequested",closed:"closed"},host:{listeners:{"window:mousemove":"handleResizeMove($event)","window:mouseup":"handleResizeEnd()"}},viewQueries:[{propertyName:"terminal",first:!0,predicate:AiTerminalComponent,descendants:!0},{propertyName:"panelRef",first:!0,predicate:["panelRef"],descendants:!0}],usesOnChanges:!0,ngImport:i0,template:'<div class="ai-assistant-overlay" [class.is-open]="open"></div>\n<div\n\tclass="ai-assistant-drawer"\n\t[class.is-open]="open"\n\t[style.--ai-panel-width]="panelWidthStyle"\n\t[style.top.px]="topOffset"\n\t[style.height.px]="panelHeight">\n\t<button\n\t\ttype="button"\n\t\tclass="ai-assistant-rail"\n\t\t(click)="handleRailClick($event)"\n\t\t(mousedown)="handleRailMouseDown($event)">\n\t\t<span class="ai-assistant-rail-label">AI Assistant</span>\n\t</button>\n\t\t<div class="ai-assistant-panel" #panelRef [class.is-open]="open" (click)="$event.stopPropagation()">\n\t\t<div class="ai-assistant-resize-handle" (mousedown)="startResize($event)"></div>\n\t\t<div class="ai-assistant-header">\n\t\t\t<div class="ai-assistant-title">\n\t\t\t\t<h4>{{ title }}</h4>\n\t\t\t\t<p class="ai-assistant-subtitle">Ask about workflows, routes, and where features live.</p>\n\t\t\t</div>\n\t\t\t<div class="ai-assistant-actions">\n\t\t\t\t@if (supportTicketEnabled) {\n\t\t\t\t\t<button type="button" class="btn btn-sm btn-outline-secondary" (click)="openSupportTicket()">Support Ticket</button>\n\t\t\t\t}\n\t\t\t\t<button type="button" class="btn btn-sm btn-danger ai-assistant-close" (click)="closePanel()">Close</button>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="ai-assistant-context">\n\t\t\t<div class="ai-assistant-context-controls">\n\t\t\t\t<select class="form-select form-select-sm" [value]="contextMode" (change)="setContextMode($event.target.value)" aria-label="Context">\n\t\t\t\t\t<option value="auto">Auto</option>\n\t\t\t\t\t<option value="current">Current Page</option>\n\t\t\t\t\t<option value="all">All Pages</option>\n\t\t\t\t</select>\n\t\t\t\t@if (contextMode !== \'all\') {\n\t\t\t\t\t<div class="ai-assistant-context-route">{{ contextRouteLabel }}</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="ai-assistant-body">\n\t\t\t<rio-ai-terminal\n\t\t\t\t[idClient]="idClient"\n\t\t\t\t[idApp]="idApp"\n\t\t\t\t[title]="title"\n\t\t\t\t[config]="terminalConfig"\n\t\t\t\t[conversationStatus]="\'active\'"\n\t\t\t\t[singleConversation]="true"\n\t\t\t\t[contextMode]="contextMode"\n\t\t\t\t[contextRoute]="currentRoute"\n\t\t\t\t[bypassRouteSubscriptions]="true"\n\t\t\t\t[paused]="!open"\n\t\t\t\t[placeholder]="\'Ask about features, navigation, how things work, or request summaries/anomaly checks...\'">\n\t\t\t</rio-ai-terminal>\n\t\t</div>\n\t</div>\n</div>\n',styles:[':host{position:fixed;inset:0;z-index:10000;pointer-events:none;--ai-rail-width: 46px;--ai-panel-width: 33.33vw;--ai-shadow: rgba(15, 23, 42, .2)}.ai-assistant-overlay{position:fixed;inset:0;background:transparent;opacity:0;pointer-events:none;transition:opacity .25s ease}.ai-assistant-overlay.is-open{opacity:0;pointer-events:none}.ai-assistant-drawer{position:fixed;right:0;display:flex;align-items:stretch;height:100%;min-height:360px;width:calc(var(--ai-rail-width) + var(--ai-panel-width));transform:translate(calc(100% - var(--ai-rail-width)));transition:transform .35s ease;pointer-events:auto}.ai-assistant-drawer.is-open{transform:translate(0)}.ai-assistant-rail{width:var(--ai-rail-width);border:none;background:var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1));color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;box-shadow:inset 0 0 0 1px #fff3;transition:background .2s ease,box-shadow .2s ease}.ai-assistant-rail:hover{background:var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1));box-shadow:inset 0 0 0 1px #ffffff47}.ai-assistant-drawer.is-open .ai-assistant-rail{cursor:col-resize}.ai-assistant-rail-label{writing-mode:vertical-rl;transform:rotate(0);transform-origin:center;letter-spacing:.2em;font-size:.72rem;font-weight:700;text-transform:uppercase}.ai-assistant-panel{width:min(var(--ai-panel-width),100vw - var(--ai-rail-width));height:100%;background:#f8fafc;box-shadow:-18px 0 36px var(--ai-shadow);display:flex;flex-direction:column;gap:.75rem;padding:.9rem 1rem 1rem;border-radius:18px 0 0 18px;border:1px solid rgba(148,163,184,.3);position:relative;overflow:hidden}.ai-assistant-resize-handle{position:absolute;left:0;top:0;width:8px;height:100%;cursor:col-resize;z-index:2;background:linear-gradient(90deg,#94a3b866,#94a3b800)}.ai-assistant-header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.ai-assistant-title h4{margin:0;font-weight:700}.ai-assistant-subtitle{margin:.25rem 0 0;color:#475569;font-size:.85rem}.ai-assistant-actions{display:flex;gap:.5rem;flex-wrap:wrap}.ai-assistant-close{box-shadow:0 6px 14px #dc262640;font-weight:600}.ai-assistant-context{display:block;align-items:center;gap:.75rem;background:#eef2ff;border-radius:12px;padding:.5rem .75rem;border:1px solid rgba(129,140,248,.35)}.ai-assistant-context-label{font-weight:600;color:#1e293b;font-size:.85rem;text-transform:uppercase;letter-spacing:.08em}.ai-assistant-context-controls{display:grid;grid-template-columns:minmax(120px,20%) 1fr;align-items:center;gap:.5rem;flex:1 1 auto;min-width:0}.ai-assistant-context-controls select{width:100%}.ai-assistant-context-route{font-size:.8rem;color:#334155;background:#fffc;border-radius:999px;padding:.15rem .6rem;border:1px solid rgba(148,163,184,.4);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-assistant-body{flex:1;overflow:hidden}.ai-assistant-empty{color:#6c757d;font-size:.95rem;text-align:center;padding:24px 16px}:host ::ng-deep .ai-terminal-shell{height:100%}:host ::ng-deep .ai-terminal-sidebar,:host ::ng-deep .ai-terminal-main{min-height:0;max-height:100%}:host ::ng-deep .ai-terminal-messages{height:100%}:host ::ng-deep .ai-terminal-conversation-actions .ai-terminal-delete-btn{padding:.2rem .4rem;font-size:0;line-height:1}:host ::ng-deep .ai-terminal-conversation-actions .ai-terminal-delete-btn:before{content:"\\f1f8";font-family:FontAwesome;font-size:.9rem}:host ::ng-deep .ai-terminal-actions{width:100%;flex-wrap:nowrap;align-items:stretch}:host ::ng-deep .ai-terminal-actions .btn-primary{flex:1 1 auto;width:auto}:host ::ng-deep .ai-terminal-actions .btn-outline-secondary{flex:0 0 auto}@media(max-width:1200px){:host{display:none}}\n'],dependencies:[{kind:"component",type:AiTerminalComponent,selector:"rio-ai-terminal",inputs:["idClient","idApp","title","config","conversationStatus","messageLimit","placeholder","singleConversation","contextMode","contextRoute","paused","bypassRouteSubscriptions"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiAssistantComponent,decorators:[{type:Component,args:[{selector:"rio-ai-assistant",standalone:!1,template:'<div class="ai-assistant-overlay" [class.is-open]="open"></div>\n<div\n\tclass="ai-assistant-drawer"\n\t[class.is-open]="open"\n\t[style.--ai-panel-width]="panelWidthStyle"\n\t[style.top.px]="topOffset"\n\t[style.height.px]="panelHeight">\n\t<button\n\t\ttype="button"\n\t\tclass="ai-assistant-rail"\n\t\t(click)="handleRailClick($event)"\n\t\t(mousedown)="handleRailMouseDown($event)">\n\t\t<span class="ai-assistant-rail-label">AI Assistant</span>\n\t</button>\n\t\t<div class="ai-assistant-panel" #panelRef [class.is-open]="open" (click)="$event.stopPropagation()">\n\t\t<div class="ai-assistant-resize-handle" (mousedown)="startResize($event)"></div>\n\t\t<div class="ai-assistant-header">\n\t\t\t<div class="ai-assistant-title">\n\t\t\t\t<h4>{{ title }}</h4>\n\t\t\t\t<p class="ai-assistant-subtitle">Ask about workflows, routes, and where features live.</p>\n\t\t\t</div>\n\t\t\t<div class="ai-assistant-actions">\n\t\t\t\t@if (supportTicketEnabled) {\n\t\t\t\t\t<button type="button" class="btn btn-sm btn-outline-secondary" (click)="openSupportTicket()">Support Ticket</button>\n\t\t\t\t}\n\t\t\t\t<button type="button" class="btn btn-sm btn-danger ai-assistant-close" (click)="closePanel()">Close</button>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="ai-assistant-context">\n\t\t\t<div class="ai-assistant-context-controls">\n\t\t\t\t<select class="form-select form-select-sm" [value]="contextMode" (change)="setContextMode($event.target.value)" aria-label="Context">\n\t\t\t\t\t<option value="auto">Auto</option>\n\t\t\t\t\t<option value="current">Current Page</option>\n\t\t\t\t\t<option value="all">All Pages</option>\n\t\t\t\t</select>\n\t\t\t\t@if (contextMode !== \'all\') {\n\t\t\t\t\t<div class="ai-assistant-context-route">{{ contextRouteLabel }}</div>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="ai-assistant-body">\n\t\t\t<rio-ai-terminal\n\t\t\t\t[idClient]="idClient"\n\t\t\t\t[idApp]="idApp"\n\t\t\t\t[title]="title"\n\t\t\t\t[config]="terminalConfig"\n\t\t\t\t[conversationStatus]="\'active\'"\n\t\t\t\t[singleConversation]="true"\n\t\t\t\t[contextMode]="contextMode"\n\t\t\t\t[contextRoute]="currentRoute"\n\t\t\t\t[bypassRouteSubscriptions]="true"\n\t\t\t\t[paused]="!open"\n\t\t\t\t[placeholder]="\'Ask about features, navigation, how things work, or request summaries/anomaly checks...\'">\n\t\t\t</rio-ai-terminal>\n\t\t</div>\n\t</div>\n</div>\n',styles:[':host{position:fixed;inset:0;z-index:10000;pointer-events:none;--ai-rail-width: 46px;--ai-panel-width: 33.33vw;--ai-shadow: rgba(15, 23, 42, .2)}.ai-assistant-overlay{position:fixed;inset:0;background:transparent;opacity:0;pointer-events:none;transition:opacity .25s ease}.ai-assistant-overlay.is-open{opacity:0;pointer-events:none}.ai-assistant-drawer{position:fixed;right:0;display:flex;align-items:stretch;height:100%;min-height:360px;width:calc(var(--ai-rail-width) + var(--ai-panel-width));transform:translate(calc(100% - var(--ai-rail-width)));transition:transform .35s ease;pointer-events:auto}.ai-assistant-drawer.is-open{transform:translate(0)}.ai-assistant-rail{width:var(--ai-rail-width);border:none;background:var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1));color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;box-shadow:inset 0 0 0 1px #fff3;transition:background .2s ease,box-shadow .2s ease}.ai-assistant-rail:hover{background:var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1));box-shadow:inset 0 0 0 1px #ffffff47}.ai-assistant-drawer.is-open .ai-assistant-rail{cursor:col-resize}.ai-assistant-rail-label{writing-mode:vertical-rl;transform:rotate(0);transform-origin:center;letter-spacing:.2em;font-size:.72rem;font-weight:700;text-transform:uppercase}.ai-assistant-panel{width:min(var(--ai-panel-width),100vw - var(--ai-rail-width));height:100%;background:#f8fafc;box-shadow:-18px 0 36px var(--ai-shadow);display:flex;flex-direction:column;gap:.75rem;padding:.9rem 1rem 1rem;border-radius:18px 0 0 18px;border:1px solid rgba(148,163,184,.3);position:relative;overflow:hidden}.ai-assistant-resize-handle{position:absolute;left:0;top:0;width:8px;height:100%;cursor:col-resize;z-index:2;background:linear-gradient(90deg,#94a3b866,#94a3b800)}.ai-assistant-header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.ai-assistant-title h4{margin:0;font-weight:700}.ai-assistant-subtitle{margin:.25rem 0 0;color:#475569;font-size:.85rem}.ai-assistant-actions{display:flex;gap:.5rem;flex-wrap:wrap}.ai-assistant-close{box-shadow:0 6px 14px #dc262640;font-weight:600}.ai-assistant-context{display:block;align-items:center;gap:.75rem;background:#eef2ff;border-radius:12px;padding:.5rem .75rem;border:1px solid rgba(129,140,248,.35)}.ai-assistant-context-label{font-weight:600;color:#1e293b;font-size:.85rem;text-transform:uppercase;letter-spacing:.08em}.ai-assistant-context-controls{display:grid;grid-template-columns:minmax(120px,20%) 1fr;align-items:center;gap:.5rem;flex:1 1 auto;min-width:0}.ai-assistant-context-controls select{width:100%}.ai-assistant-context-route{font-size:.8rem;color:#334155;background:#fffc;border-radius:999px;padding:.15rem .6rem;border:1px solid rgba(148,163,184,.4);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-assistant-body{flex:1;overflow:hidden}.ai-assistant-empty{color:#6c757d;font-size:.95rem;text-align:center;padding:24px 16px}:host ::ng-deep .ai-terminal-shell{height:100%}:host ::ng-deep .ai-terminal-sidebar,:host ::ng-deep .ai-terminal-main{min-height:0;max-height:100%}:host ::ng-deep .ai-terminal-messages{height:100%}:host ::ng-deep .ai-terminal-conversation-actions .ai-terminal-delete-btn{padding:.2rem .4rem;font-size:0;line-height:1}:host ::ng-deep .ai-terminal-conversation-actions .ai-terminal-delete-btn:before{content:"\\f1f8";font-family:FontAwesome;font-size:.9rem}:host ::ng-deep .ai-terminal-actions{width:100%;flex-wrap:nowrap;align-items:stretch}:host ::ng-deep .ai-terminal-actions .btn-primary{flex:1 1 auto;width:auto}:host ::ng-deep .ai-terminal-actions .btn-outline-secondary{flex:0 0 auto}@media(max-width:1200px){:host{display:none}}\n']}]}],ctorParameters:()=>[{type:i1$1.Router},{type:AccountManagerService}],propDecorators:{idClient:[{type:Input}],idApp:[{type:Input}],title:[{type:Input}],open:[{type:Input}],supportTicketRoute:[{type:Input}],supportTicketEnabled:[{type:Input}],config:[{type:Input}],topOffset:[{type:Input}],panelHeight:[{type:Input}],currentRoute:[{type:Input}],hoverEnabled:[{type:Input}],openRequested:[{type:Output}],closed:[{type:Output}],terminal:[{type:ViewChild,args:[AiTerminalComponent]}],panelRef:[{type:ViewChild,args:["panelRef"]}],handleResizeMove:[{type:HostListener,args:["window:mousemove",["$event"]]}],handleResizeEnd:[{type:HostListener,args:["window:mouseup"]}]}});class ScrollDirective{onScroll=new EventEmitter;bottomOffset=100;topOffset=100;constructor(){}scrolled(t){this.elementScrollEvent(t)}windowScrolled(t){this.windowScrollEvent(t)}windowScrollEvent(t){const e=t.target,n=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,o=n<this.topOffset,r={isReachingBottom:e.body.offsetHeight-(window.innerHeight+n)<this.bottomOffset,isReachingTop:o,originalEvent:t,isWindowEvent:!0};this.onScroll.emit(r)}elementScrollEvent(t){const e=t.target,n=e.scrollHeight-e.scrollTop,o=e.offsetHeight,r=e.scrollTop<this.topOffset,i={isReachingBottom:n-o<this.bottomOffset,isReachingTop:r,originalEvent:t,isWindowEvent:!1};this.onScroll.emit(i)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ScrollDirective,deps:[],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:ScrollDirective,isStandalone:!1,selector:"[detect-scroll]",inputs:{bottomOffset:"bottomOffset",topOffset:"topOffset"},outputs:{onScroll:"onScroll"},host:{listeners:{scroll:"scrolled($event)","window:scroll":"windowScrolled($event)"}},ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ScrollDirective,decorators:[{type:Directive,args:[{selector:"[detect-scroll]",standalone:!1}]}],ctorParameters:()=>[],propDecorators:{onScroll:[{type:Output}],bottomOffset:[{type:Input}],topOffset:[{type:Input}],scrolled:[{type:HostListener,args:["scroll",["$event"]]}],windowScrolled:[{type:HostListener,args:["window:scroll",["$event"]]}]}});class NavbarMainComponent extends BaseComponent{_services;auth;_ds;_app;dropdowns;scrollable;logo="";navTabs=[];fontSize=12;publicProgram=!1;digitalSign=!1;showSupport=!0;aiAssistantVisible=!0;aiToggle=new EventEmitter;user=null;collapseShowing=!1;client="";isResolveIO=!1;tourStarted=!1;dropdownLeftTimer=null;scrollRightInterval=null;scrollLeftInterval=null;isDemo=!1;constructor(t,e,n,o){super(t),this._services=t,this.auth=e,this._ds=n,this._app=o}ngOnInit(){this._services._account.user.subscribe(t=>{this.user=t}),this.client=this._app.client.getValue(),this.tourStarted=this._services._app.tourStarted.getValue(),this.client||(this.isResolveIO=!0),this._services._app.tourStarted.subscribe(t=>{this.tourStarted=t}),this._services._app.isDemo.subscribe(t=>{this.isDemo=t})}ngAfterViewInit(){this.dropdownLeftTimer=setInterval(()=>{this.calculateDropdownsLeft()},500),document.documentElement.style.setProperty("--font-size",this.fontSize+"px")}ngOnDestroy(){this.dropdownLeftTimer&&(clearInterval(this.dropdownLeftTimer),this.dropdownLeftTimer=null)}async logout(){this._app.isLoggingOut.next(!0),await this._services._account.logOut(),this._app.isLoggingOut.next(!1)}login(){this.auth.loginUser().then(()=>{},t=>{})}hasScrolled(){return this.scrollable.nativeElement.scrollLeft<=0&&this.stopScrollRight(),this.scrollable.nativeElement.scrollLeft>0}hasMoreScroll(){return this.scrollable.nativeElement.scrollWidth<=this.scrollable.nativeElement.clientWidth+this.scrollable.nativeElement.scrollLeft&&this.stopScrollLeft(),this.scrollable.nativeElement.scrollWidth>this.scrollable.nativeElement.clientWidth+this.scrollable.nativeElement.scrollLeft}startScrollRight(){this.scrollRightInterval=setInterval(()=>{this.scrollable.nativeElement.scrollLeft-=2},1)}stopScrollRight(){clearInterval(this.scrollRightInterval)}scrollRightOnce(){this.scrollable.nativeElement.scrollLeft-=50}startScrollLeft(){this.scrollLeftInterval=setInterval(()=>{this.scrollable.nativeElement.scrollLeft+=2},1)}stopScrollLeft(){clearInterval(this.scrollLeftInterval)}scrollLeftOnce(){this.scrollable.nativeElement.scrollLeft+=50}handleNavLinkClick(t){if(t&&(t.metaKey||t.ctrlKey)){const e=t.currentTarget;e&&e.href&&(window.open(e.href,"_blank"),t.preventDefault(),t.stopPropagation())}}toggleAiAssistant(t){t&&(t.preventDefault(),t.stopPropagation()),this.aiToggle.emit()}calculateDropdownsLeft(){if(this.dropdowns&&this.dropdowns.toArray()&&this.dropdowns.toArray().length&&this.scrollable){const t=[];return this.navTabs.filter(t=>"dropdown"===t.type).forEach(e=>{const n=e.label||"",o=this.dropdowns.toArray().filter(t=>t.nativeElement.innerText.split("\n")[0].replace(/[^A-Za-z0-9]/g,"")===n.replace(/[^A-Za-z0-9]/g,""))[0],r=o?o.nativeElement.querySelector(".dropdown-menu"):null,i=o?Math.max(o.nativeElement.offsetLeft-this.scrollable.nativeElement.scrollLeft,this.scrollable.nativeElement.offsetLeft):0;if(r){parseInt(r.style.left||"0",10)!==i&&t.push({dropDownMenu:r,nextLeft:i})}}),t.length&&t.forEach(t=>{t.dropDownMenu.style.left=t.nextLeft+"px"}),!0}return!1}isInRole(t){if(!t)return!0;if(this.isSuperAdmin())return!0;if(this.user&&this.user.roles.groups)for(let e=0;e<this.user.roles.groups.length;e++){let n=this.user.roles.groups[e];for(let e=0;e<n.views.length;e++){let o=n.views[e];if(o===t||o.startsWith(t+"/"))return!0}}return!1}isSuperAdmin(){return!(!this.user||!this.user.roles)&&this.user.roles.super_admin}isInOneRole(t){if(this.isSuperAdmin())return!0;for(let e=0;e<t.length;e++){let n=t[e];if(!n)return!0;if(this._services._account.isUserInView(n))return!0}return!1}navigateTo(t){this._services._router.navigateByUrl(t)}help(){this._ds.input("What do you need help with?",[{label:"Title of Problem",form:"problem_title",data:"",validators:[Validators.required],validatorErrors:["required"],validatorMsg:["Problem title is required."],required:!0},{label:"Description of Problem",form:"problem_desc",data:"",validators:[Validators.required],validatorErrors:["required"],validatorMsg:["Problem description is required."],required:!0,type:"textarea"}]).then(t=>{this._services._socket.call("getHelpNotification",this._services._account.getUser().fullname,t.problem_title.value,t.problem_desc.value)},()=>{})}isCustomer(){const t=this._services._account.getUser();return!(!t||!t.other)&&!(!t.other.customers||!t.other.customers.length)}getWindowWidth(){return window.innerWidth}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NavbarMainComponent,deps:[{token:ProviderService},{token:AuthService},{token:DialogService},{token:CoreService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:NavbarMainComponent,isStandalone:!1,selector:"navbar-main",inputs:{logo:"logo",navTabs:"navTabs",fontSize:"fontSize",publicProgram:"publicProgram",digitalSign:"digitalSign",showSupport:"showSupport",aiAssistantVisible:"aiAssistantVisible"},outputs:{aiToggle:"aiToggle"},providers:[ProviderService],viewQueries:[{propertyName:"scrollable",first:!0,predicate:["scrollable"],descendants:!0,static:!0},{propertyName:"dropdowns",predicate:["dropdowns"],descendants:!0}],usesInheritance:!0,ngImport:i0,template:'<style>\n\t:root {\n\t\t--font-size: 12;\n\t}\n\n\t:host ::ng-deep * {\n\t\tfont-size: var(--font-size);\n\t}\n\n\t@media (max-width: 1200px) {\n\t\t.navbarMain a {\n\t\t\tfont-size: 18px !important;\n\t\t}\n\t\t.navbarMain .dropdown-menu {\n\t\t\tmargin-left: 10px;\n\t\t}\n\t\t.navbar-divider-pipe {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.navbar-divider-hr {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\theight: 1px;\n\t\t\tborder: 0;\n\t\t\tborder-top: 1px solid white;\n\t\t\tbackground-color: white;\n\t\t\tcolor: white;\n\t\t\topacity: 1;\n\t\t\tmargin: 0.25rem 0;\n\t\t}\n\t}\n\t@media (min-width: 1200px) {\n\t\t.scrollable-x {\n\t\t\tmax-width: 60vw;\n\t\t\toverflow-x: auto;\n\t\t\toverflow-y: visible;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t::-webkit-scrollbar {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t.verticalAlign {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t.dropdown {\n\t\t\tposition: static;\n\t\t}\n\t}\n\n\t.navbar li {\n\t\tcursor: pointer;\n\t\ttext-align: center;\n\t}\n\n\t.navbar-divider-pipe {\n\t\tdisplay: inline-block;\n\t\talign-self: stretch;\n\t\twidth: 1px;\n\t\tbackground-color: white;\n\t\topacity: 0.8;\n\t\tmargin: 0 0.75rem;\n\t}\n\n\t.navbar-dark .navbar-nav .nav-link:hover,\n\t.navbar-dark .navbar-nav .nav-link:focus {\n\t\tcolor: gray;\n\t}\n\t.navbar-divider-item {\n\t\tdisplay: flex;\n\t\talign-items: stretch;\n\t}\n</style>\n\n<div class="row">\n\t<nav class="navbar navbar-expand-xl navbar-dark bg-dark navbarMain" style="width: 100%">\n\t\t<a class="navbar-brand" href="#">\n\t\t\t@if (!isDemo) {\n\t\t\t\t<img [src]="logo" style="width: auto; height: 36px" />\n\t\t\t}\n\t\t</a>\n\t\t<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarMainNav" aria-controls="navbarMainNav" aria-expanded="false" aria-label="Toggle navigation">\n\t\t\t<span class="navbar-toggler-icon"></span>\n\t\t</button>\n\t\t<div class="navbar-collapse collapse" id="navbarMainNav">\n\t\t\t<ul class="navbar-nav">\n\t\t\t\t@if (!publicProgram && !digitalSign) {\n\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav" [style.border-right]="getWindowWidth() > 1200 ? \'1px solid white\' : \'\'">\n\t\t\t\t\t\t<a class="nav-link" routerLink="home" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" routerLinkActive="active">Home</a>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t\t@if (hasScrolled()) {\n\t\t\t\t<div (mouseover)="startScrollRight()" (mouseout)="stopScrollRight()" (click)="scrollRightOnce()">\n\t\t\t\t\t<i class="fa fa-arrow-left" style="color: white; font-size: 20px"></i>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<ul [ngClass]="[\'navbar-nav\', \'scrollable-x\']" #scrollable detect-scroll (onScroll)="calculateDropdownsLeft()">\n\t\t\t\t@for (tab of navTabs; track tab.label || tab.links?.[0]?.routerLink || i; let i = $index) {\n\t\t\t\t\t@if (tab.type === \'link\') {\n\t\t\t\t\t\t@if ((publicProgram || user) && !digitalSign && isInRole(tab.links[0].role)) {\n\t\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" [tourAnchor]="tab.tourAnchor" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" [routerLink]="tab.links[0].routerLink" routerLinkActive="active">{{ tab.links[0].label }}</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t@if (tab.type === \'dropdown\') {\n\t\t\t\t\t\t@if ((publicProgram || user) && isInOneRole(tab.roles)) {\n\t\t\t\t\t\t\t<li #dropdowns class="nav-item dropdown">\n\t\t\t\t\t\t\t\t<a class="nav-link dropdown-toggle" [class.disabled]="tourStarted ? true : null" id="navbarDropdownAsset" role="button" [tourAnchor]="tab.tourAnchor" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n\t\t\t\t\t\t\t\t\t{{ tab.label }}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<div class="dropdown-menu bg-dark" aria-labelledby="navbarDropdownAsset" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t\t\t@for (link of tab.links; track link.routerLink || link.label) {\n\t\t\t\t\t\t\t\t\t\t@if ((publicProgram || user) && isInRole(link.role)) {\n\t\t\t\t\t\t\t\t\t\t\t<a class="dropdown-item nav-link" (click)="handleNavLinkClick($event)" [routerLink]="link.routerLink">{{ link.label }}</a>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</ul>\n\t\t\t@if (hasMoreScroll()) {\n\t\t\t\t<div (mouseover)="startScrollLeft()" (mouseout)="stopScrollLeft()" (click)="scrollLeftOnce()">\n\t\t\t\t\t<i class="fa fa-arrow-right" style="color: white; font-size: 20px"></i>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@if (getWindowWidth() < 1200) {\n\t\t\t\t<hr class="navbar-divider-hr" />\n\t\t\t}\n\t\t\t@if ((!publicProgram || user) && !digitalSign) {\n\t\t\t\t<ul [ngClass]="[\'navbar-nav\', \'ms-auto\']">\n\t\t\t\t\t@if (user && getWindowWidth() > 1200 && aiAssistantVisible) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="toggleAiAssistant($event)" [class.disabled]="tourStarted ? true : null">AI Assistant</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user && client && (showSupport || isSuperAdmin())) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav" style="height: 30px" tourAnchor="supportSection">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" routerLink="support-ticket" routerLinkActive="active">Support</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user && isInRole(\'super-admin\')) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" routerLink="logs" routerLinkActive="active">Logs</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user && isInRole(\'super-admin\')) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" routerLink="super-admin" routerLinkActive="active">Super Admin</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user) {\n\t\t\t\t\t\t<li class="nav-item navbar-divider-item">\n\t\t\t\t\t\t\t@if (getWindowWidth() > 1200) {\n\t\t\t\t\t\t\t\t<span class="navbar-divider-pipe" aria-hidden="true"></span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t<hr class="navbar-divider-hr" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (!user) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="login()" style="cursor: pointer" routerLinkActive="active">Login</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user) {\n\t\t\t\t\t\t<li class="nav-item" tourAnchor="userSettings">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" routerLink="user-settings">Hello {{ user.fullname }}!</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user) {\n\t\t\t\t\t\t<li class="nav-item" style="cursor: pointer" (click)="logout()" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" [class.disabled]="tourStarted ? true : null">Logout</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t</ul>\n\t\t\t}\n\t\t</div>\n\t</nav>\n</div>\n',styles:[":root{--font-size: 12}:host ::ng-deep *{font-size:var(--font-size)}@media(max-width:1200px){.navbarMain a{font-size:18px!important}.navbarMain .dropdown-menu{margin-left:10px}.navbar-divider-pipe{display:none}.navbar-divider-hr{display:block;width:100%;height:1px;border:0;border-top:1px solid white;background-color:#fff;color:#fff;opacity:1;margin:.25rem 0}}@media(min-width:1200px){.scrollable-x{max-width:60vw;overflow-x:auto;overflow-y:visible;align-items:center}::-webkit-scrollbar{display:none}.verticalAlign{display:flex;align-items:center}.dropdown{position:static}}.navbar li{cursor:pointer;text-align:center}.navbar-divider-pipe{display:inline-block;align-self:stretch;width:1px;background-color:#fff;opacity:.8;margin:0 .75rem}.navbar-dark .navbar-nav .nav-link:hover,.navbar-dark .navbar-nav .nav-link:focus{color:gray}.navbar-divider-item{display:flex;align-items:stretch}\n"],dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:i1$1.RouterLink,selector:"[routerLink]",inputs:["target","queryParams","fragment","queryParamsHandling","state","info","relativeTo","preserveFragment","skipLocationChange","replaceUrl","routerLink"]},{kind:"directive",type:i1$1.RouterLinkActive,selector:"[routerLinkActive]",inputs:["routerLinkActiveOptions","ariaCurrentWhenActive","routerLinkActive"],outputs:["isActiveChange"],exportAs:["routerLinkActive"]},{kind:"directive",type:ScrollDirective,selector:"[detect-scroll]",inputs:["bottomOffset","topOffset"],outputs:["onScroll"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NavbarMainComponent,decorators:[{type:Component,args:[{selector:"navbar-main",providers:[ProviderService],standalone:!1,template:'<style>\n\t:root {\n\t\t--font-size: 12;\n\t}\n\n\t:host ::ng-deep * {\n\t\tfont-size: var(--font-size);\n\t}\n\n\t@media (max-width: 1200px) {\n\t\t.navbarMain a {\n\t\t\tfont-size: 18px !important;\n\t\t}\n\t\t.navbarMain .dropdown-menu {\n\t\t\tmargin-left: 10px;\n\t\t}\n\t\t.navbar-divider-pipe {\n\t\t\tdisplay: none;\n\t\t}\n\t\t.navbar-divider-hr {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\theight: 1px;\n\t\t\tborder: 0;\n\t\t\tborder-top: 1px solid white;\n\t\t\tbackground-color: white;\n\t\t\tcolor: white;\n\t\t\topacity: 1;\n\t\t\tmargin: 0.25rem 0;\n\t\t}\n\t}\n\t@media (min-width: 1200px) {\n\t\t.scrollable-x {\n\t\t\tmax-width: 60vw;\n\t\t\toverflow-x: auto;\n\t\t\toverflow-y: visible;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t::-webkit-scrollbar {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t.verticalAlign {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t}\n\n\t\t.dropdown {\n\t\t\tposition: static;\n\t\t}\n\t}\n\n\t.navbar li {\n\t\tcursor: pointer;\n\t\ttext-align: center;\n\t}\n\n\t.navbar-divider-pipe {\n\t\tdisplay: inline-block;\n\t\talign-self: stretch;\n\t\twidth: 1px;\n\t\tbackground-color: white;\n\t\topacity: 0.8;\n\t\tmargin: 0 0.75rem;\n\t}\n\n\t.navbar-dark .navbar-nav .nav-link:hover,\n\t.navbar-dark .navbar-nav .nav-link:focus {\n\t\tcolor: gray;\n\t}\n\t.navbar-divider-item {\n\t\tdisplay: flex;\n\t\talign-items: stretch;\n\t}\n</style>\n\n<div class="row">\n\t<nav class="navbar navbar-expand-xl navbar-dark bg-dark navbarMain" style="width: 100%">\n\t\t<a class="navbar-brand" href="#">\n\t\t\t@if (!isDemo) {\n\t\t\t\t<img [src]="logo" style="width: auto; height: 36px" />\n\t\t\t}\n\t\t</a>\n\t\t<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarMainNav" aria-controls="navbarMainNav" aria-expanded="false" aria-label="Toggle navigation">\n\t\t\t<span class="navbar-toggler-icon"></span>\n\t\t</button>\n\t\t<div class="navbar-collapse collapse" id="navbarMainNav">\n\t\t\t<ul class="navbar-nav">\n\t\t\t\t@if (!publicProgram && !digitalSign) {\n\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav" [style.border-right]="getWindowWidth() > 1200 ? \'1px solid white\' : \'\'">\n\t\t\t\t\t\t<a class="nav-link" routerLink="home" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" routerLinkActive="active">Home</a>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t\t@if (hasScrolled()) {\n\t\t\t\t<div (mouseover)="startScrollRight()" (mouseout)="stopScrollRight()" (click)="scrollRightOnce()">\n\t\t\t\t\t<i class="fa fa-arrow-left" style="color: white; font-size: 20px"></i>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<ul [ngClass]="[\'navbar-nav\', \'scrollable-x\']" #scrollable detect-scroll (onScroll)="calculateDropdownsLeft()">\n\t\t\t\t@for (tab of navTabs; track tab.label || tab.links?.[0]?.routerLink || i; let i = $index) {\n\t\t\t\t\t@if (tab.type === \'link\') {\n\t\t\t\t\t\t@if ((publicProgram || user) && !digitalSign && isInRole(tab.links[0].role)) {\n\t\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" [tourAnchor]="tab.tourAnchor" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" [routerLink]="tab.links[0].routerLink" routerLinkActive="active">{{ tab.links[0].label }}</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t@if (tab.type === \'dropdown\') {\n\t\t\t\t\t\t@if ((publicProgram || user) && isInOneRole(tab.roles)) {\n\t\t\t\t\t\t\t<li #dropdowns class="nav-item dropdown">\n\t\t\t\t\t\t\t\t<a class="nav-link dropdown-toggle" [class.disabled]="tourStarted ? true : null" id="navbarDropdownAsset" role="button" [tourAnchor]="tab.tourAnchor" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n\t\t\t\t\t\t\t\t\t{{ tab.label }}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t<div class="dropdown-menu bg-dark" aria-labelledby="navbarDropdownAsset" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t\t\t@for (link of tab.links; track link.routerLink || link.label) {\n\t\t\t\t\t\t\t\t\t\t@if ((publicProgram || user) && isInRole(link.role)) {\n\t\t\t\t\t\t\t\t\t\t\t<a class="dropdown-item nav-link" (click)="handleNavLinkClick($event)" [routerLink]="link.routerLink">{{ link.label }}</a>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</ul>\n\t\t\t@if (hasMoreScroll()) {\n\t\t\t\t<div (mouseover)="startScrollLeft()" (mouseout)="stopScrollLeft()" (click)="scrollLeftOnce()">\n\t\t\t\t\t<i class="fa fa-arrow-right" style="color: white; font-size: 20px"></i>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t@if (getWindowWidth() < 1200) {\n\t\t\t\t<hr class="navbar-divider-hr" />\n\t\t\t}\n\t\t\t@if ((!publicProgram || user) && !digitalSign) {\n\t\t\t\t<ul [ngClass]="[\'navbar-nav\', \'ms-auto\']">\n\t\t\t\t\t@if (user && getWindowWidth() > 1200 && aiAssistantVisible) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="toggleAiAssistant($event)" [class.disabled]="tourStarted ? true : null">AI Assistant</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user && client && (showSupport || isSuperAdmin())) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav" style="height: 30px" tourAnchor="supportSection">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" routerLink="support-ticket" routerLinkActive="active">Support</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user && isInRole(\'super-admin\')) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" routerLink="logs" routerLinkActive="active">Logs</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user && isInRole(\'super-admin\')) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" routerLink="super-admin" routerLinkActive="active">Super Admin</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user) {\n\t\t\t\t\t\t<li class="nav-item navbar-divider-item">\n\t\t\t\t\t\t\t@if (getWindowWidth() > 1200) {\n\t\t\t\t\t\t\t\t<span class="navbar-divider-pipe" aria-hidden="true"></span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t<hr class="navbar-divider-hr" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (!user) {\n\t\t\t\t\t\t<li class="nav-item" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="login()" style="cursor: pointer" routerLinkActive="active">Login</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user) {\n\t\t\t\t\t\t<li class="nav-item" tourAnchor="userSettings">\n\t\t\t\t\t\t\t<a class="nav-link" (click)="handleNavLinkClick($event)" [class.disabled]="tourStarted ? true : null" routerLink="user-settings">Hello {{ user.fullname }}!</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t\t@if (user) {\n\t\t\t\t\t\t<li class="nav-item" style="cursor: pointer" (click)="logout()" data-bs-toggle="collapse" data-bs-target="#navbarMainNav">\n\t\t\t\t\t\t\t<a class="nav-link" [class.disabled]="tourStarted ? true : null">Logout</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t}\n\t\t\t\t</ul>\n\t\t\t}\n\t\t</div>\n\t</nav>\n</div>\n'}]}],ctorParameters:()=>[{type:ProviderService},{type:AuthService},{type:DialogService},{type:CoreService}],propDecorators:{dropdowns:[{type:ViewChildren,args:["dropdowns"]}],scrollable:[{type:ViewChild,args:["scrollable",{static:!0}]}],logo:[{type:Input,args:["logo"]}],navTabs:[{type:Input,args:["navTabs"]}],fontSize:[{type:Input,args:["fontSize"]}],publicProgram:[{type:Input,args:["publicProgram"]}],digitalSign:[{type:Input,args:["digitalSign"]}],showSupport:[{type:Input,args:["showSupport"]}],aiAssistantVisible:[{type:Input,args:["aiAssistantVisible"]}],aiToggle:[{type:Output}]}});class FilterEqualPipe{transform(t,e,n){return t?t.filter(t=>t[e]===n):[]}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FilterEqualPipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:FilterEqualPipe,isStandalone:!1,name:"filterEqual",pure:!1})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FilterEqualPipe,decorators:[{type:Pipe,args:[{name:"filterEqual",pure:!1,standalone:!1}]}]});class FilterNotEqualPipe{transform(t,e,n){return t?t.filter(t=>t[e]!==n):[]}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FilterNotEqualPipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:FilterNotEqualPipe,isStandalone:!1,name:"filterNotEqual"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FilterNotEqualPipe,decorators:[{type:Pipe,args:[{name:"filterNotEqual",standalone:!1}]}]});class NavbarModuleComponent extends BaseComponent{_cdRef;_services;sideNavHeight;sideNavWidth;menuData={title:"",module:null,description:null,description_name:"Description",tabs:[]};selectedTab=null;currentRoute="";routerEvents$=[];tourStarted=!1;drawerOpen=!1;isDeviceWidth=window.innerWidth<=1200;constructor(t,e){super(e),this._cdRef=t,this._services=e}ngOnInit(){this.tourStarted=this._services._app.tourStarted.getValue(),this.routerEvents$.push(this._services._router.events.subscribe(t=>{this._services._router.url.replace(/\/[a-f0-9]{24}$/,"").replace(/\?.+$/,"")===this.currentRoute&&this.selectedTab||this.selectTabFromRouter()})),this.routerEvents$.push(this._services._app.navbarModuleData.subscribe(t=>{this.menuData=t,this._services._router.url.replace(/\/[a-f0-9]{24}$/,"").replace(/\?.+$/,"")===this.currentRoute&&this.selectedTab||this.selectTabFromRouter()})),this.routerEvents$.push(this._services._app.tourStarted.subscribe(t=>{this.tourStarted=t}))}onResize(){this.isDeviceWidth=window.innerWidth<=1200}ngOnDestroy(){this.routerEvents$.forEach(t=>{t.unsubscribe()})}selectTabFromRouter(){if(this.menuData)if("/"===this._services._router.url)this.selectedTab=this.menuData.tabs[0];else{for(this.currentRoute=this._services._router.url.replace(/\/[a-f0-9]{24}$/,"").replace(/\?.+$/,""),this.selectedTab=null;!this.selectedTab&&this.currentRoute.split("/").length>2;){for(let t=0;t<this.menuData.tabs.length;t++){let e=this.menuData.tabs[t];if(e.link===this.currentRoute){this.selectedTab=e;break}}this.currentRoute=this.currentRoute.replace(/(\/[^\/]+$)/,"")}this.selectedTab||(this.selectedTab=this.menuData.tabs[0])}}tabClass(t){return this.selectedTab&&this.selectedTab.label===t.label?"active":""}handleNavLinkClick(t){if(t&&(t.metaKey||t.ctrlKey)){const e=t.currentTarget;e&&e.href&&(window.open(e.href,"_blank"),t.preventDefault(),t.stopPropagation())}}onNavLinkClick(t){this.handleNavLinkClick(t),!t.defaultPrevented&&window.innerWidth<=1200&&(this.drawerOpen=!1)}toggleDrawer(){this.drawerOpen=!this.drawerOpen}navigateTo(t){this.selectedTab!==t&&(this.selectedTab=t,null===t.params?this._services._router.navigateByUrl(t.link):this._services._router.navigateByUrl(t.link+"/"+t.params),window.innerWidth<=1200&&(this.drawerOpen=!1))}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NavbarModuleComponent,deps:[{token:i0.ChangeDetectorRef},{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:NavbarModuleComponent,isStandalone:!1,selector:"navbar-module",inputs:{sideNavHeight:"sideNavHeight",sideNavWidth:"sideNavWidth"},host:{listeners:{"window:resize":"onResize()"}},providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<style>\n\t.navbarModule li {\n\t\tcursor: pointer;\n\t}\n\t.navbarModule li.active {\n\t\tborder-left: 3px solid #d19b3d;\n\t}\n\t.navbarModule nav {\n\t\twidth: 100%;\n\t}\n\t.navbar-module-container {\n\t\tmargin-left: calc(var(--bs-gutter-x, 1.5rem) / -2);\n\t\tmargin-right: calc(var(--bs-gutter-x, 1.5rem) / -2);\n\t}\n\n\t.navbarModule .nav-link {\n\t\tmargin-left: 10px;\n\t}\n\n\t@media (min-width: 1200px) {\n\t\t.navbarModule {\n\t\t\theight: 95vh;\n\t\t\tmargin-left: -10px;\n\t\t}\n\n\t\thr {\n\t\t\tborder-top: white 1px solid;\n\t\t}\n\t}\n\n\t@media (max-width: 1200px) {\n\t\t.device-drawer-margin {\n\t\t\tmargin-left: 10px !important;\n\t\t}\n\n\t\thr {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t.navbarModule a {\n\t\t\tfont-size: 18px !important;\n\t\t}\n\t}\n</style>\n\n<div class="navbar-module-container">\n\t<nav class="navbar navbar-expand-xl navbar-dark bg-dark flex-xl-column navbarModule" [style.height]="sideNavHeight ? sideNavHeight + \'px\' : \'\'" [style.width]="sideNavWidth ? sideNavWidth : \'\'">\n\t\t<div href="#" style="color: white; font-size: 16px; margin-left: 10px;">\n\t\t\t{{ menuData.title }}\n\t\t</div>\n\t\t<button class="navbar-toggler" type="button" [attr.aria-controls]="\'navbarModuleNav\'" [attr.aria-expanded]="drawerOpen" aria-label="Toggle navigation" (click)="toggleDrawer()">\n\t\t\t<span class="navbar-toggler-icon"></span>\n\t\t</button>\n\t\t<div class="navbar-collapse collapse" [class.show]="drawerOpen" [ngClass]="{ \'device-drawer-margin\': isDeviceWidth }" id="navbarModuleNav" style="align-items: baseline; width: 100%; overflow-y: auto; overflow-x: hidden">\n\t\t\t<ul class="navbar-nav" style="display: block; float: left; width: 100%">\n\t\t\t\t@for (tab of menuData.tabs | filterNotEqual: \'params\' : \'0\'; track tab.label; let i = $index) {\n\t\t\t\t\t@if (tab.params !== null && menuData.tabs[i - 1] && menuData.tabs[i - 1].params === null) {\n\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t<div href="#" style="color: white; font-size: 16px">Selected {{ menuData.module }}</div>\n\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t<div style="color: white; margin-left: 5px; text-decoration: underline; font-size: 14px">{{ menuData.description_name }}:</div>\n\t\t\t\t\t\t<div style="color: white; margin-left: 8px; font-size: 12px">{{ menuData.description }}</div>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t}\n\t\t\t\t\t<li [ngClass]="[\'nav-item\', tabClass(tab)]" [tourAnchor]="tab.tourAnchor">\n\t\t\t\t\t\t<a class="nav-link" [class.disabled]="tourStarted ? true : null" (click)="onNavLinkClick($event)" [routerLink]="[tab.params ? tab.link + \'/\' + tab.params : tab.link]" routerLinkActive="active">{{ tab.label }}</a>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t</div>\n\t</nav>\n</div>\n',styles:[".navbarModule li{cursor:pointer}.navbarModule li.active{border-left:3px solid #d19b3d}.navbarModule nav{width:100%}.navbar-module-container{margin-left:calc(var(--bs-gutter-x, 1.5rem) / -2);margin-right:calc(var(--bs-gutter-x, 1.5rem) / -2)}.navbarModule .nav-link{margin-left:10px}@media(min-width:1200px){.navbarModule{height:95vh;margin-left:-10px}hr{border-top:white 1px solid}}@media(max-width:1200px){.device-drawer-margin{margin-left:10px!important}hr{display:none}.navbarModule a{font-size:18px!important}}\n"],dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:i1$1.RouterLink,selector:"[routerLink]",inputs:["target","queryParams","fragment","queryParamsHandling","state","info","relativeTo","preserveFragment","skipLocationChange","replaceUrl","routerLink"]},{kind:"directive",type:i1$1.RouterLinkActive,selector:"[routerLinkActive]",inputs:["routerLinkActiveOptions","ariaCurrentWhenActive","routerLinkActive"],outputs:["isActiveChange"],exportAs:["routerLinkActive"]},{kind:"pipe",type:FilterNotEqualPipe,name:"filterNotEqual"}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NavbarModuleComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"navbar-module",standalone:!1,template:'<style>\n\t.navbarModule li {\n\t\tcursor: pointer;\n\t}\n\t.navbarModule li.active {\n\t\tborder-left: 3px solid #d19b3d;\n\t}\n\t.navbarModule nav {\n\t\twidth: 100%;\n\t}\n\t.navbar-module-container {\n\t\tmargin-left: calc(var(--bs-gutter-x, 1.5rem) / -2);\n\t\tmargin-right: calc(var(--bs-gutter-x, 1.5rem) / -2);\n\t}\n\n\t.navbarModule .nav-link {\n\t\tmargin-left: 10px;\n\t}\n\n\t@media (min-width: 1200px) {\n\t\t.navbarModule {\n\t\t\theight: 95vh;\n\t\t\tmargin-left: -10px;\n\t\t}\n\n\t\thr {\n\t\t\tborder-top: white 1px solid;\n\t\t}\n\t}\n\n\t@media (max-width: 1200px) {\n\t\t.device-drawer-margin {\n\t\t\tmargin-left: 10px !important;\n\t\t}\n\n\t\thr {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t.navbarModule a {\n\t\t\tfont-size: 18px !important;\n\t\t}\n\t}\n</style>\n\n<div class="navbar-module-container">\n\t<nav class="navbar navbar-expand-xl navbar-dark bg-dark flex-xl-column navbarModule" [style.height]="sideNavHeight ? sideNavHeight + \'px\' : \'\'" [style.width]="sideNavWidth ? sideNavWidth : \'\'">\n\t\t<div href="#" style="color: white; font-size: 16px; margin-left: 10px;">\n\t\t\t{{ menuData.title }}\n\t\t</div>\n\t\t<button class="navbar-toggler" type="button" [attr.aria-controls]="\'navbarModuleNav\'" [attr.aria-expanded]="drawerOpen" aria-label="Toggle navigation" (click)="toggleDrawer()">\n\t\t\t<span class="navbar-toggler-icon"></span>\n\t\t</button>\n\t\t<div class="navbar-collapse collapse" [class.show]="drawerOpen" [ngClass]="{ \'device-drawer-margin\': isDeviceWidth }" id="navbarModuleNav" style="align-items: baseline; width: 100%; overflow-y: auto; overflow-x: hidden">\n\t\t\t<ul class="navbar-nav" style="display: block; float: left; width: 100%">\n\t\t\t\t@for (tab of menuData.tabs | filterNotEqual: \'params\' : \'0\'; track tab.label; let i = $index) {\n\t\t\t\t\t@if (tab.params !== null && menuData.tabs[i - 1] && menuData.tabs[i - 1].params === null) {\n\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t<div href="#" style="color: white; font-size: 16px">Selected {{ menuData.module }}</div>\n\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t<div style="color: white; margin-left: 5px; text-decoration: underline; font-size: 14px">{{ menuData.description_name }}:</div>\n\t\t\t\t\t\t<div style="color: white; margin-left: 8px; font-size: 12px">{{ menuData.description }}</div>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t}\n\t\t\t\t\t<li [ngClass]="[\'nav-item\', tabClass(tab)]" [tourAnchor]="tab.tourAnchor">\n\t\t\t\t\t\t<a class="nav-link" [class.disabled]="tourStarted ? true : null" (click)="onNavLinkClick($event)" [routerLink]="[tab.params ? tab.link + \'/\' + tab.params : tab.link]" routerLinkActive="active">{{ tab.label }}</a>\n\t\t\t\t\t</li>\n\t\t\t\t}\n\t\t\t</ul>\n\t\t</div>\n\t</nav>\n</div>\n'}]}],ctorParameters:()=>[{type:i0.ChangeDetectorRef},{type:ProviderService}],propDecorators:{sideNavHeight:[{type:Input}],sideNavWidth:[{type:Input}],onResize:[{type:HostListener,args:["window:resize"]}]}});class CoreComponent extends BaseComponent{_deviceDet;_ds;_resizeService;_services;_offline;_storage;_auth;_aps;_featureGates;environment;logo="";navTabs=[];userHasPhoneNumber=!1;client="";showNavbarModule=!0;publicProgram=!1;showSupport=!0;aiAssistantEnabled=!0;el_navBarMain;el_navBarModule;year=(new Date).getFullYear().toString();fullScreen=!1;windowSizeHeight=window.innerHeight;windowSizeWidth=window.innerWidth;navbarMainHeight=0;statusHeight=0;connectedHeight=0;isDevice=!1;showNavigationMenu=!1;bottomNavSpacerHeight=100;swFlagAlert=null;isConnected=!1;isConnecting=!1;socketStatus;user;status;collapsableMenu=!0;fontSize=12;openedWindow=!1;aiAssistantOpen=!1;aiAssistantAppId="resolveio-assistant";aiAssistantConfig=null;currentRoute="";isOffline=!1;foundUpdate=!1;orientation="portrait";digitalSign=!1;constructor(t,e,n,o,r,i,s,a,l){super(o),this._deviceDet=t,this._ds=e,this._resizeService=n,this._services=o,this._offline=r,this._storage=i,this._auth=s,this._aps=a,this._featureGates=l}ngOnInit(){this._services._app.setEnvironment(this.environment),this.aiAssistantAppId=this.resolveAiAssistantAppId(),this.aiAssistantConfig=this.resolveAiAssistantConfig(),this.currentRoute=this._services._router?.url||"",this._offline.initStorage(this.environment.OFFLINE_DB_SECRET_KEY),this._services._app.setClient(this.client),this._services._app.setNavTabs(this.filterNavTabs(this.navTabs)),this._services._account.initLoginManager(this.environment),this.environment&&this.environment.MS_ALLOWED?this._auth.setupMSSingleSignOn(this.environment):this.environment&&this._auth.setEnvironment(this.environment),this._auth.setUserHasPhoneNumber(this.userHasPhoneNumber),this._resizeService.onResize$.subscribe(t=>{setTimeout(()=>{this.windowSizeHeight=t.innerHeight,this.windowSizeWidth=t.innerWidth,this.updateStandaloneNavigation()},100)}),this._services._app.fullScreen.subscribe(t=>{this.fullScreen=t}),this._services._account.user.subscribe(t=>{t&&t.settings?(this.collapsableMenu=t.settings.collapsable_menu,this.fontSize=t.settings.font_size,document.documentElement.style.setProperty("--warning-color",t.settings.warning_color),document.documentElement.style.setProperty("--warning-font-color",t.settings.warning_font_color),document.documentElement.style.setProperty("--warning-shadow-color","0 0 0 0.2rem "+hexToRGB$1(t.settings.warning_color,.5)),document.documentElement.style.setProperty("--warning-hover-color",t.settings.warning_hover_color),document.documentElement.style.setProperty("--success-color",t.settings.success_color),document.documentElement.style.setProperty("--success-font-color",t.settings.success_font_color),document.documentElement.style.setProperty("--success-shadow-color","0 0 0 0.2rem "+hexToRGB$1(t.settings.success_color,.5)),document.documentElement.style.setProperty("--success-hover-color",t.settings.success_hover_color),document.documentElement.style.setProperty("--danger-color",t.settings.danger_color),document.documentElement.style.setProperty("--danger-font-color",t.settings.danger_font_color),document.documentElement.style.setProperty("--danger-shadow-color","0 0 0 0.2rem "+hexToRGB$1(t.settings.danger_color,.5)),document.documentElement.style.setProperty("--danger-hover-color",t.settings.danger_hover_color),document.documentElement.style.setProperty("--info-color",t.settings.info_color),document.documentElement.style.setProperty("--info-font-color",t.settings.info_font_color),document.documentElement.style.setProperty("--info-shadow-color","0 0 0 0.2rem "+hexToRGB$1(t.settings.info_color,.5)),document.documentElement.style.setProperty("--info-hover-color",t.settings.info_hover_color),document.documentElement.style.setProperty("--primary-color",t.settings.primary_color),document.documentElement.style.setProperty("--primary-font-color",t.settings.primary_font_color),document.documentElement.style.setProperty("--primary-shadow-color","0 0 0 0.2rem "+hexToRGB$1(t.settings.primary_color,.5)),document.documentElement.style.setProperty("--primary-hover-color",t.settings.primary_hover_color),document.documentElement.style.setProperty("--secondary-color",t.settings.secondary_color),document.documentElement.style.setProperty("--secondary-font-color",t.settings.secondary_font_color),document.documentElement.style.setProperty("--secondary-shadow-color","0 0 0 0.2rem "+hexToRGB$1(t.settings.secondary_color,.5)),document.documentElement.style.setProperty("--secondary-hover-color",t.settings.secondary_hover_color)):!t||t.other.customers&&t.other.customers.length||t.other.id_customer||t.settings||this.openedWindow?(document.documentElement.style.setProperty("--warning-color","#ffc107"),document.documentElement.style.setProperty("--warning-font-color","#000000"),document.documentElement.style.setProperty("--warning-shadow-color","0 0 0 0.2rem rgba(222, 170, 12, 0.5)"),document.documentElement.style.setProperty("--warning-hover-color","#e0a800"),document.documentElement.style.setProperty("--success-color","#28a745"),document.documentElement.style.setProperty("--success-font-color","#ffffff"),document.documentElement.style.setProperty("--success-shadow-color","0 0 0 0.2rem rgba(72, 180, 97, 0.5)"),document.documentElement.style.setProperty("--success-hover-color","#218838"),document.documentElement.style.setProperty("--danger-color","#dc3545"),document.documentElement.style.setProperty("--danger-font-color","#ffffff"),document.documentElement.style.setProperty("--danger-shadow-color","0 0 0 0.2rem rgba(225, 83, 97, 0.5)"),document.documentElement.style.setProperty("--danger-hover-color","#c82333"),document.documentElement.style.setProperty("--info-color","#17a2b8"),document.documentElement.style.setProperty("--info-font-color","#ffffff"),document.documentElement.style.setProperty("--info-shadow-color","0 0 0 0.2rem rgba(58, 176, 195, 0.5)"),document.documentElement.style.setProperty("--info-hover-color","#138496"),document.documentElement.style.setProperty("--primary-color","#007bff"),document.documentElement.style.setProperty("--primary-font-color","#ffffff"),document.documentElement.style.setProperty("--primary-shadow-color","0 0 0 0.2rem rgba(38, 143, 255, 0.5)"),document.documentElement.style.setProperty("--primary-hover-color","#0069d9"),document.documentElement.style.setProperty("--secondary-color","#868e96"),document.documentElement.style.setProperty("--secondary-font-color","#ffffff"),document.documentElement.style.setProperty("--secondary-shadow-color","0 0 0 0.2rem rgba(130, 138, 145, 0.5)"),document.documentElement.style.setProperty("--secondary-hover-color","#5a6268"),this.fontSize=12):(this.openedWindow=!0,document.documentElement.style.setProperty("--warning-color","#ffc107"),document.documentElement.style.setProperty("--warning-font-color","#000000"),document.documentElement.style.setProperty("--warning-shadow-color","0 0 0 0.2rem rgba(222, 170, 12, 0.5)"),document.documentElement.style.setProperty("--warning-hover-color","#e0a800"),document.documentElement.style.setProperty("--success-color","#28a745"),document.documentElement.style.setProperty("--success-font-color","#ffffff"),document.documentElement.style.setProperty("--success-shadow-color","0 0 0 0.2rem rgba(72, 180, 97, 0.5)"),document.documentElement.style.setProperty("--success-hover-color","#218838"),document.documentElement.style.setProperty("--danger-color","#dc3545"),document.documentElement.style.setProperty("--danger-font-color","#ffffff"),document.documentElement.style.setProperty("--danger-shadow-color","0 0 0 0.2rem rgba(225, 83, 97, 0.5)"),document.documentElement.style.setProperty("--danger-hover-color","#c82333"),document.documentElement.style.setProperty("--info-color","#17a2b8"),document.documentElement.style.setProperty("--info-font-color","#ffffff"),document.documentElement.style.setProperty("--info-shadow-color","0 0 0 0.2rem rgba(58, 176, 195, 0.5)"),document.documentElement.style.setProperty("--info-hover-color","#138496"),document.documentElement.style.setProperty("--primary-color","#007bff"),document.documentElement.style.setProperty("--primary-font-color","#ffffff"),document.documentElement.style.setProperty("--primary-shadow-color","0 0 0 0.2rem rgba(38, 143, 255, 0.5)"),document.documentElement.style.setProperty("--primary-hover-color","#0069d9"),document.documentElement.style.setProperty("--secondary-color","#868e96"),document.documentElement.style.setProperty("--secondary-font-color","#ffffff"),document.documentElement.style.setProperty("--secondary-shadow-color","0 0 0 0.2rem rgba(130, 138, 145, 0.5)"),document.documentElement.style.setProperty("--secondary-hover-color","#5a6268"),this.fontSize=12,this._ds.notify("Hello, "+t.fullname+" it looks like there are no user settings saved for you. To adjust your user settings click your name at the top of the page next to the logout button, adjust any settings you want, then click submit to apply them."),this._services._router.navigateByUrl(this._services._router.url.split("/")[0]+"/user-settings/settings")),this.user=t}),this._deviceDet.isMobile()||this._deviceDet.isTablet()?(this._services._app.setIsDevice(!0),this.isDevice=!0):(this._services._app.setIsDevice(!1),this.isDevice=!1),this.updateStandaloneNavigation(),this.environment.IS_PRODUCTION&&this._services._socket.subscribeBypassRoute("flagUpdateWithType","newSW").subscribe(t=>{t?(this.swFlagAlert=this._services._alert.setAlert("info","This page will reload once new version has been downloaded",0),this._services._app.setIsInvalidSW(!0),navigator.serviceWorker?navigator.serviceWorker.getRegistrations().then(t=>{t&&t.length||setTimeout(()=>{window.location.reload()},3e3)},t=>{setTimeout(()=>{window.location.reload()},3e3)}):setTimeout(()=>{window.location.reload()},3e3)):this.swFlagAlert&&(this._services._app.setIsInvalidSW(!1),this._services._alert.clearAlert(this.swFlagAlert.toastId),this.swFlagAlert=null)}),this._offline.offlineMode.subscribe(t=>{this.isOffline=t}),this._services._account.getSocketStatus().subscribe(t=>{this.socketStatus=t,this.publicProgram||this.digitalSign?this.connectedHeight=0:(this.user?(this.socketStatus===WebSocket.OPEN?(this.isConnected=!0,this.isConnecting=!1):(this.isConnected=!1,this.socketStatus===WebSocket.CONNECTING?this.isConnecting=!0:this.isConnecting=!1),this.isConnected?this.connectedHeight=0:this.connectedHeight=40):(this.isConnected=!1,this.isConnecting=!1,this.connectedHeight=40),this.isConnected||(this.aiAssistantOpen=!1))}),this._services._socket.subscribeBypassRoute("appstatus").subscribe(t=>{this.status=t,this._services._app.setHasStatusMessage(!!this.status),this.statusHeight=this.publicProgram||this.digitalSign?0:this.status?40:0}),setTimeout(()=>{this.navbarMainHeight=this.el_navBarMain.nativeElement.children[0].clientHeight},100),setTimeout(()=>{this.navbarMainHeight=this.el_navBarMain.nativeElement.children[0].clientHeight},1e3),setTimeout(()=>{this.navbarMainHeight=this.el_navBarMain.nativeElement.children[0].clientHeight},5e3);let t,e=!1,n=this._storage.get("lastURL");this._services._router.events.subscribe(t=>{t.url&&t.url.startsWith("/digital-sign?")&&(this.digitalSign=!0),t.urlAfterRedirects?this.currentRoute=t.urlAfterRedirects:t.url&&(this.currentRoute=t.url),this.isDevice&&(n&&"/"!==n&&!e&&(""!==t.url&&"/"!==t.url||this._services._router.navigateByUrl(n)),e=!0,t.url?this._storage.set("lastURL",t.url):t.urlAfterRedirects&&this._storage.set("lastURL",t.urlAfterRedirects))}),window.addEventListener("orientationchange",()=>{-90===window.orientation&&(this.orientation="landscape"),90===window.orientation&&(this.orientation="landscape"),0===window.orientation&&(this.orientation="portrait")},!0),document.addEventListener("focus",function(){document.activeElement instanceof HTMLElement&&"INPUT"===document.activeElement.nodeName&&"number"===document.activeElement.type&&(t=!0,document.addEventListener("mousewheel",handleMousewheelEvent,{passive:!0}))},!0),document.addEventListener("blur",function(){t&&(t=!1,document.removeEventListener("mousewheel",handleMousewheelEvent))},!0),window.addEventListener("dragover",t=>{(t||event).preventDefault()},!1),window.addEventListener("drop",t=>{(t||event).preventDefault()},!1)}filterNavTabs(t){if(!Array.isArray(t))return[];const e=this._aps.getAllModulePermissions(),n=[];return t.forEach(t=>{if(!t||!Array.isArray(t.links))return void n.push(t);const o=t.links.filter(t=>this.isRoleGateEnabled(t.role,e));if(!o.length)return;const r={...t,links:o};if("dropdown"===t.type){const n=Array.isArray(t.roles)?t.roles.filter(t=>this.isRoleGateEnabled(t,e)):[];if(!n.length)return;r.roles=n}n.push(r)}),n}isRoleGateEnabled(t,e){return!t||this._featureGates.isLinkEnabled(t,e,!0)}getNavbarModuleHeight(){return this.el_navBarModule?this.el_navBarModule.nativeElement.children[0].clientHeight:0}updateStandaloneNavigation(){const t=this.isStandaloneMode(),e=this.windowSizeWidth<=1200;this.showNavigationMenu=this.isDevice&&t&&e,!e&&this.aiAssistantEnabled||(this.aiAssistantOpen=!1)}toggleAiAssistant(){this.aiAssistantEnabled&&this.isConnected&&(this.aiAssistantOpen=!this.aiAssistantOpen)}openAiAssistant(){this.aiAssistantEnabled&&this.isConnected&&(this.aiAssistantOpen=!0)}closeAiAssistant(){this.aiAssistantOpen=!1}getAiAssistantTopOffset(){return this.navbarMainHeight+this.statusHeight+this.connectedHeight}getAiAssistantHeight(){const t=this.getAiAssistantTopOffset(),e=this.showNavigationMenu?54+this.getNavbarModuleHeight():0,n=!this.isDevice||this.isDevice&&this.showNavigationMenu?20:0,o=this.windowSizeHeight-t-e-n;return o>0?o:0}getAiAssistantReservedWidth(){if(!this.aiAssistantEnabled||!this.user||this.isDevice||this.windowSizeWidth<=1200||this.digitalSign||this.publicProgram)return 0;if(!this.aiAssistantOpen)return 46;const t=Math.max(0,this.windowSizeWidth-46);return 46+Math.min(.33*this.windowSizeWidth,t)}resolveAiAssistantAppId(){const t=this.environment||{},e=t.AI_ASSISTANT_APP_ID||t.APP_ID||t.CLIENT_APP_ID||"";return String(e||"resolveio-assistant").trim()}resolveAiAssistantConfig(){const t=this.environment||{},e=this.normalizeOptionalEnvString(t.AI_ASSISTANT_CODEX_MODEL||t.AI_TERMINAL_CODEX_MODEL||t.AI_DASHBOARD_CODEX_MODEL),n=this.resolveEnvModelList(t.AI_ASSISTANT_CODEX_FALLBACK_MODELS||t.AI_TERMINAL_CODEX_FALLBACK_MODELS||t.AI_DASHBOARD_CODEX_FALLBACK_MODELS),o=this.normalizeOptionalEnvString(t.AI_ASSISTANT_CODEX_FALLBACK_MODEL||t.AI_TERMINAL_CODEX_FALLBACK_MODEL||t.AI_DASHBOARD_CODEX_FALLBACK_MODEL);if(o&&!n.includes(o)&&n.unshift(o),e){const t=n.filter(t=>t!==e);n.length=0,t.forEach(t=>n.push(t))}if(!e&&!n.length)return null;const r={};return e&&(r.model=e),1===n.length?r.fallbackModel=n[0]:n.length>1&&(r.fallbackModels=n),r}resolveEnvModelList(t){const e=[],n=t=>{const n=this.normalizeOptionalEnvString(t);n&&!e.includes(n)&&e.push(n)};if(Array.isArray(t))return t.forEach(n),e;const o=this.normalizeOptionalEnvString(t);return o?(o.split(",").forEach(n),e):e}normalizeOptionalEnvString(t){return"string"==typeof t?t.trim():""}onPushBackButton(){window.history.back()}onPushReloadButton(){window.location.reload()}onPushForwardButton(){window.history.forward()}openNav(){let t=document.getElementById("navSid"),e=document.getElementById("main_cont");t&&e&&("40px"===t.style.width&&"45px"===e.style.paddingLeft?(t.style.width="195px",e.style.paddingLeft="210px"):(t.style.width="40px",e.style.paddingLeft="45px"))}closeNav(){let t=document.getElementById("navSid"),e=document.getElementById("main_cont");t&&e&&(t.style.width="40px",e.style.paddingLeft="45px")}isStandaloneMode(){if("undefined"==typeof window)return!1;const t=window.navigator,e=!(!t||!t.standalone),n="function"==typeof window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches;return e||n}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreComponent,deps:[{token:i1$4.DeviceDetectorService},{token:DialogService},{token:ResizeService},{token:ProviderService},{token:OfflineManagerService},{token:LocalStorageService},{token:AuthService},{token:AuthPermissionService},{token:FeatureGateService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:CoreComponent,isStandalone:!1,selector:"resolveio-client-lib-core",inputs:{environment:"environment",logo:"logo",navTabs:"navTabs",userHasPhoneNumber:"userHasPhoneNumber",client:"client",showNavbarModule:"showNavbarModule",publicProgram:"publicProgram",showSupport:"showSupport",aiAssistantEnabled:"aiAssistantEnabled"},providers:[ProviderService],viewQueries:[{propertyName:"el_navBarMain",first:!0,predicate:["navBarMain"],descendants:!0,read:ElementRef,static:!0},{propertyName:"el_navBarModule",first:!0,predicate:["navBarModule"],descendants:!0,read:ElementRef,static:!0}],usesInheritance:!0,ngImport:i0,template:'<style>\n\t:root {\n\t\t--warning-color: #ffc107;\n\t\t--warning-font-color: #000000;\n\t\t--warning-hover-color: #e0a800;\n\t\t--warning-shadow-color: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);\n\t\t--success-color: #28a745;\n\t\t--success-font-color: #ffffff;\n\t\t--success-hover-color: #218838;\n\t\t--success-shadow-color: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);\n\t\t--danger-color: #dc3545;\n\t\t--danger-font-color: #ffffff;\n\t\t--danger-hover-color: #c82333;\n\t\t--danger-shadow-color: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);\n\t\t--info-color: #17a2b8;\n\t\t--info-font-color: #ffffff;\n\t\t--info-hover-color: #138496;\n\t\t--info-shadow-color: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);\n\t\t--primary-color: #007bff;\n\t\t--primary-font-color: #ffffff;\n\t\t--primary-hover-color: #0069d9;\n\t\t--primary-shadow-color: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);\n\t\t--secondary-color: #868e96;\n\t\t--secondary-font-color: #ffffff;\n\t\t--secondary-hover-color: #5a6268;\n\t\t--secondary-shadow-color: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);\n\t}\n\n\t:host ::ng-deep .btn-warning {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-color);\n\t\tborder-color: var(--warning-color);\n\t}\n\t:host ::ng-deep .btn-warning:focus,\n\t.btn-warning.focus {\n\t\tbox-shadow: var(--warning-shadow-color);\n\t}\n\t:host ::ng-deep .btn-warning:hover {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-hover-color);\n\t\tborder-color: var(--warning-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-success {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-color);\n\t\tborder-color: var(--success-color);\n\t}\n\t:host ::ng-deep .btn-success:focus,\n\t.btn-success.focus {\n\t\tbox-shadow: var(--success-shadow-color);\n\t}\n\t:host ::ng-deep .btn-success:hover {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-hover-color);\n\t\tborder-color: var(--success-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-danger {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-color);\n\t\tborder-color: var(--danger-color);\n\t}\n\t:host ::ng-deep .btn-danger:focus,\n\t.btn-danger.focus {\n\t\tbox-shadow: var(--danger-shadow-color);\n\t}\n\t:host ::ng-deep .btn-danger:hover {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-hover-color);\n\t\tborder-color: var(--danger-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-info {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-color);\n\t\tborder-color: var(--info-color);\n\t}\n\t:host ::ng-deep .btn-info:focus,\n\t.btn-info.focus {\n\t\tbox-shadow: var(--info-shadow-color);\n\t}\n\t:host ::ng-deep .btn-info:hover {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-hover-color);\n\t\tborder-color: var(--info-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-primary {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-color);\n\t\tborder-color: var(--primary-color);\n\t}\n\t:host ::ng-deep .btn-primary:focus,\n\t.btn-primary.focus {\n\t\tbox-shadow: var(--primary-shadow-color);\n\t}\n\t:host ::ng-deep .btn-primary:hover {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-hover-color);\n\t\tborder-color: var(--primary-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-secondary {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-color);\n\t\tborder-color: var(--secondary-color);\n\t}\n\t:host ::ng-deep .btn-secondary:focus,\n\t.btn-secondary.focus {\n\t\tbox-shadow: var(--secondary-shadow-color);\n\t}\n\t:host ::ng-deep .btn-secondary:hover {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-hover-color);\n\t\tborder-color: var(--secondary-hover-color);\n\t}\n\n\t@media print {\n\t\t.dontPrint * {\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t.myDivToPrintCs {\n\t\t\tbackground-color: white;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 12px;\n\t\t\tpage-break-after: avoid;\n\t\t\tdisplay: initial;\n\t\t}\n\n\t\t.removeOverflow {\n\t\t\toverflow-y: hidden !important;\n\t\t\theight: 100% !important;\n\t\t}\n\t}\n\n\t.hideThis {\n\t\tdisplay: none !important;\n\t}\n\n\t.navSidbar {\n\t\twidth: 0px;\n\t\tposition: fixed;\n\t\tz-index: 1;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tbackground-color: var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1)) !important;\n\t\toverflow: hidden;\n\t\ttransition: 0.5s;\n\t\tpadding-top: 0px;\n\t}\n\n\t.navSidbar a {\n\t\tpadding: 8px 8px 8px 32px;\n\t\ttext-decoration: none;\n\t\tfont-size: 25px;\n\t\tcolor: #818181;\n\t\tdisplay: block;\n\t\ttransition: 0.3s;\n\t}\n\n\t.navSidbar a:hover {\n\t\tcolor: #f1f1f1;\n\t}\n\n\t.openbtn {\n\t\tbackground-color: var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1)) !important;\n\t\tborder: none;\n\t\tcolor: #fff;\n\t\tpadding: 5px 20px;\n\t\tfont-size: 18px;\n\t\tright: 0;\n\t\ttop: 0px;\n\t\tposition: absolute;\n\t\tz-index: 999999;\n\t\tcursor: pointer;\n\t\tfloat: right;\n\t\theight: 100%;\n\t}\n\n\t.openbtn span {\n\t\tfont-size: 20px;\n\t\tdisplay: block;\n\t\theight: auto;\n\t\twidth: auto;\n\t\ttext-align: center;\n\t\tposition: absolute;\n\t\tleft: 50%;\n\t\ttop: 50%;\n\t\ttransform: translate(-50%, -50%) rotate(-90deg);\n\t\tmargin-top: -55px;\n\t\tletter-spacing: 30px;\n\t}\n\n\t.ai-openbtn {\n\t\tdisplay: none;\n\t}\n\t#main_cont {\n\t\ttransition: padding-left 0.5s;\n\t}\n\n\t.sid_inr {\n\t\tpadding-left: 25px;\n\t}\n\n\t@keyframes shimmer {\n\t\t0%,\n\t\t50% {\n\t\t\tbackground-position: 120% 0;\n\t\t}\n\t\t100% {\n\t\t\tbackground-position: -80% 0;\n\t\t}\n\t}\n\n\t.shimmer::before {\n\t\tcontent: \'\';\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tbackground: linear-gradient(-75deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 60%);\n\t\tbackground-size: 200% 100%;\n\t\tanimation: shimmer 5s linear infinite;\n\t\tanimation-fill-mode: forwards;\n\t\tz-index: 11;\n\t}\n\n\t.scroll-shell {\n\t\toverscroll-behavior-y: contain;\n\t}\n\n\t.scroll-bottom-spacer {\n\t\tpointer-events: none;\n\t}\n</style>\n@if (isDevice) {\n\t<link rel="stylesheet" type="text/css" href="/assets/css/tablet.css" />\n}\n<div #shell [style.height]="isDevice && showNavigationMenu ? \'100vh\' : null" [style.overflow]="isDevice && showNavigationMenu ? \'hidden\' : null">\n\t@if (user && (!isConnected || isOffline) && !publicProgram && !digitalSign) {\n\t\t<div style="height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white">\n\t\t\t<div style="padding-top: 9px; padding-bottom: 9px" class="shimmer">*** OFFLINE MODE ***</div>\n\t\t</div>\n\t}\n\t@if (!user && (!isConnected || isOffline) && !publicProgram && !digitalSign) {\n\t\t<div style="height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white">\n\t\t\t<div style="padding-top: 9px; padding-bottom: 9px" class="shimmer">*** PLEASE LOGIN ***</div>\n\t\t</div>\n\t}\n\t@if (status) {\n\t\t<div style="height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white">\n\t\t\t<div style="padding-top: 9px; padding-bottom: 9px" class="shimmer">*** {{ status.message }} ***</div>\n\t\t</div>\n\t}\n\t@if (fullScreen) {\n\t\t<router-outlet name="jobboardfsoutlet"></router-outlet>\n\t}\n\t<div [ngClass]="[\'container-fluid\', fullScreen ? \'hideThis\' : \'\']" [style.font-size.px]="fontSize">\n\t\t<div class="dontPrint">\n\t\t\t<navbar-main style="width: 100%" tourAnchor="navBarMain" #navBarMain [logo]="logo" [showSupport]="showSupport" [navTabs]="navTabs" [fontSize]="fontSize" [publicProgram]="publicProgram || digitalSign" [digitalSign]="digitalSign" [aiAssistantVisible]="aiAssistantEnabled && isConnected" (aiToggle)="toggleAiAssistant()"></navbar-main>\n\t\t</div>\n\t\t<ng-template ngbModalContainer></ng-template>\n\t\t@if (aiAssistantEnabled && user && isConnected && !isDevice && windowSizeWidth > 1200 && !digitalSign && !publicProgram) {\n\t\t\t<rio-ai-assistant\n\t\t\t\t[idClient]="client"\n\t\t\t\t[idApp]="aiAssistantAppId"\n\t\t\t\t[config]="aiAssistantConfig"\n\t\t\t\t[open]="aiAssistantOpen"\n\t\t\t\t[currentRoute]="currentRoute"\n\t\t\t\t[topOffset]="getAiAssistantTopOffset()"\n\t\t\t\t[panelHeight]="getAiAssistantHeight()"\n\t\t\t\t(openRequested)="openAiAssistant()"\n\t\t\t\t(closed)="closeAiAssistant()"></rio-ai-assistant>\n\t\t}\n\t\t<div class="row">\n\t\t\t@if (showNavbarModule && !digitalSign) {\n\t\t\t\t<div id="navSid" [ngClass]="[\'dontPrint\', windowSizeWidth > 1200 && collapsableMenu ? \'navSidbar\' : \'col-xl-1\']" [style.width]="windowSizeWidth > 1200 && collapsableMenu ? \'40px\' : windowSizeWidth > 1200 ? \'\' : \'100%\'" [style.margin-top.px]="windowSizeWidth > 1200 && collapsableMenu ? navbarMainHeight + statusHeight + connectedHeight : 0">\n\t\t\t\t\t@if (windowSizeWidth > 1200 && collapsableMenu) {\n\t\t\t\t\t\t<div class="openbtn" (mouseenter)="openNav()"><span>MENU</span></div>\n\t\t\t\t\t}\n\t\t\t\t\t<div [ngClass]="windowSizeWidth > 1200 && collapsableMenu ? \'sid_inr\' : \'\'">\n\t\t\t\t\t\t<navbar-module #navBarModule tourAnchor="navBarModule" [sideNavWidth]="windowSizeWidth > 1200 && collapsableMenu ? \'90%\' : \'auto\'" [sideNavHeight]="windowSizeWidth > 1200 ? windowSizeHeight - navbarMainHeight - statusHeight - connectedHeight - (showNavigationMenu ? 54 + getNavbarModuleHeight() : 0) - (!isDevice || (isDevice && showNavigationMenu) ? 20 : 0) : \'\'"></navbar-module>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<div [id]="windowSizeWidth > 1200 ? \'main_cont\' : \'main_cont_mobile\'" [ngClass]="[windowSizeWidth > 1200 && collapsableMenu ? \'col-xl-12\' : \'col-xl-11\']" [style.padding-left]="windowSizeWidth > 1200 && collapsableMenu && showNavbarModule ? 45 + \'px\' : null" [style.padding-right.px]="getAiAssistantReservedWidth()" (mouseenter)="windowSizeWidth > 1200 && collapsableMenu && showNavbarModule ? closeNav() : null" style="padding-top: 5px">\n\t\t\t\t<div style="-webkit-overflow-scrolling: touch" [style.overflow-y]="isDevice && !showNavigationMenu ? \'initial\' : \'scroll\'" [style.height.px]="windowSizeHeight - (isDevice && windowSizeWidth <= 1200 && !showNavigationMenu ? (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight()) : 0) - navbarMainHeight - (!publicProgram && !digitalSign ? statusHeight : 0) - (!publicProgram && !digitalSign ? connectedHeight : 0) - (isDevice && showNavigationMenu ? (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight()) : 0) - (!isDevice || (isDevice && showNavigationMenu) ? 20 : 0) - 5" class="removeOverflow scroll-shell">\n\t\t\t\t\t<router-outlet></router-outlet>\n\t\t\t\t\t<div class="scroll-bottom-spacer" [style.height.px]="isDevice && showNavigationMenu ? bottomNavSpacerHeight : 0" aria-hidden="true"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t@if (isDevice && showNavigationMenu) {\n\t\t\t<div style="position: fixed; left: 0; right: 0; bottom: 0; height: calc(54px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background-color: lightgray; z-index: 9999" class="dontPrint">\n\t\t\t\t<table style="width: 100%">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style="text-align: center">\n\t\t\t\t\t\t\t<button type="button" class="btn" style="background-color: lightgray" (click)="onPushBackButton()"><i class="fa fa-arrow-left" style="color: black; font-size: 20px"></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td style="text-align: center">\n\t\t\t\t\t\t\t<button type="button" class="btn" style="background-color: lightgray" (click)="onPushReloadButton()"><i class="fa fa-refresh" style="color: black; font-size: 20px"></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td style="text-align: center">\n\t\t\t\t\t\t\t<button type="button" class="btn" style="background-color: lightgray" (click)="onPushForwardButton()"><i class="fa fa-arrow-right" style="color: black; font-size: 20px"></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t}\n\t\t@if (!isDevice) {\n\t\t\t<div style="text-align: center; height: 20px; font-style: italic; font-weight: bold; background-color: lightgray; margin-left: -15px; margin-right: -15px">© {{ year }} RESOLVEIO ALL RIGHTS RESERVED</div>\n\t\t}\n\t</div>\n</div>\n',styles:[':root{--warning-color: #ffc107;--warning-font-color: #000000;--warning-hover-color: #e0a800;--warning-shadow-color: 0 0 0 .2rem rgba(222, 170, 12, .5);--success-color: #28a745;--success-font-color: #ffffff;--success-hover-color: #218838;--success-shadow-color: 0 0 0 .2rem rgba(72, 180, 97, .5);--danger-color: #dc3545;--danger-font-color: #ffffff;--danger-hover-color: #c82333;--danger-shadow-color: 0 0 0 .2rem rgba(225, 83, 97, .5);--info-color: #17a2b8;--info-font-color: #ffffff;--info-hover-color: #138496;--info-shadow-color: 0 0 0 .2rem rgba(58, 176, 195, .5);--primary-color: #007bff;--primary-font-color: #ffffff;--primary-hover-color: #0069d9;--primary-shadow-color: 0 0 0 .2rem rgba(38, 143, 255, .5);--secondary-color: #868e96;--secondary-font-color: #ffffff;--secondary-hover-color: #5a6268;--secondary-shadow-color: 0 0 0 .2rem rgba(130, 138, 145, .5)}:host ::ng-deep .btn-warning{color:var(--warning-font-color);background-color:var(--warning-color);border-color:var(--warning-color)}:host ::ng-deep .btn-warning:focus,.btn-warning.focus{box-shadow:var(--warning-shadow-color)}:host ::ng-deep .btn-warning:hover{color:var(--warning-font-color);background-color:var(--warning-hover-color);border-color:var(--warning-hover-color)}:host ::ng-deep .btn-success{color:var(--success-font-color);background-color:var(--success-color);border-color:var(--success-color)}:host ::ng-deep .btn-success:focus,.btn-success.focus{box-shadow:var(--success-shadow-color)}:host ::ng-deep .btn-success:hover{color:var(--success-font-color);background-color:var(--success-hover-color);border-color:var(--success-hover-color)}:host ::ng-deep .btn-danger{color:var(--danger-font-color);background-color:var(--danger-color);border-color:var(--danger-color)}:host ::ng-deep .btn-danger:focus,.btn-danger.focus{box-shadow:var(--danger-shadow-color)}:host ::ng-deep .btn-danger:hover{color:var(--danger-font-color);background-color:var(--danger-hover-color);border-color:var(--danger-hover-color)}:host ::ng-deep .btn-info{color:var(--info-font-color);background-color:var(--info-color);border-color:var(--info-color)}:host ::ng-deep .btn-info:focus,.btn-info.focus{box-shadow:var(--info-shadow-color)}:host ::ng-deep .btn-info:hover{color:var(--info-font-color);background-color:var(--info-hover-color);border-color:var(--info-hover-color)}:host ::ng-deep .btn-primary{color:var(--primary-font-color);background-color:var(--primary-color);border-color:var(--primary-color)}:host ::ng-deep .btn-primary:focus,.btn-primary.focus{box-shadow:var(--primary-shadow-color)}:host ::ng-deep .btn-primary:hover{color:var(--primary-font-color);background-color:var(--primary-hover-color);border-color:var(--primary-hover-color)}:host ::ng-deep .btn-secondary{color:var(--secondary-font-color);background-color:var(--secondary-color);border-color:var(--secondary-color)}:host ::ng-deep .btn-secondary:focus,.btn-secondary.focus{box-shadow:var(--secondary-shadow-color)}:host ::ng-deep .btn-secondary:hover{color:var(--secondary-font-color);background-color:var(--secondary-hover-color);border-color:var(--secondary-hover-color)}@media print{.dontPrint *{display:none!important}.myDivToPrintCs{background-color:#fff;height:100%;width:100%;font-size:12px;line-height:12px;page-break-after:avoid;display:initial}.removeOverflow{overflow-y:hidden!important;height:100%!important}}.hideThis{display:none!important}.navSidbar{width:0px;position:fixed;z-index:1;top:0;left:0;background-color:var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1))!important;overflow:hidden;transition:.5s;padding-top:0}.navSidbar a{padding:8px 8px 8px 32px;text-decoration:none;font-size:25px;color:#818181;display:block;transition:.3s}.navSidbar a:hover{color:#f1f1f1}.openbtn{background-color:var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1))!important;border:none;color:#fff;padding:5px 20px;font-size:18px;right:0;top:0;position:absolute;z-index:999999;cursor:pointer;float:right;height:100%}.openbtn span{font-size:20px;display:block;height:auto;width:auto;text-align:center;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-90deg);margin-top:-55px;letter-spacing:30px}.ai-openbtn{display:none}#main_cont{transition:padding-left .5s}.sid_inr{padding-left:25px}@keyframes shimmer{0%,50%{background-position:120% 0}to{background-position:-80% 0}}.shimmer:before{content:"";position:absolute;inset:0;background:linear-gradient(-75deg,#fff0 40%,#ffffffb3,#fff0 60%);background-size:200% 100%;animation:shimmer 5s linear infinite;animation-fill-mode:forwards;z-index:11}.scroll-shell{overscroll-behavior-y:contain}.scroll-bottom-spacer{pointer-events:none}\n'],dependencies:[{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"directive",type:i1$1.RouterOutlet,selector:"router-outlet",inputs:["name","routerOutletData"],outputs:["activate","deactivate","attach","detach"],exportAs:["outlet"]},{kind:"component",type:AiAssistantComponent,selector:"rio-ai-assistant",inputs:["idClient","idApp","title","open","supportTicketRoute","supportTicketEnabled","config","topOffset","panelHeight","currentRoute","hoverEnabled"],outputs:["openRequested","closed"]},{kind:"component",type:NavbarMainComponent,selector:"navbar-main",inputs:["logo","navTabs","fontSize","publicProgram","digitalSign","showSupport","aiAssistantVisible"],outputs:["aiToggle"]},{kind:"component",type:NavbarModuleComponent,selector:"navbar-module",inputs:["sideNavHeight","sideNavWidth"]}]})}function handleMousewheelEvent(){document.activeElement.blur()}function hexToRGB$1(t,e){let n=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),r=parseInt(t.slice(5,7),16);return e?"rgba("+n+", "+o+", "+r+", "+e+")":"rgb("+n+", "+o+", "+r+")"}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"resolveio-client-lib-core",standalone:!1,template:'<style>\n\t:root {\n\t\t--warning-color: #ffc107;\n\t\t--warning-font-color: #000000;\n\t\t--warning-hover-color: #e0a800;\n\t\t--warning-shadow-color: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);\n\t\t--success-color: #28a745;\n\t\t--success-font-color: #ffffff;\n\t\t--success-hover-color: #218838;\n\t\t--success-shadow-color: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);\n\t\t--danger-color: #dc3545;\n\t\t--danger-font-color: #ffffff;\n\t\t--danger-hover-color: #c82333;\n\t\t--danger-shadow-color: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);\n\t\t--info-color: #17a2b8;\n\t\t--info-font-color: #ffffff;\n\t\t--info-hover-color: #138496;\n\t\t--info-shadow-color: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);\n\t\t--primary-color: #007bff;\n\t\t--primary-font-color: #ffffff;\n\t\t--primary-hover-color: #0069d9;\n\t\t--primary-shadow-color: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);\n\t\t--secondary-color: #868e96;\n\t\t--secondary-font-color: #ffffff;\n\t\t--secondary-hover-color: #5a6268;\n\t\t--secondary-shadow-color: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);\n\t}\n\n\t:host ::ng-deep .btn-warning {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-color);\n\t\tborder-color: var(--warning-color);\n\t}\n\t:host ::ng-deep .btn-warning:focus,\n\t.btn-warning.focus {\n\t\tbox-shadow: var(--warning-shadow-color);\n\t}\n\t:host ::ng-deep .btn-warning:hover {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-hover-color);\n\t\tborder-color: var(--warning-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-success {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-color);\n\t\tborder-color: var(--success-color);\n\t}\n\t:host ::ng-deep .btn-success:focus,\n\t.btn-success.focus {\n\t\tbox-shadow: var(--success-shadow-color);\n\t}\n\t:host ::ng-deep .btn-success:hover {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-hover-color);\n\t\tborder-color: var(--success-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-danger {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-color);\n\t\tborder-color: var(--danger-color);\n\t}\n\t:host ::ng-deep .btn-danger:focus,\n\t.btn-danger.focus {\n\t\tbox-shadow: var(--danger-shadow-color);\n\t}\n\t:host ::ng-deep .btn-danger:hover {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-hover-color);\n\t\tborder-color: var(--danger-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-info {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-color);\n\t\tborder-color: var(--info-color);\n\t}\n\t:host ::ng-deep .btn-info:focus,\n\t.btn-info.focus {\n\t\tbox-shadow: var(--info-shadow-color);\n\t}\n\t:host ::ng-deep .btn-info:hover {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-hover-color);\n\t\tborder-color: var(--info-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-primary {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-color);\n\t\tborder-color: var(--primary-color);\n\t}\n\t:host ::ng-deep .btn-primary:focus,\n\t.btn-primary.focus {\n\t\tbox-shadow: var(--primary-shadow-color);\n\t}\n\t:host ::ng-deep .btn-primary:hover {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-hover-color);\n\t\tborder-color: var(--primary-hover-color);\n\t}\n\n\t:host ::ng-deep .btn-secondary {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-color);\n\t\tborder-color: var(--secondary-color);\n\t}\n\t:host ::ng-deep .btn-secondary:focus,\n\t.btn-secondary.focus {\n\t\tbox-shadow: var(--secondary-shadow-color);\n\t}\n\t:host ::ng-deep .btn-secondary:hover {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-hover-color);\n\t\tborder-color: var(--secondary-hover-color);\n\t}\n\n\t@media print {\n\t\t.dontPrint * {\n\t\t\tdisplay: none !important;\n\t\t}\n\n\t\t.myDivToPrintCs {\n\t\t\tbackground-color: white;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\tfont-size: 12px;\n\t\t\tline-height: 12px;\n\t\t\tpage-break-after: avoid;\n\t\t\tdisplay: initial;\n\t\t}\n\n\t\t.removeOverflow {\n\t\t\toverflow-y: hidden !important;\n\t\t\theight: 100% !important;\n\t\t}\n\t}\n\n\t.hideThis {\n\t\tdisplay: none !important;\n\t}\n\n\t.navSidbar {\n\t\twidth: 0px;\n\t\tposition: fixed;\n\t\tz-index: 1;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tbackground-color: var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1)) !important;\n\t\toverflow: hidden;\n\t\ttransition: 0.5s;\n\t\tpadding-top: 0px;\n\t}\n\n\t.navSidbar a {\n\t\tpadding: 8px 8px 8px 32px;\n\t\ttext-decoration: none;\n\t\tfont-size: 25px;\n\t\tcolor: #818181;\n\t\tdisplay: block;\n\t\ttransition: 0.3s;\n\t}\n\n\t.navSidbar a:hover {\n\t\tcolor: #f1f1f1;\n\t}\n\n\t.openbtn {\n\t\tbackground-color: var(--navbar-bg-color, rgba(var(--bs-dark-rgb, 33, 37, 41), 1)) !important;\n\t\tborder: none;\n\t\tcolor: #fff;\n\t\tpadding: 5px 20px;\n\t\tfont-size: 18px;\n\t\tright: 0;\n\t\ttop: 0px;\n\t\tposition: absolute;\n\t\tz-index: 999999;\n\t\tcursor: pointer;\n\t\tfloat: right;\n\t\theight: 100%;\n\t}\n\n\t.openbtn span {\n\t\tfont-size: 20px;\n\t\tdisplay: block;\n\t\theight: auto;\n\t\twidth: auto;\n\t\ttext-align: center;\n\t\tposition: absolute;\n\t\tleft: 50%;\n\t\ttop: 50%;\n\t\ttransform: translate(-50%, -50%) rotate(-90deg);\n\t\tmargin-top: -55px;\n\t\tletter-spacing: 30px;\n\t}\n\n\t.ai-openbtn {\n\t\tdisplay: none;\n\t}\n\t#main_cont {\n\t\ttransition: padding-left 0.5s;\n\t}\n\n\t.sid_inr {\n\t\tpadding-left: 25px;\n\t}\n\n\t@keyframes shimmer {\n\t\t0%,\n\t\t50% {\n\t\t\tbackground-position: 120% 0;\n\t\t}\n\t\t100% {\n\t\t\tbackground-position: -80% 0;\n\t\t}\n\t}\n\n\t.shimmer::before {\n\t\tcontent: \'\';\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tbackground: linear-gradient(-75deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.7) 50%, rgba(255, 255, 255, 0) 60%);\n\t\tbackground-size: 200% 100%;\n\t\tanimation: shimmer 5s linear infinite;\n\t\tanimation-fill-mode: forwards;\n\t\tz-index: 11;\n\t}\n\n\t.scroll-shell {\n\t\toverscroll-behavior-y: contain;\n\t}\n\n\t.scroll-bottom-spacer {\n\t\tpointer-events: none;\n\t}\n</style>\n@if (isDevice) {\n\t<link rel="stylesheet" type="text/css" href="/assets/css/tablet.css" />\n}\n<div #shell [style.height]="isDevice && showNavigationMenu ? \'100vh\' : null" [style.overflow]="isDevice && showNavigationMenu ? \'hidden\' : null">\n\t@if (user && (!isConnected || isOffline) && !publicProgram && !digitalSign) {\n\t\t<div style="height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white">\n\t\t\t<div style="padding-top: 9px; padding-bottom: 9px" class="shimmer">*** OFFLINE MODE ***</div>\n\t\t</div>\n\t}\n\t@if (!user && (!isConnected || isOffline) && !publicProgram && !digitalSign) {\n\t\t<div style="height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white">\n\t\t\t<div style="padding-top: 9px; padding-bottom: 9px" class="shimmer">*** PLEASE LOGIN ***</div>\n\t\t</div>\n\t}\n\t@if (status) {\n\t\t<div style="height: 40px; text-align: center; vertical-align: middle; background-color: red; color: white">\n\t\t\t<div style="padding-top: 9px; padding-bottom: 9px" class="shimmer">*** {{ status.message }} ***</div>\n\t\t</div>\n\t}\n\t@if (fullScreen) {\n\t\t<router-outlet name="jobboardfsoutlet"></router-outlet>\n\t}\n\t<div [ngClass]="[\'container-fluid\', fullScreen ? \'hideThis\' : \'\']" [style.font-size.px]="fontSize">\n\t\t<div class="dontPrint">\n\t\t\t<navbar-main style="width: 100%" tourAnchor="navBarMain" #navBarMain [logo]="logo" [showSupport]="showSupport" [navTabs]="navTabs" [fontSize]="fontSize" [publicProgram]="publicProgram || digitalSign" [digitalSign]="digitalSign" [aiAssistantVisible]="aiAssistantEnabled && isConnected" (aiToggle)="toggleAiAssistant()"></navbar-main>\n\t\t</div>\n\t\t<ng-template ngbModalContainer></ng-template>\n\t\t@if (aiAssistantEnabled && user && isConnected && !isDevice && windowSizeWidth > 1200 && !digitalSign && !publicProgram) {\n\t\t\t<rio-ai-assistant\n\t\t\t\t[idClient]="client"\n\t\t\t\t[idApp]="aiAssistantAppId"\n\t\t\t\t[config]="aiAssistantConfig"\n\t\t\t\t[open]="aiAssistantOpen"\n\t\t\t\t[currentRoute]="currentRoute"\n\t\t\t\t[topOffset]="getAiAssistantTopOffset()"\n\t\t\t\t[panelHeight]="getAiAssistantHeight()"\n\t\t\t\t(openRequested)="openAiAssistant()"\n\t\t\t\t(closed)="closeAiAssistant()"></rio-ai-assistant>\n\t\t}\n\t\t<div class="row">\n\t\t\t@if (showNavbarModule && !digitalSign) {\n\t\t\t\t<div id="navSid" [ngClass]="[\'dontPrint\', windowSizeWidth > 1200 && collapsableMenu ? \'navSidbar\' : \'col-xl-1\']" [style.width]="windowSizeWidth > 1200 && collapsableMenu ? \'40px\' : windowSizeWidth > 1200 ? \'\' : \'100%\'" [style.margin-top.px]="windowSizeWidth > 1200 && collapsableMenu ? navbarMainHeight + statusHeight + connectedHeight : 0">\n\t\t\t\t\t@if (windowSizeWidth > 1200 && collapsableMenu) {\n\t\t\t\t\t\t<div class="openbtn" (mouseenter)="openNav()"><span>MENU</span></div>\n\t\t\t\t\t}\n\t\t\t\t\t<div [ngClass]="windowSizeWidth > 1200 && collapsableMenu ? \'sid_inr\' : \'\'">\n\t\t\t\t\t\t<navbar-module #navBarModule tourAnchor="navBarModule" [sideNavWidth]="windowSizeWidth > 1200 && collapsableMenu ? \'90%\' : \'auto\'" [sideNavHeight]="windowSizeWidth > 1200 ? windowSizeHeight - navbarMainHeight - statusHeight - connectedHeight - (showNavigationMenu ? 54 + getNavbarModuleHeight() : 0) - (!isDevice || (isDevice && showNavigationMenu) ? 20 : 0) : \'\'"></navbar-module>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t}\n\t\t\t<div [id]="windowSizeWidth > 1200 ? \'main_cont\' : \'main_cont_mobile\'" [ngClass]="[windowSizeWidth > 1200 && collapsableMenu ? \'col-xl-12\' : \'col-xl-11\']" [style.padding-left]="windowSizeWidth > 1200 && collapsableMenu && showNavbarModule ? 45 + \'px\' : null" [style.padding-right.px]="getAiAssistantReservedWidth()" (mouseenter)="windowSizeWidth > 1200 && collapsableMenu && showNavbarModule ? closeNav() : null" style="padding-top: 5px">\n\t\t\t\t<div style="-webkit-overflow-scrolling: touch" [style.overflow-y]="isDevice && !showNavigationMenu ? \'initial\' : \'scroll\'" [style.height.px]="windowSizeHeight - (isDevice && windowSizeWidth <= 1200 && !showNavigationMenu ? (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight()) : 0) - navbarMainHeight - (!publicProgram && !digitalSign ? statusHeight : 0) - (!publicProgram && !digitalSign ? connectedHeight : 0) - (isDevice && showNavigationMenu ? (getNavbarModuleHeight() > 100 ? 0 : getNavbarModuleHeight()) : 0) - (!isDevice || (isDevice && showNavigationMenu) ? 20 : 0) - 5" class="removeOverflow scroll-shell">\n\t\t\t\t\t<router-outlet></router-outlet>\n\t\t\t\t\t<div class="scroll-bottom-spacer" [style.height.px]="isDevice && showNavigationMenu ? bottomNavSpacerHeight : 0" aria-hidden="true"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t@if (isDevice && showNavigationMenu) {\n\t\t\t<div style="position: fixed; left: 0; right: 0; bottom: 0; height: calc(54px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background-color: lightgray; z-index: 9999" class="dontPrint">\n\t\t\t\t<table style="width: 100%">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td style="text-align: center">\n\t\t\t\t\t\t\t<button type="button" class="btn" style="background-color: lightgray" (click)="onPushBackButton()"><i class="fa fa-arrow-left" style="color: black; font-size: 20px"></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td style="text-align: center">\n\t\t\t\t\t\t\t<button type="button" class="btn" style="background-color: lightgray" (click)="onPushReloadButton()"><i class="fa fa-refresh" style="color: black; font-size: 20px"></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td style="text-align: center">\n\t\t\t\t\t\t\t<button type="button" class="btn" style="background-color: lightgray" (click)="onPushForwardButton()"><i class="fa fa-arrow-right" style="color: black; font-size: 20px"></i></button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t}\n\t\t@if (!isDevice) {\n\t\t\t<div style="text-align: center; height: 20px; font-style: italic; font-weight: bold; background-color: lightgray; margin-left: -15px; margin-right: -15px">© {{ year }} RESOLVEIO ALL RIGHTS RESERVED</div>\n\t\t}\n\t</div>\n</div>\n'}]}],ctorParameters:()=>[{type:i1$4.DeviceDetectorService},{type:DialogService},{type:ResizeService},{type:ProviderService},{type:OfflineManagerService},{type:LocalStorageService},{type:AuthService},{type:AuthPermissionService},{type:FeatureGateService}],propDecorators:{environment:[{type:Input,args:["environment"]}],logo:[{type:Input,args:["logo"]}],navTabs:[{type:Input,args:["navTabs"]}],userHasPhoneNumber:[{type:Input,args:["userHasPhoneNumber"]}],client:[{type:Input,args:["client"]}],showNavbarModule:[{type:Input,args:["showNavbarModule"]}],publicProgram:[{type:Input,args:["publicProgram"]}],showSupport:[{type:Input,args:["showSupport"]}],aiAssistantEnabled:[{type:Input,args:["aiAssistantEnabled"]}],el_navBarMain:[{type:ViewChild,args:["navBarMain",{read:ElementRef,static:!0}]}],el_navBarModule:[{type:ViewChild,args:["navBarModule",{read:ElementRef,static:!0}]}]}});class HomeComponent extends BaseComponent{_route;auth;_services;_http;_app;menuData={title:"Home",module:null,description:null,description_name:null,tabs:[{link:"home",params:null,label:"Home"}]};selectedSolution="Asset";loggingOut$=null;subscription$=null;isLoggedIn;form;constructor(t,e,n,o,r){super(n),this._route=t,this.auth=e,this._services=n,this._http=o,this._app=r}ngOnInit(){this._services._app.setNavbarModuleData(this.menuData),this.loggingOut$=this._app.isLoggingOut.subscribe(t=>{t||(this._services._account.getUser()?this._services._account.getUser().settings&&this._services._account.getUser().settings.opening_route&&"/home"!==this._services._account.getUser().settings.opening_route?this._services._router.navigateByUrl(this._services._account.getUser().settings.opening_route):"/home"!==this._services._router.url&&this._services._router.navigateByUrl("/home"):(this.subscription$&&this.subscription$.unsubscribe(),this.subscription$=this._services._account.user.subscribe(t=>{t&&t.settings&&t.settings.opening_route&&"/home"!==t.settings.opening_route?this._services._router.navigateByUrl(t.settings.opening_route):"/home"!==this._services._router.url&&this._services._router.navigateByUrl("/home")},()=>{})))})}ngOnDestroy(){this.subscription$&&this.subscription$.unsubscribe(),this.loggingOut$&&this.loggingOut$.unsubscribe()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:HomeComponent,deps:[{token:i1$1.ActivatedRoute},{token:AuthService},{token:ProviderService},{token:i4.HttpClient},{token:CoreService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:HomeComponent,isStandalone:!1,selector:"resolveio-home",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<div class="home-hero h-100">\n\t<div class="row h-100 m-0">\n\t\t<div class="col-lg-12 h-100">\n\t\t\t<div class="jumbotron jumbotron-fluid h-100 home-hero__jumbotron">\n\t\t\t\t<div class="container text-center h-100 home-hero__container">\n\t\t\t\t\t<img src="/assets/images/ResolveIO.png" class="img-fluid home-hero__logo" alt="ResolveIO logo" />\n\t\t\t\t\t<p class="home-hero__tagline">The All-in-One Solution Software</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',styles:[".home-hero{height:100%;overflow-x:hidden}.home-hero__jumbotron{padding-bottom:0}.home-hero__container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding-left:1.5rem;padding-right:1.5rem}.home-hero__logo{width:100%;max-width:750px;height:auto;object-fit:contain}.home-hero__tagline{font-size:24px;font-style:italic}@media(max-width:767.98px){.home-hero__container{padding-left:1.25rem;padding-right:1.25rem}.home-hero__tagline{font-size:18px}}\n"]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:HomeComponent,decorators:[{type:Component,args:[{selector:"resolveio-home",providers:[ProviderService],standalone:!1,template:'<div class="home-hero h-100">\n\t<div class="row h-100 m-0">\n\t\t<div class="col-lg-12 h-100">\n\t\t\t<div class="jumbotron jumbotron-fluid h-100 home-hero__jumbotron">\n\t\t\t\t<div class="container text-center h-100 home-hero__container">\n\t\t\t\t\t<img src="/assets/images/ResolveIO.png" class="img-fluid home-hero__logo" alt="ResolveIO logo" />\n\t\t\t\t\t<p class="home-hero__tagline">The All-in-One Solution Software</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',styles:[".home-hero{height:100%;overflow-x:hidden}.home-hero__jumbotron{padding-bottom:0}.home-hero__container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding-left:1.5rem;padding-right:1.5rem}.home-hero__logo{width:100%;max-width:750px;height:auto;object-fit:contain}.home-hero__tagline{font-size:24px;font-style:italic}@media(max-width:767.98px){.home-hero__container{padding-left:1.25rem;padding-right:1.25rem}.home-hero__tagline{font-size:18px}}\n"]}]}],ctorParameters:()=>[{type:i1$1.ActivatedRoute},{type:AuthService},{type:ProviderService},{type:i4.HttpClient},{type:CoreService}]});class UserRoleComponent extends BaseComponent{_services;role;constructor(t){super(t),this._services=t}userInRole(){return this._services._account.isUserInView(this.role)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserRoleComponent,deps:[{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:UserRoleComponent,isStandalone:!1,selector:"user-role",inputs:{role:"role"},providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:"@if (userInRole()) {<ng-content></ng-content>}",isInline:!0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserRoleComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"user-role",template:"@if (userInRole()) {<ng-content></ng-content>}",standalone:!1}]}],ctorParameters:()=>[{type:ProviderService}],propDecorators:{role:[{type:Input}]}});class UserRoleModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserRoleModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:UserRoleModule,declarations:[UserRoleComponent],imports:[CommonModule],exports:[UserRoleComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserRoleModule,imports:[CommonModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserRoleModule,decorators:[{type:NgModule,args:[{imports:[CommonModule],exports:[UserRoleComponent],declarations:[UserRoleComponent]}]}]});class FormButtonModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FormButtonModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:FormButtonModule,declarations:[FormButtonComponent],imports:[CommonModule,NgbTooltipModule],exports:[FormButtonComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FormButtonModule,imports:[CommonModule,NgbTooltipModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FormButtonModule,decorators:[{type:NgModule,args:[{imports:[CommonModule,NgbTooltipModule],exports:[FormButtonComponent],declarations:[FormButtonComponent]}]}]});class ResponsiveButtonGroupModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResponsiveButtonGroupModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:ResponsiveButtonGroupModule,declarations:[ResponsiveButtonGroupComponent],imports:[CommonModule],exports:[ResponsiveButtonGroupComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResponsiveButtonGroupModule,imports:[CommonModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ResponsiveButtonGroupModule,decorators:[{type:NgModule,args:[{imports:[CommonModule],declarations:[ResponsiveButtonGroupComponent],exports:[ResponsiveButtonGroupComponent]}]}]});class CollapseTableModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CollapseTableModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CollapseTableModule,declarations:[CollapseTableComponent],imports:[FormsModule,CommonModule],exports:[CollapseTableComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CollapseTableModule,providers:[ResizeService],imports:[FormsModule,CommonModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CollapseTableModule,decorators:[{type:NgModule,args:[{imports:[FormsModule,CommonModule],exports:[CollapseTableComponent],declarations:[CollapseTableComponent],providers:[ResizeService]}]}]});class PhonePipe{transform(t){if(!t)return"";let e,n,o;switch((t=(t=(t=(t=t.replace(new RegExp("-","g"),"")).replace(new RegExp(" ","g"),"")).replace("(","")).replace(")","")).length){case 10:e=1,n=t.slice(0,3),o=t.slice(3);break;case 11:e=t[0],n=t.slice(1,4),o=t.slice(4);break;case 12:e=t.slice(0,3),n=t.slice(3,5),o=t.slice(5);break;default:return t}return 1===e&&(e=""),o=o.slice(0,3)+"-"+o.slice(3),(e+" ("+n+") "+o).trim()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:PhonePipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:PhonePipe,isStandalone:!1,name:"phone"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:PhonePipe,decorators:[{type:Pipe,args:[{name:"phone",standalone:!1}]}]});class ReversePipe{transform(t){return t.slice(0).reverse()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ReversePipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:ReversePipe,isStandalone:!1,name:"reverse"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ReversePipe,decorators:[{type:Pipe,args:[{name:"reverse",standalone:!1}]}]});class MinusCurrencyPipe{transform(t,e){return"-"===t.charAt(0)?"("+t.substring(1,t.length)+")":t}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:MinusCurrencyPipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:MinusCurrencyPipe,isStandalone:!1,name:"minusCurrency"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:MinusCurrencyPipe,decorators:[{type:Pipe,args:[{name:"minusCurrency",standalone:!1}]}]});class TitleCaseAndUnderscorePipe{transform(t){let e=t.replace("_"," ").toLowerCase().split(" ");for(let t=0;t<e.length;t++)e[t]=e[t].charAt(0).toUpperCase()+e[t].slice(1);return e.join(" ")}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:TitleCaseAndUnderscorePipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:TitleCaseAndUnderscorePipe,isStandalone:!1,name:"titleCase",pure:!1})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:TitleCaseAndUnderscorePipe,decorators:[{type:Pipe,args:[{name:"titleCase",pure:!1,standalone:!1}]}]});class JsonParsePipe{transform(t){let e=null,n=!1;try{e=JSON.parse(t,dateReviver)}catch(t){n=!0}return n?t:JSON.stringify(e,null,2)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:JsonParsePipe,deps:[],target:i0.ɵɵFactoryTarget.Pipe});static"ɵpipe"=i0.ɵɵngDeclarePipe({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:JsonParsePipe,isStandalone:!1,name:"jsonParse",pure:!1})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:JsonParsePipe,decorators:[{type:Pipe,args:[{name:"jsonParse",pure:!1,standalone:!1}]}]});class PipeModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:PipeModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:PipeModule,declarations:[FilterEqualPipe,FilterNotEqualPipe,PhonePipe,ReversePipe,MinusCurrencyPipe,DomSanitizorPipe,TitleCaseAndUnderscorePipe,JsonParsePipe],exports:[FilterEqualPipe,FilterNotEqualPipe,PhonePipe,ReversePipe,MinusCurrencyPipe,DomSanitizorPipe,TitleCaseAndUnderscorePipe,JsonParsePipe]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:PipeModule})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:PipeModule,decorators:[{type:NgModule,args:[{declarations:[FilterEqualPipe,FilterNotEqualPipe,PhonePipe,ReversePipe,MinusCurrencyPipe,DomSanitizorPipe,TitleCaseAndUnderscorePipe,JsonParsePipe],exports:[FilterEqualPipe,FilterNotEqualPipe,PhonePipe,ReversePipe,MinusCurrencyPipe,DomSanitizorPipe,TitleCaseAndUnderscorePipe,JsonParsePipe]}]}]});class SortTableDirective{element;sortables=new Map;_stateChanges=new Subject;active;start=1;disabled=!1;tableFixed=!1;headerFixed=!1;secondaryColor=!1;tertiaryColor=!1;get direction(){return this._direction}set direction(t){if(t&&-1!==t&&1!==t)throw Error(t+" is not a valid sort direction (0 or 1).");this._direction=t}_direction=0;_data=new BehaviorSubject([]);sortChange=new EventEmitter;constructor(t){this.element=t}register(t){if(!t.id)throw Error("CTSortHeader must be provided with a unique id");if(this.sortables.has(t.id))throw Error("Cannot have two CTSortables with the same id "+t.id);this.sortables.set(t.id,t)}deregister(t){this.sortables.delete(t.id)}sort(t){if(this.active!=t.id?(this.active=t.id,this.direction=t.start?t.start:this.start):this.direction*=-1,this.sortChange.emit({active:this.active,direction:this.direction}),this._data.value.length){let e=null;for(let n=0;n<this._data.value.length;n++)if(t.id.split(".").reduce((t,e)=>t[e],this._data.value[n])){e=t.id.split(".").reduce((t,e)=>t[e],this._data.value[n]);break}if(null!=e)if("string"==typeof e){let e=new RegExp(/^[\d.,$]+$/);this._data.value.filter(e=>t.id.split(".").reduce((t,e)=>t[e],e)).some(n=>!e.test(t.id.split(".").reduce((t,e)=>t[e],n)))?1===this.direction?this._data.next(this._data.value.sort((e,n)=>(t.id.split(".").reduce((t,e)=>t[e],e)||"zzzzzz").localeCompare(t.id.split(".").reduce((t,e)=>t[e],n)||"zzzzzz"))):this._data.next(this._data.value.sort((e,n)=>(t.id.split(".").reduce((t,e)=>t[e],n)||"AAAAAAA").localeCompare(t.id.split(".").reduce((t,e)=>t[e],e)||"AAAAAAA"))):1===this.direction?this._data.next(this._data.value.sort((e,n)=>(null!==t.id.split(".").reduce((t,e)=>t[e],e)?parseFloat(t.id.split(".").reduce((t,e)=>t[e],e).replace(/\$/g,"").replace(",","")):999999999999)-(null!==t.id.split(".").reduce((t,e)=>t[e],n)?parseFloat(t.id.split(".").reduce((t,e)=>t[e],n).replace(/\$/g,"").replace(",","")):999999999999))):this._data.next(this._data.value.sort((e,n)=>(null!==t.id.split(".").reduce((t,e)=>t[e],n)?parseFloat(t.id.split(".").reduce((t,e)=>t[e],n).replace(/\$/g,"").replace(",","")):-999999999999)-(null!==t.id.split(".").reduce((t,e)=>t[e],e)?parseFloat(t.id.split(".").reduce((t,e)=>t[e],e).replace(/\$/g,"").replace(",","")):-999999999999)))}else"number"==typeof e?1===this.direction?this._data.next(this._data.value.sort((e,n)=>(null!==t.id.split(".").reduce((t,e)=>t[e],e)?t.id.split(".").reduce((t,e)=>t[e],e):999999999999)-(null!==t.id.split(".").reduce((t,e)=>t[e],n)?t.id.split(".").reduce((t,e)=>t[e],n):999999999999))):this._data.next(this._data.value.sort((e,n)=>(null!==t.id.split(".").reduce((t,e)=>t[e],n)?t.id.split(".").reduce((t,e)=>t[e],n):-999999999999)-(null!==t.id.split(".").reduce((t,e)=>t[e],e)?t.id.split(".").reduce((t,e)=>t[e],e):-999999999999))):e instanceof Date?1===this.direction?this._data.next(this._data.value.sort((e,n)=>(t.id.split(".").reduce((t,e)=>t[e],e)?t.id.split(".").reduce((t,e)=>t[e],e).getTime():0)-(t.id.split(".").reduce((t,e)=>t[e],n)?t.id.split(".").reduce((t,e)=>t[e],n).getTime():0))):this._data.next(this._data.value.sort((e,n)=>(t.id.split(".").reduce((t,e)=>t[e],n)?t.id.split(".").reduce((t,e)=>t[e],n).getTime():0)-(t.id.split(".").reduce((t,e)=>t[e],e)?t.id.split(".").reduce((t,e)=>t[e],e).getTime():0))):"boolean"==typeof e?this._data.next(this._data.value.sort((e,n)=>t.id.split(".").reduce((t,e)=>t[e],e)===t.id.split(".").reduce((t,e)=>t[e],n)?0:t.id.split(".").reduce((t,e)=>t[e],e)?1===this.direction?-1:1:1===this.direction?1:-1)):this._data.next(this._data.value.sort((e,n)=>t.id.split(".").reduce((t,e)=>t[e],e)===t.id.split(".").reduce((t,e)=>t[e],n)?0:t.id.split(".").reduce((t,e)=>t[e],e)>t.id.split(".").reduce((t,e)=>t[e],n)?-1:1))}}getData(){return this._data.asObservable()}setData(t){this._data.next(t)}ngOnInit(){}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableDirective,deps:[{token:i0.ElementRef}],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:SortTableDirective,isStandalone:!1,selector:"[sortable]",inputs:{active:["sortActive","active"],start:["sortStart","start"],disabled:["sortDisabled","disabled"],tableFixed:"tableFixed",headerFixed:"headerFixed",secondaryColor:"secondaryColor",tertiaryColor:"tertiaryColor"},outputs:{sortChange:"sortChange"},usesOnChanges:!0,ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableDirective,decorators:[{type:Directive,args:[{selector:"[sortable]",standalone:!1}]}],ctorParameters:()=>[{type:i0.ElementRef}],propDecorators:{active:[{type:Input,args:["sortActive"]}],start:[{type:Input,args:["sortStart"]}],disabled:[{type:Input,args:["sortDisabled"]}],tableFixed:[{type:Input}],headerFixed:[{type:Input}],secondaryColor:[{type:Input}],tertiaryColor:[{type:Input}],sortChange:[{type:Output,args:["sortChange"]}]}});class SortTableHeaderComponent{_sort;_arrowDirection=0;id;arrowPosition="after";start;_rerenderSubscription;disabled;constructor(t,e){if(this._sort=e,!e)throw Error("SortTableSortHeader must be placed within a parent element with the CTSortable directive.");this._rerenderSubscription=merge(e.sortChange,e._stateChanges).subscribe(()=>{this._isSorted()&&this._updateArrowDirection(),t.markForCheck()})}ngOnInit(){this._sort.register(this)}ngOnDestroy(){this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_isSorted(){return this._sort.active===this.id}_getSortDirection(){return this._sort.direction}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}onClick(t){this._isDisabled()||this._sort.sort(this)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableHeaderComponent,deps:[{token:i0.ChangeDetectorRef},{token:SortTableDirective,optional:!0}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:SortTableHeaderComponent,isStandalone:!1,selector:"[sort-table-header]",inputs:{disabled:"disabled",id:["sort-table-header","id"],arrowPosition:"arrowPosition",start:"start"},ngImport:i0,template:'<div (click)="onClick($event)">\n\t<ng-content></ng-content>\n\t@if (_isSorted() && _getSortDirection() === -1) {\n\t\t<i class="fa fa-arrow-down" style="margin-left: 10px; font-size: 14px"></i>\n\t}\n\t@if (_isSorted() && _getSortDirection() === 1) {\n\t\t<i class="fa fa-arrow-up" style="margin-left: 10px; font-size: 14px"></i>\n\t}\n</div>\n',changeDetection:i0.ChangeDetectionStrategy.OnPush,encapsulation:i0.ViewEncapsulation.None})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableHeaderComponent,decorators:[{type:Component,args:[{selector:"[sort-table-header]",encapsulation:ViewEncapsulation.None,changeDetection:ChangeDetectionStrategy.OnPush,inputs:["disabled"],standalone:!1,template:'<div (click)="onClick($event)">\n\t<ng-content></ng-content>\n\t@if (_isSorted() && _getSortDirection() === -1) {\n\t\t<i class="fa fa-arrow-down" style="margin-left: 10px; font-size: 14px"></i>\n\t}\n\t@if (_isSorted() && _getSortDirection() === 1) {\n\t\t<i class="fa fa-arrow-up" style="margin-left: 10px; font-size: 14px"></i>\n\t}\n</div>\n'}]}],ctorParameters:()=>[{type:i0.ChangeDetectorRef},{type:SortTableDirective,decorators:[{type:Optional}]}],propDecorators:{id:[{type:Input,args:["sort-table-header"]}],arrowPosition:[{type:Input}],start:[{type:Input}],disabled:[{type:Input}]}});class SortTableNgForComponent{_sort;data=[];dataChanged=new EventEmitter;sortSub$=null;sortedData=[];constructor(t){if(this._sort=t,!t)throw Error("SortTableNgFor must be placed within a parent element with the CTSortable directive.")}ngOnInit(){this.sortSub$=this._sort.getData().subscribe(t=>{this.sortedData=t,this.dataChanged.emit(this.sortedData)})}ngOnChanges(){this._sort.setData(this.data)}ngOnDestroy(){this.sortSub$.unsubscribe()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableNgForComponent,deps:[{token:SortTableDirective,optional:!0}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:SortTableNgForComponent,isStandalone:!1,selector:"[sort-table-ngfor]",inputs:{data:["sort-table-ngfor","data"]},outputs:{dataChanged:"dataChanged"},usesOnChanges:!0,ngImport:i0,template:"<ng-content></ng-content>",isInline:!0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableNgForComponent,decorators:[{type:Component,args:[{selector:"[sort-table-ngfor]",template:"<ng-content></ng-content>",standalone:!1}]}],ctorParameters:()=>[{type:SortTableDirective,decorators:[{type:Optional}]}],propDecorators:{data:[{type:Input,args:["sort-table-ngfor"]}],dataChanged:[{type:Output}]}});class SortTableModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:SortTableModule,declarations:[SortTableDirective,SortTableHeaderComponent,SortTableNgForComponent],imports:[FormsModule,CommonModule],exports:[SortTableDirective,SortTableHeaderComponent,SortTableNgForComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableModule,imports:[FormsModule,CommonModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortTableModule,decorators:[{type:NgModule,args:[{imports:[FormsModule,CommonModule],exports:[SortTableDirective,SortTableHeaderComponent,SortTableNgForComponent],declarations:[SortTableDirective,SortTableHeaderComponent,SortTableNgForComponent]}]}]});class Sortable{container;options;dragItem;startIndex;listeners=[];direction;swapThreshold;constructor(t,e={}){this.container=t,this.options=e,this.direction=this.resolveDirection(),this.swapThreshold=this.resolveSwapThreshold(),this.bindListeners(),this.ensureDraggable()}static create(t,e={}){return new Sortable(t,e)}destroy(){this.listeners.forEach(t=>t()),this.listeners=[],this.dragItem=void 0,this.startIndex=void 0}bindListeners(){const t=(t,e)=>{this.container.addEventListener(t,e),this.listeners.push(()=>this.container.removeEventListener(t,e))};t("dragstart",this.handleDragStart),t("dragover",this.handleDragOver),t("drop",this.handleDrop),t("dragend",this.handleDragEnd)}handleDragStart=t=>{const e=this.getSortableElement(t.target);if(e&&this.hasValidHandle(t.target,e)&&(this.ensureDraggable(),this.dragItem=e,this.startIndex=this.getElementIndex(e),t.dataTransfer)){t.dataTransfer.effectAllowed="move";try{t.dataTransfer.setData("text/plain","")}catch{}}};handleDragOver=t=>{if(!this.dragItem)return;const e=this.getSortableElement(t.target);if(!e||e===this.dragItem)return;t.preventDefault();const n=e.getBoundingClientRect(),o=("horizontal"===this.direction?t.clientX-n.left>n.width*this.swapThreshold:t.clientY-n.top>n.height*this.swapThreshold)?e.nextElementSibling:e;o!==this.dragItem&&this.container.insertBefore(this.dragItem,o)};handleDrop=t=>{this.dragItem&&(t.preventDefault(),this.finish(t))};handleDragEnd=t=>{this.dragItem&&(t.preventDefault(),this.finish(t))};finish(t){if(!this.dragItem)return;const e=this.getElementIndex(this.dragItem),n={oldIndex:this.startIndex,newIndex:e,item:this.dragItem,from:this.container,to:this.container};this.options.onEnd&&this.options.onEnd(n),this.options.onUpdate&&void 0!==this.startIndex&&e!==this.startIndex&&this.options.onUpdate(n),this.dragItem=void 0,this.startIndex=void 0}ensureDraggable(){this.getItems().forEach(t=>{t.getAttribute("draggable")||t.setAttribute("draggable","true")})}getItems(){return(this.options.draggable?Array.from(this.container.querySelectorAll(this.options.draggable)):Array.from(this.container.children)).filter(t=>t.parentElement===this.container)}getSortableElement(t){if(!t)return null;let e=t;for(;e&&e!==this.container;){if(this.isSortableItem(e))return e;e=e.parentElement}return null}isSortableItem(t){return this.options.draggable?t.matches(this.options.draggable)&&t.parentElement===this.container:t.parentElement===this.container}hasValidHandle(t,e){if(!this.options.handle||!t)return!0;const n=t.closest(this.options.handle);return!!n&&e.contains(n)}getElementIndex(t){return this.getItems().indexOf(t)}resolveDirection(){if("horizontal"===this.options.direction||"vertical"===this.options.direction)return this.options.direction;const t=this.container.tagName.toLowerCase();if("tr"===t)return"horizontal";if("tbody"===t||"ul"===t||"ol"===t)return"vertical";const e=window.getComputedStyle(this.container),n="flex"===e.display&&e.flexDirection.startsWith("row"),o="grid"===e.display&&e.gridAutoFlow.includes("column");return n||o?"horizontal":"vertical"}resolveSwapThreshold(){const t="number"==typeof this.options.swapThreshold?this.options.swapThreshold:.45;return t>0&&t<1?t:.45}}const SORTABLEJS_DEFAULT_OPTIONS=new InjectionToken("SORTABLEJS_DEFAULT_OPTIONS");class SortablejsDirective{_el;defaultOptions;items;options;sortableInstance;constructor(t,e){this._el=t,this.defaultOptions=e}ngOnInit(){const t={animation:150,onEnd:t=>{this.updateOrder(t),this.options&&"function"==typeof this.options.onEnd&&this.options.onEnd(t),this.options&&"function"==typeof this.options.onUpdate&&t.oldIndex!==t.newIndex&&this.options.onUpdate(t)}},e=Object.assign({},t,this.defaultOptions||{},this.options||{});this.sortableInstance=Sortable.create(this._el.nativeElement,e)}ngOnDestroy(){this.sortableInstance&&this.sortableInstance.destroy()}updateOrder(t){if(this.items&&void 0!==t.oldIndex&&void 0!==t.newIndex&&t.oldIndex!==t.newIndex)if(this.isFormArray(this.items)){const e=this.items.at(t.oldIndex);this.items.removeAt(t.oldIndex),this.items.insert(t.newIndex,e)}else if(Array.isArray(this.items)){const e=this.items.splice(t.oldIndex,1)[0];this.items.splice(t.newIndex,0,e)}}isFormArray(t){return t&&"function"==typeof t.at&&"function"==typeof t.removeAt&&"function"==typeof t.insert}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortablejsDirective,deps:[{token:i0.ElementRef},{token:SORTABLEJS_DEFAULT_OPTIONS,optional:!0}],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:SortablejsDirective,isStandalone:!1,selector:"[sortablejs]",inputs:{items:["sortablejs","items"],options:["sortablejsOptions","options"]},ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortablejsDirective,decorators:[{type:Directive,args:[{selector:"[sortablejs]",standalone:!1}]}],ctorParameters:()=>[{type:i0.ElementRef},{type:void 0,decorators:[{type:Optional},{type:Inject,args:[SORTABLEJS_DEFAULT_OPTIONS]}]}],propDecorators:{items:[{type:Input,args:["sortablejs"]}],options:[{type:Input,args:["sortablejsOptions"]}]}});class SortablejsModule{static forRoot(t){return{ngModule:SortablejsModule,providers:t?[{provide:SORTABLEJS_DEFAULT_OPTIONS,useValue:t}]:[]}}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortablejsModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:SortablejsModule,declarations:[SortablejsDirective],exports:[SortablejsDirective]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortablejsModule})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SortablejsModule,decorators:[{type:NgModule,args:[{declarations:[SortablejsDirective],exports:[SortablejsDirective]}]}]});class NgDragDropService{dragData;dragEffect=null;scope=null;onDragStart=new Subject;onDragEnd=new Subject;static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropService,providedIn:"root"})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropService,decorators:[{type:Injectable,args:[{providedIn:"root"}]}]});class DomHelper{static addClass(t,e){const n=this.resolveElement(t);n&&(n.classList.contains(e)||n.classList.add(e))}static removeClass(t,e){const n=this.resolveElement(t);n&&n.classList.remove(e)}static matches(t,e){if(!t)return!1;const n=t.matches||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector;return!!n&&n.call(t,e)}static resolveElement(t){return t?t.nativeElement?t.nativeElement:t:null}}class Draggable{el;renderer;ng2DragDropService;zone;dragData;dragHandle;dragEffect="move";dragScope="default";dragHandleClass="drag-handle";dragClass="drag-border";dragTransitClass="drag-transit";onDragStart=new EventEmitter;onDrag=new EventEmitter;onDragEnd=new EventEmitter;mouseDownElement;_dragEnabled=!0;_dragImage;dragImageElement;unbindDragListener;constructor(t,e,n,o){this.el=t,this.renderer=e,this.ng2DragDropService=n,this.zone=o}get dragEnabled(){return this._dragEnabled}set dragEnabled(t){this._dragEnabled=t,this.applyDragHandleClass()}get dragImage(){return this._dragImage}set dragImage(t){this._dragImage=t,this.dragImageElement=new Image,this.dragImageElement.src=this._dragImage}ngOnInit(){this.applyDragHandleClass()}ngOnDestroy(){this.unbindDragListeners()}dragStart(t){if(this.allowDrag()){DomHelper.addClass(this.el,this.dragTransitClass),setTimeout(()=>{DomHelper.addClass(this.el,this.dragClass),DomHelper.removeClass(this.el,this.dragTransitClass)},10),this.ng2DragDropService.dragData=this.dragData,this.ng2DragDropService.scope=this.dragScope,this.ng2DragDropService.dragEffect=this.dragEffect;const e=this.getDragHandleElement();e&&this.updateCursor(e,"grabbing"),null!=t.dataTransfer&&(t.dataTransfer.effectAllowed=this.dragEffect,t.dataTransfer.dropEffect=this.dragEffect,t.dataTransfer.setData("text","")),this.dragImage&&t.dataTransfer&&t.dataTransfer.setDragImage(this.dragImageElement,0,0),t.stopPropagation(),this.onDragStart.emit(t),this.ng2DragDropService.onDragStart.next(),this.zone.runOutsideAngular(()=>{this.unbindDragListener=this.renderer.listen(this.el.nativeElement,"drag",t=>{this.drag(t)})})}else t.preventDefault()}drag(t){this.onDrag.emit(t)}dragEnd(t){this.unbindDragListeners(),DomHelper.removeClass(this.el,this.dragClass),this.ng2DragDropService.dragData=null,this.ng2DragDropService.dragEffect=null,this.ng2DragDropService.scope=null;const e=this.getDragHandleElement();e&&this.updateCursor(e,this.dragEnabled?"grab":null),this.ng2DragDropService.onDragEnd.next(),this.onDragEnd.emit(t),t.stopPropagation(),t.preventDefault()}mousedown(t){this.mouseDownElement=t.target}allowDrag(){return this.dragHandle?DomHelper.matches(this.mouseDownElement,this.dragHandle)&&this.dragEnabled:this.dragEnabled}applyDragHandleClass(){const t=this.getDragHandleElement();t&&(this.dragEnabled?DomHelper.addClass(t,this.dragHandleClass):DomHelper.removeClass(t,this.dragHandleClass),this.updateCursor(t,this.dragEnabled?"grab":null))}getDragHandleElement(){let t=this.el.nativeElement;return this.dragHandle&&(t=this.el.nativeElement.querySelector(this.dragHandle)),t}unbindDragListeners(){this.unbindDragListener&&this.unbindDragListener()}updateCursor(t,e){e?this.renderer.setStyle(t,"cursor",e):this.renderer.removeStyle(t,"cursor")}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:Draggable,deps:[{token:i0.ElementRef},{token:i0.Renderer2},{token:NgDragDropService},{token:i0.NgZone}],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:Draggable,isStandalone:!1,selector:"[draggable]",inputs:{dragData:"dragData",dragHandle:"dragHandle",dragEffect:"dragEffect",dragScope:"dragScope",dragHandleClass:"dragHandleClass",dragClass:"dragClass",dragTransitClass:"dragTransitClass",dragEnabled:"dragEnabled",dragImage:"dragImage"},outputs:{onDragStart:"onDragStart",onDrag:"onDrag",onDragEnd:"onDragEnd"},host:{listeners:{dragstart:"dragStart($event)",dragend:"dragEnd($event)",mousedown:"mousedown($event)",touchstart:"mousedown($event)"},properties:{draggable:"this.dragEnabled"}},ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:Draggable,decorators:[{type:Directive,args:[{selector:"[draggable]",standalone:!1}]}],ctorParameters:()=>[{type:i0.ElementRef},{type:i0.Renderer2},{type:NgDragDropService},{type:i0.NgZone}],propDecorators:{dragData:[{type:Input}],dragHandle:[{type:Input}],dragEffect:[{type:Input}],dragScope:[{type:Input}],dragHandleClass:[{type:Input}],dragClass:[{type:Input}],dragTransitClass:[{type:Input}],onDragStart:[{type:Output}],onDrag:[{type:Output}],onDragEnd:[{type:Output}],dragEnabled:[{type:Input},{type:HostBinding,args:["draggable"]}],dragImage:[{type:Input}],dragStart:[{type:HostListener,args:["dragstart",["$event"]]}],dragEnd:[{type:HostListener,args:["dragend",["$event"]]}],mousedown:[{type:HostListener,args:["mousedown",["$event"]]},{type:HostListener,args:["touchstart",["$event"]]}]}});class DropEvent{nativeEvent;dragData;constructor(t,e){this.nativeEvent=t,this.dragData=e}}class Droppable{el;renderer;ng2DragDropService;zone;onDragEnter=new EventEmitter;onDragOver=new EventEmitter;onDragLeave=new EventEmitter;onDrop=new EventEmitter;dragOverClass="drag-over-border";dragHintClass="drag-hint-border";dropScope="default";_dropEnabled=!0;_isDragActive=!1;_isServiceActive=!1;dragStartSubscription;dragEndSubscription;unbindDragEnterListener;unbindDragOverListener;unbindDragLeaveListener;constructor(t,e,n,o){this.el=t,this.renderer=e,this.ng2DragDropService=n,this.zone=o}get dropEnabled(){return this._dropEnabled}set dropEnabled(t){this._dropEnabled=t,!0===this._dropEnabled?this.subscribeService():this.unsubscribeService()}ngOnInit(){!0===this.dropEnabled&&this.subscribeService()}ngOnDestroy(){this.unsubscribeService(),this.unbindDragListeners()}drop(t){this.allowDrop().subscribe(e=>{e&&this._isDragActive&&(DomHelper.removeClass(this.el,this.dragOverClass),t.preventDefault(),t.stopPropagation(),this.ng2DragDropService.onDragEnd.next(),this.onDrop.emit(new DropEvent(t,this.ng2DragDropService.dragData)),this.ng2DragDropService.dragData=null,this.ng2DragDropService.dragEffect=null,this.ng2DragDropService.scope=null)})}dragEnter(t){t.preventDefault(),t.stopPropagation(),this.onDragEnter.emit(t)}dragOver(t,e){if(e){if(DomHelper.addClass(this.el,this.dragOverClass),t.dataTransfer){const e=this.ng2DragDropService.dragEffect??"move";t.dataTransfer.dropEffect=e}t.preventDefault(),this.onDragOver.emit(t)}}dragLeave(t){DomHelper.removeClass(this.el,this.dragOverClass),t.preventDefault(),this.onDragLeave.emit(t)}allowDrop(){let t=!1;if("string"==typeof this.dropScope)"string"==typeof this.ng2DragDropService.scope?t=this.ng2DragDropService.scope===this.dropScope:this.ng2DragDropService.scope instanceof Array&&(t=this.ng2DragDropService.scope.indexOf(this.dropScope)>-1);else if(this.dropScope instanceof Array)"string"==typeof this.ng2DragDropService.scope?t=this.dropScope.indexOf(this.ng2DragDropService.scope)>-1:this.ng2DragDropService.scope instanceof Array&&(t=this.dropScope.filter(t=>-1!==this.ng2DragDropService.scope.indexOf(t)).length>0);else if("function"==typeof this.dropScope&&(t=this.dropScope(this.ng2DragDropService.dragData),t instanceof Observable))return t.pipe(map(t=>t&&this.dropEnabled));return of(t&&this.dropEnabled)}subscribeService(){!0!==this._isServiceActive&&(this._isServiceActive=!0,this.dragStartSubscription=this.ng2DragDropService.onDragStart.subscribe(()=>{this._isDragActive=!0,this.allowDrop().subscribe(t=>{t&&this._isDragActive&&(DomHelper.addClass(this.el,this.dragHintClass),this.zone.runOutsideAngular(()=>{this.unbindDragEnterListener=this.renderer.listen(this.el.nativeElement,"dragenter",t=>{this.dragEnter(t)}),this.unbindDragOverListener=this.renderer.listen(this.el.nativeElement,"dragover",e=>{this.dragOver(e,t)}),this.unbindDragLeaveListener=this.renderer.listen(this.el.nativeElement,"dragleave",t=>{this.dragLeave(t)})}))})}),this.dragEndSubscription=this.ng2DragDropService.onDragEnd.subscribe(()=>{this._isDragActive=!1,DomHelper.removeClass(this.el,this.dragHintClass),this.unbindDragListeners()}))}unsubscribeService(){this._isServiceActive=!1,this.dragStartSubscription&&this.dragStartSubscription.unsubscribe(),this.dragEndSubscription&&this.dragEndSubscription.unsubscribe()}unbindDragListeners(){this.unbindDragEnterListener&&this.unbindDragEnterListener(),this.unbindDragOverListener&&this.unbindDragOverListener(),this.unbindDragLeaveListener&&this.unbindDragLeaveListener()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:Droppable,deps:[{token:i0.ElementRef},{token:i0.Renderer2},{token:NgDragDropService},{token:i0.NgZone}],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:Droppable,isStandalone:!1,selector:"[droppable]",inputs:{dragOverClass:"dragOverClass",dragHintClass:"dragHintClass",dropScope:"dropScope",dropEnabled:"dropEnabled"},outputs:{onDragEnter:"onDragEnter",onDragOver:"onDragOver",onDragLeave:"onDragLeave",onDrop:"onDrop"},host:{listeners:{drop:"drop($event)"}},ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:Droppable,decorators:[{type:Directive,args:[{selector:"[droppable]",standalone:!1}]}],ctorParameters:()=>[{type:i0.ElementRef},{type:i0.Renderer2},{type:NgDragDropService},{type:i0.NgZone}],propDecorators:{onDragEnter:[{type:Output}],onDragOver:[{type:Output}],onDragLeave:[{type:Output}],onDrop:[{type:Output}],dragOverClass:[{type:Input}],dragHintClass:[{type:Input}],dropScope:[{type:Input}],dropEnabled:[{type:Input}],drop:[{type:HostListener,args:["drop",["$event"]]}]}});class NgDragDropModule{static forRoot(){return{ngModule:NgDragDropModule,providers:[NgDragDropService]}}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropModule,declarations:[Draggable,Droppable],exports:[Draggable,Droppable]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropModule})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:NgDragDropModule,decorators:[{type:NgModule,args:[{declarations:[Draggable,Droppable],exports:[Draggable,Droppable]}]}]});class SharedModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SharedModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:SharedModule,imports:[AiFormAutoRegisterDirective,ReactiveFormsModule,FormsModule,CollapseTableModule,RouterModule,NgbModule,NgbAccordionModule,FormButtonModule,ResponsiveButtonGroupModule,PipeModule,UserRoleModule,RioSelectModule,SortTableModule,CommonModule,SortablejsModule,NgDragDropModule,RioDatePickerModule],exports:[AiFormAutoRegisterDirective,ReactiveFormsModule,FormsModule,CollapseTableModule,RouterModule,NgbModule,NgbAccordionModule,FormButtonModule,ResponsiveButtonGroupModule,PipeModule,UserRoleModule,RioSelectModule,SortTableModule,CommonModule,SortablejsModule,NgDragDropModule,RioDatePickerModule]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SharedModule,imports:[ReactiveFormsModule,FormsModule,CollapseTableModule,RouterModule,NgbModule,NgbAccordionModule,FormButtonModule,ResponsiveButtonGroupModule,PipeModule,UserRoleModule,RioSelectModule,SortTableModule,CommonModule,SortablejsModule,NgDragDropModule,RioDatePickerModule,ReactiveFormsModule,FormsModule,CollapseTableModule,RouterModule,NgbModule,NgbAccordionModule,FormButtonModule,ResponsiveButtonGroupModule,PipeModule,UserRoleModule,RioSelectModule,SortTableModule,CommonModule,SortablejsModule,NgDragDropModule,RioDatePickerModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SharedModule,decorators:[{type:NgModule,args:[{imports:[AiFormAutoRegisterDirective,ReactiveFormsModule,FormsModule,CollapseTableModule,RouterModule,NgbModule,NgbAccordionModule,FormButtonModule,ResponsiveButtonGroupModule,PipeModule,UserRoleModule,RioSelectModule,SortTableModule,CommonModule,SortablejsModule,NgDragDropModule,RioDatePickerModule],exports:[AiFormAutoRegisterDirective,ReactiveFormsModule,FormsModule,CollapseTableModule,RouterModule,NgbModule,NgbAccordionModule,FormButtonModule,ResponsiveButtonGroupModule,PipeModule,UserRoleModule,RioSelectModule,SortTableModule,CommonModule,SortablejsModule,NgDragDropModule,RioDatePickerModule]}]}]});class AiTerminalModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalModule,declarations:[AiTerminalComponent],imports:[SharedModule],exports:[AiTerminalComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalModule,imports:[SharedModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AiTerminalModule,decorators:[{type:NgModule,args:[{imports:[SharedModule],declarations:[AiTerminalComponent],exports:[AiTerminalComponent]}]}]});class FocusDirective{element;focus;constructor(t){this.element=t}ngOnChanges(){this.focus&&this.element.nativeElement.focus()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FocusDirective,deps:[{token:i0.ElementRef}],target:i0.ɵɵFactoryTarget.Directive});static"ɵdir"=i0.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"21.1.2",type:FocusDirective,isStandalone:!1,selector:"[focus]",inputs:{focus:"focus"},usesOnChanges:!0,ngImport:i0})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FocusDirective,decorators:[{type:Directive,args:[{selector:"[focus]",standalone:!1}]}],ctorParameters:()=>[{type:i0.ElementRef}],propDecorators:{focus:[{type:Input}]}});class RioSelectStickyAdapterService{_account;_socket;constructor(t,e){this._account=t,this._socket=e}get userChanges(){return this._account.user.asObservable()}getUser(){return this._account.getUser()}saveStickySelects(t,e="rio-select"){const n=this._account.getUser();if(!n)return;const o={...n.other||{},stickySelects:t},r={...n,other:o};return this._account.setUser(r),this._socket.call("saveUserStickySelects",t,n._id).then(e=>{const o=this._account.getUser();if(!o||o._id!==n._id)return;const r=e?.stickySelects||t,i={...o,__v:e?.__v??o.__v,other:{...o.other||{},stickySelects:r}};this._account.setUser(i)}).catch(()=>{})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:RioSelectStickyAdapterService,deps:[{token:AccountManagerService},{token:SocketManagerService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:RioSelectStickyAdapterService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:RioSelectStickyAdapterService,decorators:[{type:Injectable}],ctorParameters:()=>[{type:AccountManagerService},{type:SocketManagerService}]});class AuthGuard{_router;_auth;_ds;_account;_app;_offline;_aps;_alert;_featureGates;redirectUrl;constructor(t,e,n,o,r,i,s,a,l){this._router=t,this._auth=e,this._ds=n,this._account=o,this._app=r,this._offline=i,this._aps=s,this._alert=a,this._featureGates=l}canActivate(t,e){return new Promise(t=>{this._account.isInitCompleted().then(()=>{let n=this._account.getUser();if(n||(n=this._offline.getUser(),n&&this._account.setUser(n)),n)if(n.active){let o=e.url.replace(/\/[a-f0-9]{24}$/,"").replace(/\?.+$/,""),r=o.replace(/([^\/]+\/?$)/,"");if(this.isLinkGateEnabled(o))if(n.roles.super_admin)t(!0);else{let e=!1;for(;!e&&o.split("/").length>2;){if(!this.isLinkFakeRoute(o))if(n.roles.groups.some(t=>t.views.some(t=>t===o)))e=!0,t(!0);else if(n.roles.groups.some(t=>t.views.some(t=>t.startsWith(r)&&!this.doesLinkHaveParameter(t)&&!this.isLinkFakeRoute(t)))){let o=n.roles.groups.filter(t=>t.views.some(t=>t.startsWith(r)&&!this.doesLinkHaveParameter(t)&&!this.isLinkFakeRoute(t)))[0].views.filter(t=>t.startsWith(r)&&!this.doesLinkHaveParameter(t)&&!this.isLinkFakeRoute(t))[0];e=!0,this._router.navigateByUrl(o),t(!1)}r=r.replace(/([^\/]+\/?$)/,""),o=o.replace(/(\/[^\/]+$)/,"")}e||(this._router.navigateByUrl("/home"),t(!1))}else this._router.navigateByUrl("/home"),t(!1)}else this._router.navigateByUrl("/home"),t(!1);else if(navigator.onLine)this._auth.loginUser().then(o=>{this._account.isLoginCompleted().then(()=>{if(n=this._account.getUser(),n.active){let o=e.url.replace(/\/[a-f0-9]{24}$/,"").replace(/\?.+$/,""),r=o.replace(/([^\/]+\/?$)/,"");if(this.isLinkGateEnabled(o))if(n.roles.super_admin)t(!0);else{let e=!1;for(;!e&&o.split("/").length>2;){if(!this.isLinkFakeRoute(o))if(n.roles.groups.some(t=>t.views.some(t=>t===o)))e=!0,t(!0);else if(n.roles.groups.some(t=>t.views.some(t=>t.startsWith(r)&&!this.doesLinkHaveParameter(t)&&!this.isLinkFakeRoute(t)))){let o=n.roles.groups.filter(t=>t.views.some(t=>t.startsWith(r)&&!this.doesLinkHaveParameter(t)&&!this.isLinkFakeRoute(t)))[0].views.filter(t=>t.startsWith(r)&&!this.doesLinkHaveParameter(t)&&!this.isLinkFakeRoute(t))[0];e=!0,this._router.navigateByUrl(o),t(!1)}r=r.replace(/([^\/]+\/?$)/,""),o=o.replace(/(\/[^\/]+$)/,"")}e||(this._router.navigateByUrl("/home"),t(!1))}else this._router.navigateByUrl("/home"),t(!1)}else this._router.navigateByUrl("/home"),t(!1)})},()=>{this._router.navigateByUrl("/home"),t(!1)});else{let n=e.url.replace(/\/[a-f0-9]{24}$/,"").replace(/\?.+$/,"");this.isLinkGateEnabled(n)?t(!0):(this._router.navigateByUrl("/home"),t(!1))}},()=>{})})}doesLinkHaveParameter(t){let e=this._aps.getAllModulePermissions();for(let n=0;n<e.length;n++){let o=e[n];for(let e=0;e<o.views.length;e++){let n=o.views[e];if(n.link===t)return!!n.has_parameter}}return!1}isLinkGateEnabled(t){const e=this._aps.getAllModulePermissions();return this._featureGates.isLinkEnabled(t,e)}isLinkFakeRoute(t){let e=this._aps.getAllModulePermissions();for(let n=0;n<e.length;n++){let o=e[n];for(let e=0;e<o.views.length;e++){let n=o.views[e];if(n.link===t)return!!n.fake_route}}return!0}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthGuard,deps:[{token:i1$1.Router},{token:AuthService},{token:DialogService},{token:AccountManagerService},{token:CoreService},{token:OfflineManagerService},{token:AuthPermissionService},{token:AlertService},{token:FeatureGateService}],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthGuard})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:AuthGuard,decorators:[{type:Injectable}],ctorParameters:()=>[{type:i1$1.Router},{type:AuthService},{type:DialogService},{type:AccountManagerService},{type:CoreService},{type:OfflineManagerService},{type:AuthPermissionService},{type:AlertService},{type:FeatureGateService}]});class CanDeactivateGuard{canDeactivate(t){return!t.canDeactivate||t.canDeactivate()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CanDeactivateGuard,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CanDeactivateGuard})}function getWindow(){return window}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CanDeactivateGuard,decorators:[{type:Injectable}]});class WindowRefService{get nativeWindow(){return getWindow()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:WindowRefService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:WindowRefService})}function rioDatePickerConfigFactory(t,e){return{resolveFirstDayOfWeek:()=>{const e=t.getUser()?.other?.date_picker_day_start;if("M"===e||"S"===e)return e;if("string"==typeof e){const t=e.toUpperCase();if("M"===t||"S"===t)return t}return 1===e?"M":7===e||0===e?"S":null},resolveTimezone:()=>e.environment.value?.TZ_CLIENT||null}}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:WindowRefService,decorators:[{type:Injectable}]});class CoreServicesModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreServicesModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CoreServicesModule,imports:[BrowserAnimationsModule,i1.ToastrModule]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreServicesModule,providers:[CoreService,AuthService,AuthGuard,CanDeactivateGuard,DialogService,ValidationService,AwsService,AuthPermissionService,FeatureGateService,WindowRefService,AlertService,SocketService,SocketManagerService,TokenManagerService,AccountManagerService,OfflineManagerService,DeviceDetectorService,LocalStorageService,RioSelectStickyAdapterService,{provide:RIO_SELECT_STICKY_ADAPTER,useExisting:RioSelectStickyAdapterService},{provide:RIO_DATE_PICKER_CONFIG,useFactory:rioDatePickerConfigFactory,deps:[AccountManagerService,CoreService]},provideHttpClient(withInterceptorsFromDi())],imports:[BrowserAnimationsModule,ToastrModule.forRoot()]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreServicesModule,decorators:[{type:NgModule,args:[{imports:[BrowserAnimationsModule,ToastrModule.forRoot()],providers:[CoreService,AuthService,AuthGuard,CanDeactivateGuard,DialogService,ValidationService,AwsService,AuthPermissionService,FeatureGateService,WindowRefService,AlertService,SocketService,SocketManagerService,TokenManagerService,AccountManagerService,OfflineManagerService,DeviceDetectorService,LocalStorageService,RioSelectStickyAdapterService,{provide:RIO_SELECT_STICKY_ADAPTER,useExisting:RioSelectStickyAdapterService},{provide:RIO_DATE_PICKER_CONFIG,useFactory:rioDatePickerConfigFactory,deps:[AccountManagerService,CoreService]},provideHttpClient(withInterceptorsFromDi())]}]}]});class CoreShellModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreShellModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CoreShellModule,declarations:[CoreComponent,HomeComponent,AiAssistantComponent,NavbarMainComponent,NavbarModuleComponent,FocusDirective,ScrollDirective],imports:[CommonModule,RouterModule,PipeModule,NgbModalModule,AiTerminalModule,CoreServicesModule],exports:[CoreComponent,HomeComponent,AiAssistantComponent,NavbarMainComponent,NavbarModuleComponent,FocusDirective,ScrollDirective]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreShellModule,imports:[CommonModule,RouterModule,PipeModule,NgbModalModule,AiTerminalModule,CoreServicesModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreShellModule,decorators:[{type:NgModule,args:[{declarations:[CoreComponent,HomeComponent,AiAssistantComponent,NavbarMainComponent,NavbarModuleComponent,FocusDirective,ScrollDirective],imports:[CommonModule,RouterModule,PipeModule,NgbModalModule,AiTerminalModule,CoreServicesModule],exports:[CoreComponent,HomeComponent,AiAssistantComponent,NavbarMainComponent,NavbarModuleComponent,FocusDirective,ScrollDirective]}]}]});class ForgotPasswordComponent extends BaseComponent{_route;_services;_http;_ds;serverURL="";form;user;subscription$=[];token;disableFormButton=!1;constructor(t,e,n,o){super(e),this._route=t,this._services=e,this._http=n,this._ds=o}ngOnInit(){2!==this._route.snapshot.queryParamMap.keys.length?(this._ds.error("Invalid params"),this._services._router.navigateByUrl("/home")):(this.serverURL=this._route.snapshot.queryParamMap.keys[0],this.token=this._route.snapshot.queryParamMap.keys[1]),this.form=this._services._fb.group({password:["",[Validators.compose([Validators.required,Validators.minLength(6)])]],confirm_password:["",[Validators.compose([Validators.required,Validators.minLength(6)])]]},{validator:this._services._vs.matchPassword}),this._http.post(this.serverURL+"/userWithForgotPasswordToken",{forgotPasswordToken:this.token}).toPromise().then(t=>{t.error?(this._ds.error("Invalid token"),this._services._router.navigateByUrl("/home")):this.user=t.result.user},t=>{this._ds.error("Invalid token"),this._services._router.navigateByUrl("/home")})}ngOnDestroy(){this.subscription$.forEach(t=>{t.unsubscribe()})}submit(){this.disableFormButton=!0,this._http.post(this.serverURL+"/setUserWithForgotPasswordToken",{forgotPasswordToken:this.token,password:this.form.value.password}).toPromise().then(t=>{t.error?(this._ds.error("Could not update user"),this._services._router.navigateByUrl("/home")):(this._services._alert.setAlert("success","User has been updated, please log in"),this._services._router.navigateByUrl("/home"))},t=>{this._ds.error("Invalid token"),this._services._router.navigateByUrl("/home")}),this._services._router.navigateByUrl("/home")}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ForgotPasswordComponent,deps:[{token:i1$1.ActivatedRoute},{token:ProviderService},{token:i4.HttpClient},{token:DialogService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:ForgotPasswordComponent,isStandalone:!1,selector:"resolveio-forgot-password",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<style>\n\tinput {\n\t\twidth: 100%;\n\t}\n</style>\n\n@if (user) {\n\t<h4>\n\t\tWelcome to ResolveIO.\n\t\t<br />\n\t\t<br />\n\t\tYour username will be {{ user.username }}. Please create a password for your account.\n\t</h4>\n\t<form [formGroup]="form" novalidate (ngSubmit)="submit()">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Username</label>\n\t\t\t\t\t{{ user.username }}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Password</label>\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\') || form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.password.valid && form.valid ? \'is-valid\' : \'is-invalid\']" formControlName="password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password must be 6 or more characters</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (!form.controls.password.hasError(\'minlength\') && form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Confirm Password</label>\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.confirm_password.valid ? \'is-valid\' : \'is-invalid\']" formControlName="confirm_password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row" style="margin-top: 30px">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<form-button [form]="form" [disabled]="disableFormButton"></form-button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n}\n',styles:["input{width:100%}\n"],dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"component",type:FormButtonComponent,selector:"form-button",inputs:["form","disabled","type"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:ForgotPasswordComponent,decorators:[{type:Component,args:[{selector:"resolveio-forgot-password",providers:[ProviderService],standalone:!1,template:'<style>\n\tinput {\n\t\twidth: 100%;\n\t}\n</style>\n\n@if (user) {\n\t<h4>\n\t\tWelcome to ResolveIO.\n\t\t<br />\n\t\t<br />\n\t\tYour username will be {{ user.username }}. Please create a password for your account.\n\t</h4>\n\t<form [formGroup]="form" novalidate (ngSubmit)="submit()">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Username</label>\n\t\t\t\t\t{{ user.username }}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Password</label>\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\') || form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.password.valid && form.valid ? \'is-valid\' : \'is-invalid\']" formControlName="password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password must be 6 or more characters</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (!form.controls.password.hasError(\'minlength\') && form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Confirm Password</label>\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.confirm_password.valid ? \'is-valid\' : \'is-invalid\']" formControlName="confirm_password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row" style="margin-top: 30px">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<form-button [form]="form" [disabled]="disableFormButton"></form-button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n}\n'}]}],ctorParameters:()=>[{type:i1$1.ActivatedRoute},{type:ProviderService},{type:i4.HttpClient},{type:DialogService}]});class EnrollComponent extends BaseComponent{_route;_services;_http;_ds;serverURL="";form;user;subscription$=[];token;disableFormButton=!1;constructor(t,e,n,o){super(e),this._route=t,this._services=e,this._http=n,this._ds=o}ngOnInit(){2!==this._route.snapshot.queryParamMap.keys.length?(this._ds.error("Invalid params"),this._services._router.navigateByUrl("/home")):(this.serverURL=this._route.snapshot.queryParamMap.keys[0],this.token=this._route.snapshot.queryParamMap.keys[1]),this.form=this._services._fb.group({password:["",[Validators.compose([Validators.required,Validators.minLength(6)])]],confirm_password:["",[Validators.compose([Validators.required,Validators.minLength(6)])]]},{validator:this._services._vs.matchPassword}),this._http.post(this.serverURL+"/userWithEnrollmentToken",{enrollmentToken:this.token}).toPromise().then(t=>{t.error?(this._ds.error("Invalid token"),this._services._router.navigateByUrl("/home")):this.user=t.result.user},t=>{this._ds.error("Invalid token"),this._services._router.navigateByUrl("/home")})}ngOnDestroy(){this.subscription$.forEach(t=>{t.unsubscribe()})}submit(){this.disableFormButton=!0,this._http.post(this.serverURL+"/setUserWithEnrollmentToken",{enrollmentToken:this.token,password:this.form.value.password}).toPromise().then(t=>{t.error?(this._ds.error("Could not update user"),this._services._router.navigateByUrl("/home")):(this._services._alert.setAlert("success","User has been updated, please log in"),this._services._router.navigateByUrl("/home"))},t=>{this._ds.error("Invalid token"),this._services._router.navigateByUrl("/home")})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:EnrollComponent,deps:[{token:i1$1.ActivatedRoute},{token:ProviderService},{token:i4.HttpClient},{token:DialogService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:EnrollComponent,isStandalone:!1,selector:"resolveio-enroll",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<style>\n\tinput {\n\t\twidth: 100%;\n\t}\n</style>\n\n@if (user) {\n\t<h4>\n\t\tWelcome to ResolveIO.\n\t\t<br />\n\t\t<br />\n\t\tYour username will be {{ user.username }}. Please create a password for your account.\n\t</h4>\n\t<form [formGroup]="form" novalidate (ngSubmit)="submit()">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Username</label>\n\t\t\t\t\t{{ user.username }}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Password</label>\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\') || form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.password.valid && !form.hasError(\'matchPassword\') ? \'is-valid\' : \'is-invalid\']" formControlName="password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password must be 6 or more characters</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (!form.controls.password.hasError(\'minlength\') && form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Confirm Password</label>\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.confirm_password.valid && !form.hasError(\'matchPassword\') ? \'is-valid\' : \'is-invalid\']" formControlName="confirm_password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row" style="margin-top: 30px">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<form-button [form]="form" [disabled]="disableFormButton"></form-button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n}\n',styles:["input{width:100%}\n"],dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"component",type:FormButtonComponent,selector:"form-button",inputs:["form","disabled","type"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:EnrollComponent,decorators:[{type:Component,args:[{selector:"resolveio-enroll",providers:[ProviderService],standalone:!1,template:'<style>\n\tinput {\n\t\twidth: 100%;\n\t}\n</style>\n\n@if (user) {\n\t<h4>\n\t\tWelcome to ResolveIO.\n\t\t<br />\n\t\t<br />\n\t\tYour username will be {{ user.username }}. Please create a password for your account.\n\t</h4>\n\t<form [formGroup]="form" novalidate (ngSubmit)="submit()">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Username</label>\n\t\t\t\t\t{{ user.username }}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Password</label>\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\') || form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.password.valid && !form.hasError(\'matchPassword\') ? \'is-valid\' : \'is-invalid\']" formControlName="password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.controls.password.hasError(\'minlength\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password must be 6 or more characters</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (!form.controls.password.hasError(\'minlength\') && form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<div class="form-group">\n\t\t\t\t\t<label class="form-control-label">Confirm Password</label>\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<em>- Required</em>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<em>- Invalid</em>\n\t\t\t\t\t}\n\t\t\t\t\t<input type="text" [ngClass]="[\'form-control\', form.controls.confirm_password.valid && !form.hasError(\'matchPassword\') ? \'is-valid\' : \'is-invalid\']" formControlName="confirm_password" type="password" autocomplete="new-password" />\n\t\t\t\t\t@if (form.controls.confirm_password.hasError(\'required\')) {\n\t\t\t\t\t\t<div class="invalid-feedback">Password is required</div>\n\t\t\t\t\t}\n\t\t\t\t\t@if (form.hasError(\'matchPassword\')) {\n\t\t\t\t\t\t<div class="invalid-feedback" align="start">Passwords do not match</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class="row" style="margin-top: 30px">\n\t\t\t<div class="col-lg-12">\n\t\t\t\t<form-button [form]="form" [disabled]="disableFormButton"></form-button>\n\t\t\t</div>\n\t\t</div>\n\t</form>\n}\n'}]}],ctorParameters:()=>[{type:i1$1.ActivatedRoute},{type:ProviderService},{type:i4.HttpClient},{type:DialogService}]});class Auth365Component extends BaseComponent{_app;_route;_services;_http;_ds;_socket;token;constructor(t,e,n,o,r,i){super(n),this._app=t,this._route=e,this._services=n,this._http=o,this._ds=r,this._socket=i,this._app.environment.value.MS_id_token?this._services._account.logIn365(this._app.environment.value.MS_id_token).then(()=>{this._services._router.navigateByUrl("/home")},()=>{}):this._services._router.navigateByUrl("/home")}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:Auth365Component,deps:[{token:CoreService},{token:i1$1.ActivatedRoute},{token:ProviderService},{token:i4.HttpClient},{token:DialogService},{token:SocketManagerService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:Auth365Component,isStandalone:!1,selector:"resolveio-auth365",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:"<router-outlet></router-outlet>",isInline:!0,dependencies:[{kind:"directive",type:i1$1.RouterOutlet,selector:"router-outlet",inputs:["name","routerOutletData"],outputs:["activate","deactivate","attach","detach"],exportAs:["outlet"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:Auth365Component,decorators:[{type:Component,args:[{selector:"resolveio-auth365",providers:[ProviderService],template:"<router-outlet></router-outlet>",standalone:!1}]}],ctorParameters:()=>[{type:CoreService},{type:i1$1.ActivatedRoute},{type:ProviderService},{type:i4.HttpClient},{type:DialogService},{type:SocketManagerService}]});class CoreAuthModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreAuthModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CoreAuthModule,declarations:[ForgotPasswordComponent,EnrollComponent,Auth365Component],imports:[SharedModule],exports:[ForgotPasswordComponent,EnrollComponent,Auth365Component]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreAuthModule,imports:[SharedModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreAuthModule,decorators:[{type:NgModule,args:[{declarations:[ForgotPasswordComponent,EnrollComponent,Auth365Component],imports:[SharedModule],exports:[ForgotPasswordComponent,EnrollComponent,Auth365Component]}]}]});class CoreDialogModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreDialogModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CoreDialogModule,declarations:[DialogConfirmContent,DialogErrorContent,DialogInputContent,DialogNotifyContent,DialogSelectDateTimeContent,DialogSelectDataLabelsContent,DialogLoginContent,DialogRegisterContent,DialogSelectWithButtonsURLContent,DialogSelectArrayObjsContent,DialogSelectArrayContent],imports:[SharedModule],exports:[DialogConfirmContent,DialogErrorContent,DialogInputContent,DialogNotifyContent,DialogSelectDateTimeContent,DialogSelectDataLabelsContent,DialogLoginContent,DialogRegisterContent,DialogSelectWithButtonsURLContent,DialogSelectArrayObjsContent,DialogSelectArrayContent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreDialogModule,imports:[SharedModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreDialogModule,decorators:[{type:NgModule,args:[{declarations:[DialogConfirmContent,DialogErrorContent,DialogInputContent,DialogNotifyContent,DialogSelectDateTimeContent,DialogSelectDataLabelsContent,DialogLoginContent,DialogRegisterContent,DialogSelectWithButtonsURLContent,DialogSelectArrayObjsContent,DialogSelectArrayContent],imports:[SharedModule],exports:[DialogConfirmContent,DialogErrorContent,DialogInputContent,DialogNotifyContent,DialogSelectDateTimeContent,DialogSelectDataLabelsContent,DialogLoginContent,DialogRegisterContent,DialogSelectWithButtonsURLContent,DialogSelectArrayObjsContent,DialogSelectArrayContent]}]}]});class HtmlDiffViewerComponent{payloadStr="";leftTextarea;rightTextarea;diffContent;leftContent="";rightContent="";diffLines=[];visibleDiffLines=[];showFullDiff=!1;constructor(){}ngAfterViewInit(){if(this.payloadStr){let t=JSON.parse(this.payloadStr,dateReviver);t[0]&&t[2]&&(this.leftContent=JSON.stringify(t[0],null,2),this.rightContent=JSON.stringify(t[2],null,2),this.rightContent.includes("$")&&(this.rightContent=JSON.stringify(applyMongoUpdate(t[0],t[2]),null,2)),this.generateDiff())}}toggleDiffView(){this.showFullDiff=!this.showFullDiff,this.updateVisibleLines()}updateVisibleLines(){if(this.showFullDiff)return void(this.visibleDiffLines=[...this.diffLines.map((t,e)=>(t.leftNumber=e+1,t))]);const t=new Set,e=new Set;this.diffLines.forEach((e,n)=>{"added"!==e.type&&"removed"!==e.type&&"changed"!==e.type||t.add(n)});const n=new Set;t.forEach(t=>{let e=t,o=0;const r=[];for(;e>=0;){const t=this.diffLines[e],i=t.leftContent||t.rightContent||"";i.trim().endsWith("}")||i.trim().endsWith("]")?o++:(i.trim().endsWith("{")||i.trim().endsWith("["))&&(o>0?o--:(n.add(e),r.push(e))),e--}r.forEach(t=>{let e=t,o=1;for(;e<this.diffLines.length&&o>0;){e++;const t=this.diffLines[e];if(!t)break;const r=t.leftContent||t.rightContent||"";r.trim().endsWith("{")||r.trim().endsWith("[")?o++:(r.trim().endsWith("}")||r.trim().endsWith("]"))&&(o--,0===o&&n.add(e))}})});const o=new Set([...t,...n]);o.forEach(t=>{for(let n=Math.max(0,t-1);n<=Math.min(this.diffLines.length-1,t+1);n++)e.add(n)}),this.visibleDiffLines=this.diffLines.map((t,n)=>({...t,isContext:e.has(n)&&!o.has(n),hidden:!(o.has(n)||e.has(n))}))}generateDiff(){try{const t=JSON.parse(this.leftContent),e=JSON.parse(this.rightContent),n=this.normalizeValue(t),o=this.normalizeValue(e),r=this.compareValues(null,n,o,0);this.diffLines=this.assignLineNumbers(r),this.updateVisibleLines(),this.setupScrollSync()}catch(t){console.error("Error generating diff:",t),this.diffLines=[],this.visibleDiffLines=[]}}normalizeValue(t){if(Array.isArray(t)){if(0===t.length)return t;if("object"==typeof t[0]&&null!==t[0])return t.map(t=>this.normalizeValue(t));if("string"==typeof t[0]||"number"==typeof t[0]||"boolean"==typeof t[0]){const e=[...t];return e.sort((t,e)=>t<e?-1:t>e?1:0),e}return t}if(t&&"object"==typeof t){const e={};return Object.keys(t).sort().forEach(n=>{e[n]=this.normalizeValue(t[n])}),e}return t}compareValues(t,e,n,o){const r=[],i=this.getType(e),s=this.getType(n);if(void 0===e&&void 0!==n)return this.isComplexType(s)?(r.push(this.makeLine("added","",this.openingBrace(t,s,o))),r.push(...this.renderComplex(n,"added",o+1,!0)),r.push(this.makeLine("added","",this.closingBrace(s,o)))):r.push(this.makeLine("added","",this.renderPrimitive(t,n,o))),r;if(void 0!==e&&void 0===n)return this.isComplexType(i)?(r.push(this.makeLine("removed",this.openingBrace(t,i,o),"")),r.push(...this.renderComplex(e,"removed",o+1,!1)),r.push(this.makeLine("removed",this.closingBrace(i,o),""))):r.push(this.makeLine("removed",this.renderPrimitive(t,e,o),"")),r;if(i!==s||"object"!==i&&"array"!==i)this.isEqual(e,n)?r.push(this.makeLine("unchanged",this.renderPrimitive(t,e,o),this.renderPrimitive(t,n,o))):r.push(this.makeLine("changed",this.renderPrimitive(t,e,o),this.renderPrimitive(t,n,o)));else{if(r.push(this.makeLine("unchanged",this.openingBrace(t,i,o),this.openingBrace(t,s,o))),"object"===i){const t=new Set([...Object.keys(e),...Object.keys(n)]),i=Array.from(t).sort();for(const t of i){const i=e[t],s=n[t];r.push(...this.compareValues(t,i,s,o+1))}}else{const t=Math.max(e.length,n.length);let i=!1;for(let o=0;o<t;o++){const t=e[o],r=n[o];if(!this.isEqual(t,r)){i=!0;break}}if(i)for(let i=0;i<t;i++){const t=e[i],s=n[i];this.isEqual(t,s)||(void 0===t&&void 0!==s?this.isComplexType(this.getType(s))?(r.push(this.makeLine("added","",this.openingBrace(`[${i}]`,this.getType(s),o+1))),r.push(...this.renderComplex(s,"added",o+2,!0)),r.push(this.makeLine("added","",this.closingBrace(this.getType(s),o+1)))):r.push(this.makeLine("added","",this.renderPrimitive(`[${i}]`,s,o+1))):void 0!==t&&void 0===s?this.isComplexType(this.getType(t))?(r.push(this.makeLine("removed",this.openingBrace(`[${i}]`,this.getType(t),o+1),"")),r.push(...this.renderComplex(t,"removed",o+2,!1)),r.push(this.makeLine("removed",this.closingBrace(this.getType(t),o+1),""))):r.push(this.makeLine("removed",this.renderPrimitive(`[${i}]`,t,o+1),"")):r.push(...this.compareValues(`[${i}]`,t,s,o+1)))}else for(let t=0;t<e.length;t++)r.push(...this.compareValues(`[${t}]`,e[t],n[t],o+1))}r.push(this.makeLine("unchanged",this.closingBrace(i,o),this.closingBrace(s,o)))}return r}isComplexType(t){return"object"===t||"array"===t}renderComplex(t,e,n,o){const r=[],i=this.getType(t);if("object"===i){Object.keys(t).sort().forEach(i=>{const s=t[i],a=this.getType(s);this.isComplexType(a)?(r.push(this.makeLine(e,o?"":this.openingBrace(i,a,n),o?this.openingBrace(i,a,n):"")),r.push(...this.renderComplex(s,e,n+1,o)),r.push(this.makeLine(e,o?"":this.closingBrace(a,n),o?this.closingBrace(a,n):""))):r.push(this.makeLine(e,o?"":this.renderPrimitive(i,s,n),o?this.renderPrimitive(i,s,n):""))})}else if("array"===i)for(let i=0;i<t.length;i++){const s=t[i],a=this.getType(s);this.isComplexType(a)?(r.push(this.makeLine(e,o?"":this.openingBrace(`[${i}]`,a,n),o?this.openingBrace(`[${i}]`,a,n):"")),r.push(...this.renderComplex(s,e,n+1,o)),r.push(this.makeLine(e,o?"":this.closingBrace(a,n),o?this.closingBrace(a,n):""))):r.push(this.makeLine(e,o?"":this.renderPrimitive(`[${i}]`,s,n),o?this.renderPrimitive(`[${i}]`,s,n):""))}else r.push(this.makeLine(e,o?"":this.renderPrimitive(null,t,n),o?this.renderPrimitive(null,t,n):""));return r}getType(t){return null===t?"null":Array.isArray(t)?"array":"object"==typeof t?"object":"primitive"}isEqual(t,e){return JSON.stringify(t)===JSON.stringify(e)}makeLine(t,e,n){return{type:t,leftContent:e,rightContent:n}}openingBrace(t,e,n){const o=this.getIndentString(n),r="array"===e?"[":"{";return t?t.startsWith("[")?`${o}${t}: ${r}`:`${o}"${t}": ${r}`:`${o}${r}`}closingBrace(t,e){return`${this.getIndentString(e)}${"array"===t?"]":"}"}`}renderPrimitive(t,e,n){const o=this.getIndentString(n),r=JSON.stringify(e);return t?t.startsWith("[")?`${o}${t}: ${r}`:`${o}"${t}": ${r}`:`${o}${r}`}getIndentString(t){let e="";for(let n=0;n<t;n++)e+="\t";return e}assignLineNumbers(t){let e=1,n=1;return t.map(t=>{let o="",r="";return"removed"===t.type?(o=(e++).toString(),r=""):"added"===t.type?(o="",r=(n++).toString()):(o=(e++).toString(),r=(n++).toString()),{...t,leftNumber:o,rightNumber:r}})}setupScrollSync(){setTimeout(()=>{const t=this.diffContent.nativeElement,e=t.querySelectorAll(".left"),n=t.querySelectorAll(".right");if(e.length&&n.length){const t=e[0],o=n[0];t.addEventListener("scroll",()=>{o.scrollTop=t.scrollTop,o.scrollLeft=t.scrollLeft}),o.addEventListener("scroll",()=>{t.scrollTop=o.scrollTop,t.scrollLeft=o.scrollLeft})}})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:HtmlDiffViewerComponent,deps:[],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:HtmlDiffViewerComponent,isStandalone:!1,selector:"html-diff-viewer",inputs:{payloadStr:"payloadStr"},viewQueries:[{propertyName:"leftTextarea",first:!0,predicate:["leftTextarea"],descendants:!0},{propertyName:"rightTextarea",first:!0,predicate:["rightTextarea"],descendants:!0},{propertyName:"diffContent",first:!0,predicate:["diffContent"],descendants:!0}],ngImport:i0,template:'\n\t\t<div class="diff-container">\n\t\t <div class="diff-controls">\n\t\t <button type="button" class="btn"\n\t\t [class.btn-primary]="!showFullDiff"\n\t\t [class.btn-secondary]="showFullDiff"\n\t\t (click)="toggleDiffView()">\n\t\t {{ showFullDiff ? \'Show Full Content\' : \'Show Changes Only\' }}\n\t\t </button>\n\t\t </div>\n\t\t <div class="diff-header">\n\t\t <div class="diff-header-left">Original</div>\n\t\t <div class="diff-header-right">Modified</div>\n\t\t </div>\n\t\t <div class="diff-content" #diffContent>\n\t\t <div class="diff-lines">\n\t\t @for (line of visibleDiffLines; track line) {\n\t\t <div class="diff-line"\n\t\t [class.context-line]="line.isContext"\n\t\t [class.hidden-line]="line.hidden">\n\t\t <div class="line-number left">{{ line.leftNumber }}</div>\n\t\t <div class="line-content left"\n\t\t [class.deleted]="line.type === \'removed\'"\n\t\t [class.changed-left]="line.type === \'changed\'">\n\t\t <span>{{ line.leftContent }}</span>\n\t\t </div>\n\t\t <div class="line-number right">{{ line.rightNumber }}</div>\n\t\t <div class="line-content right"\n\t\t [class.added]="line.type === \'added\'"\n\t\t [class.changed-right]="line.type === \'changed\'">\n\t\t <span>{{ line.rightContent }}</span>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t <div class="input-container">\n\t\t <textarea #leftTextarea [(ngModel)]="leftContent" placeholder="Left side content" rows="10"></textarea>\n\t\t <textarea #rightTextarea [(ngModel)]="rightContent" placeholder="Right side content" rows="10"></textarea>\n\t\t </div>\n\t\t</div>\n\t\t',isInline:!0,styles:[".diff-container{display:flex;flex-direction:column;font-family:monospace;font-size:12px;line-height:1.5}.diff-controls{margin-bottom:10px}.btn{padding:5px 10px;border-radius:4px;cursor:pointer;border:1px solid #ddd}.btn-primary{background-color:#0366d6;color:#fff}.btn-secondary{background-color:#f6f8fa;color:#24292e}.diff-header{display:flex;background:#f6f8fa;border:1px solid #e1e4e8;border-bottom:none;padding:8px 16px;font-weight:700}.diff-header-left,.diff-header-right{width:50%;box-sizing:border-box}.diff-content{border:1px solid #e1e4e8;overflow:auto;max-height:500px}.diff-lines{display:flex;flex-direction:column;width:100%}.diff-line{display:flex;width:100%}.context-line{background-color:#f1f8ff}.hidden-line{display:none}.line-number{width:40px!important;min-width:40px!important;padding:0 10px;text-align:right;color:#1b1f234d;background-color:#f6f8fa;border-right:1px solid #e1e4e8;-webkit-user-select:none;user-select:none}.line-content{flex:1;padding:0 10px;white-space:pre;min-width:0;overflow-x:auto}.left{width:50%;border-right:1px solid #e1e4e8}.right{width:50%}.added{background-color:#e6ffed}.deleted{background-color:#ffebe9}.changed-left{background-color:#fff3bf;text-decoration:line-through}.changed-right{background-color:#d4edda}.input-container{display:flex;margin-top:20px;gap:10px}textarea{width:50%;height:200px;font-family:monospace;padding:10px;border:1px solid #ddd;border-radius:4px;box-sizing:border-box}*{word-wrap:normal!important}\n"],dependencies:[{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:HtmlDiffViewerComponent,decorators:[{type:Component,args:[{selector:"html-diff-viewer",template:'\n\t\t<div class="diff-container">\n\t\t <div class="diff-controls">\n\t\t <button type="button" class="btn"\n\t\t [class.btn-primary]="!showFullDiff"\n\t\t [class.btn-secondary]="showFullDiff"\n\t\t (click)="toggleDiffView()">\n\t\t {{ showFullDiff ? \'Show Full Content\' : \'Show Changes Only\' }}\n\t\t </button>\n\t\t </div>\n\t\t <div class="diff-header">\n\t\t <div class="diff-header-left">Original</div>\n\t\t <div class="diff-header-right">Modified</div>\n\t\t </div>\n\t\t <div class="diff-content" #diffContent>\n\t\t <div class="diff-lines">\n\t\t @for (line of visibleDiffLines; track line) {\n\t\t <div class="diff-line"\n\t\t [class.context-line]="line.isContext"\n\t\t [class.hidden-line]="line.hidden">\n\t\t <div class="line-number left">{{ line.leftNumber }}</div>\n\t\t <div class="line-content left"\n\t\t [class.deleted]="line.type === \'removed\'"\n\t\t [class.changed-left]="line.type === \'changed\'">\n\t\t <span>{{ line.leftContent }}</span>\n\t\t </div>\n\t\t <div class="line-number right">{{ line.rightNumber }}</div>\n\t\t <div class="line-content right"\n\t\t [class.added]="line.type === \'added\'"\n\t\t [class.changed-right]="line.type === \'changed\'">\n\t\t <span>{{ line.rightContent }}</span>\n\t\t </div>\n\t\t </div>\n\t\t }\n\t\t </div>\n\t\t </div>\n\t\t <div class="input-container">\n\t\t <textarea #leftTextarea [(ngModel)]="leftContent" placeholder="Left side content" rows="10"></textarea>\n\t\t <textarea #rightTextarea [(ngModel)]="rightContent" placeholder="Right side content" rows="10"></textarea>\n\t\t </div>\n\t\t</div>\n\t\t',standalone:!1,styles:[".diff-container{display:flex;flex-direction:column;font-family:monospace;font-size:12px;line-height:1.5}.diff-controls{margin-bottom:10px}.btn{padding:5px 10px;border-radius:4px;cursor:pointer;border:1px solid #ddd}.btn-primary{background-color:#0366d6;color:#fff}.btn-secondary{background-color:#f6f8fa;color:#24292e}.diff-header{display:flex;background:#f6f8fa;border:1px solid #e1e4e8;border-bottom:none;padding:8px 16px;font-weight:700}.diff-header-left,.diff-header-right{width:50%;box-sizing:border-box}.diff-content{border:1px solid #e1e4e8;overflow:auto;max-height:500px}.diff-lines{display:flex;flex-direction:column;width:100%}.diff-line{display:flex;width:100%}.context-line{background-color:#f1f8ff}.hidden-line{display:none}.line-number{width:40px!important;min-width:40px!important;padding:0 10px;text-align:right;color:#1b1f234d;background-color:#f6f8fa;border-right:1px solid #e1e4e8;-webkit-user-select:none;user-select:none}.line-content{flex:1;padding:0 10px;white-space:pre;min-width:0;overflow-x:auto}.left{width:50%;border-right:1px solid #e1e4e8}.right{width:50%}.added{background-color:#e6ffed}.deleted{background-color:#ffebe9}.changed-left{background-color:#fff3bf;text-decoration:line-through}.changed-right{background-color:#d4edda}.input-container{display:flex;margin-top:20px;gap:10px}textarea{width:50%;height:200px;font-family:monospace;padding:10px;border:1px solid #ddd;border-radius:4px;box-sizing:border-box}*{word-wrap:normal!important}\n"]}]}],ctorParameters:()=>[],propDecorators:{payloadStr:[{type:Input}],leftTextarea:[{type:ViewChild,args:["leftTextarea"]}],rightTextarea:[{type:ViewChild,args:["rightTextarea"]}],diffContent:[{type:ViewChild,args:["diffContent"]}]}});class LoggerComponent extends BaseComponent{_services;_ds;_cd;subscription$=[];logs=[];entries_per_page=25;page_num=1;log_cnt=0;user=null;users=[];startDateTime;endDateTime;dateStart;dateEnd;selectedTypes=[];client=null;clients=[];collection="";method="";route="";id_document="";constructor(t,e,n){super(t),this._services=t,this._ds=e,this._cd=n}ngOnInit(){this._services._account.getUser().roles.super_admin||this._services._router.navigateByUrl("/home"),this.subscription$.push(this._services._socket.subscribe("activeClients").subscribe(t=>{this.clients=t,this._cd.detectChanges()})),this.subscription$.push(this._services._socket.subscribe("allUsers").subscribe(t=>{this.users=t,this._cd.detectChanges()}));let t=new Date;t.setHours(0,0,0,0);let e=new Date(moment$1(t).subtract(10,"days").toDate());this.startDateTime=this.createPickerValue(e,0);let n=new Date;n.setHours(23,59,59,999),this.endDateTime=this.createPickerValue(n,59),this.getLogData()}ngOnDestroy(){this.subscription$.forEach(t=>{t.unsubscribe()})}getLogData(){this.dateStart=this.toDate(this.startDateTime),this.dateEnd=this.toDate(this.endDateTime,!0);let t={$and:[{createdAt:{$gte:this.dateStart}},{createdAt:{$lte:this.dateEnd}}]};if(this.client)if(this.client.includes(",")){let e=this.client.split(",").map(t=>t.trim()).filter(t=>!t.startsWith("!"));e.length&&t.$and.push({client:{$in:e}}),this.client.split(",").map(t=>t.trim()).filter(t=>t.startsWith("!")).forEach(e=>{t.$and.push({client:{$ne:e.replace("!","")}})})}else this.client.startsWith("!")?t.$and.push({client:{$ne:this.client.replace("!","").trim()}}):t.$and.push({client:this.client.trim()});else t.$and.push({client:"ResolveIO"});if(this.selectedTypes.length){if(t.$and.push({type:{$in:this.selectedTypes}}),this.collection)if(this.collection.includes(",")){let e=this.collection.split(",").map(t=>t.trim()).filter(t=>!t.startsWith("!"));e.length&&t.$and.push({collection:{$in:e}}),this.collection.split(",").map(t=>t.trim()).filter(t=>t.startsWith("!")).forEach(e=>{t.$and.push({collection:{$ne:e.replace("!","")}})})}else this.collection.startsWith("!")?t.$and.push({collection:{$ne:this.collection.replace("!","").trim()}}):t.$and.push({collection:this.collection.trim()});if(this.method)if(this.method.includes(",")){let e=this.method.split(",").map(t=>t.trim()).filter(t=>!t.startsWith("!"));e.length&&t.$and.push({method:{$in:e}}),this.method.split(",").map(t=>t.trim()).filter(t=>t.startsWith("!")).forEach(e=>{t.$and.push({method:{$ne:e.replace("!","")}})})}else this.method.startsWith("!")?t.$and.push({method:{$ne:this.method.replace("!","").trim()}}):t.$and.push({method:this.method.trim()});if(this.route)if(this.route.includes(",")){let e=this.route.split(",").map(t=>t.trim()).filter(t=>!t.startsWith("!"));e.length&&t.$and.push({route:{$in:e}}),this.route.split(",").map(t=>t.trim()).filter(t=>t.startsWith("!")).forEach(e=>{t.$and.push({route:{$ne:e.replace("!","")}})})}else this.route.startsWith("!")?t.$and.push({route:{$ne:this.route.replace("!","").trim()}}):t.$and.push({route:this.route.trim()});if(this.id_document)if(this.id_document.includes(",")){let e=this.id_document.split(",").map(t=>t.trim()).filter(t=>!t.startsWith("!"));e.length&&t.$and.push({id_document:{$in:e}}),this.id_document.split(",").map(t=>t.trim()).filter(t=>t.startsWith("!")).forEach(e=>{t.$and.push({id_document:{$ne:e.replace("!","")}})})}else this.id_document.startsWith("!")?t.$and.push({id_document:{$ne:this.id_document.replace("!","").trim()}}):t.$and.push({id_document:this.id_document.trim()});this.user&&t.$and.push({user:this.user}),"string"==typeof this.entries_per_page&&(this.entries_per_page=parseInt(this.entries_per_page)),this._services._socket.call("findWithOptions","logs",t,{sort:{createdAt:-1},limit:this.entries_per_page,skip:this.entries_per_page*(this.page_num-1)},(t,e)=>{this.logs=e,this._cd.detectChanges()}),this._services._socket.call("countCollectionWithQuery","logs",t,(t,e)=>{this.log_cnt=e,this._cd.detectChanges()}),this._cd.detectChanges()}}selectType(t){"all"!==t?this.selectedTypes.includes(t)?this.selectedTypes.splice(this.selectedTypes.indexOf(t),1):this.selectedTypes.push(t):7===this.selectedTypes.length?this.selectedTypes=[]:this.selectedTypes=["error","document","query","queryResponse","client-request","client-response","callMethod"],this.logs=[],this.selectedTypes.length&&this.getLogData()}icon(t){return"error"===t?"danger":"document"===t?"info":"client-response"===t?"success":"client-request"===t?"primary":"secondary"}removeAllLogs(){this._ds.confirm("Are you sure you want to delete all logs?").then(()=>{this._services._socket.call("removeAllDocuments","logs")},()=>{})}toDate(t,e=!1){if(!t||!t.date)return new Date;let n=t.time||{hour:0,minute:0,second:0,ms:0},o=e?999:n.ms||0;return new Date(t.date.year,t.date.month-1,t.date.day,n.hour||0,n.minute||0,n.second||0,o)}createPickerValue(t,e=null){return{mode:"datetime",date:{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()},time:{hour:t.getHours(),minute:t.getMinutes(),second:null!==e?e:t.getSeconds(),ms:t.getMilliseconds()}}}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:LoggerComponent,deps:[{token:ProviderService},{token:DialogService},{token:i0.ChangeDetectorRef}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:LoggerComponent,isStandalone:!1,selector:"resolveio-logger",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<div class="row">\n\t<div class="col-lg-12">\n\t\t<div class="card">\n\t\t\t<div class="card-header"><b>Filters</b></div>\n\t\t\t<div class="card-body">\n\t\t\t\t<div class="row">\n\t\t\t\t\t<div class="col-lg-12">\n\t\t\t\t\t\t<responsive-button-group collapseSize="900">\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'error\') && selectedTypes.includes(\'document\') && selectedTypes.includes(\'query\') && selectedTypes.includes(\'client-request\') && selectedTypes.includes(\'client-response\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'all\')">All</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'error\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'error\')">Errors</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'document\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'document\')">Document</button>\n\t\t\t\t\t\t\t\x3c!-- <button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'query\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'query\')">Query</button> --\x3e\n\t\t\t\t\t\t\t\x3c!-- <button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'queryResponse\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'queryResponse\')">Query Response</button> --\x3e\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'client-request\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'client-request\')">Client Requests</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'client-response\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'client-response\')">Client Responses</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'callMethod\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'callMethod\')">Call Method</button>\n\t\t\t\t\t\t\t<button type="button" class="btn btn-danger" (click)="removeAllLogs()">REMOVE ALL LOGS</button>\n\t\t\t\t\t\t</responsive-button-group>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Client</label>\n\t\t\t\t\t\t<rio-select [(ngModel)]="client" (change)="getLogData()" placeholder="Select Client" [options]="clients" optionValueKey="name" optionLabelKey="name"></rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">User</label>\n\t\t\t\t\t\t<rio-select [(ngModel)]="user" (change)="getLogData()" placeholder="Select User" [options]="users" optionValueKey="fullname" optionLabelKey="fullname"></rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Collection</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="collection" (change)="getLogData()" placeholder="Input Colls Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Method</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="method" (change)="getLogData()" placeholder="Input Methods Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Route</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="route" (change)="getLogData()" placeholder="Input Routes Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Document</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="id_document" (change)="getLogData()" placeholder="Input Ids Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t<div class="col-lg-2 offset-lg-4">\n\t\t\t\t\t\t<label class="form-control-label">Date/Time Start</label>\n\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t<rio-date-picker [(ngModel)]="startDateTime" (ngModelChange)="getLogData()" selectionMode="datetime" [allowSeconds]="true"></rio-date-picker>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Date/Time End</label>\n\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t<rio-date-picker [(ngModel)]="endDateTime" (ngModelChange)="getLogData()" selectionMode="datetime" [allowSeconds]="true"></rio-date-picker>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t<div ngbAccordion #acc="ngbAccordion" activeIds="">\n\t\t\t\t\t\t@for (log of logs; track log._id; let i = $index) {\n\t\t\t\t\t\t\t<div ngbAccordionItem [id]="\'log_\' + i">\n\t\t\t\t\t\t\t\t<div ngbAccordionHeader>\n\t\t\t\t\t\t\t\t\t<button ngbAccordionButton type="button">\n\t\t\t\t\t\t\t\t\t\t<label class="label-accordion" style="width: 90%; height: 22px">\n\t\t\t\t\t\t\t\t\t\t\t<strong class="float-start">Type: {{ log.type }}{{ log.method ? \' - Method: \' + log.method : \'\' }}{{ log.collection ? \' - Collection: \' + log.collection : \'\' }}{{ log.user ? \' - User: \' + log.user : \'\' }}{{ log.route ? \' - Route: \' + log.route : \'\' }}{{ log.id_document ? \' - id_document: \' + log.id_document : \'\' }}{{ log.messageId ? \' - messageId: \' + log.messageId : \'\' }}{{ log.instance ? \' - instance: \' + log.instance : \'\' }}</strong>\n\t\t\t\t\t\t\t\t\t\t\t<p class="float-end mb-0">{{ log.createdAt | date: \'medium\' }}</p>\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div ngbAccordionCollapse>\n\t\t\t\t\t\t\t\t\t<div ngbAccordionBody>\n\t\t\t\t\t\t\t\t\t\t<ng-template>\n\t\t\t\t\t\t\t\t\t\t\t@if (log.payload) {\n\t\t\t\t\t\t\t\t\t\t\t\t@if (log.method === \'replaceOne\' || log.method === \'updateOne\') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordion #acc2="ngbAccordion" activeIds="diff">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionItem id="diff">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button ngbAccordionButton type="button">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class="label-accordion" style="width: 90%; height: 22px">Diff</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionCollapse>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionBody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<html-diff-viewer [payloadStr]="log.payload"></html-diff-viewer>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionItem id="raw">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button ngbAccordionButton type="button">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class="label-accordion" style="width: 90%; height: 22px">Raw</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionCollapse>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionBody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<pre>{{ log.payload | jsonParse }}</pre>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t@if (log.method !== \'replaceOne\' && log.method !== \'updateOne\') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t<pre>{{ log.payload | jsonParse }}</pre>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t@if (!log.payload) {\n\t\t\t\t\t\t\t\t\t\t\t\tNo Data\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t\t<div class="col-lg-4">\n\t\t\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t\t\t<div class="col-lg-8">\n\t\t\t\t\t\t\t\t\t<label class="form-control-label">Entries Per Page</label>\n\t\t\t\t\t\t\t\t\t<select class="form-control" [(ngModel)]="entries_per_page" (change)="getLogData()">\n\t\t\t\t\t\t\t\t\t\t<option value="10">10</option>\n\t\t\t\t\t\t\t\t\t\t<option value="25">25</option>\n\t\t\t\t\t\t\t\t\t\t<option value="50">50</option>\n\t\t\t\t\t\t\t\t\t\t<option value="100">100</option>\n\t\t\t\t\t\t\t\t\t\t<option value="250">250</option>\n\t\t\t\t\t\t\t\t\t\t<option value="500">500</option>\n\t\t\t\t\t\t\t\t\t\t<option value="1000">1000</option>\n\t\t\t\t\t\t\t\t\t\t<option value="5000">5000</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-lg-8">\n\t\t\t\t\t\t\t<ngb-pagination class="float-end" boundaryLinks="true" [collectionSize]="log_cnt" directionLinks="true" ellipses="false" [(page)]="page_num" maxSize="6" [pageSize]="entries_per_page" rotate="true" (pageChange)="getLogData()"></ngb-pagination>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',dependencies:[{kind:"directive",type:i2.NgSelectOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:i2.ɵNgSelectMultipleOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.SelectControlValueAccessor,selector:"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]",inputs:["compareWith"]},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"directive",type:i1$2.NgbAccordionButton,selector:"button[ngbAccordionButton]"},{kind:"directive",type:i1$2.NgbAccordionDirective,selector:"[ngbAccordion]",inputs:["animation","closeOthers","destroyOnHide"],outputs:["show","shown","hide","hidden"],exportAs:["ngbAccordion"]},{kind:"directive",type:i1$2.NgbAccordionItem,selector:"[ngbAccordionItem]",inputs:["ngbAccordionItem","destroyOnHide","disabled","collapsed"],outputs:["show","shown","hide","hidden"],exportAs:["ngbAccordionItem"]},{kind:"directive",type:i1$2.NgbAccordionHeader,selector:"[ngbAccordionHeader]"},{kind:"component",type:i1$2.NgbAccordionBody,selector:"[ngbAccordionBody]"},{kind:"directive",type:i1$2.NgbAccordionCollapse,selector:"[ngbAccordionCollapse]",exportAs:["ngbAccordionCollapse"]},{kind:"component",type:i1$2.NgbPagination,selector:"ngb-pagination",inputs:["disabled","boundaryLinks","directionLinks","ellipses","rotate","collectionSize","maxSize","page","pageSize","size"],outputs:["pageChange"]},{kind:"component",type:ResponsiveButtonGroupComponent,selector:"responsive-button-group",inputs:["collapseSize"]},{kind:"component",type:i5.RioSelectComponent,selector:"rio-select",inputs:["placeholder","multiple","panelMaxHeight","panelMaxViewportRatio","optionHeight","virtualBuffer","overlayZIndex","autoSizePanel","panelPosition","autoCenterPanel","viewportMargin","panelWidth","panelFullscreenWidth","clearable","templateLabelFromView","searchable","searchMatchMode","defaultSearch","textWrap","compareWith","options","optionLabelKey","optionLabelFn","optionValueKey","optionDisabledKey","optionIdKey","optionGroupKey","disabled","emitOptionObject","debugLog","stickyKey","stickyAutoSave"],outputs:["change"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"component",type:i7$1.RioDatePickerComponent,selector:"rio-date-picker",inputs:["enableDate","enableTime","selectionMode","firstDayOfWeek","toggleWeekFirstDay","timezone","minDate","maxDate","disabled","label","allowSeconds","minuteStep","panelWidth"],outputs:["change"]},{kind:"component",type:HtmlDiffViewerComponent,selector:"html-diff-viewer",inputs:["payloadStr"]},{kind:"pipe",type:JsonParsePipe,name:"jsonParse"},{kind:"pipe",type:i7.DatePipe,name:"date"}],changeDetection:i0.ChangeDetectionStrategy.OnPush})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:LoggerComponent,decorators:[{type:Component,args:[{selector:"resolveio-logger",providers:[ProviderService],changeDetection:ChangeDetectionStrategy.OnPush,standalone:!1,template:'<div class="row">\n\t<div class="col-lg-12">\n\t\t<div class="card">\n\t\t\t<div class="card-header"><b>Filters</b></div>\n\t\t\t<div class="card-body">\n\t\t\t\t<div class="row">\n\t\t\t\t\t<div class="col-lg-12">\n\t\t\t\t\t\t<responsive-button-group collapseSize="900">\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'error\') && selectedTypes.includes(\'document\') && selectedTypes.includes(\'query\') && selectedTypes.includes(\'client-request\') && selectedTypes.includes(\'client-response\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'all\')">All</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'error\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'error\')">Errors</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'document\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'document\')">Document</button>\n\t\t\t\t\t\t\t\x3c!-- <button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'query\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'query\')">Query</button> --\x3e\n\t\t\t\t\t\t\t\x3c!-- <button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'queryResponse\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'queryResponse\')">Query Response</button> --\x3e\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'client-request\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'client-request\')">Client Requests</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'client-response\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'client-response\')">Client Responses</button>\n\t\t\t\t\t\t\t<button type="button" [ngClass]="[\'btn\', selectedTypes.includes(\'callMethod\') ? \'btn-success\' : \'btn-warning\']" (click)="selectType(\'callMethod\')">Call Method</button>\n\t\t\t\t\t\t\t<button type="button" class="btn btn-danger" (click)="removeAllLogs()">REMOVE ALL LOGS</button>\n\t\t\t\t\t\t</responsive-button-group>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Client</label>\n\t\t\t\t\t\t<rio-select [(ngModel)]="client" (change)="getLogData()" placeholder="Select Client" [options]="clients" optionValueKey="name" optionLabelKey="name"></rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">User</label>\n\t\t\t\t\t\t<rio-select [(ngModel)]="user" (change)="getLogData()" placeholder="Select User" [options]="users" optionValueKey="fullname" optionLabelKey="fullname"></rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Collection</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="collection" (change)="getLogData()" placeholder="Input Colls Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Method</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="method" (change)="getLogData()" placeholder="Input Methods Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Route</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="route" (change)="getLogData()" placeholder="Input Routes Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Document</label>\n\t\t\t\t\t\t<input class="form-control" [(ngModel)]="id_document" (change)="getLogData()" placeholder="Input Ids Sep By , & ! for !Not" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t<div class="col-lg-2 offset-lg-4">\n\t\t\t\t\t\t<label class="form-control-label">Date/Time Start</label>\n\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t<rio-date-picker [(ngModel)]="startDateTime" (ngModelChange)="getLogData()" selectionMode="datetime" [allowSeconds]="true"></rio-date-picker>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="col-lg-2">\n\t\t\t\t\t\t<label class="form-control-label">Date/Time End</label>\n\t\t\t\t\t\t<div class="input-group">\n\t\t\t\t\t\t\t<rio-date-picker [(ngModel)]="endDateTime" (ngModelChange)="getLogData()" selectionMode="datetime" [allowSeconds]="true"></rio-date-picker>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t<div ngbAccordion #acc="ngbAccordion" activeIds="">\n\t\t\t\t\t\t@for (log of logs; track log._id; let i = $index) {\n\t\t\t\t\t\t\t<div ngbAccordionItem [id]="\'log_\' + i">\n\t\t\t\t\t\t\t\t<div ngbAccordionHeader>\n\t\t\t\t\t\t\t\t\t<button ngbAccordionButton type="button">\n\t\t\t\t\t\t\t\t\t\t<label class="label-accordion" style="width: 90%; height: 22px">\n\t\t\t\t\t\t\t\t\t\t\t<strong class="float-start">Type: {{ log.type }}{{ log.method ? \' - Method: \' + log.method : \'\' }}{{ log.collection ? \' - Collection: \' + log.collection : \'\' }}{{ log.user ? \' - User: \' + log.user : \'\' }}{{ log.route ? \' - Route: \' + log.route : \'\' }}{{ log.id_document ? \' - id_document: \' + log.id_document : \'\' }}{{ log.messageId ? \' - messageId: \' + log.messageId : \'\' }}{{ log.instance ? \' - instance: \' + log.instance : \'\' }}</strong>\n\t\t\t\t\t\t\t\t\t\t\t<p class="float-end mb-0">{{ log.createdAt | date: \'medium\' }}</p>\n\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div ngbAccordionCollapse>\n\t\t\t\t\t\t\t\t\t<div ngbAccordionBody>\n\t\t\t\t\t\t\t\t\t\t<ng-template>\n\t\t\t\t\t\t\t\t\t\t\t@if (log.payload) {\n\t\t\t\t\t\t\t\t\t\t\t\t@if (log.method === \'replaceOne\' || log.method === \'updateOne\') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordion #acc2="ngbAccordion" activeIds="diff">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionItem id="diff">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button ngbAccordionButton type="button">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class="label-accordion" style="width: 90%; height: 22px">Diff</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionCollapse>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionBody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<html-diff-viewer [payloadStr]="log.payload"></html-diff-viewer>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionItem id="raw">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionHeader>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button ngbAccordionButton type="button">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class="label-accordion" style="width: 90%; height: 22px">Raw</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionCollapse>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div ngbAccordionBody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<pre>{{ log.payload | jsonParse }}</pre>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t@if (log.method !== \'replaceOne\' && log.method !== \'updateOne\') {\n\t\t\t\t\t\t\t\t\t\t\t\t\t<pre>{{ log.payload | jsonParse }}</pre>\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t@if (!log.payload) {\n\t\t\t\t\t\t\t\t\t\t\t\tNo Data\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t\t<div class="col-lg-4">\n\t\t\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t\t\t<div class="col-lg-8">\n\t\t\t\t\t\t\t\t\t<label class="form-control-label">Entries Per Page</label>\n\t\t\t\t\t\t\t\t\t<select class="form-control" [(ngModel)]="entries_per_page" (change)="getLogData()">\n\t\t\t\t\t\t\t\t\t\t<option value="10">10</option>\n\t\t\t\t\t\t\t\t\t\t<option value="25">25</option>\n\t\t\t\t\t\t\t\t\t\t<option value="50">50</option>\n\t\t\t\t\t\t\t\t\t\t<option value="100">100</option>\n\t\t\t\t\t\t\t\t\t\t<option value="250">250</option>\n\t\t\t\t\t\t\t\t\t\t<option value="500">500</option>\n\t\t\t\t\t\t\t\t\t\t<option value="1000">1000</option>\n\t\t\t\t\t\t\t\t\t\t<option value="5000">5000</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-lg-8">\n\t\t\t\t\t\t\t<ngb-pagination class="float-end" boundaryLinks="true" [collectionSize]="log_cnt" directionLinks="true" ellipses="false" [(page)]="page_num" maxSize="6" [pageSize]="entries_per_page" rotate="true" (pageChange)="getLogData()"></ngb-pagination>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}]}],ctorParameters:()=>[{type:ProviderService},{type:DialogService},{type:i0.ChangeDetectorRef}]});class CoreLoggerModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreLoggerModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CoreLoggerModule,declarations:[LoggerComponent,HtmlDiffViewerComponent],imports:[SharedModule],exports:[LoggerComponent,HtmlDiffViewerComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreLoggerModule,imports:[SharedModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreLoggerModule,decorators:[{type:NgModule,args:[{declarations:[LoggerComponent,HtmlDiffViewerComponent],imports:[SharedModule],exports:[LoggerComponent,HtmlDiffViewerComponent]}]}]});class UserSettingsService{selectedUser=new BehaviorSubject("0");constructor(){}setSelectedUser(t){this.selectedUser.next(t)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsService,deps:[],target:i0.ɵɵFactoryTarget.Injectable});static"ɵprov"=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsService})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsService,decorators:[{type:Injectable}],ctorParameters:()=>[]});const UserSettingsModulePermission={name:"user-settings",views:[{link:"/user-settings/settings",label:"Settings"}],approval:{type:"user-settings"}};class UserSettingsComponent extends BaseComponent{_us;_services;selectedUserSettings$;menuData;constructor(t,e){super(e),this._us=t,this._services=e}ngOnInit(){this.selectedUserSettings$=this._us.selectedUser.subscribe(t=>this.selectedUserSettingsChanged(t))}ngOnDestroy(){this._us.setSelectedUser("0"),this.selectedUserSettings$.unsubscribe()}selectedUserSettingsChanged(t){this.setUserSettingsMenuData()}setUserSettingsMenuData(t,e){let n=[];UserSettingsModulePermission.views.forEach(t=>{if((this._services._account.isUserInView(t.link)||this._services._account.isUserSuperAdmin())&&"/user-settings/settings"===t.link)n.push({link:"/user-settings/settings",params:null,label:"Settings"})}),this.menuData={title:"User Settings",module:"User Settings",description_name:"User: ",description:e?e.fullname:"",tabs:n},this._services._app.setNavbarModuleData(this.menuData)}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsComponent,deps:[{token:UserSettingsService},{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:UserSettingsComponent,isStandalone:!1,selector:"resolveio-user-settings",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:"<router-outlet></router-outlet>",isInline:!0,dependencies:[{kind:"directive",type:i1$1.RouterOutlet,selector:"router-outlet",inputs:["name","routerOutletData"],outputs:["activate","deactivate","attach","detach"],exportAs:["outlet"]}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsComponent,decorators:[{type:Component,args:[{selector:"resolveio-user-settings",providers:[ProviderService],template:"<router-outlet></router-outlet>",standalone:!1}]}],ctorParameters:()=>[{type:UserSettingsService},{type:ProviderService}]});class UsersSettingsComponent extends BaseComponent{_aps;_us;_services;_ds;_stickyAdapter;subscription$=[];form;disableFormButton=!1;user;client="";views=[];stickySelects=[];stickySelections={};constructor(t,e,n,o,r){super(n),this._aps=t,this._us=e,this._services=n,this._ds=o,this._stickyAdapter=r}ngOnInit(){this._us.setSelectedUser("0"),this.client=this._services._app.client.getValue(),this.form=this._services._fb.group({table_color:["#3b3ee3",[Validators.required]],table_font_color:["#ffffff",[Validators.required]],font_size:[12,[Validators.required,this._services._vs.wholeNumbersGreaterThanZero,this._services._vs.maxValue(18),this._services._vs.minValue(8)]],secondary_table_color:["#87ceeb",[Validators.required]],secondary_table_font_color:["#000000",[Validators.required]],tertiary_table_color:["#ff4500",[Validators.required]],tertiary_table_font_color:["#000000",[Validators.required]],collapsable_menu:[!0],entries_per_page:["25",[Validators.required]],warning_color:["#ffc107",[Validators.required]],warning_font_color:["#000000",[Validators.required]],warning_hover_color:["#e0a800",[Validators.required]],success_color:["#28a745",[Validators.required]],success_font_color:["#ffffff",[Validators.required]],success_hover_color:["#218838",[Validators.required]],danger_color:["#dc3545",[Validators.required]],danger_font_color:["#ffffff",[Validators.required]],danger_hover_color:["#c82333",[Validators.required]],info_color:["#17a2b8",[Validators.required]],info_font_color:["#ffffff",[Validators.required]],info_hover_color:["#138496",[Validators.required]],primary_color:["#007bff",[Validators.required]],primary_font_color:["#ffffff",[Validators.required]],primary_hover_color:["#0069d9",[Validators.required]],secondary_color:["#868e96",[Validators.required]],secondary_font_color:["#ffffff",[Validators.required]],secondary_hover_color:["#5a6268",[Validators.required]],date_picker_day_start:["S",[Validators.required]],routing_preference:["alwaysAsk"],opening_route:["/home"],rio_select_search_mode:["exact",[Validators.required]]});const t=this._services._account.getUser();t&&t.settings&&(this.form.patchValue(t.settings),t.roles.groups.forEach(t=>{t.views.forEach(t=>{this.views.some(e=>e.value===t)||this.views.push({value:t,display:toTitleCase(t.replace("/","").replace(new RegExp("/","g")," - "))})})}));const e=this._normalizeDatePickerDayStart(t?.other?.date_picker_day_start);this.form.controls.date_picker_day_start.setValue(e),this._loadStickySelects(this._services._account.getUser()),document.documentElement.style.setProperty("--primary-table-color",this.form.controls.table_color.value),document.documentElement.style.setProperty("--primary-table-font-color",this.form.controls.table_font_color.value),document.documentElement.style.setProperty("--font-size",this.form.controls.font_size.value+"px"),document.documentElement.style.setProperty("--secondary-table-color",this.form.controls.secondary_table_color.value),document.documentElement.style.setProperty("--secondary-table-font-color",this.form.controls.secondary_table_font_color.value),document.documentElement.style.setProperty("--tertiary-table-color",this.form.controls.tertiary_table_color.value),document.documentElement.style.setProperty("--tertiary-table-font-color",this.form.controls.tertiary_table_font_color.value),document.documentElement.style.setProperty("--warning-color",this.form.controls.warning_color.value),document.documentElement.style.setProperty("--warning-font-color",this.form.controls.warning_font_color.value),document.documentElement.style.setProperty("--warning-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.warning_color.value,.5)),document.documentElement.style.setProperty("--warning-hover-color",this.form.controls.warning_hover_color.value),document.documentElement.style.setProperty("--success-color",this.form.controls.success_color.value),document.documentElement.style.setProperty("--success-font-color",this.form.controls.success_font_color.value),document.documentElement.style.setProperty("--success-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.success_color.value,.5)),document.documentElement.style.setProperty("--success-hover-color",this.form.controls.success_hover_color.value),document.documentElement.style.setProperty("--danger-color",this.form.controls.danger_color.value),document.documentElement.style.setProperty("--danger-font-color",this.form.controls.danger_font_color.value),document.documentElement.style.setProperty("--danger-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.danger_color.value,.5)),document.documentElement.style.setProperty("--danger-hover-color",this.form.controls.danger_hover_color.value),document.documentElement.style.setProperty("--info-color",this.form.controls.info_color.value),document.documentElement.style.setProperty("--info-font-color",this.form.controls.info_font_color.value),document.documentElement.style.setProperty("--info-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.info_color.value,.5)),document.documentElement.style.setProperty("--info-hover-color",this.form.controls.info_hover_color.value),document.documentElement.style.setProperty("--primary-color",this.form.controls.primary_color.value),document.documentElement.style.setProperty("--primary-font-color",this.form.controls.primary_font_color.value),document.documentElement.style.setProperty("--primary-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.primary_color.value,.5)),document.documentElement.style.setProperty("--primary-hover-color",this.form.controls.primary_hover_color.value),document.documentElement.style.setProperty("--secondary-color",this.form.controls.secondary_color.value),document.documentElement.style.setProperty("--secondary-font-color",this.form.controls.secondary_font_color.value),document.documentElement.style.setProperty("--secondary-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.secondary_color.value,.5)),document.documentElement.style.setProperty("--secondary-hover-color",this.form.controls.secondary_hover_color.value),this.subscription$.push(this._services._account.user.subscribe(t=>{this.user=t,this._loadStickySelects(t)}))}ngOnDestroy(){const t=this._services._account.getUser();t&&!t.settings&&this.form&&this.form.valid&&this.submitForm(this.form),this.subscription$.forEach(t=>{t.unsubscribe()})}changePrimaryColor(){document.documentElement.style.setProperty("--primary-table-color",this.form.controls.table_color.value)}changePrimaryFontColor(){document.documentElement.style.setProperty("--primary-table-font-color",this.form.controls.table_font_color.value)}changePrimaryFontSize(){document.documentElement.style.setProperty("--font-size",this.form.controls.font_size.value+"px")}changeSecondaryColor(){document.documentElement.style.setProperty("--secondary-table-color",this.form.controls.secondary_table_color.value)}changeSecondaryFontColor(){document.documentElement.style.setProperty("--secondary-table-font-color",this.form.controls.secondary_table_font_color.value)}changeTertiaryColor(){document.documentElement.style.setProperty("--tertiary-table-color",this.form.controls.tertiary_table_color.value)}changeTertiaryFontColor(){document.documentElement.style.setProperty("--tertiary-table-font-color",this.form.controls.tertiary_table_font_color.value)}changeWarningColor(){document.documentElement.style.setProperty("--warning-color",this.form.controls.warning_color.value),document.documentElement.style.setProperty("--warning-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.warning_color.value,.5))}changeWarningHoverColor(){document.documentElement.style.setProperty("--warning-hover-color",this.form.controls.warning_hover_color.value)}changeWarningFontColor(){document.documentElement.style.setProperty("--warning-font-color",this.form.controls.warning_font_color.value)}changeSuccessColor(){document.documentElement.style.setProperty("--success-color",this.form.controls.success_color.value),document.documentElement.style.setProperty("--success-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.success_color.value,.5))}changeSuccessHoverColor(){document.documentElement.style.setProperty("--success-hover-color",this.form.controls.success_hover_color.value)}changeSuccessFontColor(){document.documentElement.style.setProperty("--success-font-color",this.form.controls.success_font_color.value)}changeDangerColor(){document.documentElement.style.setProperty("--danger-color",this.form.controls.danger_color.value),document.documentElement.style.setProperty("--danger-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.danger_color.value,.5))}changeDangerHoverColor(){document.documentElement.style.setProperty("--danger-hover-color",this.form.controls.danger_hover_color.value)}changeDangerFontColor(){document.documentElement.style.setProperty("--danger-font-color",this.form.controls.danger_font_color.value)}changeInfoColor(){document.documentElement.style.setProperty("--info-color",this.form.controls.info_color.value),document.documentElement.style.setProperty("--info-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.info_color.value,.5))}changeInfoHoverColor(){document.documentElement.style.setProperty("--info-hover-color",this.form.controls.info_hover_color.value)}changeInfoFontColor(){document.documentElement.style.setProperty("--info-font-color",this.form.controls.info_font_color.value)}changePrimaryButtonColor(){document.documentElement.style.setProperty("--primary-color",this.form.controls.primary_color.value),document.documentElement.style.setProperty("--primary-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.primary_color.value,.5))}changePrimaryButtonHoverColor(){document.documentElement.style.setProperty("--primary-hover-color",this.form.controls.primary_hover_color.value)}changePrimaryButtonFontColor(){document.documentElement.style.setProperty("--primary-font-color",this.form.controls.primary_font_color.value)}changeSecondaryButtonColor(){document.documentElement.style.setProperty("--secondary-color",this.form.controls.secondary_color.value),document.documentElement.style.setProperty("--secondary-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.secondary_color.value,.5))}changeSecondaryHoverColor(){document.documentElement.style.setProperty("--secondary-hover-color",this.form.controls.secondary_hover_color.value)}changeSecondaryButtonFontColor(){document.documentElement.style.setProperty("--secondary-font-color",this.form.controls.secondary_font_color.value)}reset(){this.form.controls.table_color.setValue("#3b3ee3"),this.form.controls.table_font_color.setValue("#ffffff"),this.form.controls.font_size.setValue(12),this.form.controls.secondary_table_color.setValue("#87ceeb"),this.form.controls.secondary_table_font_color.setValue("#000000"),this.form.controls.tertiary_table_color.setValue("#ff4500"),this.form.controls.tertiary_table_font_color.setValue("#000000"),this.form.controls.collapsable_menu.setValue(!0),this.form.controls.entries_per_page.setValue("25"),this.form.controls.warning_color.setValue("#ffc107"),this.form.controls.warning_font_color.setValue("#000000"),this.form.controls.warning_hover_color.setValue("#e0a800"),this.form.controls.success_color.setValue("#28a745"),this.form.controls.success_font_color.setValue("#ffffff"),this.form.controls.success_hover_color.setValue("#218838"),this.form.controls.danger_color.setValue("#dc3545"),this.form.controls.danger_font_color.setValue("#ffffff"),this.form.controls.danger_hover_color.setValue("#c82333"),this.form.controls.info_color.setValue("#17a2b8"),this.form.controls.info_font_color.setValue("#ffffff"),this.form.controls.info_hover_color.setValue("#138496"),this.form.controls.primary_color.setValue("#007bff"),this.form.controls.primary_font_color.setValue("#ffffff"),this.form.controls.primary_hover_color.setValue("#0069d9"),this.form.controls.secondary_color.setValue("#868e96"),this.form.controls.secondary_font_color.setValue("#ffffff"),this.form.controls.secondary_hover_color.setValue("#5a6268"),this.form.controls.date_picker_day_start.setValue("S"),this.form.controls.rio_select_search_mode.setValue("exact"),document.documentElement.style.setProperty("--primary-table-color",this.form.controls.table_color.value),document.documentElement.style.setProperty("--primary-table-font-color",this.form.controls.table_font_color.value),document.documentElement.style.setProperty("--font-size",this.form.controls.font_size.value+"px"),document.documentElement.style.setProperty("--secondary-table-color",this.form.controls.secondary_table_color.value),document.documentElement.style.setProperty("--secondary-table-font-color",this.form.controls.secondary_table_font_color.value),document.documentElement.style.setProperty("--tertiary-table-color",this.form.controls.tertiary_table_color.value),document.documentElement.style.setProperty("--tertiary-table-font-color",this.form.controls.tertiary_table_font_color.value),document.documentElement.style.setProperty("--warning-color",this.form.controls.warning_color.value),document.documentElement.style.setProperty("--warning-font-color",this.form.controls.warning_font_color.value),document.documentElement.style.setProperty("--warning-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.warning_color.value,.5)),document.documentElement.style.setProperty("--warning-hover-color",this.form.controls.warning_hover_color.value),document.documentElement.style.setProperty("--success-color",this.form.controls.success_color.value),document.documentElement.style.setProperty("--success-font-color",this.form.controls.success_font_color.value),document.documentElement.style.setProperty("--success-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.success_color.value,.5)),document.documentElement.style.setProperty("--success-hover-color",this.form.controls.success_hover_color.value),document.documentElement.style.setProperty("--danger-color",this.form.controls.danger_color.value),document.documentElement.style.setProperty("--danger-font-color",this.form.controls.danger_font_color.value),document.documentElement.style.setProperty("--danger-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.danger_color.value,.5)),document.documentElement.style.setProperty("--danger-hover-color",this.form.controls.danger_hover_color.value),document.documentElement.style.setProperty("--info-color",this.form.controls.info_color.value),document.documentElement.style.setProperty("--info-font-color",this.form.controls.info_font_color.value),document.documentElement.style.setProperty("--info-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.info_color.value,.5)),document.documentElement.style.setProperty("--info-hover-color",this.form.controls.info_hover_color.value),document.documentElement.style.setProperty("--primary-color",this.form.controls.primary_color.value),document.documentElement.style.setProperty("--primary-font-color",this.form.controls.primary_font_color.value),document.documentElement.style.setProperty("--primary-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.primary_color.value,.5)),document.documentElement.style.setProperty("--primary-hover-color",this.form.controls.primary_hover_color.value),document.documentElement.style.setProperty("--secondary-color",this.form.controls.secondary_color.value),document.documentElement.style.setProperty("--secondary-font-color",this.form.controls.secondary_font_color.value),document.documentElement.style.setProperty("--secondary-shadow-color","0 0 0 0.2rem "+hexToRGB(this.form.controls.secondary_color.value,.5)),document.documentElement.style.setProperty("--secondary-hover-color",this.form.controls.secondary_hover_color.value)}updateStickyDefault(t,e){const n=this.stickySelects.findIndex(e=>e.key===t);if(-1===n)return;const o=this.stickySelects.map(t=>({...t,options:t.options||[]})),r={...o[n]};r.defaultValue=void 0===e?null:e,r.defaultLabel=this._resolveStickyLabel(r,e),r.updatedAt=(new Date).toISOString(),o[n]=r,this.stickySelects=o,this.stickySelections[t]=e,this._stickyAdapter&&this._stickyAdapter.saveStickySelects(o,"user-settings")}_loadStickySelects(t){const e=t||this._services._account.getUser();if(e&&e.other&&Array.isArray(e.other.stickySelects)){const t=[],n=new Set;e.other.stickySelects.forEach(e=>{e&&e.key&&!n.has(e.key)&&(n.add(e.key),t.push({...e,options:e.options||[]}))}),this.stickySelects=t}else this.stickySelects=[];this.stickySelections={},this.stickySelects.forEach(t=>{this.stickySelections[t.key]=void 0!==t.defaultValue?t.defaultValue:null})}_resolveStickyLabel(t,e){if(null==e)return"";const n=(t.options||[]).find(t=>JSON.stringify(t.value)===JSON.stringify(e));return n&&n.label?n.label:"string"==typeof e?e:JSON.stringify(e)}submitForm(t){const e=this._services._account.getUser(),n=this.form.value,o=this._normalizeDatePickerDayStart(n.date_picker_day_start),{date_picker_day_start:r,...i}=n,s={...e?.other||{},date_picker_day_start:o};this._services._socket.call("updateDocumentProps","users",e._id,[{prop:"settings",data:i},{prop:"other",data:s}],e.__v,(t,n)=>{if(n){if(this._services._alert.setAlert("success","Settings have been updated"),e){const t={...e,__v:n&&n.__v?n.__v:e.__v,settings:i,other:s};this._services._account.setUser(t)}}else this._ds.error("Could not update settings"),this._services._socket.call("insertErrorLog","user settings - update user",[this._services._account.getUser(),t])})}_normalizeDatePickerDayStart(t){return"M"===t||"m"===t||1===t||"1"===t?"M":"S"}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UsersSettingsComponent,deps:[{token:AuthPermissionService},{token:UserSettingsService},{token:ProviderService},{token:DialogService},{token:RIO_SELECT_STICKY_ADAPTER,optional:!0}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:UsersSettingsComponent,isStandalone:!1,selector:"resolveio-users-settings",providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<style>\n\t.sticky-section-card,\n\t.sticky-section-card * {\n\t\ttransform: none !important;\n\t}\n\n\t:host {\n\t\tdisplay: block;\n\t}\n\n\t::ng-deep :root {\n\t\t--primary-table-color: #3b3ee3;\n\t\t--primary-table-font-color: #ffffff;\n\t\t--font-size: 12px;\n\t\t--secondary-table-color: #87ceeb;\n\t\t--secondary-table-font-color: #000000;\n\t\t--tertiary-table-color: #ff4500;\n\t\t--tertiary-table-font-color: #000000;\n\t\t--warning-color: #ffc107;\n\t\t--warning-font-color: #000000;\n\t\t--warning-hover-color: #e0a800;\n\t\t--warning-shadow-color: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);\n\t\t--success-color: #28a745;\n\t\t--success-font-color: #ffffff;\n\t\t--success-hover-color: #218838;\n\t\t--success-shadow-color: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);\n\t\t--danger-color: #dc3545;\n\t\t--danger-font-color: #ffffff;\n\t\t--danger-hover-color: #c82333;\n\t\t--danger-shadow-color: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);\n\t\t--info-color: #17a2b8;\n\t\t--info-font-color: #ffffff;\n\t\t--info-hover-color: #138496;\n\t\t--info-shadow-color: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);\n\t\t--primary-color: #007bff;\n\t\t--primary-font-color: #ffffff;\n\t\t--primary-hover-color: #0069d9;\n\t\t--primary-shadow-color: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);\n\t\t--secondary-color: #868e96;\n\t\t--secondary-font-color: #ffffff;\n\t\t--secondary-hover-color: #5a6268;\n\t\t--secondary-shadow-color: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);\n\t}\n\n\t.settings-shell {\n\t\tposition: relative;\n\t\toverflow: visible;\n\t\tpadding: 12px 8px 32px;\n\t\tbackground: radial-gradient(circle at 15% 20%, rgba(111, 136, 255, 0.12), transparent 35%),\n\t\t\tradial-gradient(circle at 80% 0%, rgba(255, 130, 92, 0.12), transparent 32%),\n\t\t\tlinear-gradient(135deg, #f7f9ff 0%, #ffffff 60%, #f5f7fb 100%);\n\t}\n\n\t.aurora {\n\t\tposition: absolute;\n\t\twidth: 420px;\n\t\theight: 420px;\n\t\tborder-radius: 50%;\n\t\tfilter: blur(70px);\n\t\topacity: .55;\n\t\tmix-blend-mode: screen;\n\t\tanimation: drift 18s ease-in-out infinite alternate;\n\t\tz-index: 0;\n\t}\n\n\t.aurora.aurora-one {\n\t\tbackground: radial-gradient(circle, rgba(82, 163, 255, .7), rgba(134, 120, 255, .25));\n\t\ttop: -120px;\n\t\tleft: -70px;\n\t}\n\n\t.aurora.aurora-two {\n\t\tbackground: radial-gradient(circle, rgba(255, 147, 92, .6), rgba(255, 227, 187, .35));\n\t\tbottom: -140px;\n\t\tright: -40px;\n\t\tanimation-duration: 22s;\n\t}\n\n\t.settings-hero {\n\t\tposition: relative;\n\t\tz-index: 1;\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(320px, 1fr));\n\t\tgap: 16px;\n\t\talign-items: center;\n\t\tmargin-bottom: 18px;\n\t}\n\n\t.glass-card {\n\t\tposition: relative;\n\t\tbackground: rgba(255, 255, 255, .78);\n\t\tborder: 1px solid rgba(255, 255, 255, .55);\n\t\tbox-shadow: 0 10px 40px rgba(54, 74, 120, .14), inset 0 0 0 1px rgba(255, 255, 255, .32);\n\t\tborder-radius: 18px;\n\t\tpadding: 18px;\n\t\toverflow: hidden;\n\t}\n\n\t.glass-card::before {\n\t\tcontent: \'\';\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder-radius: inherit;\n\t\tpointer-events: none;\n\t\tz-index: 0;\n\t}\n\n\t.hero-main h2 {\n\t\tfont-weight: 800;\n\t\tfont-size: 26px;\n\t\tmargin-bottom: 8px;\n\t\tcolor: #0f172a;\n\t}\n\n\t.hero-main p {\n\t\tcolor: #4b5563;\n\t\tmargin-bottom: 12px;\n\t}\n\n\t.hero-chip {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tgap: 6px;\n\t\tpadding: 6px 12px;\n\t\tborder-radius: 999px;\n\t\tfont-weight: 700;\n\t\tcolor: #1f2937;\n\t\tbackground: linear-gradient(120deg, rgba(99, 102, 241, .1), rgba(16, 185, 129, .1), rgba(59, 130, 246, .12));\n\t\tborder: 1px solid rgba(99, 102, 241, .25);\n\t\tmargin-bottom: 10px;\n\t\ttext-transform: uppercase;\n\t\tletter-spacing: .04em;\n\t\tfont-size: 12px;\n\t}\n\n\t.hero-actions {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 12px;\n\t\talign-items: center;\n\t\tmargin-top: 12px;\n\t}\n\n\t.neon-btn {\n\t\tposition: relative;\n\t\tborder: 1px solid rgba(15, 23, 42, .1);\n\t\tbackground: linear-gradient(120deg, rgba(99, 102, 241, .15), rgba(59, 130, 246, .08));\n\t\tcolor: #0f172a;\n\t\tfont-weight: 700;\n\t\tpadding: 10px 16px;\n\t\tborder-radius: 12px;\n\t\tbox-shadow: 0 10px 24px rgba(99, 102, 241, .15);\n\t\ttransition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;\n\t}\n\n\t.neon-btn:hover {\n\t\ttransform: translateY(-2px);\n\t\tborder-color: rgba(99, 102, 241, .45);\n\t\tbox-shadow: 0 14px 26px rgba(99, 102, 241, .22);\n\t}\n\n\t.save-button form-button ::ng-deep button {\n\t\tborder-radius: 12px;\n\t\tfont-weight: 800;\n\t\tletter-spacing: .01em;\n\t\tpadding: 11px 18px;\n\t\tbox-shadow: 0 10px 26px rgba(16, 185, 129, .24);\n\t}\n\n\t.hero-preview {\n\t\tposition: relative;\n\t}\n\n\t.preview-card {\n\t\tborder-radius: 16px;\n\t\tpadding: 16px;\n\t\tbackground: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .7), rgba(255, 255, 255, .52));\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 12px 30px rgba(80, 110, 185, .16);\n\t\tborder: 1px solid rgba(255, 255, 255, .6);\n\t}\n\n\t.preview-title {\n\t\tfont-weight: 800;\n\t\tmargin-bottom: 8px;\n\t\tcolor: #111827;\n\t}\n\n\t.swatch-row {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(140px, 1fr));\n\t\tgap: 10px;\n\t}\n\n\t.swatch {\n\t\tborder-radius: 12px;\n\t\tpadding: 10px;\n\t\tcolor: #0f172a;\n\t\tfont-weight: 700;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);\n\t\topacity: .98;\n\t}\n\n\t.swatch span {\n\t\tfont-size: 12px;\n\t\tfont-weight: 600;\n\t\tcolor: rgba(15, 23, 42, .85);\n\t}\n\n\t.preview-pulse {\n\t\tposition: absolute;\n\t\twidth: 120px;\n\t\theight: 120px;\n\t\tborder-radius: 50%;\n\t\tbackground: radial-gradient(circle, rgba(16, 185, 129, .3), transparent 60%);\n\t\tbottom: -18px;\n\t\tright: -14px;\n\t\tfilter: blur(12px);\n\t\tanimation: pulse 2.4s ease-in-out infinite;\n\t}\n\n\t.hero-metrics {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 8px;\n\t\tmargin-top: 14px;\n\t}\n\n\t.metric-pill {\n\t\tbackground: rgba(15, 23, 42, .06);\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tborder-radius: 999px;\n\t\tpadding: 8px 12px;\n\t\tfont-weight: 700;\n\t\tcolor: #0f172a;\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tgap: 6px;\n\t}\n\n\t.section-grid {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(320px, 1fr));\n\t\tgap: 14px;\n\t\tposition: relative;\n\t\tz-index: 1;\n\t}\n\n\t.section-card {\n\t\tposition: relative;\n\t\toverflow: visible;\n\t}\n\n\t.section-heading {\n\t\tmargin-bottom: 12px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tgap: 10px;\n\t\tflex-wrap: wrap;\n\t}\n\n\t.section-heading h3 {\n\t\tmargin: 0;\n\t\tfont-weight: 800;\n\t\tcolor: #0f172a;\n\t}\n\n\t.section-heading p {\n\t\tmargin: 0;\n\t\tcolor: #4b5563;\n\t}\n\n\t.field-grid {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n\t\tgap: 12px;\n\t}\n\n\t.field-card {\n\t\tpadding: 12px;\n\t\tborder-radius: 14px;\n\t\tborder: 1px solid rgba(15, 23, 42, .06);\n\t\tbackground: rgba(255, 255, 255, .85);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);\n\t\ttransition: transform .2s ease, box-shadow .2s ease;\n\t}\n\n\t.field-card:hover {\n\t\tbox-shadow: 0 8px 22px rgba(99, 102, 241, .12);\n\t}\n\n\t/* Avoid transforming the sticky select card so the fixed overlay positions correctly. */\n\t.sticky-select-card:hover {\n\t\ttransform: none;\n\t}\n\n\t.sticky-section-card {\n\t\tanimation: none;\n\t\ttransform: none;\n\t}\n\n\t.field-label {\n\t\tfont-weight: 700;\n\t\tcolor: #111827;\n\t\tmargin-bottom: 4px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tgap: 6px;\n\t}\n\n\t.field-hint {\n\t\tfont-size: 12px;\n\t\tcolor: #6b7280;\n\t\tmargin: 0;\n\t}\n\n\t.input-bevel {\n\t\tborder-radius: 12px;\n\t\tborder: 1px solid rgba(15, 23, 42, .1);\n\t\tbackground: rgba(255, 255, 255, .92);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);\n\t\tpadding: 10px 12px;\n\t\twidth: 100%;\n\t}\n\n\t.toggle {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: 8px;\n\t}\n\n\t.toggle-input {\n\t\tdisplay: none;\n\t}\n\n\t.toggle-track {\n\t\twidth: 54px;\n\t\theight: 30px;\n\t\tborder-radius: 999px;\n\t\tbackground: linear-gradient(120deg, rgba(15, 23, 42, .08), rgba(15, 23, 42, .15));\n\t\tposition: relative;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);\n\t\tborder: 1px solid rgba(15, 23, 42, .12);\n\t\ttransition: background .2s ease;\n\t}\n\n\t.toggle-thumb {\n\t\tposition: absolute;\n\t\ttop: 3px;\n\t\tleft: 3px;\n\t\twidth: 24px;\n\t\theight: 24px;\n\t\tborder-radius: 50%;\n\t\tbackground: linear-gradient(135deg, #63a4ff, #83eaf1);\n\t\tbox-shadow: 0 8px 16px rgba(99, 102, 241, .35);\n\t\ttransition: transform .2s ease;\n\t}\n\n\t.toggle-input:checked + .toggle-track {\n\t\tbackground: linear-gradient(120deg, rgba(16, 185, 129, .15), rgba(52, 211, 153, .25));\n\t\tborder-color: rgba(16, 185, 129, .45);\n\t}\n\n\t.toggle-input:checked + .toggle-track .toggle-thumb {\n\t\ttransform: translateX(24px);\n\t\tbackground: linear-gradient(135deg, #10b981, #22d3ee);\n\t\tbox-shadow: 0 10px 18px rgba(16, 185, 129, .32);\n\t}\n\n\t.toggle-state {\n\t\tfont-weight: 700;\n\t\tcolor: #0f172a;\n\t}\n\n\t.color-grid {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(260px, 1fr));\n\t\tgap: 10px;\n\t\tmargin-top: 10px;\n\t}\n\n\t.color-card {\n\t\tborder-radius: 14px;\n\t\tpadding: 12px;\n\t\tborder: 1px solid rgba(15, 23, 42, .06);\n\t\tbackground: rgba(255, 255, 255, .9);\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr 120px;\n\t\tgap: 10px;\n\t\talign-items: center;\n\t}\n\n\t.color-chip {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 4px;\n\t}\n\n\t.color-name {\n\t\tfont-weight: 700;\n\t\tcolor: #0f172a;\n\t}\n\n\t.color-preview {\n\t\tborder-radius: 12px;\n\t\theight: 48px;\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);\n\t}\n\n\t.color-input {\n\t\theight: 48px;\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tborder-radius: 12px;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);\n\t\twidth: 100%;\n\t\tcursor: pointer;\n\t}\n\n\t.palette-preview {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\t\tgap: 10px;\n\t\tmargin-bottom: 8px;\n\t}\n\n\t.preview-table {\n\t\tborder-radius: 12px;\n\t\tpadding: 10px;\n\t\tbackground: linear-gradient(160deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .7));\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);\n\t}\n\n\t.preview-table .row-swatch {\n\t\tborder-radius: 10px;\n\t\tpadding: 10px;\n\t\tfont-weight: 700;\n\t\tmargin-bottom: 6px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);\n\t}\n\n\t.preview-table .row-swatch:last-child {\n\t\tmargin-bottom: 0;\n\t}\n\n\t.button-demo {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 8px;\n\t\tmargin-bottom: 10px;\n\t}\n\n\t.btn-warning {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-color);\n\t\tborder-color: var(--warning-color);\n\t}\n\n\t.btn-warning:focus,\n\t.btn-warning.focus {\n\t\tbox-shadow: var(--warning-shadow-color);\n\t}\n\n\t.btn-warning:hover {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-hover-color);\n\t\tborder-color: var(--warning-hover-color);\n\t}\n\n\t.btn-success {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-color);\n\t\tborder-color: var(--success-color);\n\t}\n\n\t.btn-success:focus,\n\t.btn-success.focus {\n\t\tbox-shadow: var(--success-shadow-color);\n\t}\n\n\t.btn-success:hover {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-hover-color);\n\t\tborder-color: var(--success-hover-color);\n\t}\n\n\t.btn-danger {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-color);\n\t\tborder-color: var(--danger-color);\n\t}\n\n\t.btn-danger:focus,\n\t.btn-danger.focus {\n\t\tbox-shadow: var(--danger-shadow-color);\n\t}\n\n\t.btn-danger:hover {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-hover-color);\n\t\tborder-color: var(--danger-hover-color);\n\t}\n\n\t.btn-info {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-color);\n\t\tborder-color: var(--info-color);\n\t}\n\n\t.btn-info:focus,\n\t.btn-info.focus {\n\t\tbox-shadow: var(--info-shadow-color);\n\t}\n\n\t.btn-info:hover {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-hover-color);\n\t\tborder-color: var(--info-hover-color);\n\t}\n\n\t.btn-primary {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-color);\n\t\tborder-color: var(--primary-color);\n\t}\n\n\t.btn-primary:focus,\n\t.btn-primary.focus {\n\t\tbox-shadow: var(--primary-shadow-color);\n\t}\n\n\t.btn-primary:hover {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-hover-color);\n\t\tborder-color: var(--primary-hover-color);\n\t}\n\n\t.btn-secondary {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-color);\n\t\tborder-color: var(--secondary-color);\n\t}\n\n\t.btn-secondary:focus,\n\t.btn-secondary.focus {\n\t\tbox-shadow: var(--secondary-shadow-color);\n\t}\n\n\t.btn-secondary:hover {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-hover-color);\n\t\tborder-color: var(--secondary-hover-color);\n\t}\n\n\t.rio-select .rio-select-container {\n\t\tborder-radius: 12px !important;\n\t\tmin-height: 42px !important;\n\t\tborder-color: rgba(15, 23, 42, .1) !important;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);\n\t}\n\n\t.sticky-empty {\n\t\tbackground: rgba(23, 162, 184, .12);\n\t\tcolor: #0f4c75;\n\t\tborder: 1px solid rgba(23, 162, 184, .2);\n\t\tborder-radius: 12px;\n\t\tpadding: 12px;\n\t}\n\n\t.animate-rise {\n\t\tanimation: rise .5s ease;\n\t}\n\n\t@keyframes drift {\n\t\tfrom {\n\t\t\ttransform: translateY(0) translateX(0);\n\t\t}\n\t\tto {\n\t\t\ttransform: translateY(-30px) translateX(20px);\n\t\t}\n\t}\n\n\t@keyframes pulse {\n\t\t0% {\n\t\t\ttransform: scale(1);\n\t\t\topacity: .6;\n\t\t}\n\t\t50% {\n\t\t\ttransform: scale(1.08);\n\t\t\topacity: .9;\n\t\t}\n\t\t100% {\n\t\t\ttransform: scale(1);\n\t\t\topacity: .6;\n\t\t}\n\t}\n\n\t@keyframes rise {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: translateY(12px);\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t\ttransform: translateY(0);\n\t\t}\n\t}\n</style>\n\n<div class="settings-shell">\n\t<div class="aurora aurora-one"></div>\n\t<div class="aurora aurora-two"></div>\n\t<form [formGroup]="form" novalidate (ngSubmit)="submitForm(form)">\n\t\t<div class="settings-hero glass-card animate-rise">\n\t\t\t<div class="hero-main">\n\t\t\t\t<div class="hero-chip">User Settings</div>\n\t\t\t\t<h2>Welcome {{ user?.fullname || user?.username || user?.email || \'back\' }}!</h2>\n\t\t\t\t<p>Shape {{ client || \'your workspace\' }} into something joyful, colorful and uniquely you.</p>\n\t\t\t\t<div class="hero-actions">\n\t\t\t\t\t<button type="button" class="neon-btn" (click)="reset()">Reset to defaults</button>\n\t\t\t\t\t<div class="save-button">\n\t\t\t\t\t\t<form-button [form]="form" [disabled]="disableFormButton"></form-button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="hero-metrics">\n\t\t\t\t\t<div class="metric-pill">\n\t\t\t\t\t\t<span>Entries / page</span>\n\t\t\t\t\t\t<strong>{{ form.controls.entries_per_page.value }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="metric-pill">\n\t\t\t\t\t\t<span>Font size</span>\n\t\t\t\t\t\t<strong>{{ form.controls.font_size.value }}px</strong>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="metric-pill">\n\t\t\t\t\t\t<span>Week starts</span>\n\t\t\t\t\t\t<strong>{{ form.controls.date_picker_day_start.value === \'M\' ? \'Monday\' : \'Sunday\' }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="hero-preview">\n\t\t\t\t<div class="preview-card">\n\t\t\t\t\t<div class="preview-title">Live palette peek</div>\n\t\t\t\t\t<div class="swatch-row">\n\t\t\t\t\t\t<div class="swatch" [style.background]="form.controls.primary_color.value" [style.color]="form.controls.primary_font_color.value">\n\t\t\t\t\t\t\t<span>Primary buttons</span>\n\t\t\t\t\t\t\t{{ form.controls.primary_color.value }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="swatch" [style.background]="form.controls.success_color.value" [style.color]="form.controls.success_font_color.value">\n\t\t\t\t\t\t\t<span>Success tone</span>\n\t\t\t\t\t\t\t{{ form.controls.success_color.value }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="swatch" [style.background]="form.controls.table_color.value" [style.color]="form.controls.table_font_color.value">\n\t\t\t\t\t\t\t<span>Primary table</span>\n\t\t\t\t\t\t\t{{ form.controls.table_color.value }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="preview-pulse"></div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class="section-grid">\n\t\t\t<div class="section-card glass-card animate-rise">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Experience preferences</h3>\n\t\t\t\t\t<p>Tune how the app greets you each day.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="field-grid">\n\t\t\t\t\t<label class="field-card">\n\t\t\t\t\t\t<div class="field-label">Collapsable menu</div>\n\t\t\t\t\t\t<p class="field-hint">Keep navigation cozy when you want focus.</p>\n\t\t\t\t\t\t<div class="toggle">\n\t\t\t\t\t\t\t<input class="toggle-input" type="checkbox" formControlName="collapsable_menu" />\n\t\t\t\t\t\t\t<span class="toggle-track">\n\t\t\t\t\t\t\t\t<span class="toggle-thumb"></span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<div class="toggle-state">\n\t\t\t\t\t\t\t\t@if (form.controls.collapsable_menu.value) {\n\t\t\t\t\t\t\t\t\tCompact\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\tOpen\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Default entries per page</div>\n\t\t\t\t\t\t<p class="field-hint">Pick your sweet spot for list density.</p>\n\t\t\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.entries_per_page.valid ? \'is-valid\' : \'is-invalid\']" formControlName="entries_per_page" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t\t\t<rio-option value="25">25</rio-option>\n\t\t\t\t\t\t\t\t\t<rio-option value="50">50</rio-option>\n\t\t\t\t\t\t\t\t\t<rio-option value="100">100</rio-option>\n\t\t\t\t\t\t\t\t\t<rio-option value="250">250</rio-option>\n\t\t\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t@if (!form.controls.entries_per_page.valid) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Entries per page is required</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Select search style</div>\n\t\t\t\t\t\t<p class="field-hint">Decide if typing should be fuzzy or exact.</p>\n\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.rio_select_search_mode.valid ? \'is-valid\' : \'is-invalid\']" formControlName="rio_select_search_mode" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t<rio-option value="fuzzy">Fuzzy (flexible matching)</rio-option>\n\t\t\t\t\t\t\t<rio-option value="exact">Exact (must contain the term)</rio-option>\n\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Font size</div>\n\t\t\t\t\t\t<p class="field-hint">We recommend between 11–14px for quick scanning.</p>\n\t\t\t\t\t\t<input class="input-bevel" [ngClass]="[form.controls.font_size.valid ? \'is-valid\' : \'is-invalid\']" type="number" formControlName="font_size" (keyup)="changePrimaryFontSize()" />\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'required\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size is required</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'wholeNumbersGreaterThanZero\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size is invalid</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'maxValue\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size can not exceed 18</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'minValue\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size can not be less than 8</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Week start (date picker)</div>\n\t\t\t\t\t\t<p class="field-hint">Pick where your planner begins.</p>\n\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.date_picker_day_start.valid ? \'is-valid\' : \'is-invalid\']" formControlName="date_picker_day_start" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t<rio-option [value]="\'S\'">Sunday</rio-option>\n\t\t\t\t\t\t\t<rio-option [value]="\'M\'">Monday</rio-option>\n\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t@if (form.controls.date_picker_day_start.hasError(\'required\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Week start is required</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Starting page</div>\n\t\t\t\t\t\t<p class="field-hint">Jump right into the view you love most.</p>\n\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.opening_route.valid ? \'is-valid\' : \'\']" formControlName="opening_route" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t<rio-option value="/home">Home</rio-option>\n\t\t\t\t\t\t\t@for (view of views; track view.display) {\n\t\t\t\t\t\t\t\t<rio-option [value]="view.value">{{ view.display | titleCase }}</rio-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t@if (client === \'Ace Completions\') {\n\t\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t\t<div class="field-label">Routing preference</div>\n\t\t\t\t\t\t\t<p class="field-hint">Decide how links open while you multitask.</p>\n\t\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.routing_preference.valid ? \'is-valid\' : \'\']" formControlName="routing_preference" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t\t<rio-option value="alwaysAsk">Always Ask</rio-option>\n\t\t\t\t\t\t\t\t<rio-option value="sameTab">Same Tab</rio-option>\n\t\t\t\t\t\t\t\t<rio-option value="newTab">New Tab</rio-option>\n\t\t\t\t\t\t\t\t<rio-option value="newWindow">New Window</rio-option>\n\t\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="section-card glass-card animate-rise">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Table palette</h3>\n\t\t\t\t\t<p>Pick vibrant layers for your data rows.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="palette-preview">\n\t\t\t\t\t<div class="preview-table">\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.table_color.value" [style.color]="form.controls.table_font_color.value">\n\t\t\t\t\t\t\tPrimary header\n\t\t\t\t\t\t\t<span>{{ form.controls.table_font_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.secondary_table_color.value" [style.color]="form.controls.secondary_table_font_color.value">\n\t\t\t\t\t\t\tSecondary header\n\t\t\t\t\t\t\t<span>{{ form.controls.secondary_table_font_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.tertiary_table_color.value" [style.color]="form.controls.tertiary_table_font_color.value">\n\t\t\t\t\t\t\tTertiary header\n\t\t\t\t\t\t\t<span>{{ form.controls.tertiary_table_font_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="preview-table">\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.warning_color.value" [style.color]="form.controls.warning_font_color.value">\n\t\t\t\t\t\t\tWarnings\n\t\t\t\t\t\t\t<span>{{ form.controls.warning_hover_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.success_color.value" [style.color]="form.controls.success_font_color.value">\n\t\t\t\t\t\t\tSuccess\n\t\t\t\t\t\t\t<span>{{ form.controls.success_hover_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.info_color.value" [style.color]="form.controls.info_font_color.value">\n\t\t\t\t\t\t\tInfo\n\t\t\t\t\t\t\t<span>{{ form.controls.info_hover_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="color-grid">\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary table background</div>\n\t\t\t\t\t\t\t<div class="field-hint">The hero row that anchors your data.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.table_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="table_color" (ngModelChange)="changePrimaryColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary table font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep it crisp and readable.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.table_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="table_font_color" (ngModelChange)="changePrimaryFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary table background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Great for supporting sections.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_table_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_table_color" (ngModelChange)="changeSecondaryColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary table font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Match contrast with the new hue.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_table_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_table_font_color" (ngModelChange)="changeSecondaryFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Tertiary table background</div>\n\t\t\t\t\t\t\t<div class="field-hint">For extra callouts.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.tertiary_table_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="tertiary_table_color" (ngModelChange)="changeTertiaryColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Tertiary table font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Balance brightness for legibility.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.tertiary_table_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="tertiary_table_font_color" (ngModelChange)="changeTertiaryFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="section-card glass-card animate-rise">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Button glow-up</h3>\n\t\t\t\t\t<p>Make clicks feel friendly and intentional.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="button-demo">\n\t\t\t\t\t<button type="button" class="btn btn-success">Success</button>\n\t\t\t\t\t<button type="button" class="btn btn-warning">Warning</button>\n\t\t\t\t\t<button type="button" class="btn btn-danger">Danger</button>\n\t\t\t\t\t<button type="button" class="btn btn-info">Info</button>\n\t\t\t\t\t<button type="button" class="btn btn-primary">Primary</button>\n\t\t\t\t\t<button type="button" class="btn btn-secondary">Secondary</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="color-grid">\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Success background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Celebrate wins.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.success_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="success_color" (ngModelChange)="changeSuccessColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Success font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep it sharp.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.success_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="success_font_color" (ngModelChange)="changeSuccessFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Success hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">How the button greets hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.success_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="success_hover_color" (ngModelChange)="changeSuccessHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Warning background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Gentle but visible.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.warning_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="warning_color" (ngModelChange)="changeWarningColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Warning font</div>\n\t\t\t\t\t\t\t<div class="field-hint">High contrast copy.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.warning_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="warning_font_color" (ngModelChange)="changeWarningFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Warning hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Add motion to caution.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.warning_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="warning_hover_color" (ngModelChange)="changeWarningHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Danger background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Clear stop signal.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.danger_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="danger_color" (ngModelChange)="changeDangerColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Danger font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Stay readable on alert.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.danger_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="danger_font_color" (ngModelChange)="changeDangerFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Danger hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Softer on hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.danger_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="danger_hover_color" (ngModelChange)="changeDangerHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Info background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Highlight helpful hints.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.info_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="info_color" (ngModelChange)="changeInfoColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Info font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep tips legible.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.info_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="info_font_color" (ngModelChange)="changeInfoFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Info hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Gentle motion on hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.info_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="info_hover_color" (ngModelChange)="changeInfoHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary background</div>\n\t\t\t\t\t\t\t<div class="field-hint">The hero action.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.primary_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="primary_color" (ngModelChange)="changePrimaryButtonColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Strong contrast for CTA.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.primary_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="primary_font_color" (ngModelChange)="changePrimaryButtonFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">A playful shift on hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.primary_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="primary_hover_color" (ngModelChange)="changePrimaryButtonHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Great for subtle actions.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_color" (ngModelChange)="changeSecondaryButtonColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep it balanced.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_font_color" (ngModelChange)="changeSecondaryButtonFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Add a soft glow.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_hover_color" (ngModelChange)="changeSecondaryHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="section-card glass-card animate-rise sticky-section-card">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Sticky select defaults</h3>\n\t\t\t\t\t<p>Teach ResolveIO which choices you love.</p>\n\t\t\t\t</div>\n\t\t\t\t@if (!stickySelects.length) {\n\t\t\t\t\t<div class="sticky-empty">\n\t\t\t\t\t\tNo sticky selects saved yet. Add a stickyKey on a select to remember your favorite defaults.\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@else {\n\t\t\t\t\t@for (sticky of stickySelects; track sticky.key) {\n\t\t\t\t\t\t<div class="field-card sticky-select-card">\n\t\t\t\t\t\t\t<div class="field-label">{{ sticky.key }}</div>\n\t\t\t\t\t\t\t@if (sticky.options && sticky.options.length) {\n\t\t\t\t\t\t\t\t<rio-select\n\t\t\t\t\t\t\t\t\t[(ngModel)]="stickySelections[sticky.key]"\n\t\t\t\t\t\t\t\t\t[ngModelOptions]="{standalone: true}"\n\t\t\t\t\t\t\t\t\t[options]="sticky.options"\n\t\t\t\t\t\t\t\t\toptionValueKey="value"\n\t\t\t\t\t\t\t\t\toptionLabelKey="label"\n\t\t\t\t\t\t\t\t\t[searchable]="false"\n\t\t\t\t\t\t\t\t\tappendTo="body"\n\t\t\t\t\t\t\t\t\t[stickyAutoSave]="true"\n\t\t\t\t\t\t\t\t\t(ngModelChange)="updateStickyDefault(sticky.key, $event)">\n\t\t\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (!sticky.options || !sticky.options.length) {\n\t\t\t\t\t\t\t\t<div class="text-muted">No saved options yet.</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t</form>\n</div>\n',styles:['.sticky-section-card,.sticky-section-card *{transform:none!important}:host{display:block}::ng-deep :root{--primary-table-color: #3b3ee3;--primary-table-font-color: #ffffff;--font-size: 12px;--secondary-table-color: #87ceeb;--secondary-table-font-color: #000000;--tertiary-table-color: #ff4500;--tertiary-table-font-color: #000000;--warning-color: #ffc107;--warning-font-color: #000000;--warning-hover-color: #e0a800;--warning-shadow-color: 0 0 0 .2rem rgba(222, 170, 12, .5);--success-color: #28a745;--success-font-color: #ffffff;--success-hover-color: #218838;--success-shadow-color: 0 0 0 .2rem rgba(72, 180, 97, .5);--danger-color: #dc3545;--danger-font-color: #ffffff;--danger-hover-color: #c82333;--danger-shadow-color: 0 0 0 .2rem rgba(225, 83, 97, .5);--info-color: #17a2b8;--info-font-color: #ffffff;--info-hover-color: #138496;--info-shadow-color: 0 0 0 .2rem rgba(58, 176, 195, .5);--primary-color: #007bff;--primary-font-color: #ffffff;--primary-hover-color: #0069d9;--primary-shadow-color: 0 0 0 .2rem rgba(38, 143, 255, .5);--secondary-color: #868e96;--secondary-font-color: #ffffff;--secondary-hover-color: #5a6268;--secondary-shadow-color: 0 0 0 .2rem rgba(130, 138, 145, .5)}.settings-shell{position:relative;overflow:visible;padding:12px 8px 32px;background:radial-gradient(circle at 15% 20%,rgba(111,136,255,.12),transparent 35%),radial-gradient(circle at 80% 0%,rgba(255,130,92,.12),transparent 32%),linear-gradient(135deg,#f7f9ff,#fff 60%,#f5f7fb)}.aurora{position:absolute;width:420px;height:420px;border-radius:50%;filter:blur(70px);opacity:.55;mix-blend-mode:screen;animation:drift 18s ease-in-out infinite alternate;z-index:0}.aurora.aurora-one{background:radial-gradient(circle,#52a3ffb3,#8678ff40);top:-120px;left:-70px}.aurora.aurora-two{background:radial-gradient(circle,#ff935c99,#ffe3bb59);bottom:-140px;right:-40px;animation-duration:22s}.settings-hero{position:relative;z-index:1;display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px;align-items:center;margin-bottom:18px}.glass-card{position:relative;background:#ffffffc7;border:1px solid rgba(255,255,255,.55);box-shadow:0 10px 40px #364a7824,inset 0 0 0 1px #ffffff52;border-radius:18px;padding:18px;overflow:hidden}.glass-card:before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:0}.hero-main h2{font-weight:800;font-size:26px;margin-bottom:8px;color:#0f172a}.hero-main p{color:#4b5563;margin-bottom:12px}.hero-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;font-weight:700;color:#1f2937;background:linear-gradient(120deg,#6366f11a,#10b9811a,#3b82f61f);border:1px solid rgba(99,102,241,.25);margin-bottom:10px;text-transform:uppercase;letter-spacing:.04em;font-size:12px}.hero-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:12px}.neon-btn{position:relative;border:1px solid rgba(15,23,42,.1);background:linear-gradient(120deg,#6366f126,#3b82f614);color:#0f172a;font-weight:700;padding:10px 16px;border-radius:12px;box-shadow:0 10px 24px #6366f126;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}.neon-btn:hover{transform:translateY(-2px);border-color:#6366f173;box-shadow:0 14px 26px #6366f138}.save-button form-button ::ng-deep button{border-radius:12px;font-weight:800;letter-spacing:.01em;padding:11px 18px;box-shadow:0 10px 26px #10b9813d}.hero-preview{position:relative}.preview-card{border-radius:16px;padding:16px;background:radial-gradient(circle at 20% 20%,#ffffffb3,#ffffff85);box-shadow:inset 0 1px #fffc,0 12px 30px #506eb929;border:1px solid rgba(255,255,255,.6)}.preview-title{font-weight:800;margin-bottom:8px;color:#111827}.swatch-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}.swatch{border-radius:12px;padding:10px;color:#0f172a;font-weight:700;display:flex;align-items:center;justify-content:space-between;box-shadow:inset 0 1px #ffffff73;opacity:.98}.swatch span{font-size:12px;font-weight:600;color:#0f172ad9}.preview-pulse{position:absolute;width:120px;height:120px;border-radius:50%;background:radial-gradient(circle,rgba(16,185,129,.3),transparent 60%);bottom:-18px;right:-14px;filter:blur(12px);animation:pulse 2.4s ease-in-out infinite}.hero-metrics{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.metric-pill{background:#0f172a0f;border:1px solid rgba(15,23,42,.08);border-radius:999px;padding:8px 12px;font-weight:700;color:#0f172a;display:inline-flex;align-items:center;gap:6px}.section-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px;position:relative;z-index:1}.section-card{position:relative;overflow:visible}.section-heading{margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.section-heading h3{margin:0;font-weight:800;color:#0f172a}.section-heading p{margin:0;color:#4b5563}.field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.field-card{padding:12px;border-radius:14px;border:1px solid rgba(15,23,42,.06);background:#ffffffd9;box-shadow:inset 0 1px #ffffffb3;transition:transform .2s ease,box-shadow .2s ease}.field-card:hover{box-shadow:0 8px 22px #6366f11f}.sticky-select-card:hover{transform:none}.sticky-section-card{animation:none;transform:none}.field-label{font-weight:700;color:#111827;margin-bottom:4px;display:flex;align-items:center;justify-content:space-between;gap:6px}.field-hint{font-size:12px;color:#6b7280;margin:0}.input-bevel{border-radius:12px;border:1px solid rgba(15,23,42,.1);background:#ffffffeb;box-shadow:inset 0 1px #fffc;padding:10px 12px;width:100%}.toggle{display:flex;align-items:center;gap:8px}.toggle-input{display:none}.toggle-track{width:54px;height:30px;border-radius:999px;background:linear-gradient(120deg,#0f172a14,#0f172a26);position:relative;box-shadow:inset 0 1px #fff9;border:1px solid rgba(15,23,42,.12);transition:background .2s ease}.toggle-thumb{position:absolute;top:3px;left:3px;width:24px;height:24px;border-radius:50%;background:linear-gradient(135deg,#63a4ff,#83eaf1);box-shadow:0 8px 16px #6366f159;transition:transform .2s ease}.toggle-input:checked+.toggle-track{background:linear-gradient(120deg,#10b98126,#34d39940);border-color:#10b98173}.toggle-input:checked+.toggle-track .toggle-thumb{transform:translate(24px);background:linear-gradient(135deg,#10b981,#22d3ee);box-shadow:0 10px 18px #10b98152}.toggle-state{font-weight:700;color:#0f172a}.color-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px;margin-top:10px}.color-card{border-radius:14px;padding:12px;border:1px solid rgba(15,23,42,.06);background:#ffffffe6;display:grid;grid-template-columns:1fr 120px;gap:10px;align-items:center}.color-chip{display:flex;flex-direction:column;gap:4px}.color-name{font-weight:700;color:#0f172a}.color-preview{border-radius:12px;height:48px;border:1px solid rgba(15,23,42,.08);box-shadow:inset 0 1px #ffffffb3}.color-input{height:48px;border:1px solid rgba(15,23,42,.08);border-radius:12px;box-shadow:inset 0 1px #ffffffbf;width:100%;cursor:pointer}.palette-preview{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;margin-bottom:8px}.preview-table{border-radius:12px;padding:10px;background:linear-gradient(160deg,#ffffffd9,#ffffffb3);border:1px solid rgba(15,23,42,.08);box-shadow:inset 0 1px #fffc}.preview-table .row-swatch{border-radius:10px;padding:10px;font-weight:700;margin-bottom:6px;display:flex;align-items:center;justify-content:space-between;box-shadow:inset 0 1px #fff9}.preview-table .row-swatch:last-child{margin-bottom:0}.button-demo{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}.btn-warning{color:var(--warning-font-color);background-color:var(--warning-color);border-color:var(--warning-color)}.btn-warning:focus,.btn-warning.focus{box-shadow:var(--warning-shadow-color)}.btn-warning:hover{color:var(--warning-font-color);background-color:var(--warning-hover-color);border-color:var(--warning-hover-color)}.btn-success{color:var(--success-font-color);background-color:var(--success-color);border-color:var(--success-color)}.btn-success:focus,.btn-success.focus{box-shadow:var(--success-shadow-color)}.btn-success:hover{color:var(--success-font-color);background-color:var(--success-hover-color);border-color:var(--success-hover-color)}.btn-danger{color:var(--danger-font-color);background-color:var(--danger-color);border-color:var(--danger-color)}.btn-danger:focus,.btn-danger.focus{box-shadow:var(--danger-shadow-color)}.btn-danger:hover{color:var(--danger-font-color);background-color:var(--danger-hover-color);border-color:var(--danger-hover-color)}.btn-info{color:var(--info-font-color);background-color:var(--info-color);border-color:var(--info-color)}.btn-info:focus,.btn-info.focus{box-shadow:var(--info-shadow-color)}.btn-info:hover{color:var(--info-font-color);background-color:var(--info-hover-color);border-color:var(--info-hover-color)}.btn-primary{color:var(--primary-font-color);background-color:var(--primary-color);border-color:var(--primary-color)}.btn-primary:focus,.btn-primary.focus{box-shadow:var(--primary-shadow-color)}.btn-primary:hover{color:var(--primary-font-color);background-color:var(--primary-hover-color);border-color:var(--primary-hover-color)}.btn-secondary{color:var(--secondary-font-color);background-color:var(--secondary-color);border-color:var(--secondary-color)}.btn-secondary:focus,.btn-secondary.focus{box-shadow:var(--secondary-shadow-color)}.btn-secondary:hover{color:var(--secondary-font-color);background-color:var(--secondary-hover-color);border-color:var(--secondary-hover-color)}.rio-select .rio-select-container{border-radius:12px!important;min-height:42px!important;border-color:#0f172a1a!important;box-shadow:inset 0 1px #ffffffb3}.sticky-empty{background:#17a2b81f;color:#0f4c75;border:1px solid rgba(23,162,184,.2);border-radius:12px;padding:12px}.animate-rise{animation:rise .5s ease}@keyframes drift{0%{transform:translateY(0) translate(0)}to{transform:translateY(-30px) translate(20px)}}@keyframes pulse{0%{transform:scale(1);opacity:.6}50%{transform:scale(1.08);opacity:.9}to{transform:scale(1);opacity:.6}}@keyframes rise{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}\n'],dependencies:[{kind:"directive",type:AiFormAutoRegisterDirective,selector:"form[formGroup]",inputs:["aiFormAutoRegister","aiFormLabel","aiFormIgnore"]},{kind:"directive",type:i2.ɵNgNoValidate,selector:"form:not([ngNoForm]):not([ngNativeValidate])"},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.NumberValueAccessor,selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]"},{kind:"directive",type:i2.CheckboxControlValueAccessor,selector:"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]"},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgControlStatusGroup,selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"},{kind:"directive",type:i2.FormGroupDirective,selector:"[formGroup]",inputs:["formGroup"],outputs:["ngSubmit"],exportAs:["ngForm"]},{kind:"directive",type:i2.FormControlName,selector:"[formControlName]",inputs:["formControlName","disabled","ngModel"],outputs:["ngModelChange"]},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"component",type:FormButtonComponent,selector:"form-button",inputs:["form","disabled","type"]},{kind:"component",type:i5.RioSelectComponent,selector:"rio-select",inputs:["placeholder","multiple","panelMaxHeight","panelMaxViewportRatio","optionHeight","virtualBuffer","overlayZIndex","autoSizePanel","panelPosition","autoCenterPanel","viewportMargin","panelWidth","panelFullscreenWidth","clearable","templateLabelFromView","searchable","searchMatchMode","defaultSearch","textWrap","compareWith","options","optionLabelKey","optionLabelFn","optionValueKey","optionDisabledKey","optionIdKey","optionGroupKey","disabled","emitOptionObject","debugLog","stickyKey","stickyAutoSave"],outputs:["change"]},{kind:"component",type:i5.RioOptionComponent,selector:"rio-option",inputs:["value","disabled","label","id"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"pipe",type:TitleCaseAndUnderscorePipe,name:"titleCase"}]})}function hexToRGB(t,e){let n=parseInt(t.slice(1,3),16),o=parseInt(t.slice(3,5),16),r=parseInt(t.slice(5,7),16);return e?"rgba("+n+", "+o+", "+r+", "+e+")":"rgb("+n+", "+o+", "+r+")"}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UsersSettingsComponent,decorators:[{type:Component,args:[{selector:"resolveio-users-settings",providers:[ProviderService],standalone:!1,template:'<style>\n\t.sticky-section-card,\n\t.sticky-section-card * {\n\t\ttransform: none !important;\n\t}\n\n\t:host {\n\t\tdisplay: block;\n\t}\n\n\t::ng-deep :root {\n\t\t--primary-table-color: #3b3ee3;\n\t\t--primary-table-font-color: #ffffff;\n\t\t--font-size: 12px;\n\t\t--secondary-table-color: #87ceeb;\n\t\t--secondary-table-font-color: #000000;\n\t\t--tertiary-table-color: #ff4500;\n\t\t--tertiary-table-font-color: #000000;\n\t\t--warning-color: #ffc107;\n\t\t--warning-font-color: #000000;\n\t\t--warning-hover-color: #e0a800;\n\t\t--warning-shadow-color: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);\n\t\t--success-color: #28a745;\n\t\t--success-font-color: #ffffff;\n\t\t--success-hover-color: #218838;\n\t\t--success-shadow-color: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);\n\t\t--danger-color: #dc3545;\n\t\t--danger-font-color: #ffffff;\n\t\t--danger-hover-color: #c82333;\n\t\t--danger-shadow-color: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);\n\t\t--info-color: #17a2b8;\n\t\t--info-font-color: #ffffff;\n\t\t--info-hover-color: #138496;\n\t\t--info-shadow-color: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);\n\t\t--primary-color: #007bff;\n\t\t--primary-font-color: #ffffff;\n\t\t--primary-hover-color: #0069d9;\n\t\t--primary-shadow-color: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);\n\t\t--secondary-color: #868e96;\n\t\t--secondary-font-color: #ffffff;\n\t\t--secondary-hover-color: #5a6268;\n\t\t--secondary-shadow-color: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);\n\t}\n\n\t.settings-shell {\n\t\tposition: relative;\n\t\toverflow: visible;\n\t\tpadding: 12px 8px 32px;\n\t\tbackground: radial-gradient(circle at 15% 20%, rgba(111, 136, 255, 0.12), transparent 35%),\n\t\t\tradial-gradient(circle at 80% 0%, rgba(255, 130, 92, 0.12), transparent 32%),\n\t\t\tlinear-gradient(135deg, #f7f9ff 0%, #ffffff 60%, #f5f7fb 100%);\n\t}\n\n\t.aurora {\n\t\tposition: absolute;\n\t\twidth: 420px;\n\t\theight: 420px;\n\t\tborder-radius: 50%;\n\t\tfilter: blur(70px);\n\t\topacity: .55;\n\t\tmix-blend-mode: screen;\n\t\tanimation: drift 18s ease-in-out infinite alternate;\n\t\tz-index: 0;\n\t}\n\n\t.aurora.aurora-one {\n\t\tbackground: radial-gradient(circle, rgba(82, 163, 255, .7), rgba(134, 120, 255, .25));\n\t\ttop: -120px;\n\t\tleft: -70px;\n\t}\n\n\t.aurora.aurora-two {\n\t\tbackground: radial-gradient(circle, rgba(255, 147, 92, .6), rgba(255, 227, 187, .35));\n\t\tbottom: -140px;\n\t\tright: -40px;\n\t\tanimation-duration: 22s;\n\t}\n\n\t.settings-hero {\n\t\tposition: relative;\n\t\tz-index: 1;\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(320px, 1fr));\n\t\tgap: 16px;\n\t\talign-items: center;\n\t\tmargin-bottom: 18px;\n\t}\n\n\t.glass-card {\n\t\tposition: relative;\n\t\tbackground: rgba(255, 255, 255, .78);\n\t\tborder: 1px solid rgba(255, 255, 255, .55);\n\t\tbox-shadow: 0 10px 40px rgba(54, 74, 120, .14), inset 0 0 0 1px rgba(255, 255, 255, .32);\n\t\tborder-radius: 18px;\n\t\tpadding: 18px;\n\t\toverflow: hidden;\n\t}\n\n\t.glass-card::before {\n\t\tcontent: \'\';\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder-radius: inherit;\n\t\tpointer-events: none;\n\t\tz-index: 0;\n\t}\n\n\t.hero-main h2 {\n\t\tfont-weight: 800;\n\t\tfont-size: 26px;\n\t\tmargin-bottom: 8px;\n\t\tcolor: #0f172a;\n\t}\n\n\t.hero-main p {\n\t\tcolor: #4b5563;\n\t\tmargin-bottom: 12px;\n\t}\n\n\t.hero-chip {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tgap: 6px;\n\t\tpadding: 6px 12px;\n\t\tborder-radius: 999px;\n\t\tfont-weight: 700;\n\t\tcolor: #1f2937;\n\t\tbackground: linear-gradient(120deg, rgba(99, 102, 241, .1), rgba(16, 185, 129, .1), rgba(59, 130, 246, .12));\n\t\tborder: 1px solid rgba(99, 102, 241, .25);\n\t\tmargin-bottom: 10px;\n\t\ttext-transform: uppercase;\n\t\tletter-spacing: .04em;\n\t\tfont-size: 12px;\n\t}\n\n\t.hero-actions {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 12px;\n\t\talign-items: center;\n\t\tmargin-top: 12px;\n\t}\n\n\t.neon-btn {\n\t\tposition: relative;\n\t\tborder: 1px solid rgba(15, 23, 42, .1);\n\t\tbackground: linear-gradient(120deg, rgba(99, 102, 241, .15), rgba(59, 130, 246, .08));\n\t\tcolor: #0f172a;\n\t\tfont-weight: 700;\n\t\tpadding: 10px 16px;\n\t\tborder-radius: 12px;\n\t\tbox-shadow: 0 10px 24px rgba(99, 102, 241, .15);\n\t\ttransition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;\n\t}\n\n\t.neon-btn:hover {\n\t\ttransform: translateY(-2px);\n\t\tborder-color: rgba(99, 102, 241, .45);\n\t\tbox-shadow: 0 14px 26px rgba(99, 102, 241, .22);\n\t}\n\n\t.save-button form-button ::ng-deep button {\n\t\tborder-radius: 12px;\n\t\tfont-weight: 800;\n\t\tletter-spacing: .01em;\n\t\tpadding: 11px 18px;\n\t\tbox-shadow: 0 10px 26px rgba(16, 185, 129, .24);\n\t}\n\n\t.hero-preview {\n\t\tposition: relative;\n\t}\n\n\t.preview-card {\n\t\tborder-radius: 16px;\n\t\tpadding: 16px;\n\t\tbackground: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, .7), rgba(255, 255, 255, .52));\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 12px 30px rgba(80, 110, 185, .16);\n\t\tborder: 1px solid rgba(255, 255, 255, .6);\n\t}\n\n\t.preview-title {\n\t\tfont-weight: 800;\n\t\tmargin-bottom: 8px;\n\t\tcolor: #111827;\n\t}\n\n\t.swatch-row {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(140px, 1fr));\n\t\tgap: 10px;\n\t}\n\n\t.swatch {\n\t\tborder-radius: 12px;\n\t\tpadding: 10px;\n\t\tcolor: #0f172a;\n\t\tfont-weight: 700;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);\n\t\topacity: .98;\n\t}\n\n\t.swatch span {\n\t\tfont-size: 12px;\n\t\tfont-weight: 600;\n\t\tcolor: rgba(15, 23, 42, .85);\n\t}\n\n\t.preview-pulse {\n\t\tposition: absolute;\n\t\twidth: 120px;\n\t\theight: 120px;\n\t\tborder-radius: 50%;\n\t\tbackground: radial-gradient(circle, rgba(16, 185, 129, .3), transparent 60%);\n\t\tbottom: -18px;\n\t\tright: -14px;\n\t\tfilter: blur(12px);\n\t\tanimation: pulse 2.4s ease-in-out infinite;\n\t}\n\n\t.hero-metrics {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 8px;\n\t\tmargin-top: 14px;\n\t}\n\n\t.metric-pill {\n\t\tbackground: rgba(15, 23, 42, .06);\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tborder-radius: 999px;\n\t\tpadding: 8px 12px;\n\t\tfont-weight: 700;\n\t\tcolor: #0f172a;\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tgap: 6px;\n\t}\n\n\t.section-grid {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(320px, 1fr));\n\t\tgap: 14px;\n\t\tposition: relative;\n\t\tz-index: 1;\n\t}\n\n\t.section-card {\n\t\tposition: relative;\n\t\toverflow: visible;\n\t}\n\n\t.section-heading {\n\t\tmargin-bottom: 12px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tgap: 10px;\n\t\tflex-wrap: wrap;\n\t}\n\n\t.section-heading h3 {\n\t\tmargin: 0;\n\t\tfont-weight: 800;\n\t\tcolor: #0f172a;\n\t}\n\n\t.section-heading p {\n\t\tmargin: 0;\n\t\tcolor: #4b5563;\n\t}\n\n\t.field-grid {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n\t\tgap: 12px;\n\t}\n\n\t.field-card {\n\t\tpadding: 12px;\n\t\tborder-radius: 14px;\n\t\tborder: 1px solid rgba(15, 23, 42, .06);\n\t\tbackground: rgba(255, 255, 255, .85);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);\n\t\ttransition: transform .2s ease, box-shadow .2s ease;\n\t}\n\n\t.field-card:hover {\n\t\tbox-shadow: 0 8px 22px rgba(99, 102, 241, .12);\n\t}\n\n\t/* Avoid transforming the sticky select card so the fixed overlay positions correctly. */\n\t.sticky-select-card:hover {\n\t\ttransform: none;\n\t}\n\n\t.sticky-section-card {\n\t\tanimation: none;\n\t\ttransform: none;\n\t}\n\n\t.field-label {\n\t\tfont-weight: 700;\n\t\tcolor: #111827;\n\t\tmargin-bottom: 4px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tgap: 6px;\n\t}\n\n\t.field-hint {\n\t\tfont-size: 12px;\n\t\tcolor: #6b7280;\n\t\tmargin: 0;\n\t}\n\n\t.input-bevel {\n\t\tborder-radius: 12px;\n\t\tborder: 1px solid rgba(15, 23, 42, .1);\n\t\tbackground: rgba(255, 255, 255, .92);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);\n\t\tpadding: 10px 12px;\n\t\twidth: 100%;\n\t}\n\n\t.toggle {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: 8px;\n\t}\n\n\t.toggle-input {\n\t\tdisplay: none;\n\t}\n\n\t.toggle-track {\n\t\twidth: 54px;\n\t\theight: 30px;\n\t\tborder-radius: 999px;\n\t\tbackground: linear-gradient(120deg, rgba(15, 23, 42, .08), rgba(15, 23, 42, .15));\n\t\tposition: relative;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);\n\t\tborder: 1px solid rgba(15, 23, 42, .12);\n\t\ttransition: background .2s ease;\n\t}\n\n\t.toggle-thumb {\n\t\tposition: absolute;\n\t\ttop: 3px;\n\t\tleft: 3px;\n\t\twidth: 24px;\n\t\theight: 24px;\n\t\tborder-radius: 50%;\n\t\tbackground: linear-gradient(135deg, #63a4ff, #83eaf1);\n\t\tbox-shadow: 0 8px 16px rgba(99, 102, 241, .35);\n\t\ttransition: transform .2s ease;\n\t}\n\n\t.toggle-input:checked + .toggle-track {\n\t\tbackground: linear-gradient(120deg, rgba(16, 185, 129, .15), rgba(52, 211, 153, .25));\n\t\tborder-color: rgba(16, 185, 129, .45);\n\t}\n\n\t.toggle-input:checked + .toggle-track .toggle-thumb {\n\t\ttransform: translateX(24px);\n\t\tbackground: linear-gradient(135deg, #10b981, #22d3ee);\n\t\tbox-shadow: 0 10px 18px rgba(16, 185, 129, .32);\n\t}\n\n\t.toggle-state {\n\t\tfont-weight: 700;\n\t\tcolor: #0f172a;\n\t}\n\n\t.color-grid {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(260px, 1fr));\n\t\tgap: 10px;\n\t\tmargin-top: 10px;\n\t}\n\n\t.color-card {\n\t\tborder-radius: 14px;\n\t\tpadding: 12px;\n\t\tborder: 1px solid rgba(15, 23, 42, .06);\n\t\tbackground: rgba(255, 255, 255, .9);\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr 120px;\n\t\tgap: 10px;\n\t\talign-items: center;\n\t}\n\n\t.color-chip {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 4px;\n\t}\n\n\t.color-name {\n\t\tfont-weight: 700;\n\t\tcolor: #0f172a;\n\t}\n\n\t.color-preview {\n\t\tborder-radius: 12px;\n\t\theight: 48px;\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);\n\t}\n\n\t.color-input {\n\t\theight: 48px;\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tborder-radius: 12px;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);\n\t\twidth: 100%;\n\t\tcursor: pointer;\n\t}\n\n\t.palette-preview {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n\t\tgap: 10px;\n\t\tmargin-bottom: 8px;\n\t}\n\n\t.preview-table {\n\t\tborder-radius: 12px;\n\t\tpadding: 10px;\n\t\tbackground: linear-gradient(160deg, rgba(255, 255, 255, .85), rgba(255, 255, 255, .7));\n\t\tborder: 1px solid rgba(15, 23, 42, .08);\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);\n\t}\n\n\t.preview-table .row-swatch {\n\t\tborder-radius: 10px;\n\t\tpadding: 10px;\n\t\tfont-weight: 700;\n\t\tmargin-bottom: 6px;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: space-between;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);\n\t}\n\n\t.preview-table .row-swatch:last-child {\n\t\tmargin-bottom: 0;\n\t}\n\n\t.button-demo {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap;\n\t\tgap: 8px;\n\t\tmargin-bottom: 10px;\n\t}\n\n\t.btn-warning {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-color);\n\t\tborder-color: var(--warning-color);\n\t}\n\n\t.btn-warning:focus,\n\t.btn-warning.focus {\n\t\tbox-shadow: var(--warning-shadow-color);\n\t}\n\n\t.btn-warning:hover {\n\t\tcolor: var(--warning-font-color);\n\t\tbackground-color: var(--warning-hover-color);\n\t\tborder-color: var(--warning-hover-color);\n\t}\n\n\t.btn-success {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-color);\n\t\tborder-color: var(--success-color);\n\t}\n\n\t.btn-success:focus,\n\t.btn-success.focus {\n\t\tbox-shadow: var(--success-shadow-color);\n\t}\n\n\t.btn-success:hover {\n\t\tcolor: var(--success-font-color);\n\t\tbackground-color: var(--success-hover-color);\n\t\tborder-color: var(--success-hover-color);\n\t}\n\n\t.btn-danger {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-color);\n\t\tborder-color: var(--danger-color);\n\t}\n\n\t.btn-danger:focus,\n\t.btn-danger.focus {\n\t\tbox-shadow: var(--danger-shadow-color);\n\t}\n\n\t.btn-danger:hover {\n\t\tcolor: var(--danger-font-color);\n\t\tbackground-color: var(--danger-hover-color);\n\t\tborder-color: var(--danger-hover-color);\n\t}\n\n\t.btn-info {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-color);\n\t\tborder-color: var(--info-color);\n\t}\n\n\t.btn-info:focus,\n\t.btn-info.focus {\n\t\tbox-shadow: var(--info-shadow-color);\n\t}\n\n\t.btn-info:hover {\n\t\tcolor: var(--info-font-color);\n\t\tbackground-color: var(--info-hover-color);\n\t\tborder-color: var(--info-hover-color);\n\t}\n\n\t.btn-primary {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-color);\n\t\tborder-color: var(--primary-color);\n\t}\n\n\t.btn-primary:focus,\n\t.btn-primary.focus {\n\t\tbox-shadow: var(--primary-shadow-color);\n\t}\n\n\t.btn-primary:hover {\n\t\tcolor: var(--primary-font-color);\n\t\tbackground-color: var(--primary-hover-color);\n\t\tborder-color: var(--primary-hover-color);\n\t}\n\n\t.btn-secondary {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-color);\n\t\tborder-color: var(--secondary-color);\n\t}\n\n\t.btn-secondary:focus,\n\t.btn-secondary.focus {\n\t\tbox-shadow: var(--secondary-shadow-color);\n\t}\n\n\t.btn-secondary:hover {\n\t\tcolor: var(--secondary-font-color);\n\t\tbackground-color: var(--secondary-hover-color);\n\t\tborder-color: var(--secondary-hover-color);\n\t}\n\n\t.rio-select .rio-select-container {\n\t\tborder-radius: 12px !important;\n\t\tmin-height: 42px !important;\n\t\tborder-color: rgba(15, 23, 42, .1) !important;\n\t\tbox-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);\n\t}\n\n\t.sticky-empty {\n\t\tbackground: rgba(23, 162, 184, .12);\n\t\tcolor: #0f4c75;\n\t\tborder: 1px solid rgba(23, 162, 184, .2);\n\t\tborder-radius: 12px;\n\t\tpadding: 12px;\n\t}\n\n\t.animate-rise {\n\t\tanimation: rise .5s ease;\n\t}\n\n\t@keyframes drift {\n\t\tfrom {\n\t\t\ttransform: translateY(0) translateX(0);\n\t\t}\n\t\tto {\n\t\t\ttransform: translateY(-30px) translateX(20px);\n\t\t}\n\t}\n\n\t@keyframes pulse {\n\t\t0% {\n\t\t\ttransform: scale(1);\n\t\t\topacity: .6;\n\t\t}\n\t\t50% {\n\t\t\ttransform: scale(1.08);\n\t\t\topacity: .9;\n\t\t}\n\t\t100% {\n\t\t\ttransform: scale(1);\n\t\t\topacity: .6;\n\t\t}\n\t}\n\n\t@keyframes rise {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: translateY(12px);\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t\ttransform: translateY(0);\n\t\t}\n\t}\n</style>\n\n<div class="settings-shell">\n\t<div class="aurora aurora-one"></div>\n\t<div class="aurora aurora-two"></div>\n\t<form [formGroup]="form" novalidate (ngSubmit)="submitForm(form)">\n\t\t<div class="settings-hero glass-card animate-rise">\n\t\t\t<div class="hero-main">\n\t\t\t\t<div class="hero-chip">User Settings</div>\n\t\t\t\t<h2>Welcome {{ user?.fullname || user?.username || user?.email || \'back\' }}!</h2>\n\t\t\t\t<p>Shape {{ client || \'your workspace\' }} into something joyful, colorful and uniquely you.</p>\n\t\t\t\t<div class="hero-actions">\n\t\t\t\t\t<button type="button" class="neon-btn" (click)="reset()">Reset to defaults</button>\n\t\t\t\t\t<div class="save-button">\n\t\t\t\t\t\t<form-button [form]="form" [disabled]="disableFormButton"></form-button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="hero-metrics">\n\t\t\t\t\t<div class="metric-pill">\n\t\t\t\t\t\t<span>Entries / page</span>\n\t\t\t\t\t\t<strong>{{ form.controls.entries_per_page.value }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="metric-pill">\n\t\t\t\t\t\t<span>Font size</span>\n\t\t\t\t\t\t<strong>{{ form.controls.font_size.value }}px</strong>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="metric-pill">\n\t\t\t\t\t\t<span>Week starts</span>\n\t\t\t\t\t\t<strong>{{ form.controls.date_picker_day_start.value === \'M\' ? \'Monday\' : \'Sunday\' }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="hero-preview">\n\t\t\t\t<div class="preview-card">\n\t\t\t\t\t<div class="preview-title">Live palette peek</div>\n\t\t\t\t\t<div class="swatch-row">\n\t\t\t\t\t\t<div class="swatch" [style.background]="form.controls.primary_color.value" [style.color]="form.controls.primary_font_color.value">\n\t\t\t\t\t\t\t<span>Primary buttons</span>\n\t\t\t\t\t\t\t{{ form.controls.primary_color.value }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="swatch" [style.background]="form.controls.success_color.value" [style.color]="form.controls.success_font_color.value">\n\t\t\t\t\t\t\t<span>Success tone</span>\n\t\t\t\t\t\t\t{{ form.controls.success_color.value }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="swatch" [style.background]="form.controls.table_color.value" [style.color]="form.controls.table_font_color.value">\n\t\t\t\t\t\t\t<span>Primary table</span>\n\t\t\t\t\t\t\t{{ form.controls.table_color.value }}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="preview-pulse"></div>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<div class="section-grid">\n\t\t\t<div class="section-card glass-card animate-rise">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Experience preferences</h3>\n\t\t\t\t\t<p>Tune how the app greets you each day.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="field-grid">\n\t\t\t\t\t<label class="field-card">\n\t\t\t\t\t\t<div class="field-label">Collapsable menu</div>\n\t\t\t\t\t\t<p class="field-hint">Keep navigation cozy when you want focus.</p>\n\t\t\t\t\t\t<div class="toggle">\n\t\t\t\t\t\t\t<input class="toggle-input" type="checkbox" formControlName="collapsable_menu" />\n\t\t\t\t\t\t\t<span class="toggle-track">\n\t\t\t\t\t\t\t\t<span class="toggle-thumb"></span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<div class="toggle-state">\n\t\t\t\t\t\t\t\t@if (form.controls.collapsable_menu.value) {\n\t\t\t\t\t\t\t\t\tCompact\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@else {\n\t\t\t\t\t\t\t\t\tOpen\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</label>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Default entries per page</div>\n\t\t\t\t\t\t<p class="field-hint">Pick your sweet spot for list density.</p>\n\t\t\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.entries_per_page.valid ? \'is-valid\' : \'is-invalid\']" formControlName="entries_per_page" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t\t\t<rio-option value="25">25</rio-option>\n\t\t\t\t\t\t\t\t\t<rio-option value="50">50</rio-option>\n\t\t\t\t\t\t\t\t\t<rio-option value="100">100</rio-option>\n\t\t\t\t\t\t\t\t\t<rio-option value="250">250</rio-option>\n\t\t\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t@if (!form.controls.entries_per_page.valid) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Entries per page is required</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Select search style</div>\n\t\t\t\t\t\t<p class="field-hint">Decide if typing should be fuzzy or exact.</p>\n\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.rio_select_search_mode.valid ? \'is-valid\' : \'is-invalid\']" formControlName="rio_select_search_mode" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t<rio-option value="fuzzy">Fuzzy (flexible matching)</rio-option>\n\t\t\t\t\t\t\t<rio-option value="exact">Exact (must contain the term)</rio-option>\n\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Font size</div>\n\t\t\t\t\t\t<p class="field-hint">We recommend between 11–14px for quick scanning.</p>\n\t\t\t\t\t\t<input class="input-bevel" [ngClass]="[form.controls.font_size.valid ? \'is-valid\' : \'is-invalid\']" type="number" formControlName="font_size" (keyup)="changePrimaryFontSize()" />\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'required\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size is required</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'wholeNumbersGreaterThanZero\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size is invalid</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'maxValue\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size can not exceed 18</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (form.controls.font_size.hasError(\'minValue\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Font size can not be less than 8</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Week start (date picker)</div>\n\t\t\t\t\t\t<p class="field-hint">Pick where your planner begins.</p>\n\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.date_picker_day_start.valid ? \'is-valid\' : \'is-invalid\']" formControlName="date_picker_day_start" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t<rio-option [value]="\'S\'">Sunday</rio-option>\n\t\t\t\t\t\t\t<rio-option [value]="\'M\'">Monday</rio-option>\n\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t@if (form.controls.date_picker_day_start.hasError(\'required\')) {\n\t\t\t\t\t\t\t<div class="text-danger mt-1">Week start is required</div>\n\t\t\t\t\t\t}\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t<div class="field-label">Starting page</div>\n\t\t\t\t\t\t<p class="field-hint">Jump right into the view you love most.</p>\n\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.opening_route.valid ? \'is-valid\' : \'\']" formControlName="opening_route" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t<rio-option value="/home">Home</rio-option>\n\t\t\t\t\t\t\t@for (view of views; track view.display) {\n\t\t\t\t\t\t\t\t<rio-option [value]="view.value">{{ view.display | titleCase }}</rio-option>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t</div>\n\t\t\t\t\t@if (client === \'Ace Completions\') {\n\t\t\t\t\t\t<div class="field-card">\n\t\t\t\t\t\t\t<div class="field-label">Routing preference</div>\n\t\t\t\t\t\t\t<p class="field-hint">Decide how links open while you multitask.</p>\n\t\t\t\t\t\t\t<rio-select class="input-bevel" [ngClass]="[form.controls.routing_preference.valid ? \'is-valid\' : \'\']" formControlName="routing_preference" [clearable]="false" [searchable]="false">\n\t\t\t\t\t\t\t\t<rio-option value="alwaysAsk">Always Ask</rio-option>\n\t\t\t\t\t\t\t\t<rio-option value="sameTab">Same Tab</rio-option>\n\t\t\t\t\t\t\t\t<rio-option value="newTab">New Tab</rio-option>\n\t\t\t\t\t\t\t\t<rio-option value="newWindow">New Window</rio-option>\n\t\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="section-card glass-card animate-rise">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Table palette</h3>\n\t\t\t\t\t<p>Pick vibrant layers for your data rows.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="palette-preview">\n\t\t\t\t\t<div class="preview-table">\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.table_color.value" [style.color]="form.controls.table_font_color.value">\n\t\t\t\t\t\t\tPrimary header\n\t\t\t\t\t\t\t<span>{{ form.controls.table_font_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.secondary_table_color.value" [style.color]="form.controls.secondary_table_font_color.value">\n\t\t\t\t\t\t\tSecondary header\n\t\t\t\t\t\t\t<span>{{ form.controls.secondary_table_font_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.tertiary_table_color.value" [style.color]="form.controls.tertiary_table_font_color.value">\n\t\t\t\t\t\t\tTertiary header\n\t\t\t\t\t\t\t<span>{{ form.controls.tertiary_table_font_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="preview-table">\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.warning_color.value" [style.color]="form.controls.warning_font_color.value">\n\t\t\t\t\t\t\tWarnings\n\t\t\t\t\t\t\t<span>{{ form.controls.warning_hover_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.success_color.value" [style.color]="form.controls.success_font_color.value">\n\t\t\t\t\t\t\tSuccess\n\t\t\t\t\t\t\t<span>{{ form.controls.success_hover_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="row-swatch" [style.background]="form.controls.info_color.value" [style.color]="form.controls.info_font_color.value">\n\t\t\t\t\t\t\tInfo\n\t\t\t\t\t\t\t<span>{{ form.controls.info_hover_color.value }}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="color-grid">\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary table background</div>\n\t\t\t\t\t\t\t<div class="field-hint">The hero row that anchors your data.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.table_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="table_color" (ngModelChange)="changePrimaryColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary table font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep it crisp and readable.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.table_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="table_font_color" (ngModelChange)="changePrimaryFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary table background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Great for supporting sections.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_table_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_table_color" (ngModelChange)="changeSecondaryColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary table font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Match contrast with the new hue.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_table_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_table_font_color" (ngModelChange)="changeSecondaryFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Tertiary table background</div>\n\t\t\t\t\t\t\t<div class="field-hint">For extra callouts.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.tertiary_table_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="tertiary_table_color" (ngModelChange)="changeTertiaryColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Tertiary table font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Balance brightness for legibility.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.tertiary_table_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="tertiary_table_font_color" (ngModelChange)="changeTertiaryFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="section-card glass-card animate-rise">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Button glow-up</h3>\n\t\t\t\t\t<p>Make clicks feel friendly and intentional.</p>\n\t\t\t\t</div>\n\t\t\t\t<div class="button-demo">\n\t\t\t\t\t<button type="button" class="btn btn-success">Success</button>\n\t\t\t\t\t<button type="button" class="btn btn-warning">Warning</button>\n\t\t\t\t\t<button type="button" class="btn btn-danger">Danger</button>\n\t\t\t\t\t<button type="button" class="btn btn-info">Info</button>\n\t\t\t\t\t<button type="button" class="btn btn-primary">Primary</button>\n\t\t\t\t\t<button type="button" class="btn btn-secondary">Secondary</button>\n\t\t\t\t</div>\n\t\t\t\t<div class="color-grid">\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Success background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Celebrate wins.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.success_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="success_color" (ngModelChange)="changeSuccessColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Success font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep it sharp.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.success_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="success_font_color" (ngModelChange)="changeSuccessFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Success hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">How the button greets hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.success_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="success_hover_color" (ngModelChange)="changeSuccessHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Warning background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Gentle but visible.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.warning_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="warning_color" (ngModelChange)="changeWarningColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Warning font</div>\n\t\t\t\t\t\t\t<div class="field-hint">High contrast copy.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.warning_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="warning_font_color" (ngModelChange)="changeWarningFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Warning hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Add motion to caution.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.warning_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="warning_hover_color" (ngModelChange)="changeWarningHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Danger background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Clear stop signal.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.danger_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="danger_color" (ngModelChange)="changeDangerColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Danger font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Stay readable on alert.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.danger_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="danger_font_color" (ngModelChange)="changeDangerFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Danger hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Softer on hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.danger_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="danger_hover_color" (ngModelChange)="changeDangerHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Info background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Highlight helpful hints.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.info_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="info_color" (ngModelChange)="changeInfoColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Info font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep tips legible.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.info_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="info_font_color" (ngModelChange)="changeInfoFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Info hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Gentle motion on hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.info_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="info_hover_color" (ngModelChange)="changeInfoHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary background</div>\n\t\t\t\t\t\t\t<div class="field-hint">The hero action.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.primary_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="primary_color" (ngModelChange)="changePrimaryButtonColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Strong contrast for CTA.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.primary_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="primary_font_color" (ngModelChange)="changePrimaryButtonFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Primary hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">A playful shift on hover.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.primary_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="primary_hover_color" (ngModelChange)="changePrimaryButtonHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary background</div>\n\t\t\t\t\t\t\t<div class="field-hint">Great for subtle actions.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_color" (ngModelChange)="changeSecondaryButtonColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary font</div>\n\t\t\t\t\t\t\t<div class="field-hint">Keep it balanced.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_font_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_font_color" (ngModelChange)="changeSecondaryButtonFontColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="color-card">\n\t\t\t\t\t\t<div class="color-chip">\n\t\t\t\t\t\t\t<div class="color-name">Secondary hover</div>\n\t\t\t\t\t\t\t<div class="field-hint">Add a soft glow.</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<input type="color" class="color-input" [ngClass]="[form.controls.secondary_hover_color.value ? \'is-valid\' : \'is-invalid\']" formControlName="secondary_hover_color" (ngModelChange)="changeSecondaryHoverColor()" />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div class="section-card glass-card animate-rise sticky-section-card">\n\t\t\t\t<div class="section-heading">\n\t\t\t\t\t<h3>Sticky select defaults</h3>\n\t\t\t\t\t<p>Teach ResolveIO which choices you love.</p>\n\t\t\t\t</div>\n\t\t\t\t@if (!stickySelects.length) {\n\t\t\t\t\t<div class="sticky-empty">\n\t\t\t\t\t\tNo sticky selects saved yet. Add a stickyKey on a select to remember your favorite defaults.\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@else {\n\t\t\t\t\t@for (sticky of stickySelects; track sticky.key) {\n\t\t\t\t\t\t<div class="field-card sticky-select-card">\n\t\t\t\t\t\t\t<div class="field-label">{{ sticky.key }}</div>\n\t\t\t\t\t\t\t@if (sticky.options && sticky.options.length) {\n\t\t\t\t\t\t\t\t<rio-select\n\t\t\t\t\t\t\t\t\t[(ngModel)]="stickySelections[sticky.key]"\n\t\t\t\t\t\t\t\t\t[ngModelOptions]="{standalone: true}"\n\t\t\t\t\t\t\t\t\t[options]="sticky.options"\n\t\t\t\t\t\t\t\t\toptionValueKey="value"\n\t\t\t\t\t\t\t\t\toptionLabelKey="label"\n\t\t\t\t\t\t\t\t\t[searchable]="false"\n\t\t\t\t\t\t\t\t\tappendTo="body"\n\t\t\t\t\t\t\t\t\t[stickyAutoSave]="true"\n\t\t\t\t\t\t\t\t\t(ngModelChange)="updateStickyDefault(sticky.key, $event)">\n\t\t\t\t\t\t\t\t</rio-select>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (!sticky.options || !sticky.options.length) {\n\t\t\t\t\t\t\t\t<div class="text-muted">No saved options yet.</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t</form>\n</div>\n'}]}],ctorParameters:()=>[{type:AuthPermissionService},{type:UserSettingsService},{type:ProviderService},{type:DialogService},{type:void 0,decorators:[{type:Optional},{type:Inject,args:[RIO_SELECT_STICKY_ADAPTER]}]}]});const routes=[{path:"user-settings",component:UserSettingsComponent,children:[{path:"settings",component:UsersSettingsComponent},{path:"**",redirectTo:"settings"}]}],UserSettingsRouting=RouterModule.forChild(routes);class DatatableComponent extends BaseComponent{_services;urlClick;columns;data;collapseSize;searchTitle;totalItems=1e3;onChangeTableData=new EventEmitter;tableData;constructor(t){super(t),this._services=t}changeTableData(){this.onChangeTableData.emit()}sortColumn(t){this.tableData.sortColumn===t?"desc"===this.tableData.sortOrder?this.tableData.sortOrder="asc":this.tableData.sortOrder="desc":(this.tableData.sortOrder="asc",this.tableData.sortColumn=t),this.changeTableData()}navigateTo(t,e){"file_key"!==e&&t&&this.urlClick&&this._services._router.navigateByUrl(this.urlClick+t)}openFile(t){this._services._socket.call("getSignedUrl",t,900,(e,n)=>{n?window.open(n):this._services._socket.call("insertErrorLog","Widgets-datatable - getsignedurl",[t,e])})}typeOf(t){return typeof t}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DatatableComponent,deps:[{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:DatatableComponent,isStandalone:!1,selector:"data-table",inputs:{urlClick:"urlClick",columns:"columns",data:"data",collapseSize:"collapseSize",searchTitle:"searchTitle",totalItems:"totalItems",tableData:"tableData"},outputs:{onChangeTableData:"onChangeTableData"},providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'<style>\n\t.orangeRow {\n\t\tbackground-color: orangered;\n\t}\n\n\tcollapse-table tr:hover {\n\t\tbackground-color: lightblue;\n\t\tcursor: pointer;\n\t}\n\n\tcollapse-table {\n\t\twidth: 100%;\n\t}\n</style>\n\n<div class="row">\n\t<div class="input-group">\n\t\t<span class="input-group-btn">\n\t\t\t<button class="btn btn-primary" type="button" (click)="changeTableData()">Search!</button>\n\t\t</span>\n\t\t<input type="text" class="form-control" placeholder="{{ searchTitle }}" [(ngModel)]="tableData.searchString" (keyup.enter)="changeTableData()" style="z-index: 0" />\n\t</div>\n</div>\n<div class="row" style="padding-top: 20px">\n\t<collapse-table [collapseSize]="collapseSize" headerFixed="true">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns; track column) {\n\t\t\t\t\t<th (click)="sortColumn(column.data)" style="cursor: pointer">\n\t\t\t\t\t\t{{ column.name }}\n\t\t\t\t\t\t@if (tableData.sortColumn == column.data && tableData.sortOrder === \'desc\') {\n\t\t\t\t\t\t\t<i class="fa fa-caret-down"></i>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (tableData.sortColumn == column.data && tableData.sortOrder === \'asc\') {\n\t\t\t\t\t\t\t<i class="fa fa-caret-up"></i>\n\t\t\t\t\t\t}\n\t\t\t\t\t</th>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t@for (item of data; track item[\'_id\']) {\n\t\t\t\t<tr [ngClass]="{ orangeRow: item[\'color_red\'] }">\n\t\t\t\t\t@for (column of columns; track column.name) {\n\t\t\t\t\t\t<td (click)="navigateTo(item[\'_id\'], column.data)" [attr.data-label]="column.name">\n\t\t\t\t\t\t\t@if (typeOf(item[column.data]) !== \'boolean\' && column.data !== \'cost\' && column.data !== \'wells\' && column.data !== \'cost_total\' && column.data !== \'price\' && column.data !== \'date\' && column.data !== \'date_created\' && column.data !== \'date_delivered\' && column.data !== \'quantity\' && column.data !== \'quantity_string\' && column.data !== \'min_stock\' && column.data !== \'max_stock\' && column.data !== \'file_key\' && column.data !== \'date_in\') {\n\t\t\t\t\t\t\t\t<span>{{ column.subData ? item[column.data][column.subData] : item[column.data] }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'cost\' || column.data === \'price\' || column.data === \'cost_total\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | currency: \'USD\' : \'symbol\' : \'1.2-2\' }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'date\' || column.data === \'date_created\' || column.data === \'date_delivered\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | date: \'short\' }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'quantity\' || column.data === \'min_stock\' || column.data === \'max_stock\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | number }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'quantity_string\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | number }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'wells\') {\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<pre>{{ item[column.data] }}</pre>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'file_key\') {\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<button type="button" (click)="openFile(item[column.data])" class="btn btn-secondary">Open File</button>\n\t\t\t\t\t\t\t\t\t\x3c!-- <button type="button" class="btn btn-warning" (click)="viewDeletedReason(item)" *ngIf="item.deleted.is_deleted">View Deleted Reason</button> --\x3e\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (typeOf(item[column.data]) === \'boolean\') {\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t@if (item[column.data]) {\n\t\t\t\t\t\t\t\t\t\t<i class="fa fa-check" style="color: green; font-size: 18px" aria-hidden="true"></i>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t@if (!item[column.data]) {\n\t\t\t\t\t\t\t\t\t\t<i class="fa fa-times" style="color: red; font-size: 18px" aria-hidden="true"></i>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</td>\n\t\t\t\t\t}\n\t\t\t\t</tr>\n\t\t\t}\n\t\t</tbody>\n\t</collapse-table>\n</div>\n<hr />\n<div class="row">\n\t<div class="col-lg-4">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-8">\n\t\t\t\t<label class="form-control-label">Entries Per Page</label>\n\t\t\t\t<select class="form-control" [(ngModel)]="tableData.entriesPerPage" (ngModelChange)="changeTableData()">\n\t\t\t\t\t<option value="25">25</option>\n\t\t\t\t\t<option value="50">50</option>\n\t\t\t\t\t<option value="100">100</option>\n\t\t\t\t\t<option value="250">250</option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="col-lg-8" style="margin-top: 16px">\n\t\t<ngb-pagination class="float-end" boundaryLinks="true" [collectionSize]="totalItems" directionLinks="true" ellipses="false" [(page)]="tableData.pageNum" maxSize="6" [pageSize]="tableData.entriesPerPage" rotate="true" (pageChange)="changeTableData()"></ngb-pagination>\n\t</div>\n</div>\n',styles:[".orangeRow{background-color:#ff4500}collapse-table tr:hover{background-color:#add8e6;cursor:pointer}collapse-table{width:100%}\n"],dependencies:[{kind:"component",type:i1$2.NgbPagination,selector:"ngb-pagination",inputs:["disabled","boundaryLinks","directionLinks","ellipses","rotate","collectionSize","maxSize","page","pageSize","size"],outputs:["pageChange"]},{kind:"directive",type:i2.NgSelectOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:i2.ɵNgSelectMultipleOption,selector:"option",inputs:["ngValue","value"]},{kind:"directive",type:i2.DefaultValueAccessor,selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]"},{kind:"directive",type:i2.SelectControlValueAccessor,selector:"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]",inputs:["compareWith"]},{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"directive",type:i7.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{kind:"component",type:CollapseTableComponent,selector:"collapse-table",inputs:["collapseSize","tableFixed","headerFixed","secondaryColor","tertiaryColor"]},{kind:"pipe",type:i7.DecimalPipe,name:"number"},{kind:"pipe",type:i7.CurrencyPipe,name:"currency"},{kind:"pipe",type:i7.DatePipe,name:"date"}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DatatableComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"data-table",standalone:!1,template:'<style>\n\t.orangeRow {\n\t\tbackground-color: orangered;\n\t}\n\n\tcollapse-table tr:hover {\n\t\tbackground-color: lightblue;\n\t\tcursor: pointer;\n\t}\n\n\tcollapse-table {\n\t\twidth: 100%;\n\t}\n</style>\n\n<div class="row">\n\t<div class="input-group">\n\t\t<span class="input-group-btn">\n\t\t\t<button class="btn btn-primary" type="button" (click)="changeTableData()">Search!</button>\n\t\t</span>\n\t\t<input type="text" class="form-control" placeholder="{{ searchTitle }}" [(ngModel)]="tableData.searchString" (keyup.enter)="changeTableData()" style="z-index: 0" />\n\t</div>\n</div>\n<div class="row" style="padding-top: 20px">\n\t<collapse-table [collapseSize]="collapseSize" headerFixed="true">\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t\t@for (column of columns; track column) {\n\t\t\t\t\t<th (click)="sortColumn(column.data)" style="cursor: pointer">\n\t\t\t\t\t\t{{ column.name }}\n\t\t\t\t\t\t@if (tableData.sortColumn == column.data && tableData.sortOrder === \'desc\') {\n\t\t\t\t\t\t\t<i class="fa fa-caret-down"></i>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@if (tableData.sortColumn == column.data && tableData.sortOrder === \'asc\') {\n\t\t\t\t\t\t\t<i class="fa fa-caret-up"></i>\n\t\t\t\t\t\t}\n\t\t\t\t\t</th>\n\t\t\t\t}\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t@for (item of data; track item[\'_id\']) {\n\t\t\t\t<tr [ngClass]="{ orangeRow: item[\'color_red\'] }">\n\t\t\t\t\t@for (column of columns; track column.name) {\n\t\t\t\t\t\t<td (click)="navigateTo(item[\'_id\'], column.data)" [attr.data-label]="column.name">\n\t\t\t\t\t\t\t@if (typeOf(item[column.data]) !== \'boolean\' && column.data !== \'cost\' && column.data !== \'wells\' && column.data !== \'cost_total\' && column.data !== \'price\' && column.data !== \'date\' && column.data !== \'date_created\' && column.data !== \'date_delivered\' && column.data !== \'quantity\' && column.data !== \'quantity_string\' && column.data !== \'min_stock\' && column.data !== \'max_stock\' && column.data !== \'file_key\' && column.data !== \'date_in\') {\n\t\t\t\t\t\t\t\t<span>{{ column.subData ? item[column.data][column.subData] : item[column.data] }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'cost\' || column.data === \'price\' || column.data === \'cost_total\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | currency: \'USD\' : \'symbol\' : \'1.2-2\' }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'date\' || column.data === \'date_created\' || column.data === \'date_delivered\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | date: \'short\' }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'quantity\' || column.data === \'min_stock\' || column.data === \'max_stock\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | number }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'quantity_string\') {\n\t\t\t\t\t\t\t\t<span>{{ item[column.data] | number }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'wells\') {\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<pre>{{ item[column.data] }}</pre>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (column.data === \'file_key\') {\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<button type="button" (click)="openFile(item[column.data])" class="btn btn-secondary">Open File</button>\n\t\t\t\t\t\t\t\t\t\x3c!-- <button type="button" class="btn btn-warning" (click)="viewDeletedReason(item)" *ngIf="item.deleted.is_deleted">View Deleted Reason</button> --\x3e\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (typeOf(item[column.data]) === \'boolean\') {\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t@if (item[column.data]) {\n\t\t\t\t\t\t\t\t\t\t<i class="fa fa-check" style="color: green; font-size: 18px" aria-hidden="true"></i>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t@if (!item[column.data]) {\n\t\t\t\t\t\t\t\t\t\t<i class="fa fa-times" style="color: red; font-size: 18px" aria-hidden="true"></i>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</td>\n\t\t\t\t\t}\n\t\t\t\t</tr>\n\t\t\t}\n\t\t</tbody>\n\t</collapse-table>\n</div>\n<hr />\n<div class="row">\n\t<div class="col-lg-4">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-8">\n\t\t\t\t<label class="form-control-label">Entries Per Page</label>\n\t\t\t\t<select class="form-control" [(ngModel)]="tableData.entriesPerPage" (ngModelChange)="changeTableData()">\n\t\t\t\t\t<option value="25">25</option>\n\t\t\t\t\t<option value="50">50</option>\n\t\t\t\t\t<option value="100">100</option>\n\t\t\t\t\t<option value="250">250</option>\n\t\t\t\t</select>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class="col-lg-8" style="margin-top: 16px">\n\t\t<ngb-pagination class="float-end" boundaryLinks="true" [collectionSize]="totalItems" directionLinks="true" ellipses="false" [(page)]="tableData.pageNum" maxSize="6" [pageSize]="tableData.entriesPerPage" rotate="true" (pageChange)="changeTableData()"></ngb-pagination>\n\t</div>\n</div>\n'}]}],ctorParameters:()=>[{type:ProviderService}],propDecorators:{urlClick:[{type:Input}],columns:[{type:Input}],data:[{type:Input}],collapseSize:[{type:Input}],searchTitle:[{type:Input}],totalItems:[{type:Input}],onChangeTableData:[{type:Output}],tableData:[{type:Input}]}});class DatatableModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DatatableModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:DatatableModule,declarations:[DatatableComponent],imports:[NgbModule,FormsModule,CommonModule,RouterModule,CollapseTableModule],exports:[DatatableComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DatatableModule,imports:[NgbModule,FormsModule,CommonModule,RouterModule,CollapseTableModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DatatableModule,decorators:[{type:NgModule,args:[{imports:[NgbModule,FormsModule,CommonModule,RouterModule,CollapseTableModule],exports:[DatatableComponent],declarations:[DatatableComponent],providers:[]}]}]});class FileUploadComponent extends BaseComponent{_resize;_services;_ds;_http;constructor(t,e,n,o){super(e),this._resize=t,this._services=e,this._ds=n,this._http=o}files=[];allowDelete=!1;allowReplace=!1;showFileUpload=!0;filesChanged=new EventEmitter;fileAdded=new EventEmitter;fileRemoved=new EventEmitter;fileType;download_link;supportedFileTypes=["application/pdf","text/plain","image/gif","image/png","image/jpeg","image/bmp"];pdfSrc="";replaceFileIndex=0;isUploading=!1;progressMsg="";windowSize$;windowSize=0;ngOnInit(){this.windowSize$=this._resize.onResize$.subscribe(t=>{this.windowSize=t?t.innerWidth:window.innerWidth})}ngOnDestroy(){this.windowSize$.unsubscribe()}dragFileAccepted(t){this.supportedFileTypes.indexOf(t.type)>=0?this.uploadWithEmit(t,"misc").then(()=>{},t=>{this._ds.error("Could not upload file, incorrect type")}):this._ds.error("Invalid format, the supported file types are: "+this.supportedFileTypes)}upload(t,e,n,o,r){return new Promise((i,s)=>{this.progressMsg="Uploading "+(o||t.name),this._services._aws.uploadFile(t,e,n,o).then(s=>{const a={_id:s._id,name:o||t.name,size:t.size,status:r||"Uploaded",key:s.key,order:n||-1,type:e};this.isUploading=!1,this.files.push(a),this.files=this.files.sort((t,e)=>t.order-e.order),i(a)},t=>{this._ds.error("Could not upload file. "+t),s(t)}),this.isUploading=!0})}uploadWithEmit(t,e,n,o,r){return new Promise((i,s)=>{this.progressMsg="Uploading "+(o||t.name),this._services._aws.uploadFile(t,e,n,o).then(s=>{const a={_id:s._id,name:o||t.name,size:t.size,status:r||"Uploaded",key:s.key,order:n||-1,type:e};this.isUploading=!1,this.files=this.files.sort((t,e)=>t.order-e.order),this.fileAdded.emit(a),i(a)},t=>{this._ds.error("Could not upload file. "+t),s(t)}),this.isUploading=!0})}delete(t,e=!0){this.pdfSrc="",e?this._ds.confirm("Are you sure you want to delete this file?").then(e=>{this._services._aws.deleteFile(this.files[t].key,(e,n)=>{e&&(this._ds.error("Could not delete file"),this._services._socket.call("insertErrorLog","Widgets.File-Upload - Delete File",[this.files[t].key,e]))}),this.files.splice(t,1)},t=>{}):(this._services._aws.deleteFile(this.files[t].key,(e,n)=>{e&&this._services._socket.call("insertErrorLog","Widgets.File-Upload - Delete File",[this.files[t].key,e])}),this.files.splice(t,1))}deleteWithEmit(t,e=!0){this.pdfSrc="";let n=Object.assign({},this.files[t]);e?this._ds.confirm("Are you sure you want to delete this file?").then(e=>{this._services._aws.deleteFile(this.files[t].key,(e,o)=>{e&&(this._ds.error("Could not delete file"),this._services._socket.call("insertErrorLog","Widgets.File-Upload - Delete File",[this.files[t].key,e])),this.fileRemoved.emit(n)})},t=>{}):this._services._aws.deleteFile(this.files[t].key,(e,o)=>{e&&this._services._socket.call("insertErrorLog","Widgets.File-Upload - Delete File",[this.files[t].key,e]),this.fileRemoved.emit(n)})}deleteFileWithId(t){this.delete(this.files.map(t=>t._id).indexOf(t),!1)}open(t){this._services._socket.call("getSignedUrl",t.key,900,(e,n)=>{n?window.open(n):this._services._socket.call("insertErrorLog","Widgets-file - getsignedurl",[t.key,e])})}setPDFViewerSrc(t){this._services._socket.call("getSignedUrl",t.key,900,(e,n)=>{n?this.pdfSrc=n:(this._ds.error("Could not get signed url for file"),this._services._socket.call("insertErrorLog","Widgets-file - getsignedurl pdfviewer",[t.key,e]))})}onFileSelect(t){this.uploadWithEmit(t.target.files[0],this.fileType?this.fileType:"misc").then(()=>{},()=>{}),t.srcElement.value=""}onFileSelectReplace(t){if(t.target.files[0]){this.files[this.replaceFileIndex]._id;let e=this.files[this.replaceFileIndex].type,n=this.files[this.replaceFileIndex].order,o=this.files[this.replaceFileIndex].name.replace(/\.[^\.]+$/,"")+"."+t.target.files[0].name.split(".")[t.target.files[0].name.split(".").length-1],r=this.files[this.replaceFileIndex].status;this.deleteWithEmit(this.replaceFileIndex,!1),"Unsigned"===r?this._ds.confirm("Are you replacing this file with a signed copy?").then(r=>{this.uploadWithEmit(t.target.files[0],e,n,o,"Signed").then(t=>{t.key,t._id},t=>{})},r=>{this.uploadWithEmit(t.target.files[0],e,n,o).then(t=>{t.key,t._id},t=>{})}):this.uploadWithEmit(t.target.files[0],e,n,o).then(t=>{t.key,t._id},t=>{})}}userIsInRole(t){return this._services._account.isUserInView(t)}isMobile(){}downloadResource(t){return this._http.get(t,{responseType:"blob"}).toPromise()}download(t){this._services._socket.call("getSignedUrl",t.key,900,async(e,n)=>{if(n){const e=await this.downloadResource(n),o=window.URL.createObjectURL(e),r=this.download_link.nativeElement;r.href=o,r.download=t.name,r.click(),window.URL.revokeObjectURL(o)}else this._services._socket.call("insertErrorLog","Widgets-file - update bol",[e])})}email(t){this._ds.input("Email file to which address?",[{label:"Email Address",form:"email",data:"",validators:[Validators.required,this._services._vs.email],validatorErrors:["required","email"],validatorMsg:["Email is required","Email is invalid"],required:!0}]).then(e=>{this._services._socket.call("emailFile",t._id,e.email.value,(t,e)=>{t?this._ds.error("Could not send email: "+t):this._services._alert.setAlert("success","Email has been sent")})},t=>{})}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FileUploadComponent,deps:[{token:ResizeService},{token:ProviderService},{token:DialogService},{token:i4.HttpClient}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:FileUploadComponent,isStandalone:!1,selector:"file-upload",inputs:{files:"files",allowDelete:"allowDelete",allowReplace:"allowReplace",showFileUpload:"showFileUpload",fileType:"fileType"},outputs:{filesChanged:"filesChanged",fileAdded:"fileAdded",fileRemoved:"fileRemoved"},viewQueries:[{propertyName:"download_link",first:!0,predicate:["download_link"],descendants:!0,static:!0}],usesInheritance:!0,ngImport:i0,template:'<style>\n\thtml,\n\tbody {\n\t\theight: 100%;\n\t}\n\n\tcollapse-table tr:hover {\n\t\tbackground-color: lightblue;\n\t\tcursor: pointer;\n\t}\n\n\tcollapse-table {\n\t\twidth: 100%;\n\t}\n\n\t/* Label container: */\n\t.file {\n\t\tdisplay: inline-block;\n\t\tpadding: 0 0 0 0.5em;\n\t\tcursor: pointer;\n\t\tposition: relative;\n\t\tborder: 0.075rem solid #ddd;\n\t\tborder-radius: 0.25rem;\n\t}\n\n\t/* The pseudo input field: */\n\t.file::before {\n\t\tcontent: \'\';\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\ttop: 0;\n\t\tbottom: 0;\n\t\tz-index: -1;\n\n\t\t/* Bootstrap appearance: */\n\t\tbackground-color: #fff;\n\t\tborder: 0.075rem solid #ddd;\n\t\tborder-radius: 0.25rem;\n\t\t-webkit-box-shadow: inset 0 0.2rem 0.4rem rgba(0, 0, 0, 0.05);\n\t\tbox-shadow: inset 0 0.2rem 0.4rem rgba(0, 0, 0, 0.05);\n\t}\n\n\t/* The pseudo button: */\n\t.file::after {\n\t\tcontent: \'Browse\';\n\t\tdisplay: inline-block;\n\n\t\t/* Bootstrap appearance: */\n\t\tbackground-color: #eee;\n\t\tborder: 0.075rem solid #ddd;\n\t\tborder-radius: 0 0.25rem 0.25rem 0;\n\t\tpadding: 0.5rem 1rem;\n\t\tline-height: 1.5;\n\t\tcolor: #555;\n\t}\n\n\t.file input[type=\'file\'] {\n\t\tcursor: pointer;\n\t\tborder: 0 none;\n\t\twidth: 12em;\n\t}\n\n\t/* -webkit hide the button: */\n\t.file input[type=\'file\']::-webkit-file-upload-button {\n\t\tborder: 0;\n\t\tpadding: 0;\n\t\tmargin: 0;\n\t\twidth: 0;\n\t\tbackground: transparent;\n\t}\n\n\t/* IE10+ hide the button: */\n\t.file input[type=\'file\']::-ms-browse {\n\t\tpadding: 0;\n\t\tmargin: -1px;\n\t\twidth: 0;\n\t\tborder: 0;\n\t\tbackground: transparent;\n\t}\n\n\t.file input[type=\'file\']::-ms-value {\n\t\tbackground: #fff;\n\t\tborder: 0;\n\t}\n\n\tcard {\n\t\twidth: 100%;\n\t}\n</style>\n\n<a style="display: none" #download_link></a>\n<input hidden type="file" #fileInputReplace (change)="onFileSelectReplace($event)" />\n\n<div class="card">\n\t<div class="card-header">\n\t\t<strong class="pull-left">Files</strong>\n\t</div>\n\t<div class="card-block">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-6">\n\t\t\t\t@if (showFileUpload) {\n\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t<div class="col-lg-6">\n\t\t\t\t\t\t\t<div class="container">\n\t\t\t\t\t\t\t\t<div style="margin: 10px 0px; font-weight: bold">Upload File</div>\n\t\t\t\t\t\t\t\t<label class="file">\n\t\t\t\t\t\t\t\t\t<input type="file" #fileInput (change)="onFileSelect($event)" />\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t<ngx-file-drop dropZoneLabel="Drop files here" style="width: 223px; height: 112px; border: 1px black dashed; border-radius: 5px; justify-content: center" class="vertical-align" (onFileDrop)="dragFileAccepted($event)"></ngx-file-drop>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-lg-6">\n\t\t\t\t\t\t\t@if (isUploading) {\n\t\t\t\t\t\t\t\t<b>{{ progressMsg || \'N/A\' }}</b>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t@if (windowSize > 980) {\n\t\t\t\t\t\t<div class="col-lg-12">\n\t\t\t\t\t\t\t@if (pdfSrc) {\n\t\t\t\t\t\t\t\t<div style="text-align: center">\n\t\t\t\t\t\t\t\t\t<resolveio-client-lib-pdf-viewer [pdfSrc]="pdfSrc"></resolveio-client-lib-pdf-viewer>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="col-lg-6">\n\t\t\t\t@if (files && files.length) {\n\t\t\t\t\t<b>Uploaded Files</b>\n\t\t\t\t\t<div [style.max-height]="windowSize > 900 ? \'300px\' : \'\'" [style.overflow-y]="windowSize > 900 ? \'auto\' : \'\'">\n\t\t\t\t\t\t<collapse-table collapseSize="900">\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th>File Name</th>\n\t\t\t\t\t\t\t\t\t<th>Size</th>\n\t\t\t\t\t\t\t\t\t<th>Type</th>\n\t\t\t\t\t\t\t\t\t<th>Actions</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t@for (file of files; track file._id; let i = $index) {\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td data-label="File Name" (click)="setPDFViewerSrc(file)">{{ file.name }}</td>\n\t\t\t\t\t\t\t\t\t\t<td data-label="Size" (click)="setPDFViewerSrc(file)">{{ file.size / 1024 / 1024 | number: \'.2\' }} MB</td>\n\t\t\t\t\t\t\t\t\t\t<td data-label="Type" (click)="setPDFViewerSrc(file)">{{ file.type }}</td>\n\t\t\t\t\t\t\t\t\t\t<td data-label="Actions">\n\t\t\t\t\t\t\t\t\t\t\t<responsive-button-group collapseSize="900">\n\t\t\t\t\t\t\t\t\t\t\t\t<button type="button" class="btn btn-success" (click)="open(file)">Open</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type="button" class="btn btn-primary" (click)="download(file)">Download</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button [hidden]="!allowDelete || (file.type !== \'misc\' && !userIsInRole(\'super-admin\'))" type="button" class="btn btn-danger" (click)="deleteWithEmit(i)">Delete</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button [hidden]="!allowDelete || (file.type !== \'misc\' && !userIsInRole(\'super-admin\'))" type="button" class="btn btn-danger" (click)="fileInputReplace.click(); replaceFileIndex = i">Replace</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type="button" class="btn btn-warning" (click)="email(file)">Email</button>\n\t\t\t\t\t\t\t\t\t\t\t</responsive-button-group>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</collapse-table>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (!files || !files.length) {\n\t\t\t\t\t<b>No Uploaded Files</b>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n',styles:['html,body{height:100%}collapse-table tr:hover{background-color:#add8e6;cursor:pointer}collapse-table{width:100%}.file{display:inline-block;padding:0 0 0 .5em;cursor:pointer;position:relative;border:.075rem solid #ddd;border-radius:.25rem}.file:before{content:"";display:block;position:absolute;inset:0;z-index:-1;background-color:#fff;border:.075rem solid #ddd;border-radius:.25rem;-webkit-box-shadow:inset 0 .2rem .4rem rgba(0,0,0,.05);box-shadow:inset 0 .2rem .4rem #0000000d}.file:after{content:"Browse";display:inline-block;background-color:#eee;border:.075rem solid #ddd;border-radius:0 .25rem .25rem 0;padding:.5rem 1rem;line-height:1.5;color:#555}.file input[type=file]{cursor:pointer;border:0 none;width:12em}.file input[type=file]::-webkit-file-upload-button{border:0;padding:0;margin:0;width:0;background:transparent}.file input[type=file]::-ms-browse{padding:0;margin:-1px;width:0;border:0;background:transparent}.file input[type=file]::-ms-value{background:#fff;border:0}card{width:100%}\n'],dependencies:[{kind:"component",type:CollapseTableComponent,selector:"collapse-table",inputs:["collapseSize","tableFixed","headerFixed","secondaryColor","tertiaryColor"]},{kind:"component",type:ResponsiveButtonGroupComponent,selector:"responsive-button-group",inputs:["collapseSize"]},{kind:"component",type:i7$2.NgxFileDropComponent,selector:"ngx-file-drop",inputs:["accept","directory","multiple","dropZoneLabel","dropZoneClassName","useDragEnter","contentClassName","showBrowseBtn","browseBtnClassName","browseBtnLabel","disabled"],outputs:["onFileDrop","onFileOver","onFileLeave"]},{kind:"component",type:i8.PdfViewerComponent,selector:"resolveio-client-lib-pdf-viewer",inputs:["pdfSrc","fileName"]},{kind:"pipe",type:i7.DecimalPipe,name:"number"}]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FileUploadComponent,decorators:[{type:Component,args:[{selector:"file-upload",standalone:!1,template:'<style>\n\thtml,\n\tbody {\n\t\theight: 100%;\n\t}\n\n\tcollapse-table tr:hover {\n\t\tbackground-color: lightblue;\n\t\tcursor: pointer;\n\t}\n\n\tcollapse-table {\n\t\twidth: 100%;\n\t}\n\n\t/* Label container: */\n\t.file {\n\t\tdisplay: inline-block;\n\t\tpadding: 0 0 0 0.5em;\n\t\tcursor: pointer;\n\t\tposition: relative;\n\t\tborder: 0.075rem solid #ddd;\n\t\tborder-radius: 0.25rem;\n\t}\n\n\t/* The pseudo input field: */\n\t.file::before {\n\t\tcontent: \'\';\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\ttop: 0;\n\t\tbottom: 0;\n\t\tz-index: -1;\n\n\t\t/* Bootstrap appearance: */\n\t\tbackground-color: #fff;\n\t\tborder: 0.075rem solid #ddd;\n\t\tborder-radius: 0.25rem;\n\t\t-webkit-box-shadow: inset 0 0.2rem 0.4rem rgba(0, 0, 0, 0.05);\n\t\tbox-shadow: inset 0 0.2rem 0.4rem rgba(0, 0, 0, 0.05);\n\t}\n\n\t/* The pseudo button: */\n\t.file::after {\n\t\tcontent: \'Browse\';\n\t\tdisplay: inline-block;\n\n\t\t/* Bootstrap appearance: */\n\t\tbackground-color: #eee;\n\t\tborder: 0.075rem solid #ddd;\n\t\tborder-radius: 0 0.25rem 0.25rem 0;\n\t\tpadding: 0.5rem 1rem;\n\t\tline-height: 1.5;\n\t\tcolor: #555;\n\t}\n\n\t.file input[type=\'file\'] {\n\t\tcursor: pointer;\n\t\tborder: 0 none;\n\t\twidth: 12em;\n\t}\n\n\t/* -webkit hide the button: */\n\t.file input[type=\'file\']::-webkit-file-upload-button {\n\t\tborder: 0;\n\t\tpadding: 0;\n\t\tmargin: 0;\n\t\twidth: 0;\n\t\tbackground: transparent;\n\t}\n\n\t/* IE10+ hide the button: */\n\t.file input[type=\'file\']::-ms-browse {\n\t\tpadding: 0;\n\t\tmargin: -1px;\n\t\twidth: 0;\n\t\tborder: 0;\n\t\tbackground: transparent;\n\t}\n\n\t.file input[type=\'file\']::-ms-value {\n\t\tbackground: #fff;\n\t\tborder: 0;\n\t}\n\n\tcard {\n\t\twidth: 100%;\n\t}\n</style>\n\n<a style="display: none" #download_link></a>\n<input hidden type="file" #fileInputReplace (change)="onFileSelectReplace($event)" />\n\n<div class="card">\n\t<div class="card-header">\n\t\t<strong class="pull-left">Files</strong>\n\t</div>\n\t<div class="card-block">\n\t\t<div class="row">\n\t\t\t<div class="col-lg-6">\n\t\t\t\t@if (showFileUpload) {\n\t\t\t\t\t<div class="row">\n\t\t\t\t\t\t<div class="col-lg-6">\n\t\t\t\t\t\t\t<div class="container">\n\t\t\t\t\t\t\t\t<div style="margin: 10px 0px; font-weight: bold">Upload File</div>\n\t\t\t\t\t\t\t\t<label class="file">\n\t\t\t\t\t\t\t\t\t<input type="file" #fileInput (change)="onFileSelect($event)" />\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t<ngx-file-drop dropZoneLabel="Drop files here" style="width: 223px; height: 112px; border: 1px black dashed; border-radius: 5px; justify-content: center" class="vertical-align" (onFileDrop)="dragFileAccepted($event)"></ngx-file-drop>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="col-lg-6">\n\t\t\t\t\t\t\t@if (isUploading) {\n\t\t\t\t\t\t\t\t<b>{{ progressMsg || \'N/A\' }}</b>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t<div class="row" style="margin-top: 10px">\n\t\t\t\t\t@if (windowSize > 980) {\n\t\t\t\t\t\t<div class="col-lg-12">\n\t\t\t\t\t\t\t@if (pdfSrc) {\n\t\t\t\t\t\t\t\t<div style="text-align: center">\n\t\t\t\t\t\t\t\t\t<resolveio-client-lib-pdf-viewer [pdfSrc]="pdfSrc"></resolveio-client-lib-pdf-viewer>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class="col-lg-6">\n\t\t\t\t@if (files && files.length) {\n\t\t\t\t\t<b>Uploaded Files</b>\n\t\t\t\t\t<div [style.max-height]="windowSize > 900 ? \'300px\' : \'\'" [style.overflow-y]="windowSize > 900 ? \'auto\' : \'\'">\n\t\t\t\t\t\t<collapse-table collapseSize="900">\n\t\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th>File Name</th>\n\t\t\t\t\t\t\t\t\t<th>Size</th>\n\t\t\t\t\t\t\t\t\t<th>Type</th>\n\t\t\t\t\t\t\t\t\t<th>Actions</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t@for (file of files; track file._id; let i = $index) {\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td data-label="File Name" (click)="setPDFViewerSrc(file)">{{ file.name }}</td>\n\t\t\t\t\t\t\t\t\t\t<td data-label="Size" (click)="setPDFViewerSrc(file)">{{ file.size / 1024 / 1024 | number: \'.2\' }} MB</td>\n\t\t\t\t\t\t\t\t\t\t<td data-label="Type" (click)="setPDFViewerSrc(file)">{{ file.type }}</td>\n\t\t\t\t\t\t\t\t\t\t<td data-label="Actions">\n\t\t\t\t\t\t\t\t\t\t\t<responsive-button-group collapseSize="900">\n\t\t\t\t\t\t\t\t\t\t\t\t<button type="button" class="btn btn-success" (click)="open(file)">Open</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type="button" class="btn btn-primary" (click)="download(file)">Download</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button [hidden]="!allowDelete || (file.type !== \'misc\' && !userIsInRole(\'super-admin\'))" type="button" class="btn btn-danger" (click)="deleteWithEmit(i)">Delete</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button [hidden]="!allowDelete || (file.type !== \'misc\' && !userIsInRole(\'super-admin\'))" type="button" class="btn btn-danger" (click)="fileInputReplace.click(); replaceFileIndex = i">Replace</button>\n\t\t\t\t\t\t\t\t\t\t\t\t<button type="button" class="btn btn-warning" (click)="email(file)">Email</button>\n\t\t\t\t\t\t\t\t\t\t\t</responsive-button-group>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</collapse-table>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (!files || !files.length) {\n\t\t\t\t\t<b>No Uploaded Files</b>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</div>\n\t</div>\n</div>\n'}]}],ctorParameters:()=>[{type:ResizeService},{type:ProviderService},{type:DialogService},{type:i4.HttpClient}],propDecorators:{files:[{type:Input}],allowDelete:[{type:Input}],allowReplace:[{type:Input}],showFileUpload:[{type:Input}],filesChanged:[{type:Output}],fileAdded:[{type:Output}],fileRemoved:[{type:Output}],fileType:[{type:Input}],download_link:[{type:ViewChild,args:["download_link",{static:!0}]}]}});class FileModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FileModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:FileModule,declarations:[FileUploadComponent],imports:[CommonModule,FormsModule,CollapseTableModule,NgbModule,ResponsiveButtonGroupModule,NgxFileDropModule,PdfViewerModule],exports:[FileUploadComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FileModule,imports:[CommonModule,FormsModule,CollapseTableModule,NgbModule,ResponsiveButtonGroupModule,NgxFileDropModule,PdfViewerModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:FileModule,decorators:[{type:NgModule,args:[{imports:[CommonModule,FormsModule,CollapseTableModule,NgbModule,ResponsiveButtonGroupModule,NgxFileDropModule,PdfViewerModule],declarations:[FileUploadComponent],exports:[FileUploadComponent]}]}]});class UserSettingsModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsModule,declarations:[UserSettingsComponent,UsersSettingsComponent],imports:[SharedModule,i1$1.RouterModule,DatatableModule,FileModule,NgbAccordionModule,NgbModule]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsModule,providers:[UserSettingsService],imports:[SharedModule,UserSettingsRouting,DatatableModule,FileModule,NgbAccordionModule,NgbModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:UserSettingsModule,decorators:[{type:NgModule,args:[{imports:[SharedModule,UserSettingsRouting,DatatableModule,FileModule,NgbAccordionModule,NgbModule],declarations:[UserSettingsComponent,UsersSettingsComponent],providers:[UserSettingsService]}]}]});class CoreModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:CoreModule,imports:[CoreShellModule,CoreAuthModule,CoreDialogModule,CoreLoggerModule,UserSettingsModule,CollapseTableModule],exports:[CoreShellModule,CoreAuthModule,CoreDialogModule,CoreLoggerModule]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreModule,imports:[CoreShellModule,CoreAuthModule,CoreDialogModule,CoreLoggerModule,UserSettingsModule,CollapseTableModule,CoreShellModule,CoreAuthModule,CoreDialogModule,CoreLoggerModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:CoreModule,decorators:[{type:NgModule,args:[{imports:[CoreShellModule,CoreAuthModule,CoreDialogModule,CoreLoggerModule,UserSettingsModule,CollapseTableModule],exports:[CoreShellModule,CoreAuthModule,CoreDialogModule,CoreLoggerModule]}]}]});let typeCache={};function type(t){if(typeCache[t])throw new Error(`Action type "${t}" is not unqiue"`);return typeCache[t]=!0,t}class DateShortcutComponent extends BaseComponent{_services;_cd;startDateObj;endDateObj;startDateObjForm;endDateObjForm;startDateObjChange=new EventEmitter;endDateObjChange=new EventEmitter;startDateObjFormChange=new EventEmitter;endDateObjFormChange=new EventEmitter;datesChanged=new EventEmitter;shortcutValue=null;shortcutValueChange=new EventEmitter;constructor(t,e){super(t),this._services=t,this._cd=e}ngOnInit(){this.onSelectShortcut()}reset(){this.shortcutValue=null,this.shortcutValueChange.emit(this.shortcutValue),this._cd.detectChanges()}onSelectShortcut(){if(this.shortcutValue){const t=this._services._app.environment.value?.TZ_CLIENT,e=momentTz(t);if(this.startDateObj&&this.endDateObj){let n=dateOnlyStartOfDayTz({year:this.startDateObj.year,month:this.startDateObj.month,day:this.startDateObj.day},t),o=dateOnlyStartOfDayTz({year:this.endDateObj.year,month:this.endDateObj.month,day:this.endDateObj.day},t);"Q1"===this.shortcutValue?(n=e.clone().startOf("year").toDate(),o=e.clone().startOf("year").quarter(2).subtract(1,"days").toDate()):"Q2"===this.shortcutValue?(n=e.clone().startOf("year").quarter(2).toDate(),o=e.clone().startOf("year").quarter(3).subtract(1,"days").toDate()):"Q3"===this.shortcutValue?(n=e.clone().startOf("year").quarter(3).toDate(),o=e.clone().startOf("year").quarter(4).subtract(1,"days").toDate()):"Q4"===this.shortcutValue?(n=e.clone().startOf("year").quarter(4).toDate(),o=e.clone().endOf("year").toDate()):"Last Q1"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").toDate(),o=e.clone().startOf("year").subtract(1,"year").quarter(2).subtract(1,"days").toDate()):"Last Q2"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").quarter(2).toDate(),o=e.clone().startOf("year").subtract(1,"year").quarter(3).subtract(1,"days").toDate()):"Last Q3"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").quarter(3).toDate(),o=e.clone().startOf("year").subtract(1,"year").quarter(4).subtract(1,"days").toDate()):"Last Q4"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").quarter(4).toDate(),o=e.clone().endOf("year").subtract(1,"year").toDate()):"Today"===this.shortcutValue?(n=e.clone().startOf("day").toDate(),o=e.clone().toDate()):"Yesterday"===this.shortcutValue?(n=e.clone().subtract(1,"days").startOf("day").toDate(),o=e.clone().subtract(1,"days").endOf("day").toDate()):"Week"===this.shortcutValue?(n=e.clone().startOf("isoWeek").toDate(),o=e.clone().toDate()):"Last Week"===this.shortcutValue?(o=e.clone().startOf("isoWeek").subtract(1,"days").toDate(),n=momentTz(t,o).startOf("isoWeek").toDate()):"Month"===this.shortcutValue?(n=e.clone().startOf("month").toDate(),o=e.clone().toDate()):"Last Month"===this.shortcutValue?(o=e.clone().startOf("month").subtract(1,"days").endOf("day").toDate(),n=momentTz(t,o).startOf("month").toDate()):"Last 30 Days"===this.shortcutValue?(o=e.clone().toDate(),n=e.clone().subtract(30,"days").startOf("day").toDate()):"Quarter"===this.shortcutValue?(n=e.clone().startOf("year").quarter(e.quarter()).toDate(),o=e.clone().toDate()):"Last Quarter"===this.shortcutValue?(o=e.clone().startOf("year").quarter(e.quarter()).subtract(1,"days").endOf("day").toDate(),n=momentTz(t,o).startOf("quarter").toDate()):"Year"===this.shortcutValue?(n=e.clone().startOf("year").toDate(),o=e.clone().toDate()):"Last Year"===this.shortcutValue?(o=e.clone().startOf("year").subtract(1,"days").endOf("day").toDate(),n=momentTz(t,o).startOf("year").toDate()):"All"===this.shortcutValue&&(n=new Date(2017,0,1,0,0,0,0),o=e.clone().toDate()),this.startDateObj={year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()},this.endDateObj={year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()},this.startDateObjChange.emit(this.startDateObj),this.endDateObjChange.emit(this.endDateObj),this.datesChanged.emit([this.startDateObj,this.endDateObj])}else if(this.startDateObjForm&&this.endDateObjForm){let n=dateOnlyStartOfDayTz({year:this.startDateObjForm.value.year,month:this.startDateObjForm.value.month,day:this.startDateObjForm.value.day},t),o=dateOnlyStartOfDayTz({year:this.endDateObjForm.value.year,month:this.endDateObjForm.value.month,day:this.endDateObjForm.value.day},t);"Q1"===this.shortcutValue?(n=e.clone().startOf("year").toDate(),o=e.clone().startOf("year").quarter(2).subtract(1,"days").toDate()):"Q2"===this.shortcutValue?(n=e.clone().startOf("year").quarter(2).toDate(),o=e.clone().startOf("year").quarter(3).subtract(1,"days").toDate()):"Q3"===this.shortcutValue?(n=e.clone().startOf("year").quarter(3).toDate(),o=e.clone().startOf("year").quarter(4).subtract(1,"days").toDate()):"Q4"===this.shortcutValue?(n=e.clone().startOf("year").quarter(4).toDate(),o=e.clone().endOf("year").toDate()):"Last Q1"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").toDate(),o=e.clone().startOf("year").subtract(1,"year").quarter(2).subtract(1,"days").toDate()):"Last Q2"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").quarter(2).toDate(),o=e.clone().startOf("year").subtract(1,"year").quarter(3).subtract(1,"days").toDate()):"Last Q3"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").quarter(3).toDate(),o=e.clone().startOf("year").subtract(1,"year").quarter(4).subtract(1,"days").toDate()):"Last Q4"===this.shortcutValue?(n=e.clone().startOf("year").subtract(1,"year").quarter(4).toDate(),o=e.clone().endOf("year").subtract(1,"year").toDate()):"Today"===this.shortcutValue?(n=e.clone().startOf("day").toDate(),o=e.clone().toDate()):"Yesterday"===this.shortcutValue?(n=e.clone().subtract(1,"days").startOf("day").toDate(),o=e.clone().subtract(1,"days").endOf("day").toDate()):"Week"===this.shortcutValue?(n=e.clone().startOf("isoWeek").toDate(),o=e.clone().toDate()):"Last Week"===this.shortcutValue?(o=e.clone().startOf("isoWeek").subtract(1,"days").toDate(),n=momentTz(t,o).startOf("isoWeek").toDate()):"Month"===this.shortcutValue?(n=e.clone().startOf("month").toDate(),o=e.clone().toDate()):"Last Month"===this.shortcutValue?(o=e.clone().startOf("month").subtract(1,"days").endOf("day").toDate(),n=momentTz(t,o).startOf("month").toDate()):"Last 30 Days"===this.shortcutValue?(o=e.clone().toDate(),n=e.clone().subtract(30,"days").startOf("day").toDate()):"Quarter"===this.shortcutValue?(n=e.clone().startOf("year").quarter(e.quarter()).toDate(),o=e.clone().toDate()):"Last Quarter"===this.shortcutValue?(o=e.clone().startOf("year").quarter(e.quarter()).subtract(1,"days").endOf("day").toDate(),n=momentTz(t,o).startOf("quarter").toDate()):"Year"===this.shortcutValue?(n=e.clone().startOf("year").toDate(),o=e.clone().toDate()):"Last Year"===this.shortcutValue?(o=e.clone().startOf("year").subtract(1,"days").endOf("day").toDate(),n=momentTz(t,o).startOf("year").toDate()):"All"===this.shortcutValue&&(n=new Date(2017,0,1,0,0,0,0),o=e.clone().toDate()),this.startDateObjForm.setValue({year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()}),this.endDateObjForm.setValue({year:o.getFullYear(),month:o.getMonth()+1,day:o.getDate()}),this.startDateObjFormChange.emit(this.startDateObjForm),this.endDateObjFormChange.emit(this.endDateObjForm),this.datesChanged.emit([this.startDateObjForm,this.endDateObjForm])}this.shortcutValueChange.emit(this.shortcutValue)}this._cd.detectChanges()}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DateShortcutComponent,deps:[{token:ProviderService},{token:i0.ChangeDetectorRef}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"14.0.0",version:"21.1.2",type:DateShortcutComponent,isStandalone:!1,selector:"date-shortcut",inputs:{startDateObj:"startDateObj",endDateObj:"endDateObj",startDateObjForm:"startDateObjForm",endDateObjForm:"endDateObjForm",shortcutValue:"shortcutValue"},outputs:{startDateObjChange:"startDateObjChange",endDateObjChange:"endDateObjChange",startDateObjFormChange:"startDateObjFormChange",endDateObjFormChange:"endDateObjFormChange",datesChanged:"datesChanged",shortcutValueChange:"shortcutValueChange"},providers:[ProviderService],usesInheritance:!0,ngImport:i0,template:'\n\t\t<label class="form-control-label">Date Shortcuts</label>\n\t\t<rio-select [(ngModel)]="shortcutValue" (change)="onSelectShortcut()" placeholder="Select Shortcut" [clearable]="false">\n\t\t\t<rio-option value="Today">Today</rio-option>\n\t\t\t<rio-option value="Yesterday">Yesterday</rio-option>\n\t\t\t<rio-option value="Week">This Week</rio-option>\n\t\t\t<rio-option value="Last Week">Last Week</rio-option>\n\t\t\t<rio-option value="Month">This Month</rio-option>\n\t\t\t<rio-option value="Last Month">Last Month</rio-option>\n\t\t\t<rio-option value="Last 30 Days">Last 30 Days</rio-option>\n\t\t\t<rio-option value="Quarter">This Quarter</rio-option>\n\t\t\t<rio-option value="Last Quarter">Last Quarter</rio-option>\n\t\t\t<rio-option value="Year">This Year</rio-option>\n\t\t\t<rio-option value="Last Year">Last Year</rio-option>\n\t\t\t<rio-option value="Q1">Q1</rio-option>\n\t\t\t<rio-option value="Q2">Q2</rio-option>\n\t\t\t<rio-option value="Q3">Q3</rio-option>\n\t\t\t<rio-option value="Q4">Q4</rio-option>\n\t\t\t<rio-option value="Last Q1">Last Q1</rio-option>\n\t\t\t<rio-option value="Last Q2">Last Q2</rio-option>\n\t\t\t<rio-option value="Last Q3">Last Q3</rio-option>\n\t\t\t<rio-option value="Last Q4">Last Q4</rio-option>\n\t\t\t<rio-option value="All">All</rio-option>\n\t\t</rio-select>\n\t',isInline:!0,dependencies:[{kind:"directive",type:i2.NgControlStatus,selector:"[formControlName],[ngModel],[formControl]"},{kind:"directive",type:i2.NgModel,selector:"[ngModel]:not([formControlName]):not([formControl])",inputs:["name","disabled","ngModel","ngModelOptions"],outputs:["ngModelChange"],exportAs:["ngModel"]},{kind:"component",type:i5.RioSelectComponent,selector:"rio-select",inputs:["placeholder","multiple","panelMaxHeight","panelMaxViewportRatio","optionHeight","virtualBuffer","overlayZIndex","autoSizePanel","panelPosition","autoCenterPanel","viewportMargin","panelWidth","panelFullscreenWidth","clearable","templateLabelFromView","searchable","searchMatchMode","defaultSearch","textWrap","compareWith","options","optionLabelKey","optionLabelFn","optionValueKey","optionDisabledKey","optionIdKey","optionGroupKey","disabled","emitOptionObject","debugLog","stickyKey","stickyAutoSave"],outputs:["change"]},{kind:"component",type:i5.RioOptionComponent,selector:"rio-option",inputs:["value","disabled","label","id"]}],changeDetection:i0.ChangeDetectionStrategy.OnPush})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DateShortcutComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"date-shortcut",template:'\n\t\t<label class="form-control-label">Date Shortcuts</label>\n\t\t<rio-select [(ngModel)]="shortcutValue" (change)="onSelectShortcut()" placeholder="Select Shortcut" [clearable]="false">\n\t\t\t<rio-option value="Today">Today</rio-option>\n\t\t\t<rio-option value="Yesterday">Yesterday</rio-option>\n\t\t\t<rio-option value="Week">This Week</rio-option>\n\t\t\t<rio-option value="Last Week">Last Week</rio-option>\n\t\t\t<rio-option value="Month">This Month</rio-option>\n\t\t\t<rio-option value="Last Month">Last Month</rio-option>\n\t\t\t<rio-option value="Last 30 Days">Last 30 Days</rio-option>\n\t\t\t<rio-option value="Quarter">This Quarter</rio-option>\n\t\t\t<rio-option value="Last Quarter">Last Quarter</rio-option>\n\t\t\t<rio-option value="Year">This Year</rio-option>\n\t\t\t<rio-option value="Last Year">Last Year</rio-option>\n\t\t\t<rio-option value="Q1">Q1</rio-option>\n\t\t\t<rio-option value="Q2">Q2</rio-option>\n\t\t\t<rio-option value="Q3">Q3</rio-option>\n\t\t\t<rio-option value="Q4">Q4</rio-option>\n\t\t\t<rio-option value="Last Q1">Last Q1</rio-option>\n\t\t\t<rio-option value="Last Q2">Last Q2</rio-option>\n\t\t\t<rio-option value="Last Q3">Last Q3</rio-option>\n\t\t\t<rio-option value="Last Q4">Last Q4</rio-option>\n\t\t\t<rio-option value="All">All</rio-option>\n\t\t</rio-select>\n\t',changeDetection:ChangeDetectionStrategy.OnPush,standalone:!1}]}],ctorParameters:()=>[{type:ProviderService},{type:i0.ChangeDetectorRef}],propDecorators:{startDateObj:[{type:Input}],endDateObj:[{type:Input}],startDateObjForm:[{type:Input}],endDateObjForm:[{type:Input}],startDateObjChange:[{type:Output}],endDateObjChange:[{type:Output}],startDateObjFormChange:[{type:Output}],endDateObjFormChange:[{type:Output}],datesChanged:[{type:Output}],shortcutValue:[{type:Input}],shortcutValueChange:[{type:Output}]}});class DateShortcutModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DateShortcutModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:DateShortcutModule,declarations:[DateShortcutComponent],imports:[FormsModule,CommonModule,RioSelectModule],exports:[DateShortcutComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DateShortcutModule,imports:[FormsModule,CommonModule,RioSelectModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:DateShortcutModule,decorators:[{type:NgModule,args:[{imports:[FormsModule,CommonModule,RioSelectModule],exports:[DateShortcutComponent],declarations:[DateShortcutComponent]}]}]});class SchedulerComponent extends BaseComponent{_services;today=new Date;over_forward=!1;over_backwards=!1;mouseDown=!1;mouseLastEvent=null;timer_sub=null;months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];size_svg={width:0,height:0};size_cell={width:30,height:30};svgChart;constructor(t){super(t),this._services=t}ngAfterViewInit(){this.size_svg.width=this.svgChart.nativeElement.clientWidth,this.size_svg.height=this.svgChart.nativeElement.clientHeight}ngOnDestroy(){this.timer_sub&&clearInterval(this.timer_sub)}onMouseup(){this.mouseDown=!1}onMousedown(t){this.mouseDown=!0,this.mouseLastEvent=t}onMousemove(t){if(this.mouseDown){let e=0;this.mouseLastEvent.clientX-t.clientX>1?e=Math.floor((this.mouseLastEvent.clientX-t.clientX)/15)>0?Math.floor((this.mouseLastEvent.clientX-t.clientX+5*(30-this.size_cell.width))/20):1:this.mouseLastEvent.clientX-t.clientX<-1&&(e=Math.floor((this.mouseLastEvent.clientX-t.clientX)/15)<0?Math.floor((this.mouseLastEvent.clientX-t.clientX-5*(30-this.size_cell.width))/20):-1),this.today=moment$1(this.today).add(e,"days").toDate(),this.mouseLastEvent=t}}onMouseLeave(t){this.mouseDown&&(this.mouseDown=!1)}buildDays(){let t=[];for(let e=0;e<Math.floor(this.size_svg.width/this.size_cell.width);e++)t.push({index:e,day:moment$1(this.today).add(e,"days").toDate().getDate()});return t}buildMonths(){let t=[{index_start:0,index_end:null,month:this.months[this.today.getMonth()]}];for(let e=1;e<Math.floor(this.size_svg.width/this.size_cell.width);e++)moment$1(this.today).add(e,"days").toDate().getMonth()!==moment$1(this.today).add(e-1,"days").toDate().getMonth()&&(t[t.length-1].index_end=e,t.push({index_start:e,index_end:null,month:this.months[moment$1(this.today).add(e,"days").toDate().getMonth()]}));return t[t.length-1].index_end=Math.floor(this.size_svg.width/this.size_cell.width),t}buildYears(){let t=[{index_start:0,index_end:null,year:this.today.getFullYear()}];for(let e=1;e<Math.floor(this.size_svg.width/this.size_cell.width);e++)moment$1(this.today).add(e,"days").toDate().getFullYear()!==moment$1(this.today).add(e-1,"days").toDate().getFullYear()&&(t[t.length-1].index_end=e,t.push({index_start:e,index_end:null,year:moment$1(this.today).add(e,"days").toDate().getFullYear()}));return t[t.length-1].index_end=Math.floor(this.size_svg.width/this.size_cell.width),t}decrementToday(){this.today=moment$1(this.today).subtract(1,"days").toDate()}incrementToday(){this.today=moment$1(this.today).add(1,"days").toDate()}overForward(){this.timer_sub=setInterval(()=>{this.incrementToday()},50)}leftForward(){clearInterval(this.timer_sub)}overBackwards(){this.timer_sub=setInterval(()=>{this.decrementToday()},50)}leftBackwards(){clearInterval(this.timer_sub)}zoomOut(){this.size_cell.width>10&&(this.size_cell.width-=10)}zoomIn(){this.size_cell.width+=10}static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SchedulerComponent,deps:[{token:ProviderService}],target:i0.ɵɵFactoryTarget.Component});static"ɵcmp"=i0.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"21.1.2",type:SchedulerComponent,isStandalone:!1,selector:"scheduler",host:{listeners:{mouseup:"onMouseup()",mousedown:"onMousedown($event)",mousemove:"onMousemove($event)",mouseleave:"onMouseLeave($event)"}},providers:[ProviderService],viewQueries:[{propertyName:"svgChart",first:!0,predicate:["svgChart"],descendants:!0,static:!0}],usesInheritance:!0,ngImport:i0,template:'<style>\n\t.bar {\n\t\tfill: red; /* changes the background */\n\t\theight: 21px;\n\t\ttransition: fill 0.3s ease;\n\t\tcursor: pointer;\n\t\tfont-family: Helvetica, sans-serif;\n\t}\n\n\t.bar text {\n\t\tcolor: black;\n\t}\n\n\t.bar:hover,\n\t.bar:focus {\n\t\tfill: black;\n\t}\n\n\t.bar:hover text,\n\t.bar:focus text {\n\t\tfill: red;\n\t}\n\n\t.year {\n\t\tstroke: black;\n\t\tfill: white;\n\t}\n\n\t.month {\n\t\tstroke: black;\n\t\tfill: white;\n\t}\n\n\t.day {\n\t\tstroke: black;\n\t\tfill: white;\n\t}\n\n\t.smallText {\n\t\tfont-size: 4px;\n\t}\n</style>\n\n<div class="scheduler">\n\t<button class="btn btn-warning" type="button" (mouseenter)="overBackwards()" (mouseleave)="leftBackwards()">Go Backwards</button>\n\t<button class="btn btn-success" type="button" (mouseenter)="overForward()" (mouseleave)="leftForward()">Go Forward</button>\n\n\t<button style="margin-left: 20px" class="btn btn-warning" type="button" (click)="zoomOut()">Zoom Out</button>\n\t<button class="btn btn-success" type="button" (click)="zoomIn()">Zoom In</button>\n\n\t<svg class="chart" width="100%" height="100%" aria-labelledby="title desc" role="img" #svgChart>\n\t\t<title id="title">Scheduler</title>\n\t\t<desc id="desc">Scheduler</desc>\n\n\t\t<g class="year">\n\t\t\t@for (year of buildYears(); track year;) {\n\t\t\t\t<ng-container>\n\t\t\t\t\t<rect [attr.width]="(year.index_end - year.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="year.index_start * size_cell.width"></rect>\n\t\t\t\t\t<svg [attr.width]="(year.index_end - year.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="year.index_start * size_cell.width">\n\t\t\t\t\t\t<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">{{ year.year }}</text>\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t}\n\t\t</g>\n\t\t<g class="month">\n\t\t\t@for (month of buildMonths(); track month;) {\n\t\t\t\t<ng-container>\n\t\t\t\t\t<rect [attr.width]="(month.index_end - month.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="month.index_start * size_cell.width" [attr.y]="size_cell.height"></rect>\n\t\t\t\t\t<svg [attr.width]="(month.index_end - month.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="month.index_start * size_cell.width" [attr.y]="size_cell.height">\n\t\t\t\t\t\t<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">{{ month.month }}</text>\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t}\n\t\t</g>\n\t\t<g class="day">\n\t\t\t@for (day of buildDays(); track day;) {\n\t\t\t\t<ng-container>\n\t\t\t\t\t<rect [attr.width]="size_cell.width" [attr.height]="size_cell.height" [attr.x]="day.index * size_cell.width" [attr.y]="size_cell.height * 2"></rect>\n\t\t\t\t\t<svg [attr.width]="size_cell.width" [attr.height]="size_cell.height" [attr.x]="day.index * size_cell.width" [attr.y]="size_cell.height * 2">\n\t\t\t\t\t\t<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle" [style.font-size.px]="[size_cell.width > 10 ? 12 : 6]">{{ day.day }}</text>\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t}\n\t\t</g>\n\n\t\t\x3c!-- <g class="bar">\n\t<rect width="40" height="19"></rect>\n\t<text x="45" y="9.5" dy=".35em">4 apples</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="80" height="19" y="20"></rect>\n\t<text x="85" y="28" dy=".35em">8 bananas</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="150" height="19" y="40"></rect>\n\t<text x="150" y="48" dy=".35em">15 kiwis</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="160" height="19" y="60"></rect>\n\t<text x="161" y="68" dy=".35em">16 oranges</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="230" height="19" y="80"></rect>\n\t<text x="235" y="88" dy=".35em">23 lemons</text>\n\t</g> --\x3e\n\t</svg>\n</div>\n',styles:[".bar{fill:red;height:21px;transition:fill .3s ease;cursor:pointer;font-family:Helvetica,sans-serif}.bar text{color:#000}.bar:hover,.bar:focus{fill:#000}.bar:hover text,.bar:focus text{fill:red}.year,.month,.day{stroke:#000;fill:#fff}.smallText{font-size:4px}\n"]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SchedulerComponent,decorators:[{type:Component,args:[{providers:[ProviderService],selector:"scheduler",standalone:!1,template:'<style>\n\t.bar {\n\t\tfill: red; /* changes the background */\n\t\theight: 21px;\n\t\ttransition: fill 0.3s ease;\n\t\tcursor: pointer;\n\t\tfont-family: Helvetica, sans-serif;\n\t}\n\n\t.bar text {\n\t\tcolor: black;\n\t}\n\n\t.bar:hover,\n\t.bar:focus {\n\t\tfill: black;\n\t}\n\n\t.bar:hover text,\n\t.bar:focus text {\n\t\tfill: red;\n\t}\n\n\t.year {\n\t\tstroke: black;\n\t\tfill: white;\n\t}\n\n\t.month {\n\t\tstroke: black;\n\t\tfill: white;\n\t}\n\n\t.day {\n\t\tstroke: black;\n\t\tfill: white;\n\t}\n\n\t.smallText {\n\t\tfont-size: 4px;\n\t}\n</style>\n\n<div class="scheduler">\n\t<button class="btn btn-warning" type="button" (mouseenter)="overBackwards()" (mouseleave)="leftBackwards()">Go Backwards</button>\n\t<button class="btn btn-success" type="button" (mouseenter)="overForward()" (mouseleave)="leftForward()">Go Forward</button>\n\n\t<button style="margin-left: 20px" class="btn btn-warning" type="button" (click)="zoomOut()">Zoom Out</button>\n\t<button class="btn btn-success" type="button" (click)="zoomIn()">Zoom In</button>\n\n\t<svg class="chart" width="100%" height="100%" aria-labelledby="title desc" role="img" #svgChart>\n\t\t<title id="title">Scheduler</title>\n\t\t<desc id="desc">Scheduler</desc>\n\n\t\t<g class="year">\n\t\t\t@for (year of buildYears(); track year;) {\n\t\t\t\t<ng-container>\n\t\t\t\t\t<rect [attr.width]="(year.index_end - year.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="year.index_start * size_cell.width"></rect>\n\t\t\t\t\t<svg [attr.width]="(year.index_end - year.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="year.index_start * size_cell.width">\n\t\t\t\t\t\t<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">{{ year.year }}</text>\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t}\n\t\t</g>\n\t\t<g class="month">\n\t\t\t@for (month of buildMonths(); track month;) {\n\t\t\t\t<ng-container>\n\t\t\t\t\t<rect [attr.width]="(month.index_end - month.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="month.index_start * size_cell.width" [attr.y]="size_cell.height"></rect>\n\t\t\t\t\t<svg [attr.width]="(month.index_end - month.index_start) * size_cell.width" [attr.height]="size_cell.height" [attr.x]="month.index_start * size_cell.width" [attr.y]="size_cell.height">\n\t\t\t\t\t\t<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle">{{ month.month }}</text>\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t}\n\t\t</g>\n\t\t<g class="day">\n\t\t\t@for (day of buildDays(); track day;) {\n\t\t\t\t<ng-container>\n\t\t\t\t\t<rect [attr.width]="size_cell.width" [attr.height]="size_cell.height" [attr.x]="day.index * size_cell.width" [attr.y]="size_cell.height * 2"></rect>\n\t\t\t\t\t<svg [attr.width]="size_cell.width" [attr.height]="size_cell.height" [attr.x]="day.index * size_cell.width" [attr.y]="size_cell.height * 2">\n\t\t\t\t\t\t<text x="50%" y="50%" alignment-baseline="middle" text-anchor="middle" [style.font-size.px]="[size_cell.width > 10 ? 12 : 6]">{{ day.day }}</text>\n\t\t\t\t\t</svg>\n\t\t\t\t</ng-container>\n\t\t\t}\n\t\t</g>\n\n\t\t\x3c!-- <g class="bar">\n\t<rect width="40" height="19"></rect>\n\t<text x="45" y="9.5" dy=".35em">4 apples</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="80" height="19" y="20"></rect>\n\t<text x="85" y="28" dy=".35em">8 bananas</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="150" height="19" y="40"></rect>\n\t<text x="150" y="48" dy=".35em">15 kiwis</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="160" height="19" y="60"></rect>\n\t<text x="161" y="68" dy=".35em">16 oranges</text>\n\t</g>\n\t<g class="bar">\n\t<rect width="230" height="19" y="80"></rect>\n\t<text x="235" y="88" dy=".35em">23 lemons</text>\n\t</g> --\x3e\n\t</svg>\n</div>\n'}]}],ctorParameters:()=>[{type:ProviderService}],propDecorators:{svgChart:[{type:ViewChild,args:["svgChart",{static:!0}]}],onMouseup:[{type:HostListener,args:["mouseup"]}],onMousedown:[{type:HostListener,args:["mousedown",["$event"]]}],onMousemove:[{type:HostListener,args:["mousemove",["$event"]]}],onMouseLeave:[{type:HostListener,args:["mouseleave",["$event"]]}]}});class SchedulerModule{static"ɵfac"=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SchedulerModule,deps:[],target:i0.ɵɵFactoryTarget.NgModule});static"ɵmod"=i0.ɵɵngDeclareNgModule({minVersion:"14.0.0",version:"21.1.2",ngImport:i0,type:SchedulerModule,declarations:[SchedulerComponent],imports:[NgbModule,FormsModule,CommonModule,RouterModule],exports:[SchedulerComponent]});static"ɵinj"=i0.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SchedulerModule,imports:[NgbModule,FormsModule,CommonModule,RouterModule]})}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"21.1.2",ngImport:i0,type:SchedulerModule,decorators:[{type:NgModule,args:[{imports:[NgbModule,FormsModule,CommonModule,RouterModule],exports:[SchedulerComponent],declarations:[SchedulerComponent],providers:[]}]}]});const ReportBuilderModulePermission={name:"report-builder",gate:"report-builder",views:[{link:"/report-builder/list",label:"List"},{link:"/report-builder/new",label:"New"},{link:"/report-builder/scheduled-job",label:"Scheduled Job"},{link:"/report-builder/dashboard-builder",label:"Dashboard Builder"},{link:"/report-builder/detail",label:"Detail",has_parameter:!0},{link:"/report-builder/edit",label:"Edit",has_parameter:!0},{link:"/report-builder/delete",label:"Delete",has_parameter:!0}]},MongoExplorerModulePermission={name:"mongo-explorer",gate:"mongo-explorer",views:[{link:"/super-admin/mongo-explorer",label:"Mongo Explorer"}]},SuperAdminModulePermission={name:"super-admin",views:[{link:"/super-admin/dashboard",label:"Dashboard"},{link:"/super-admin/apm",label:"APM"},{link:"/super-admin/mongo",label:"Mongo"},{link:"/super-admin/mongo-explorer",label:"Mongo Explorer",gate:"mongo-explorer"},{link:"/super-admin/monitor",label:"Monitor"}]};export{AccountManagerService,AiAssistantComponent,AiFormAutoRegisterDirective,AiFormRegistryService,AiPageFormAdapterService,AiPageRouterService,AiTerminalComponent,AiTerminalModule,AiTerminalService,AlertService,Auth365Component,AuthGuard,AuthPermissionService,AuthService,AwsService,BaseComponent,CanDeactivateGuard,CollapseTableComponent,CollapseTableModule,CoreAuthModule,CoreComponent,CoreDialogModule,CoreLoggerModule,CoreModule,CoreService,CoreServicesModule,CoreShellModule,DatatableComponent,DatatableModule,DateShortcutComponent,DateShortcutModule,DialogConfirmContent,DialogErrorContent,DialogInputContent,DialogLoginContent,DialogNotifyContent,DialogRegisterContent,DialogSelectArrayContent,DialogSelectArrayObjsContent,DialogSelectDataLabelsContent,DialogSelectDateTimeContent,DialogSelectWithButtonsURLContent,DialogService,DomSanitizorPipe,Draggable,DropEvent,Droppable,EnrollComponent,FeatureGateService,FileModule,FileUploadComponent,FilterEqualPipe,FilterNotEqualPipe,FocusDirective,ForgotPasswordComponent,FormButtonComponent,FormButtonModule,HomeComponent,HtmlDiffViewerComponent,JsonParsePipe,LoggerComponent,MinusCurrencyPipe,MongoExplorerModulePermission,NavbarMainComponent,NavbarModuleComponent,NgDragDropModule,NgDragDropService,OfflineManagerService,PhonePipe,PipeModule,ProviderService,ReportBuilderModulePermission,ResizeService,ResponsiveButtonGroupComponent,ResponsiveButtonGroupModule,ReversePipe,SchedulerComponent,SchedulerModule,ScrollDirective,SharedModule,SocketManagerService,SocketService,SortTableDirective,SortTableHeaderComponent,SortTableModule,SortTableNgForComponent,Sortable as SortableJs,SortablejsDirective,SortablejsModule,StorageDB,SuperAdminModulePermission,TitleCaseAndUnderscorePipe,TokenManagerService,UserRoleComponent,UserRoleModule,ValidationService,WindowRefService,applyMongoUpdate,b64toBlobURL,blobToFile,dateOnlyStartOfDayTz,dateReviver,deepCopy,deepDiffDetails,exportCsv,generateCronStringFromDate,isUpperCase,mergeDeep,momentTz,pad,rioDatePickerConfigFactory,round,s2ab,toDataURL,toTitleCase,type};
|