@snugdesk/core 0.0.12 → 0.0.13

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,18 +1,20 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Input, Pipe, NgModule, Injectable } from '@angular/core';
2
+ import { Component, Input, Pipe, NgModule, Injectable, InjectionToken, Optional, Inject } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
6
6
  import momentTimezone from 'moment-timezone';
7
7
  import * as i1$1 from '@angular/platform-browser';
8
+ import { API, Amplify } from 'aws-amplify';
9
+ import { GRAPHQL_AUTH_MODE } from '@aws-amplify/api-graphql';
8
10
  import { lastValueFrom, BehaviorSubject } from 'rxjs';
11
+ import { JwtHelperService } from '@auth0/angular-jwt';
9
12
  import * as i1$2 from '@angular/common/http';
10
13
  import { HttpHeaders } from '@angular/common/http';
11
- import { JwtHelperService } from '@auth0/angular-jwt';
12
14
  import * as CryptoJS from 'crypto-js';
13
15
  import * as uuid from 'uuid';
14
16
 
15
- const AppConfigData = {
17
+ const SnugdeskAppConfig = {
16
18
  appDomain: 'snugdesk.com',
17
19
  appLogoURL: 'https://assets.snugdesk.com/logo/snugdesk.svg',
18
20
  appName: 'Snugdesk',
@@ -20,19 +22,29 @@ const AppConfigData = {
20
22
  companyName: 'Snug Technologies Pvt. Ltd.',
21
23
  companyAddress: '403, Tower B, Global Business Park, MG Road, Gurugram, Haryana 122002, India',
22
24
  };
23
- const AppApiConfig = {
25
+ const SnugdeskAPIConfig = {
24
26
  endpoint: 'https://api.snugdesk.com',
25
27
  };
26
- const WhatsAppConfig = {
27
- endpoint: 'https://graph.facebook.com/v19.0',
28
+ const SnugdeskUtilityConfig = {
29
+ countryEndpoint: 'https://snugdesk-assets.s3.amazonaws.com/metadata/countries.json',
30
+ ipLookupEndpoint: 'https://ipapi.co/json/',
31
+ };
32
+ const SnugdeskAmplifyConfig = {
33
+ aws_project_region: 'ap-south-1',
34
+ aws_appsync_graphqlEndpoint: 'https://sgbnsklbvrh67mcvh3wqkzgyou.appsync-api.ap-south-1.amazonaws.com/graphql',
35
+ aws_appsync_region: 'ap-south-1',
36
+ aws_appsync_authenticationType: 'AWS_LAMBDA',
37
+ };
38
+ const GoogleMapsConfig = {
39
+ apiKey: 'AIzaSyDOPOMzdMNj6QHFbBWzGmiaXP6yFFUMwok',
28
40
  };
29
41
 
30
42
  class FooterComponent {
31
- appConfig = AppConfigData;
32
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
33
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.2", type: FooterComponent, isStandalone: false, selector: "sd-app-footer", ngImport: i0, template: "<div class=\"sd_container_widget_footer\">\n <div class=\"sd_container_widget_footer_inner\"><span>Powered by</span>\n <svg width=\"16px\" shape-rendering=\"geometricPrecision\" text-rendering=\"geometricPrecision\" image-rendering=\"optimizeQuality\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" viewBox=\"0 0 877.098 808.09\">\n <g id=\"Layer_x0020_1\">\n <metadata id=\"CorelCorpID_0Corel-Layer\" />\n <g id=\"_258513600\">\n <path id=\"_258516096\" fill=\"#CBA96B\" fill-rule=\"nonzero\" d=\"M637.653 218.973c-109.109,-5.73516 -241.809,27.9446 -336.907,14.3602 -52.1167,-7.44554 -85.2507,-24.8291 -102.132,-36.1086 -57.8931,61.7431 -93.4412,144.67 -93.4412,235.995 0,171.801 125.437,314.25 289.707,340.911 -8.09408,-36.1447 -12.5046,-73.6839 -12.5046,-112.274 0,-189.17 102.668,-354.272 255.277,-442.882z\" />\n <path id=\"_258516024\" fill=\"#FAE5C5\" fill-rule=\"nonzero\" d=\"M778.919 331.111c0,0 -0.795844,-6.58187 -3.83616,-16.5262 -2.95236,-8.04746 -6.16964,-15.955 -9.68789,-23.7089 -15.0903,-29.1696 -46.4069,-64.5259 -110.487,-70.6637 -5.67476,-0.538334 -11.4438,-0.931487 -17.2553,-1.23986 -152.609,88.61 -255.277,253.712 -255.277,442.882 0,38.5905 4.41052,76.1297 12.5046,112.274 18.155,2.95342 36.7635,4.54405 55.7504,4.54405 190.788,0 345.456,-154.667 345.456,-345.455 0,-36.1033 -5.58044,-70.8873 -15.8766,-103.59 -0.812799,0.942084 -1.29073,1.48254 -1.29073,1.48254z\" />\n <path id=\"_258515952\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M718.294 758.328c-2.63444,0 -5.25511,-1.08726 -7.14458,-3.21411 -3.49387,-3.94743 -3.12509,-9.97401 0.819158,-13.4658 65.9724,-58.4336 110.727,-134.554 129.411,-220.127 1.1233,-5.15126 6.21627,-8.39928 11.3601,-7.28658 5.14278,1.12647 8.40352,6.20885 7.28234,11.3569 -19.557,89.5542 -66.3836,169.202 -135.403,230.332 -1.81317,1.60864 -4.07353,2.40449 -6.32542,2.40449z\" />\n <path id=\"_258515880\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M846.577 557.445c-1.40412,0 -2.83367,-0.181211 -4.25474,-0.555289 -8.91854,-2.3462 -14.2415,-11.4735 -11.9059,-20.3942 8.82422,-33.5198 13.3004,-68.2667 13.3004,-103.269 0,-9.21738 7.47309,-16.6926 16.6915,-16.6926 9.21738,0 16.6905,7.47521 16.6905,16.6926 0,37.8699 -4.83547,75.4727 -14.3877,111.768 -1.97001,7.49217 -8.73203,12.4506 -16.1341,12.4506z\" />\n <path id=\"_258515808\" fill=\"#F7AB54\" fill-rule=\"nonzero\" d=\"M532.463 51.2668c-26.5225,-4.561 -53.5261,-9.03723 -81.5311,-9.03723 -6.4971,0 -12.9486,0.180151 -19.3652,0.504423l0 0.0169554c-0.116568,0 -0.240555,0 -0.357123,0 -130.335,0 -188.497,-1.54718 -257.657,-42.7509 0,0 -0.329571,1.31722 -0.822337,3.71429 105.693,109.444 253.934,177.522 418.097,177.522 47.2367,0 97.7691,-5.74258 146.957,-18.847 -36.3757,-51.8856 -112.688,-95.2088 -205.32,-111.122z\" />\n <path id=\"_258515736\" fill=\"#2F3033\" fill-rule=\"nonzero\" d=\"M450.631 674.55c-105.869,0 -197.899,-65.1882 -228.997,-162.207 -3.11979,-9.71968 2.56768,-20.0233 12.7017,-23.017 10.134,-3.00111 20.8689,2.47231 23.9845,12.1909 26.1177,81.4633 103.4,136.2 192.311,136.2 88.9109,0 166.199,-54.7363 192.311,-136.2 3.11555,-9.72604 13.8494,-15.192 23.9834,-12.1909 10.134,2.99369 15.8257,13.2973 12.7007,23.017 -31.0962,97.0188 -123.128,162.207 -228.995,162.207z\" />\n <path id=\"_258515664\" fill=\"#2F3033\" fill-rule=\"nonzero\" d=\"M797.457 379.399c-3.54474,-22.8781 -9.31169,-45.0272 -17.0582,-66.2288l-67.6584 -15.8236c-1.42849,-0.334869 -2.86758,-0.470512 -4.33952,-0.402691 -13.9946,0.640066 -92.4705,4.71678 -166.073,18.4538 -26.3148,4.92024 -43.3412,11.6303 -54.3844,18.4867 -10.9956,-6.30741 -23.7185,-9.93692 -37.3125,-9.93692 -13.6279,0 -26.3794,3.64647 -37.3919,9.98779 -11.039,-6.87329 -28.0877,-13.6078 -54.4671,-18.5375 -72.9686,-13.6184 -152.425,-17.8138 -166.135,-18.4538 -1.38822,-0.0678216 -2.73936,0.0582842 -4.09261,0.376198l-67.5376 15.8162c-7.76133,21.2165 -13.5177,43.3698 -17.0624,66.2649l79.7232 1.80999c5.1502,0.116568 9.58086,3.65919 10.7773,8.67586 7.72424,32.4018 30.8281,83.0475 99.862,83.0475 35.6455,0 71.0166,-2.26143 95.0255,-24.3903 22.8082,-21.0194 36.8822,-41.2323 42.4966,-76.6882 5.34519,-3.70475 11.7957,-5.92167 18.8025,-5.92167 6.93158,0 13.3121,2.17347 18.6255,5.80828 5.5974,35.5258 19.6863,55.7599 42.5135,76.8016 24.012,22.1289 59.3799,24.3903 95.0276,24.3903 60.3485,0 89.2023,-58.4993 98.3519,-81.955 2.26778,-5.821 7.86518,-9.66564 14.1058,-9.80658l78.2015 -1.77396z\" />\n <path id=\"_258515592\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M450.057 339.132c17.4407,0 33.2718,5.6631 45.1798,14.8603 -10.2729,-13.4138 -26.4038,-22.1024 -44.6054,-22.1024 -17.2235,0 -32.6222,7.76663 -42.9279,19.965 11.5307,-7.94572 26.2745,-12.7229 42.3535,-12.7229z\" />\n <path id=\"_258515520\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M410.435 364.515c0,0 6.9072,42.8802 -31.6589,82.3079 0,0 36.63,-28.5094 42.593,-65.4044 7.97222,-49.2893 -46.9092,-57.4703 -46.9092,-57.4703 0,0 31.3696,7.94254 35.9751,40.5668z\" />\n <path id=\"_258515184\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M492.553 364.515c0,0 -6.90826,42.8802 31.6578,82.3079 0,0 -36.63,-28.5094 -42.593,-65.4044 -7.96798,-49.2893 46.9092,-57.4703 46.9092,-57.4703 0,0 -31.3696,7.94254 -35.9741,40.5668z\" />\n <path id=\"_258515160\" fill=\"#CBA96B\" fill-rule=\"nonzero\" d=\"M188.23 665.933c17.7089,39.6385 -18.9233,142.158 -18.9233,142.158 0,0 115.812,-69.4928 177.475,-60.7925l-183.871 -122.549c0,0 16.2814,16.8643 25.3186,41.1836z\" />\n <path id=\"_258514632\" fill=\"#CBA96B\" fill-rule=\"nonzero\" d=\"M63.5965 269.786c0,0 -52.8637,99.5451 -63.5965,202.805 0,0 47.9064,27.7358 58.601,-17.1408 11.9366,-50.0756 2.16393,-110.872 17.7184,-166.98 15.5513,-56.1118 -12.7229,-18.6838 -12.7229,-18.6838z\" />\n <path id=\"_258513552\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M66.4885 532.215c-8.90158,0 -16.8664,-6.26184 -18.6859,-15.3277 -5.49249,-27.3597 -8.27847,-55.5056 -8.27847,-83.6611 0,-26.7556 2.51894,-53.5409 7.48687,-79.6066 1.97318,-10.3534 11.9567,-17.1461 22.3144,-15.174 10.3492,1.97742 17.1398,11.9642 15.1677,22.3186 -4.51967,23.7153 -6.80971,48.0982 -6.80971,72.4621 0,25.6397 2.53271,51.2593 7.5282,76.152 2.07704,10.3301 -4.61717,20.3867 -14.9472,22.4585 -1.26742,0.255391 -2.53059,0.378317 -3.77575,0.378317z\" />\n <path id=\"_258513720\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M834.909 532.215c-1.2494,0 -2.51576,-0.122927 -3.77258,-0.378317 -10.3396,-2.07174 -17.0338,-12.1284 -14.9525,-22.4585 4.98913,-24.9001 7.53138,-50.5175 7.53138,-76.152 0,-24.3755 -2.29322,-48.7563 -6.81289,-72.4621 -1.97742,-10.3523 4.81851,-20.3412 15.1655,-22.3154 10.365,-1.99226 20.3465,4.81533 22.3144,15.1708 4.97323,26.0541 7.48899,52.8383 7.48899,79.6066 0,28.1481 -2.7828,56.294 -8.27529,83.6611 -1.82482,9.06372 -9.78538,15.3277 -18.687,15.3277z\" />\n <path id=\"_258513864\" fill=\"#2F3033\" fill-rule=\"nonzero\" d=\"M700.271 792.515c-8.44803,0 -16.8187,-3.72701 -22.4691,-10.8695 -9.80658,-12.3955 -7.70305,-30.3947 4.69241,-40.197 5.70867,-4.51437 11.3665,-9.25553 16.8251,-14.0857 11.8306,-10.4763 29.9146,-9.37421 40.3984,2.45323 10.4763,11.8317 9.38163,29.9167 -2.45535,40.3952 -6.24065,5.53594 -12.7282,10.9617 -19.2592,16.1309 -5.25511,4.15195 -11.5191,6.17282 -17.7322,6.17282z\" />\n <path id=\"_258514920\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M755.671 188.913c0,0 -11.9313,-19.0769 -17.8879,-26.5331 -11.0486,2.67153 -32.069,7.57482 -43.3507,9.61265 -0.0264928,0.00741799 -0.0508662,0.00741799 -0.077359,0.0169554 -5.57091,1.00249 -11.1768,1.92656 -16.8081,2.77327 -0.163196,0.0243734 -0.317914,0.0413288 -0.470512,0.0678216 -5.50521,0.812799 -11.0252,1.56731 -16.5813,2.23493 -0.690932,0.084777 -1.39458,0.135643 -2.09611,0.22042 -5.01456,0.581782 -10.0387,1.13071 -15.0977,1.58427 -1.63514,0.145181 -3.28723,0.229958 -4.92024,0.36878 -4.13394,0.33275 -8.26788,0.677156 -12.4294,0.931487 -2.875,0.172733 -5.76907,0.25751 -8.65149,0.385735 -2.94494,0.138822 -5.88034,0.308376 -8.8433,0.402691 -5.85385,0.169554 -11.7331,0.25751 -17.6304,0.25751 -6.52889,0 -13.0186,-0.14624 -19.4966,-0.359242 -2.67153,-0.0868964 -5.33247,-0.206644 -8.00189,-0.317914 -4.73797,-0.188629 -9.46853,-0.530916 -14.2023,-0.829755 -0.885919,-0.0604036 -1.77608,-0.11127 -2.662,-0.171673 -6.37523,-0.488527 -12.7197,-1.07773 -19.0399,-1.7623 -1.5387,-0.171673 -3.06681,-0.361362 -4.59809,-0.540453 -5.12583,-0.5892 -10.2453,-1.26636 -15.3552,-2.0018 -1.43061,-0.206644 -2.86228,-0.393153 -4.28654,-0.609335 -6.318,-0.95798 -12.6085,-2.00074 -18.8586,-3.15582 -0.545752,-0.104912 -1.08409,-0.216181 -1.6256,-0.325332 -5.39076,-1.07031 -10.7963,-2.10565 -16.168,-3.29676 -1.79303,-0.393153 -3.59031,-0.786307 -5.37804,-1.19853 -12.5247,-2.84851 -24.8979,-6.10924 -37.1016,-9.76525 -3.2459,-0.965398 -6.46319,-2.01133 -9.75995,-2.85804 -3.20245,-0.822337 -6.32754,-1.87569 -9.3721,-3.17596 -0.837173,-0.359242 -1.71991,-0.606155 -2.58676,-0.907114 -6.19402,-2.13108 -12.3393,-4.35542 -18.439,-6.68467 -0.69835,-0.263868 -1.38716,-0.547871 -2.08657,-0.812799 -5.51686,-2.13214 -10.9924,-4.34058 -16.4245,-6.63274 -0.715306,-0.300958 -1.43167,-0.592379 -2.14486,-0.890158 -12.0065,-5.11947 -23.8054,-10.6395 -35.388,-16.5273 -0.707888,-0.359242 -1.42107,-0.728022 -2.13002,-1.08726 -11.6017,-5.96512 -22.9777,-12.3001 -34.1121,-19.0017 -0.545752,-0.324272 -1.08832,-0.657022 -1.63196,-0.984473 -5.51474,-3.34551 -10.9807,-6.76944 -16.3768,-10.2866l0 0c-36.7,-23.9665 -70.545,-51.9344 -100.87,-83.339 -3.40168,16.6142 -14.4672,85.7424 23.4006,138.715l0 0.00741799 0.00211942 0c0,0 0.00529856,0.00953741 0.00741799,0.00953741 0.632648,0.890158 1.32252,1.74747 1.97954,2.62809 0.684574,0.907114 1.3416,1.82165 2.0569,2.72134 0.483229,0.599797 1.01203,1.189 1.51009,1.78879 0.950562,1.14767 1.88205,2.3017 2.88454,3.43241 0.594499,0.667619 1.24198,1.30768 1.84814,1.97742 0.963278,1.03428 1.90006,2.07916 2.91209,3.08906 1.01414,1.0258 2.09823,2.02829 3.16112,3.02972 0.666559,0.624171 1.29815,1.26636 1.97954,1.89265 1.04594,0.948443 2.16605,1.86615 3.25862,2.79022 0.766172,0.640066 1.49207,1.30768 2.27732,1.94033 0.849889,0.694112 1.76654,1.35431 2.63974,2.02087 1.1021,0.84671 2.16923,1.70402 3.30948,2.52635 0.667619,0.487468 1.38504,0.941025 2.06962,1.41154 1.41154,0.982353 2.81142,1.97742 4.29183,2.91845 0.999309,0.650663 2.06962,1.25046 3.10284,1.87357 1.23033,0.754515 2.42356,1.51645 3.69734,2.23387 0.505483,0.291421 1.05547,0.556349 1.56731,0.840352 4.23355,2.33561 8.66421,4.57054 13.3831,6.63274 1.22503,0.530916 2.52317,1.0258 3.77787,1.54082 1.46452,0.598737 2.89619,1.22291 4.4084,1.78773 0.841412,0.325332 1.74429,0.609335 2.60053,0.917711 1.99862,0.717425 3.98876,1.45287 6.06791,2.11942 0.549991,0.189689 1.14767,0.345466 1.70508,0.51502 8.45332,2.65352 17.5287,4.92978 27.3575,6.70056 3.49599,0.633708 7.07994,1.20807 10.7529,1.72097 13.9628,1.93503 29.2078,3.01276 45.9534,3.01276 4.96157,0 9.7875,-0.0243734 14.552,-0.0678216 53.9309,-0.460975 95.3752,-3.3116 129.213,-4.20176 0.0233137,0 0.0508662,0 0.0720604,-0.0105971l0.00529856 0c1.39988,-0.10915 2.95766,-0.237376 4.53875,-0.365601 0.631589,-0.0508662 1.3151,-0.104912 1.97742,-0.155778 1.28331,-0.101732 2.63762,-0.213002 4.02055,-0.314735 0.720604,-0.0614633 1.43803,-0.11233 2.18301,-0.163196 1.74747,-0.137763 3.57123,-0.267047 5.45434,-0.395273 0.391034,-0.0243734 0.747097,-0.0582842 1.14555,-0.084777 2.16605,-0.14624 4.44655,-0.281883 6.7758,-0.419646 0.827635,-0.0508662 1.68388,-0.0953741 2.53059,-0.14624 1.65951,-0.084777 3.35823,-0.179091 5.0951,-0.25645 0.967517,-0.0508662 1.94563,-0.092195 2.93752,-0.135643 1.92444,-0.0858367 3.90398,-0.163196 5.91002,-0.231017 0.784187,-0.0264928 1.54082,-0.0604036 2.33455,-0.077359 2.66094,-0.084777 5.39606,-0.14624 8.17886,-0.197106 1.04806,-0.0169554 2.13214,-0.0169554 3.19927,-0.0339108 1.90536,-0.0264928 3.83404,-0.0339108 5.78921,-0.0339108 1.23033,-0.00953741 2.46701,0 3.71641,0.00741799 2.02087,0.00953741 4.06612,0.0339108 6.12938,0.0678216 1.12965,0.0169554 2.24129,0.0264928 3.38896,0.0540453 3.01276,0.0752396 6.06791,0.169554 9.15909,0.297779 1.17098,0.0508662 2.36952,0.118688 3.55851,0.172733 2.1332,0.101732 4.28018,0.22042 6.45365,0.359242 1.37127,0.0752396 2.74889,0.169554 4.13394,0.273406 2.16711,0.152599 4.35754,0.325332 6.55538,0.511841 1.26954,0.104912 2.52635,0.206644 3.80225,0.325332 78.1856,7.31943 143.473,20.2341 180.576,119.988 0.162136,-0.0243734 -0.0604036,0.00953741 0.101732,-0.00741799 -1.32676,-47.3999 -18.0162,-100.661 -34.5095,-132.356z\" />\n <path id=\"_258514728\" fill=\"#CBA96B\" fill-rule=\"nonzero\" d=\"M166.531 125.26c-6.82137,6.44411 -13.0641,13.1712 -19.3896,19.4288 -4.55888,4.32257 -8.25834,9.23645 -12.2111,13.736 -3.88385,4.5716 -7.68291,9.04041 -11.3834,13.3884 -6.99622,9.02769 -13.3068,17.8615 -19.4182,26.035 -5.61648,8.51585 -10.578,16.6894 -15.3287,24.154 -2.45747,3.66131 -4.41794,7.48051 -6.31271,11.11 -1.91172,3.62634 -3.73866,7.07676 -5.466,10.364 -7.32049,13.1383 -11.2775,23.5023 -14.5424,30.5557 -3.12721,7.05239 -4.79732,10.8175 -4.79732,10.8175 -0.062523,0.155778 -0.137763,0.334869 -0.198166,0.498065 -1.86403,4.92978 0.623111,10.4318 5.55607,12.298 4.9319,1.85768 10.4371,-0.633708 12.3001,-5.56349 0,0 1.45287,-3.85311 4.17739,-11.0655 2.85592,-7.10431 6.29363,-18.2228 12.6477,-30.4794 1.50267,-3.159 3.08906,-6.47802 4.74645,-9.97189 1.64149,-3.50129 3.32538,-7.17213 5.56243,-10.8186 4.27276,-7.36818 8.72249,-15.4474 13.7975,-23.905 5.57303,-8.11316 11.3135,-16.9194 17.7237,-25.9502 3.47374,-4.32257 7.03119,-8.74793 10.6798,-13.2824 3.71641,-4.46881 7.18591,-9.34772 11.5021,-13.6449 4.52709,-4.69664 9.01073,-9.67093 13.7127,-14.6007 -1.28861,-4.48364 -2.40873,-8.89205 -3.35823,-13.1033z\" />\n </g>\n </g>\n </svg>\n <a href=\"https://www.{{ this.appConfig['appDomain'] }}\" target=\"_blank\" title=\"{{ this.appConfig['appName'] | titlecase }}\" rel=\"noopener\">{{ this.appConfig['appDomain'] | titlecase }}</a>\n </div>\n</div>\n", styles: [".sd_container_widget_footer{position:absolute;bottom:0;width:100%;height:28px;background:var(--sd-background-color)}.sd_container_widget_footer_inner{display:flex;align-items:center;justify-content:center;vertical-align:middle;gap:5px;padding:.2em;font-size:.85em;font-family:var(--sd-text-font-family);color:var(--sd-text-color-light);direction:ltr;text-decoration:none;-webkit-box-pack:center;-webkit-box-align:end}.sd_container_widget_footer_inner a{color:var(--sd-text-color-light);text-decoration:none;transition:background-color .3s ease,color .3s ease}.sd_container_widget_footer_inner a:hover{color:var(--sd-text-color-dark);text-decoration:underline}\n"], dependencies: [{ kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }] });
43
+ appConfig = SnugdeskAppConfig;
44
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
45
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: FooterComponent, isStandalone: false, selector: "sd-app-footer", ngImport: i0, template: "<div class=\"sd_container_widget_footer\">\n <div class=\"sd_container_widget_footer_inner\"><span>Powered by</span>\n <svg width=\"16px\" shape-rendering=\"geometricPrecision\" text-rendering=\"geometricPrecision\" image-rendering=\"optimizeQuality\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" viewBox=\"0 0 877.098 808.09\">\n <g id=\"Layer_x0020_1\">\n <metadata id=\"CorelCorpID_0Corel-Layer\" />\n <g id=\"_258513600\">\n <path id=\"_258516096\" fill=\"#CBA96B\" fill-rule=\"nonzero\" d=\"M637.653 218.973c-109.109,-5.73516 -241.809,27.9446 -336.907,14.3602 -52.1167,-7.44554 -85.2507,-24.8291 -102.132,-36.1086 -57.8931,61.7431 -93.4412,144.67 -93.4412,235.995 0,171.801 125.437,314.25 289.707,340.911 -8.09408,-36.1447 -12.5046,-73.6839 -12.5046,-112.274 0,-189.17 102.668,-354.272 255.277,-442.882z\" />\n <path id=\"_258516024\" fill=\"#FAE5C5\" fill-rule=\"nonzero\" d=\"M778.919 331.111c0,0 -0.795844,-6.58187 -3.83616,-16.5262 -2.95236,-8.04746 -6.16964,-15.955 -9.68789,-23.7089 -15.0903,-29.1696 -46.4069,-64.5259 -110.487,-70.6637 -5.67476,-0.538334 -11.4438,-0.931487 -17.2553,-1.23986 -152.609,88.61 -255.277,253.712 -255.277,442.882 0,38.5905 4.41052,76.1297 12.5046,112.274 18.155,2.95342 36.7635,4.54405 55.7504,4.54405 190.788,0 345.456,-154.667 345.456,-345.455 0,-36.1033 -5.58044,-70.8873 -15.8766,-103.59 -0.812799,0.942084 -1.29073,1.48254 -1.29073,1.48254z\" />\n <path id=\"_258515952\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M718.294 758.328c-2.63444,0 -5.25511,-1.08726 -7.14458,-3.21411 -3.49387,-3.94743 -3.12509,-9.97401 0.819158,-13.4658 65.9724,-58.4336 110.727,-134.554 129.411,-220.127 1.1233,-5.15126 6.21627,-8.39928 11.3601,-7.28658 5.14278,1.12647 8.40352,6.20885 7.28234,11.3569 -19.557,89.5542 -66.3836,169.202 -135.403,230.332 -1.81317,1.60864 -4.07353,2.40449 -6.32542,2.40449z\" />\n <path id=\"_258515880\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M846.577 557.445c-1.40412,0 -2.83367,-0.181211 -4.25474,-0.555289 -8.91854,-2.3462 -14.2415,-11.4735 -11.9059,-20.3942 8.82422,-33.5198 13.3004,-68.2667 13.3004,-103.269 0,-9.21738 7.47309,-16.6926 16.6915,-16.6926 9.21738,0 16.6905,7.47521 16.6905,16.6926 0,37.8699 -4.83547,75.4727 -14.3877,111.768 -1.97001,7.49217 -8.73203,12.4506 -16.1341,12.4506z\" />\n <path id=\"_258515808\" fill=\"#F7AB54\" fill-rule=\"nonzero\" d=\"M532.463 51.2668c-26.5225,-4.561 -53.5261,-9.03723 -81.5311,-9.03723 -6.4971,0 -12.9486,0.180151 -19.3652,0.504423l0 0.0169554c-0.116568,0 -0.240555,0 -0.357123,0 -130.335,0 -188.497,-1.54718 -257.657,-42.7509 0,0 -0.329571,1.31722 -0.822337,3.71429 105.693,109.444 253.934,177.522 418.097,177.522 47.2367,0 97.7691,-5.74258 146.957,-18.847 -36.3757,-51.8856 -112.688,-95.2088 -205.32,-111.122z\" />\n <path id=\"_258515736\" fill=\"#2F3033\" fill-rule=\"nonzero\" d=\"M450.631 674.55c-105.869,0 -197.899,-65.1882 -228.997,-162.207 -3.11979,-9.71968 2.56768,-20.0233 12.7017,-23.017 10.134,-3.00111 20.8689,2.47231 23.9845,12.1909 26.1177,81.4633 103.4,136.2 192.311,136.2 88.9109,0 166.199,-54.7363 192.311,-136.2 3.11555,-9.72604 13.8494,-15.192 23.9834,-12.1909 10.134,2.99369 15.8257,13.2973 12.7007,23.017 -31.0962,97.0188 -123.128,162.207 -228.995,162.207z\" />\n <path id=\"_258515664\" fill=\"#2F3033\" fill-rule=\"nonzero\" d=\"M797.457 379.399c-3.54474,-22.8781 -9.31169,-45.0272 -17.0582,-66.2288l-67.6584 -15.8236c-1.42849,-0.334869 -2.86758,-0.470512 -4.33952,-0.402691 -13.9946,0.640066 -92.4705,4.71678 -166.073,18.4538 -26.3148,4.92024 -43.3412,11.6303 -54.3844,18.4867 -10.9956,-6.30741 -23.7185,-9.93692 -37.3125,-9.93692 -13.6279,0 -26.3794,3.64647 -37.3919,9.98779 -11.039,-6.87329 -28.0877,-13.6078 -54.4671,-18.5375 -72.9686,-13.6184 -152.425,-17.8138 -166.135,-18.4538 -1.38822,-0.0678216 -2.73936,0.0582842 -4.09261,0.376198l-67.5376 15.8162c-7.76133,21.2165 -13.5177,43.3698 -17.0624,66.2649l79.7232 1.80999c5.1502,0.116568 9.58086,3.65919 10.7773,8.67586 7.72424,32.4018 30.8281,83.0475 99.862,83.0475 35.6455,0 71.0166,-2.26143 95.0255,-24.3903 22.8082,-21.0194 36.8822,-41.2323 42.4966,-76.6882 5.34519,-3.70475 11.7957,-5.92167 18.8025,-5.92167 6.93158,0 13.3121,2.17347 18.6255,5.80828 5.5974,35.5258 19.6863,55.7599 42.5135,76.8016 24.012,22.1289 59.3799,24.3903 95.0276,24.3903 60.3485,0 89.2023,-58.4993 98.3519,-81.955 2.26778,-5.821 7.86518,-9.66564 14.1058,-9.80658l78.2015 -1.77396z\" />\n <path id=\"_258515592\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M450.057 339.132c17.4407,0 33.2718,5.6631 45.1798,14.8603 -10.2729,-13.4138 -26.4038,-22.1024 -44.6054,-22.1024 -17.2235,0 -32.6222,7.76663 -42.9279,19.965 11.5307,-7.94572 26.2745,-12.7229 42.3535,-12.7229z\" />\n <path id=\"_258515520\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M410.435 364.515c0,0 6.9072,42.8802 -31.6589,82.3079 0,0 36.63,-28.5094 42.593,-65.4044 7.97222,-49.2893 -46.9092,-57.4703 -46.9092,-57.4703 0,0 31.3696,7.94254 35.9751,40.5668z\" />\n <path id=\"_258515184\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M492.553 364.515c0,0 -6.90826,42.8802 31.6578,82.3079 0,0 -36.63,-28.5094 -42.593,-65.4044 -7.96798,-49.2893 46.9092,-57.4703 46.9092,-57.4703 0,0 -31.3696,7.94254 -35.9741,40.5668z\" />\n <path id=\"_258515160\" fill=\"#CBA96B\" fill-rule=\"nonzero\" d=\"M188.23 665.933c17.7089,39.6385 -18.9233,142.158 -18.9233,142.158 0,0 115.812,-69.4928 177.475,-60.7925l-183.871 -122.549c0,0 16.2814,16.8643 25.3186,41.1836z\" />\n <path id=\"_258514632\" fill=\"#CBA96B\" fill-rule=\"nonzero\" d=\"M63.5965 269.786c0,0 -52.8637,99.5451 -63.5965,202.805 0,0 47.9064,27.7358 58.601,-17.1408 11.9366,-50.0756 2.16393,-110.872 17.7184,-166.98 15.5513,-56.1118 -12.7229,-18.6838 -12.7229,-18.6838z\" />\n <path id=\"_258513552\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M66.4885 532.215c-8.90158,0 -16.8664,-6.26184 -18.6859,-15.3277 -5.49249,-27.3597 -8.27847,-55.5056 -8.27847,-83.6611 0,-26.7556 2.51894,-53.5409 7.48687,-79.6066 1.97318,-10.3534 11.9567,-17.1461 22.3144,-15.174 10.3492,1.97742 17.1398,11.9642 15.1677,22.3186 -4.51967,23.7153 -6.80971,48.0982 -6.80971,72.4621 0,25.6397 2.53271,51.2593 7.5282,76.152 2.07704,10.3301 -4.61717,20.3867 -14.9472,22.4585 -1.26742,0.255391 -2.53059,0.378317 -3.77575,0.378317z\" />\n <path id=\"_258513720\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M834.909 532.215c-1.2494,0 -2.51576,-0.122927 -3.77258,-0.378317 -10.3396,-2.07174 -17.0338,-12.1284 -14.9525,-22.4585 4.98913,-24.9001 7.53138,-50.5175 7.53138,-76.152 0,-24.3755 -2.29322,-48.7563 -6.81289,-72.4621 -1.97742,-10.3523 4.81851,-20.3412 15.1655,-22.3154 10.365,-1.99226 20.3465,4.81533 22.3144,15.1708 4.97323,26.0541 7.48899,52.8383 7.48899,79.6066 0,28.1481 -2.7828,56.294 -8.27529,83.6611 -1.82482,9.06372 -9.78538,15.3277 -18.687,15.3277z\" />\n <path id=\"_258513864\" fill=\"#2F3033\" fill-rule=\"nonzero\" d=\"M700.271 792.515c-8.44803,0 -16.8187,-3.72701 -22.4691,-10.8695 -9.80658,-12.3955 -7.70305,-30.3947 4.69241,-40.197 5.70867,-4.51437 11.3665,-9.25553 16.8251,-14.0857 11.8306,-10.4763 29.9146,-9.37421 40.3984,2.45323 10.4763,11.8317 9.38163,29.9167 -2.45535,40.3952 -6.24065,5.53594 -12.7282,10.9617 -19.2592,16.1309 -5.25511,4.15195 -11.5191,6.17282 -17.7322,6.17282z\" />\n <path id=\"_258514920\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M755.671 188.913c0,0 -11.9313,-19.0769 -17.8879,-26.5331 -11.0486,2.67153 -32.069,7.57482 -43.3507,9.61265 -0.0264928,0.00741799 -0.0508662,0.00741799 -0.077359,0.0169554 -5.57091,1.00249 -11.1768,1.92656 -16.8081,2.77327 -0.163196,0.0243734 -0.317914,0.0413288 -0.470512,0.0678216 -5.50521,0.812799 -11.0252,1.56731 -16.5813,2.23493 -0.690932,0.084777 -1.39458,0.135643 -2.09611,0.22042 -5.01456,0.581782 -10.0387,1.13071 -15.0977,1.58427 -1.63514,0.145181 -3.28723,0.229958 -4.92024,0.36878 -4.13394,0.33275 -8.26788,0.677156 -12.4294,0.931487 -2.875,0.172733 -5.76907,0.25751 -8.65149,0.385735 -2.94494,0.138822 -5.88034,0.308376 -8.8433,0.402691 -5.85385,0.169554 -11.7331,0.25751 -17.6304,0.25751 -6.52889,0 -13.0186,-0.14624 -19.4966,-0.359242 -2.67153,-0.0868964 -5.33247,-0.206644 -8.00189,-0.317914 -4.73797,-0.188629 -9.46853,-0.530916 -14.2023,-0.829755 -0.885919,-0.0604036 -1.77608,-0.11127 -2.662,-0.171673 -6.37523,-0.488527 -12.7197,-1.07773 -19.0399,-1.7623 -1.5387,-0.171673 -3.06681,-0.361362 -4.59809,-0.540453 -5.12583,-0.5892 -10.2453,-1.26636 -15.3552,-2.0018 -1.43061,-0.206644 -2.86228,-0.393153 -4.28654,-0.609335 -6.318,-0.95798 -12.6085,-2.00074 -18.8586,-3.15582 -0.545752,-0.104912 -1.08409,-0.216181 -1.6256,-0.325332 -5.39076,-1.07031 -10.7963,-2.10565 -16.168,-3.29676 -1.79303,-0.393153 -3.59031,-0.786307 -5.37804,-1.19853 -12.5247,-2.84851 -24.8979,-6.10924 -37.1016,-9.76525 -3.2459,-0.965398 -6.46319,-2.01133 -9.75995,-2.85804 -3.20245,-0.822337 -6.32754,-1.87569 -9.3721,-3.17596 -0.837173,-0.359242 -1.71991,-0.606155 -2.58676,-0.907114 -6.19402,-2.13108 -12.3393,-4.35542 -18.439,-6.68467 -0.69835,-0.263868 -1.38716,-0.547871 -2.08657,-0.812799 -5.51686,-2.13214 -10.9924,-4.34058 -16.4245,-6.63274 -0.715306,-0.300958 -1.43167,-0.592379 -2.14486,-0.890158 -12.0065,-5.11947 -23.8054,-10.6395 -35.388,-16.5273 -0.707888,-0.359242 -1.42107,-0.728022 -2.13002,-1.08726 -11.6017,-5.96512 -22.9777,-12.3001 -34.1121,-19.0017 -0.545752,-0.324272 -1.08832,-0.657022 -1.63196,-0.984473 -5.51474,-3.34551 -10.9807,-6.76944 -16.3768,-10.2866l0 0c-36.7,-23.9665 -70.545,-51.9344 -100.87,-83.339 -3.40168,16.6142 -14.4672,85.7424 23.4006,138.715l0 0.00741799 0.00211942 0c0,0 0.00529856,0.00953741 0.00741799,0.00953741 0.632648,0.890158 1.32252,1.74747 1.97954,2.62809 0.684574,0.907114 1.3416,1.82165 2.0569,2.72134 0.483229,0.599797 1.01203,1.189 1.51009,1.78879 0.950562,1.14767 1.88205,2.3017 2.88454,3.43241 0.594499,0.667619 1.24198,1.30768 1.84814,1.97742 0.963278,1.03428 1.90006,2.07916 2.91209,3.08906 1.01414,1.0258 2.09823,2.02829 3.16112,3.02972 0.666559,0.624171 1.29815,1.26636 1.97954,1.89265 1.04594,0.948443 2.16605,1.86615 3.25862,2.79022 0.766172,0.640066 1.49207,1.30768 2.27732,1.94033 0.849889,0.694112 1.76654,1.35431 2.63974,2.02087 1.1021,0.84671 2.16923,1.70402 3.30948,2.52635 0.667619,0.487468 1.38504,0.941025 2.06962,1.41154 1.41154,0.982353 2.81142,1.97742 4.29183,2.91845 0.999309,0.650663 2.06962,1.25046 3.10284,1.87357 1.23033,0.754515 2.42356,1.51645 3.69734,2.23387 0.505483,0.291421 1.05547,0.556349 1.56731,0.840352 4.23355,2.33561 8.66421,4.57054 13.3831,6.63274 1.22503,0.530916 2.52317,1.0258 3.77787,1.54082 1.46452,0.598737 2.89619,1.22291 4.4084,1.78773 0.841412,0.325332 1.74429,0.609335 2.60053,0.917711 1.99862,0.717425 3.98876,1.45287 6.06791,2.11942 0.549991,0.189689 1.14767,0.345466 1.70508,0.51502 8.45332,2.65352 17.5287,4.92978 27.3575,6.70056 3.49599,0.633708 7.07994,1.20807 10.7529,1.72097 13.9628,1.93503 29.2078,3.01276 45.9534,3.01276 4.96157,0 9.7875,-0.0243734 14.552,-0.0678216 53.9309,-0.460975 95.3752,-3.3116 129.213,-4.20176 0.0233137,0 0.0508662,0 0.0720604,-0.0105971l0.00529856 0c1.39988,-0.10915 2.95766,-0.237376 4.53875,-0.365601 0.631589,-0.0508662 1.3151,-0.104912 1.97742,-0.155778 1.28331,-0.101732 2.63762,-0.213002 4.02055,-0.314735 0.720604,-0.0614633 1.43803,-0.11233 2.18301,-0.163196 1.74747,-0.137763 3.57123,-0.267047 5.45434,-0.395273 0.391034,-0.0243734 0.747097,-0.0582842 1.14555,-0.084777 2.16605,-0.14624 4.44655,-0.281883 6.7758,-0.419646 0.827635,-0.0508662 1.68388,-0.0953741 2.53059,-0.14624 1.65951,-0.084777 3.35823,-0.179091 5.0951,-0.25645 0.967517,-0.0508662 1.94563,-0.092195 2.93752,-0.135643 1.92444,-0.0858367 3.90398,-0.163196 5.91002,-0.231017 0.784187,-0.0264928 1.54082,-0.0604036 2.33455,-0.077359 2.66094,-0.084777 5.39606,-0.14624 8.17886,-0.197106 1.04806,-0.0169554 2.13214,-0.0169554 3.19927,-0.0339108 1.90536,-0.0264928 3.83404,-0.0339108 5.78921,-0.0339108 1.23033,-0.00953741 2.46701,0 3.71641,0.00741799 2.02087,0.00953741 4.06612,0.0339108 6.12938,0.0678216 1.12965,0.0169554 2.24129,0.0264928 3.38896,0.0540453 3.01276,0.0752396 6.06791,0.169554 9.15909,0.297779 1.17098,0.0508662 2.36952,0.118688 3.55851,0.172733 2.1332,0.101732 4.28018,0.22042 6.45365,0.359242 1.37127,0.0752396 2.74889,0.169554 4.13394,0.273406 2.16711,0.152599 4.35754,0.325332 6.55538,0.511841 1.26954,0.104912 2.52635,0.206644 3.80225,0.325332 78.1856,7.31943 143.473,20.2341 180.576,119.988 0.162136,-0.0243734 -0.0604036,0.00953741 0.101732,-0.00741799 -1.32676,-47.3999 -18.0162,-100.661 -34.5095,-132.356z\" />\n <path id=\"_258514728\" fill=\"#CBA96B\" fill-rule=\"nonzero\" d=\"M166.531 125.26c-6.82137,6.44411 -13.0641,13.1712 -19.3896,19.4288 -4.55888,4.32257 -8.25834,9.23645 -12.2111,13.736 -3.88385,4.5716 -7.68291,9.04041 -11.3834,13.3884 -6.99622,9.02769 -13.3068,17.8615 -19.4182,26.035 -5.61648,8.51585 -10.578,16.6894 -15.3287,24.154 -2.45747,3.66131 -4.41794,7.48051 -6.31271,11.11 -1.91172,3.62634 -3.73866,7.07676 -5.466,10.364 -7.32049,13.1383 -11.2775,23.5023 -14.5424,30.5557 -3.12721,7.05239 -4.79732,10.8175 -4.79732,10.8175 -0.062523,0.155778 -0.137763,0.334869 -0.198166,0.498065 -1.86403,4.92978 0.623111,10.4318 5.55607,12.298 4.9319,1.85768 10.4371,-0.633708 12.3001,-5.56349 0,0 1.45287,-3.85311 4.17739,-11.0655 2.85592,-7.10431 6.29363,-18.2228 12.6477,-30.4794 1.50267,-3.159 3.08906,-6.47802 4.74645,-9.97189 1.64149,-3.50129 3.32538,-7.17213 5.56243,-10.8186 4.27276,-7.36818 8.72249,-15.4474 13.7975,-23.905 5.57303,-8.11316 11.3135,-16.9194 17.7237,-25.9502 3.47374,-4.32257 7.03119,-8.74793 10.6798,-13.2824 3.71641,-4.46881 7.18591,-9.34772 11.5021,-13.6449 4.52709,-4.69664 9.01073,-9.67093 13.7127,-14.6007 -1.28861,-4.48364 -2.40873,-8.89205 -3.35823,-13.1033z\" />\n </g>\n </g>\n </svg>\n <a href=\"https://www.{{ this.appConfig['appDomain'] }}\" target=\"_blank\" title=\"{{ this.appConfig['appName'] | titlecase }}\" rel=\"noopener\">{{ this.appConfig['appDomain'] | titlecase }}</a>\n </div>\n</div>\n", styles: [".sd_container_widget_footer{position:absolute;bottom:0;width:100%;height:28px;background:var(--sd-background-color)}.sd_container_widget_footer_inner{display:flex;align-items:center;justify-content:center;vertical-align:middle;gap:5px;padding:.2em;font-size:.85em;font-family:var(--sd-text-font-family);color:var(--sd-text-color-light);direction:ltr;text-decoration:none;-webkit-box-pack:center;-webkit-box-align:end}.sd_container_widget_footer_inner a{color:var(--sd-text-color-light);text-decoration:none;transition:background-color .3s ease,color .3s ease}.sd_container_widget_footer_inner a:hover{color:var(--sd-text-color-dark);text-decoration:underline}\n"], dependencies: [{ kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }] });
34
46
  }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: FooterComponent, decorators: [{
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FooterComponent, decorators: [{
36
48
  type: Component,
37
49
  args: [{ selector: 'sd-app-footer', standalone: false, template: "<div class=\"sd_container_widget_footer\">\n <div class=\"sd_container_widget_footer_inner\"><span>Powered by</span>\n <svg width=\"16px\" shape-rendering=\"geometricPrecision\" text-rendering=\"geometricPrecision\" image-rendering=\"optimizeQuality\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" viewBox=\"0 0 877.098 808.09\">\n <g id=\"Layer_x0020_1\">\n <metadata id=\"CorelCorpID_0Corel-Layer\" />\n <g id=\"_258513600\">\n <path id=\"_258516096\" fill=\"#CBA96B\" fill-rule=\"nonzero\" d=\"M637.653 218.973c-109.109,-5.73516 -241.809,27.9446 -336.907,14.3602 -52.1167,-7.44554 -85.2507,-24.8291 -102.132,-36.1086 -57.8931,61.7431 -93.4412,144.67 -93.4412,235.995 0,171.801 125.437,314.25 289.707,340.911 -8.09408,-36.1447 -12.5046,-73.6839 -12.5046,-112.274 0,-189.17 102.668,-354.272 255.277,-442.882z\" />\n <path id=\"_258516024\" fill=\"#FAE5C5\" fill-rule=\"nonzero\" d=\"M778.919 331.111c0,0 -0.795844,-6.58187 -3.83616,-16.5262 -2.95236,-8.04746 -6.16964,-15.955 -9.68789,-23.7089 -15.0903,-29.1696 -46.4069,-64.5259 -110.487,-70.6637 -5.67476,-0.538334 -11.4438,-0.931487 -17.2553,-1.23986 -152.609,88.61 -255.277,253.712 -255.277,442.882 0,38.5905 4.41052,76.1297 12.5046,112.274 18.155,2.95342 36.7635,4.54405 55.7504,4.54405 190.788,0 345.456,-154.667 345.456,-345.455 0,-36.1033 -5.58044,-70.8873 -15.8766,-103.59 -0.812799,0.942084 -1.29073,1.48254 -1.29073,1.48254z\" />\n <path id=\"_258515952\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M718.294 758.328c-2.63444,0 -5.25511,-1.08726 -7.14458,-3.21411 -3.49387,-3.94743 -3.12509,-9.97401 0.819158,-13.4658 65.9724,-58.4336 110.727,-134.554 129.411,-220.127 1.1233,-5.15126 6.21627,-8.39928 11.3601,-7.28658 5.14278,1.12647 8.40352,6.20885 7.28234,11.3569 -19.557,89.5542 -66.3836,169.202 -135.403,230.332 -1.81317,1.60864 -4.07353,2.40449 -6.32542,2.40449z\" />\n <path id=\"_258515880\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M846.577 557.445c-1.40412,0 -2.83367,-0.181211 -4.25474,-0.555289 -8.91854,-2.3462 -14.2415,-11.4735 -11.9059,-20.3942 8.82422,-33.5198 13.3004,-68.2667 13.3004,-103.269 0,-9.21738 7.47309,-16.6926 16.6915,-16.6926 9.21738,0 16.6905,7.47521 16.6905,16.6926 0,37.8699 -4.83547,75.4727 -14.3877,111.768 -1.97001,7.49217 -8.73203,12.4506 -16.1341,12.4506z\" />\n <path id=\"_258515808\" fill=\"#F7AB54\" fill-rule=\"nonzero\" d=\"M532.463 51.2668c-26.5225,-4.561 -53.5261,-9.03723 -81.5311,-9.03723 -6.4971,0 -12.9486,0.180151 -19.3652,0.504423l0 0.0169554c-0.116568,0 -0.240555,0 -0.357123,0 -130.335,0 -188.497,-1.54718 -257.657,-42.7509 0,0 -0.329571,1.31722 -0.822337,3.71429 105.693,109.444 253.934,177.522 418.097,177.522 47.2367,0 97.7691,-5.74258 146.957,-18.847 -36.3757,-51.8856 -112.688,-95.2088 -205.32,-111.122z\" />\n <path id=\"_258515736\" fill=\"#2F3033\" fill-rule=\"nonzero\" d=\"M450.631 674.55c-105.869,0 -197.899,-65.1882 -228.997,-162.207 -3.11979,-9.71968 2.56768,-20.0233 12.7017,-23.017 10.134,-3.00111 20.8689,2.47231 23.9845,12.1909 26.1177,81.4633 103.4,136.2 192.311,136.2 88.9109,0 166.199,-54.7363 192.311,-136.2 3.11555,-9.72604 13.8494,-15.192 23.9834,-12.1909 10.134,2.99369 15.8257,13.2973 12.7007,23.017 -31.0962,97.0188 -123.128,162.207 -228.995,162.207z\" />\n <path id=\"_258515664\" fill=\"#2F3033\" fill-rule=\"nonzero\" d=\"M797.457 379.399c-3.54474,-22.8781 -9.31169,-45.0272 -17.0582,-66.2288l-67.6584 -15.8236c-1.42849,-0.334869 -2.86758,-0.470512 -4.33952,-0.402691 -13.9946,0.640066 -92.4705,4.71678 -166.073,18.4538 -26.3148,4.92024 -43.3412,11.6303 -54.3844,18.4867 -10.9956,-6.30741 -23.7185,-9.93692 -37.3125,-9.93692 -13.6279,0 -26.3794,3.64647 -37.3919,9.98779 -11.039,-6.87329 -28.0877,-13.6078 -54.4671,-18.5375 -72.9686,-13.6184 -152.425,-17.8138 -166.135,-18.4538 -1.38822,-0.0678216 -2.73936,0.0582842 -4.09261,0.376198l-67.5376 15.8162c-7.76133,21.2165 -13.5177,43.3698 -17.0624,66.2649l79.7232 1.80999c5.1502,0.116568 9.58086,3.65919 10.7773,8.67586 7.72424,32.4018 30.8281,83.0475 99.862,83.0475 35.6455,0 71.0166,-2.26143 95.0255,-24.3903 22.8082,-21.0194 36.8822,-41.2323 42.4966,-76.6882 5.34519,-3.70475 11.7957,-5.92167 18.8025,-5.92167 6.93158,0 13.3121,2.17347 18.6255,5.80828 5.5974,35.5258 19.6863,55.7599 42.5135,76.8016 24.012,22.1289 59.3799,24.3903 95.0276,24.3903 60.3485,0 89.2023,-58.4993 98.3519,-81.955 2.26778,-5.821 7.86518,-9.66564 14.1058,-9.80658l78.2015 -1.77396z\" />\n <path id=\"_258515592\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M450.057 339.132c17.4407,0 33.2718,5.6631 45.1798,14.8603 -10.2729,-13.4138 -26.4038,-22.1024 -44.6054,-22.1024 -17.2235,0 -32.6222,7.76663 -42.9279,19.965 11.5307,-7.94572 26.2745,-12.7229 42.3535,-12.7229z\" />\n <path id=\"_258515520\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M410.435 364.515c0,0 6.9072,42.8802 -31.6589,82.3079 0,0 36.63,-28.5094 42.593,-65.4044 7.97222,-49.2893 -46.9092,-57.4703 -46.9092,-57.4703 0,0 31.3696,7.94254 35.9751,40.5668z\" />\n <path id=\"_258515184\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M492.553 364.515c0,0 -6.90826,42.8802 31.6578,82.3079 0,0 -36.63,-28.5094 -42.593,-65.4044 -7.96798,-49.2893 46.9092,-57.4703 46.9092,-57.4703 0,0 -31.3696,7.94254 -35.9741,40.5668z\" />\n <path id=\"_258515160\" fill=\"#CBA96B\" fill-rule=\"nonzero\" d=\"M188.23 665.933c17.7089,39.6385 -18.9233,142.158 -18.9233,142.158 0,0 115.812,-69.4928 177.475,-60.7925l-183.871 -122.549c0,0 16.2814,16.8643 25.3186,41.1836z\" />\n <path id=\"_258514632\" fill=\"#CBA96B\" fill-rule=\"nonzero\" d=\"M63.5965 269.786c0,0 -52.8637,99.5451 -63.5965,202.805 0,0 47.9064,27.7358 58.601,-17.1408 11.9366,-50.0756 2.16393,-110.872 17.7184,-166.98 15.5513,-56.1118 -12.7229,-18.6838 -12.7229,-18.6838z\" />\n <path id=\"_258513552\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M66.4885 532.215c-8.90158,0 -16.8664,-6.26184 -18.6859,-15.3277 -5.49249,-27.3597 -8.27847,-55.5056 -8.27847,-83.6611 0,-26.7556 2.51894,-53.5409 7.48687,-79.6066 1.97318,-10.3534 11.9567,-17.1461 22.3144,-15.174 10.3492,1.97742 17.1398,11.9642 15.1677,22.3186 -4.51967,23.7153 -6.80971,48.0982 -6.80971,72.4621 0,25.6397 2.53271,51.2593 7.5282,76.152 2.07704,10.3301 -4.61717,20.3867 -14.9472,22.4585 -1.26742,0.255391 -2.53059,0.378317 -3.77575,0.378317z\" />\n <path id=\"_258513720\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M834.909 532.215c-1.2494,0 -2.51576,-0.122927 -3.77258,-0.378317 -10.3396,-2.07174 -17.0338,-12.1284 -14.9525,-22.4585 4.98913,-24.9001 7.53138,-50.5175 7.53138,-76.152 0,-24.3755 -2.29322,-48.7563 -6.81289,-72.4621 -1.97742,-10.3523 4.81851,-20.3412 15.1655,-22.3154 10.365,-1.99226 20.3465,4.81533 22.3144,15.1708 4.97323,26.0541 7.48899,52.8383 7.48899,79.6066 0,28.1481 -2.7828,56.294 -8.27529,83.6611 -1.82482,9.06372 -9.78538,15.3277 -18.687,15.3277z\" />\n <path id=\"_258513864\" fill=\"#2F3033\" fill-rule=\"nonzero\" d=\"M700.271 792.515c-8.44803,0 -16.8187,-3.72701 -22.4691,-10.8695 -9.80658,-12.3955 -7.70305,-30.3947 4.69241,-40.197 5.70867,-4.51437 11.3665,-9.25553 16.8251,-14.0857 11.8306,-10.4763 29.9146,-9.37421 40.3984,2.45323 10.4763,11.8317 9.38163,29.9167 -2.45535,40.3952 -6.24065,5.53594 -12.7282,10.9617 -19.2592,16.1309 -5.25511,4.15195 -11.5191,6.17282 -17.7322,6.17282z\" />\n <path id=\"_258514920\" fill=\"#EE7738\" fill-rule=\"nonzero\" d=\"M755.671 188.913c0,0 -11.9313,-19.0769 -17.8879,-26.5331 -11.0486,2.67153 -32.069,7.57482 -43.3507,9.61265 -0.0264928,0.00741799 -0.0508662,0.00741799 -0.077359,0.0169554 -5.57091,1.00249 -11.1768,1.92656 -16.8081,2.77327 -0.163196,0.0243734 -0.317914,0.0413288 -0.470512,0.0678216 -5.50521,0.812799 -11.0252,1.56731 -16.5813,2.23493 -0.690932,0.084777 -1.39458,0.135643 -2.09611,0.22042 -5.01456,0.581782 -10.0387,1.13071 -15.0977,1.58427 -1.63514,0.145181 -3.28723,0.229958 -4.92024,0.36878 -4.13394,0.33275 -8.26788,0.677156 -12.4294,0.931487 -2.875,0.172733 -5.76907,0.25751 -8.65149,0.385735 -2.94494,0.138822 -5.88034,0.308376 -8.8433,0.402691 -5.85385,0.169554 -11.7331,0.25751 -17.6304,0.25751 -6.52889,0 -13.0186,-0.14624 -19.4966,-0.359242 -2.67153,-0.0868964 -5.33247,-0.206644 -8.00189,-0.317914 -4.73797,-0.188629 -9.46853,-0.530916 -14.2023,-0.829755 -0.885919,-0.0604036 -1.77608,-0.11127 -2.662,-0.171673 -6.37523,-0.488527 -12.7197,-1.07773 -19.0399,-1.7623 -1.5387,-0.171673 -3.06681,-0.361362 -4.59809,-0.540453 -5.12583,-0.5892 -10.2453,-1.26636 -15.3552,-2.0018 -1.43061,-0.206644 -2.86228,-0.393153 -4.28654,-0.609335 -6.318,-0.95798 -12.6085,-2.00074 -18.8586,-3.15582 -0.545752,-0.104912 -1.08409,-0.216181 -1.6256,-0.325332 -5.39076,-1.07031 -10.7963,-2.10565 -16.168,-3.29676 -1.79303,-0.393153 -3.59031,-0.786307 -5.37804,-1.19853 -12.5247,-2.84851 -24.8979,-6.10924 -37.1016,-9.76525 -3.2459,-0.965398 -6.46319,-2.01133 -9.75995,-2.85804 -3.20245,-0.822337 -6.32754,-1.87569 -9.3721,-3.17596 -0.837173,-0.359242 -1.71991,-0.606155 -2.58676,-0.907114 -6.19402,-2.13108 -12.3393,-4.35542 -18.439,-6.68467 -0.69835,-0.263868 -1.38716,-0.547871 -2.08657,-0.812799 -5.51686,-2.13214 -10.9924,-4.34058 -16.4245,-6.63274 -0.715306,-0.300958 -1.43167,-0.592379 -2.14486,-0.890158 -12.0065,-5.11947 -23.8054,-10.6395 -35.388,-16.5273 -0.707888,-0.359242 -1.42107,-0.728022 -2.13002,-1.08726 -11.6017,-5.96512 -22.9777,-12.3001 -34.1121,-19.0017 -0.545752,-0.324272 -1.08832,-0.657022 -1.63196,-0.984473 -5.51474,-3.34551 -10.9807,-6.76944 -16.3768,-10.2866l0 0c-36.7,-23.9665 -70.545,-51.9344 -100.87,-83.339 -3.40168,16.6142 -14.4672,85.7424 23.4006,138.715l0 0.00741799 0.00211942 0c0,0 0.00529856,0.00953741 0.00741799,0.00953741 0.632648,0.890158 1.32252,1.74747 1.97954,2.62809 0.684574,0.907114 1.3416,1.82165 2.0569,2.72134 0.483229,0.599797 1.01203,1.189 1.51009,1.78879 0.950562,1.14767 1.88205,2.3017 2.88454,3.43241 0.594499,0.667619 1.24198,1.30768 1.84814,1.97742 0.963278,1.03428 1.90006,2.07916 2.91209,3.08906 1.01414,1.0258 2.09823,2.02829 3.16112,3.02972 0.666559,0.624171 1.29815,1.26636 1.97954,1.89265 1.04594,0.948443 2.16605,1.86615 3.25862,2.79022 0.766172,0.640066 1.49207,1.30768 2.27732,1.94033 0.849889,0.694112 1.76654,1.35431 2.63974,2.02087 1.1021,0.84671 2.16923,1.70402 3.30948,2.52635 0.667619,0.487468 1.38504,0.941025 2.06962,1.41154 1.41154,0.982353 2.81142,1.97742 4.29183,2.91845 0.999309,0.650663 2.06962,1.25046 3.10284,1.87357 1.23033,0.754515 2.42356,1.51645 3.69734,2.23387 0.505483,0.291421 1.05547,0.556349 1.56731,0.840352 4.23355,2.33561 8.66421,4.57054 13.3831,6.63274 1.22503,0.530916 2.52317,1.0258 3.77787,1.54082 1.46452,0.598737 2.89619,1.22291 4.4084,1.78773 0.841412,0.325332 1.74429,0.609335 2.60053,0.917711 1.99862,0.717425 3.98876,1.45287 6.06791,2.11942 0.549991,0.189689 1.14767,0.345466 1.70508,0.51502 8.45332,2.65352 17.5287,4.92978 27.3575,6.70056 3.49599,0.633708 7.07994,1.20807 10.7529,1.72097 13.9628,1.93503 29.2078,3.01276 45.9534,3.01276 4.96157,0 9.7875,-0.0243734 14.552,-0.0678216 53.9309,-0.460975 95.3752,-3.3116 129.213,-4.20176 0.0233137,0 0.0508662,0 0.0720604,-0.0105971l0.00529856 0c1.39988,-0.10915 2.95766,-0.237376 4.53875,-0.365601 0.631589,-0.0508662 1.3151,-0.104912 1.97742,-0.155778 1.28331,-0.101732 2.63762,-0.213002 4.02055,-0.314735 0.720604,-0.0614633 1.43803,-0.11233 2.18301,-0.163196 1.74747,-0.137763 3.57123,-0.267047 5.45434,-0.395273 0.391034,-0.0243734 0.747097,-0.0582842 1.14555,-0.084777 2.16605,-0.14624 4.44655,-0.281883 6.7758,-0.419646 0.827635,-0.0508662 1.68388,-0.0953741 2.53059,-0.14624 1.65951,-0.084777 3.35823,-0.179091 5.0951,-0.25645 0.967517,-0.0508662 1.94563,-0.092195 2.93752,-0.135643 1.92444,-0.0858367 3.90398,-0.163196 5.91002,-0.231017 0.784187,-0.0264928 1.54082,-0.0604036 2.33455,-0.077359 2.66094,-0.084777 5.39606,-0.14624 8.17886,-0.197106 1.04806,-0.0169554 2.13214,-0.0169554 3.19927,-0.0339108 1.90536,-0.0264928 3.83404,-0.0339108 5.78921,-0.0339108 1.23033,-0.00953741 2.46701,0 3.71641,0.00741799 2.02087,0.00953741 4.06612,0.0339108 6.12938,0.0678216 1.12965,0.0169554 2.24129,0.0264928 3.38896,0.0540453 3.01276,0.0752396 6.06791,0.169554 9.15909,0.297779 1.17098,0.0508662 2.36952,0.118688 3.55851,0.172733 2.1332,0.101732 4.28018,0.22042 6.45365,0.359242 1.37127,0.0752396 2.74889,0.169554 4.13394,0.273406 2.16711,0.152599 4.35754,0.325332 6.55538,0.511841 1.26954,0.104912 2.52635,0.206644 3.80225,0.325332 78.1856,7.31943 143.473,20.2341 180.576,119.988 0.162136,-0.0243734 -0.0604036,0.00953741 0.101732,-0.00741799 -1.32676,-47.3999 -18.0162,-100.661 -34.5095,-132.356z\" />\n <path id=\"_258514728\" fill=\"#CBA96B\" fill-rule=\"nonzero\" d=\"M166.531 125.26c-6.82137,6.44411 -13.0641,13.1712 -19.3896,19.4288 -4.55888,4.32257 -8.25834,9.23645 -12.2111,13.736 -3.88385,4.5716 -7.68291,9.04041 -11.3834,13.3884 -6.99622,9.02769 -13.3068,17.8615 -19.4182,26.035 -5.61648,8.51585 -10.578,16.6894 -15.3287,24.154 -2.45747,3.66131 -4.41794,7.48051 -6.31271,11.11 -1.91172,3.62634 -3.73866,7.07676 -5.466,10.364 -7.32049,13.1383 -11.2775,23.5023 -14.5424,30.5557 -3.12721,7.05239 -4.79732,10.8175 -4.79732,10.8175 -0.062523,0.155778 -0.137763,0.334869 -0.198166,0.498065 -1.86403,4.92978 0.623111,10.4318 5.55607,12.298 4.9319,1.85768 10.4371,-0.633708 12.3001,-5.56349 0,0 1.45287,-3.85311 4.17739,-11.0655 2.85592,-7.10431 6.29363,-18.2228 12.6477,-30.4794 1.50267,-3.159 3.08906,-6.47802 4.74645,-9.97189 1.64149,-3.50129 3.32538,-7.17213 5.56243,-10.8186 4.27276,-7.36818 8.72249,-15.4474 13.7975,-23.905 5.57303,-8.11316 11.3135,-16.9194 17.7237,-25.9502 3.47374,-4.32257 7.03119,-8.74793 10.6798,-13.2824 3.71641,-4.46881 7.18591,-9.34772 11.5021,-13.6449 4.52709,-4.69664 9.01073,-9.67093 13.7127,-14.6007 -1.28861,-4.48364 -2.40873,-8.89205 -3.35823,-13.1033z\" />\n </g>\n </g>\n </svg>\n <a href=\"https://www.{{ this.appConfig['appDomain'] }}\" target=\"_blank\" title=\"{{ this.appConfig['appName'] | titlecase }}\" rel=\"noopener\">{{ this.appConfig['appDomain'] | titlecase }}</a>\n </div>\n</div>\n", styles: [".sd_container_widget_footer{position:absolute;bottom:0;width:100%;height:28px;background:var(--sd-background-color)}.sd_container_widget_footer_inner{display:flex;align-items:center;justify-content:center;vertical-align:middle;gap:5px;padding:.2em;font-size:.85em;font-family:var(--sd-text-font-family);color:var(--sd-text-color-light);direction:ltr;text-decoration:none;-webkit-box-pack:center;-webkit-box-align:end}.sd_container_widget_footer_inner a{color:var(--sd-text-color-light);text-decoration:none;transition:background-color .3s ease,color .3s ease}.sd_container_widget_footer_inner a:hover{color:var(--sd-text-color-dark);text-decoration:underline}\n"] }]
38
50
  }] });
@@ -47,10 +59,10 @@ class ErrorComponent {
47
59
  // console.debug('changes:', changes);
48
60
  this.cdr.detectChanges();
49
61
  }
50
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ErrorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
51
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.2", type: ErrorComponent, isStandalone: false, selector: "sd-app-error", inputs: { error: "error" }, usesOnChanges: true, ngImport: i0, template: "<main class=\"container_error\" [ngSwitch]=\"error?.status\">\n <ng-container *ngSwitchCase=\"400\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_bad-request.png\" alt=\"Bad Request\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Invalid Request</h1>\n <span class=\"sd_error_message\">Oops! Invalid or missing parameters. Please check and try again.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"403\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_forbidden.png\" alt=\"Access Forbidden\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Access Denied</h1>\n <span class=\"sd_error_message\">Oops! You don't have permission to access this page.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"404\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_page-not-found.png\" alt=\"Page Not Found\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Page Not Found</h1>\n <span class=\"sd_error_message\">Oops! The page you're looking for can't be found. It may have been removed, or you may have typed the URL\n incorrectly.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"409\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_bad-request.png\" alt=\"Configuration Error\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Configuration Error</h1>\n <span class=\"sd_error_message\">Oops! Invalid configuration detected. Please review your settings or contact support.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"0\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image sd_error_image_grayscale\" src=\"https://assets.snugdesk.com/error-images/error_no-internet.png\" alt=\"No Internet\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">No Internet</h1>\n <span class=\"sd_error_message\">Oops! You are not connected to the internet. Please check your network connection and try again.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_internal-server.png\" alt=\"Internal Server Error\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Internal Server Error</h1>\n <span class=\"sd_error_message\">Oops! We're sorry, but the server encountered an error.</span>\n </div>\n </ng-container>\n</main>\n\n<sd-app-footer></sd-app-footer>\n", styles: [".sd_container_error_image{width:278px;margin:0 auto;padding:80px 0 25px}.sd_container_error_image .sd_error_image{width:100%;margin:0;padding:0}.sd_container_error_image .sd_error_image_grayscale{filter:grayscale(100%)}.sd_container_error_message{width:85%;margin:0 auto;padding:0 0 25px;text-align:center;color:var(--sd-text-color);font-size:13px;font-weight:600;font-family:var(--sd-text-font-family)}.sd_container_error_message .sd_error_title{margin:0;padding:0 0 10px;font-size:31px;font-weight:700;letter-spacing:-2px;color:var(--sd-text-color-dark);font-family:var(--sd-text-font-family)}.sd_container_error_message .sd_error_message{display:block;padding-bottom:16px;font-size:13px;font-weight:600;line-height:1.5em;letter-spacing:-.26px;color:var(--sd-text-color);font-family:var(--sd-text-font-family)}@media screen and (min-width: 980px){.sd_container_error_image{width:478px}.sd_container_error_message{width:520px}}\n"], dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: FooterComponent, selector: "sd-app-footer" }] });
62
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ErrorComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
63
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: ErrorComponent, isStandalone: false, selector: "sd-app-error", inputs: { error: "error" }, usesOnChanges: true, ngImport: i0, template: "<main class=\"container_error\" [ngSwitch]=\"error?.status\">\n <ng-container *ngSwitchCase=\"400\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_bad-request.png\" alt=\"Bad Request\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Invalid Request</h1>\n <span class=\"sd_error_message\">Oops! Invalid or missing parameters. Please check and try again.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"403\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_forbidden.png\" alt=\"Access Forbidden\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Access Denied</h1>\n <span class=\"sd_error_message\">Oops! You don't have permission to access this page.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"404\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_page-not-found.png\" alt=\"Page Not Found\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Page Not Found</h1>\n <span class=\"sd_error_message\">Oops! The page you're looking for can't be found. It may have been removed, or you may have typed the URL\n incorrectly.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"409\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_bad-request.png\" alt=\"Configuration Error\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Configuration Error</h1>\n <span class=\"sd_error_message\">Oops! Invalid configuration detected. Please review your settings or contact support.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"0\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image sd_error_image_grayscale\" src=\"https://assets.snugdesk.com/error-images/error_no-internet.png\" alt=\"No Internet\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">No Internet</h1>\n <span class=\"sd_error_message\">Oops! You are not connected to the internet. Please check your network connection and try again.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_internal-server.png\" alt=\"Internal Server Error\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Internal Server Error</h1>\n <span class=\"sd_error_message\">Oops! We're sorry, but the server encountered an error.</span>\n </div>\n </ng-container>\n</main>\n\n<sd-app-footer></sd-app-footer>\n", styles: [".sd_container_error_image{width:278px;margin:0 auto;padding:80px 0 25px}.sd_container_error_image .sd_error_image{width:100%;margin:0;padding:0}.sd_container_error_image .sd_error_image_grayscale{filter:grayscale(100%)}.sd_container_error_message{width:85%;margin:0 auto;padding:0 0 25px;text-align:center;color:var(--sd-text-color);font-size:13px;font-weight:600;font-family:var(--sd-text-font-family)}.sd_container_error_message .sd_error_title{margin:0;padding:0 0 10px;font-size:31px;font-weight:700;letter-spacing:-2px;color:var(--sd-text-color-dark);font-family:var(--sd-text-font-family)}.sd_container_error_message .sd_error_message{display:block;padding-bottom:16px;font-size:13px;font-weight:600;line-height:1.5em;letter-spacing:-.26px;color:var(--sd-text-color);font-family:var(--sd-text-font-family)}@media screen and (min-width: 980px){.sd_container_error_image{width:478px}.sd_container_error_message{width:520px}}\n"], dependencies: [{ kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: FooterComponent, selector: "sd-app-footer" }] });
52
64
  }
53
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: ErrorComponent, decorators: [{
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ErrorComponent, decorators: [{
54
66
  type: Component,
55
67
  args: [{ selector: 'sd-app-error', standalone: false, template: "<main class=\"container_error\" [ngSwitch]=\"error?.status\">\n <ng-container *ngSwitchCase=\"400\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_bad-request.png\" alt=\"Bad Request\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Invalid Request</h1>\n <span class=\"sd_error_message\">Oops! Invalid or missing parameters. Please check and try again.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"403\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_forbidden.png\" alt=\"Access Forbidden\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Access Denied</h1>\n <span class=\"sd_error_message\">Oops! You don't have permission to access this page.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"404\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_page-not-found.png\" alt=\"Page Not Found\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Page Not Found</h1>\n <span class=\"sd_error_message\">Oops! The page you're looking for can't be found. It may have been removed, or you may have typed the URL\n incorrectly.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"409\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_bad-request.png\" alt=\"Configuration Error\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Configuration Error</h1>\n <span class=\"sd_error_message\">Oops! Invalid configuration detected. Please review your settings or contact support.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"0\">\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image sd_error_image_grayscale\" src=\"https://assets.snugdesk.com/error-images/error_no-internet.png\" alt=\"No Internet\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">No Internet</h1>\n <span class=\"sd_error_message\">Oops! You are not connected to the internet. Please check your network connection and try again.</span>\n </div>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <div class=\"sd_container_error_image\">\n <img class=\"sd_error_image\" src=\"https://assets.snugdesk.com/error-images/error_internal-server.png\" alt=\"Internal Server Error\" />\n </div>\n <div class=\"sd_container_error_message\" aria-live=\"polite\">\n <h1 class=\"sd_error_title\">Internal Server Error</h1>\n <span class=\"sd_error_message\">Oops! We're sorry, but the server encountered an error.</span>\n </div>\n </ng-container>\n</main>\n\n<sd-app-footer></sd-app-footer>\n", styles: [".sd_container_error_image{width:278px;margin:0 auto;padding:80px 0 25px}.sd_container_error_image .sd_error_image{width:100%;margin:0;padding:0}.sd_container_error_image .sd_error_image_grayscale{filter:grayscale(100%)}.sd_container_error_message{width:85%;margin:0 auto;padding:0 0 25px;text-align:center;color:var(--sd-text-color);font-size:13px;font-weight:600;font-family:var(--sd-text-font-family)}.sd_container_error_message .sd_error_title{margin:0;padding:0 0 10px;font-size:31px;font-weight:700;letter-spacing:-2px;color:var(--sd-text-color-dark);font-family:var(--sd-text-font-family)}.sd_container_error_message .sd_error_message{display:block;padding-bottom:16px;font-size:13px;font-weight:600;line-height:1.5em;letter-spacing:-.26px;color:var(--sd-text-color);font-family:var(--sd-text-font-family)}@media screen and (min-width: 980px){.sd_container_error_image{width:478px}.sd_container_error_message{width:520px}}\n"] }]
56
68
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { error: [{
@@ -59,10 +71,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
59
71
  }] } });
60
72
 
61
73
  class LoaderComponent {
62
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
63
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.2", type: LoaderComponent, isStandalone: false, selector: "sd-app-loader", ngImport: i0, template: "<div class=\"sd_container_loader\">\n <!-- <div class=\"sd_loader_logo\">\n <span class=\"sd_logo\"></span>\n </div> -->\n <div class=\"sd_container_css_loader\">\n <div class=\"sd_cssload_loader\">\n <div class=\"sd_cssload_dot\"></div>\n <div class=\"sd_cssload_dot\"></div>\n <div class=\"sd_cssload_dot\"></div>\n <div class=\"sd_cssload_dot\"></div>\n <div class=\"sd_cssload_dot\"></div>\n </div>\n </div>\n <sd-app-footer></sd-app-footer>\n</div>\n", styles: [".sd_container_loader{position:absolute;inset:0;width:100%;height:100%;background:#fff;z-index:9999999999999}.sd_loader_logo{margin:0 auto;width:120px;padding-top:42px;text-align:center}.sd_loader_logo .sd_logo{display:block;width:120px;height:120px;background:url(https://assets.snugdesk.com/logo/snugdesk.svg) no-repeat center;background-size:contain;cursor:default}.sd_container_css_loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center}.sd_cssload_loader{display:flex;gap:5px}.sd_cssload_loader{position:absolute;left:50%;height:12px;width:62px;-o-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.sd_cssload_loader>.sd_cssload_dot{content:\" \";width:12px;height:12px;background:var(--sd-background-color);border-radius:100%;position:absolute;-o-animation:sd_cssload_shift 2.3s linear infinite;-ms-animation:sd_cssload_shift 2.3s linear infinite;-webkit-animation:sd_cssload_shift 2.3s linear infinite;-moz-animation:sd_cssload_shift 2.3s linear infinite;animation:sd_cssload_shift 2.3s linear infinite}.sd_cssload_loader>.sd_cssload_dot:nth-of-type(1){-o-animation-delay:-.46s;-ms-animation-delay:-.46s;-webkit-animation-delay:-.46s;-moz-animation-delay:-.46s;animation-delay:-.46s}.sd_cssload_loader>.sd_cssload_dot:nth-of-type(2){-o-animation-delay:-.92s;-ms-animation-delay:-.92s;-webkit-animation-delay:-.92s;-moz-animation-delay:-.92s;animation-delay:-.92s}.sd_cssload_loader>.sd_cssload_dot:nth-of-type(3){-o-animation-delay:-1.38s;-ms-animation-delay:-1.38s;-webkit-animation-delay:-1.38s;-moz-animation-delay:-1.38s;animation-delay:-1.38s}.sd_cssload_loader>.sd_cssload_dot:nth-of-type(4){-o-animation-delay:-1.84s;-ms-animation-delay:-1.84s;-webkit-animation-delay:-1.84s;-moz-animation-delay:-1.84s;animation-delay:-1.84s}@keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@-o-keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@-ms-keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@-webkit-keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@-moz-keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@media (max-width: 979px){.sd_loader_logo{width:110px;padding-top:37px}.sd_loader_logo .sd_logo{width:110px;height:110px;background-size:contain}}\n"], dependencies: [{ kind: "component", type: FooterComponent, selector: "sd-app-footer" }] });
74
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
75
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: LoaderComponent, isStandalone: false, selector: "sd-app-loader", ngImport: i0, template: "<div class=\"sd_container_loader\">\n <!-- <div class=\"sd_loader_logo\">\n <span class=\"sd_logo\"></span>\n </div> -->\n <div class=\"sd_container_css_loader\">\n <div class=\"sd_cssload_loader\">\n <div class=\"sd_cssload_dot\"></div>\n <div class=\"sd_cssload_dot\"></div>\n <div class=\"sd_cssload_dot\"></div>\n <div class=\"sd_cssload_dot\"></div>\n <div class=\"sd_cssload_dot\"></div>\n </div>\n </div>\n <sd-app-footer></sd-app-footer>\n</div>\n", styles: [".sd_container_loader{position:absolute;inset:0;width:100%;height:100%;background:#fff;z-index:9999999999999}.sd_loader_logo{margin:0 auto;width:120px;padding-top:42px;text-align:center}.sd_loader_logo .sd_logo{display:block;width:120px;height:120px;background:url(https://assets.snugdesk.com/logo/snugdesk.svg) no-repeat center;background-size:contain;cursor:default}.sd_container_css_loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center}.sd_cssload_loader{display:flex;gap:5px}.sd_cssload_loader{position:absolute;left:50%;height:12px;width:62px;-o-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.sd_cssload_loader>.sd_cssload_dot{content:\" \";width:12px;height:12px;background:var(--sd-background-color);border-radius:100%;position:absolute;-o-animation:sd_cssload_shift 2.3s linear infinite;-ms-animation:sd_cssload_shift 2.3s linear infinite;-webkit-animation:sd_cssload_shift 2.3s linear infinite;-moz-animation:sd_cssload_shift 2.3s linear infinite;animation:sd_cssload_shift 2.3s linear infinite}.sd_cssload_loader>.sd_cssload_dot:nth-of-type(1){-o-animation-delay:-.46s;-ms-animation-delay:-.46s;-webkit-animation-delay:-.46s;-moz-animation-delay:-.46s;animation-delay:-.46s}.sd_cssload_loader>.sd_cssload_dot:nth-of-type(2){-o-animation-delay:-.92s;-ms-animation-delay:-.92s;-webkit-animation-delay:-.92s;-moz-animation-delay:-.92s;animation-delay:-.92s}.sd_cssload_loader>.sd_cssload_dot:nth-of-type(3){-o-animation-delay:-1.38s;-ms-animation-delay:-1.38s;-webkit-animation-delay:-1.38s;-moz-animation-delay:-1.38s;animation-delay:-1.38s}.sd_cssload_loader>.sd_cssload_dot:nth-of-type(4){-o-animation-delay:-1.84s;-ms-animation-delay:-1.84s;-webkit-animation-delay:-1.84s;-moz-animation-delay:-1.84s;animation-delay:-1.84s}@keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@-o-keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@-ms-keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@-webkit-keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@-moz-keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@media (max-width: 979px){.sd_loader_logo{width:110px;padding-top:37px}.sd_loader_logo .sd_logo{width:110px;height:110px;background-size:contain}}\n"], dependencies: [{ kind: "component", type: FooterComponent, selector: "sd-app-footer" }] });
64
76
  }
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: LoaderComponent, decorators: [{
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: LoaderComponent, decorators: [{
66
78
  type: Component,
67
79
  args: [{ selector: 'sd-app-loader', standalone: false, template: "<div class=\"sd_container_loader\">\n <!-- <div class=\"sd_loader_logo\">\n <span class=\"sd_logo\"></span>\n </div> -->\n <div class=\"sd_container_css_loader\">\n <div class=\"sd_cssload_loader\">\n <div class=\"sd_cssload_dot\"></div>\n <div class=\"sd_cssload_dot\"></div>\n <div class=\"sd_cssload_dot\"></div>\n <div class=\"sd_cssload_dot\"></div>\n <div class=\"sd_cssload_dot\"></div>\n </div>\n </div>\n <sd-app-footer></sd-app-footer>\n</div>\n", styles: [".sd_container_loader{position:absolute;inset:0;width:100%;height:100%;background:#fff;z-index:9999999999999}.sd_loader_logo{margin:0 auto;width:120px;padding-top:42px;text-align:center}.sd_loader_logo .sd_logo{display:block;width:120px;height:120px;background:url(https://assets.snugdesk.com/logo/snugdesk.svg) no-repeat center;background-size:contain;cursor:default}.sd_container_css_loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center}.sd_cssload_loader{display:flex;gap:5px}.sd_cssload_loader{position:absolute;left:50%;height:12px;width:62px;-o-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.sd_cssload_loader>.sd_cssload_dot{content:\" \";width:12px;height:12px;background:var(--sd-background-color);border-radius:100%;position:absolute;-o-animation:sd_cssload_shift 2.3s linear infinite;-ms-animation:sd_cssload_shift 2.3s linear infinite;-webkit-animation:sd_cssload_shift 2.3s linear infinite;-moz-animation:sd_cssload_shift 2.3s linear infinite;animation:sd_cssload_shift 2.3s linear infinite}.sd_cssload_loader>.sd_cssload_dot:nth-of-type(1){-o-animation-delay:-.46s;-ms-animation-delay:-.46s;-webkit-animation-delay:-.46s;-moz-animation-delay:-.46s;animation-delay:-.46s}.sd_cssload_loader>.sd_cssload_dot:nth-of-type(2){-o-animation-delay:-.92s;-ms-animation-delay:-.92s;-webkit-animation-delay:-.92s;-moz-animation-delay:-.92s;animation-delay:-.92s}.sd_cssload_loader>.sd_cssload_dot:nth-of-type(3){-o-animation-delay:-1.38s;-ms-animation-delay:-1.38s;-webkit-animation-delay:-1.38s;-moz-animation-delay:-1.38s;animation-delay:-1.38s}.sd_cssload_loader>.sd_cssload_dot:nth-of-type(4){-o-animation-delay:-1.84s;-ms-animation-delay:-1.84s;-webkit-animation-delay:-1.84s;-moz-animation-delay:-1.84s;animation-delay:-1.84s}@keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@-o-keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@-ms-keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@-webkit-keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@-moz-keyframes sd_cssload_shift{0%{left:-37px;opacity:0;background-color:var(--sd-app-color-light)}10%{left:0;opacity:1}90%{left:62px;opacity:1}to{left:100px;background-color:var(--sd-app-color-dark);opacity:0}}@media (max-width: 979px){.sd_loader_logo{width:110px;padding-top:37px}.sd_loader_logo .sd_logo{width:110px;height:110px;background-size:contain}}\n"] }]
68
80
  }] });
@@ -71,10 +83,10 @@ class DomainNamePipe {
71
83
  transform(value, args) {
72
84
  return value.replace(/[/ /^\W\s\_]/gi, '');
73
85
  }
74
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: DomainNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
75
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.2", ngImport: i0, type: DomainNamePipe, isStandalone: false, name: "domainName" });
86
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DomainNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
87
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: DomainNamePipe, isStandalone: false, name: "domainName" });
76
88
  }
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: DomainNamePipe, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DomainNamePipe, decorators: [{
78
90
  type: Pipe,
79
91
  args: [{
80
92
  name: 'domainName',
@@ -150,10 +162,10 @@ class FormatEpochTimestampPipe {
150
162
  return 'MMMM d, y, h:mm:ss A z Z';
151
163
  }
152
164
  }
153
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: FormatEpochTimestampPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
154
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.2", ngImport: i0, type: FormatEpochTimestampPipe, isStandalone: false, name: "formatEpochTimestamp" });
165
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FormatEpochTimestampPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
166
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: FormatEpochTimestampPipe, isStandalone: false, name: "formatEpochTimestamp" });
155
167
  }
156
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: FormatEpochTimestampPipe, decorators: [{
168
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FormatEpochTimestampPipe, decorators: [{
157
169
  type: Pipe,
158
170
  args: [{
159
171
  name: 'formatEpochTimestamp',
@@ -169,10 +181,10 @@ class SafeHtmlPipe {
169
181
  transform(value, args) {
170
182
  return this.sanitized.bypassSecurityTrustHtml(value);
171
183
  }
172
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
173
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.2", ngImport: i0, type: SafeHtmlPipe, isStandalone: false, name: "safeHtml" });
184
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
185
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: SafeHtmlPipe, isStandalone: false, name: "safeHtml" });
174
186
  }
175
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SafeHtmlPipe, decorators: [{
187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SafeHtmlPipe, decorators: [{
176
188
  type: Pipe,
177
189
  args: [{
178
190
  name: 'safeHtml',
@@ -190,10 +202,10 @@ class SearchPipe {
190
202
  return item[field].toLowerCase().includes(value.toLowerCase());
191
203
  });
192
204
  }
193
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SearchPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
194
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.2", ngImport: i0, type: SearchPipe, isStandalone: false, name: "SearchFilter" });
205
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
206
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: SearchPipe, isStandalone: false, name: "SearchFilter" });
195
207
  }
196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SearchPipe, decorators: [{
208
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchPipe, decorators: [{
197
209
  type: Pipe,
198
210
  args: [{
199
211
  name: 'SearchFilter',
@@ -212,10 +224,10 @@ class SearchInnerFieldPipe {
212
224
  return innerItem[innerfield].toLowerCase().includes(value.toLowerCase());
213
225
  });
214
226
  }
215
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SearchInnerFieldPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
216
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.2", ngImport: i0, type: SearchInnerFieldPipe, isStandalone: false, name: "SearchFilterInnerField" });
227
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchInnerFieldPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
228
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: SearchInnerFieldPipe, isStandalone: false, name: "SearchFilterInnerField" });
217
229
  }
218
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SearchInnerFieldPipe, decorators: [{
230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SearchInnerFieldPipe, decorators: [{
219
231
  type: Pipe,
220
232
  args: [{
221
233
  name: 'SearchFilterInnerField',
@@ -227,10 +239,10 @@ class SingularizePipe {
227
239
  transform(value, count = 1) {
228
240
  return count > 1 ? plural(value) : singular(value);
229
241
  }
230
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SingularizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
231
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.2", ngImport: i0, type: SingularizePipe, isStandalone: false, name: "singularize" });
242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SingularizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
243
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: SingularizePipe, isStandalone: false, name: "singularize" });
232
244
  }
233
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SingularizePipe, decorators: [{
245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SingularizePipe, decorators: [{
234
246
  type: Pipe,
235
247
  args: [{
236
248
  name: 'singularize',
@@ -429,8 +441,8 @@ function plural(word, amount) {
429
441
  }
430
442
 
431
443
  class CustomPipesModule {
432
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: CustomPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
433
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.2", ngImport: i0, type: CustomPipesModule, declarations: [DomainNamePipe,
444
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CustomPipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
445
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: CustomPipesModule, declarations: [DomainNamePipe,
434
446
  FormatEpochTimestampPipe,
435
447
  SafeHtmlPipe,
436
448
  SearchPipe,
@@ -441,9 +453,9 @@ class CustomPipesModule {
441
453
  SearchPipe,
442
454
  SearchInnerFieldPipe,
443
455
  SingularizePipe] });
444
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: CustomPipesModule, imports: [CommonModule] });
456
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CustomPipesModule, imports: [CommonModule] });
445
457
  }
446
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: CustomPipesModule, decorators: [{
458
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CustomPipesModule, decorators: [{
447
459
  type: NgModule,
448
460
  args: [{
449
461
  declarations: [
@@ -470,19 +482,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
470
482
  }] });
471
483
 
472
484
  class SnugdeskCoreModule {
473
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
474
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskCoreModule, declarations: [ErrorComponent, FooterComponent, LoaderComponent], imports: [CommonModule,
485
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
486
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskCoreModule, declarations: [ErrorComponent, FooterComponent, LoaderComponent], imports: [CommonModule,
475
487
  FormsModule,
476
488
  ReactiveFormsModule,
477
489
  // ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }),
478
490
  CustomPipesModule], exports: [ErrorComponent, FooterComponent, LoaderComponent] });
479
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskCoreModule, imports: [CommonModule,
491
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskCoreModule, imports: [CommonModule,
480
492
  FormsModule,
481
493
  ReactiveFormsModule,
482
494
  // ReactiveFormsModule.withConfig({ warnOnNgModelWithFormControl: 'never' }),
483
495
  CustomPipesModule] });
484
496
  }
485
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskCoreModule, decorators: [{
497
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskCoreModule, decorators: [{
486
498
  type: NgModule,
487
499
  args: [{
488
500
  declarations: [ErrorComponent, FooterComponent, LoaderComponent],
@@ -497,25 +509,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
497
509
  }]
498
510
  }] });
499
511
 
500
- var ModelAttributeTypes;
501
- (function (ModelAttributeTypes) {
502
- ModelAttributeTypes["binary"] = "binary";
503
- ModelAttributeTypes["binarySet"] = "binarySet";
504
- ModelAttributeTypes["bool"] = "bool";
505
- ModelAttributeTypes["list"] = "list";
506
- ModelAttributeTypes["map"] = "map";
507
- ModelAttributeTypes["number"] = "number";
508
- ModelAttributeTypes["numberSet"] = "numberSet";
509
- ModelAttributeTypes["string"] = "string";
510
- ModelAttributeTypes["stringSet"] = "stringSet";
511
- ModelAttributeTypes["_null"] = "_null";
512
- })(ModelAttributeTypes || (ModelAttributeTypes = {}));
513
- var ModelSortDirection;
514
- (function (ModelSortDirection) {
515
- ModelSortDirection["ASC"] = "ASC";
516
- ModelSortDirection["DESC"] = "DESC";
517
- })(ModelSortDirection || (ModelSortDirection = {}));
518
-
519
512
  class SnugdeskIPRegistryService {
520
513
  http;
521
514
  IP_REGISTRY_API = 'https://api.ipregistry.co/?key=1lbzl1iexwbxc0';
@@ -545,10 +538,10 @@ class SnugdeskIPRegistryService {
545
538
  }
546
539
  return this.cachedIPDetails;
547
540
  }
548
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskIPRegistryService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
549
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskIPRegistryService, providedIn: 'root' });
541
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskIPRegistryService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
542
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskIPRegistryService, providedIn: 'root' });
550
543
  }
551
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskIPRegistryService, decorators: [{
544
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskIPRegistryService, decorators: [{
552
545
  type: Injectable,
553
546
  args: [{ providedIn: 'root' }]
554
547
  }], ctorParameters: () => [{ type: i1$2.HttpClient }] });
@@ -572,10 +565,10 @@ class SnugdeskAuthenticationHelperService {
572
565
  ipDetails,
573
566
  }, { headers: this.headers }));
574
567
  }
575
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskAuthenticationHelperService, deps: [{ token: i1$2.HttpClient }, { token: SnugdeskIPRegistryService }], target: i0.ɵɵFactoryTarget.Injectable });
576
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskAuthenticationHelperService, providedIn: 'root' });
568
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskAuthenticationHelperService, deps: [{ token: i1$2.HttpClient }, { token: SnugdeskIPRegistryService }], target: i0.ɵɵFactoryTarget.Injectable });
569
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskAuthenticationHelperService, providedIn: 'root' });
577
570
  }
578
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskAuthenticationHelperService, decorators: [{
571
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskAuthenticationHelperService, decorators: [{
579
572
  type: Injectable,
580
573
  args: [{
581
574
  providedIn: 'root',
@@ -583,7 +576,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImpor
583
576
  }], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: SnugdeskIPRegistryService }] });
584
577
 
585
578
  class SnugdeskAuthenticationService {
586
- authHelperService;
579
+ authenticationHelperService;
587
580
  isAuthenticated$ = new BehaviorSubject(false);
588
581
  tenant$ = new BehaviorSubject(undefined);
589
582
  user$ = new BehaviorSubject(undefined);
@@ -593,8 +586,8 @@ class SnugdeskAuthenticationService {
593
586
  userSessionSubscription;
594
587
  jwtHelper = new JwtHelperService();
595
588
  TOKEN_KEY = 'sd-auth-token';
596
- constructor(authHelperService) {
597
- this.authHelperService = authHelperService;
589
+ constructor(authenticationHelperService) {
590
+ this.authenticationHelperService = authenticationHelperService;
598
591
  this.isAuthenticated$.next(this.isAuthenticated());
599
592
  }
600
593
  getToken() {
@@ -602,9 +595,7 @@ class SnugdeskAuthenticationService {
602
595
  }
603
596
  setToken(token) {
604
597
  const isValid = this.checkToken(token);
605
- token
606
- ? sessionStorage.setItem(this.TOKEN_KEY, token)
607
- : sessionStorage.removeItem(this.TOKEN_KEY);
598
+ token ? sessionStorage.setItem(this.TOKEN_KEY, token) : sessionStorage.removeItem(this.TOKEN_KEY);
608
599
  this.isAuthenticated$.next(isValid);
609
600
  }
610
601
  checkToken(token) {
@@ -650,9 +641,7 @@ class SnugdeskAuthenticationService {
650
641
  }
651
642
  const tenant = this.tenant$.getValue();
652
643
  const user = this.user$.getValue();
653
- return tenant?.preferences?.allowUserToChangePreferences
654
- ? user?.preferences || tenant?.preferences
655
- : tenant?.preferences;
644
+ return tenant?.preferences?.allowUserToChangePreferences ? user?.preferences || tenant?.preferences : tenant?.preferences;
656
645
  }
657
646
  isAuthenticated() {
658
647
  try {
@@ -716,7 +705,7 @@ class SnugdeskAuthenticationService {
716
705
  return true;
717
706
  }
718
707
  async login(tenantId, userId) {
719
- const res_getSessionToken = await this.authHelperService.getSessionToken(tenantId, userId);
708
+ const res_getSessionToken = await this.authenticationHelperService.getSessionToken(tenantId, userId);
720
709
  // console.debug('res_getSessionToken: ', res_getSessionToken);
721
710
  const sessionToken = res_getSessionToken?.data?.sessionToken;
722
711
  if (!sessionToken) {
@@ -766,52 +755,200 @@ class SnugdeskAuthenticationService {
766
755
  this.userSession$?.next(null);
767
756
  }
768
757
  }
769
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskAuthenticationService, deps: [{ token: SnugdeskAuthenticationHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
770
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskAuthenticationService, providedIn: 'root' });
758
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskAuthenticationService, deps: [{ token: SnugdeskAuthenticationHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
759
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskAuthenticationService, providedIn: 'root' });
771
760
  }
772
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: SnugdeskAuthenticationService, decorators: [{
761
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: SnugdeskAuthenticationService, decorators: [{
773
762
  type: Injectable,
774
763
  args: [{
775
764
  providedIn: 'root',
776
765
  }]
777
766
  }], ctorParameters: () => [{ type: SnugdeskAuthenticationHelperService }] });
778
767
 
779
- class GraphQLHelperService {
780
- http;
768
+ const AMPLIFY_CONFIG = new InjectionToken('AMPLIFY_CONFIG');
769
+ function provideAmplifyConfig(config) {
770
+ return {
771
+ provide: AMPLIFY_CONFIG,
772
+ useValue: config,
773
+ };
774
+ }
775
+ class AppSyncHelperService {
781
776
  authenticationService;
782
- GRAPHQL_API = 'https://api.snugdesk.com/graphql';
783
- constructor(http, authenticationService) {
784
- this.http = http;
777
+ configured = false;
778
+ authMode = GRAPHQL_AUTH_MODE.AWS_LAMBDA;
779
+ amplifyConfig;
780
+ constructor(amplifyConfig, authenticationService) {
785
781
  this.authenticationService = authenticationService;
782
+ this.amplifyConfig = amplifyConfig;
783
+ // this.ensureConfigured();
786
784
  }
787
- /**
788
- * Executes a GraphQL query with the provided variables.
789
- * @param query The GraphQL query string.
790
- * @param variables Optional variables for the query.
791
- * @returns A promise that resolves with the response data.
792
- */
793
- async executeQuery(query, variables) {
794
- const token = this.authenticationService.getToken();
795
- const requestBody = {
796
- query,
797
- variables: variables || {},
798
- };
799
- return lastValueFrom(this.http.post(`${this.GRAPHQL_API}/query`, requestBody, {
800
- headers: {
801
- 'Content-Type': 'application/json',
802
- Authorization: `Bearer ${token}`,
785
+ async query(statement, variables) {
786
+ this.ensureConfigured();
787
+ // console.debug('token: ', token);
788
+ try {
789
+ return (await API.graphql({
790
+ query: statement,
791
+ variables,
792
+ authMode: this.authMode,
793
+ ...(this.authMode === GRAPHQL_AUTH_MODE.AWS_LAMBDA ? { authToken: this.getToken() } : {}),
794
+ }));
795
+ }
796
+ catch (err) {
797
+ const normalizedErrors = err?.errors?.map((e) => ({
798
+ message: e?.message,
799
+ errorType: e?.errorType,
800
+ data: e?.data,
801
+ path: e?.path,
802
+ })) ??
803
+ err?.response?.data?.errors ??
804
+ err?.errors;
805
+ const errorMessage = err?.message ?? normalizedErrors?.[0]?.message;
806
+ console.error('AppSync query failed', {
807
+ statement,
808
+ variables,
809
+ message: errorMessage,
810
+ status: err?.response?.status,
811
+ response: err?.response?.data,
812
+ errors: normalizedErrors,
813
+ });
814
+ if (err) {
815
+ console.error('AppSync query failed (raw error)', err);
816
+ }
817
+ throw err;
818
+ }
819
+ }
820
+ async mutate(statement, variables) {
821
+ return this.query(statement, variables);
822
+ }
823
+ subscribe(statement, variables) {
824
+ this.ensureConfigured();
825
+ try {
826
+ return API.graphql({
827
+ query: statement,
828
+ variables,
829
+ authMode: this.authMode,
830
+ ...(this.authMode === GRAPHQL_AUTH_MODE.AWS_LAMBDA ? { authToken: this.getToken() } : {}),
831
+ });
832
+ }
833
+ catch (err) {
834
+ const normalizedErrors = err?.errors?.map((e) => ({
835
+ message: e?.message,
836
+ errorType: e?.errorType,
837
+ data: e?.data,
838
+ path: e?.path,
839
+ })) ??
840
+ err?.response?.data?.errors ??
841
+ err?.errors;
842
+ const errorMessage = err?.message ?? normalizedErrors?.[0]?.message;
843
+ console.error('AppSync subscription failed', {
844
+ statement,
845
+ variables,
846
+ message: errorMessage,
847
+ status: err?.response?.status,
848
+ response: err?.response?.data,
849
+ errors: normalizedErrors,
850
+ });
851
+ if (err) {
852
+ console.error('AppSync subscription failed (raw error)', err);
853
+ }
854
+ throw err;
855
+ }
856
+ }
857
+ ensureConfigured() {
858
+ if (this.configured) {
859
+ return;
860
+ }
861
+ if (this.amplifyConfig) {
862
+ Amplify.configure(this.amplifyConfig);
863
+ this.authMode = this.normalizeAuthMode(this.getAuthModeFromConfig(this.amplifyConfig));
864
+ this.configured = true;
865
+ return;
866
+ }
867
+ const hostConfig = this.getHostConfig();
868
+ if (hostConfig.useHost) {
869
+ this.authMode = this.normalizeAuthMode(hostConfig.authMode);
870
+ this.configured = true;
871
+ return;
872
+ }
873
+ Amplify.configure({
874
+ ...SnugdeskAmplifyConfig,
875
+ aws_appsync_authenticationType: this.normalizeAuthMode(SnugdeskAmplifyConfig.aws_appsync_authenticationType),
876
+ API: {
877
+ GraphQL: {
878
+ endpoint: SnugdeskAmplifyConfig.aws_appsync_graphqlEndpoint,
879
+ region: SnugdeskAmplifyConfig.aws_appsync_region,
880
+ defaultAuthMode: this.normalizeAuthMode(SnugdeskAmplifyConfig.aws_appsync_authenticationType),
881
+ graphql_headers: async () => this.buildAuthHeaders(),
882
+ functionAuthProvider: async () => ({
883
+ token: this.getToken(),
884
+ }),
885
+ },
803
886
  },
804
- }));
887
+ });
888
+ this.authMode = this.normalizeAuthMode(SnugdeskAmplifyConfig.aws_appsync_authenticationType);
889
+ this.configured = true;
890
+ }
891
+ getHostConfig() {
892
+ const existing = Amplify.getConfig?.() ?? {};
893
+ const existingEndpoint = existing?.API?.GraphQL?.endpoint ?? existing?.API?.GraphQL?.graphql_endpoint ?? existing?.aws_appsync_graphqlEndpoint;
894
+ const existingAuthMode = existing?.API?.GraphQL?.defaultAuthMode ?? existing?.aws_appsync_authenticationType;
895
+ return {
896
+ useHost: existingEndpoint === SnugdeskAmplifyConfig.aws_appsync_graphqlEndpoint,
897
+ authMode: existingAuthMode,
898
+ };
899
+ }
900
+ normalizeAuthMode(mode) {
901
+ if (!mode) {
902
+ return undefined;
903
+ }
904
+ switch (mode) {
905
+ case 'API_KEY':
906
+ return GRAPHQL_AUTH_MODE.API_KEY;
907
+ case 'AWS_IAM':
908
+ return GRAPHQL_AUTH_MODE.AWS_IAM;
909
+ case 'OPENID_CONNECT':
910
+ return GRAPHQL_AUTH_MODE.OPENID_CONNECT;
911
+ case 'AMAZON_COGNITO_USER_POOLS':
912
+ return GRAPHQL_AUTH_MODE.AMAZON_COGNITO_USER_POOLS;
913
+ case 'AWS_LAMBDA':
914
+ return GRAPHQL_AUTH_MODE.AWS_LAMBDA;
915
+ default:
916
+ return undefined;
917
+ }
918
+ }
919
+ getAuthModeFromConfig(config) {
920
+ return config?.API?.GraphQL?.defaultAuthMode ?? config?.aws_appsync_authenticationType;
921
+ }
922
+ buildAuthHeaders() {
923
+ const token = this.getToken();
924
+ if (!token) {
925
+ throw new Error('Missing authentication token for AppSync request.');
926
+ }
927
+ return {
928
+ Authorization: token,
929
+ };
930
+ }
931
+ getToken() {
932
+ const token = this.authenticationService.getToken();
933
+ if (!token) {
934
+ throw new Error('Missing authentication token for AppSync request.');
935
+ }
936
+ return token;
805
937
  }
806
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: GraphQLHelperService, deps: [{ token: i1$2.HttpClient }, { token: SnugdeskAuthenticationService }], target: i0.ɵɵFactoryTarget.Injectable });
807
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: GraphQLHelperService, providedIn: 'root' });
938
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AppSyncHelperService, deps: [{ token: AMPLIFY_CONFIG, optional: true }, { token: SnugdeskAuthenticationService }], target: i0.ɵɵFactoryTarget.Injectable });
939
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AppSyncHelperService, providedIn: 'root' });
808
940
  }
809
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: GraphQLHelperService, decorators: [{
941
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AppSyncHelperService, decorators: [{
810
942
  type: Injectable,
811
943
  args: [{
812
944
  providedIn: 'root',
813
945
  }]
814
- }], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: SnugdeskAuthenticationService }] });
946
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
947
+ type: Optional
948
+ }, {
949
+ type: Inject,
950
+ args: [AMPLIFY_CONFIG]
951
+ }] }, { type: SnugdeskAuthenticationService }] });
815
952
 
816
953
  class S3HelperService {
817
954
  http;
@@ -903,98 +1040,1777 @@ class S3HelperService {
903
1040
  throw new Error('Decryption failed.');
904
1041
  }
905
1042
  }
906
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: S3HelperService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
907
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: S3HelperService, providedIn: 'root' });
1043
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: S3HelperService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1044
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: S3HelperService, providedIn: 'root' });
908
1045
  }
909
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: S3HelperService, decorators: [{
1046
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: S3HelperService, decorators: [{
910
1047
  type: Injectable,
911
1048
  args: [{
912
1049
  providedIn: 'root',
913
1050
  }]
914
1051
  }], ctorParameters: () => [{ type: i1$2.HttpClient }] });
915
1052
 
1053
+ var ModelAttributeTypes;
1054
+ (function (ModelAttributeTypes) {
1055
+ ModelAttributeTypes["binary"] = "binary";
1056
+ ModelAttributeTypes["binarySet"] = "binarySet";
1057
+ ModelAttributeTypes["bool"] = "bool";
1058
+ ModelAttributeTypes["list"] = "list";
1059
+ ModelAttributeTypes["map"] = "map";
1060
+ ModelAttributeTypes["number"] = "number";
1061
+ ModelAttributeTypes["numberSet"] = "numberSet";
1062
+ ModelAttributeTypes["string"] = "string";
1063
+ ModelAttributeTypes["stringSet"] = "stringSet";
1064
+ ModelAttributeTypes["_null"] = "_null";
1065
+ })(ModelAttributeTypes || (ModelAttributeTypes = {}));
1066
+ var ModelSortDirection;
1067
+ (function (ModelSortDirection) {
1068
+ ModelSortDirection["ASC"] = "ASC";
1069
+ ModelSortDirection["DESC"] = "DESC";
1070
+ })(ModelSortDirection || (ModelSortDirection = {}));
1071
+
1072
+ const FIELDS_ENTITY_CONVERSATION = `
1073
+ id
1074
+ tenantId
1075
+ entityId
1076
+ entityAddress
1077
+ interactionChannel
1078
+ interactionProvider
1079
+ isCampaignEngaged
1080
+ campaignId
1081
+ lastCampaignFlowNodeId
1082
+ lastInteractionMessageId
1083
+ metadata
1084
+ lastActivityAt
1085
+ lastMessageAt
1086
+ archivedAt
1087
+ blockedAt
1088
+ createdAt
1089
+ updatedAt
1090
+ deletedAt
1091
+ `;
1092
+ const FIELDS_ENTITY_CONVERSATION_EXPANDED = `
1093
+ id
1094
+ tenantId
1095
+ entityId
1096
+ entity {
1097
+ id
1098
+ externalId
1099
+ tenantId
1100
+ entityTypeId
1101
+ parentId
1102
+ name
1103
+ image {
1104
+ key
1105
+ bucket
1106
+ location
1107
+ }
1108
+ isOrganization
1109
+ email
1110
+ phoneNumber {
1111
+ countryCode
1112
+ dialCode
1113
+ e164Number
1114
+ internationalNumber
1115
+ nationalNumber
1116
+ number
1117
+ }
1118
+ notes
1119
+ customFields
1120
+ preferences {
1121
+ timezoneName
1122
+ language {
1123
+ code
1124
+ nameEn
1125
+ nameLocal
1126
+ }
1127
+ }
1128
+ contactPreferences {
1129
+ allowCall
1130
+ allowEmail
1131
+ allowSMS
1132
+ allowWhatsApp
1133
+ }
1134
+ createdAt
1135
+ updatedAt
1136
+ blockedAt
1137
+ deletedAt
1138
+ }
1139
+ entityAddress
1140
+ interactionChannel
1141
+ interactionProvider
1142
+ isCampaignEngaged
1143
+ campaignId
1144
+ lastCampaignFlowNodeId
1145
+ lastInteractionMessageId
1146
+ metadata
1147
+ lastActivityAt
1148
+ lastMessageAt
1149
+ archivedAt
1150
+ blockedAt
1151
+ createdAt
1152
+ updatedAt
1153
+ deletedAt
1154
+ interactions (limit: 1, sortDirection: ${ModelSortDirection.DESC}) {
1155
+ items {
1156
+ id
1157
+ tenantId
1158
+ entityId
1159
+ entityConversationId
1160
+ teamId
1161
+ widgetId
1162
+ metadata
1163
+ subject
1164
+ direction
1165
+ status
1166
+ last_status
1167
+ hostId
1168
+ startedAt
1169
+ completedAt
1170
+ createdAt
1171
+ updatedAt
1172
+ deletedAt
1173
+ }
1174
+ nextToken
1175
+ }
1176
+ messages (limit: 1, sortDirection: ${ModelSortDirection.DESC}) {
1177
+ items {
1178
+ id
1179
+ externalId
1180
+ endpointId
1181
+ entityConversationId
1182
+ interactionId
1183
+ interactionAttendeeId
1184
+ referenceMessageId
1185
+ body
1186
+ metadata
1187
+ createdAt
1188
+ updatedAt
1189
+ deletedAt
1190
+ messageAttachments {
1191
+ items {
1192
+ id
1193
+ externalId
1194
+ interactionId
1195
+ interactionMessageId
1196
+ interactionId
1197
+ name
1198
+ size
1199
+ type
1200
+ file {
1201
+ key
1202
+ bucket
1203
+ location
1204
+ }
1205
+ createdAt
1206
+ updatedAt
1207
+ deletedAt
1208
+ }
1209
+ nextToken
1210
+ }
1211
+ }
1212
+ nextToken
1213
+ }
1214
+ `;
1215
+ class EntityConversationService {
1216
+ appSyncService;
1217
+ constructor(appSyncService) {
1218
+ this.appSyncService = appSyncService;
1219
+ }
1220
+ async GetEntityConversation(id) {
1221
+ const statement = `query GetEntityConversation($id: ID!) {
1222
+ getEntityConversation(id: $id) {
1223
+ ${FIELDS_ENTITY_CONVERSATION_EXPANDED}
1224
+ }
1225
+ }`;
1226
+ const gqlAPIServiceArguments = { id };
1227
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1228
+ return response.data.getEntityConversation;
1229
+ }
1230
+ async CreateEntityConversation(input, condition) {
1231
+ const statement = `mutation CreateEntityConversation($input: CreateEntityConversationInput!, $condition: ModelEntityConversationConditionInput) {
1232
+ createEntityConversation(input: $input, condition: $condition) {
1233
+ ${FIELDS_ENTITY_CONVERSATION}
1234
+ }
1235
+ }`;
1236
+ const gqlAPIServiceArguments = { input };
1237
+ if (condition) {
1238
+ gqlAPIServiceArguments.condition = condition;
1239
+ }
1240
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1241
+ return response.data.createEntityConversation;
1242
+ }
1243
+ async UpdateEntityConversation(input, condition) {
1244
+ const statement = `mutation UpdateEntityConversation($input: UpdateEntityConversationInput!, $condition: ModelEntityConversationConditionInput) {
1245
+ updateEntityConversation(input: $input, condition: $condition) {
1246
+ ${FIELDS_ENTITY_CONVERSATION}
1247
+ }
1248
+ }`;
1249
+ const gqlAPIServiceArguments = { input };
1250
+ if (condition) {
1251
+ gqlAPIServiceArguments.condition = condition;
1252
+ }
1253
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1254
+ return response.data.updateEntityConversation;
1255
+ }
1256
+ async ListEntityConversationsByTenantIdAndEntityAddress(tenantId, entityAddress, sortDirection, filter, limit, nextToken) {
1257
+ const statement = `query ListEntityConversationsByTenantIdAndEntityAddress($tenantId: ID!, $entityAddress: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelEntityConversationFilterInput, $limit: Int, $nextToken: String) {
1258
+ listEntityConversationsByTenantIdAndEntityAddress(
1259
+ tenantId: $tenantId
1260
+ entityAddress: $entityAddress
1261
+ sortDirection: $sortDirection
1262
+ filter: $filter
1263
+ limit: $limit
1264
+ nextToken: $nextToken
1265
+ ) {
1266
+ items {
1267
+ ${FIELDS_ENTITY_CONVERSATION_EXPANDED}
1268
+ }
1269
+ nextToken
1270
+ }
1271
+ }`;
1272
+ const gqlAPIServiceArguments = { tenantId };
1273
+ if (entityAddress) {
1274
+ gqlAPIServiceArguments.entityAddress = entityAddress;
1275
+ }
1276
+ if (sortDirection) {
1277
+ gqlAPIServiceArguments.sortDirection = sortDirection;
1278
+ }
1279
+ if (filter) {
1280
+ gqlAPIServiceArguments.filter = filter;
1281
+ }
1282
+ if (limit) {
1283
+ gqlAPIServiceArguments.limit = limit;
1284
+ }
1285
+ if (nextToken) {
1286
+ gqlAPIServiceArguments.nextToken = nextToken;
1287
+ }
1288
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1289
+ return response.data.listEntityConversationsByTenantIdAndEntityAddress;
1290
+ }
1291
+ async ListEntityConversationsByTenantIdAndArchivedAt(tenantId, archivedAt, sortDirection, filter, limit, nextToken) {
1292
+ const statement = `query ListEntityConversationsByTenantIdAndArchivedAt($tenantId: ID!, $archivedAt: ModelIntKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelEntityConversationFilterInput, $limit: Int, $nextToken: String) {
1293
+ listEntityConversationsByTenantIdAndArchivedAt(
1294
+ tenantId: $tenantId
1295
+ archivedAt: $archivedAt
1296
+ sortDirection: $sortDirection
1297
+ filter: $filter
1298
+ limit: $limit
1299
+ nextToken: $nextToken
1300
+ ) {
1301
+ items {
1302
+ ${FIELDS_ENTITY_CONVERSATION_EXPANDED}
1303
+ }
1304
+ nextToken
1305
+ }
1306
+ }`;
1307
+ const gqlAPIServiceArguments = { tenantId };
1308
+ if (archivedAt) {
1309
+ gqlAPIServiceArguments.archivedAt = archivedAt;
1310
+ }
1311
+ if (sortDirection) {
1312
+ gqlAPIServiceArguments.sortDirection = sortDirection;
1313
+ }
1314
+ if (filter) {
1315
+ gqlAPIServiceArguments.filter = filter;
1316
+ }
1317
+ if (limit) {
1318
+ gqlAPIServiceArguments.limit = limit;
1319
+ }
1320
+ if (nextToken) {
1321
+ gqlAPIServiceArguments.nextToken = nextToken;
1322
+ }
1323
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1324
+ return response.data.listEntityConversationsByTenantIdAndArchivedAt;
1325
+ }
1326
+ async ListEntityConversationsByTenantIdAndLastMessageAt(tenantId, lastMessageAt, sortDirection, filter, limit, nextToken) {
1327
+ const statement = `query ListEntityConversationsByTenantIdAndLastMessageAt($tenantId: ID!, $lastMessageAt: ModelIntKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelEntityConversationFilterInput, $limit: Int, $nextToken: String) {
1328
+ listEntityConversationsByTenantIdAndLastMessageAt(
1329
+ tenantId: $tenantId
1330
+ lastMessageAt: $lastMessageAt
1331
+ sortDirection: $sortDirection
1332
+ filter: $filter
1333
+ limit: $limit
1334
+ nextToken: $nextToken
1335
+ ) {
1336
+ items {
1337
+ ${FIELDS_ENTITY_CONVERSATION_EXPANDED}
1338
+ }
1339
+ nextToken
1340
+ }
1341
+ }`;
1342
+ const gqlAPIServiceArguments = { tenantId };
1343
+ if (lastMessageAt) {
1344
+ gqlAPIServiceArguments.lastMessageAt = lastMessageAt;
1345
+ }
1346
+ if (sortDirection) {
1347
+ gqlAPIServiceArguments.sortDirection = sortDirection;
1348
+ }
1349
+ if (filter) {
1350
+ gqlAPIServiceArguments.filter = filter;
1351
+ }
1352
+ if (limit) {
1353
+ gqlAPIServiceArguments.limit = limit;
1354
+ }
1355
+ if (nextToken) {
1356
+ gqlAPIServiceArguments.nextToken = nextToken;
1357
+ }
1358
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1359
+ return response.data.listEntityConversationsByTenantIdAndLastMessageAt;
1360
+ }
1361
+ OnEntityConversationByTenantIdListener(tenantId) {
1362
+ const statement = `subscription OnEntityConversationByTenantId($tenantId: ID!) {
1363
+ OnEntityConversationByTenantId(tenantId: $tenantId) {
1364
+ ${FIELDS_ENTITY_CONVERSATION_EXPANDED}
1365
+ }
1366
+ }`;
1367
+ const gqlAPIServiceArguments = { tenantId };
1368
+ return this.appSyncService.subscribe(statement, gqlAPIServiceArguments);
1369
+ /* as Observable<SubscriptionResponse<Pick<__SubscriptionContainer, 'OnEntityConversationByTenantId'>>> */
1370
+ }
1371
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EntityConversationService, deps: [{ token: AppSyncHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
1372
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EntityConversationService, providedIn: 'root' });
1373
+ }
1374
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EntityConversationService, decorators: [{
1375
+ type: Injectable,
1376
+ args: [{
1377
+ providedIn: 'root',
1378
+ }]
1379
+ }], ctorParameters: () => [{ type: AppSyncHelperService }] });
1380
+
1381
+ const ENTITY_SELECTION = /* GraphQL */ `
1382
+ id
1383
+ externalId
1384
+ tenantId
1385
+ entityTypeId
1386
+ entityType {
1387
+ id
1388
+ externalId
1389
+ tenantId
1390
+ name
1391
+ description
1392
+ image {
1393
+ location
1394
+ }
1395
+ createdAt
1396
+ updatedAt
1397
+ deletedAt
1398
+ }
1399
+ parentId
1400
+ parent {
1401
+ id
1402
+ externalId
1403
+ tenantId
1404
+ entityTypeId
1405
+ name
1406
+ image {
1407
+ location
1408
+ }
1409
+ isOrganization
1410
+ email
1411
+ phoneNumber {
1412
+ countryCode
1413
+ dialCode
1414
+ e164Number
1415
+ internationalNumber
1416
+ nationalNumber
1417
+ number
1418
+ }
1419
+ phoneNumberE164
1420
+ createdAt
1421
+ updatedAt
1422
+ blockedAt
1423
+ deletedAt
1424
+ }
1425
+ name
1426
+ image {
1427
+ location
1428
+ }
1429
+ isOrganization
1430
+ email
1431
+ phoneNumber {
1432
+ countryCode
1433
+ dialCode
1434
+ e164Number
1435
+ internationalNumber
1436
+ nationalNumber
1437
+ number
1438
+ }
1439
+ phoneNumberE164
1440
+ preferences {
1441
+ timezoneName
1442
+ language {
1443
+ code
1444
+ nameEn
1445
+ nameLocal
1446
+ }
1447
+ }
1448
+ contactPreferences {
1449
+ allowCall
1450
+ allowEmail
1451
+ allowSMS
1452
+ allowWhatsApp
1453
+ }
1454
+ createdAt
1455
+ updatedAt
1456
+ blockedAt
1457
+ deletedAt
1458
+ `;
1459
+ const ENTITY_SELECTION_MINIMAL = /* GraphQL */ `
1460
+ id
1461
+ externalId
1462
+ tenantId
1463
+ name
1464
+ image {
1465
+ location
1466
+ }
1467
+ email
1468
+ phoneNumber {
1469
+ countryCode
1470
+ dialCode
1471
+ e164Number
1472
+ internationalNumber
1473
+ nationalNumber
1474
+ number
1475
+ }
1476
+ phoneNumberE164
1477
+ preferences {
1478
+ timezoneName
1479
+ language {
1480
+ code
1481
+ nameEn
1482
+ nameLocal
1483
+ }
1484
+ }
1485
+ contactPreferences {
1486
+ allowCall
1487
+ allowEmail
1488
+ allowSMS
1489
+ allowWhatsApp
1490
+ }
1491
+ createdAt
1492
+ updatedAt
1493
+ blockedAt
1494
+ deletedAt
1495
+ `;
1496
+ class EntityService {
1497
+ appSyncService;
1498
+ constructor(appSyncService) {
1499
+ this.appSyncService = appSyncService;
1500
+ }
1501
+ async GetEntity(id) {
1502
+ const statement = /* GraphQL */ `
1503
+ query GetEntity($id: ID!) {
1504
+ getEntity(id: $id) {
1505
+ ${ENTITY_SELECTION_MINIMAL}
1506
+ }
1507
+ }
1508
+ `;
1509
+ const response = await this.appSyncService.query(statement, { id });
1510
+ return response.data.getEntity;
1511
+ }
1512
+ async CreateEntity(input, condition) {
1513
+ const statement = /* GraphQL */ `
1514
+ mutation CreateEntity($input: CreateEntityInput!, $condition: ModelEntityConditionInput) {
1515
+ createEntity(input: $input, condition: $condition) {
1516
+ ${ENTITY_SELECTION_MINIMAL}
1517
+ }
1518
+ }
1519
+ `;
1520
+ const variables = { input };
1521
+ if (condition) {
1522
+ variables.condition = condition;
1523
+ }
1524
+ const response = await this.appSyncService.query(statement, variables);
1525
+ return response.data.createEntity;
1526
+ }
1527
+ async UpdateEntity(input, condition) {
1528
+ const statement = /* GraphQL */ `
1529
+ mutation UpdateEntity($input: UpdateEntityInput!, $condition: ModelEntityConditionInput) {
1530
+ updateEntity(input: $input, condition: $condition) {
1531
+ ${ENTITY_SELECTION_MINIMAL}
1532
+ }
1533
+ }
1534
+ `;
1535
+ const variables = { input };
1536
+ if (condition) {
1537
+ variables.condition = condition;
1538
+ }
1539
+ const response = await this.appSyncService.query(statement, variables);
1540
+ return response.data.updateEntity;
1541
+ }
1542
+ async ListEntitiesByTenantId(tenantId, name, sortDirection, filter, limit, nextToken) {
1543
+ const statement = `query ListEntitiesByTenantId($tenantId: ID!, $name: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelEntityFilterInput, $limit: Int, $nextToken: String) {
1544
+ listEntitiesByTenantId(
1545
+ tenantId: $tenantId
1546
+ name: $name
1547
+ sortDirection: $sortDirection
1548
+ filter: $filter
1549
+ limit: $limit
1550
+ nextToken: $nextToken
1551
+ ) {
1552
+ items {
1553
+ ${ENTITY_SELECTION_MINIMAL}
1554
+ }
1555
+ nextToken
1556
+ }
1557
+ }`;
1558
+ const gqlAPIServiceArguments = {
1559
+ tenantId,
1560
+ };
1561
+ if (name) {
1562
+ gqlAPIServiceArguments.name = name;
1563
+ }
1564
+ if (sortDirection) {
1565
+ gqlAPIServiceArguments.sortDirection = sortDirection;
1566
+ }
1567
+ if (filter) {
1568
+ gqlAPIServiceArguments.filter = filter;
1569
+ }
1570
+ if (limit) {
1571
+ gqlAPIServiceArguments.limit = limit;
1572
+ }
1573
+ if (nextToken) {
1574
+ gqlAPIServiceArguments.nextToken = nextToken;
1575
+ }
1576
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1577
+ return response.data.listEntitiesByTenantId;
1578
+ }
1579
+ async ListEntitiesByTenantIdAndPhoneNumberE164(tenantId, phoneNumberE164, sortDirection, filter, limit, nextToken) {
1580
+ const statement = `query ListEntitiesByTenantIdAndPhoneNumberE164($tenantId: ID!, $phoneNumberE164: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelEntityFilterInput, $limit: Int, $nextToken: String) {
1581
+ listEntitiesByTenantIdAndPhoneNumberE164(
1582
+ tenantId: $tenantId
1583
+ phoneNumberE164: $phoneNumberE164
1584
+ sortDirection: $sortDirection
1585
+ filter: $filter
1586
+ limit: $limit
1587
+ nextToken: $nextToken
1588
+ ) {
1589
+ items {
1590
+ ${ENTITY_SELECTION_MINIMAL}
1591
+ }
1592
+ nextToken
1593
+ }
1594
+ }`;
1595
+ const gqlAPIServiceArguments = {
1596
+ tenantId,
1597
+ };
1598
+ if (phoneNumberE164) {
1599
+ gqlAPIServiceArguments.phoneNumberE164 = phoneNumberE164;
1600
+ }
1601
+ if (sortDirection) {
1602
+ gqlAPIServiceArguments.sortDirection = sortDirection;
1603
+ }
1604
+ if (filter) {
1605
+ gqlAPIServiceArguments.filter = filter;
1606
+ }
1607
+ if (limit) {
1608
+ gqlAPIServiceArguments.limit = limit;
1609
+ }
1610
+ if (nextToken) {
1611
+ gqlAPIServiceArguments.nextToken = nextToken;
1612
+ }
1613
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1614
+ return response.data.listEntitiesByTenantIdAndPhoneNumberE164;
1615
+ }
1616
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EntityService, deps: [{ token: AppSyncHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
1617
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EntityService, providedIn: 'root' });
1618
+ }
1619
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EntityService, decorators: [{
1620
+ type: Injectable,
1621
+ args: [{
1622
+ providedIn: 'root',
1623
+ }]
1624
+ }], ctorParameters: () => [{ type: AppSyncHelperService }] });
1625
+
1626
+ class InteractionEndpointService {
1627
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InteractionEndpointService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1628
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InteractionEndpointService, providedIn: 'root' });
1629
+ }
1630
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InteractionEndpointService, decorators: [{
1631
+ type: Injectable,
1632
+ args: [{
1633
+ providedIn: 'root',
1634
+ }]
1635
+ }] });
1636
+
1637
+ const FIELDS_INTERACTION_WIDGET = `
1638
+ id
1639
+ tenantId
1640
+ channel
1641
+ provider
1642
+ providerAccountId
1643
+ name
1644
+ description
1645
+ configuration
1646
+ isRecordingEnabledByDefault
1647
+ isRecordingEnabledOnDemand
1648
+ isTranscriptionEnabledByDefault
1649
+ isTranscriptionEnabledOnDemand
1650
+ routeConfiguration {
1651
+ teamId
1652
+ routingLogic
1653
+ maxWaitTimeoutSeconds
1654
+ }
1655
+ createdAt
1656
+ updatedAt
1657
+ deletedAt
1658
+ `;
1659
+ class InteractionWidgetService {
1660
+ appSyncService;
1661
+ constructor(appSyncService) {
1662
+ this.appSyncService = appSyncService;
1663
+ }
1664
+ async GetInteractionWidget(id) {
1665
+ const statement = `query GetInteractionWidget($id: ID!) {
1666
+ getInteractionWidget(id: $id) {
1667
+ ${FIELDS_INTERACTION_WIDGET}
1668
+ }
1669
+ }`;
1670
+ const gqlAPIServiceArguments = { id };
1671
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1672
+ return response.data.getInteractionWidget;
1673
+ }
1674
+ async ListInteractionWidgetsByTenantId(tenantId, name, sortDirection, filter, limit, nextToken) {
1675
+ const statement = `query ListInteractionWidgetsByTenantId($tenantId: ID!, $name: ModelStringKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelInteractionWidgetFilterInput, $limit: Int, $nextToken: String) {
1676
+ listInteractionWidgetsByTenantId(
1677
+ tenantId: $tenantId
1678
+ name: $name
1679
+ sortDirection: $sortDirection
1680
+ filter: $filter
1681
+ limit: $limit
1682
+ nextToken: $nextToken
1683
+ ) {
1684
+ items {
1685
+ ${FIELDS_INTERACTION_WIDGET}
1686
+ }
1687
+ nextToken
1688
+ }
1689
+ }`;
1690
+ const gqlAPIServiceArguments = { tenantId };
1691
+ if (name) {
1692
+ gqlAPIServiceArguments.name = name;
1693
+ }
1694
+ if (sortDirection) {
1695
+ gqlAPIServiceArguments.sortDirection = sortDirection;
1696
+ }
1697
+ if (filter) {
1698
+ gqlAPIServiceArguments.filter = filter;
1699
+ }
1700
+ if (limit) {
1701
+ gqlAPIServiceArguments.limit = limit;
1702
+ }
1703
+ if (nextToken) {
1704
+ gqlAPIServiceArguments.nextToken = nextToken;
1705
+ }
1706
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1707
+ return response.data.listInteractionWidgetsByTenantId;
1708
+ }
1709
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InteractionWidgetService, deps: [{ token: AppSyncHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
1710
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InteractionWidgetService, providedIn: 'root' });
1711
+ }
1712
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InteractionWidgetService, decorators: [{
1713
+ type: Injectable,
1714
+ args: [{
1715
+ providedIn: 'root',
1716
+ }]
1717
+ }], ctorParameters: () => [{ type: AppSyncHelperService }] });
1718
+
1719
+ var InteractionChannel;
1720
+ (function (InteractionChannel) {
1721
+ InteractionChannel["EMAIL"] = "EMAIL";
1722
+ InteractionChannel["PHONE"] = "PHONE";
1723
+ InteractionChannel["SMS"] = "SMS";
1724
+ InteractionChannel["WEB_CHAT"] = "WEB_CHAT";
1725
+ InteractionChannel["SOCIAL_CHAT"] = "SOCIAL_CHAT";
1726
+ })(InteractionChannel || (InteractionChannel = {}));
1727
+ var InteractionContext;
1728
+ (function (InteractionContext) {
1729
+ InteractionContext["INTERNAL"] = "INTERNAL";
1730
+ InteractionContext["EXTERNAL"] = "EXTERNAL";
1731
+ })(InteractionContext || (InteractionContext = {}));
1732
+ var InteractionDirection;
1733
+ (function (InteractionDirection) {
1734
+ InteractionDirection["IN"] = "IN";
1735
+ InteractionDirection["OUT"] = "OUT";
1736
+ })(InteractionDirection || (InteractionDirection = {}));
1737
+ var InteractionStatus;
1738
+ (function (InteractionStatus) {
1739
+ InteractionStatus["INITIATED"] = "INITIATED";
1740
+ InteractionStatus["QUEUED"] = "QUEUED";
1741
+ InteractionStatus["RINGING"] = "RINGING";
1742
+ InteractionStatus["CONNECTED_TO_AGENT"] = "CONNECTED_TO_AGENT";
1743
+ InteractionStatus["CONNECTED_TO_BOT"] = "CONNECTED_TO_BOT";
1744
+ InteractionStatus["HELD"] = "HELD";
1745
+ InteractionStatus["DISCONNECTED"] = "DISCONNECTED";
1746
+ InteractionStatus["CANCELLED"] = "CANCELLED";
1747
+ InteractionStatus["REJECTED"] = "REJECTED";
1748
+ InteractionStatus["NO_ANSWER"] = "NO_ANSWER";
1749
+ InteractionStatus["MISSED"] = "MISSED";
1750
+ InteractionStatus["FAILED"] = "FAILED";
1751
+ })(InteractionStatus || (InteractionStatus = {}));
1752
+ var InteractionProvider;
1753
+ (function (InteractionProvider) {
1754
+ InteractionProvider["AVAYA_IPO"] = "AVAYA_IPO";
1755
+ InteractionProvider["TELNYX"] = "TELNYX";
1756
+ InteractionProvider["WHATSAPP"] = "WHATSAPP";
1757
+ InteractionProvider["TELEGRAM"] = "TELEGRAM";
1758
+ InteractionProvider["SNUGDESK"] = "SNUGDESK";
1759
+ })(InteractionProvider || (InteractionProvider = {}));
1760
+ var InteractionRouteLogic;
1761
+ (function (InteractionRouteLogic) {
1762
+ InteractionRouteLogic["MOST_IDLE_AGENT"] = "MOST_IDLE_AGENT";
1763
+ InteractionRouteLogic["PARALLEL"] = "PARALLEL";
1764
+ })(InteractionRouteLogic || (InteractionRouteLogic = {}));
1765
+ const FIELDS_INTERACTION = `
1766
+ id
1767
+ tenantId
1768
+ widgetId
1769
+ endpointId
1770
+ entityConversationId
1771
+ entityId
1772
+ teamId
1773
+ hostId
1774
+ providerInteractionId
1775
+ channel
1776
+ provider
1777
+ context
1778
+ direction
1779
+ status
1780
+ last_status
1781
+ metadata
1782
+ subject
1783
+ routeConfiguration {
1784
+ teamId
1785
+ routingLogic
1786
+ maxWaitTimeoutSeconds
1787
+ }
1788
+ startedAt
1789
+ completedAt
1790
+ duration
1791
+ summary
1792
+ createdAt
1793
+ updatedAt
1794
+ deletedAt
1795
+ `;
1796
+ const FIELDS_INTERACTION_EXPANDED = `
1797
+ id
1798
+ tenantId
1799
+ widgetId
1800
+ widget {
1801
+ id
1802
+ tenantId
1803
+ channel
1804
+ provider
1805
+ providerAccountId
1806
+ name
1807
+ description
1808
+ configuration
1809
+ isRecordingEnabledByDefault
1810
+ isRecordingEnabledOnDemand
1811
+ isTranscriptionEnabledByDefault
1812
+ isTranscriptionEnabledOnDemand
1813
+ createdAt
1814
+ updatedAt
1815
+ deletedAt
1816
+ }
1817
+ endpointId
1818
+ endpoint {
1819
+ id
1820
+ externalId
1821
+ tenantId
1822
+ widgetId
1823
+ address
1824
+ configuration
1825
+ createdAt
1826
+ updatedAt
1827
+ deletedAt
1828
+ }
1829
+ entityConversationId
1830
+ entityConversation {
1831
+ id
1832
+ tenantId
1833
+ entityId
1834
+ entityAddress
1835
+ interactionChannel
1836
+ interactionProvider
1837
+ isCampaignEngaged
1838
+ campaignId
1839
+ lastCampaignFlowNodeId
1840
+ lastInteractionMessageId
1841
+ metadata
1842
+ lastActivityAt
1843
+ lastMessageAt
1844
+ archivedAt
1845
+ blockedAt
1846
+ createdAt
1847
+ updatedAt
1848
+ deletedAt
1849
+ }
1850
+ entityId
1851
+ entity {
1852
+ id
1853
+ externalId
1854
+ tenantId
1855
+ entityTypeId
1856
+ entityType {
1857
+ id
1858
+ externalId
1859
+ name
1860
+ description
1861
+ createdAt
1862
+ updatedAt
1863
+ deletedAt
1864
+ }
1865
+ parentId
1866
+ name
1867
+ image {
1868
+ key
1869
+ bucket
1870
+ location
1871
+ }
1872
+ email
1873
+ phoneNumber {
1874
+ countryCode
1875
+ dialCode
1876
+ e164Number
1877
+ internationalNumber
1878
+ nationalNumber
1879
+ number
1880
+ }
1881
+ phoneNumberE164
1882
+ isOrganization
1883
+ notes
1884
+ customFields
1885
+ createdAt
1886
+ updatedAt
1887
+ blockedAt
1888
+ deletedAt
1889
+ }
1890
+ teamId
1891
+ team {
1892
+ id
1893
+ tenantId
1894
+ name
1895
+ description
1896
+ createdAt
1897
+ updatedAt
1898
+ deletedAt
1899
+ }
1900
+ hostId
1901
+ host {
1902
+ id
1903
+ interactionId
1904
+ entityId
1905
+ teamId
1906
+ userId
1907
+ createdAt
1908
+ updatedAt
1909
+ deletedAt
1910
+ }
1911
+ providerInteractionId
1912
+ channel
1913
+ provider
1914
+ context
1915
+ direction
1916
+ status
1917
+ last_status
1918
+ metadata
1919
+ subject
1920
+ routeConfiguration {
1921
+ teamId
1922
+ routingLogic
1923
+ maxWaitTimeoutSeconds
1924
+ }
1925
+ startedAt
1926
+ completedAt
1927
+ duration
1928
+ summary
1929
+ temp_isLocked
1930
+ temp_isAvailableTenantIdUnion
1931
+ createdAt
1932
+ updatedAt
1933
+ deletedAt
1934
+ `;
1935
+ const FIELDS_INTERACTION_ATTENDEE = `
1936
+ id
1937
+ interactionId
1938
+ entityId
1939
+ interactionWidgetSessionId
1940
+ teamId
1941
+ userId
1942
+ userSessionId
1943
+ name
1944
+ metadata
1945
+ customFields
1946
+ isAdministrator
1947
+ joinedAt
1948
+ exitedAt
1949
+ createdAt
1950
+ updatedAt
1951
+ deletedAt
1952
+ `;
1953
+ const FIELDS_INTERACTION_ATTENDEE_EXPANDED = `
1954
+ id
1955
+ interactionId
1956
+ entityId
1957
+ entity {
1958
+ id
1959
+ externalId
1960
+ tenantId
1961
+ entityTypeId
1962
+ entityType {
1963
+ id
1964
+ externalId
1965
+ name
1966
+ description
1967
+ createdAt
1968
+ updatedAt
1969
+ deletedAt
1970
+ }
1971
+ parentId
1972
+ name
1973
+ image {
1974
+ key
1975
+ bucket
1976
+ location
1977
+ }
1978
+ email
1979
+ phoneNumber {
1980
+ countryCode
1981
+ dialCode
1982
+ e164Number
1983
+ internationalNumber
1984
+ nationalNumber
1985
+ number
1986
+ }
1987
+ phoneNumberE164
1988
+ isOrganization
1989
+ notes
1990
+ customFields
1991
+ createdAt
1992
+ updatedAt
1993
+ blockedAt
1994
+ deletedAt
1995
+ }
1996
+ interactionWidgetSessionId
1997
+ teamId
1998
+ team {
1999
+ id
2000
+ tenantId
2001
+ name
2002
+ description
2003
+ image {
2004
+ key
2005
+ bucket
2006
+ location
2007
+ }
2008
+ createdAt
2009
+ updatedAt
2010
+ deletedAt
2011
+ ticketFields
2012
+ }
2013
+ userId
2014
+ user {
2015
+ id
2016
+ externalId
2017
+ tenantId
2018
+ name
2019
+ image {
2020
+ key
2021
+ bucket
2022
+ location
2023
+ }
2024
+ email
2025
+ phoneNumber {
2026
+ countryCode
2027
+ dialCode
2028
+ e164Number
2029
+ internationalNumber
2030
+ nationalNumber
2031
+ number
2032
+ }
2033
+ type
2034
+ preferences {
2035
+ timezoneName
2036
+ language {
2037
+ code
2038
+ nameEn
2039
+ nameLocal
2040
+ }
2041
+ }
2042
+ notificationSettings {
2043
+ allowPush
2044
+ allowEmail
2045
+ allowSMS
2046
+ allowWhatsApp
2047
+ }
2048
+ activatedAt
2049
+ blockedAt
2050
+ createdAt
2051
+ updatedAt
2052
+ deletedAt
2053
+ }
2054
+ userSessionId
2055
+ name
2056
+ metadata
2057
+ customFields
2058
+ isAdministrator
2059
+ joinedAt
2060
+ exitedAt
2061
+ createdAt
2062
+ updatedAt
2063
+ deletedAt
2064
+ `;
2065
+ const FIELDS_INTERACTION_INVITEE = `
2066
+ id
2067
+ interactionId
2068
+ interaction {
2069
+ ${FIELDS_INTERACTION}
2070
+ }
2071
+ entityId
2072
+ entity {
2073
+ id
2074
+ externalId
2075
+ tenantId
2076
+ entityTypeId
2077
+ entityType {
2078
+ id
2079
+ externalId
2080
+ name
2081
+ description
2082
+ createdAt
2083
+ updatedAt
2084
+ deletedAt
2085
+ }
2086
+ parentId
2087
+ name
2088
+ image {
2089
+ key
2090
+ bucket
2091
+ location
2092
+ }
2093
+ email
2094
+ phoneNumber {
2095
+ countryCode
2096
+ dialCode
2097
+ e164Number
2098
+ internationalNumber
2099
+ nationalNumber
2100
+ number
2101
+ }
2102
+ phoneNumberE164
2103
+ isOrganization
2104
+ notes
2105
+ customFields
2106
+ createdAt
2107
+ updatedAt
2108
+ blockedAt
2109
+ deletedAt
2110
+ }
2111
+ teamId
2112
+ userId
2113
+ isAdministrator
2114
+ temp_expiringAt
2115
+ expiredAt
2116
+ createdAt
2117
+ updatedAt
2118
+ deletedAt
2119
+ `;
2120
+ const FIELDS_INTERACTION_MESSAGE_ATTACHMENT = `
2121
+ id
2122
+ externalId
2123
+ interactionId
2124
+ interactionMessageId
2125
+ name
2126
+ size
2127
+ type
2128
+ file {
2129
+ key
2130
+ bucket
2131
+ location
2132
+ }
2133
+ createdAt
2134
+ updatedAt
2135
+ deletedAt
2136
+ `;
2137
+ const FIELDS_INTERACTION_MESSAGE = `
2138
+ id
2139
+ externalId
2140
+ endpointId
2141
+ endpoint {
2142
+ id
2143
+ externalId
2144
+ tenantId
2145
+ widgetId
2146
+ address
2147
+ configuration
2148
+ createdAt
2149
+ updatedAt
2150
+ deletedAt
2151
+ }
2152
+ campaignId
2153
+ campaignFlowNodeId
2154
+ entityConversationId
2155
+ interactionId
2156
+ interactionAttendeeId
2157
+ interactionAttendee {
2158
+ id
2159
+ interactionId
2160
+ entityId
2161
+ interactionWidgetSessionId
2162
+ teamId
2163
+ userId
2164
+ userSessionId
2165
+ name
2166
+ metadata
2167
+ customFields
2168
+ isAdministrator
2169
+ joinedAt
2170
+ exitedAt
2171
+ createdAt
2172
+ updatedAt
2173
+ deletedAt
2174
+ }
2175
+ body
2176
+ metadata
2177
+ referenceMessageId
2178
+ createdAt
2179
+ updatedAt
2180
+ deletedAt
2181
+ messageAttachments {
2182
+ items {
2183
+ ${FIELDS_INTERACTION_MESSAGE_ATTACHMENT}
2184
+ }
2185
+ nextToken
2186
+ }
2187
+ `;
2188
+ const FIELDS_INTERACTION_MESSAGE_MINIMAL = `
2189
+ id
2190
+ externalId
2191
+ endpointId
2192
+ campaignId
2193
+ campaignFlowNodeId
2194
+ entityConversationId
2195
+ interactionId
2196
+ interactionAttendeeId
2197
+ body
2198
+ metadata
2199
+ referenceMessageId
2200
+ createdAt
2201
+ updatedAt
2202
+ deletedAt
2203
+ messageAttachments {
2204
+ items {
2205
+ ${FIELDS_INTERACTION_MESSAGE_ATTACHMENT}
2206
+ }
2207
+ nextToken
2208
+ }
2209
+ `;
2210
+ class InteractionService {
2211
+ appSyncService;
2212
+ newInteractionInviteObservable$ = new BehaviorSubject(undefined);
2213
+ constructor(appSyncService) {
2214
+ this.appSyncService = appSyncService;
2215
+ }
2216
+ async GetInteraction(id) {
2217
+ const statement = `query GetInteraction($id: ID!) {
2218
+ getInteraction(id: $id) {
2219
+ ${FIELDS_INTERACTION_EXPANDED}
2220
+ }
2221
+ }`;
2222
+ const gqlAPIServiceArguments = { id };
2223
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2224
+ return response.data.getInteraction;
2225
+ }
2226
+ async GetInteractionAttendee(id) {
2227
+ const statement = `query GetInteractionAttendee($id: ID!) {
2228
+ getInteractionAttendee(id: $id) {
2229
+ ${FIELDS_INTERACTION_ATTENDEE}
2230
+ }
2231
+ }`;
2232
+ const gqlAPIServiceArguments = { id };
2233
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2234
+ return response.data.getInteractionAttendee;
2235
+ }
2236
+ async GetInteractionMessage(id) {
2237
+ const statement = `query GetInteractionMessage($id: ID!) {
2238
+ getInteractionMessage(id: $id) {
2239
+ ${FIELDS_INTERACTION_MESSAGE}
2240
+ }
2241
+ }`;
2242
+ const gqlAPIServiceArguments = {
2243
+ id,
2244
+ };
2245
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2246
+ return response.data.getInteractionMessage;
2247
+ }
2248
+ async CreateInteraction(input, condition) {
2249
+ const statement = `mutation CreateInteraction($input: CreateInteractionInput!, $condition: ModelInteractionConditionInput) {
2250
+ createInteraction(input: $input, condition: $condition) {
2251
+ ${FIELDS_INTERACTION}
2252
+ }
2253
+ }`;
2254
+ const gqlAPIServiceArguments = { input };
2255
+ if (condition) {
2256
+ gqlAPIServiceArguments.condition = condition;
2257
+ }
2258
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2259
+ return response.data.createInteraction;
2260
+ }
2261
+ async UpdateInteraction(input, condition) {
2262
+ const statement = `mutation UpdateInteraction($input: UpdateInteractionInput!, $condition: ModelInteractionConditionInput) {
2263
+ updateInteraction(input: $input, condition: $condition) {
2264
+ ${FIELDS_INTERACTION}
2265
+ }
2266
+ }`;
2267
+ const gqlAPIServiceArguments = { input };
2268
+ if (condition) {
2269
+ gqlAPIServiceArguments.condition = condition;
2270
+ }
2271
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2272
+ return response.data.updateInteraction;
2273
+ }
2274
+ async CreateInteractionAttendee(input, condition) {
2275
+ const statement = `mutation CreateInteractionAttendee($input: CreateInteractionAttendeeInput!, $condition: ModelInteractionAttendeeConditionInput) {
2276
+ createInteractionAttendee(input: $input, condition: $condition) {
2277
+ ${FIELDS_INTERACTION_ATTENDEE}
2278
+ }
2279
+ }`;
2280
+ const gqlAPIServiceArguments = { input };
2281
+ if (condition) {
2282
+ gqlAPIServiceArguments.condition = condition;
2283
+ }
2284
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2285
+ return response.data.createInteractionAttendee;
2286
+ }
2287
+ async CreateInteractionMessage(input, condition) {
2288
+ const statement = `mutation CreateInteractionMessage($input: CreateInteractionMessageInput!, $condition: ModelInteractionMessageConditionInput) {
2289
+ createInteractionMessage(input: $input, condition: $condition) {
2290
+ ${FIELDS_INTERACTION_MESSAGE_MINIMAL}
2291
+ }
2292
+ }`;
2293
+ const gqlAPIServiceArguments = { input };
2294
+ if (condition) {
2295
+ gqlAPIServiceArguments.condition = condition;
2296
+ }
2297
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2298
+ return response.data.createInteractionMessage;
2299
+ }
2300
+ async CreateInteractionMessageAttachment(input, condition) {
2301
+ const statement = `mutation CreateInteractionMessageAttachment($input: CreateInteractionMessageAttachmentInput!, $condition: ModelInteractionMessageAttachmentConditionInput) {
2302
+ createInteractionMessageAttachment(input: $input, condition: $condition) {
2303
+ ${FIELDS_INTERACTION_MESSAGE_ATTACHMENT}
2304
+ }
2305
+ }`;
2306
+ const gqlAPIServiceArguments = { input };
2307
+ if (condition) {
2308
+ gqlAPIServiceArguments.condition = condition;
2309
+ }
2310
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2311
+ return response.data.createInteractionMessageAttachment;
2312
+ }
2313
+ async ListInteractionInviteesByUserId(userId, createdAt, sortDirection, filter, limit, nextToken) {
2314
+ const statement = `query ListInteractionInviteesByUserId($userId: ID!, $createdAt: ModelIntKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelInteractionInviteeFilterInput, $limit: Int, $nextToken: String) {
2315
+ listInteractionInviteesByUserId(
2316
+ userId: $userId
2317
+ createdAt: $createdAt
2318
+ sortDirection: $sortDirection
2319
+ filter: $filter
2320
+ limit: $limit
2321
+ nextToken: $nextToken
2322
+ ) {
2323
+ items {
2324
+ ${FIELDS_INTERACTION_INVITEE}
2325
+ }
2326
+ nextToken
2327
+ }
2328
+ }`;
2329
+ const gqlAPIServiceArguments = { userId };
2330
+ if (createdAt) {
2331
+ gqlAPIServiceArguments.createdAt = createdAt;
2332
+ }
2333
+ if (sortDirection) {
2334
+ gqlAPIServiceArguments.sortDirection = sortDirection;
2335
+ }
2336
+ if (filter) {
2337
+ gqlAPIServiceArguments.filter = filter;
2338
+ }
2339
+ if (limit) {
2340
+ gqlAPIServiceArguments.limit = limit;
2341
+ }
2342
+ if (nextToken) {
2343
+ gqlAPIServiceArguments.nextToken = nextToken;
2344
+ }
2345
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2346
+ return response.data.listInteractionInviteesByUserId;
2347
+ }
2348
+ async ListInteractionAttendeesByInteractionIdAndEntityId(interactionId, entityId, sortDirection, filter, limit, nextToken) {
2349
+ const statement = `query ListInteractionAttendeesByInteractionIdAndEntityId($interactionId: ID!, $entityId: ModelIDKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelInteractionAttendeeFilterInput, $limit: Int, $nextToken: String) {
2350
+ listInteractionAttendeesByInteractionIdAndEntityId(
2351
+ interactionId: $interactionId
2352
+ entityId: $entityId
2353
+ sortDirection: $sortDirection
2354
+ filter: $filter
2355
+ limit: $limit
2356
+ nextToken: $nextToken
2357
+ ) {
2358
+ items {
2359
+ ${FIELDS_INTERACTION_ATTENDEE}
2360
+ }
2361
+ nextToken
2362
+ }
2363
+ }`;
2364
+ const gqlAPIServiceArguments = { interactionId };
2365
+ if (entityId) {
2366
+ gqlAPIServiceArguments.entityId = entityId;
2367
+ }
2368
+ if (sortDirection) {
2369
+ gqlAPIServiceArguments.sortDirection = sortDirection;
2370
+ }
2371
+ if (filter) {
2372
+ gqlAPIServiceArguments.filter = filter;
2373
+ }
2374
+ if (limit) {
2375
+ gqlAPIServiceArguments.limit = limit;
2376
+ }
2377
+ if (nextToken) {
2378
+ gqlAPIServiceArguments.nextToken = nextToken;
2379
+ }
2380
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2381
+ return response.data.listInteractionAttendeesByInteractionIdAndEntityId;
2382
+ }
2383
+ async ListInteractionAttendeesByInteractionIdAndUserId(interactionId, userId, sortDirection, filter, limit, nextToken) {
2384
+ const statement = `query ListInteractionAttendeesByInteractionIdAndUserId($interactionId: ID!, $userId: ModelIDKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelInteractionAttendeeFilterInput, $limit: Int, $nextToken: String) {
2385
+ listInteractionAttendeesByInteractionIdAndUserId(
2386
+ interactionId: $interactionId
2387
+ userId: $userId
2388
+ sortDirection: $sortDirection
2389
+ filter: $filter
2390
+ limit: $limit
2391
+ nextToken: $nextToken
2392
+ ) {
2393
+ items {
2394
+ ${FIELDS_INTERACTION_ATTENDEE}
2395
+ }
2396
+ nextToken
2397
+ }
2398
+ }`;
2399
+ const gqlAPIServiceArguments = { interactionId };
2400
+ if (userId) {
2401
+ gqlAPIServiceArguments.userId = userId;
2402
+ }
2403
+ if (sortDirection) {
2404
+ gqlAPIServiceArguments.sortDirection = sortDirection;
2405
+ }
2406
+ if (filter) {
2407
+ gqlAPIServiceArguments.filter = filter;
2408
+ }
2409
+ if (limit) {
2410
+ gqlAPIServiceArguments.limit = limit;
2411
+ }
2412
+ if (nextToken) {
2413
+ gqlAPIServiceArguments.nextToken = nextToken;
2414
+ }
2415
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2416
+ return response.data.listInteractionAttendeesByInteractionIdAndUserId;
2417
+ }
2418
+ async ListInteractionMessagesByEntityConversationId(entityConversationId, createdAt, sortDirection, filter, limit, nextToken) {
2419
+ const statement = `query ListInteractionMessagesByEntityConversationId($entityConversationId: ID!, $createdAt: ModelIntKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelInteractionMessageFilterInput, $limit: Int, $nextToken: String) {
2420
+ listInteractionMessagesByEntityConversationId(
2421
+ entityConversationId: $entityConversationId
2422
+ createdAt: $createdAt
2423
+ sortDirection: $sortDirection
2424
+ filter: $filter
2425
+ limit: $limit
2426
+ nextToken: $nextToken
2427
+ ) {
2428
+ items {
2429
+ ${FIELDS_INTERACTION_MESSAGE}
2430
+ }
2431
+ nextToken
2432
+ }
2433
+ }`;
2434
+ const gqlAPIServiceArguments = { entityConversationId };
2435
+ if (createdAt) {
2436
+ gqlAPIServiceArguments.createdAt = createdAt;
2437
+ }
2438
+ if (sortDirection) {
2439
+ gqlAPIServiceArguments.sortDirection = sortDirection;
2440
+ }
2441
+ if (filter) {
2442
+ gqlAPIServiceArguments.filter = filter;
2443
+ }
2444
+ if (limit) {
2445
+ gqlAPIServiceArguments.limit = limit;
2446
+ }
2447
+ if (nextToken) {
2448
+ gqlAPIServiceArguments.nextToken = nextToken;
2449
+ }
2450
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2451
+ return response.data.listInteractionMessagesByEntityConversationId;
2452
+ }
2453
+ async ListInteractionMessagesByExternalMessageId(externalMessageId, createdAt, sortDirection, filter, limit, nextToken) {
2454
+ const statement = `query ListInteractionMessagesByExternalMessageId($externalMessageId: ID!, $createdAt: ModelIntKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelInteractionMessageFilterInput, $limit: Int, $nextToken: String) {
2455
+ listInteractionMessagesByExternalMessageId(
2456
+ externalMessageId: $externalMessageId
2457
+ createdAt: $createdAt
2458
+ sortDirection: $sortDirection
2459
+ filter: $filter
2460
+ limit: $limit
2461
+ nextToken: $nextToken
2462
+ ) {
2463
+ items {
2464
+ ${FIELDS_INTERACTION_MESSAGE}
2465
+ }
2466
+ nextToken
2467
+ }
2468
+ }`;
2469
+ const gqlAPIServiceArguments = { externalMessageId };
2470
+ if (createdAt) {
2471
+ gqlAPIServiceArguments.createdAt = createdAt;
2472
+ }
2473
+ if (sortDirection) {
2474
+ gqlAPIServiceArguments.sortDirection = sortDirection;
2475
+ }
2476
+ if (filter) {
2477
+ gqlAPIServiceArguments.filter = filter;
2478
+ }
2479
+ if (limit) {
2480
+ gqlAPIServiceArguments.limit = limit;
2481
+ }
2482
+ if (nextToken) {
2483
+ gqlAPIServiceArguments.nextToken = nextToken;
2484
+ }
2485
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2486
+ return response.data.listInteractionMessagesByExternalMessageId;
2487
+ }
2488
+ async ListInteractionMessagesByInteractionAttendeeId(interactionAttendeeId, createdAt, sortDirection, filter, limit, nextToken) {
2489
+ const statement = `query ListInteractionMessagesByInteractionAttendeeId($interactionAttendeeId: ID!, $createdAt: ModelIntKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelInteractionMessageFilterInput, $limit: Int, $nextToken: String) {
2490
+ listInteractionMessagesByInteractionAttendeeId(
2491
+ interactionAttendeeId: $interactionAttendeeId
2492
+ createdAt: $createdAt
2493
+ sortDirection: $sortDirection
2494
+ filter: $filter
2495
+ limit: $limit
2496
+ nextToken: $nextToken
2497
+ ) {
2498
+ items {
2499
+ ${FIELDS_INTERACTION_MESSAGE}
2500
+ }
2501
+ nextToken
2502
+ }
2503
+ }`;
2504
+ const gqlAPIServiceArguments = { interactionAttendeeId };
2505
+ if (createdAt) {
2506
+ gqlAPIServiceArguments.createdAt = createdAt;
2507
+ }
2508
+ if (sortDirection) {
2509
+ gqlAPIServiceArguments.sortDirection = sortDirection;
2510
+ }
2511
+ if (filter) {
2512
+ gqlAPIServiceArguments.filter = filter;
2513
+ }
2514
+ if (limit) {
2515
+ gqlAPIServiceArguments.limit = limit;
2516
+ }
2517
+ if (nextToken) {
2518
+ gqlAPIServiceArguments.nextToken = nextToken;
2519
+ }
2520
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2521
+ return response.data.listInteractionMessagesByInteractionAttendeeId;
2522
+ }
2523
+ async ListInteractionMessageAttachmentsByInteractionMessageId(interactionMessageId, createdAt, sortDirection, filter, limit, nextToken) {
2524
+ const statement = `query ListInteractionMessageAttachmentsByInteractionMessageId($interactionMessageId: ID!, $createdAt: ModelIntKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelInteractionMessageAttachmentFilterInput, $limit: Int, $nextToken: String) {
2525
+ listInteractionMessageAttachmentsByInteractionMessageId(
2526
+ interactionMessageId: $interactionMessageId
2527
+ createdAt: $createdAt
2528
+ sortDirection: $sortDirection
2529
+ filter: $filter
2530
+ limit: $limit
2531
+ nextToken: $nextToken
2532
+ ) {
2533
+ items {
2534
+ ${FIELDS_INTERACTION_MESSAGE_ATTACHMENT}
2535
+ }
2536
+ nextToken
2537
+ }
2538
+ }`;
2539
+ const gqlAPIServiceArguments = {
2540
+ interactionMessageId,
2541
+ };
2542
+ if (createdAt) {
2543
+ gqlAPIServiceArguments.createdAt = createdAt;
2544
+ }
2545
+ if (sortDirection) {
2546
+ gqlAPIServiceArguments.sortDirection = sortDirection;
2547
+ }
2548
+ if (filter) {
2549
+ gqlAPIServiceArguments.filter = filter;
2550
+ }
2551
+ if (limit) {
2552
+ gqlAPIServiceArguments.limit = limit;
2553
+ }
2554
+ if (nextToken) {
2555
+ gqlAPIServiceArguments.nextToken = nextToken;
2556
+ }
2557
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2558
+ return response.data.listInteractionMessageAttachmentsByInteractionMessageId;
2559
+ }
2560
+ OnInteractionInviteeByUserIdListener(userId) {
2561
+ const statement = `subscription OnInteractionInviteeByUserId($userId: ID!) {
2562
+ OnInteractionInviteeByUserId(userId: $userId) {
2563
+ ${FIELDS_INTERACTION_INVITEE}
2564
+ }
2565
+ }`;
2566
+ const gqlAPIServiceArguments = { userId };
2567
+ return this.appSyncService.subscribe(statement, gqlAPIServiceArguments);
2568
+ /* as Observable<SubscriptionResponse<Pick<__SubscriptionContainer, "OnInteractionInviteeByUserId">>>; */
2569
+ }
2570
+ OnInteractionMessageByEntityConversationIdListener(entityConversationId) {
2571
+ const statement = `subscription OnInteractionMessageByEntityConversationId($entityConversationId: ID!) {
2572
+ OnInteractionMessageByEntityConversationId(
2573
+ entityConversationId: $entityConversationId
2574
+ ) {
2575
+ ${FIELDS_INTERACTION_MESSAGE}
2576
+ }
2577
+ }`;
2578
+ const gqlAPIServiceArguments = { entityConversationId };
2579
+ return this.appSyncService.subscribe(statement, gqlAPIServiceArguments);
2580
+ /* as Observable<SubscriptionResponse<Pick<__SubscriptionContainer, 'OnInteractionMessageByEntityConversationId'>>>; */
2581
+ }
2582
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InteractionService, deps: [{ token: AppSyncHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
2583
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InteractionService, providedIn: 'root' });
2584
+ }
2585
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: InteractionService, decorators: [{
2586
+ type: Injectable,
2587
+ args: [{
2588
+ providedIn: 'root',
2589
+ }]
2590
+ }], ctorParameters: () => [{ type: AppSyncHelperService }] });
2591
+
2592
+ const FIELDS_TENANT_EXPANDED = `
2593
+ id
2594
+ externalId
2595
+ tenantDomain
2596
+ organizationName
2597
+ websiteURL
2598
+ image {
2599
+ key
2600
+ bucket
2601
+ location
2602
+ }
2603
+ preferences {
2604
+ timezoneName
2605
+ language {
2606
+ code
2607
+ nameEn
2608
+ nameLocal
2609
+ }
2610
+ allowUserToChangePreferences
2611
+ }
2612
+ security {
2613
+ domainValidationTokenExpiry
2614
+ userValidationTokenExpiry
2615
+ secretTokenExpiry
2616
+ sessionTokenExpiry
2617
+ sessionIdleTimeout
2618
+ }
2619
+ activatedAt
2620
+ blockedAt
2621
+ createdAt
2622
+ updatedAt
2623
+ deletedAt
2624
+ `;
916
2625
  class TenantService {
917
- graphQLHelperService;
918
- constructor(graphQLHelperService) {
919
- this.graphQLHelperService = graphQLHelperService;
2626
+ appSyncService;
2627
+ constructor(appSyncService) {
2628
+ this.appSyncService = appSyncService;
920
2629
  }
921
2630
  async getTenantById(id) {
922
2631
  if (!id || !uuid.validate(id)) {
923
2632
  throw { code: 400, message: `Invalid id: ${id}` };
924
2633
  }
925
- const res_getTenant = await this.GetTenant(id);
926
- // console.debug('res_getTenant: ', res_getTenant);
927
- if (!res_getTenant || !!res_getTenant.deletedAt) {
2634
+ const tenant = await this.GetTenant(id);
2635
+ if (!tenant || !!tenant.deletedAt) {
928
2636
  throw { code: 400, message: `Tenant not found` };
929
2637
  }
930
- else if (!res_getTenant.activatedAt || !!res_getTenant.blockedAt) {
931
- throw {
932
- code: 403,
933
- message: `Tenant not activated or subscription has lapsed.`,
934
- };
2638
+ if (!tenant.activatedAt || !!tenant.blockedAt) {
2639
+ throw { code: 403, message: `Tenant not activated or subscription has lapsed.` };
935
2640
  }
936
- return res_getTenant;
2641
+ return tenant;
937
2642
  }
938
2643
  async GetTenant(id) {
939
2644
  const statement = `query GetTenant($id: ID!) {
940
2645
  getTenant(id: $id) {
941
- id
942
- tenantDomain
943
- organizationName
944
- websiteURL
945
- image {
946
- key
947
- bucket
948
- location
949
- }
950
- preferences {
951
- timezoneName
952
- language {
953
- code
954
- nameEn
955
- nameLocal
956
- }
957
- allowUserToChangePreferences
958
- }
959
- security {
960
- domainValidationTokenExpiry
961
- userValidationTokenExpiry
962
- secretTokenExpiry
963
- sessionTokenExpiry
964
- sessionIdleTimeout
965
- }
966
- activatedAt
967
- blockedAt
968
- createdAt
969
- updatedAt
970
- deletedAt
971
- interactionWidgets {
972
- nextToken
2646
+ ${FIELDS_TENANT_EXPANDED}
2647
+ }
2648
+ }`;
2649
+ const gqlAPIServiceArguments = { id };
2650
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2651
+ return response.data?.getTenant;
2652
+ }
2653
+ OnTenantByIdListener(id) {
2654
+ const statement = `subscription OnTenantById($id: ID!) {
2655
+ OnTenantById(id: $id) {
2656
+ ${FIELDS_TENANT_EXPANDED}
2657
+ }
2658
+ }`;
2659
+ const gqlAPIServiceArguments = { id };
2660
+ return this.appSyncService.subscribe(statement, gqlAPIServiceArguments);
2661
+ /* as Observable<SubscriptionResponse<Pick<__SubscriptionContainer, "OnTenantById">>>; */
2662
+ }
2663
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TenantService, deps: [{ token: AppSyncHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
2664
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TenantService, providedIn: 'root' });
2665
+ }
2666
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: TenantService, decorators: [{
2667
+ type: Injectable,
2668
+ args: [{
2669
+ providedIn: 'root',
2670
+ }]
2671
+ }], ctorParameters: () => [{ type: AppSyncHelperService }] });
2672
+
2673
+ const USER_SESSION_FIELDS = `
2674
+ id
2675
+ tenantId
2676
+ userId
2677
+ ipDetails
2678
+ status
2679
+ teamIds
2680
+ temp_isLocked
2681
+ temp_isAvailableTenantIdUnion
2682
+ createdAt
2683
+ updatedAt
2684
+ expiryAt
2685
+ loggedOutAt
2686
+ blockedAt
2687
+ `;
2688
+ class UserSessionService {
2689
+ appSyncService;
2690
+ constructor(appSyncService) {
2691
+ this.appSyncService = appSyncService;
2692
+ }
2693
+ async getUserSessionById(id) {
2694
+ if (!id || !uuid.validate(id)) {
2695
+ throw { code: 400, message: `Invalid id: ${id}` };
2696
+ }
2697
+ return await this.GetUserSession(id);
2698
+ }
2699
+ async GetUserSession(id) {
2700
+ const statement = `query GetUserSession($id: ID!) {
2701
+ getUserSession(id: $id) {
2702
+ ${USER_SESSION_FIELDS}
2703
+ }
2704
+ }`;
2705
+ const gqlAPIServiceArguments = { id };
2706
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2707
+ return response.data.getUserSession;
2708
+ }
2709
+ async ListUserSessionsByUserId(userId, createdAt, sortDirection, filter, limit, nextToken) {
2710
+ const statement = `query ListUserSessionsByUserId($userId: ID!, $createdAt: ModelIntKeyConditionInput, $sortDirection: ModelSortDirection, $filter: ModelUserSessionFilterInput, $limit: Int, $nextToken: String) {
2711
+ listUserSessionsByUserId(userId: $userId, createdAt: $createdAt, sortDirection: $sortDirection, filter: $filter, limit: $limit, nextToken: $nextToken) {
2712
+ items {
2713
+ ${USER_SESSION_FIELDS}
973
2714
  }
2715
+ nextToken
974
2716
  }
975
2717
  }`;
976
2718
  const gqlAPIServiceArguments = {
977
- id,
2719
+ userId,
978
2720
  };
979
- const response = await this.graphQLHelperService.executeQuery(statement, gqlAPIServiceArguments);
980
- return response.data.getTenant;
2721
+ if (createdAt) {
2722
+ gqlAPIServiceArguments.createdAt = createdAt;
2723
+ }
2724
+ if (sortDirection) {
2725
+ gqlAPIServiceArguments.sortDirection = sortDirection;
2726
+ }
2727
+ if (filter) {
2728
+ gqlAPIServiceArguments.filter = filter;
2729
+ }
2730
+ if (limit) {
2731
+ gqlAPIServiceArguments.limit = limit;
2732
+ }
2733
+ if (nextToken) {
2734
+ gqlAPIServiceArguments.nextToken = nextToken;
2735
+ }
2736
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2737
+ return response.data.listUserSessionsByUserId;
981
2738
  }
982
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: TenantService, deps: [{ token: GraphQLHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
983
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: TenantService, providedIn: 'root' });
2739
+ async UpdateUserSession(input, condition) {
2740
+ const statement = `mutation UpdateUserSession($input: UpdateUserSessionInput!, $condition: ModelUserSessionConditionInput) {
2741
+ updateUserSession(input: $input, condition: $condition) {
2742
+ ${USER_SESSION_FIELDS}
2743
+ }
2744
+ }`;
2745
+ const gqlAPIServiceArguments = {
2746
+ input,
2747
+ };
2748
+ if (condition) {
2749
+ gqlAPIServiceArguments.condition = condition;
2750
+ }
2751
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
2752
+ return response.data.updateUserSession;
2753
+ }
2754
+ OnUserSessionByIdListener(id) {
2755
+ const statement = `subscription OnUserSessionById($id: ID!) {
2756
+ OnUserSessionById(id: $id) {
2757
+ ${USER_SESSION_FIELDS}
2758
+ }
2759
+ }`;
2760
+ const gqlAPIServiceArguments = { id };
2761
+ return this.appSyncService.subscribe(statement, gqlAPIServiceArguments);
2762
+ /* as Observable<SubscriptionResponse<Pick<__SubscriptionContainer, 'OnUserSessionById'>>>; */
2763
+ }
2764
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: UserSessionService, deps: [{ token: AppSyncHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
2765
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: UserSessionService, providedIn: 'root' });
984
2766
  }
985
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: TenantService, decorators: [{
2767
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: UserSessionService, decorators: [{
986
2768
  type: Injectable,
987
2769
  args: [{
988
2770
  providedIn: 'root',
989
2771
  }]
990
- }], ctorParameters: () => [{ type: GraphQLHelperService }] });
2772
+ }], ctorParameters: () => [{ type: AppSyncHelperService }] });
991
2773
 
992
- var UserType;
993
- (function (UserType) {
994
- UserType["AGENT"] = "AGENT";
995
- UserType["SUPERVISOR"] = "SUPERVISOR";
996
- UserType["ADMINISTRATOR"] = "ADMINISTRATOR";
997
- })(UserType || (UserType = {}));
2774
+ const FIELDS_USER_EXPANDED = `
2775
+ id
2776
+ externalId
2777
+ tenantId
2778
+ email
2779
+ name
2780
+ image {
2781
+ key
2782
+ bucket
2783
+ location
2784
+ }
2785
+ phoneNumber {
2786
+ countryCode
2787
+ dialCode
2788
+ e164Number
2789
+ internationalNumber
2790
+ nationalNumber
2791
+ number
2792
+ }
2793
+ preferences {
2794
+ timezoneName
2795
+ language {
2796
+ code
2797
+ nameEn
2798
+ nameLocal
2799
+ }
2800
+ }
2801
+ notificationSettings {
2802
+ allowPush
2803
+ allowEmail
2804
+ allowSMS
2805
+ allowWhatsApp
2806
+ }
2807
+ type
2808
+ activatedAt
2809
+ blockedAt
2810
+ createdAt
2811
+ updatedAt
2812
+ deletedAt
2813
+ `;
998
2814
  var UserStatus;
999
2815
  (function (UserStatus) {
1000
2816
  UserStatus["READY"] = "READY";
@@ -1003,91 +2819,62 @@ var UserStatus;
1003
2819
  UserStatus["BUSY"] = "BUSY";
1004
2820
  UserStatus["AFTER_CALL_WORK"] = "AFTER_CALL_WORK";
1005
2821
  })(UserStatus || (UserStatus = {}));
2822
+ var UserType;
2823
+ (function (UserType) {
2824
+ UserType["AGENT"] = "AGENT";
2825
+ UserType["SUPERVISOR"] = "SUPERVISOR";
2826
+ UserType["ADMINISTRATOR"] = "ADMINISTRATOR";
2827
+ })(UserType || (UserType = {}));
1006
2828
  class UserService {
1007
- graphQLHelperService;
1008
- constructor(graphQLHelperService) {
1009
- this.graphQLHelperService = graphQLHelperService;
2829
+ appSyncService;
2830
+ constructor(appSyncService) {
2831
+ this.appSyncService = appSyncService;
1010
2832
  }
1011
2833
  async getUserById(id) {
1012
2834
  if (!id || !uuid.validate(id)) {
1013
2835
  throw { code: 400, message: `Invalid id: ${id}` };
1014
2836
  }
1015
- const res_getUser = await this.GetUser(id);
1016
- // console.debug('res_getUser: ', res_getUser);
1017
- if (!res_getUser || !!res_getUser.deletedAt) {
2837
+ const user = await this.GetUser(id);
2838
+ if (!user || !!user.deletedAt) {
1018
2839
  throw { code: 400, message: `User not found` };
1019
2840
  }
1020
- else if (!res_getUser.activatedAt) {
1021
- throw {
1022
- code: 403,
1023
- message: `User not activated.`,
1024
- };
2841
+ if (!user.activatedAt) {
2842
+ throw { code: 403, message: `User not activated.` };
1025
2843
  }
1026
- else if (!!res_getUser.blockedAt) {
1027
- throw {
1028
- code: 403,
1029
- message: `User has been blocked.`,
1030
- };
2844
+ if (!!user.blockedAt) {
2845
+ throw { code: 403, message: `User has been blocked.` };
1031
2846
  }
1032
- return res_getUser;
2847
+ return user;
1033
2848
  }
1034
2849
  async GetUser(id) {
1035
2850
  const statement = `query GetUser($id: ID!) {
1036
2851
  getUser(id: $id) {
1037
- id
1038
- tenantId
1039
- email
1040
- name
1041
- image {
1042
- key
1043
- bucket
1044
- location
1045
- }
1046
- phoneNumber {
1047
- countryCode
1048
- dialCode
1049
- e164Number
1050
- internationalNumber
1051
- nationalNumber
1052
- number
1053
- }
1054
- preferences {
1055
- timezoneName
1056
- language {
1057
- code
1058
- nameEn
1059
- nameLocal
1060
- }
1061
- }
1062
- notificationSettings {
1063
- allowPush
1064
- allowEmail
1065
- allowSMS
1066
- allowWhatsApp
1067
- }
1068
- type
1069
- activatedAt
1070
- blockedAt
1071
- createdAt
1072
- updatedAt
1073
- deletedAt
2852
+ ${FIELDS_USER_EXPANDED}
1074
2853
  }
1075
2854
  }`;
1076
- const gqlAPIServiceArguments = {
1077
- id,
1078
- };
1079
- const response = await this.graphQLHelperService.executeQuery(statement, gqlAPIServiceArguments);
2855
+ const gqlAPIServiceArguments = { id };
2856
+ const response = await this.appSyncService.query(statement, gqlAPIServiceArguments);
1080
2857
  return response.data.getUser;
1081
2858
  }
1082
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: UserService, deps: [{ token: GraphQLHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
1083
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: UserService, providedIn: 'root' });
2859
+ OnUserByIdListener(id) {
2860
+ const statement = `subscription OnUserById($id: ID!) {
2861
+ OnUserById(id: $id) {
2862
+ ${FIELDS_USER_EXPANDED}
2863
+ }
2864
+ }`;
2865
+ const gqlAPIServiceArguments = { id };
2866
+ return this.appSyncService.subscribe(statement, gqlAPIServiceArguments);
2867
+ /* as Observable<SubscriptionResponse<Pick<__SubscriptionContainer, "OnUserById">>>; */
2868
+ }
2869
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: UserService, deps: [{ token: AppSyncHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
2870
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: UserService, providedIn: 'root' });
1084
2871
  }
1085
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.2", ngImport: i0, type: UserService, decorators: [{
2872
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: UserService, decorators: [{
1086
2873
  type: Injectable,
1087
2874
  args: [{
1088
2875
  providedIn: 'root',
1089
2876
  }]
1090
- }], ctorParameters: () => [{ type: GraphQLHelperService }] });
2877
+ }], ctorParameters: () => [{ type: AppSyncHelperService }] });
1091
2878
 
1092
2879
  class CustomValidators {
1093
2880
  /**
@@ -1192,5 +2979,5 @@ class CleanDeep {
1192
2979
  * Generated bundle index. Do not edit.
1193
2980
  */
1194
2981
 
1195
- export { CleanDeep, CustomPipesModule, CustomValidators, DomainNamePipe, ErrorComponent, FooterComponent, FormatEpochTimestampPipe, GraphQLHelperService, LoaderComponent, ModelAttributeTypes, ModelSortDirection, S3HelperService, SafeHtmlPipe, SearchInnerFieldPipe, SearchPipe, SingularizePipe, SnugdeskAuthenticationService, SnugdeskCoreModule, SnugdeskIPRegistryService, TenantService, UserService, UserStatus, UserType };
2982
+ export { AMPLIFY_CONFIG, AppSyncHelperService, CleanDeep, CustomPipesModule, CustomValidators, DomainNamePipe, EntityConversationService, EntityService, ErrorComponent, FIELDS_ENTITY_CONVERSATION, FIELDS_ENTITY_CONVERSATION_EXPANDED, FIELDS_INTERACTION_WIDGET, FooterComponent, FormatEpochTimestampPipe, InteractionChannel, InteractionContext, InteractionDirection, InteractionEndpointService, InteractionProvider, InteractionRouteLogic, InteractionService, InteractionStatus, InteractionWidgetService, LoaderComponent, ModelAttributeTypes, ModelSortDirection, S3HelperService, SafeHtmlPipe, SearchInnerFieldPipe, SearchPipe, SingularizePipe, SnugdeskAuthenticationService, SnugdeskCoreModule, SnugdeskIPRegistryService, TenantService, UserService, UserSessionService, UserStatus, UserType, provideAmplifyConfig };
1196
2983
  //# sourceMappingURL=snugdesk-core.mjs.map